/* Frontend — Material Design 3 + Light/Dark */

html.light {
    --color-background: #faf8fc;
    --color-foreground: #1d1b20;
    --color-primary: #6750a4;
    --color-primary-foreground: #ffffff;
    --color-secondary: #f3edf7;
    --color-secondary-foreground: #1d1b20;
    --color-muted: #f3edf7;
    --color-muted-foreground: #49454f;
    --color-accent: #e8def8;
    --color-border: #e7e0ec;
    --color-card: #ffffff;
    --color-footer: #1d1b20;
    --hero-gradient: linear-gradient(160deg, #f3e8ff 0%, #faf8fc 35%, #ede9fe 70%, #faf8fc 100%);
    --hero-glow-1: rgba(103, 80, 164, 0.18);
    --hero-glow-2: rgba(147, 112, 219, 0.12);
    --hero-text: #1d1b20;
    --hero-text-muted: #5c5570;
    --hero-section-bg: #faf8fc;
    --hero-border: rgba(103, 80, 164, 0.12);
    --hero-bg-overlay: linear-gradient(105deg, rgba(255, 255, 255, 0.88) 0%, rgba(243, 232, 255, 0.72) 42%, rgba(250, 248, 252, 0.55) 100%), linear-gradient(to top, rgba(250, 248, 252, 0.8) 0%, transparent 55%);
    --hero-glass-bg: rgba(255, 255, 255, 0.78);
    --hero-glass-border: rgba(103, 80, 164, 0.16);
    --hero-glass-shadow: 0 8px 32px rgba(103, 80, 164, 0.1);
    --hero-header-over-bg: rgba(255, 255, 255, 0.78);
    --hero-cosmic-bg: linear-gradient(165deg, #f3e8ff 0%, #faf8fc 50%, #ede9fe 100%);
    --hero-cosmic-nebula-1: rgba(147, 112, 219, 0.2);
    --hero-cosmic-nebula-2: rgba(251, 191, 36, 0.12);
    --hero-cosmic-orbit: rgba(103, 80, 164, 0.25);
    --hero-cosmic-chip-bg: rgba(255, 255, 255, 0.9);
    --hero-cosmic-chip-border: rgba(103, 80, 164, 0.18);
    --hero-cosmic-chip-text: #49454f;
    --hero-cosmic-gold: #b45309;
    --hero-cosmic-highlight: linear-gradient(135deg, #6750a4 0%, #7c3aed 45%, #9333ea 100%);
    --hero-cosmic-glow: rgba(103, 80, 164, 0.22);
    --hero-cosmic-wheel-stroke: rgba(103, 80, 164, 0.3);
    --hero-cosmic-core: rgba(255, 255, 255, 0.95);
    --hero-zodiac-fill: #6750a4;
    --banner-panchang-bg: linear-gradient(135deg, #5b21b6 0%, #7c3aed 50%, #4c1d95 100%);
    --banner-panchang-border: rgba(251, 191, 36, 0.2);
    --banner-cta-bg: linear-gradient(160deg, #faf8fc 0%, #f3e8ff 100%);
    --header-bg: rgba(255, 255, 255, 0.96);
    --md-elevation-1: 0 1px 2px rgba(0, 0, 0, 0.08), 0 1px 3px 1px rgba(0, 0, 0, 0.06);
    --md-elevation-2: 0 2px 6px 2px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.1);
    --md-elevation-3: 0 4px 12px 3px rgba(0, 0, 0, 0.1);
}

html.dark {
    --color-background: #121016;
    --color-foreground: #e8e0f0;
    --color-primary: #cbb8ff;
    --color-primary-foreground: #2d1b5e;
    --color-secondary: #221f28;
    --color-secondary-foreground: #e8e0f0;
    --color-muted: #2a2730;
    --color-muted-foreground: #b8afc4;
    --color-accent: #3d3650;
    --color-border: #3f3a48;
    --color-card: #1e1b24;
    --color-footer: #0a090d;
    --hero-gradient: linear-gradient(160deg, #1a1525 0%, #121016 40%, #1e1630 75%, #121016 100%);
    --hero-glow-1: rgba(203, 184, 255, 0.12);
    --hero-glow-2: rgba(126, 87, 194, 0.1);
    --hero-text: #f8f4ff;
    --hero-text-muted: #c4b5d8;
    --hero-section-bg: #120c28;
    --hero-border: rgba(251, 191, 36, 0.15);
    --hero-bg-overlay: linear-gradient(105deg, rgba(18, 10, 38, 0.78) 0%, rgba(45, 27, 94, 0.48) 45%, rgba(18, 12, 40, 0.42) 100%), linear-gradient(to top, rgba(18, 12, 40, 0.65) 0%, transparent 50%);
    --hero-glass-bg: rgba(255, 255, 255, 0.07);
    --hero-glass-border: rgba(255, 255, 255, 0.14);
    --hero-glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    --hero-header-over-bg: rgba(15, 10, 30, 0.35);
    --hero-cosmic-bg: linear-gradient(165deg, #0a0618 0%, #1a1035 30%, #120c28 60%, #0d0820 100%);
    --hero-cosmic-nebula-1: rgba(126, 87, 194, 0.25);
    --hero-cosmic-nebula-2: rgba(251, 191, 36, 0.12);
    --hero-cosmic-orbit: rgba(203, 184, 255, 0.25);
    --hero-cosmic-chip-bg: rgba(255, 255, 255, 0.06);
    --hero-cosmic-chip-border: rgba(251, 191, 36, 0.2);
    --hero-cosmic-chip-text: #e8e0f0;
    --hero-cosmic-gold: #fcd34d;
    --hero-cosmic-highlight: linear-gradient(135deg, #fcd34d 0%, #fbbf24 50%, #fde68a 100%);
    --hero-cosmic-glow: rgba(203, 184, 255, 0.3);
    --hero-cosmic-wheel-stroke: rgba(203, 184, 255, 0.35);
    --hero-cosmic-core: rgba(30, 20, 60, 0.9);
    --hero-zodiac-fill: #fcd34d;
    --banner-panchang-bg: linear-gradient(135deg, #3b0764 0%, #5b21b6 50%, #2e1065 100%);
    --banner-panchang-border: rgba(251, 191, 36, 0.15);
    --banner-cta-bg: linear-gradient(160deg, #1e1b24 0%, #2a1f40 100%);
    --header-bg: rgba(30, 27, 36, 0.96);
    --md-elevation-1: 0 1px 3px rgba(0, 0, 0, 0.35);
    --md-elevation-2: 0 2px 8px rgba(0, 0, 0, 0.4);
    --md-elevation-3: 0 4px 16px rgba(0, 0, 0, 0.45);
}

html.light, html.dark { scroll-behavior: smooth; }
html.light { color-scheme: light; }
html.dark { color-scheme: dark; }

body {
    font-family: 'Roboto', 'Segoe UI', system-ui, sans-serif !important;
    letter-spacing: 0.006em;
    transition: background-color 0.25s ease, color 0.25s ease;
}

/* ─── Top app bar ─── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
}

.site-header-bar {
    background: var(--header-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--md-elevation-1);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Transparent header over home hero */
.site-header--over-hero:not(.site-header--scrolled) .site-header-bar {
    background: var(--hero-header-over-bg);
    border-bottom-color: var(--hero-border);
    box-shadow: none;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

/* Dark mode: light text on dark hero */
html.dark .site-header--over-hero:not(.site-header--scrolled) .site-brand {
    color: #f8f4ff;
}

html.dark .site-header--over-hero:not(.site-header--scrolled) .site-nav-link {
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.16);
}

html.dark .site-header--over-hero:not(.site-header--scrolled) .site-nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(251, 191, 36, 0.45);
}

html.dark .site-header--over-hero:not(.site-header--scrolled) .site-nav-link.is-active {
    color: #fff;
    background: rgba(251, 191, 36, 0.22);
    border-color: rgba(251, 191, 36, 0.5);
}

html.dark .site-header--over-hero:not(.site-header--scrolled) .site-header-signin {
    color: rgba(255, 255, 255, 0.9);
}

html.dark .site-header--over-hero:not(.site-header--scrolled) .site-menu-btn {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

html.dark .site-header--over-hero:not(.site-header--scrolled) .theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

html.dark .site-header--over-hero:not(.site-header--scrolled) .theme-toggle-btn {
    color: rgba(255, 255, 255, 0.85);
}

html.dark .site-header--over-hero:not(.site-header--scrolled) .site-account-btn {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
}

/* Light mode: dark text on light hero */
html.light .site-header--over-hero:not(.site-header--scrolled) .site-brand {
    color: var(--color-foreground);
}

html.light .site-header--over-hero:not(.site-header--scrolled) .site-nav-link {
    color: var(--color-muted-foreground);
    background: rgba(255, 255, 255, 0.82);
    border-color: var(--color-border);
}

html.light .site-header--over-hero:not(.site-header--scrolled) .site-nav-link:hover {
    color: var(--color-primary);
    background: #fff;
    border-color: color-mix(in srgb, var(--color-primary) 35%, var(--color-border));
}

html.light .site-header--over-hero:not(.site-header--scrolled) .site-nav-link.is-active {
    color: var(--color-primary);
    background: var(--color-accent);
    border-color: color-mix(in srgb, var(--color-primary) 40%, var(--color-border));
}

html.light .site-header--over-hero:not(.site-header--scrolled) .site-header-signin {
    color: var(--color-muted-foreground);
}

html.light .site-header--over-hero:not(.site-header--scrolled) .site-menu-btn {
    background: rgba(255, 255, 255, 0.85);
    color: var(--color-foreground);
    border: 1px solid var(--color-border);
}

html.light .site-header--over-hero:not(.site-header--scrolled) .theme-toggle {
    background: rgba(255, 255, 255, 0.85);
    border-color: var(--color-border);
}

html.light .site-header--over-hero:not(.site-header--scrolled) .theme-toggle-btn {
    color: var(--color-muted-foreground);
}

html.light .site-header--over-hero:not(.site-header--scrolled) .site-account-btn {
    background: rgba(255, 255, 255, 0.85);
    border-color: var(--color-border);
    color: var(--color-foreground);
}

.site-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 4rem;
    min-width: 0;
}

@media (min-width: 1024px) {
    .site-header-row { min-height: 4.5rem; }
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    color: var(--color-foreground);
    flex-shrink: 0;
    min-width: 0;
}

.site-brand img {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.625rem;
    box-shadow: var(--md-elevation-1);
}

.site-brand span {
    font-size: 1.125rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.site-header-nav {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
    flex: 1;
    padding: 0 1rem;
}

@media (min-width: 1024px) {
    .site-header-nav { display: flex; }
}

.site-nav-icon {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
    opacity: 0.9;
}

.site-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4375rem;
    padding: 0.5rem 0.9375rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-muted-foreground);
    text-decoration: none;
    white-space: nowrap;
    background: color-mix(in srgb, var(--color-muted) 65%, transparent);
    border: 1px solid var(--color-border);
    box-shadow: var(--md-elevation-1);
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.site-nav-link:hover {
    color: var(--color-foreground);
    background: var(--color-muted);
    border-color: color-mix(in srgb, var(--color-primary) 35%, var(--color-border));
    transform: translateY(-1px);
}

.site-nav-link.is-active {
    color: var(--color-primary);
    background: var(--color-accent);
    border-color: color-mix(in srgb, var(--color-primary) 40%, var(--color-border));
}

.site-nav-link.is-active .site-nav-icon {
    color: var(--color-primary);
}

.site-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.site-header-signin {
    display: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-muted-foreground);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 9999px;
    transition: color 0.2s, background 0.2s;
}

@media (min-width: 640px) {
    .site-header-signin { display: inline-block; }
}

.site-header-signin:hover {
    color: var(--color-foreground);
    background: var(--color-muted);
}

.site-header-user {
    display: none;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-muted-foreground);
    max-width: 8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .site-header-user { display: inline-block; }
}

form.inline { display: inline; }

.site-header-signin[type="submit"],
.site-mobile-signin[type="submit"] {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

.site-header-signup {
    display: none !important;
    font-size: 0.8125rem !important;
    padding: 0.5rem 1.125rem !important;
}

@media (min-width: 768px) {
    .site-header-signup { display: inline-flex !important; }
}

.site-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 50%;
    background: var(--color-muted);
    color: var(--color-foreground);
    cursor: pointer;
    transition: background 0.2s;
}

.site-menu-btn:hover { background: var(--color-accent); }

@media (min-width: 1024px) {
    .site-menu-btn { display: none !important; }
    .site-mobile-menu { display: none !important; }
}

/* Account menu (logged-in header) */
.site-account-menu {
    position: relative;
    display: none;
}

@media (min-width: 768px) {
    .site-account-menu { display: block; }
}

.site-account-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem 0.375rem 0.375rem;
    border: 1px solid var(--color-border);
    border-radius: 9999px;
    background: var(--color-card);
    color: var(--color-foreground);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    font-family: inherit;
}

.site-account-btn:hover {
    background: var(--color-muted);
    border-color: var(--color-primary);
}

.site-account-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
}

.site-account-name {
    max-width: 7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-account-chevron {
    width: 1rem;
    height: 1rem;
    color: var(--color-muted-foreground);
}

.site-account-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    min-width: 11rem;
    padding: 0.375rem;
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    background: var(--color-card);
    box-shadow: var(--md-elevation-3);
    z-index: 50;
}

.site-account-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.625rem 0.875rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-foreground);
    text-decoration: none;
    text-align: left;
    transition: background 0.2s;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

.site-account-link:hover {
    background: var(--color-muted);
}

.site-account-logout {
    color: #dc2626;
}

.site-account-divider {
    height: 1px;
    margin: 0.25rem 0;
    background: var(--color-border);
}

/* Mobile menu */
.site-mobile-menu {
    background: var(--color-card);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--md-elevation-2);
}

.site-mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.site-mobile-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 0.875rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-foreground);
    text-decoration: none;
    background: var(--color-muted);
    border: 1px solid var(--color-border);
    transition: background 0.2s, border-color 0.2s;
}

