:root {
  --bg-main: #050b2b;
  --bg-secondary: #0b1649;
  --bg-card: rgba(14, 24, 77, 0.88);
  --bg-card-2: rgba(18, 31, 95, 0.92);
  --bg-glass: rgba(255, 255, 255, 0.03);

  --text-primary: #ffffff;
  --text-secondary: #b8c4e3;
  --text-muted: #7f91c7;

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

  --border-color: rgba(102, 131, 255, 0.22);
  --shadow-soft: 0 20px 60px rgba(0, 0, 0, 0.28);
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Tajawal", Arial, sans-serif;
  color: var(--text-primary);
  background:
    radial-gradient(circle at 12% 18%, rgba(74, 125, 255, 0.12), transparent 26%),
    radial-gradient(circle at 88% 14%, rgba(139, 92, 246, 0.16), transparent 22%),
    radial-gradient(circle at 18% 88%, rgba(236, 72, 153, 0.12), transparent 22%),
    linear-gradient(180deg, #06103a 0%, #030923 100%);
  overflow-x: hidden;
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 36px 0 60px;
  position: relative;
  z-index: 2;
}

.bg-orbs {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
}

.orb-1 {
  width: 380px;
  height: 380px;
  right: -80px;
  top: -40px;
  background: rgba(74, 125, 255, 0.32);
}

.orb-2 {
  width: 420px;
  height: 420px;
  left: -120px;
  bottom: 80px;
  background: rgba(139, 92, 246, 0.25);
}

.orb-3 {
  width: 260px;
  height: 260px;
  right: 18%;
  top: 48%;
  background: rgba(34, 211, 238, 0.16);
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 9999;
}

.spinner {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.08);
  border-top-color: var(--accent-blue);
  animation: spin 0.9s linear infinite;
}

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

.header {
  text-align: center;
  margin-bottom: 28px;
}

.report-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 170px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(74, 125, 255, 0.08);
  border: 1px solid rgba(74, 125, 255, 0.28);
  color: #dbe7ff;
  font-size: 14px;
  margin-bottom: 18px;
}

.logo-icon {
  font-size: 44px;
  margin-bottom: 10px;
}

#companyName {
  margin: 0;
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
  color: #a855f7;
}

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

.section {
  margin-bottom: 32px;
}

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

.section-title::after {
  content: "";
  display: block;
  width: 78px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-pink));
  margin: 14px auto 0;
}

.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(102, 131, 255, 0.24), transparent);
  margin: 28px 0;
}

.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(17, 31, 98, 0.95), rgba(9, 18, 67, 0.94));
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-soft);
}

.card {
  border-radius: var(--radius-lg);
  padding: 24px;
}

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

.message-content {
  color: var(--text-secondary);
  line-height: 2;
  font-size: 18px;
  white-space: pre-line;
}

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

.signature-item {
  padding: 10px 14px;
  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;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 28px 0 26px;
}

.stat-item {
  border-radius: 24px;
  padding: 28px 20px;
  text-align: center;
}

.stat-number {
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 800;
  margin-bottom: 10px;
}

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

.nav-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
}

.nav-tab {
  appearance: none;
  border: 1px solid rgba(102, 131, 255, 0.28);
  background: rgba(10, 19, 72, 0.8);
  color: var(--text-secondary);
  border-radius: 16px;
  padding: 12px 22px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.25s ease;
}

.nav-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(139, 92, 246, 0.55);
  color: #fff;
}

.nav-tab.active {
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-pink));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 12px 26px rgba(124, 58, 237, 0.28);
}

.tab-content {
  display: none;
  animation: fadeUp 0.35s ease;
}

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

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

.styled-select {
  appearance: none;
  width: 100%;
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(8, 18, 73, 0.96);
  color: #fff;
  border: 1px solid rgba(102, 131, 255, 0.28);
  font-size: 16px;
  outline: none;
}

.month-title {
  text-align: center;
  margin-bottom: 24px;
}

.month-title h2 {
  font-size: 34px;
  margin: 0 0 8px;
}

.month-name {
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 800;
  color: #8b5cf6;
}

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

.month-card {
  border-radius: 22px;
  padding: 20px;
  min-height: 118px;
}

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

.card-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  margin-bottom: 14px;
}

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

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

.card-value {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.1;
}

.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: 18px;
}

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

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

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

.data-card.highlight {
  background: linear-gradient(180deg, rgba(37, 48, 130, 0.98), rgba(16, 26, 85, 0.98));
}

.quarter-header {
  text-align: center;
  margin-bottom: 24px;
}

.image-placeholder {
  width: 94px;
  height: 94px;
  border-radius: 22px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  font-size: 42px;
  background: linear-gradient(180deg, rgba(74, 125, 255, 0.32), rgba(139, 92, 246, 0.35));
  border: 1px solid rgba(255,255,255,0.08);
}

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

