/* ── Reset ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Design tokens ─────────────────────────────────────────────────── */
:root {
    /* Color — dark (default) */
    --bg:       #0d0f1a;
    --surface:  #141726;
    --surface2: #1c2035;
    --border:   #2a2f4a;
    --text:     #e8eaf6;
    --muted:    #7b7fa8;
    --accent:   #e5a32d;
    --accent2:  #7c6af7;
    --success:  #4caf78;
    --danger:   #d64d72;
    --warning:  #e65100;
    --radius:   8px;

    /* Typography */
    --font-display: 'Cinzel', 'Palatino Linotype', Palatino, Georgia, serif;
    --font-serif:   'Cormorant Garamond', 'Palatino Linotype', Palatino, Georgia, serif;
    --font-body:    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-devanagari: 'Noto Sans Devanagari', sans-serif;

    /* Spacing scale */
    --sp-1: 4px;  --sp-2: 8px;   --sp-3: 12px; --sp-4: 16px;
    --sp-5: 20px; --sp-6: 24px;  --sp-8: 32px; --sp-10: 40px;
    --sp-12: 48px; --sp-16: 64px;

    /* Z-index */
    --z-sticky: 100; --z-overlay: 200; --z-drawer: 300; --z-toast: 400;

    /* Transitions */
    --t-fast: 120ms ease; --t-base: 200ms ease; --t-slow: 300ms ease;

    /* Shadows */
    --shadow-sm: 0 1px 4px rgba(0,0,0,.35);
    --shadow-md: 0 4px 16px rgba(0,0,0,.45);
    --shadow-lg: 0 8px 40px rgba(0,0,0,.55);
    --shadow-header: 0 2px 20px rgba(0,0,0,.45);

    /* Header & bottom nav heights */
    --header-h: 56px;
    --bottom-nav-h: 62px;

    /* Backward-compat aliases — older component files that used wrong token names */
    --color-border:   var(--border);
    --color-muted:    var(--muted);
    --color-surface:  var(--surface);
    --color-text:     var(--text);
    --color-accent:   var(--accent);
    --color-success:  var(--success);
    --color-danger:   var(--danger);
    --color-warning:  var(--warning);
    --text-muted:     var(--muted);
    --surface-2:      var(--surface2);
}

/* Light mode overrides */
@media (prefers-color-scheme: light) {
    :root {
        --bg:       #f5f5fa;
        --surface:  #ffffff;
        --surface2: #eeeef6;
        --border:   #d8d8e8;
        --text:     #1a1a2e;
        --muted:    #5a5a7a;
        --accent:   #b8720a;
        --accent2:  #5c50d6;
        --shadow-sm: 0 1px 4px rgba(0,0,0,.1);
        --shadow-md: 0 4px 16px rgba(0,0,0,.12);
        --shadow-lg: 0 8px 40px rgba(0,0,0,.15);
        --shadow-header: 0 2px 20px rgba(0,0,0,.1);
    }
}

:root[data-theme="dark"]  {
    --bg:#0d0f1a; --surface:#141726; --surface2:#1c2035; --border:#2a2f4a;
    --text:#e8eaf6; --muted:#7b7fa8; --accent:#e5a32d; --accent2:#7c6af7;
    --shadow-sm: 0 1px 4px rgba(0,0,0,.35);
    --shadow-md: 0 4px 16px rgba(0,0,0,.45);
    --shadow-lg: 0 8px 40px rgba(0,0,0,.55);
    --shadow-header: 0 2px 20px rgba(0,0,0,.45);
}
:root[data-theme="light"] {
    --bg:#f5f5fa; --surface:#ffffff; --surface2:#eeeef6; --border:#d8d8e8;
    --text:#1a1a2e; --muted:#5a5a7a; --accent:#b8720a; --accent2:#5c50d6;
    --shadow-sm: 0 1px 4px rgba(0,0,0,.1);
    --shadow-md: 0 4px 16px rgba(0,0,0,.12);
    --shadow-lg: 0 8px 40px rgba(0,0,0,.15);
    --shadow-header: 0 2px 20px rgba(0,0,0,.1);
}