.site-mobile-link .site-nav-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--color-primary);
}

.site-mobile-link:hover {
    background: var(--color-accent);
    border-color: color-mix(in srgb, var(--color-primary) 30%, var(--color-border));
}

.site-mobile-link.is-active {
    background: var(--color-accent);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.site-mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.site-mobile-signin {
    text-align: center;
    padding: 0.75rem;
    color: var(--color-muted-foreground);
    text-decoration: none;
    font-weight: 500;
}

.site-mobile-signup {
    text-align: center;
    width: 100%;
}

/* Theme toggle */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem;
    border-radius: 9999px;
    background: var(--color-muted);
    border: 1px solid var(--color-border);
    gap: 0.125rem;
}

.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.4rem 0.55rem;
    border-radius: 9999px;
    border: none;
    background: transparent;
    color: var(--color-muted-foreground);
    font-size: 0.6875rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.theme-toggle-btn svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.theme-toggle-btn:hover { color: var(--color-foreground); }

.theme-toggle-btn.is-active {
    background: var(--color-card);
    color: var(--color-primary);
    box-shadow: var(--md-elevation-1);
}

.theme-toggle--compact .theme-toggle-label { display: none; }
.theme-toggle--compact .theme-toggle-btn { padding: 0.4rem; }

/* ─── Home cosmic astrology hero ─── */
.hero-cosmic {
    position: relative;
    overflow: hidden;
    padding: 3rem 0 4rem;
    margin-top: -4rem;
    padding-top: calc(3rem + 4rem);
    background: var(--hero-section-bg);
    border-bottom: 1px solid var(--hero-border);
    color: var(--hero-text);
}

