/* ===== CSS VARIABLES ===== */
:root {
    --transition: 0.35s cubic-bezier(.4,0,.2,1);
}

[data-theme="dark"] {
    --bg-primary: #121212;
    --bg-secondary: rgba(255,255,255,0.06);
    --bg-tertiary: rgba(255,255,255,0.04);
    --bg-card: rgba(255,255,255,0.06);
    --bg-card-hover: rgba(255,255,255,0.1);
    --bg-glass: rgba(255,255,255,0.06);
    --bg-input: rgba(255,255,255,0.08);
    --text-primary: #f0f0f0;
    --text-secondary: #bbb;
    --text-muted: #999;
    font-weight: 500;
    --accent: #d4953a;
    --accent-glow: rgba(212,149,58,0.12);
    --accent-border: rgba(224,168,76,0.35);
    --accent-gradient: linear-gradient(135deg, #d4953a, #c4803a);
    --gold: #d4953a;
    --gold-glow: rgba(212,149,58,0.15);
    --border: rgba(255,255,255,0.1);
    --border-accent: rgba(224,168,76,0.35);
    --shadow: 0 8px 32px rgba(0,0,0,0.4);
    --shadow-accent: 0 4px 20px rgba(212,149,58,0.15);
    --success: #4caf50;
    --danger: #ef5350;
    --warning: #ffb74d;
    --info: #42a5f5;
    --badge-bg: rgba(212,149,58,0.12);
    --badge-text: #d4953a;
    --table-stripe: rgba(255,255,255,0.03);
    --scrollbar-track: #1a1a1a;
    --scrollbar-thumb: #444;
    --glass-inner-glow: inset 0 1px 0 rgba(255,255,255,0.08);
    --bg-page: linear-gradient(160deg, #121212 0%, #1a1a2e 40%, #1e0a30 70%, #16213e 100%);
}

[data-theme="light"] {
    --bg-primary: #FFF8E1;
    --bg-secondary: rgba(255,243,210,0.5);
    --bg-tertiary: rgba(255,238,195,0.4);
    --bg-card: rgba(255,243,210,0.55);
    --bg-card-hover: rgba(255,243,210,0.7);
    --bg-glass: rgba(255,243,210,0.55);
    --bg-input: rgba(255,238,195,0.5);
    --text-primary: #111111;
    --text-secondary: #222222;
    --text-muted: #3d3d3d;
    --accent: #C8943E;
    --accent-glow: rgba(200,148,62,0.12);
    --accent-border: rgba(200,148,62,0.4);
    --accent-gradient: linear-gradient(135deg, #C8943E, #D4A053);
    --gold: #C8943E;
    --gold-glow: rgba(200,148,62,0.12);
    --border: rgba(80,40,10,0.15);
    --border-accent: rgba(200,148,62,0.4);
    --shadow: 0 8px 32px rgba(0,0,0,0.1);
    --shadow-accent: 0 4px 20px rgba(200,148,62,0.15);
    --success: #1B5E20;
    --danger: #B71C1C;
    --warning: #BF360C;
    --info: #0D47A1;
    --badge-bg: rgba(200,148,62,0.12);
    --badge-text: #C8943E;
    --table-stripe: rgba(80,40,10,0.04);
    --scrollbar-track: #FFF3E0;
    --scrollbar-thumb: #D4A053;
    --glass-inner-glow: inset 0 1px 0 rgba(255,255,255,0.9);
    --bg-page: linear-gradient(135deg, #FFF8E1 0%, #FFE0B2 50%, #FFF3E0 100%);
    font-weight: 500;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg-page, var(--bg-primary));
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background var(--transition), color var(--transition);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media (max-width: 768px) {
    body {
        font-weight: 600;
        -webkit-text-stroke: 0.3px;
    }
    [data-theme="dark"] body,
    :root:not([data-theme="light"]) body {
        --text-primary: #f8f8f8;
        --text-secondary: #ddd;
        --text-muted: #aaa;
    }
    [data-theme="light"] body {
        --text-primary: #0a0a0a;
        --text-secondary: #1a1a1a;
        --text-muted: #333;
    }
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 3px;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: opacity var(--transition);
}

a:hover {
    opacity: 0.8;
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 1000;
    transition: background var(--transition);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-brand-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-primary);
}

.nav-logo {
    height: 32px;
    width: auto;
}

.nav-brand {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-user-name {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-logout {
    font-size: 12px;
    color: var(--text-muted);
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: all var(--transition);
}

.nav-logout:hover {
    border-color: var(--danger);
    color: var(--danger);
    opacity: 1;
}

/* ===== LOGO SWITCHING ===== */
[data-theme="dark"] .logo-light {
    display: none;
}

[data-theme="dark"] .logo-dark {
    display: inline-block;
}

[data-theme="light"] .logo-dark {
    display: none;
}

[data-theme="light"] .logo-light {
    display: inline-block;
}

/* ===== THEME TOGGLE ===== */
.theme-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--accent-border);
    background: transparent;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all var(--transition);
}

.theme-btn:hover {
    background: var(--accent-glow);
    box-shadow: var(--shadow-accent);
}

/* Floating theme toggle for pages without navbar */
.theme-btn-float {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 1000;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--accent-border);
    background: var(--bg-secondary);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: opacity 0.3s, transform 0.3s;
    transition: all var(--transition);
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.theme-btn-float:hover {
    background: var(--accent-glow);
    transform: scale(1.1);
}

/* ===== MOBILE HAMBURGER ===== */
.mobile-hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 6px;
    border: none;
    background: none;
}

.mobile-hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition);
}

.mobile-only {
    display: none;
}

.desktop-only {
    display: flex;
}

/* ===== MOBILE DRAWER ===== */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}

.drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}

.drawer-panel {
    position: absolute;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background: var(--bg-primary);
    border-left: 1px solid var(--border);
    padding: 0;
    transition: right var(--transition);
    overflow-y: auto;
}