/* ── Base ──────────────────────────────────────────────────────────── */
html, body {
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#app { height: 100%; }
button { cursor: pointer; font-family: inherit; }
a { color: inherit; }

/* Body scroll lock (when mobile drawer is open) */
body.body--noscroll { overflow: hidden; }

/* Bottom nav breathing room on mobile */
@media (max-width: 767px) {
    body { padding-bottom: var(--bottom-nav-h); }
}

/* ── Scrollbar ─────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ── Focus ring ────────────────────────────────────────────────────── */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ── Loading screen ────────────────────────────────────────────────── */
.app-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    gap: 10px;
    background: var(--bg);
}
.app-loading-logo {
    width: 200px;
    height: auto;
    object-fit: contain;
    user-select: none;
    pointer-events: none;
}
.app-loading-name {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-top: 4px;
}

/* ── Skeleton loading ──────────────────────────────────────────────── */
@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}
.skeleton {
    background: linear-gradient(90deg,
        var(--surface2) 25%,
        var(--border)   50%,
        var(--surface2) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: var(--radius);
}
.skeleton-text  { height: 14px; border-radius: 4px; }
.skeleton-title { height: 20px; border-radius: 4px; }
.skeleton-card  { height: 120px; }

/* ── Spinner ───────────────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
    width: 28px; height: 28px;
    border: 2.5px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .7s linear infinite;
    flex-shrink: 0;
}
.spinner--sm { width: 18px; height: 18px; border-width: 2px; }
.spinner--center { margin: 48px auto; display: block; }

/* ── Forms ─────────────────────────────────────────────────────────── */
input, select, textarea {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    padding: 10px 13px;
    font-size: 14px;
    font-family: inherit;
    width: 100%;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
    -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(229,163,45,.15);
}
input::placeholder, textarea::placeholder { color: var(--muted); }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237b7fa8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
select option { background: var(--surface2); }
label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--muted);
    display: block;
    margin-bottom: 6px;
}
textarea { resize: vertical; min-height: 80px; line-height: 1.5; }

/* ── Buttons ───────────────────────────────────────────────────────── */
.btn-primary {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    width: 100%;
    transition: opacity var(--t-fast), transform var(--t-fast);
    letter-spacing: .02em;
}
.btn-primary:hover  { opacity: .88; }
.btn-primary:active { opacity: .8; transform: scale(.99); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }

.btn-ghost {
    background: none;
    border: 1px solid var(--border);
    color: var(--muted);
    border-radius: var(--radius);
    padding: 7px 13px;
    font-size: 14px;
    transition: border-color var(--t-fast), color var(--t-fast);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-pill {
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 14px;
    transition: border-color var(--t-fast), color var(--t-fast);
}
.btn-pill:hover { border-color: var(--accent); color: var(--accent); }

.btn-icon {
    background: none;
    border: none;
    color: var(--muted);
    padding: 6px;
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color var(--t-fast), background var(--t-fast);
}
.btn-icon:hover { color: var(--text); background: var(--surface2); }

/* ── Cards ─────────────────────────────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}
.card--elevated { box-shadow: var(--shadow-sm); }
.card-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 12px;
}

/* ── Alerts ────────────────────────────────────────────────────────── */
.alert-danger  { background: rgba(214,77,114,.08);  border: 1px solid rgba(214,77,114,.35); border-radius: var(--radius); padding: 12px 14px; font-size: 13px; color: #f48fb1; }
.alert-success { background: rgba(76,175,120,.07);  border: 1px solid rgba(76,175,120,.35); border-radius: var(--radius); padding: 8px 12px;  font-size: 13px; color: var(--success); }
.alert-info    { background: var(--surface2);        border: 1px solid var(--border);        border-radius: var(--radius); padding: 8px 12px;  font-size: 13px; color: var(--muted); }
.alert-warn    { background: rgba(230,81,0,.07);    border: 1px solid rgba(230,81,0,.3);   border-radius: var(--radius); padding: 8px 12px;  font-size: 13px; color: #ff8a65; }

/* ── Info rows ─────────────────────────────────────────────────────── */
.info-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--muted); flex-shrink: 0; }
.info-val { font-weight: 600; max-width: 60%; text-align: right; }
.info-val-italic { font-style: italic; }

/* ── Tables ────────────────────────────────────────────────────────── */
.data-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--surface); }
.data-table thead tr { background: var(--surface2); }
.data-table th { text-align: left; font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 7px 10px; border-bottom: 1px solid var(--border); }
.data-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: rgba(229,163,45,.06); }
.data-table tr.is-current td { background: rgba(229,163,45,.11); color: var(--accent); font-weight: 600; border-left: none; }
.data-table tr.is-current td:first-child { border-left: 3px solid var(--accent); }