@media (min-width: 1024px) {
    .hero-cosmic {
        margin-top: -4.5rem;
        padding-top: calc(4rem + 4.5rem);
    }
}

@media (min-width: 768px) {
    .hero-cosmic { padding: 4rem 0 5rem; }
}

.hero-cosmic-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-bg-photo {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transform: scale(1.02);
}

.hero-bg-overlay {
    position: absolute;
    inset: 0;
    background: var(--hero-bg-overlay);
}

.hero-glass-panel {
    background: var(--hero-glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--hero-glass-border);
    border-radius: 1.25rem;
    padding: 1.5rem;
    box-shadow: var(--hero-glass-shadow);
}

@media (min-width: 1024px) {
    .hero-glass-panel {
        padding: 2rem;
    }
}

.hero-stars {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.7) 50%, transparent 100%),
        radial-gradient(1px 1px at 30% 65%, rgba(255,255,255,0.5) 50%, transparent 100%),
        radial-gradient(1.5px 1.5px at 55% 15%, rgba(255,255,255,0.8) 50%, transparent 100%),
        radial-gradient(1px 1px at 70% 45%, rgba(255,255,255,0.4) 50%, transparent 100%),
        radial-gradient(1px 1px at 85% 75%, rgba(255,255,255,0.6) 50%, transparent 100%),
        radial-gradient(1.5px 1.5px at 20% 80%, rgba(255,255,255,0.5) 50%, transparent 100%),
        radial-gradient(1px 1px at 45% 40%, rgba(255,255,255,0.35) 50%, transparent 100%),
        radial-gradient(1px 1px at 92% 30%, rgba(255,255,255,0.55) 50%, transparent 100%);
    animation: hero-stars-twinkle 6s ease-in-out infinite alternate;
}

html.light .hero-stars {
    opacity: 0.55;
    background-image:
        radial-gradient(1.5px 1.5px at 10% 20%, rgba(103, 80, 164, 0.45) 50%, transparent 100%),
        radial-gradient(1px 1px at 30% 65%, rgba(147, 112, 219, 0.35) 50%, transparent 100%),
        radial-gradient(1.5px 1.5px at 55% 15%, rgba(103, 80, 164, 0.5) 50%, transparent 100%),
        radial-gradient(1px 1px at 70% 45%, rgba(126, 87, 194, 0.3) 50%, transparent 100%),
        radial-gradient(1px 1px at 85% 75%, rgba(147, 112, 219, 0.4) 50%, transparent 100%),
        radial-gradient(1.5px 1.5px at 20% 80%, rgba(103, 80, 164, 0.35) 50%, transparent 100%),
        radial-gradient(1px 1px at 45% 40%, rgba(126, 87, 194, 0.25) 50%, transparent 100%),
        radial-gradient(1px 1px at 92% 30%, rgba(147, 112, 219, 0.38) 50%, transparent 100%);
}

@keyframes hero-stars-twinkle {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

.hero-nebula {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
}

.hero-nebula-1 {
    width: 24rem;
    height: 24rem;
    top: -6rem;
    right: 10%;
    background: var(--hero-cosmic-nebula-1);
    animation: hero-nebula-float 12s ease-in-out infinite;
}

.hero-nebula-2 {
    width: 18rem;
    height: 18rem;
    bottom: -4rem;
    left: 5%;
    background: var(--hero-cosmic-nebula-2);
    animation: hero-nebula-float 10s ease-in-out infinite reverse;
}

@keyframes hero-nebula-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(1rem, -1rem) scale(1.05); }
}

.hero-orbit-line {
    position: absolute;
    border: 1px dashed var(--hero-cosmic-orbit);
    border-radius: 50%;
    opacity: 0.4;
}

.hero-orbit-line-1 {
    width: 32rem;
    height: 32rem;
    top: 50%;
    right: -8rem;
    transform: translateY(-50%);
    animation: hero-orbit-spin 80s linear infinite;
}

.hero-orbit-line-2 {
    width: 22rem;
    height: 22rem;
    top: 20%;
    left: -6rem;
    animation: hero-orbit-spin-alt 60s linear infinite reverse;
}

@keyframes hero-orbit-spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

@keyframes hero-orbit-spin-alt {
    to { transform: rotate(360deg); }
}

