/* ============================================================
   مساكن النرجس — Enhanced Investor Portal CSS
   Premium Dark Theme with Advanced Animations & Glassmorphism
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
  --bg-main: #030818;
  --bg-secondary: #0a1240;
  --bg-card: rgba(12, 20, 68, 0.85);
  --bg-card-2: rgba(16, 28, 88, 0.9);
  --bg-glass: rgba(255, 255, 255, 0.025);

  --text-primary: #f0f4ff;
  --text-secondary: #b0bfe0;
  --text-muted: #6b7db0;

  --accent-blue: #4a7dff;
  --accent-purple: #8b5cf6;
  --accent-pink: #ec4899;
  --accent-cyan: #22d3ee;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --accent-orange: #f59e0b;
  --accent-gold: #fbbf24;

  --border-color: rgba(90, 120, 255, 0.18);
  --border-glow: rgba(74, 125, 255, 0.35);
  --shadow-soft: 0 20px 60px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 40px rgba(74, 125, 255, 0.08);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "Tajawal", "Segoe UI", Arial, sans-serif;
  color: var(--text-primary);
  background: var(--bg-main);
  overflow-x: hidden;
  min-height: 100vh;
  line-height: 1.6;
}

/* Smooth gradient background layers */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 800px 600px at 10% 15%, rgba(74, 125, 255, 0.1), transparent),
    radial-gradient(ellipse 600px 500px at 90% 10%, rgba(139, 92, 246, 0.12), transparent),
    radial-gradient(ellipse 700px 500px at 15% 85%, rgba(236, 72, 153, 0.08), transparent),
    radial-gradient(ellipse 500px 400px at 80% 75%, rgba(34, 211, 238, 0.06), transparent);
  z-index: 0;
  pointer-events: none;
}

.hidden {
  display: none !important;
}

/* ===== CONTAINER ===== */
.container {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  padding: 40px 0 70px;
  position: relative;
  z-index: 2;
}

/* ===== ANIMATED BACKGROUND ORBS ===== */
.bg-orbs {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.3;
  will-change: transform;
}

.orb-1 {
  width: 450px;
  height: 450px;
  right: -100px;
  top: -60px;
  background: radial-gradient(circle, rgba(74, 125, 255, 0.4), transparent 70%);
  animation: orbFloat1 20s ease-in-out infinite;
}

.orb-2 {
  width: 500px;
  height: 500px;
  left: -140px;
  bottom: 60px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.35), transparent 70%);
  animation: orbFloat2 25s ease-in-out infinite;
}

.orb-3 {
  width: 300px;
  height: 300px;
  right: 15%;
  top: 45%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.2), transparent 70%);
  animation: orbFloat3 18s ease-in-out infinite;
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-30px, 40px) scale(1.05); }
  66% { transform: translate(20px, -20px) scale(0.95); }
}

@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.08); }
  66% { transform: translate(-20px, 50px) scale(0.92); }
}

@keyframes orbFloat3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-25px, 30px) scale(1.1); }
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 8, 24, 0.96);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 9999;
  transition: opacity 0.6s var(--transition-smooth), visibility 0.6s;
}

.loading-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

.spinner {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.06);
  border-top-color: var(--accent-blue);
  border-right-color: var(--accent-purple);
  animation: spinGlow 1s linear infinite;
  box-shadow: 0 0 30px rgba(74, 125, 255, 0.2);
}

@keyframes spinGlow {
  to { transform: rotate(360deg); }
}

.loading-overlay > div:last-child {
  color: var(--text-secondary);
  font-size: 15px;
  letter-spacing: 0.5px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ===== SCROLL REVEAL ANIMATIONS ===== */
.animate-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--transition-smooth), transform 0.7s var(--transition-smooth);
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-delay-1 { transition-delay: 0.1s; }
.animate-delay-2 { transition-delay: 0.2s; }
.animate-delay-3 { transition-delay: 0.3s; }

/* ===== HEADER ===== */
.header {
  text-align: center;
  margin-bottom: 36px;
  padding: 20px 0;
}