/* ── Input page shared layout ──────────────────────────────────────── */
.ci-wrap      { min-height: 100vh; display: flex; flex-direction: column; }
.ci-container { max-width: 560px; margin: 0 auto; padding: var(--sp-10) var(--sp-6) var(--sp-12); width: 100%; }
.ci-title     { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--accent); margin-bottom: 8px; letter-spacing: .03em; line-height: 1.15; }
.ci-sub       { color: var(--muted); font-size: 14px; margin-bottom: 28px; line-height: 1.6; }
.ci-form      { display: flex; flex-direction: column; gap: 16px; }
.ci-row       { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ci-field     { display: flex; flex-direction: column; }
.ci-searching { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--accent2); }
.ci-note-warn { font-size: 13px; color: var(--warning); line-height: 1.5; margin-top: 5px; }
.ci-examples        { margin-top: 36px; padding-bottom: 8px; }
.ci-examples-label  { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 10px; }
.ci-example-btns    { display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 479px) {
    .ci-container { padding: var(--sp-6) var(--sp-4) var(--sp-10); }
    .ci-title     { font-size: 22px; }
    .ci-row       { grid-template-columns: 1fr; }
}

/* ── Panel / tab shared styles ─────────────────────────────────────── */
.panel-header  { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-title   { font-family: var(--font-serif); font-size: 19px; font-weight: 600; line-height: 1.2; }
.panel-count   { background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; padding: 2px 8px; font-size: 13px; font-weight: 700; }
.panel-empty   { text-align: center; padding: 56px 24px; color: var(--muted); }
.panel-empty-icon { font-size: 32px; margin-bottom: 10px; }
.group-label   { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; padding-bottom: 5px; border-bottom: 1px solid var(--border); }
.card-text     { font-size: .92rem; line-height: 1.75; color: var(--muted); }

/* ── Yoga / Dosha cards ────────────────────────────────────────────── */
.yoga-group   { margin-bottom: 20px; }
.yoga-card    { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; }
.yoga-name    { font-weight: 700; font-size: .95rem; margin-bottom: 8px; }
.dosha-card   { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--danger); border-radius: 10px; padding: 16px 18px; margin-bottom: 12px; transition: box-shadow .18s ease; }
.dosha-card:hover { box-shadow: var(--shadow-md); }
.dosha-name   { font-weight: 700; font-size: 1.05rem; color: var(--danger); margin-bottom: 10px; letter-spacing: -.01em; }
.dosha-cancel { font-size: .88rem; color: var(--success); margin-top: 8px; padding: 4px 10px; background: rgba(76,175,120,.1); border-radius: 6px; display: inline-block; }

/* ── Period / Dasha cards ──────────────────────────────────────────── */
.period-card   { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; }
.period-indent { margin-left: 20px; border-left-color: var(--accent2) !important; }
.period-top    { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.period-level  { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.period-lord   { font-weight: 700; font-size: 15px; }
.period-dates  { font-size: 13px; color: var(--muted); margin-left: auto; }
.period-sandhi { font-size: 10px; background: rgba(214,77,114,.15); color: var(--danger); border-radius: 4px; padding: 2px 6px; }
.upcoming-card { background: var(--surface2); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 8px; }
.upcoming-lord { font-weight: 700; font-size: 13px; }
.upcoming-dates { font-size: 13px; color: var(--muted); margin-left: 8px; }
.upcoming-preview { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.6; }

/* ── Transit cards ─────────────────────────────────────────────────── */
.transit-highlights { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.transit-pos   { font-size: 14px; color: var(--success); padding: 4px 10px; background: rgba(76,175,120,.06); border-radius: 4px; }
.transit-card  { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 8px; }
.transit-top   { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.transit-graha { font-weight: 700; font-size: 13px; min-width: 72px; }
.transit-rasi  { font-size: 14px; color: var(--accent2); min-width: 90px; }
.transit-house { font-size: 14px; font-weight: 600; min-width: 30px; }
.transit-quality { font-size: 13px; font-weight: 700; border-radius: 4px; padding: 2px 7px; }
.transit-quality-auspicious  { background: rgba(76,175,120,.12);  color: var(--success); }
.transit-quality-challenging { background: rgba(214,77,114,.12);  color: var(--danger); }
.transit-quality-mixed       { background: rgba(123,127,168,.12); color: var(--muted); }

/* ── Houses ────────────────────────────────────────────────────────── */
.houses-wrap  { display: flex; gap: 28px; align-items: flex-start; flex-wrap: wrap; }
.house-detail { flex: 1; min-width: 240px; }
.house-title  { font-family: var(--font-serif); font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.house-theme  { font-size: 14px; color: var(--muted); font-style: italic; margin-bottom: 14px; }

/* ── Paywall card ──────────────────────────────────────────────────── */
.paywall-blur { filter: blur(4px); pointer-events: none; user-select: none; }

/* ── Blazor error UI ───────────────────────────────────────────────── */
#blazor-error-ui {
    background: var(--danger);
    color: #fff;
    display: none;
    position: fixed;
    bottom: calc(var(--bottom-nav-h) + 8px);
    left: 16px;
    right: 16px;
    padding: 12px 16px;
    font-size: 13px;
    z-index: var(--z-toast);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}
@media (min-width: 768px) {
    #blazor-error-ui { bottom: 16px; left: auto; right: 16px; width: 380px; }
}
#blazor-error-ui .reload  { color: #fff; text-decoration: underline; margin-left: 8px; }
#blazor-error-ui .dismiss { float: right; cursor: pointer; }

/* ── Auth pages (Login / Register / ForgotPassword / ResetPassword / Verify) ── */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: var(--bg);
}
.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 44px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-md);
    transition: border-color .2s;
}
.login-card:focus-within { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }

.login-brand-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--accent);
    margin-bottom: 6px;
    transition: opacity 150ms ease;
}
.login-brand-logo:hover { opacity: .8; }