.hero-cosmic-wrap {
    position: relative;
    z-index: 1;
}

.hero-cosmic-grid {
    display: grid;
    gap: 2.5rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .hero-cosmic-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

.hero-cosmic-content {
    text-align: center;
}

@media (min-width: 1024px) {
    .hero-cosmic-content { text-align: left; }
}

.hero-cosmic-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    margin-bottom: 1.25rem;
    border-radius: 9999px;
    background: var(--hero-cosmic-chip-bg);
    border: 1px solid var(--hero-cosmic-chip-border);
    font-size: 0.8125rem;
    color: var(--hero-cosmic-chip-text);
}

.hero-cosmic-chip strong {
    color: var(--hero-cosmic-gold);
}

.hero-chip-icon {
    width: 1.125rem;
    height: 1.125rem;
    color: var(--hero-cosmic-gold);
    flex-shrink: 0;
}

.hero-cosmic-title {
    font-family: 'Merriweather', Georgia, serif;
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--hero-text);
    letter-spacing: -0.02em;
}

.hero-cosmic-highlight {
    background: var(--hero-cosmic-highlight);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-cosmic-subtitle {
    margin-top: 1.25rem;
    max-width: 34rem;
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--hero-text-muted);
}

@media (min-width: 1024px) {
    .hero-cosmic-subtitle { margin-left: 0; margin-right: 0; }
}

.hero-panchang-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    justify-content: center;
    margin-top: 1.5rem;
}

@media (min-width: 1024px) {
    .hero-panchang-strip { justify-content: flex-start; }
}

.hero-panchang-item {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    padding: 0.5rem 0.875rem;
    border-radius: 0.75rem;
    background: var(--hero-cosmic-chip-bg);
    border: 1px solid var(--hero-cosmic-chip-border);
    min-width: 6.5rem;
}

.hero-panchang-label {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--hero-text-muted);
}

.hero-panchang-value {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--hero-text);
}

.hero-cosmic-actions {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

@media (min-width: 1024px) {
    .hero-cosmic-actions { justify-content: flex-start; }
}

.hero-btn-glow {
    box-shadow: 0 0 24px var(--hero-cosmic-glow);
}

.hero-cosmic-trust {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--hero-text-muted);
}

@media (min-width: 1024px) {
    .hero-cosmic-trust { justify-content: flex-start; }
}

.hero-cosmic-trust strong {
    color: var(--hero-text);
}

html.dark .hero-cosmic .btn-outline {
    border-color: rgba(251, 191, 36, 0.45);
    color: var(--hero-cosmic-gold);
    background: rgba(255, 255, 255, 0.05);
}

html.dark .hero-cosmic .btn-outline:hover {
    background: rgba(251, 191, 36, 0.12);
    border-color: var(--hero-cosmic-gold);
}

html.light .hero-cosmic .btn-outline {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(255, 255, 255, 0.7);
}

html.light .hero-cosmic .btn-outline:hover {
    background: var(--color-accent);
    border-color: var(--color-primary);
}

.hero-avatars {
    display: flex;
}

.hero-avatars img {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 2px solid var(--hero-glass-border);
    object-fit: cover;
    margin-left: -0.5rem;
    box-shadow: var(--md-elevation-1);
}

.hero-avatars img:first-child { margin-left: 0; }

/* Zodiac wheel visual */
.hero-cosmic-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-zodiac-wheel {
    position: relative;
    width: min(100%, 22rem);
    aspect-ratio: 1;
}

@media (min-width: 1024px) {
    .hero-zodiac-wheel { width: 24rem; }
}

.hero-wheel-glow {
    position: absolute;
    inset: 10%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--hero-cosmic-glow) 0%, transparent 70%);
    animation: hero-wheel-pulse 4s ease-in-out infinite;
}

@keyframes hero-wheel-pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

.hero-wheel-svg {
    width: 100%;
    height: 100%;
    animation: hero-wheel-rotate 120s linear infinite;
}

@keyframes hero-wheel-rotate {
    to { transform: rotate(360deg); }
}

.hero-wheel-ring {
    fill: none;
    stroke: var(--hero-cosmic-wheel-stroke);
    stroke-width: 1;
}

.hero-wheel-ring-outer { stroke-dasharray: 4 8; opacity: 0.5; }
.hero-wheel-ring-mid { opacity: 0.35; }
.hero-wheel-ring-inner { opacity: 0.25; }

.hero-zodiac-glyph {
    font-size: 1.25rem;
    fill: var(--hero-zodiac-fill);
    opacity: 0.9;
}

.hero-wheel-core {
    fill: var(--hero-cosmic-core);
    stroke: var(--hero-zodiac-fill);
    stroke-width: 1.5;
    opacity: 0.95;
}

html.light .hero-bg-photo {
    filter: brightness(1.06) saturate(0.9);
}

.hero-wheel-om {
    font-size: 2rem;
    fill: var(--hero-zodiac-fill);
    font-family: serif;
}

.hero-wheel-tagline {
    font-size: 0.75rem;
    fill: var(--hero-text-muted);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.hero-planet {
    position: absolute;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--md-elevation-2);
}

.hero-planet svg {
    width: 1.25rem;
    height: 1.25rem;
}

.hero-planet-sun {
    top: 8%;
    right: 18%;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #fff;
    animation: hero-planet-float 5s ease-in-out infinite;
}

.hero-planet-moon {
    bottom: 12%;
    left: 10%;
    background: linear-gradient(135deg, #c4b5fd, #8b5cf6);
    color: #fff;
    animation: hero-planet-float 6s ease-in-out infinite reverse;
}

@keyframes hero-planet-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-0.5rem); }
}

.hero-zodiac-orbit {
    display: none;
}

/* ─── Home banner (panchang + CTA) ─── */
.banner-astro {
    padding: 2.5rem 0 3rem;
    background: var(--color-background);
}

@media (min-width: 768px) {
    .banner-astro { padding: 3rem 0 4rem; }
}

.banner-astro-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .banner-astro-grid {
        grid-template-columns: 1.15fr 0.85fr;
    }
}

.banner-panchang-card {
    border-radius: 1.25rem;
    padding: 1.5rem;
    background: var(--banner-panchang-bg);
    border: 1px solid var(--banner-panchang-border);
    color: #fff;
    box-shadow: var(--md-elevation-2);
}

@media (min-width: 768px) {
    .banner-panchang-card { padding: 2rem; }
}

.banner-panchang-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.banner-panchang-eyebrow {
    font-size: 0.8125rem;
    opacity: 0.9;
    margin-bottom: 0.375rem;
}

.banner-panchang-title {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
}

