:root {
  color-scheme: light;
  --navy: #17284f;
  --blue: #2b417a;
  --blue-soft: #526aa2;
  --surface: #ffffff;
  --background: #f4f6fb;
  --line: #dfe5f2;
  --text: #17213b;
  --muted: #68728a;
  --success: #08785c;
  --warning: #a66400;
  --danger: #b42318;
  --gold: #d9b65a;
  --gold-soft: #fff7dc;
  font-family: "IBM Plex Sans Arabic", "Noto Sans Arabic", Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
}

body::selection { background: #dfe6f8; color: var(--navy); }

a { color: inherit; }

.topbar {
  min-height: 72px;
  padding: 0 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, .94);
}

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); font-size: 1.25rem; font-weight: 800; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 13px; color: white; background: linear-gradient(135deg, var(--navy), var(--blue-soft)); box-shadow: 0 8px 20px rgba(43, 65, 122, .22); }
.topnav { display: flex; align-items: center; gap: 8px; }
.topnav a { padding: 9px 12px; border-radius: 10px; color: var(--muted); font-size: .88rem; font-weight: 750; text-decoration: none; }
.topnav a:hover, .topnav a.is-current { color: var(--navy); background: #f0f3fa; }
.topnav .nav-primary { color: white; background: var(--navy); }
.topnav .nav-primary:hover { color: white; background: var(--blue); }
.environment-pill, .status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .4rem .75rem;
  background: #eef2fb;
  color: var(--blue);
  font-size: .8rem;
  font-weight: 700;
}
.environment-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(8, 120, 92, .12); }