.report-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 999px;
  background: rgba(74, 125, 255, 0.06);
  border: 1px solid rgba(74, 125, 255, 0.2);
  color: #c0d4ff;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
  backdrop-filter: blur(10px);
  animation: badgeGlow 3s ease-in-out infinite;
}

@keyframes badgeGlow {
  0%, 100% { box-shadow: 0 0 15px rgba(74, 125, 255, 0.05); }
  50% { box-shadow: 0 0 25px rgba(74, 125, 255, 0.12); }
}

.logo-icon {
  font-size: 52px;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 20px rgba(236, 72, 153, 0.3));
  animation: floatIcon 4s ease-in-out infinite;
}

@keyframes floatIcon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

#companyName {
  margin: 0;
  font-size: clamp(36px, 5.5vw, 68px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #a855f7, #ec4899, #4a7dff);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 6s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.subtitle {
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 26px;
  font-weight: 500;
  opacity: 0.9;
}

/* ===== SECTIONS ===== */
.section {
  margin-bottom: 36px;
}

.section-title {
  font-size: clamp(24px, 3vw, 40px);
  margin: 0 0 22px;
  text-align: center;
  font-weight: 800;
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 80px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple), var(--accent-pink));
  margin: 16px auto 0;
  animation: lineGlow 3s ease-in-out infinite;
}

@keyframes lineGlow {
  0%, 100% { width: 80px; opacity: 1; }
  50% { width: 120px; opacity: 0.8; }
}

.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(90, 120, 255, 0.2), transparent);
  margin: 32px 0;
}

/* ===== CARD SYSTEM ===== */
.card,
.stat-item,
.month-card,
.data-card,
.summary-box,
.percent-card,
.chart-container,
.total-box,
.investor-main-card,
.details-extended-card {
  background: linear-gradient(180deg, rgba(14, 24, 82, 0.9), rgba(8, 15, 55, 0.92));
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-soft), var(--shadow-glow);
  transition: all 0.4s var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

/* Subtle shimmer overlay on cards */
.card::before,
.stat-item::before,
.month-card::before,
.data-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.02), transparent);
  transition: left 0.6s ease;
  pointer-events: none;
}

.card:hover::before,
.stat-item:hover::before,
.month-card:hover::before,
.data-card:hover::before {
  left: 100%;
}

.card:hover,
.stat-item:hover,
.month-card:hover,
.data-card:hover,
.summary-box:hover,
.percent-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-soft), 0 0 30px rgba(74, 125, 255, 0.1);
}

.card {
  border-radius: var(--radius-xl);
  padding: 28px;
}

.card-glass {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ===== MESSAGE CONTENT ===== */
.message-content {
  color: var(--text-secondary);
  line-height: 2;
  font-size: 17px;
  white-space: pre-line;
}

.message-signature {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.signature-item {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-size: 14px;
  transition: all 0.3s ease;
  cursor: default;
}

.signature-item:hover {
  background: rgba(74, 125, 255, 0.08);
  border-color: rgba(74, 125, 255, 0.2);
  transform: translateY(-1px);
}

.signature-item .icon {
  margin-left: 6px;
}

/* ===== STATS ROW ===== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 32px 0 30px;
}

.stat-item {
  border-radius: 24px;
  padding: 30px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Gradient accent top border */
.stat-item::after {
  content: "";
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
  border-radius: 0 0 4px 4px;
  opacity: 0;
  transition: all 0.4s ease;
}

.stat-item:hover::after {
  opacity: 1;
  left: 10%;
  right: 10%;
}

.stat-number {
  font-size: clamp(32px, 4vw, 50px);
  font-weight: 900;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #fff, #c0d4ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 17px;
  font-weight: 500;
}

/* ===== NAVIGATION TABS ===== */
.nav-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
  position: sticky;
  top: 10px;
  z-index: 100;
  padding: 14px 20px;
  background: rgba(3, 8, 24, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(90, 120, 255, 0.1);
}

.nav-tab {
  appearance: none;
  border: 1px solid rgba(90, 120, 255, 0.2);
  background: rgba(10, 18, 65, 0.7);
  color: var(--text-secondary);
  border-radius: 14px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.35s var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.nav-tab::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple), var(--accent-pink));
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.nav-tab:hover {
  transform: translateY(-2px);
  border-color: rgba(139, 92, 246, 0.4);
  color: #fff;
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.15);
}