.banner-panchang-date {
    font-size: 0.8125rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

.banner-panchang-moon {
    font-size: 2.5rem;
    animation: hero-planet-float 4s ease-in-out infinite;
}

.banner-panchang-body {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .banner-panchang-body {
        grid-template-columns: repeat(4, 1fr);
    }
}

.banner-panchang-stat {
    padding: 0.75rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
}

.banner-panchang-stat span {
    display: block;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.75;
    margin-bottom: 0.25rem;
}

.banner-panchang-stat strong {
    font-size: 0.875rem;
    font-weight: 600;
}

.banner-panchang-stat-wide {
    grid-column: span 2;
}

@media (min-width: 640px) {
    .banner-panchang-stat-wide { grid-column: span 2; }
}

.banner-cta-card {
    position: relative;
    overflow: hidden;
    border-radius: 1.25rem;
    padding: 1.5rem;
    background: var(--banner-cta-bg);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 16rem;
}

@media (min-width: 768px) {
    .banner-cta-card { padding: 2rem; }
}

.banner-cta-stars {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 15% 25%, var(--hero-cosmic-gold) 50%, transparent 100%),
        radial-gradient(1px 1px at 80% 20%, var(--hero-cosmic-gold) 50%, transparent 100%),
        radial-gradient(1px 1px at 60% 80%, var(--hero-cosmic-gold) 50%, transparent 100%);
    opacity: 0.4;
    pointer-events: none;
}

.banner-cta-eyebrow {
    position: relative;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--hero-cosmic-gold);
    margin-bottom: 0.5rem;
}

.banner-cta-title {
    position: relative;
    font-family: 'Merriweather', Georgia, serif;
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.banner-cta-text {
    position: relative;
    font-size: 0.9375rem;
    color: var(--color-muted-foreground);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.banner-cta-tags {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.banner-cta-tags span {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    background: var(--color-muted);
    color: var(--color-foreground);
}

.banner-cta-card .btn-orange {
    position: relative;
    width: fit-content;
}

/* ─── Inner page hero banner ─── */
.page-hero {
    position: relative;
    overflow: hidden;
    padding: 2.5rem 0 2rem;
    background: var(--hero-gradient);
    border-bottom: 1px solid var(--color-border);
}

@media (min-width: 768px) {
    .page-hero { padding: 3.5rem 0 2.5rem; }
}

.page-hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 0%, var(--hero-glow-1), transparent 65%);
    pointer-events: none;
}

.page-hero-inner {
    position: relative;
    z-index: 1;
    text-align: center;
}

.page-hero-title {
    margin: 0;
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 400;
    color: var(--color-foreground);
    letter-spacing: -0.02em;
}

.page-hero-subtitle {
    margin: 0.75rem auto 0;
    max-width: 36rem;
    font-size: 1rem;
    color: var(--color-muted-foreground);
    line-height: 1.6;
}

/* ─── Buttons ─── */
.btn-primary {
    border-radius: 9999px !important;
    font-weight: 500 !important;
    box-shadow: var(--md-elevation-1) !important;
    transition: box-shadow 0.2s, transform 0.15s !important;
}

.btn-primary:hover {
    box-shadow: var(--md-elevation-2) !important;
    transform: translateY(-1px);
}

.btn-outline {
    border-radius: 9999px !important;
    font-weight: 500 !important;
    background: var(--color-card) !important;
}

.btn-outline:hover { background: var(--color-muted) !important; }
.btn-orange { border-radius: 9999px !important; box-shadow: var(--md-elevation-1); }

/* Cards */
.card {
    border: 1px solid var(--color-border) !important;
    box-shadow: var(--md-elevation-1) !important;
    transition: box-shadow 0.25s, transform 0.25s !important;
}

.card:hover {
    box-shadow: var(--md-elevation-3) !important;
    transform: translateY(-2px);
    --tw-shadow: 0 0 #0000 !important;
}

.section-heading .label {
    color: var(--color-primary) !important;
    font-weight: 500;
    letter-spacing: 0.1em;
}

.section-heading h2 { font-weight: 400; }

/* Service icons */
.service-icon-wrap {
    width: 3rem;
    height: 3rem;
    border-radius: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.service-icon-svg {
    width: 1.5rem;
    height: 1.5rem;
}

.service-icon-bg-purple { background: rgba(103, 80, 164, 0.15); }
.service-icon-color-purple { color: #6750a4; }
html.dark .service-icon-bg-purple { background: rgba(203, 184, 255, 0.15); }
html.dark .service-icon-color-purple { color: #cbb8ff; }

.service-icon-bg-rose { background: rgba(244, 63, 94, 0.12); }
.service-icon-color-rose { color: #e11d48; }
html.dark .service-icon-bg-rose { background: rgba(251, 113, 133, 0.15); }
html.dark .service-icon-color-rose { color: #fb7185; }

.service-icon-bg-indigo { background: rgba(99, 102, 241, 0.12); }
.service-icon-color-indigo { color: #4f46e5; }
html.dark .service-icon-bg-indigo { background: rgba(129, 140, 248, 0.15); }
html.dark .service-icon-color-indigo { color: #a5b4fc; }

.service-icon-bg-amber { background: rgba(245, 158, 11, 0.12); }
.service-icon-color-amber { color: #d97706; }
html.dark .service-icon-bg-amber { background: rgba(251, 191, 36, 0.15); }
html.dark .service-icon-color-amber { color: #fbbf24; }

.service-icon-bg-teal { background: rgba(20, 184, 166, 0.12); }
.service-icon-color-teal { color: #0d9488; }
html.dark .service-icon-bg-teal { background: rgba(45, 212, 191, 0.15); }
html.dark .service-icon-color-teal { color: #5eead4; }

.service-icon-bg-orange { background: rgba(249, 115, 22, 0.12); }
.service-icon-color-orange { color: #ea580c; }
html.dark .service-icon-bg-orange { background: rgba(251, 146, 60, 0.15); }
html.dark .service-icon-color-orange { color: #fb923c; }

.service-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

/* About section */
.bg-purple-dark {
    background: linear-gradient(135deg, #2d1b5e 0%, #1a1035 50%, #120c28 100%);
}

.about-section-visual {
    position: relative;
}

.about-section-image {
    width: 100%;
    border-radius: 1.25rem;
    box-shadow: var(--md-elevation-3);
    border: 1px solid rgba(255, 255, 255, 0.12);
    object-fit: cover;
    aspect-ratio: 4 / 3;
}

.about-section-visual::before {
    content: '';
    position: absolute;
    inset: -0.5rem;
    border-radius: 1.5rem;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(147, 112, 219, 0.2));
    z-index: -1;
}

.about-page-image {
    width: 100%;
    border-radius: 1.25rem;
    box-shadow: var(--md-elevation-2);
    margin-bottom: 2rem;
    object-fit: cover;
}

/* Forms */
input[type="text"], input[type="email"], input[type="password"],
input[type="tel"], input[type="number"], input[type="date"],
textarea, select {
    border-radius: 0.5rem;
    border-color: var(--color-border);
    background: var(--color-card);
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary) 22%, transparent);
}

footer.bg-footer { background-color: var(--color-footer) !important; }

.bg-background, .bg-card, .bg-secondary, .bg-muted,
.text-foreground, .text-muted-foreground, .border-border {
    transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}

/* Page content spacing below hero */
.page-content { padding: 2.5rem 0 4rem; }
@media (min-width: 768px) { .page-content { padding: 3rem 0 5rem; } }

/* Auth forms */
.auth-field { margin-bottom: 0.25rem; }

.auth-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
    color: var(--color-muted-foreground);
}

.auth-input {
    width: 100%;
    border-radius: 0.5rem;
    border: 1px solid var(--color-border);
    background: var(--color-card);
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    color: var(--color-foreground);
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary) 22%, transparent);
}

.auth-input-error {
    border-color: #dc2626 !important;
}

.auth-error {
    margin: 0.375rem 0 0;
    font-size: 0.75rem;
    color: #dc2626;
}

.auth-hint {
    margin: 0.375rem 0 0;
    font-size: 0.75rem;
    color: var(--color-muted-foreground);
}

.auth-password-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-password-input {
    padding-right: 3rem;
}

.auth-password-toggle {
    position: absolute;
    right: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--color-muted-foreground);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.auth-password-toggle:hover {
    background: var(--color-muted);
    color: var(--color-foreground);
}

.auth-password-toggle svg {
    width: 1.25rem;
    height: 1.25rem;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-muted-foreground);
    cursor: pointer;
}

.auth-remember input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--color-primary);
}

.auth-alert {
    padding: 0.875rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.auth-alert-success {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

html.dark .auth-alert-success {
    background: #14532d33;
    color: #86efac;
    border-color: #166534;
}

.auth-alert-error {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

html.dark .auth-alert-error {
    background: #7f1d1d33;
    color: #fca5a5;
    border-color: #991b1b;
}

/* Account pages */
.account-layout {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .account-layout {
        grid-template-columns: 16rem 1fr;
        align-items: start;
    }
}

.account-sidebar {
    padding: 1.25rem;
}

.account-sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

.account-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
    flex-shrink: 0;
}

.account-sidebar-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-foreground);
}

.account-sidebar-email {
    font-size: 0.75rem;
    color: var(--color-muted-foreground);
    word-break: break-all;
}

.account-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.account-nav-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-muted-foreground);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.account-nav-link svg {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
}

.account-nav-link:hover,
.account-nav-link.is-active {
    color: var(--color-primary);
    background: var(--color-accent);
}

.account-nav-logout {
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-border);
}

.account-nav-logout-btn {
    color: #dc2626;
}

.account-nav-logout-btn:hover {
    color: #dc2626;
    background: #fee2e2;
}

html.dark .account-nav-logout-btn:hover {
    background: #7f1d1d33;
}

.account-dl {
    display: grid;
    gap: 0.875rem;
}

@media (min-width: 640px) {
    .account-dl {
        grid-template-columns: 1fr 1fr;
    }
}

.account-dl dt {
    font-size: 0.75rem;
    color: var(--color-muted-foreground);
    margin-bottom: 0.125rem;
}

.account-dl dd {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-foreground);
}

.account-empty {
    text-align: center;
    padding: 2rem 1rem;
}

.account-orders-table-wrap {
    overflow-x: auto;
}

.account-orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.account-orders-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-muted-foreground);
    border-bottom: 1px solid var(--color-border);
}

.account-orders-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

.account-orders-table tbody tr:last-child td {
    border-bottom: none;
}

.account-status {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.account-status-pending {
    background: #fef3c7;
    color: #b45309;
}

.account-status-paid {
    background: #dcfce7;
    color: #15803d;
}

.account-status-failed,
.account-status-cancelled {
    background: #fee2e2;
    color: #dc2626;
}

html.dark .account-status-pending {
    background: #78350f33;
    color: #fcd34d;
}

html.dark .account-status-paid {
    background: #14532d33;
    color: #86efac;
}

html.dark .account-status-failed,
html.dark .account-status-cancelled {
    background: #7f1d1d33;
    color: #fca5a5;
}

/* Chat room */
.chat-page {
    min-height: calc(100vh - 12rem);
}

.chat-room {
    display: flex;
    flex-direction: column;
    min-height: 32rem;
    max-height: calc(100vh - 10rem);
    padding: 0;
    overflow: hidden;
}

.chat-room-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-muted);
}