.dashboard-shell, .account-shell { width: min(1180px, 92vw); margin: 0 auto; padding: 44px 0 72px; }
.account-shell { width: min(820px, 92vw); }
.landing-topbar { position: relative; }
.landing-shell { min-height: calc(100vh - 72px); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); align-items: center; gap: 24px; width: min(1240px, 92vw); margin: auto; padding: 54px 0 72px; background: radial-gradient(circle at 15% 5%, #e8edfa 0, transparent 34%); }
.hero-card { min-height: 610px; padding: clamp(32px, 6vw, 72px); border-radius: 36px; color: white; background: linear-gradient(145deg, #101f42, var(--blue) 64%, #405d9d); box-shadow: 0 34px 90px rgba(23, 40, 79, .24); display: flex; flex-direction: column; justify-content: center; overflow: hidden; position: relative; isolation: isolate; }
.hero-card::after { content: ""; position: absolute; width: 340px; height: 340px; left: -120px; bottom: -150px; border: 70px solid rgba(255,255,255,.06); border-radius: 50%; z-index: -1; }
.hero-card h1 { max-width: 680px; margin: 12px 0 18px; font-size: clamp(2.2rem, 6vw, 4.4rem); line-height: 1.13; }
.hero-card p { max-width: 620px; color: #dce4f8; font-size: 1.08rem; line-height: 1.9; }
.hero-proof { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 54px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.16); }
.hero-proof span { display: grid; gap: 5px; color: #dce4f8; font-size: .76rem; }
.hero-proof strong { color: var(--gold); font-size: .92rem; }
.product-preview { display: grid; gap: 14px; }
.product-tile { display: grid; grid-template-columns: auto 1fr auto; gap: 15px; align-items: center; padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.86); box-shadow: 0 16px 46px rgba(23, 40, 79, .07); }
.product-tile.featured { border-color: #bdcae7; background: white; box-shadow: 0 22px 54px rgba(23, 40, 79, .12); }
.product-tile h2 { margin: 4px 0; color: var(--navy); }
.product-tile p { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.6; }
.product-tile small { color: var(--blue-soft); font-weight: 800; }
.product-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; background: var(--navy); color: white; font-size: 1.25rem; font-weight: 900; }
.muted-icon { color: var(--blue); background: #edf1fa; }
.live-dot { padding: 6px 9px; border-radius: 999px; color: var(--success); background: #e7f7f1; font-size: .74rem; font-weight: 900; }

.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; }
.page-heading h1 { margin: 6px 0 8px; font-size: clamp(1.9rem, 4vw, 3rem); }
.page-heading p { margin: 0; color: var(--muted); }
.eyebrow { color: var(--blue-soft); font-size: .78rem; font-weight: 800; letter-spacing: .04em; }
.hero-card .eyebrow { color: #b9c8ee; }
.filter-label { display: grid; gap: 7px; color: var(--muted); font-size: .78rem; font-weight: 700; }
select { min-width: 150px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--text); }

.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric-card, .panel, .subscription-card, .notice-card { background: var(--surface); border: 1px solid var(--line); box-shadow: 0 12px 38px rgba(23, 40, 79, .06); }
.metric-card { min-height: 130px; padding: 22px; border-radius: 18px; display: flex; flex-direction: column; justify-content: space-between; }
.metric-card span { color: var(--muted); font-size: .88rem; }
.metric-card strong { color: var(--navy); font-size: 2.35rem; font-variant-numeric: tabular-nums; }
.metric-card small { color: var(--blue-soft); font-size: .7rem; font-weight: 800; }
.panel { padding: 24px; border-radius: 22px; }
.customer-panel { margin-bottom: 18px; }
.customer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; }
.customer-card { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(180deg, white, #fafbfe); }
.customer-card-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.customer-card-head > div:last-child { display: grid; gap: 3px; }
.customer-card-head span { color: var(--muted); font-size: .76rem; }
.customer-products { display: grid; gap: 10px; padding-top: 14px; }
.customer-product { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border-radius: 13px; background: #f3f6fb; }
.customer-product > div { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 5px 8px; }
.customer-product > div small { grid-column: 2; color: var(--muted); }
.customer-product .status-badge { grid-row: 1 / 3; padding: .25rem .5rem; font-size: .68rem; }
.launch-link { white-space: nowrap; padding: 8px 10px; border-radius: 9px; color: white; background: var(--navy); font-size: .75rem; font-weight: 850; text-decoration: none; }
.launch-link:hover { background: var(--blue); }
.onboarding-panel { margin-bottom: 18px; }
.onboarding-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.onboarding-form label { display: grid; gap: 7px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.onboarding-form input, .onboarding-form select, .onboarding-form textarea { width: 100%; min-height: 46px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--text); font: inherit; }
.onboarding-form textarea { min-height: 110px; resize: vertical; }
.onboarding-form input:focus, .onboarding-form select:focus, .onboarding-form textarea:focus { outline: 3px solid rgba(82, 106, 162, .16); border-color: var(--blue-soft); }
.onboarding-form .primary-button { align-self: end; }
.website-fields { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #f8f9fc; }
.website-fields[hidden] { display: none; }
.success-state { margin-top: 14px; display: flex; justify-content: space-between; gap: 12px; padding: 15px 17px; border-radius: 12px; background: #e7f7f1; color: var(--success); }
.success-state a { font-weight: 800; }
.panel-heading, .subscription-topline { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.panel-heading h2, .subscription-topline h2 { margin: 5px 0 0; }
.muted { color: var(--muted); font-size: .78rem; }
.renewal-list { display: grid; gap: 10px; }
.renewal-row { display: grid; grid-template-columns: 46px minmax(160px, 1fr) auto 72px 82px; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; }
.price-row { grid-template-columns: minmax(180px, 1fr) minmax(130px, .45fr) minmax(220px, 1fr) 130px; }
.price-row label { display: grid; gap: 6px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.price-row input { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 11px; font: inherit; }
.customer-mark { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; background: var(--navy); color: white; font-weight: 800; }
.renewal-main { display: grid; gap: 4px; }
.renewal-main span { color: var(--muted); font-size: .8rem; }
.status-badge.active { background: #e7f7f1; color: var(--success); }
.status-badge.trialing { background: #eef2fb; color: var(--blue); }
.status-badge.past_due, .status-badge.expired { background: #fff0ee; color: var(--danger); }
.days-badge { display: flex; align-items: baseline; justify-content: center; gap: 3px; color: var(--blue); }
.days-badge strong { font-size: 1.5rem; }
.days-badge span { font-size: .7rem; }
.days-badge.warning { color: var(--warning); }
.days-badge.danger { color: var(--danger); }
.followup-button { padding: 9px 13px; border: 0; border-radius: 10px; background: #edf0f6; color: #8991a3; }

.subscription-card { padding: clamp(24px, 5vw, 44px); border-radius: 26px; }
.subscription-progress { margin: 30px 0; padding: 24px; border-radius: 20px; background: linear-gradient(135deg, var(--navy), var(--blue)); color: white; }
.days-remaining { display: flex; align-items: baseline; gap: 9px; }
.days-remaining strong { font-size: 3.4rem; }
.progress-track { height: 9px; margin-top: 18px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.18); }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: #d9b65a; }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 0 0 28px; }
.detail-grid div { padding: 16px; border: 1px solid var(--line); border-radius: 14px; }
.detail-grid dt { color: var(--muted); font-size: .76rem; }
.detail-grid dd { margin: 7px 0 0; font-weight: 800; }
.notice-card { margin-top: 16px; padding: 20px 24px; border-radius: 18px; border-right: 4px solid #d9b65a; }
.notice-card p { margin: 6px 0 0; color: var(--muted); line-height: 1.7; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.primary-button, .secondary-button { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; padding: 0 20px; border: 0; border-radius: 13px; font-weight: 800; text-decoration: none; }
.primary-button { background: var(--gold); color: #17213b; }
.secondary-button { background: rgba(255,255,255,.12); color: white; border: 1px solid rgba(255,255,255,.3); }
.outline-button { min-height: 48px; padding: 0 20px; border: 1px solid var(--line); border-radius: 13px; background: white; color: var(--muted); font: inherit; font-weight: 800; }
.account-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.product-launch { flex: 1 1 220px; gap: 9px; }
.account-actions .outline-button { flex: 1 1 220px; }
button.primary-button { width: 100%; }
button:disabled { cursor: not-allowed; opacity: .72; }
.loading, .empty-state, .error-state { padding: 24px; color: var(--muted); text-align: center; }
.error-state { color: var(--danger); background: #fff0ee; border-radius: 12px; }

@media (max-width: 820px) {
  .landing-shell { grid-template-columns: 1fr; padding-top: 30px; }
  .hero-card { min-height: auto; }
  .product-preview { grid-template-columns: repeat(3, 1fr); }
  .product-tile { grid-template-columns: auto 1fr; padding: 18px; }
  .product-tile .live-dot { display: none; }
  .renewal-row { grid-template-columns: 44px 1fr auto; }
  .renewal-row .status-badge { grid-column: 2; justify-self: start; }
  .days-badge { grid-column: 3; grid-row: 1; }
  .followup-button { grid-column: 3; grid-row: 2; }
  .price-row { grid-template-columns: 1fr 1fr; }
  .price-row .renewal-main { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .topbar { min-height: 62px; }
  .dashboard-shell, .account-shell { padding-top: 28px; }
  .page-heading { align-items: stretch; flex-direction: column; }
  .topnav a:not(.is-current):not(.nav-primary) { display: none; }
  .topbar { padding-inline: 4vw; }
  .brand span:last-child { display: none; }
  .landing-shell { width: min(100% - 24px, 1240px); padding-bottom: 36px; }
  .hero-card { padding: 34px 24px; border-radius: 26px; }
  .hero-card h1 { font-size: clamp(2.15rem, 12vw, 3.2rem); }
  .hero-proof { grid-template-columns: 1fr; margin-top: 36px; }
  .hero-proof span { grid-template-columns: auto 1fr; align-items: center; }
  .product-preview { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .metric-card { min-height: 108px; padding: 17px; }
  .metric-card strong { font-size: 1.9rem; }
  .panel { padding: 14px; }
  .renewal-row { grid-template-columns: 40px 1fr auto; gap: 10px; }
  .price-row { grid-template-columns: 1fr; }
  .price-row .renewal-main { grid-column: auto; }
  .customer-mark { width: 40px; height: 40px; }
  .detail-grid { grid-template-columns: 1fr; }
  .onboarding-form { grid-template-columns: 1fr; }
  .website-fields { grid-template-columns: 1fr; }
  .subscription-topline { flex-direction: column; }
  .hero-card { border-radius: 24px; }
  .panel-heading { flex-direction: column; }
  .customer-product { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: no-preference) {
  .metric-card, .customer-card, .product-tile { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
  .metric-card:hover, .customer-card:hover, .product-tile:hover { transform: translateY(-2px); border-color: #c7d1e8; box-shadow: 0 18px 44px rgba(23, 40, 79, .09); }
}


.nav-button {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  padding: 0.45rem 0.8rem;
  font: inherit;
  cursor: pointer;
}

.nav-button:hover,
.nav-button:focus-visible {
  background: rgba(255, 255, 255, 0.1);
}