.drawer-overlay.open .drawer-panel {
    right: 0;
}

.drawer-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
    color: #fff;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drawer-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.drawer-header.deity-bg {
    margin: 0 !important;
    padding: 16px !important;
    padding-top: 20px !important;
    border-bottom: none;
    border-radius: 0 !important;
    min-height: 180px;
}

.drawer-header h3 {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.drawer-header p {
    font-size: 12px;
    color: var(--text-muted);
}

.drawer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
}

.drawer-links a {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
}

.drawer-links a:hover,
.drawer-links a.active {
    background: var(--accent-glow);
    color: var(--accent);
    opacity: 1;
}

/* View As Bottom Sheet */
/* ========== VIEW AS SLIDE-IN PANEL ========== */
.viewas-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 10000;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    transition: opacity 0.3s;
    opacity: 0;
}
.viewas-backdrop.open { display: block; opacity: 1; }

.viewas-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100%;
    background: var(--bg-primary);
    border-left: 1px solid var(--accent-border);
    box-shadow: -8px 0 40px rgba(0,0,0,0.35);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.viewas-panel.open { transform: translateX(0); }

.viewas-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--border);
}
.viewas-panel-title {
    font-size: 16px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.viewas-panel-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.viewas-panel-close:hover { background: var(--accent-glow); color: var(--accent); border-color: var(--accent-border); }

.viewas-search {
    margin: 14px 16px 10px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}
.viewas-search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.viewas-search::placeholder { color: var(--text-muted); }

.viewas-tabs {
    display: flex;
    gap: 6px;
    padding: 4px 16px 14px;
}
.viewas-tab {
    flex: 1;
    padding: 10px 8px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.viewas-tab:hover { border-color: var(--accent-border); color: var(--text-secondary); }
.viewas-tab.active {
    background: var(--accent-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 8px var(--accent-glow);
}
.viewas-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    background: rgba(255,255,255,0.18);
}
.viewas-tab:not(.active) .viewas-tab-count {
    background: transparent;
    border: 1.5px solid var(--text-muted);
    color: var(--text-muted);
}

.viewas-list {
    overflow-y: auto;
    padding: 0 10px 16px;
    flex: 1;
}
.viewas-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    font-size: 13px;
    transition: all 0.15s;
}
.viewas-item:hover {
    background: var(--accent-glow);
}
.viewas-item:hover .viewas-item-name { color: var(--accent); }
.viewas-item:hover .viewas-arrow { color: var(--accent); transform: translateX(2px); }

.viewas-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent-glow);
    border: 1px solid var(--accent-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    flex-shrink: 0;
}
.viewas-avatar-img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--accent-border);
    object-fit: cover;
    flex-shrink: 0;
}
.viewas-item-info { flex: 1; min-width: 0; }
.viewas-item-name { font-size: 13px; font-weight: 500; transition: color 0.15s; }
.viewas-item-sub { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.viewas-arrow { font-size: 16px; color: var(--text-muted); transition: all 0.15s; flex-shrink: 0; }

.viewas-empty {
    text-align: center;
    padding: 32px 16px;
    font-size: 13px;
    color: var(--text-muted);
}
.viewas-more {
    text-align: center;
    padding: 10px;
    font-size: 11px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    margin: 4px 8px 0;
}

/* View As trigger button in sidebar */
.viewas-trigger-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: calc(100% - 16px);
    margin: 4px 8px;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid var(--accent-border);
    background: var(--accent-glow);
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}
.viewas-trigger-btn:hover {
    background: var(--accent-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 16px var(--accent-glow);
}

/* Mobile responsive */
@media (max-width: 600px) {
    .viewas-panel {
        width: 100%;
        border-left: none;
        border-radius: 0;
    }
}
@media (min-width: 601px) and (max-width: 900px) {
    .viewas-panel { width: 360px; }
}

.drawer-footer {
    margin-top: 24px;
    padding: 16px;
    border-top: 1px solid var(--border);
}

/* ===== FLASH MESSAGES ===== */
.flash-messages {
    position: fixed;
    top: 56px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1500;
    width: 90%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.flash {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.flash-success {
    background: rgba(76,175,80,0.15);
    border-color: rgba(76,175,80,0.3);
    color: var(--success);
}

.flash-error {
    background: rgba(239,83,80,0.15);
    border-color: rgba(239,83,80,0.3);
    color: var(--danger);
}

.flash-warning {
    background: rgba(255,183,77,0.15);
    border-color: rgba(255,183,77,0.3);
    color: var(--warning);
}

.flash-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    opacity: 0.7;
}

.flash-close:hover {
    opacity: 1;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    padding-top: 66px;
    padding-bottom: 0;
    flex: 1;
}

.main-content.no-navbar {
    padding-top: 10px;
}

/* ===== TEMPLE HEADER ===== */
.temple-header {
    text-align: center;
    padding: 12px 16px 16px;
}

.temple-logo {
    width: 90px;
    height: 90px;
    object-fit: contain;
    margin-bottom: 12px;
    animation: logo-glow 3s ease-in-out infinite;
    filter: drop-shadow(0 0 8px var(--accent));
}
.coupon-card .temple-logo {
    width: 44px !important;
    height: 44px !important;
    margin-bottom: 0 !important;
}
.coupon-card .temple-header {
    padding: 0 !important;
}

@keyframes logo-glow {
    0%, 100% {
        filter: drop-shadow(0 0 6px var(--accent)) drop-shadow(0 0 12px transparent);
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 0 14px var(--accent)) drop-shadow(0 0 28px var(--accent-glow));
        transform: scale(1.04);
    }
}


.temple-header h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.temple-header h1.welcome-heading {
    font-size: 22px;
    color: var(--accent);
    font-weight: 700;
}

.temple-header h1 span {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--accent);
    margin-top: 4px;
}

.temple-header h1.welcome-heading span {
    display: inline;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    margin-top: 0;
}


.founder {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
    font-style: normal;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 16px;
}