.chat-room-astrologer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.chat-room-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-border);
}

.chat-room-name {
    font-size: 1rem;
    font-weight: 600;
}

.chat-room-status {
    font-size: 0.75rem;
    color: var(--color-muted-foreground);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.chat-online-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #22c55e;
}

.chat-room-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.chat-minutes-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    background: var(--color-accent);
    color: var(--color-primary);
}

.chat-end-btn {
    border: 1px solid var(--color-border);
    background: var(--color-card);
    color: var(--color-muted-foreground);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.5rem 0.875rem;
    border-radius: 9999px;
    cursor: pointer;
    font-family: inherit;
}

.chat-end-btn:hover {
    color: var(--color-foreground);
    border-color: var(--color-primary);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    background: var(--color-background);
}

.chat-message {
    display: flex;
}

.chat-message-user {
    justify-content: flex-end;
}

.chat-message-astrologer {
    justify-content: flex-start;
}

.chat-bubble {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.chat-message-user .chat-bubble {
    background: var(--color-primary);
    color: #fff;
    border-bottom-right-radius: 0.25rem;
}

.chat-message-astrologer .chat-bubble {
    background: var(--color-card);
    color: var(--color-foreground);
    border: 1px solid var(--color-border);
    border-bottom-left-radius: 0.25rem;
}

.chat-time {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.6875rem;
    opacity: 0.7;
}

.chat-input-bar {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--color-border);
    background: var(--color-card);
}

.chat-input-bar input {
    flex: 1;
    border: 1px solid var(--color-border);
    border-radius: 9999px;
    background: var(--color-background);
    color: var(--color-foreground);
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    font-family: inherit;
}

.chat-input-bar input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.chat-input-bar button {
    border: none;
    border-radius: 9999px;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    font-family: inherit;
}

.chat-input-bar button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-expired-note {
    padding: 0 1.25rem 1rem;
    font-size: 0.875rem;
    color: var(--color-muted-foreground);
    text-align: center;
}