.quarter-subtitle {
  font-size: 22px;
  font-weight: 700;
  margin-top: 10px;
}

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

.chart-container {
  border-radius: 26px;
  padding: 24px;
  margin-top: 20px;
}

.chart-title {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 18px;
}

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

.total-box {
  border-radius: 20px;
  padding: 18px 20px;
  margin-top: 18px;
  text-align: center;
}

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

.total-box .value {
  font-size: 34px;
  font-weight: 800;
}

.investor-details-shell {
  display: grid;
  gap: 22px;
}

.investor-main-card,
.details-extended-card {
  border-radius: 28px;
  padding: 28px;
}

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

.investor-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 42px;
  font-weight: 800;
  background: linear-gradient(145deg, var(--accent-blue), var(--accent-pink));
  box-shadow: 0 18px 34px rgba(139, 92, 246, 0.28);
  flex-shrink: 0;
}

.investor-name {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  line-height: 1.2;
}

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

.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 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
}

.investor-line span {
  color: var(--text-secondary);
}

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

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

.investor-stat-pill {
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(102, 131, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

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

.highlight-pill {
  border-color: rgba(74, 125, 255, 0.5);
  box-shadow: 0 0 0 1px rgba(74, 125, 255, 0.16) inset;
}

.mini-title {
  margin: 0 0 18px;
  font-size: 24px;
  font-weight: 800;
}

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

.details-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  vertical-align: top;
}

.details-table td:first-child {
  color: var(--text-secondary);
  width: 34%;
}

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

.quote-box {
  border-radius: 20px;
  text-align: center;
  padding: 18px 20px;
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.1), rgba(139, 92, 246, 0.08));
  border: 1px solid rgba(34, 211, 238, 0.2);
}

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

.contact-section {
  margin-top: 32px;
  border-radius: 28px;
  padding: 28px;
  background: linear-gradient(180deg, rgba(14, 22, 76, 0.92), rgba(9, 16, 62, 0.96));
  border: 1px solid rgba(102, 131, 255, 0.18);
  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.07);
  text-decoration: none;
  transition: 0.2s ease;
}

.social-link:hover {
  transform: translateY(-2px);
  border-color: rgba(102, 131, 255, 0.34);
}

.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;
}

@media (max-width: 992px) {
  .stats-row,
  .selectors-card,
  .investor-main-grid,
  .contact-info,
  .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;
  }
}

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

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

  .nav-tabs {
    gap: 8px;
  }

  .nav-tab {
    width: 100%;
  }

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

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

  .chart-wrapper {
    min-height: 260px;
  }
}
.quarterly-selector-wrap {
  margin-bottom: 22px;
}

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

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

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

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

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

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

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

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

.footer-advanced {
  margin-top: 40px;
  border-top: 1px solid rgba(132, 111, 255, 0.25);
  padding: 40px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 30px;
  align-items: center;
  background: linear-gradient(180deg, rgba(14, 22, 76, 0.86), rgba(9, 16, 62, 0.94));
  border: 1px solid rgba(102, 131, 255, 0.18);
  border-radius: 28px;
  padding: 34px 38px;
}

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

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

.footer-logo {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 34px;
  background: linear-gradient(145deg, var(--accent-blue), var(--accent-pink));
  box-shadow: 0 18px 34px rgba(139, 92, 246, 0.28);
}

.footer-brand-title {
  margin: 0;
  font-size: 36px;
  font-weight: 800;
}

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

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

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

.footer-social {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-decoration: none;
  color: #fff;
  background: rgba(132, 165, 255, 0.14);
  border: 1px solid rgba(132, 165, 255, 0.3);
  font-size: 18px;
  transition: 0.2s ease;
}

.footer-social:hover {
  transform: translateY(-2px);
  background: rgba(132, 165, 255, 0.22);
}

.footer-contact-title {
  margin: 0 0 24px;
  font-size: 42px;
  font-weight: 800;
  color: #b6c9ff;
}

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

.footer-contact-label {
  color: var(--text-secondary);
  font-size: 18px;
  margin-bottom: 6px;
}

.footer-contact-value {
  color: #fff;
  font-size: 22px;
  line-height: 1.8;
  word-break: break-word;
}

.footer-bottom-line {
  text-align: center;
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 15px;
}

@media (max-width: 992px) {
  #quarterMonthBreakdown,
  #yearlyBreakdownGrid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-divider {
    display: none;
  }
}

@media (max-width: 640px) {
  #quarterMonthBreakdown,
  #yearlyBreakdownGrid {
    grid-template-columns: 1fr;
  }

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

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

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