.container-wide {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px;
}

.container-full {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ===== LANDING PAGE LAYOUT ===== */
.landing-page {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 0;
    padding-bottom: 24px;
    box-sizing: border-box;
    margin-top: -24px;
}

.landing-page .temple-logo {
    width: 180px;
    height: 180px;
    margin-bottom: 14px;
}

/* ===== LANDING SUBTITLE ===== */
.landing-subtitle {
    text-align: center;
    font-size: 21px;
    font-weight: 700;
    color: var(--accent);
    margin-top: 6px;
}

.landing-desc {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
}

.landing-card-icon {
    font-size: 33px;
    margin-bottom: 4px;
}

/* ===== LANDING CARDS ===== */
.landing-cards {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 20px;
}

.landing-cards .landing-card {
    flex: 1;
    max-width: 260px;
}

.landing-cards-single {
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.landing-cards-single .landing-card {
    max-width: 280px;
    padding: 24px 20px 20px;
}

.landing-cards-single .landing-card-icon {
    font-size: 32px;
    margin-bottom: 2px;
}

.landing-cards-single .landing-card h3 {
    font-size: 14px;
}

.landing-cards-single .landing-card p {
    font-size: 11px;
}

.landing-card {
    background: var(--bg-glass);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px 16px 22px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow), var(--glass-inner-glow, inset 0 1px 0 rgba(255,255,255,0.08));
}

.landing-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 20%;
    right: 20%;
    height: 3px;
    background: var(--accent);
    border-radius: 0 0 4px 4px;
    opacity: 0.6;
    transition: all 0.3s;
}

.landing-card::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
}

.landing-card:hover {
    border-color: var(--accent-border);
    box-shadow: var(--shadow-accent), var(--glass-inner-glow, inset 0 1px 0 rgba(255,255,255,0.08));
    transform: translateY(-4px);
}

.landing-card:hover::before {
    left: 10%;
    right: 10%;
    opacity: 1;
}

.landing-card-icon {
    font-size: 40px;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 4px 12px var(--accent-glow));
}

.landing-card h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent);
    position: relative;
    z-index: 1;
}

.landing-card p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

/* Team Login glass button */
.team-login-glass {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text-muted);
    font-size: 14px;
    font-family: inherit;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
    letter-spacing: 0.5px;
    box-shadow: var(--glass-inner-glow, inset 0 1px 0 rgba(255,255,255,0.08));
}
.team-login-glass:hover {
    border-color: var(--accent-border);
    color: var(--accent);
    box-shadow: var(--shadow-accent);
    transform: translateY(-2px);
}

/* ===== FORM STYLES ===== */
.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px 22px;
    margin-top: 16px;
    box-shadow: var(--shadow);
}

.form-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.form-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    transition: all var(--transition);
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--accent-border);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b8299' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.form-chip {
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    user-select: none;
}

.form-chip:hover {
    border-color: var(--accent-border);
}

.form-chip.selected {
    background: var(--accent-glow);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
}

/* ===== MOBILE COUNTER ===== */
.mobile-counter {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    pointer-events: none;
    transition: color var(--transition);
}

.mobile-counter.valid {
    color: var(--success);
}

.mobile-counter.invalid {
    color: var(--danger);
}

.mobile-input {
    padding-right: 50px;
}

/* ===== TOGGLE LIST / ROW / GRID ===== */
.toggle-row {
    display: flex;
    gap: 8px;
}

.toggle-row .toggle-item {
    flex: 1;
}

.toggle-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.toggle-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.toggle-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    overflow: hidden;
}

.toggle-item:hover {
    border-color: var(--accent-border);
}

.toggle-item.selected {
    background: var(--accent-glow);
    border-color: var(--accent);
}

.toggle-dot {
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    border-radius: 50%;
    border: 2px solid var(--border);
    transition: all var(--transition);
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.toggle-item.selected .toggle-dot {
    border-color: var(--accent);
    background: var(--accent);
}

.toggle-item.selected .toggle-dot::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
}

.toggle-check {
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    border-radius: 4px;
    border: 2px solid var(--border);
    transition: all var(--transition);
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: transparent;
}

.toggle-item.selected .toggle-check {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.toggle-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition);
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline;
}

.toggle-item.selected .toggle-label {
    color: var(--accent);
    font-weight: 600;
}

@media (max-width: 480px) {
    .toggle-item {
        padding: 10px 10px;
        gap: 6px;
    }

    .toggle-label {
        font-size: 11px;
    }

    .toggle-row .toggle-item {
        padding: 10px 8px;
    }
}

/* ===== INTEREST GRID ===== */
.interest-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 8px;
}

.interest-card {
    display: block;
    cursor: pointer;
}

.interest-card input[type="checkbox"] {
    display: none;
}

.interest-card-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    transition: all var(--transition);
    min-height: 48px;
}

.interest-card:hover .interest-card-inner {
    border-color: var(--accent-border);
    color: var(--text-primary);
}

.interest-card.selected .interest-card-inner {
    background: var(--accent-glow);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
    box-shadow: 0 0 0 2px var(--accent-glow);
}

@media (min-width: 480px) {
    .interest-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-gradient);
    background-size: 200% 100%;
    color: #0d1b2a;
    box-shadow: var(--shadow-accent);
    animation: shimmer 3s ease infinite;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(0,220,240,0.3);
    opacity: 1;
}

@keyframes shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

[data-theme="light"] .btn-primary {
    background: var(--accent);
    animation: none;
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--accent-border);
    color: var(--accent);
}

.btn-outline:hover {
    background: var(--accent-glow);
    opacity: 1;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 16px;
}