.nav-tab.active {
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 30px rgba(124, 58, 237, 0.3);
}

.nav-tab.active::before {
  opacity: 1;
}

/* ===== TAB CONTENT ===== */
.tab-content {
  display: none;
  animation: tabReveal 0.5s var(--transition-smooth);
}

.tab-content.active {
  display: block;
}

@keyframes tabReveal {
  from {
    opacity: 0;
    transform: translateY(15px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ===== SELECTORS ===== */
.selectors-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 280px));
  gap: 18px;
  justify-content: center;
  margin-bottom: 28px;
}

.selector-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.selector-box label {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.styled-select {
  appearance: none;
  width: 100%;
  border-radius: 16px;
  padding: 14px 18px;
  background: rgba(8, 16, 65, 0.95);
  color: #fff;
  border: 1px solid rgba(90, 120, 255, 0.2);
  font-size: 16px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: all 0.3s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%234a7dff' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 16px center;
}

.styled-select:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(74, 125, 255, 0.12);
}

/* ===== MONTH DISPLAY ===== */
.month-title {
  text-align: center;
  margin-bottom: 28px;
}

.month-title h2 {
  font-size: 32px;
  margin: 0 0 8px;
  color: var(--text-secondary);
  font-weight: 500;
}

.month-name {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 900;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== MONTH GRID ===== */
.month-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.month-card {
  border-radius: 22px;
  padding: 24px;
  min-height: 120px;
  position: relative;
}

.month-card.full-width {
  grid-column: 1 / -1;
}

.card-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-bottom: 16px;
  box-shadow: 0 0 12px currentColor;
}

.card-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-label {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
}

.card-value {
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

/* ===== GRID LAYOUTS ===== */
.month-percent-row,
.percent-grid,
.summary-grid,
.data-grid,
.yearly-breakdown-grid,
.quarter-month-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.month-percent-row,
.percent-grid,
.summary-grid,
.data-grid,
.yearly-breakdown-grid {
  margin-top: 20px;
}

.percent-card,
.summary-box,
.data-card {
  border-radius: 20px;
  padding: 20px 18px;
}

.percent-value,
.data-card .value,
.summary-box .value {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
}

.percent-label,
.data-card .label,
.summary-box .label {
  color: var(--text-secondary);
  font-size: 14px;
}

.data-card.highlight {
  background: linear-gradient(180deg, rgba(35, 45, 120, 0.95), rgba(15, 22, 78, 0.95));
  border-color: rgba(139, 92, 246, 0.3);
}

.data-card.highlight::after {
  content: "";
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-pink));
  border-radius: 0 0 4px 4px;
}

/* ===== QUARTER HEADER ===== */
.quarter-header {
  text-align: center;
  margin-bottom: 28px;
}

.image-placeholder {
  width: 90px;
  height: 90px;
  border-radius: 24px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  font-size: 40px;
  background: linear-gradient(145deg, rgba(74, 125, 255, 0.25), rgba(139, 92, 246, 0.3));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 40px rgba(74, 125, 255, 0.15);
  animation: floatIcon 5s ease-in-out infinite;
}

.quarter-header h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 900;
  color: var(--accent-cyan);
}

.quarter-subtitle {
  font-size: 20px;
  font-weight: 700;
  margin-top: 10px;
  color: var(--text-secondary);
}

.period {
  color: var(--text-muted);
  margin-top: 8px;
  font-size: 17px;
}

/* ===== CHARTS ===== */
.chart-container {
  border-radius: var(--radius-xl);
  padding: 28px;
  margin-top: 22px;
}

