/* ═══════════════════════════════════════════════════════════════
   D-Dey PMS — Glance Dashboard
   Design: Apple Clinical · DM Serif · IBM Plex Mono · DM Sans
   ═══════════════════════════════════════════════════════════════ */

#home-page {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--dash-bg, #f5f5f7);
    padding-bottom: 110px;
}
body.dark-mode #home-page { --dash-bg: #0a0a0f; }

.dash-wrap {
    max-width: 100%;
    margin: 0;
    padding: 18px 14px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
@media (min-width: 1024px) {
    .dash-wrap {
        max-width: 100%;
        margin: 0;
        padding: 0 4px 0;
    }
}

/* ── Greeting ─────────────────────────────────────────────────── */
.dash-greeting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 2px 2px;
}
.dash-hello {
    font-family: 'DM Serif Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main, #1a1a2e);
    margin: 0 0 3px;
    line-height: 1.2;
}
.dash-sub {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem;
    color: var(--text-sub, #6b7280);
    margin: 0;
}
.dash-date-chip {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6rem;
    background: var(--input-bg, #ebebf0);
    border: 1px solid var(--border, #e0e0e5);
    border-radius: 99px;
    padding: 5px 12px;
    color: var(--text-sub, #6b7280);
    white-space: nowrap;
    flex-shrink: 0;
}
body.dark-mode .dash-hello { color: #e2e8f0; }
body.dark-mode .dash-date-chip { background: #1e1e2e; border-color: #2a2a3e; color: #64748b; }

/* ── Cards ────────────────────────────────────────────────────── */
.dash-card {
    background: var(--dash-card, #fff);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02), 0 4px 16px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.04);
    position: relative;
    overflow: hidden;
    transition: transform 0.32s cubic-bezier(0.22,1,0.36,1), box-shadow 0.32s cubic-bezier(0.22,1,0.36,1);
    will-change: transform;
    backface-visibility: hidden;
}
.dash-card:hover { transform: translateY(-3px); box-shadow: 0 8px 32px rgba(0,0,0,0.08); }
.dash-card:active { transform: scale(0.985); }
body.dark-mode .dash-card {
    background: #0f1117;
    border-color: rgba(255,255,255,0.05);
    box-shadow: 0 2px 16px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.03);
    --dash-card: #0f1117;
}

/* ── Section title ────────────────────────────────────────────── */
.dash-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.dash-section-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-sub, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.7;
}
body.dark-mode .dash-section-title { color: #4a5568; opacity: 0.8; }

/* ── Hero metrics grid ────────────────────────────────────────── */
.dash-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Revenue card — dark, full-width */
.dm-revenue-card {
    grid-column: 1 / -1;
    background: linear-gradient(140deg, #0c1628 0%, #0f2040 45%, #0a3535 100%);
    border-radius: 18px;
    padding: 20px 22px 18px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(13,148,136,0.2);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2), 0 8px 36px rgba(13,148,136,0.08);
    transition: transform 0.32s cubic-bezier(0.22,1,0.36,1), box-shadow 0.32s cubic-bezier(0.22,1,0.36,1);
}
.dm-revenue-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.25), 0 12px 48px rgba(13,148,136,0.12);
}
.dm-revenue-card::after {
    content: '';
    position: absolute;
    top: -50px; right: -50px;
    width: 220px; height: 220px;
    background: radial-gradient(circle, rgba(13,148,136,0.15) 0%, transparent 60%);
    pointer-events: none;
    animation: revenueGlow 4s ease-in-out infinite;
}
@keyframes revenueGlow {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}
.dm-rev-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.62rem;
    font-weight: 600;
    color: rgba(148,163,184,0.75);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 7px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.dm-rev-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 2rem;
    font-weight: 600;
    color: #e2f8f5;
    line-height: 1;
    letter-spacing: -0.02em;
}
@media (min-width: 768px) {
    .dm-rev-value { font-size: 2.4rem; }
}
.dm-rev-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}
.dm-rev-badge {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.62rem;
    background: rgba(20,184,166,0.15);
    color: #2dd4bf;
    border: 1px solid rgba(20,184,166,0.22);
    border-radius: 99px;
    padding: 3px 10px;
}
.dm-rev-sub {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.65rem;
    color: rgba(148,163,184,0.55);
}

/* Mini metric cards */
.dm-mini {
    background: var(--dash-card, #fff);
    border-radius: 16px;
    padding: 15px 14px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 4px 16px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    overflow: hidden;
    transition: transform 0.28s cubic-bezier(0.22,1,0.36,1), box-shadow 0.28s cubic-bezier(0.22,1,0.36,1);
    will-change: transform;
    backface-visibility: hidden;
}
.dm-mini:hover { transform: translateY(-3px) scale(1.01); box-shadow: 0 6px 24px rgba(0,0,0,0.08); }
.dm-mini:active { transform: scale(0.97); }
body.dark-mode .dm-mini { background: #0f1117; border-color: rgba(255,255,255,0.05); box-shadow: 0 2px 16px rgba(0,0,0,0.4); }
.dm-mini-icon { font-size: 1.2rem; margin-bottom: 2px; display: block; }
.dm-mini-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-main, #1a1a2e);
    line-height: 1;
    letter-spacing: -0.01em;
}
body.dark-mode .dm-mini-value { color: #e2e8f0; }
.dm-mini-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.58rem;
    font-weight: 700;
    color: var(--text-sub, #9ca3af);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.75;
}
.dm-mini-stripe {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2.5px;
}

/* Bill limit bar */
.dm-limit-wrap {
    background: rgba(0,0,0,0.06);
    border-radius: 99px;
    height: 3px;
    overflow: hidden;
    margin-top: 5px;
}
body.dark-mode .dm-limit-wrap { background: #1e1e2e; }
.dm-limit-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 1s cubic-bezier(0.34,1.56,0.64,1);
    background: linear-gradient(90deg, #0d9488, #14b8a6);
}
.dm-limit-fill.warn  { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.dm-limit-fill.full  { background: linear-gradient(90deg, #ef4444, #f87171); }
.dm-limit-cap {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.57rem;
    color: #9ca3af;
    margin-top: 3px;
}

/* ── Bar Chart ────────────────────────────────────────────────── */
.dash-chart-tabs {
    display: flex;
    gap: 4px;
}
.dash-chip {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6rem;
    padding: 4px 11px;
    border-radius: 99px;
    border: 1px solid var(--border, #e5e7eb);
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.15s;
    font-weight: 500;
}
.dash-chip.active {
    background: #0d9488;
    border-color: #0d9488;
    color: #fff;
}
body.dark-mode .dash-chip { border-color: #2a2a3e; }

.dash-bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    height: 90px;
    margin: 12px 0 6px;
}
.dash-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    height: 100%;
    justify-content: flex-end;
}
.dash-bar {
    width: 100%;
    max-width: 34px;
    border-radius: 6px 6px 0 0;
    background: linear-gradient(180deg, #14b8a6 0%, #0d9488 100%);
    transform-origin: bottom center;
    transform: scaleY(0);
    opacity: 0;
    animation: barGrow 0.6s cubic-bezier(0.22,1,0.36,1) forwards;
    animation-delay: var(--bd, 0ms);
    min-height: 3px;
    transition: height 0.4s cubic-bezier(0.22,1,0.36,1);
}
.dash-bar.today {
    background: linear-gradient(180deg, #5eead4 0%, #0d9488 100%);
    box-shadow: 0 -3px 12px rgba(13,148,136,0.45);
}
@keyframes barGrow { to { transform: scaleY(1); opacity: 1; } }
.dash-bar-lbl {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.55rem;
    color: #9ca3af;
    text-align: center;
}
.dash-bar-lbl.today { color: #0d9488; font-weight: 700; }
.dash-chart-summary {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.67rem;
    color: #9ca3af;
    text-align: right;
    margin-top: 2px;
}
.dash-chart-summary b {
    font-family: 'IBM Plex Mono', monospace;
    color: var(--text-main, #1a1a2e);
    font-weight: 600;
}
body.dark-mode .dash-chart-summary b { color: #e2e8f0; }

/* ── Two-col ──────────────────────────────────────────────────── */
.dash-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Top medicines */
.dash-top-row {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}
.dash-top-row:last-child { border-bottom: none; }
body.dark-mode .dash-top-row { border-color: #1a1a2a; }
.dash-top-rank { font-family: 'IBM Plex Mono', monospace; font-size: 0.62rem; font-weight: 700; color: #0d9488; width: 14px; flex-shrink: 0; }
.dash-top-name { flex: 1; font-family: 'DM Sans', sans-serif; font-size: 0.7rem; font-weight: 500; color: var(--text-main, #1a1a2e); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.dark-mode .dash-top-name { color: #94a3b8; }
.dash-top-rev { font-family: 'IBM Plex Mono', monospace; font-size: 0.6rem; color: #9ca3af; flex-shrink: 0; }

/* Payment split */
.dash-pay-row {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 9px;
}
.dash-pay-row:last-child { margin-bottom: 0; }
.dash-pay-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dash-pay-name { font-family: 'DM Sans', sans-serif; font-size: 0.68rem; font-weight: 500; color: var(--text-main, #1a1a2e); flex: 1; }
body.dark-mode .dash-pay-name { color: #94a3b8; }
.dash-pay-track { flex: 1.5; background: rgba(0,0,0,0.06); border-radius: 99px; height: 4px; overflow: hidden; }
body.dark-mode .dash-pay-track { background: #1e1e2e; }
.dash-pay-fill {
    height: 100%;
    border-radius: 99px;
    transform: scaleX(0);
    transform-origin: left;
    animation: fillX 0.65s cubic-bezier(0.34,1.2,0.64,1) forwards;
    animation-delay: var(--bd, 0ms);
}
@keyframes fillX { to { transform: scaleX(1); } }
.dash-pay-pct { font-family: 'IBM Plex Mono', monospace; font-size: 0.58rem; color: #9ca3af; width: 26px; text-align: right; }

/* ── Inventory pulse ──────────────────────────────────────────── */
.dash-inv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}
.dash-inv-cell {
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.dash-inv-icon { font-size: 1.1rem; }
.dash-inv-val { font-family: 'IBM Plex Mono', monospace; font-size: 1.25rem; font-weight: 700; line-height: 1.1; }
.dash-inv-lbl { font-family: 'DM Sans', sans-serif; font-size: 0.6rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.65; }
.dash-expiry-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.dash-expiry-chip {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.63rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 99px;
    border: 1px solid;
}

/* ── Dues section (Standard+) ─────────────────────────────────── */
.dash-dues-total {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.45rem;
    font-weight: 600;
    color: #ef4444;
    margin: 2px 0 14px;
}
.dash-debtor-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}
.dash-debtor-row:last-child { border-bottom: none; }
body.dark-mode .dash-debtor-row { border-color: #1a1a2a; }
.dash-debtor-name { font-family: 'DM Sans', sans-serif; font-size: 0.73rem; font-weight: 500; color: var(--text-main, #1a1a2e); flex: 1; }
body.dark-mode .dash-debtor-name { color: #94a3b8; }
.dash-debtor-amt { font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; color: #ef4444; font-weight: 600; }
.dash-wa-quick {
    background: rgba(37,211,102,0.12);
    border: 1px solid rgba(37,211,102,0.3);
    border-radius: 8px;
    padding: 4px 8px;
    color: #16a34a;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 3px;
    transition: transform 0.14s;
    flex-shrink: 0;
}
.dash-wa-quick:active { transform: scale(0.94); }

/* ── Plan-locked overlay ──────────────────────────────────────── */
.dash-locked {
    position: absolute;
    inset: 0;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    z-index: 5;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    background: rgba(245,245,247,0.85);
}
body.dark-mode .dash-locked { background: rgba(10,10,15,0.87); }
.dash-locked-icon { font-size: 1.5rem; }
.dash-locked-msg {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem;
    color: #6b7280;
    text-align: center;
    padding: 0 14px;
    font-weight: 500;
}
.dash-locked-upgrade {
    margin-top: 4px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 7px 20px;
    border-radius: 99px;
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s;
}
.dash-locked-upgrade:active { opacity: 0.85; }

/* ── Quick actions ────────────────────────────────────────────── */
.dash-quick-wrap {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.dash-qa-btn {
    background: var(--dash-card, #fff);
    border: 1px solid rgba(0,0,0,0.04);
    border-radius: 14px;
    padding: 14px 6px 11px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 4px 12px rgba(0,0,0,0.04);
    transition: transform 0.24s cubic-bezier(0.22,1,0.36,1), box-shadow 0.24s cubic-bezier(0.22,1,0.36,1);
    will-change: transform;
}
.dash-qa-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.dash-qa-btn:active { transform: scale(0.94); box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
body.dark-mode .dash-qa-btn { background: #111118; border-color: #1e1e2e; }
.dash-qa-btn .material-icons-outlined { font-size: 1.25rem; color: #0d9488; }
.dash-qa-lbl {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.58rem;
    font-weight: 700;
    color: #9ca3af;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Skeleton ─────────────────────────────────────────────────── */
.dash-sk {
    background: linear-gradient(90deg, var(--sk1,#ebebf0) 25%, var(--sk2,#f5f5f7) 50%, var(--sk1,#ebebf0) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: 14px;
}
body.dark-mode .dash-sk { --sk1: #1e1e2e; --sk2: #252535; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── Entry animation ──────────────────────────────────────────── */
.dash-appear {
    opacity: 0;
    transform: translateY(14px);
    animation: appear 0.45s cubic-bezier(0.16,1,0.3,1) forwards;
    animation-delay: var(--ad, 0ms);
}
@keyframes appear { to { opacity: 1; transform: translateY(0); } }

/* ── Live dot ─────────────────────────────────────────────────── */
.live-dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: #22c55e;
    display: inline-block;
    animation: livePulse 2s ease infinite;
}
@keyframes livePulse {
    0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
    50%      { opacity: 0.7; box-shadow: 0 0 0 4px rgba(34,197,94,0); }
}

/* ══════════════════════════════════════════════════════════════
   Bottom Nav — Glance tab elevated center (MOBILE ONLY)
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
    #bottom-nav {
        align-items: flex-end !important;
        padding-bottom: max(env(safe-area-inset-bottom, 4px), 4px) !important;
    }

    #nav-home {
        position: relative;
        background: linear-gradient(155deg, #0f766e 0%, #0d9488 55%, #14b8a6 100%) !important;
        border-radius: 22px !important;
        color: #fff !important;
        transform: translateY(-15px);
        box-shadow:
            0 8px 26px rgba(13,148,136,0.42),
            0 2px 6px rgba(0,0,0,0.14),
            inset 0 1px 0 rgba(255,255,255,0.14);
        padding: 10px 10px 8px !important;
        min-width: 60px;
        transition: transform 0.22s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.22s ease !important;
    }
    #nav-home::before {
        content: '';
        position: absolute;
        inset: -1px;
        border-radius: 23px;
        background: linear-gradient(140deg, rgba(255,255,255,0.16) 0%, transparent 55%);
        pointer-events: none;
    }
    #nav-home .material-icons-outlined { color: #fff !important; font-size: 1.2rem !important; }
    #nav-home > span:not(.material-icons-outlined) { color: rgba(255,255,255,0.9) !important; font-weight: 700 !important; }
    #nav-home.active {
        transform: translateY(-19px) !important;
        box-shadow:
            0 12px 32px rgba(13,148,136,0.55),
            0 4px 10px rgba(0,0,0,0.18),
            inset 0 1px 0 rgba(255,255,255,0.18) !important;
    }
}

/* Empty state */
.dash-empty {
    padding: 20px 0 8px;
    text-align: center;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    color: #9ca3af;
}

/* ══════════════════════════════════════════════════════════════
   Desktop Glance layout improvements (≥768px)
   ══════════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
    /* Hero grid — Revenue left (wider) + 3 mini cards same row */
    .dash-hero-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
    .dm-revenue-card {
        grid-column: auto; /* override the 1/-1, stay in first column */
    }

    /* Two-col — give more breathing room */
    .dash-two-col {
        gap: 14px;
    }

    /* Glance page bottom padding — no mobile nav so reduce */
    #home-page {
        padding-bottom: 30px;
    }

    /* Bar chart taller on desktop */
    .dash-bar-chart {
        height: 120px;
    }
}

/* ── Greeting animated SVG icons ──────────────────────────────── */
.dash-hello { display: flex; align-items: center; gap: 9px; }
.greet-txt  { display: inline; }

.greet-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
}
.greet-icon svg {
    overflow: visible;
    stroke-width: 1.7;
}

/* ── Morning: spinning sun ── */
.greet-sun svg { animation: greet-spin 12s linear infinite; transform-origin: center; }
.greet-sun-core { stroke: #f59e0b; fill: rgba(251,191,36,0.15); }
.greet-sun-ray  { stroke: #fbbf24; stroke-width: 1.9; animation: greet-ray-pulse 2.4s ease-in-out infinite; }
@keyframes greet-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
@keyframes greet-ray-pulse {
    0%, 100% { opacity: 1; stroke-dasharray: none; }
    50%       { opacity: 0.55; }
}

/* ── Afternoon: cloud drifting over sun ── */
.greet-cloud-sun  { stroke: #f59e0b; fill: rgba(251,191,36,0.18); animation: greet-sun-peek 3.5s ease-in-out infinite; transform-origin: 13px 8px; }
.greet-cloud-body { stroke: #94a3b8; fill: rgba(148,163,184,0.12); animation: greet-cloud-drift 4s ease-in-out infinite; }
@keyframes greet-cloud-drift {
    0%, 100% { transform: translateX(0); }
    50%       { transform: translateX(1.5px); }
}
@keyframes greet-sun-peek {
    0%, 100% { opacity: 0.9; }
    50%       { opacity: 0.5; }
}

/* ── Evening: sunset glow + rays fade ── */
.greet-horizon      { stroke: #f97316; fill: rgba(249,115,22,0.12); animation: greet-sun-set 3s ease-in-out infinite; transform-origin: 12px 18px; }
.greet-sunset-ray   { stroke: #fb923c; animation: greet-ray-fade 3s ease-in-out infinite; }
.greet-horizon-line { stroke: #f97316; opacity: 0.5; }
.greet-h2           { opacity: 0.25; }
@keyframes greet-sun-set {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50%       { transform: translateY(1px); opacity: 0.75; }
}
@keyframes greet-ray-fade {
    0%, 100% { opacity: 0.9; }
    50%       { opacity: 0.3; }
}

/* ── Night: moon glow + twinkling stars ── */
.greet-moon  { stroke: #818cf8; fill: rgba(129,140,248,0.12); animation: greet-moon-glow 3s ease-in-out infinite; }
.greet-star  { fill: #c4b5fd; stroke: none; animation: greet-twinkle 2.2s ease-in-out infinite; }
.greet-star-b { animation-delay: 0.7s; }
.greet-star-c { animation-delay: 1.3s; }
@keyframes greet-moon-glow {
    0%, 100% { filter: drop-shadow(0 0 3px rgba(129,140,248,0.4)); }
    50%       { filter: drop-shadow(0 0 7px rgba(129,140,248,0.7)); }
}
@keyframes greet-twinkle {
    0%, 100% { opacity: 1;   r: 0.8; }
    50%       { opacity: 0.2; r: 0.4; }
}

/* ══════════════════════════════════════════════════════════════
   NEW LAYOUT: v1.2 redesign (matching dark screenshot)
   ══════════════════════════════════════════════════════════════ */

/* ── Ledger Summary combined card ── */
.dash-ledger-rows {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.dash-ledger-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.dash-ledger-row:last-child { border-bottom: none; }
body:not(.dark-mode) .dash-ledger-row { border-bottom-color: rgba(0,0,0,0.05); }
.dash-ledger-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-main, #1a1a2e);
}
body.dark-mode .dash-ledger-label { color: #94a3b8; }
.dash-ledger-value {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
}
.dash-ledger-ok {
    color: #22c55e;
    display: flex;
    align-items: center;
    gap: 4px;
}
.dash-ledger-amt {
    color: #ef4444;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
}
.dash-ledger-locked {
    color: #9ca3af;
    font-size: 0.65rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 3px;
    opacity: 0.7;
}

/* ── Revenue Trend + Quick Actions side-by-side ── */
.dash-trend-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
@media (min-width: 768px) {
    .dash-trend-actions {
        flex-direction: row;
        align-items: stretch;
    }
    .dash-trend-card { flex: 1.4; }
    .dash-qa-card    { flex: 1; }
}

/* Quick Actions 2x2 grid */
.dash-quick-wrap {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.dash-qa-btn {
    background: var(--dash-card, #fff);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 14px;
    padding: 16px 8px 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.05);
    transition: transform 0.14s, box-shadow 0.14s;
    min-height: 72px;
}
body.dark-mode .dash-quick-wrap .dash-qa-btn {
    background: #161620;
    border-color: rgba(255,255,255,0.07);
}