.btn-ghost:hover {
    color: var(--accent);
    background: var(--accent-glow);
    opacity: 1;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-sm {
    padding: 7px 14px;
    font-size: 12px;
    border-radius: 8px;
}

.btn-danger {
    background: rgba(239,83,80,0.15);
    border: 1px solid rgba(239,83,80,0.3);
    color: var(--danger);
}

.btn-danger:hover {
    background: rgba(239,83,80,0.25);
    opacity: 1;
}

.btn-success {
    background: rgba(76,175,80,0.15);
    border: 1px solid rgba(76,175,80,0.3);
    color: var(--success);
}

.btn-success:hover {
    background: rgba(76,175,80,0.25);
    opacity: 1;
}

/* ===== LOGIN CARD ===== */
.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow);
    max-width: 380px;
    margin: 24px auto;
}

.login-card h2 {
    font-size: 20px;
    margin-bottom: 6px;
}

.login-card p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 12px;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.google-btn:hover {
    border-color: var(--accent-border);
    background: var(--bg-card-hover);
    opacity: 1;
}

.google-btn svg {
    width: 18px;
    height: 18px;
}

/* ===== COUPON ===== */
.coupon-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 4px 20px 24px;
    margin-top: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.coupon-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
}

.coupon-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: var(--badge-bg);
    color: var(--badge-text);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.qr-placeholder,
.qr-image {
    width: 200px;
    height: 200px;
    margin: 12px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: transparent;
    border: none;
}

.qr-image img, .qr-image canvas {
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

.coupon-name {
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    margin: 10px 0 4px;
}

.coupon-detail {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    margin: 3px 0;
}

.coupon-date {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 3px;
}

.coupon-family {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
    padding: 10px;
    background: var(--bg-input);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Prasadam coupon box */
.prasadam-box {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 14px;
    text-align: center;
    margin-top: 10px;
}
.prasadam-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.prasadam-count {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 0;
}
.prasadam-number {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--accent-glow);
    border: 1px solid var(--accent-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
    flex-shrink: 0;
}
.prasadam-label {
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}
.prasadam-sublabel {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
}
.prasadam-breakdown {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    margin-top: 10px;
}
.prasadam-breakdown-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-muted);
}
.prasadam-breakdown-icon {
    font-size: 14px;
}
.prasadam-instruction {
    margin-top: 12px;
    padding: 8px 12px;
    background: var(--accent-glow);
    border: 1px solid var(--accent-border);
    border-radius: 8px;
    font-size: 11px;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* ===== DASHBOARD ===== */
.dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.dash-header h1 {
    font-size: 20px;
    font-weight: 700;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: var(--badge-bg);
    color: var(--badge-text);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 16px;
    text-align: center;
    transition: all var(--transition);
}

.stat-card:hover {
    border-color: var(--accent-border);
    box-shadow: var(--shadow-accent);
}

.stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
    font-weight: 600;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
}

.stat-trend {
    font-size: 11px;
    margin-top: 4px;
    font-weight: 500;
}

.stat-trend.up {
    color: var(--success);
}

.stat-trend.down {
    color: var(--danger);
}

/* ===== TABLES ===== */
.table-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 12px;
}

.table-header h3 {
    font-size: 15px;
    font-weight: 600;
}

.table-search {
    padding: 8px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    outline: none;
    min-width: 180px;
    transition: border-color var(--transition);
}

.table-search:focus {
    border-color: var(--accent-border);
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

tbody tr:nth-child(even) {
    background: var(--table-stripe);
}

tbody tr:hover {
    background: var(--bg-card-hover);
}

tbody td {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.status-badge.active,
.status-badge.success {
    background: rgba(76,175,80,0.12);
    color: var(--success);
}

.status-badge.pending,
.status-badge.warning {
    background: rgba(255,183,77,0.12);
    color: var(--warning);
}

.status-badge.inactive,
.status-badge.danger {
    background: rgba(239,83,80,0.12);
    color: var(--danger);
}

.status-badge.info {
    background: rgba(66,165,245,0.12);
    color: var(--info);
}

.action-btn {
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition);
    font-family: 'DM Sans', sans-serif;
}

.action-btn:hover {
    border-color: var(--accent-border);
    color: var(--accent);
    background: var(--accent-glow);
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
    overflow-x: auto;
}

.tab {
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    font-family: 'DM Sans', sans-serif;
}

.tab:hover {
    color: var(--text-primary);
}

.tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    font-weight: 600;
}

/* ===== SCANNER ===== */
#qr-reader {
    border-radius: 16px;
    overflow: hidden;
    margin: 16px auto;
    max-width: 320px;
    border: 2px solid var(--border);
}

#qr-reader video {
    border-radius: 14px;
}

.scanner-text {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin: 12px 0;
}

.scan-result {
    display: none;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
    margin-top: 16px;
    animation: slideDown 0.3s ease;
}

.scan-result h3 {
    font-size: 16px;
    margin: 8px 0;
}

.scan-result-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 12px;
    color: var(--success);
}

.scan-result-detail {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 4px 0;
}

/* Scanner tabs & manual check-in */
.scanner-tab {
    flex: 1;
    padding: 10px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
}
.scanner-tab.active {
    background: var(--accent-glow);
    color: var(--accent);
    border-color: var(--accent);
}
.manual-guest-card {
    padding: 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 10px;
    transition: border-color 0.15s;
}
.manual-guest-card:hover {
    border-color: var(--accent-border);
}
.manual-guest-card.already-checked {
    opacity: 0.7;
}

/* ===== TIMELINE ===== */
.timeline {
    position: relative;
    padding-left: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: var(--border);
    border-radius: 1px;
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
    padding-left: 12px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -21px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg-primary);
}

.timeline-item h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.timeline-item p {
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== GLASS CARD ===== */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow);
}

/* ===== GUEST INFO CELLS ===== */
.guest-info-cell {
    padding: 12px 16px;
    text-align: center;
}
.guest-info-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 600;
}
.guest-info-value {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-word;
}

/* ===== TAGS ===== */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    background: var(--badge-bg);
    color: var(--badge-text);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    margin: 2px;
}

/* ===== ASSIGN DROPDOWN ===== */
.assign-dropdown {
    position: relative;
    display: inline-block;
}