.chart-title {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.chart-wrapper {
  position: relative;
  width: 100%;
  min-height: 340px;
}

/* ===== TOTAL BOX ===== */
.total-box {
  border-radius: 22px;
  padding: 22px 24px;
  margin-top: 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.total-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
  border-radius: 0 0 4px 4px;
}

.total-box .label {
  color: var(--text-secondary);
  margin-bottom: 10px;
  font-size: 16px;
}

.total-box .value {
  font-size: 36px;
  font-weight: 900;
  background: linear-gradient(135deg, #fff, var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== INVESTOR DETAILS ===== */
.investor-details-shell {
  display: grid;
  gap: 24px;
}

.investor-main-card,
.details-extended-card {
  border-radius: var(--radius-xl);
  padding: 32px;
}

.modern-profile {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
}

.investor-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 44px;
  font-weight: 900;
  background: linear-gradient(145deg, var(--accent-blue), var(--accent-purple), var(--accent-pink));
  background-size: 200% 200%;
  animation: gradientShift 4s ease-in-out infinite;
  box-shadow: 0 16px 40px rgba(139, 92, 246, 0.3);
  flex-shrink: 0;
  color: #fff;
}

.investor-name {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 900;
  line-height: 1.2;
}

.investor-code {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 15px;
}

.investor-main-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
}

.investor-side-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.investor-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.3s ease;
}

.investor-line:hover {
  background: rgba(74, 125, 255, 0.04);
  border-color: rgba(74, 125, 255, 0.12);
}

.investor-line span {
  color: var(--text-secondary);
  font-size: 14px;
}

.investor-line strong {
  font-size: 16px;
  word-break: break-word;
  text-align: left;
}

.investor-stat-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.investor-stat-pill {
  padding: 18px 22px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(90, 120, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  transition: all 0.3s ease;
}

.investor-stat-pill:hover {
  border-color: rgba(90, 120, 255, 0.3);
  background: rgba(74, 125, 255, 0.04);
  transform: translateX(-3px);
}

.investor-stat-pill span {
  color: var(--text-secondary);
  font-size: 15px;
}

.investor-stat-pill strong {
  font-size: 26px;
  font-weight: 800;
}

.highlight-pill {
  border-color: rgba(74, 125, 255, 0.4) !important;
  box-shadow: 0 0 0 1px rgba(74, 125, 255, 0.12) inset, 0 0 30px rgba(74, 125, 255, 0.06);
}

/* ===== DETAILS TABLE ===== */
.mini-title {
  margin: 0 0 20px;
  font-size: 22px;
  font-weight: 800;
}

.details-table {
  width: 100%;
  border-collapse: collapse;
}

.details-table td {
  padding: 14px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: top;
  transition: background 0.2s ease;
}

.details-table tr:hover td {
  background: rgba(74, 125, 255, 0.03);
}

.details-table td:first-child {
  color: var(--text-secondary);
  width: 35%;
  font-size: 14px;
}

.full-details-table td:last-child {
  word-break: break-word;
  font-weight: 600;
}

/* ===== QUOTE BOX ===== */
.quote-box {
  border-radius: 22px;
  text-align: center;
  padding: 24px;
  font-size: 26px;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.06), rgba(139, 92, 246, 0.06));
  border: 1px solid rgba(34, 211, 238, 0.15);
  position: relative;
}

.quote-box::before {
  content: "❝";
  position: absolute;
  top: 12px;
  right: 20px;
  font-size: 40px;
  opacity: 0.15;
  color: var(--accent-cyan);
}

.extra-value-clamped {
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
  max-height: 100px;
  overflow: auto;
  padding-inline-start: 6px;
}

/* ===== QUARTER MONTH BREAKDOWN ===== */
.quarterly-selector-wrap {
  margin-bottom: 24px;
}

#quarterMonthBreakdown {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

#quarterMonthBreakdown .summary-box {
  min-height: 170px;
  border-radius: 24px;
  padding: 24px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#quarterMonthBreakdown .label {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 14px;
  color: #fff;
}

#quarterMonthBreakdown .value {
  display: block;
  font-size: 15px;
  line-height: 2;
  color: var(--text-secondary);
}

/* ===== YEARLY BREAKDOWN ===== */
#yearlyBreakdownGrid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