.login-brand-mark {
    width: 68px;
    height: 68px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 2px 10px rgba(184,114,10,.22));
}
.login-brand-name {
    font-family: var(--font-display, 'Cinzel', Georgia, serif);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1;
}

.login-sub {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
    margin-bottom: 32px;
    text-align: center;
    line-height: 1.55;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.login-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.login-field label { margin-bottom: 0; }

.login-pwd-wrap { position: relative; }
.login-pwd-wrap input { padding-right: 40px; width: 100%; box-sizing: border-box; }
.login-pwd-eye {
    position: absolute;
    right: 10px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none; cursor: pointer;
    font-size: 14px; padding: 2px 4px;
    color: var(--muted); line-height: 1;
}
.login-pwd-eye:hover { color: var(--text); }

.login-submit {
    width: 100%;
    padding: 13px 20px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .03em;
    margin-top: 4px;
}

.login-hint {
    margin-top: 18px;
    font-size: 14px;
    color: var(--muted);
    text-align: center;
    line-height: 1.6;
}
.login-hint + .login-hint { margin-top: 8px; }
.login-hint a { color: var(--accent2); text-decoration: none; }
.login-hint a:hover { text-decoration: underline; }

/* alert/info boxes sometimes used in auth pages */
.login-alert {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    border: 1px solid;
}
.login-alert.success { background: color-mix(in srgb, var(--success) 10%, transparent); border-color: color-mix(in srgb, var(--success) 35%, transparent); color: var(--success); }
.login-alert.danger  { background: color-mix(in srgb, var(--danger)  10%, transparent); border-color: color-mix(in srgb, var(--danger)  35%, transparent); color: var(--danger); }

/* legacy hidden selectors kept for backward compat */
.login-logo  { display: none; }
.login-title { display: none; }

@media (max-width: 480px) {
    .login-card { padding: 32px 24px; border-radius: 14px; }
}

/* ── Auth mobile enhancements (≤767px) ────────────────────────────────── */
@media (max-width: 767px) {
    /* Wrap: remove excess vertical centering on very small viewports */
    .login-wrap  { align-items: flex-start; padding-top: 40px; }

    /* Card: full-width with comfortable padding */
    .login-card  { padding: 36px 22px; border-radius: 16px; }

    /* Brand mark: slightly smaller */
    .login-brand-mark { width: 56px; height: 56px; }
    .login-brand-name { font-size: 19px; }

    /* Submit button: taller tap target */
    .login-submit { padding: 14px 20px; font-size: 15px; min-height: 50px; }

    /* Hints: tighter margin */
    .login-hint  { font-size: 13px; margin-top: 14px; }

    /* Form fields: larger inputs for touch */
    .login-form  { gap: 16px; }
}

/* ── Shared panel utilities (used across ChartResult panels) ───────────── */
/* These give a consistent baseline; individual panels may refine via their own <style> block */
.error-msg    { color: var(--danger); font-size: .85rem; margin: .5rem 0; }
.loading-msg  { color: var(--muted); font-size: .85rem; margin: .5rem 0; }
.section-sub  { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 1.5rem 0 .75rem; }
.disclaimer   { font-size: .76rem; color: var(--muted); border-top: 1px solid var(--border); padding-top: .6rem; margin-top: 1rem; line-height: 1.6; }
.tip-list     { list-style: none; padding: 0; margin: .25rem 0; display: flex; flex-direction: column; gap: .35rem; }
.tip-list li  { font-size: .83rem; line-height: 1.5; padding: .45rem .75rem .45rem 1rem; border-radius: 7px; background: var(--surface); border: 1px solid var(--border); position: relative; }
.tip-list li::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; border-radius: 7px 0 0 7px; background: var(--accent); }
/* ── Generic panel shell — used by many ChartResult panels ──────────────── */
.panel-section  { padding: 1.25rem; }