.assign-dropdown select {
    padding: 6px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    outline: none;
    cursor: pointer;
    transition: border-color var(--transition);
}

.assign-dropdown select:focus {
    border-color: var(--accent-border);
}

/* ===== CHART PLACEHOLDER ===== */
.chart-placeholder {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 12px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 4px;
    min-height: 180px;
    margin-bottom: 20px;
}

.chart-bar {
    width: 100%;
    max-width: 28px;
    background: var(--accent-gradient);
    border-radius: 6px 6px 0 0;
    transition: height var(--transition);
    min-height: 16px;
}

/* ===== SECTION TITLE ===== */
.section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 18px;
    background: var(--accent);
    border-radius: 2px;
    flex-shrink: 0;
}
.section-title[style*="justify-content:center"]::before {
    display: none;
}
.section-title[style*="justify-content:center"] {
    border-bottom-color: var(--accent-border);
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 12px 16px 6px;
    margin-top: 10px;
    margin-bottom: 0;
    border-top: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    animation: footer-glow 4s ease-in-out infinite;
}

@keyframes footer-glow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.footer-line1 {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    background: linear-gradient(135deg, var(--accent), #e0a84c, #ff7eb3, var(--accent));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: footer-shimmer 6s ease infinite;
}

@keyframes footer-shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.footer-line2 {
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.footer-line2 span {
    color: var(--accent);
    font-weight: 500;
}

.footer a {
    color: var(--accent);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* ===== ADMIN FORM GRID ===== */
.admin-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ===== ADMIN SIDEBAR LAYOUT ===== */
.admin-layout {
    display: flex;
    gap: 0;
    min-height: calc(100vh - 50px);
}

.admin-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    padding: 0;
    position: sticky;
    top: 50px;
    height: calc(100vh - 50px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 0 16px 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
    text-align: center;
}

.sidebar-header.deity-bg {
    border-bottom: none;
    border-radius: 0;
    margin-bottom: 0;
    padding-top: 20px;
    min-height: 150px;
}

.sidebar-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 8px;
    border: 2px solid var(--accent-border);
}

.sidebar-user {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.sidebar-nav {
    flex: 1;
    padding: 8px 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition);
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.sidebar-link.active {
    background: var(--accent-glow);
    color: var(--accent);
    border-left-color: var(--accent);
    font-weight: 600;
}

.sidebar-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* (View As dropdowns removed — now uses viewas modal) */

.sidebar-footer {
    border-top: 1px solid var(--border);
    padding-top: 8px;
    margin-top: 8px;
}

.admin-main {
    flex: 1;
    min-width: 0;
    padding: 0 20px;
}

/* ===== NAV AVATAR ===== */
.nav-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--accent-border);
}

/* ===== DRAWER AVATAR & DIVIDER ===== */
.drawer-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 2px solid var(--accent-border);
}

.drawer-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 16px;
}

.admin-edit-form {
    padding: 12px 0;
}

.interest-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-input);
    border-radius: 10px;
    border: 1px solid var(--border);
    font-size: 13px;
}

.interest-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: all var(--transition);
    gap: 12px;
}

.interest-row:hover {
    border-color: var(--accent-border);
}

.interest-row-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.interest-row-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.interest-row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .interest-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 10px 14px;
    }

    .interest-row-actions {
        width: 100%;
    }

    .interest-row-actions .btn {
        flex: 1;
    }
}

/* ===== SITE GUIDE ===== */

/* Header card */
.guide-header-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 22px 16px;
    margin-bottom: 16px;
}
.guide-pptx-legend {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 11px;
    color: var(--text-muted);
}
.guide-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Quick navigation TOC */
.guide-toc {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
}
.guide-toc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
@media (min-width: 768px) {
    .guide-toc-grid { grid-template-columns: repeat(3, 1fr); }
}
.guide-toc-grid a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
    min-height: 44px;
}
.guide-toc-grid a:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px var(--accent-glow);
}
.toc-icon { font-size: 16px; flex-shrink: 0; }

/* Section cards */
.guide-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 16px;
    overflow: hidden;
    scroll-margin-top: 80px;
    transition: border-color 0.4s, box-shadow 0.4s;
}
.guide-section.guide-glow {
    border-color: var(--accent);
    box-shadow: 0 0 24px var(--accent-glow), inset 0 0 16px rgba(0,0,0,0.03);
    animation: guideGlowPulse 2s ease-in-out infinite;
}
@keyframes guideGlowPulse {
    0%, 100% { box-shadow: 0 0 20px var(--accent-glow); }
    50% { box-shadow: 0 0 32px var(--accent-glow), inset 0 0 20px rgba(0,0,0,0.04); }
}

/* Section header with icon */
.guide-section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}
.guide-section-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 2px;
}
.guide-section-header p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}
.guide-icon { font-size: 28px; flex-shrink: 0; }

/* Section body */
.guide-section-body {
    padding: 18px 20px;
}

/* Highlight / callout box */
.guide-highlight {
    background: var(--bg-input);
    border-left: 3px solid var(--accent);
    border-radius: 0 8px 8px 0;
    padding: 14px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 14px;
}

/* Info boxes */
.guide-info-box {
    background: var(--bg-input);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 10px;
}
.guide-info-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.guide-info-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 6px;
}
.guide-info-box ul, .guide-info-box ol {
    padding-left: 18px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 6px 0 0;
}
.guide-info-box li strong {
    color: var(--text-primary);
}
.guide-url-tag {
    display: inline-block;
    margin-top: 8px;
    padding: 2px 10px;
    background: var(--accent-glow);
    border: 1px solid var(--accent-border);
    border-radius: 6px;
    font-size: 11px;
    font-family: monospace;
    color: var(--accent);
}