#yearlyBreakdownGrid .summary-box {
  border-radius: 24px;
  padding: 24px 20px;
  min-height: 210px;
  text-align: center;
}

#yearlyBreakdownGrid .label {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
}

#yearlyBreakdownGrid .value {
  display: block;
  font-size: 16px;
  line-height: 2;
  color: var(--text-secondary);
}

/* ===== FOOTER ADVANCED ===== */
.footer-advanced {
  margin-top: 50px;
  border-top: 1px solid rgba(90, 120, 255, 0.15);
  padding: 50px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 36px;
  align-items: center;
  background: linear-gradient(180deg, rgba(12, 20, 68, 0.9), rgba(8, 14, 52, 0.95));
  border: 1px solid rgba(90, 120, 255, 0.12);
  border-radius: var(--radius-xl);
  padding: 40px 44px;
  backdrop-filter: blur(10px);
}

.footer-divider {
  width: 1px;
  height: 220px;
  background: linear-gradient(180deg, transparent, rgba(90, 120, 255, 0.3), transparent);
}

.footer-brand-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.footer-logo {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 32px;
  background: linear-gradient(145deg, var(--accent-blue), var(--accent-pink));
  box-shadow: 0 14px 30px rgba(139, 92, 246, 0.25);
  flex-shrink: 0;
}

.footer-brand-title {
  margin: 0;
  font-size: 34px;
  font-weight: 900;
}

.footer-brand-subtitle {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 16px;
}

.footer-brand-text {
  margin: 16px 0 24px;
  color: var(--text-secondary);
  line-height: 2;
  font-size: 16px;
  max-width: 420px;
}

.footer-socials {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-social {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-decoration: none;
  color: #fff;
  background: rgba(90, 120, 255, 0.1);
  border: 1px solid rgba(90, 120, 255, 0.2);
  font-size: 18px;
  transition: all 0.35s var(--transition-smooth);
}

.footer-social:hover {
  transform: translateY(-3px) scale(1.05);
  background: rgba(90, 120, 255, 0.2);
  border-color: var(--accent-blue);
  box-shadow: 0 8px 20px rgba(74, 125, 255, 0.2);
}

.footer-contact-title {
  margin: 0 0 28px;
  font-size: 38px;
  font-weight: 900;
  background: linear-gradient(135deg, #c0d4ff, #8b9fd9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-contact-item {
  margin-bottom: 20px;
}

.footer-contact-label {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.footer-contact-value {
  color: var(--text-primary);
  font-size: 20px;
  line-height: 1.8;
  word-break: break-word;
}

.footer-bottom-line {
  text-align: center;
  margin-top: 22px;
  color: var(--text-muted);
  font-size: 14px;
  letter-spacing: 0.5px;
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
  background: rgba(90, 120, 255, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(90, 120, 255, 0.5);
}

/* ===== SELECTION ===== */
::selection {
  background: rgba(74, 125, 255, 0.3);
  color: #fff;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .stats-row,
  .selectors-card,
  .investor-main-grid,
  .month-grid {
    grid-template-columns: 1fr;
  }

  .message-signature {
    justify-content: center;
  }

  .investor-stat-pill {
    flex-direction: column;
    align-items: flex-start;
  }

  .investor-line {
    flex-direction: column;
    align-items: flex-start;
  }

  .quote-box {
    font-size: 22px;
  }

  #quarterMonthBreakdown,
  #yearlyBreakdownGrid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    padding: 28px 24px;
  }

  .footer-divider {
    display: none;
  }

  .nav-tabs {
    position: relative;
    top: auto;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 24px, 1200px);
    padding-top: 24px;
  }

  .card,
  .chart-container,
  .investor-main-card,
  .details-extended-card {
    padding: 20px;
  }

  .nav-tabs {
    gap: 8px;
    padding: 10px;
  }

  .nav-tab {
    width: 100%;
    text-align: center;
  }

  .stat-number {
    font-size: 30px;
  }

  .month-name,
  .quarter-header h2 {
    font-size: 32px;
  }

  .chart-wrapper {
    min-height: 260px;
  }

  #quarterMonthBreakdown,
  #yearlyBreakdownGrid {
    grid-template-columns: 1fr;
  }

  .footer-contact-title {
    font-size: 28px;
  }

  .footer-brand-title {
    font-size: 26px;
  }

  .footer-contact-value {
    font-size: 17px;
  }

  .modern-profile {
    flex-direction: column;
    text-align: center;
  }
}

/* ===== COUNTER ANIMATION ===== */
.count-up {
  display: inline-block;
}

/* ===== NUMBER POSITIVE/NEGATIVE INDICATORS ===== */
.percent-value.positive {
  color: var(--accent-green);
}

.percent-value.negative {
  color: var(--accent-red);
}

/* ===== DOT ELEMENT IN SUMMARY ===== */
.summary-box .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-bottom: 14px;
  box-shadow: 0 0 10px currentColor;
}