/* Panel title: left accent bar + bold heading */
.panel-heading {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 .3rem;
    line-height: 1.3;
    padding-left: .85rem;
    position: relative;
}
.panel-heading::before {
    content: '';
    position: absolute;
    left: 0; top: .15em; bottom: .15em;
    width: 3px;
    background: var(--accent);
    border-radius: 2px;
}

/* Panel subtitle — aligned with the heading text */
.panel-sub {
    font-size: .82rem;
    color: var(--muted);
    margin: 0 0 1.5rem .85rem;
    line-height: 1.55;
}

/* ── Shared section-label — tiny uppercase divider inside a panel ───────── */
.section-label {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--muted);
    margin: 1.25rem 0 .65rem;
}

/* ── Generic panel card ─────────────────────────────────────────────────── */
.panel-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .85rem 1rem;
    transition: border-color .15s, box-shadow .15s;
}
.panel-card:hover {
    border-color: color-mix(in srgb, var(--accent) 30%, transparent);
    box-shadow: var(--shadow-sm);
}

/* ── Status badge atoms ─────────────────────────────────────────────────── */
.badge-good, .badge-bad, .badge-warn, .badge-neutral {
    display: inline-flex; align-items: center;
    font-size: .78rem; font-weight: 600;
    padding: 2px 9px; border-radius: 20px; border: 1px solid;
}
.badge-good    { background: color-mix(in srgb, var(--success) 12%, transparent); color: var(--success); border-color: color-mix(in srgb, var(--success) 30%, transparent); }
.badge-bad     { background: color-mix(in srgb, var(--danger)  12%, transparent); color: var(--danger);  border-color: color-mix(in srgb, var(--danger)  30%, transparent); }
.badge-warn    { background: color-mix(in srgb, var(--warning) 12%, transparent); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 30%, transparent); }
.badge-neutral { background: var(--surface2); color: var(--muted); border-color: var(--border); }

/* ── Generic data table ─────────────────────────────────────────────────── */
.panel-table {
    width: 100%; border-collapse: collapse;
    font-size: .85rem; background: var(--surface);
}
.panel-table thead tr { background: var(--surface2); }
.panel-table th {
    text-align: left; padding: 6px 10px;
    font-size: .7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em; color: var(--muted);
    border-bottom: 1px solid var(--border); white-space: nowrap;
}
.panel-table td { padding: 7px 10px; border-bottom: 1px solid var(--border); }
.panel-table tbody tr:last-child td { border-bottom: none; }
.panel-table tbody tr:hover td { background: color-mix(in srgb, var(--accent) 4%, transparent); }

/* ── Panel divider ──────────────────────────────────────────────────────── */
.panel-divider { border: none; border-top: 1px solid var(--border); margin: 1.25rem 0; }

/* ── Chart house / planet CSS classes (NorthIndian, KundaliChart, SouthIndian) ── */
/* House background tiers */
.ni-bg-trikona  { background: color-mix(in srgb, var(--success) 10%, transparent) !important; }
.ni-bg-kendra   { background: color-mix(in srgb, var(--accent)  10%, transparent) !important; }
.ni-bg-dusthana { background: color-mix(in srgb, var(--danger)   8%, transparent) !important; }
.ni-bg-other    { background: color-mix(in srgb, var(--warning)  7%, transparent) !important; }
/* Planet color classes */
.ni-pk-yk       { color: var(--success) !important; }
.ni-pk-yk-dst   { color: color-mix(in srgb, var(--success) 60%, var(--warning)) !important; }
.ni-pk-ben      { color: var(--success) !important; }
.ni-pk-ben-dst  { color: var(--warning) !important; }
.ni-pk-mal      { color: #fb923c !important; }
.ni-pk-mal-dst  { color: var(--danger) !important; }
.ni-pk-default  { color: var(--accent) !important; }