/* Role cards */
.guide-role-card {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 10px;
}
.guide-role-card .guide-role-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.guide-role-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
.badge-admin { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.badge-coord { background: linear-gradient(135deg, #3498db, #2980b9); }
.badge-cult { background: linear-gradient(135deg, #27ae60, #1e8449); }
.badge-scan { background: linear-gradient(135deg, #f39c12, #d68910); }
.guide-role-card .guide-role-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
}
.guide-role-card .guide-role-desc ul {
    padding-left: 18px;
    margin: 6px 0 0;
    line-height: 1.8;
}
.guide-role-login {
    font-size: 11px;
    color: var(--accent);
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

/* Flow steps */
.guide-flow {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.guide-flow-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    padding: 10px 14px;
    background: var(--bg-input);
    border-radius: 10px;
}
.guide-flow-num {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: var(--accent-glow);
    border: 1px solid var(--accent-border);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}
.guide-flow-step strong {
    color: var(--text-primary);
}

/* Key-value table */
.guide-kv-table {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
}
.guide-kv-row {
    display: flex;
    background: var(--bg-input);
    padding: 12px 16px;
    gap: 14px;
}
.guide-kv-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 150px;
    flex-shrink: 0;
}
.guide-kv-value {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

@media (max-width: 600px) {
    .guide-section-header { padding: 14px 16px; gap: 10px; }
    .guide-section-header h3 { font-size: 15px; }
    .guide-icon { font-size: 24px; }
    .guide-section-body { padding: 14px 16px; }
    .guide-kv-row { flex-direction: column; gap: 2px; }
    .guide-kv-label { min-width: auto; }
    .guide-toc-grid { grid-template-columns: repeat(2, 1fr); }
}

@media print {
    .navbar, .admin-sidebar, .theme-btn-float, .btn-outline, .footer, .drawer-overlay, .guide-toc { display: none !important; }
    .admin-layout { display: block !important; }
    .admin-main { padding: 0 !important; }
    .guide-section { break-inside: avoid; border: 1px solid #ddd; }
    .guide-header-card { border: 1px solid #ddd; }
    body { background: #fff !important; color: #111 !important; }
    .guide-section-header h3 { color: #333 !important; }
    .guide-info-title { color: #333 !important; }
}

/* ===== PROGRAM CARD STYLES ===== */
.program-form-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.program-info-card {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 12px;
    background: var(--bg-input);
    border-radius: 12px;
    overflow: hidden;
}

.program-info-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
}

.program-info-row:last-child {
    border-bottom: none;
}

.program-info-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    min-width: 100px;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.program-field {
    flex: 1;
    background: transparent !important;
    border-color: transparent !important;
    padding: 4px 0;
    font-size: 13px;
    color: var(--text-primary);
    resize: none;
}

.program-textarea {
    line-height: 1.5;
}

.program-field:not([readonly]) {
    background: var(--bg-card) !important;
    border-color: var(--accent-border) !important;
    padding: 8px 12px;
    border-radius: 8px;
}

.program-coord-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.program-coord-inline-info {
    display: flex;
    gap: 6px;
    flex: 1;
    flex-wrap: wrap;
}

.program-coord-field {
    min-width: 80px;
}

.program-coord-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-input);
    border-radius: 8px;
    gap: 8px;
}

.program-coord-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-size: 13px;
}

.program-coord-add {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.program-coord-add .form-input {
    flex: 1;
    min-width: 120px;
}

@media (max-width: 480px) {
    .program-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        padding: 8px 14px;
    }

    .program-info-label {
        min-width: auto;
    }

    .program-coord-inline {
        flex-direction: column;
        align-items: flex-start;
    }

    .program-coord-inline-info {
        flex-direction: column;
        width: 100%;
    }

    .program-coord-field {
        width: 100% !important;
        max-width: none !important;
    }

    .program-coord-add {
        flex-direction: column;
    }

    .program-coord-add .form-input {
        width: 100%;
    }

    .program-coord-add .btn {
        width: 100%;
    }
}

/* ===== CSV ACCESS ROWS ===== */
.csv-access-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    gap: 10px;
}

.csv-access-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.csv-access-email {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.csv-access-badge {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.csv-access-badge.admin {
    background: var(--accent-glow);
    border: 1px solid var(--accent-border);
    color: var(--accent);
}

.csv-access-badge.other {
    background: var(--bg-input);
    color: var(--text-muted);
}

/* ===== ACCORDION ===== */
.accordion-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 8px;
    overflow: hidden;
    transition: all var(--transition);
}

.accordion-item:hover {
    border-color: var(--accent-border);
}

.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    cursor: pointer;
    user-select: none;
}

.accordion-title {
    display: block;
    font-size: 14px;
}
.accordion-subtitle {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
    margin-top: 2px;
}
@media (min-width: 769px) {
    .accordion-subtitle { font-size: 13px; }
}

.accordion-arrow {
    font-size: 12px;
    color: var(--text-muted);
    transition: transform 0.3s;
}

.accordion-item.open .accordion-arrow {
    transform: rotate(180deg);
}

.accordion-body {
    display: none;
    padding: 0 18px 16px;
    border-top: 1px solid var(--border);
}

.accordion-item.open .accordion-body {
    display: block;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 14px 0;
}

.detail-item {
    font-size: 13px;
}

.detail-label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.accordion-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

/* Cultivator card styles */
.cult-info-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 10px;
}
.cult-info-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 12px;
}
.cult-capacity-wrap {
    margin: 10px 0;
}
.cult-capacity-bar {
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
}
.cult-capacity-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.3s;
}
.cult-guest-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 12px;
    transition: background 0.15s;
}
.cult-guest-row:hover {
    background: var(--accent-glow);
}
.cult-guest-row + .cult-guest-row {
    border-top: 1px solid var(--border);
}

.accordion-edit {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

/* ===== COLLAPSIBLE ADD FORM ===== */
.add-form-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: var(--bg-card);
    border: 1px dashed var(--accent-border);
    border-radius: 12px;
    cursor: pointer;
    color: var(--accent);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
    margin-bottom: 16px;
    font-family: 'DM Sans', sans-serif;
    width: 100%;
    text-align: left;
}

.add-form-toggle:hover {
    background: var(--accent-glow);
}

.add-form-content {
    display: none;
    margin-bottom: 16px;
}

.add-form-content.open {
    display: block;
}

/* ===== ADMIN SEARCH ===== */
.admin-search {
    margin-bottom: 16px;
}

/* ===== QUICK LINKS GRID ===== */
.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.quick-link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    transition: all var(--transition);
}

.quick-link-btn:hover {
    border-color: var(--accent-border);
    color: var(--accent);
    background: var(--accent-glow);
}

@media (max-width: 600px) {
    .quick-links-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .quick-link-btn {
        padding: 10px 12px;
        font-size: 12px;
    }
}

/* ===== INTEREST ADD ROW FIX ===== */
.interest-add-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 600px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) {
    .admin-form-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .mobile-hamburger {
        display: flex;
    }

    .mobile-only {
        display: flex;
    }

    .desktop-only {
        display: none !important;
    }

    .nav-user-name,
    .nav-logout {
        display: none;
    }

    .admin-layout {
        flex-direction: column;
    }

    .admin-main {
        padding: 0 12px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .table-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .table-search {
        width: 100%;
    }

    .dash-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .container-wide,
    .container-full {
        padding: 0 12px;
    }
}

@media (max-width: 600px) {
    .landing-cards {
        gap: 8px;
    }

    .landing-cards .landing-card {
        max-width: none;
    }

    .landing-cards-single .landing-card {
        max-width: 260px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .stat-card {
        padding: 12px;
    }

    .stat-value {
        font-size: 20px;
    }

    .temple-logo {
        width: 70px;
        height: 70px;
    }

    .landing-page .temple-logo {
        width: 140px;
        height: 140px;
        margin-bottom: 10px;
    }

    .landing-page .temple-header {
        padding: 8px 16px 10px;
    }

    .landing-page .landing-subtitle {
        margin-top: 4px;
        font-size: 19px;
    }

    .landing-page .landing-desc {
        margin-top: 4px;
        font-size: 12px;
    }

    .temple-header h1 {
        font-size: 18px;
    }

    .form-card {
        padding: 20px 16px;
        border-radius: 16px;
    }

    .coupon-card {
        padding: 20px 16px;
    }

    .tabs {
        gap: 0;
    }

    .tab {
        padding: 8px 12px;
        font-size: 12px;
    }

    .admin-form-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .table-header {
        flex-direction: column;
        gap: 8px;
    }

    .table-header h3 {
        font-size: 14px;
    }

    .dash-header h2 {
        font-size: 18px;
    }
}

/* ===== DEITY BACKGROUND ===== */
.deity-bg {
    position: relative;
    background-image: url('/static/images/sri-sri-radha-gopinath.jpg');
    background-size: cover;
    background-position: center 15%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

.deity-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
}

[data-theme="dark"] .deity-bg::before {
    background: linear-gradient(to bottom, rgba(12,10,26,0.3) 0%, rgba(12,10,26,0.6) 60%, rgba(12,10,26,0.85) 100%);
}

[data-theme="light"] .deity-bg::before {
    background: linear-gradient(to bottom, rgba(242,213,160,0.3) 0%, rgba(242,213,160,0.6) 60%, rgba(242,213,160,0.85) 100%);
}

.deity-bg > * {
    position: relative;
    z-index: 1;
}

[data-theme="dark"] .deity-bg .sidebar-user,
[data-theme="dark"] .deity-bg .drawer-user-name {
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

[data-theme="dark"] .deity-bg .drawer-user-email {
    color: rgba(255,255,255,0.8);
}

[data-theme="light"] .deity-bg .sidebar-user,
[data-theme="light"] .deity-bg .drawer-user-name {
    color: #2A1A0A;
    text-shadow: 0 1px 3px rgba(255,255,255,0.4);
}

[data-theme="light"] .deity-bg .drawer-user-email {
    color: #5A4020;
}

.deity-bg .sidebar-avatar,
.deity-bg .drawer-avatar {
    border-color: rgba(255,255,255,0.6);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

[data-theme="dark"] .deity-bg .role-badge {
    background: rgba(255,255,255,0.2) !important;
    color: #fff !important;
    backdrop-filter: blur(4px);
}

[data-theme="light"] .deity-bg .role-badge {
    background: rgba(0,0,0,0.15) !important;
    color: #2A1A0A !important;
    backdrop-filter: blur(4px);
}

/* Flower falling animation */
.flower-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.flower {
    position: absolute;
    top: -20px;
    font-size: 14px;
    animation: flowerFall linear infinite;
    opacity: 0.8;
}

@keyframes flowerFall {
    0% { transform: translateY(-20px) rotate(0deg); opacity: 0.8; }
    100% { transform: translateY(200px) rotate(360deg); opacity: 0; }
}

/* ====== GUEST SIDE PANEL ====== */
.side-panel-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.side-panel-overlay.open {
    opacity: 1;
    pointer-events: all;
}
.side-panel {
    position: fixed;
    top: 0; right: -420px; bottom: 0;
    width: 400px;
    max-width: 90vw;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    z-index: 1000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 20px rgba(0,0,0,0.3);
}
.side-panel.open {
    right: 0;
}
.side-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.side-panel-header h3 {
    font-size: 16px;
    font-weight: 600;
}
.side-panel-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}
.side-panel-close:hover {
    background: var(--bg-input);
}
.side-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}
.panel-loading {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
}
.panel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}
.panel-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.panel-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.panel-value {
    font-size: 13px;
    color: var(--text);
}
.panel-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.panel-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}
.panel-family-item {
    font-size: 13px;
    padding: 4px 0;
    color: var(--text-secondary, var(--text-muted));
}
.panel-inactive {
    background: rgba(255,68,68,0.05);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,68,68,0.15);
    margin-top: 16px;
}