.summary-box .info {
  width: 100%;
}

/* ===== CONTACT SECTION (fallback) ===== */
.contact-section {
  margin-top: 36px;
  border-radius: var(--radius-xl);
  padding: 32px;
  background: linear-gradient(180deg, rgba(12, 20, 68, 0.9), rgba(8, 14, 52, 0.95));
  border: 1px solid rgba(90, 120, 255, 0.14);
  text-align: center;
}

.contact-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.brand-name {
  font-size: 28px;
  font-weight: 800;
}

.social-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.social-link {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link:hover {
  transform: translateY(-3px);
  border-color: rgba(90, 120, 255, 0.3);
  background: rgba(74, 125, 255, 0.08);
}

.contact-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 24px;
  text-align: right;
}

.contact-col h4 {
  margin: 0 0 8px;
  font-size: 22px;
}

.contact-col p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.9;
}

.footer {
  text-align: center;
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 14px;
}

/* Quarter investor summary: transferred / share / balance */
.quarter-investor-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 18px 0 22px;
}

.quarter-investor-summary .summary-box {
  min-height: 96px;
}

@media (max-width: 768px) {
  .quarter-investor-summary {
    grid-template-columns: 1fr;
  }
}

/* Fix quarterly cards visual order */
#tab-quarterly .data-grid {
  direction: rtl;
}

#tab-quarterly .data-grid .data-card:nth-child(1) { order: 1; }
#tab-quarterly .data-grid .data-card:nth-child(2) { order: 2; }
#tab-quarterly .data-grid .data-card:nth-child(3) { order: 3; }
#tab-quarterly .data-grid .data-card:nth-child(4) { order: 4; }

.payments-details-card {
  margin-top: 24px;
  padding: 24px;
}

.payments-details-card h2 {
  margin-bottom: 20px;
  text-align: center;
}

.payments-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.payment-summary-box {
  background: rgba(16, 32, 96, 0.65);
  border: 1px solid rgba(74, 125, 255, 0.35);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}

.payment-summary-box span {
  display: block;
  color: #9fb0e8;
  margin-bottom: 8px;
}

.payment-summary-box strong {
  color: #dbe7ff;
  font-size: 24px;
}

.payment-summary-box.highlight strong {
  color: #00d4ff;
}

.payments-list {
  display: grid;
  gap: 12px;
}

.payment-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: rgba(9, 18, 58, 0.7);
  border: 1px solid rgba(74, 125, 255, 0.35);
  border-radius: 14px;
  padding: 14px 16px;
}

.payment-item strong {
  display: block;
  color: #fff;
  margin-bottom: 6px;
}

.payment-item span {
  color: #9fb0e8;
}

.payment-item b {
  color: #00e0ff;
  font-size: 20px;
}

.payments-note {
  margin-top: 16px;
  color: #9fb0e8;
  text-align: center;
  line-height: 1.8;
}

.payment-empty {
  text-align: center;
  color: #9fb0e8;
  padding: 18px;
}

@media (max-width: 768px) {
  .payments-summary-grid {
    grid-template-columns: 1fr;
  }

  .payment-item {
    flex-direction: column;
    align-items: flex-start;
  }
}