@media (max-width: 639px) {
    .account-orders-table thead {
        display: none;
    }

    .account-orders-table tr {
        display: block;
        padding: 1rem 0;
        border-bottom: 1px solid var(--color-border);
    }

    .account-orders-table td {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        padding: 0.375rem 0;
        border: none;
    }

    .account-orders-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--color-muted-foreground);
        flex-shrink: 0;
    }
}

/* ═══════════════════════════════════════════════════════════
   Responsive layout system (frontend)
   Ensures pages work on mobile/tablet without relying only on Tailwind build
   ═══════════════════════════════════════════════════════════ */

html {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
    max-width: 100vw;
}

img, video, svg {
    max-width: 100%;
    height: auto;
}

/* Containers */
.max-w-7xl {
    max-width: 80rem;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.max-w-6xl { max-width: 72rem; width: 100%; margin-left: auto; margin-right: auto; }
.max-w-4xl { max-width: 56rem; width: 100%; margin-left: auto; margin-right: auto; }
.max-w-3xl { max-width: 48rem; width: 100%; margin-left: auto; margin-right: auto; }
.max-w-md { max-width: 28rem; width: 100%; margin-left: auto; margin-right: auto; }
.max-w-xl { max-width: 36rem; width: 100%; margin-left: auto; margin-right: auto; }

.mx-auto { margin-left: auto; margin-right: auto; }
.w-full { width: 100%; }
.min-w-0 { min-width: 0; }
.shrink-0 { flex-shrink: 0; }

/* Flex */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.inline-block { display: inline-block; }
.block { display: block; }
.hidden { display: none; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }

.min-h-screen { min-height: 100vh; }

/* Grid */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.col-span-full { grid-column: 1 / -1; }

/* Spacing */
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.pt-4 { padding-top: 1rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-8 { padding: 2rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-10 { margin-top: 2.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }

.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-8 > * + * { margin-top: 2rem; }
.space-y-12 > * + * { margin-top: 3rem; }

/* Typography */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.leading-relaxed { line-height: 1.625; }
.tracking-wider { letter-spacing: 0.05em; }
.uppercase { text-transform: uppercase; }
.antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* Sizing */
.w-6 { width: 1.5rem; }
.h-6 { height: 1.5rem; }
.w-10 { width: 2.5rem; }
.h-10 { height: 2.5rem; }
.w-12 { width: 3rem; }
.h-12 { height: 3rem; }
.w-24 { width: 6rem; }
.h-24 { height: 6rem; }
.w-32 { width: 8rem; }
.h-32 { height: 8rem; }
.w-56 { width: 14rem; }
.h-56 { height: 14rem; }
.w-fit { width: fit-content; }

/* Radius & overflow */
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.object-cover { object-fit: cover; }

/* Opacity backgrounds */
.bg-secondary\/30,
.bg-secondary\/30 {
    background-color: color-mix(in srgb, var(--color-secondary) 30%, transparent);
}

.bg-muted\/30 {
    background-color: color-mix(in srgb, var(--color-muted) 30%, transparent);
}

.text-white\/70 { color: rgba(255, 255, 255, 0.7); }
.text-white\/80 { color: rgba(255, 255, 255, 0.8); }

.sticky { position: sticky; }
.top-24 { top: 6rem; }

/* Breakpoints */
@media (min-width: 640px) {
    .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
    .sm\:flex-row { flex-direction: row; }
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
    .md\:py-24 { padding-top: 6rem; padding-bottom: 6rem; }
    .md\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .md\:flex-row { flex-direction: row; }
}

@media (min-width: 1024px) {
    .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
    .lg\:block { display: block; }
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .lg\:col-span-1 { grid-column: span 1 / span 1; }
    .lg\:gap-12 { gap: 3rem; }
}

/* Header mobile */
@media (max-width: 639px) {
    .site-brand span {
        max-width: 7rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .site-header-actions {
        gap: 0.375rem;
    }

    .site-header-signin { display: none !important; }
}

/* Hero cosmic mobile */
@media (max-width: 767px) {
    .hero-orbit-line,
    .hero-nebula { display: none; }

    .hero-cosmic {
        padding: 2rem 0 2.5rem;
        margin-top: -4rem;
        padding-top: calc(2rem + 4rem);
    }

    .hero-glass-panel {
        padding: 1.25rem;
        border-radius: 1rem;
    }

    .hero-cosmic-title {
        font-size: 1.75rem;
    }

    .hero-panchang-item {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 0;
    }

    .hero-cosmic-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-cosmic-actions .btn-primary,
    .hero-cosmic-actions .btn-outline {
        width: 100%;
        justify-content: center;
    }

    .hero-zodiac-wheel {
        width: min(100%, 18rem);
        margin-top: 0.5rem;
    }
}

/* Banner & sections mobile */
@media (max-width: 639px) {
    .banner-panchang-title { font-size: 1.25rem; }
    .banner-panchang-body { grid-template-columns: 1fr; }
    .banner-panchang-stat-wide { grid-column: span 1; }

    .section-heading h2 {
        font-size: 1.5rem;
    }

    /* Home astrologer grid: 1 column on very small phones */
    #astrologers .grid-cols-2 {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 480px) and (max-width: 639px) {
    #astrologers .grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Astrologer listing cards */
@media (max-width: 639px) {
    .page-content .card.flex.flex-col {
        align-items: center;
        text-align: center;
    }
}

/* Astrologer profile sticky sidebar */
@media (max-width: 1023px) {
    .page-content .sticky.top-24 {
        position: static;
    }
}

/* Chat room mobile */
@media (max-width: 639px) {
    .chat-room-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .chat-room-meta {
        width: 100%;
        justify-content: space-between;
    }

    .chat-room {
        min-height: calc(100vh - 8rem);
        max-height: none;
        border-radius: 1rem;
    }

    .chat-bubble { max-width: 92%; }

    .chat-input-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .chat-input-bar button {
        width: 100%;
    }
}

/* Account pages mobile */
@media (max-width: 1023px) {
    .account-sidebar {
        position: static;
    }

    .account-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .account-nav-link {
        flex: 1 1 auto;
        justify-content: center;
        min-width: fit-content;
    }

    .account-nav-logout {
        width: 100%;
        border-top: none;
        padding-top: 0;
    }
}

/* Multi-column grids collapse on tablet/mobile */
@media (max-width: 1023px) {
    .grid.lg\:grid-cols-2,
    .grid.lg\:grid-cols-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .grid.md\:grid-cols-2,
    .grid.md\:grid-cols-3,
    .grid.md\:grid-cols-4 {
        grid-template-columns: 1fr;
    }
}

/* Astrologers listing page */
.astrologers-page {
    padding-bottom: 3rem;
}

.astrologers-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.25rem;
}

.astrologers-sort-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.astrologers-sort-form label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-muted-foreground);
}

.astrologers-sort-form select {
    border: 1px solid var(--color-border);
    background: var(--color-background);
    color: var(--color-foreground);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.astrologers-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.astrologers-filter-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    background: var(--color-muted);
    color: var(--color-muted-foreground);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.astrologers-filter-btn:hover {
    color: var(--color-foreground);
}

.astrologers-filter-btn.is-active {
    background: var(--color-primary);
    color: var(--color-primary-foreground);
}

.astrologers-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .astrologers-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.25rem;
    }
}

@media (min-width: 1024px) {
    .astrologers-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.5rem;
    }
}