/* ====== BULK ACTION TOOLBAR ====== */
.bulk-toolbar {
    position: fixed;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--accent-border, var(--border));
    border-radius: 12px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 900;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: bottom 0.3s ease;
    flex-wrap: wrap;
}
.bulk-toolbar.visible {
    bottom: 20px;
}
.bulk-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
}
.bulk-toolbar select {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text);
    font-size: 12px;
}
.bulk-toolbar .btn {
    font-size: 12px;
    padding: 6px 12px;
}

/* ====== GUEST CHECKBOX ====== */
.guest-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* ====== THREE-DOT MENU ====== */
.dots-menu-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 2px 8px;
    line-height: 1;
    transition: all 0.2s;
}
.dots-menu-btn:hover {
    background: var(--bg-input);
    color: var(--text);
}
.dots-menu {
    display: none;
    position: fixed;
    background: var(--bg, #0d1b2a);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
    z-index: 9999;
    min-width: 160px;
    overflow: hidden;
    backdrop-filter: blur(20px);
}
[data-theme="dark"] .dots-menu {
    background: #1a1333;
}
[data-theme="light"] .dots-menu {
    background: #EDD0A0;
}

/* ====== MODAL BOX (solid bg for popups) ====== */
.modal-box {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    max-width: 360px;
    width: 90%;
}
[data-theme="dark"] .modal-box {
    background: #1a1333;
}
[data-theme="light"] .modal-box {
    background: #EDD0A0;
}
.dots-menu.open {
    display: block;
}
.dots-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: none;
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}
.dots-menu-item:hover {
    background: var(--bg-input);
}

