:root {
  color-scheme: dark;
  --midnight: #0b1020;
  --midnight-deep: #060914;
  --cosmic-indigo: #1a1f4d;
  --astral-violet: #5b4b9a;
  --signal-violet: #7861ff;
  --signal-cyan: #00d4ff;
  --lunar-silver: #c7ccd6;
  --celestial-gold: #d4af37;
  --gold-bright: #f2cc68;
  --stardust: #f6f6f8;
  --muted: #939bb0;
  --line: rgba(199, 204, 214, .13);
  --line-gold: rgba(212, 175, 55, .28);
  --surface: rgba(16, 24, 40, .72);
  --surface-solid: #101828;
  --font-display: "Cinzel", Georgia, serif;
  --font-arabic: "Tajawal", system-ui, sans-serif;
  --font-ui: "Plus Jakarta Sans", "Tajawal", system-ui, sans-serif;
  --shadow: 0 28px 80px rgba(0, 0, 0, .42);
  --container: min(1180px, calc(100% - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 78% 8%, rgba(91, 75, 154, .16), transparent 28rem),
    radial-gradient(circle at 18% 28%, rgba(0, 212, 255, .05), transparent 24rem),
    var(--midnight-deep);
  color: var(--stardust);
  font-family: var(--font-arabic);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
svg { display: block; }
.container { width: var(--container); margin-inline: auto; }
.section { position: relative; padding: 96px 0; }
.skip-link { position: fixed; inset: 12px auto auto 12px; z-index: 100; transform: translateY(-180%); padding: 10px 16px; border-radius: 8px; background: var(--celestial-gold); color: #090b13; font-weight: 800; }
.skip-link:focus { transform: translateY(0); }

.star-field,
.star-field::before,
.star-field::after { position: fixed; inset: 0; pointer-events: none; z-index: -1; content: ""; }
.star-field { opacity: .55; background-image: radial-gradient(circle, rgba(246,246,248,.65) 0 1px, transparent 1.2px); background-size: 92px 92px; background-position: 12px 18px; mask-image: linear-gradient(to bottom, #000, transparent 75%); }
.star-field::before { background-image: radial-gradient(circle, rgba(212,175,55,.8) 0 1px, transparent 1.4px); background-size: 157px 157px; background-position: 40px 70px; }
.star-field::after { background-image: radial-gradient(circle, rgba(0,212,255,.5) 0 1px, transparent 1.3px); background-size: 233px 233px; background-position: 91px 22px; }

.site-header { position: fixed; z-index: 50; inset: 0 0 auto; border-bottom: 1px solid transparent; transition: background .25s ease, border-color .25s ease, backdrop-filter .25s ease; }
.site-header.is-scrolled { background: rgba(6, 9, 20, .82); border-color: var(--line); backdrop-filter: blur(18px); }
.header-inner { height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: flex; align-items: center; direction: ltr; gap: 11px; flex: 0 0 auto; }
.brand-mark { position: relative; display: grid; width: 47px; height: 52px; place-items: center; }
.brand-seven { position: relative; z-index: 2; color: var(--gold-bright); font-family: var(--font-display); font-size: 37px; font-weight: 700; line-height: 1; text-shadow: 0 0 24px rgba(212,175,55,.35); }
.brand-orbit { position: absolute; width: 52px; height: 21px; border: 1px solid rgba(212,175,55,.72); border-radius: 50%; transform: rotate(-24deg); }
.brand-star { position: absolute; top: -1px; right: -2px; color: var(--stardust); font-size: 10px; }
.brand-copy { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-display); letter-spacing: .2em; font-size: 19px; font-weight: 600; }
.brand-name span { color: var(--celestial-gold); }
.brand-product { margin-top: 7px; color: var(--celestial-gold); font-family: var(--font-ui); font-size: 8px; letter-spacing: .38em; }
.desktop-nav { display: flex; align-items: center; gap: 34px; color: var(--lunar-silver); font-size: 14px; }
.desktop-nav a { position: relative; padding: 29px 0 27px; transition: color .2s ease; }
.desktop-nav a::after { position: absolute; content: ""; inset: auto 0 -1px; height: 2px; background: var(--celestial-gold); transform: scaleX(0); transition: transform .2s ease; }
.desktop-nav a:hover, .desktop-nav a.is-active { color: var(--stardust); }
.desktop-nav a.is-active::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.system-pill { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.02); font-size: 12px; white-space: nowrap; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--celestial-gold); box-shadow: 0 0 14px rgba(212,175,55,.7); animation: pulse 1.6s infinite; }
.system-pill.is-ready .status-dot { background: #55d98b; box-shadow: 0 0 14px rgba(85,217,139,.7); }
.system-pill.is-error .status-dot { background: #ff7f78; box-shadow: 0 0 14px rgba(255,127,120,.5); animation: none; }
.icon-button { display: grid; width: 40px; height: 40px; padding: 9px; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.025); cursor: pointer; }
.icon-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.menu-button { display: none; }
.mobile-nav { display: none; }

.hero { min-height: 810px; padding-top: 164px; display: grid; align-items: center; overflow: hidden; }
.hero::after { position: absolute; content: ""; inset: auto -20% -2px; height: 1px; background: linear-gradient(90deg, transparent, var(--line-gold), transparent); }
.hero-grid { display: grid; grid-template-columns: minmax(0, .93fr) minmax(480px, 1.07fr); align-items: center; gap: 50px; }
.hero-copy { position: relative; z-index: 2; }
.eyebrow, .kicker { color: var(--celestial-gold); font-family: var(--font-ui); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--line-gold); border-radius: 999px; background: rgba(212,175,55,.04); }
.hero h1 { margin: 25px 0 24px; font-size: clamp(44px, 5.1vw, 72px); line-height: 1.18; letter-spacing: -.035em; }
.hero h1 span { color: transparent; background: linear-gradient(90deg, #fff 5%, var(--gold-bright) 62%, var(--celestial-gold)); background-clip: text; -webkit-background-clip: text; }
.hero-lead { max-width: 610px; margin: 0; color: var(--lunar-silver); font-size: 19px; line-height: 1.9; }
.hero-actions { display: flex; gap: 12px; margin-top: 34px; }
.button { min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 24px; border: 1px solid transparent; border-radius: 11px; font-weight: 700; cursor: pointer; transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease; }
.button:hover { transform: translateY(-2px); }
.button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 2; }
.button-primary { color: #0a0d18; background: linear-gradient(135deg, var(--gold-bright), var(--celestial-gold)); box-shadow: 0 12px 32px rgba(212,175,55,.16); }
.button-primary:hover { box-shadow: 0 16px 36px rgba(212,175,55,.25); }
.button-ghost { border-color: var(--line); color: var(--stardust); background: rgba(255,255,255,.025); }
.button-ghost:hover { border-color: var(--line-gold); background: rgba(212,175,55,.04); }
.trust-row { display: flex; margin-top: 48px; padding-top: 26px; border-top: 1px solid var(--line); gap: 26px; }
.trust-row > div { min-width: 0; display: grid; grid-template-columns: 28px 1fr; grid-template-rows: auto auto; column-gap: 8px; }
.trust-icon { grid-row: 1 / 3; color: var(--celestial-gold); font-size: 20px; }
.trust-row strong { font-size: 13px; white-space: nowrap; }
.trust-row small { color: var(--muted); font-size: 11px; white-space: nowrap; }

.cosmic-visual { position: relative; min-height: 580px; display: grid; place-items: center; direction: ltr; }
.chart-halo { position: absolute; width: 540px; height: 540px; border-radius: 50%; background: radial-gradient(circle, rgba(91,75,154,.17), rgba(0,212,255,.04) 36%, transparent 66%); filter: blur(2px); }
.astro-wheel { position: relative; width: min(500px, 43vw); aspect-ratio: 1; border-radius: 50%; filter: drop-shadow(0 30px 50px rgba(0,0,0,.34)); }
.wheel-ring { position: absolute; border-radius: 50%; border: 1px solid var(--line-gold); }
.wheel-ring-outer { inset: 0; box-shadow: inset 0 0 50px rgba(212,175,55,.04), 0 0 0 8px rgba(212,175,55,.018); }
.wheel-ring-middle { inset: 45px; border-color: rgba(199,204,214,.18); }
.wheel-ring-middle::before { position: absolute; content: ""; inset: -45px; border-radius: 50%; background: repeating-conic-gradient(from -15deg, rgba(212,175,55,.42) 0 1px, transparent 1px 30deg); mask: radial-gradient(circle, transparent 0 81%, #000 81.4% 82%, transparent 82.4%); }
.wheel-ring-inner { inset: 116px; border-color: rgba(120,97,255,.38); background: radial-gradient(circle, rgba(91,75,154,.12), transparent 64%); }
.zodiac { position: absolute; z-index: 3; color: var(--gold-bright); font-size: 23px; text-shadow: 0 0 18px rgba(212,175,55,.24); transform: translate(-50%, -50%); }
.z1{left:50%;top:5%}.z2{left:72.5%;top:11%}.z3{left:89%;top:28%}.z4{left:95%;top:50%}.z5{left:89%;top:72%}.z6{left:72.5%;top:89%}.z7{left:50%;top:95%}.z8{left:27.5%;top:89%}.z9{left:11%;top:72%}.z10{left:5%;top:50%}.z11{left:11%;top:28%}.z12{left:27.5%;top:11%}
.aspect-lines { position: absolute; inset: 23%; width: 54%; height: 54%; overflow: visible; }
.aspect-lines path { fill: none; stroke-width: 2; opacity: .68; }
.aspect-gold { stroke: var(--celestial-gold); }
.aspect-violet { stroke: var(--signal-violet); }
.aspect-lines circle { fill: var(--stardust); filter: drop-shadow(0 0 8px var(--stardust)); }
.wheel-core { position: absolute; z-index: 4; inset: 40%; display: grid; place-content: center; border: 1px solid var(--line-gold); border-radius: 50%; background: rgba(6,9,20,.82); text-align: center; box-shadow: 0 0 40px rgba(212,175,55,.12); }
.wheel-core span { color: var(--celestial-gold); font-family: var(--font-display); font-size: 44px; line-height: .9; }
.wheel-core small { color: var(--lunar-silver); font-family: var(--font-display); font-size: 7px; letter-spacing: .32em; }
.floating-card { position: absolute; z-index: 5; display: flex; align-items: center; gap: 10px; min-width: 218px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(13,19,34,.78); backdrop-filter: blur(14px); box-shadow: var(--shadow); direction: rtl; }
.floating-card small, .floating-card strong { display: block; }
.floating-card small { color: var(--muted); font-size: 10px; }
.floating-card strong { font-size: 12px; }
.floating-card .degree { margin-inline-start: auto; color: var(--gold-bright); font-family: var(--font-ui); font-size: 11px; }
.transit-card { top: 13%; right: -1%; }
.moon-card { bottom: 9%; left: 3%; }
.planet-symbol { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; font-size: 18px; }
.sun { color: var(--gold-bright); background: rgba(212,175,55,.09); }
.moon-disc { width: 32px; height: 32px; border-radius: 50%; background: radial-gradient(circle at 65% 40%, #f2f3f6 0 18%, #b9bfca 38%, #687085 72%); box-shadow: inset -7px -3px 9px rgba(0,0,0,.46), 0 0 18px rgba(199,204,214,.18); }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 50px; margin-bottom: 38px; }
.section-heading h2 { margin: 5px 0 0; font-size: clamp(32px, 4vw, 48px); line-height: 1.28; }
.section-heading > p { max-width: 520px; margin: 0; color: var(--muted); }
.section-heading.centered { display: block; text-align: center; }
.section-heading.centered p { margin: 13px auto 0; }
.chart-section { background: linear-gradient(180deg, rgba(16,24,40,.36), rgba(6,9,20,.45)); }
.chart-workspace { display: grid; grid-template-columns: 1.45fr .7fr; gap: 20px; }
.chart-form, .workspace-status { border: 1px solid var(--line); border-radius: 20px; background: var(--surface); backdrop-filter: blur(18px); box-shadow: 0 25px 70px rgba(0,0,0,.2); }
.chart-form { padding: 28px; }
.form-head { display: flex; align-items: center; gap: 13px; padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.form-icon { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--line-gold); border-radius: 12px; color: var(--celestial-gold); background: rgba(212,175,55,.05); }
.form-head h3, .form-head p { margin: 0; }
.form-head h3 { font-size: 19px; }
.form-head p { color: var(--muted); font-size: 12px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 7px; }
.field-wide { grid-column: span 2; }
.field > span { color: var(--lunar-silver); font-size: 12px; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; outline: none; background: rgba(6,9,20,.58); color: var(--stardust); transition: border-color .2s ease, box-shadow .2s ease; }
.field input, .field select { height: 48px; }
.field textarea { min-height: 88px; padding-block: 12px; resize: vertical; }
.field small { color: var(--muted); font-size: 10px; line-height: 1.6; }
.field input::placeholder { color: #666f84; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: rgba(212,175,55,.6); box-shadow: 0 0 0 3px rgba(212,175,55,.08); }
.field input:user-invalid { border-color: rgba(255,127,120,.55); }
.form-note { display: flex; gap: 8px; margin: 18px 0; padding: 10px 12px; border-radius: 9px; color: var(--muted); background: rgba(0,212,255,.035); font-size: 11px; }
.form-note span { color: var(--signal-cyan); }
.form-submit { width: 100%; border: 0; }
.workspace-status { padding: 24px; }
.status-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.status-head h3 { margin: 3px 0 0; }
.refresh-button { color: var(--celestial-gold); }
.refresh-button.is-loading svg { animation: spin .8s linear infinite; }
.status-list { margin: 12px 0 18px; }
.status-list > div { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(199,204,214,.08); color: var(--muted); font-size: 13px; }
.status-list strong { color: var(--stardust); font-family: var(--font-ui); font-size: 11px; }
.status-list strong.is-ok { color: #6ae2a0; }
.status-list strong.is-warn { color: var(--gold-bright); }
.boundary-card { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--line-gold); border-radius: 12px; background: rgba(212,175,55,.035); }
.boundary-card .shield { color: var(--celestial-gold); font-size: 26px; }
.boundary-card strong { font-size: 13px; }
.boundary-card p { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }

.capability-section { overflow: hidden; }
.capability-section::before { position: absolute; content: ""; width: 700px; height: 700px; top: 10%; left: -360px; border-radius: 50%; background: radial-gradient(circle, rgba(91,75,154,.1), transparent 68%); }
.capability-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.capability-card { position: relative; min-height: 260px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(145deg, rgba(16,24,40,.72), rgba(11,16,32,.52)); transition: transform .25s ease, border-color .25s ease, background .25s ease; }
.capability-card:hover { transform: translateY(-5px); border-color: var(--line-gold); background: linear-gradient(145deg, rgba(20,29,48,.86), rgba(11,16,32,.66)); }
.capability-card.featured { border-color: var(--line-gold); background: linear-gradient(145deg, rgba(212,175,55,.07), rgba(16,24,40,.72) 42%); }
.card-icon { display: grid; width: 46px; height: 46px; place-items: center; border: 1px solid var(--line-gold); border-radius: 13px; color: var(--gold-bright); background: rgba(212,175,55,.045); font-size: 24px; }
.card-state { position: absolute; top: 25px; left: 24px; padding: 4px 8px; border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.035); font-family: var(--font-ui); font-size: 8px; letter-spacing: .12em; }
.capability-card h3 { margin: 22px 0 8px; font-size: 21px; }
.capability-card p { margin: 0; color: var(--muted); font-size: 13px; }
.capability-card a { position: absolute; inset: auto 24px 20px auto; color: var(--celestial-gold); font-size: 12px; font-weight: 700; }

.reports-section { padding-top: 42px; }
.reports-panel { position: relative; display: grid; grid-template-columns: 1.05fr .65fr; align-items: center; gap: 70px; padding: 58px; border: 1px solid var(--line-gold); border-radius: 25px; overflow: hidden; background: linear-gradient(120deg, rgba(26,31,77,.35), rgba(16,24,40,.7) 45%, rgba(6,9,20,.88)); box-shadow: var(--shadow); }
.reports-panel::after { position: absolute; content: ""; width: 460px; height: 460px; inset: -220px -90px auto auto; border: 1px solid rgba(212,175,55,.16); border-radius: 50%; box-shadow: 0 0 0 45px rgba(212,175,55,.018), 0 0 0 92px rgba(212,175,55,.012); }
.reports-panel h2 { margin: 9px 0 16px; font-size: clamp(32px, 4vw, 48px); line-height: 1.35; }
.reports-panel p { color: var(--lunar-silver); }
.report-points { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.report-points span { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 11px; }
.report-points span::first-letter { color: var(--celestial-gold); }
.report-preview { position: relative; z-index: 2; padding: 25px; border: 1px solid var(--line); border-radius: 18px; background: rgba(6,9,20,.82); text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.preview-top { display: flex; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.preview-top small { color: var(--celestial-gold); font-family: var(--font-display); letter-spacing: .12em; }
.score-ring { width: 118px; height: 118px; margin: 24px auto 14px; display: grid; place-content: center; border-radius: 50%; background: radial-gradient(circle at center, #0b1020 61%, transparent 62%), conic-gradient(var(--celestial-gold) 87%, rgba(255,255,255,.06) 0); }
.score-ring strong { font-family: var(--font-ui); font-size: 34px; line-height: 1; }
.score-ring span { color: var(--muted); font-family: var(--font-ui); font-size: 10px; }
.report-preview h3 { margin: 0; }
.report-preview p { margin: 6px 0 18px; color: var(--muted); font-size: 11px; }
.preview-bars { display: grid; gap: 7px; }
.preview-bars span { height: 5px; border-radius: 99px; background: linear-gradient(to left, var(--celestial-gold) var(--value), rgba(255,255,255,.06) var(--value)); }

[hidden] { display: none !important; }
.account-section { background: linear-gradient(180deg, rgba(6,9,20,.32), rgba(26,31,77,.2)); }
.account-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .72fr); gap: 20px; align-items: stretch; }
.account-card { padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); backdrop-filter: blur(18px); box-shadow: 0 25px 70px rgba(0,0,0,.2); }
.account-card-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.account-card-head h3 { margin: 4px 0 0; }
.account-facts { display: grid; gap: 10px; margin: 20px 0 14px; }
.account-facts div, .subscription-state { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 11px 0; border-bottom: 1px solid rgba(199,204,214,.09); }
.account-facts dt, .subscription-state span, .account-entitlements > span { color: var(--muted); font-size: 11px; }
.account-facts dd { max-width: 65%; margin: 0; overflow: hidden; color: var(--stardust); font-family: var(--font-ui); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.account-profile-form { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.account-profile-form .button { width: 100%; border: 0; }
.account-subscription-card { position: relative; overflow: hidden; border-color: var(--line-gold); background: linear-gradient(145deg, rgba(212,175,55,.07), rgba(16,24,40,.76) 46%, rgba(6,9,20,.86)); }
.account-subscription-card::after { position: absolute; content: "✦"; inset: -35px auto auto -20px; color: rgba(212,175,55,.08); font-size: 150px; line-height: 1; }
.account-subscription-card > * { position: relative; z-index: 1; }
.account-subscription-card h3 { margin: 8px 0 22px; font-size: 25px; }
.subscription-state strong { color: var(--gold-bright); font-size: 12px; }
.account-entitlements { margin-top: 20px; }
.account-entitlements > div { display: flex; flex-wrap: wrap; gap: 7px; min-height: 30px; margin-top: 10px; }
.account-empty-value { color: var(--muted); font-size: 11px; }
.account-actions { display: grid; gap: 9px; margin-top: 24px; }
.button-muted { min-height: 42px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: rgba(255,255,255,.025); font: inherit; font-size: 11px; }
.account-boundary { margin: 16px 0 0; color: var(--muted); font-size: 10px; line-height: 1.8; }
.commerce-section { background: linear-gradient(180deg, rgba(26,31,77,.2), rgba(6,9,20,.28)); }
.commerce-notice { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; padding: 14px 18px; border: 1px solid var(--line-gold); border-radius: 14px; background: rgba(212,175,55,.04); }
.commerce-notice > span { color: var(--gold-bright); font-size: 28px; }
.commerce-notice p { margin: 0; color: var(--muted); font-size: 12px; }
.commerce-notice strong { color: var(--stardust); }
.commerce-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.commerce-card { display: flex; min-height: 330px; padding: 24px; flex-direction: column; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(145deg, rgba(16,24,40,.8), rgba(6,9,20,.62)); box-shadow: 0 24px 60px rgba(0,0,0,.2); }
.commerce-card:hover { border-color: var(--line-gold); }
.commerce-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.commerce-price { color: var(--gold-bright); font-family: var(--font-ui); direction: ltr; }
.commerce-card h3 { margin: 24px 0 8px; font-size: 22px; }
.commerce-card > p { margin: 0; color: var(--muted); font-size: 13px; }
.commerce-benefits { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 22px; }
.commerce-buy { width: 100%; margin-top: auto; border: 0; }
.orders-card { margin-top: 22px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.order-list { display: grid; gap: 10px; margin-top: 16px; }
.order-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 18px; padding: 14px; border: 1px solid rgba(199,204,214,.1); border-radius: 12px; background: rgba(6,9,20,.42); }
.order-identity { min-width: 0; display: grid; }
.order-identity span { overflow: hidden; color: var(--muted); font-family: var(--font-ui); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: right; }
.order-amount { color: var(--gold-bright); font-family: var(--font-ui); font-size: 11px; direction: ltr; }
.commerce-empty { grid-column: 1 / -1; margin: 24px 0; color: var(--muted); text-align: center; }
.library-section { background: linear-gradient(180deg, rgba(6,9,20,.28), rgba(26,31,77,.18)); }
.library-notice { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; padding: 14px 18px; border: 1px solid var(--line-gold); border-radius: 14px; background: rgba(212,175,55,.04); }
.library-notice > span { color: var(--gold-bright); font-size: 28px; }
.library-notice p { margin: 0; color: var(--muted); font-size: 12px; }
.library-notice strong { color: var(--stardust); }
.library-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.library-card { display: flex; min-height: 270px; padding: 24px; flex-direction: column; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(145deg, rgba(16,24,40,.8), rgba(6,9,20,.62)); }
.library-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.library-card h3 { margin: 22px 0 8px; font-size: 22px; }
.library-card > p { margin: 0; color: var(--muted); font-size: 13px; }
.library-card .button { margin-top: 14px; }
.library-editions { margin-top: auto; padding-top: 20px; color: var(--celestial-gold); font-size: 11px; }
.library-owned-card { margin-top: 28px; padding: 26px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.library-owned-list { display: grid; gap: 14px; margin-top: 18px; }
.library-owned-item { padding: 18px; border: 1px solid rgba(199,204,214,.1); border-radius: 14px; background: rgba(6,9,20,.42); }
.library-owned-identity { display: flex; align-items: center; gap: 12px; }
.library-owned-identity h3 { margin: 0; font-size: 17px; }
.library-edition { display: grid; gap: 9px; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(199,204,214,.09); }
.library-asset-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.library-asset-row > span { color: var(--muted); font-size: 12px; }
.library-download { min-width: 120px; }
.booking-section { background: linear-gradient(180deg, rgba(6,9,20,.28), rgba(26,31,77,.18)); }
.booking-grid { display: grid; grid-template-columns: minmax(300px, .78fr) minmax(0, 1.22fr); gap: 20px; align-items: start; }
.booking-form-card, .booking-list-card { padding: 26px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); backdrop-filter: blur(18px); box-shadow: 0 25px 70px rgba(0,0,0,.2); }
.booking-form-card { border-color: var(--line-gold); background: linear-gradient(145deg, rgba(212,175,55,.05), rgba(16,24,40,.76)); }
.booking-form-card > .field { margin-bottom: 16px; }
.booking-form-card > .button { width: 100%; border: 0; }
.booking-service-summary { display: grid; gap: 4px; margin: -6px 0 16px; padding: 11px 13px; border: 1px solid rgba(199,204,214,.1); border-radius: 10px; background: rgba(6,9,20,.35); }
.booking-service-summary strong { font-size: 13px; }
.booking-service-summary span { color: var(--muted); font-size: 11px; }
.booking-payment-link { display: block; margin-top: 12px; color: var(--celestial-gold); font-size: 11px; text-align: center; }
.booking-list { display: grid; gap: 10px; margin-top: 16px; }
.booking-row, .booking-admin-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 14px; border: 1px solid rgba(199,204,214,.1); border-radius: 12px; background: rgba(6,9,20,.42); }
.booking-identity { min-width: 0; display: grid; gap: 3px; }
.booking-identity strong { font-size: 13px; }
.booking-identity span { overflow: hidden; color: var(--muted); font-family: var(--font-ui); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.booking-empty { margin: 32px 0; color: var(--muted); text-align: center; }
.admin-booking-panel { margin-top: 42px; padding-top: 42px; border-top: 1px solid var(--line); }
.booking-admin-heading { align-items: center; margin-bottom: 24px; }
.booking-admin-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.admin-section { background: linear-gradient(180deg, rgba(26,31,77,.18), rgba(6,9,20,.42)); }
.admin-grid { display: grid; grid-template-columns: minmax(320px, .72fr) minmax(0, 1.28fr); gap: 20px; align-items: start; }
.admin-invite-card, .admin-customers-card { border: 1px solid var(--line); border-radius: 20px; background: var(--surface); backdrop-filter: blur(18px); box-shadow: 0 25px 70px rgba(0,0,0,.2); }
.admin-invite-card { padding: 28px; }
.admin-invite-card > .field { margin-bottom: 16px; }
.admin-name-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.admin-invite-card > .button { width: 100%; border: 0; }
.admin-status { min-height: 26px; margin: 14px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.admin-status[data-tone="success"] { color: #6ae2a0; }
.admin-status[data-tone="error"] { color: #ff938d; }
.admin-customers-card { padding: 24px; }
.admin-orders-card { margin-top: 20px; }
.admin-card-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.admin-card-head h3 { margin: 3px 0 0; }
.customer-list { display: grid; gap: 10px; margin-top: 16px; }
.customer-card { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 16px; padding: 14px; border: 1px solid rgba(199,204,214,.1); border-radius: 12px; background: rgba(6,9,20,.4); }
.customer-identity { min-width: 0; display: grid; }
.customer-identity strong { font-size: 14px; }
.customer-identity span { overflow: hidden; color: var(--muted); font-family: var(--font-ui); font-size: 11px; text-overflow: ellipsis; direction: ltr; text-align: right; }
.customer-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { padding: 4px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 9px; white-space: nowrap; }
.badge-ok { color: #6ae2a0; border-color: rgba(106,226,160,.25); background: rgba(106,226,160,.05); }
.badge-warn { color: var(--gold-bright); border-color: var(--line-gold); background: rgba(212,175,55,.04); }
.badge-muted { color: var(--muted); }
.button-small { min-height: 36px; padding: 0 12px; font-size: 10px; white-space: nowrap; }
.button:disabled, .icon-button:disabled { cursor: wait; opacity: .58; transform: none; }
.admin-empty { margin: 32px 0; color: var(--muted); text-align: center; }

.site-footer { margin-top: 96px; border-top: 1px solid var(--line); background: rgba(6,9,20,.68); }
.footer-grid { min-height: 130px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 40px; }
.footer-brand { direction: ltr; display: flex; flex-direction: column; }
.footer-brand strong { font-family: var(--font-display); font-size: 23px; letter-spacing: .18em; }
.footer-brand strong span { color: var(--celestial-gold); }
.footer-brand small { color: var(--celestial-gold); font-family: var(--font-ui); font-size: 7px; letter-spacing: .32em; }
.footer-grid p { color: var(--muted); font-size: 12px; }
.footer-meta { display: flex; gap: 8px; color: var(--celestial-gold); font-family: var(--font-ui); font-size: 8px; letter-spacing: .14em; }
.footer-meta i { font-style: normal; color: var(--muted); }
.auth-button { min-height: 38px; padding: 0 14px; gap: 8px; border-radius: 10px; font-size: 12px; white-space: nowrap; }
.auth-button:disabled { cursor: wait; opacity: .65; transform: none; }
.auth-indicator { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.auth-button[data-authenticated="true"] { border-color: rgba(85,217,139,.42); }
.auth-button[data-authenticated="true"] .auth-indicator { background: #55d98b; box-shadow: 0 0 12px rgba(85,217,139,.55); }

.toast { position: fixed; z-index: 90; inset: auto 50% 28px auto; min-width: min(420px, calc(100% - 32px)); padding: 13px 16px; border: 1px solid var(--line-gold); border-radius: 11px; background: rgba(11,16,32,.94); color: var(--stardust); text-align: center; box-shadow: var(--shadow); backdrop-filter: blur(15px); transform: translate(50%, 160%); opacity: 0; transition: transform .25s ease, opacity .25s ease; }
.toast.is-visible { transform: translate(50%, 0); opacity: 1; }

@keyframes pulse { 50% { opacity: .35; transform: scale(.85); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1040px) {
  .desktop-nav { gap: 20px; }
  .hero-grid { grid-template-columns: 1fr 1fr; gap: 22px; }
  .astro-wheel { width: 46vw; }
  .trust-row { gap: 14px; }
  .trust-row small { white-space: normal; }
  .capability-grid, .commerce-grid, .library-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  :root { --container: min(100% - 30px, 700px); }
  .section { padding: 72px 0; }
  .desktop-nav, .system-pill { display: none; }
  .menu-button { display: grid; }
  .mobile-nav { position: absolute; inset: 84px 15px auto; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: rgba(6,9,20,.96); box-shadow: var(--shadow); }
  .mobile-nav.is-open { display: grid; }
  .mobile-nav a { padding: 10px 14px; border-radius: 8px; color: var(--lunar-silver); }
  .mobile-nav a:hover { background: rgba(212,175,55,.05); color: var(--stardust); }
  .hero { min-height: auto; padding-top: 130px; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-lead { margin-inline: auto; }
  .hero-actions, .trust-row { justify-content: center; }
  .trust-row { text-align: right; }
  .cosmic-visual { min-height: 520px; margin-top: 30px; }
  .astro-wheel { width: min(500px, 84vw); }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 12px; }
  .chart-workspace, .reports-panel, .admin-grid, .account-grid, .booking-grid { grid-template-columns: 1fr; }
  .reports-panel { gap: 38px; padding: 38px; }
  .footer-grid { grid-template-columns: 1fr; gap: 12px; padding: 32px 0; text-align: center; }
  .footer-brand, .footer-meta { align-items: center; justify-content: center; }
  .footer-grid p { margin: 0; }
}

@media (max-width: 560px) {
  .header-inner { height: 72px; }
  .brand-mark { transform: scale(.88); transform-origin: left center; }
  .brand-copy { margin-left: -5px; }
  .mobile-nav { top: 72px; }
  .hero { padding-top: 112px; }
  .hero h1 { font-size: 39px; }
  .hero-lead { font-size: 16px; }
  .hero-actions { flex-direction: column; }
  .trust-row { display: grid; grid-template-columns: 1fr; padding-inline: 22px; }
  .cosmic-visual { min-height: 440px; }
  .chart-halo { width: 380px; height: 380px; }
  .astro-wheel { width: min(360px, 92vw); }
  .wheel-ring-middle { inset: 34px; }
  .wheel-ring-inner { inset: 88px; }
  .zodiac { font-size: 18px; }
  .floating-card { min-width: 178px; padding: 9px 11px; }
  .transit-card { top: 5%; right: -2%; }
  .moon-card { bottom: 2%; left: -2%; }
  .field-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .chart-form, .workspace-status { padding: 20px; }
  .admin-invite-card, .admin-customers-card, .account-card, .booking-form-card, .booking-list-card { padding: 20px; }
  .admin-name-grid, .customer-card, .commerce-grid, .library-grid, .order-row, .booking-row, .booking-admin-row { grid-template-columns: 1fr; }
  .library-asset-row { align-items: stretch; flex-direction: column; }
  .booking-admin-actions { justify-content: stretch; }
  .booking-admin-actions .button { width: 100%; }
  .customer-badges { justify-content: flex-start; }
  .customer-actions .button { width: 100%; }
  .capability-grid { grid-template-columns: 1fr; }
  .capability-card { min-height: 240px; }
  .reports-panel { padding: 27px 22px; }
  .reports-panel h2 { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* P2.9C protected customer report preview */
.report-preview-dialog {
  width: min(1180px, calc(100vw - 32px));
  height: min(900px, calc(100vh - 32px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-gold);
  border-radius: 18px;
  color: var(--stardust);
  background: var(--surface-solid);
  box-shadow: 0 35px 100px rgba(0, 0, 0, .72);
}
.report-preview-dialog::backdrop { background: rgba(3, 6, 14, .82); backdrop-filter: blur(8px); }
.report-preview-toolbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: #0b1020;
}
.report-preview-toolbar h3 { margin: 0; font-size: 18px; }
.report-preview-actions { display: flex; align-items: center; gap: 9px; }
.report-preview-actions .button { min-height: 42px; padding-inline: 17px; }
.report-preview-frame { display: block; width: 100%; height: calc(100% - 72px); border: 0; background: #fff; }
@media (max-width: 640px) {
  .report-preview-dialog { width: 100vw; height: 100dvh; max-width: none; max-height: none; border: 0; border-radius: 0; }
  .report-preview-toolbar { min-height: 118px; align-items: flex-start; flex-direction: column; gap: 8px; padding: 12px; }
  .report-preview-actions { width: 100%; }
  .report-preview-actions .button { min-width: 0; flex: 1; }
  .report-preview-frame { height: calc(100% - 118px); }
}