.astrologer-card {
    display: flex;
    flex-direction: column;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: var(--md-elevation-1);
    transition: box-shadow 0.2s;
}

.astrologer-card:hover {
    box-shadow: var(--md-elevation-2);
}

.astrologer-card-link {
    display: block;
    flex: 1;
    text-decoration: none;
    color: inherit;
}

.astrologer-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.astrologer-card-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.astrologer-card-avatar {
    width: 4rem;
    height: 4rem;
    border-radius: 9999px;
    object-fit: cover;
    border: 2px solid var(--color-primary);
    display: block;
}

.astrologer-card-online {
    position: absolute;
    right: -0.15rem;
    bottom: -0.15rem;
    background: #22c55e;
    color: #fff;
    font-size: 0.625rem;
    font-weight: 600;
    line-height: 1;
    padding: 0.2rem 0.4rem;
    border-radius: 9999px;
}

.astrologer-card-meta {
    min-width: 0;
    flex: 1;
}

.astrologer-card-name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--color-foreground);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.astrologer-card-link:hover .astrologer-card-name {
    color: var(--color-primary);
}

.astrologer-card-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #f59e0b;
}

.astrologer-card-star {
    color: #f59e0b;
}

.astrologer-card-specialties {
    margin: 0.25rem 0 0;
    font-size: 0.75rem;
    color: var(--color-muted-foreground);
    line-height: 1.4;
}

.astrologer-card-detail {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    margin: 0 0 0.5rem;
    font-size: 0.75rem;
    color: var(--color-muted-foreground);
    line-height: 1.4;
}

.astrologer-card-detail svg {
    width: 0.875rem;
    height: 0.875rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.astrologer-card-rate {
    margin: 0 0 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-foreground);
}

.astrologer-card-chat-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    width: 100%;
    margin-top: auto;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    background: #6b2fa0;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s;
}

.astrologer-card-chat-btn:hover {
    background: #5a2790;
    color: #fff;
}

.astrologer-card-chat-btn svg {
    width: 1rem;
    height: 1rem;
}

.astrologers-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--color-muted-foreground);
}

.astrologers-load-more {
    text-align: center;
    margin-top: 2.5rem;
}

.astrologers-load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    background: var(--color-background);
    color: var(--color-foreground);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
}

.astrologers-load-more-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.astrologers-load-more-btn:hover {
    background: var(--color-muted);
}

/* Custom recharge banner */
.custom-recharge-banner {
    position: relative;
    overflow: hidden;
    margin-bottom: 3rem;
    padding: 1.5rem;
    border: 1px solid color-mix(in oklab, var(--color-primary) 30%, transparent);
    border-radius: 1rem;
    background: linear-gradient(135deg, color-mix(in oklab, var(--color-primary) 10%, transparent), var(--color-background), color-mix(in oklab, var(--color-primary) 5%, transparent));
    box-shadow: var(--md-elevation-1);
}

@media (min-width: 768px) {
    .custom-recharge-banner {
        padding: 2rem;
    }
}

.custom-recharge-banner-head {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
    .custom-recharge-banner-head {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }
}

.custom-recharge-badge {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background: var(--color-primary);
    color: var(--color-primary-foreground);
    font-size: 0.75rem;
    font-weight: 500;
}

.custom-recharge-title {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-foreground);
}

@media (min-width: 768px) {
    .custom-recharge-title {
        font-size: 1.875rem;
    }
}

.custom-recharge-subtitle {
    margin: 0;
    max-width: 36rem;
    font-size: 0.875rem;
    color: var(--color-muted-foreground);
}

.custom-recharge-summary {
    font-size: 0.875rem;
    color: var(--color-muted-foreground);
    white-space: nowrap;
}

.custom-recharge-summary strong {
    color: var(--color-primary);
    font-size: 1.125rem;
}

.custom-recharge-summary-sep {
    margin: 0 0.35rem;
}

.custom-recharge-input-wrap {
    display: flex;
    flex-direction: column;
}

.custom-recharge-input-wrap label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-foreground);
}

.custom-recharge-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    background: var(--color-background);
    color: var(--color-foreground);
    font-size: 0.9375rem;
    font-weight: 600;
}

.custom-recharge-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px color-mix(in oklab, var(--color-primary) 20%, transparent);
}

.custom-recharge-error {
    margin: 0.375rem 0 0;
    font-size: 0.75rem;
    color: #ef4444;
}

.custom-recharge-presets {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid color-mix(in oklab, var(--color-border) 70%, transparent);
    overflow-x: auto;
    padding-bottom: 0.15rem;
}

.custom-recharge-preset-btn {
    flex: 1 1 0;
    min-width: 3.5rem;
    padding: 0.4rem 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    background: var(--color-card);
    color: var(--color-foreground);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    white-space: nowrap;
}

@media (min-width: 640px) {
    .custom-recharge-preset-btn {
        padding: 0.45rem 0.75rem;
        font-size: 0.8125rem;
    }
}

.custom-recharge-preset-btn:hover {
    border-color: color-mix(in oklab, var(--color-primary) 50%, transparent);
}

.custom-recharge-preset-btn.is-active {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: var(--color-primary-foreground);
    box-shadow: 0 0 0 2px color-mix(in oklab, var(--color-primary) 25%, transparent);
}

.custom-recharge-form-row {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    background: color-mix(in oklab, var(--color-background) 80%, transparent);
}

@media (min-width: 768px) {
    .custom-recharge-form-row {
        grid-template-columns: 1fr auto;
        align-items: end;
        padding: 1.25rem;
    }
}

.custom-recharge-action {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .custom-recharge-action {
        min-width: 200px;
    }
}

.custom-recharge-submit {
    width: 100%;
    justify-content: center;
    text-align: center;
}

.custom-recharge-submit.is-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.custom-recharge-note {
    margin: 0;
    font-size: 0.75rem;
    text-align: center;
    color: var(--color-muted-foreground);
}

@media (max-width: 767px) {
    footer .flex-col {
        text-align: center;
    }
}