@media (max-width: 768px) {
    .side-panel {
        width: 100vw;
        max-width: 100vw;
        right: -100vw;
    }
    .bulk-toolbar {
        left: 10px;
        right: 10px;
        transform: none;
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ========== TEAM USERS TAB ========== */
.team-subtabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    background: var(--bg-input);
    border-radius: 12px;
    padding: 4px;
    overflow-x: auto;
}
.team-subtab {
    flex: 1;
    text-align: center;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}
.team-subtab:hover { background: var(--bg-card); color: var(--text-primary); }
.team-subtab.active {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,220,240,0.25);
}
[data-theme="light"] .team-subtab.active {
    box-shadow: 0 2px 8px rgba(160,106,32,0.2);
}
.team-count {
    display: inline-block;
    min-width: 20px;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255,255,255,0.15);
    margin-left: 4px;
}
.team-subtab.active .team-count { background: rgba(255,255,255,0.25); }
.team-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-card);
}
.team-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.team-table th {
    padding: 12px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    background: var(--bg-input);
    white-space: nowrap;
}
.team-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.team-table tr:last-child td { border-bottom: none; }
.team-table tr:hover { background: var(--bg-input); }
.team-user-name { font-weight: 600; color: var(--text-primary); }
.team-email { font-size: 12px; color: var(--text-secondary); word-break: break-all; }
.team-time { font-size: 12px; color: var(--text-primary); white-space: nowrap; }
.team-time-sub { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.team-action { font-size: 12px; color: var(--accent); font-weight: 500; }
.team-never { font-size: 12px; color: var(--text-muted); font-style: italic; }
.team-no-account {
    display: inline-block;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(255,152,0,0.12);
    color: var(--warning);
    margin-top: 2px;
}
.team-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 6px;
}
.team-badge.active { background: rgba(76,175,80,0.12); color: var(--success); }
.team-badge.inactive { background: rgba(239,83,80,0.12); color: var(--danger); }

@media (max-width: 768px) {
    .team-subtabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .team-subtab { flex: none; padding: 8px 12px; font-size: 12px; }
    .team-table { font-size: 12px; }
    .team-table th, .team-table td { padding: 8px 10px; }
}

/* ========== COUPON DAY PICKER ========== */
.coupon-days-grid {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}
.coupon-day-chip {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    min-width: 0;
    text-align: center;
}
.coupon-day-chip input[type=checkbox] { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }
.coupon-day-chip .coupon-day-label { display: none; }
.coupon-day-chip .coupon-day-full { font-size: 12px; font-weight: 500; color: var(--text-muted); text-align: center; width: 100%; }
.coupon-day-chip:hover { border-color: var(--accent-border); }
.coupon-day-chip.selected {
    background: var(--accent-glow);
    border-color: var(--accent);
}
.coupon-day-chip.selected .coupon-day-full { color: var(--accent); font-weight: 600; }
@media (max-width: 480px) {
    .coupon-days-grid { gap: 4px; }
    .coupon-day-chip { padding: 8px 2px; }
    .coupon-day-chip .coupon-day-label { display: block; font-size: 11px; font-weight: 500; color: var(--text-muted); text-align: center; width: 100%; }
    .coupon-day-chip .coupon-day-full { display: none; }
    .coupon-day-chip.selected .coupon-day-label { color: var(--accent); font-weight: 600; }
}

/* Custom Time Picker */
.tp-wrap {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px 6px;
    transition: border-color 0.2s;
}
.tp-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.tp-select {
    background: transparent;
    border: none;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    text-align: center;
}
.tp-hour, .tp-min { width: 42px; padding: 6px 2px; }
.tp-ampm {
    width: 46px;
    padding: 6px 4px;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-glow);
    border-radius: 6px;
    text-align: center;
}
.tp-sep {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-muted);
    padding: 0 1px;
}
.tp-select option {
    background: var(--bg-primary);
    color: var(--text);
}

.coupon-perday-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-input);
    border-radius: 8px;
    border: 1px solid var(--border);
}
.coupon-perday-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    min-width: 80px;
}
.coupon-perday-input {
    max-width: 120px;
    font-size: 12px;
}
@media (max-width: 480px) {
    .coupon-perday-row { flex-wrap: wrap; gap: 6px; }
    .coupon-perday-label { min-width: 70px; }
    .coupon-perday-input { max-width: 100px; }
}
