/* ==========================================================================
   NIVORA - DESIGN SYSTEM & STYLESHEET (VANILLA CSS)
   ========================================================================== */

/* ── 1. GLOBAL VARIABLES & CORE CONSTANTS ──────────────────────────────── */
:root {
    /* Color Palette */
    --bg-dark: #121520;
    --bg-primary: #121520;
    --bg-card: rgba(26, 29, 45, 0.85);
    --bg-card-hover: rgba(46, 51, 77, 0.95);
    --border-glow: rgba(255, 255, 255, 0.06);
    --border-active: rgba(27, 89, 248, 0.45);

    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent-blue: #1b59f8;
    --accent-indigo: #1d4ed8;
    --accent-purple: #7c3aed;
    --accent-pink: #8b5cf6;
    --accent-emerald: #16a34a;
    --accent-amber: #f59e0b;
    --accent-rose: #ef4444;

    /* Theme Gradients */
    --gradient-primary: linear-gradient(135deg, #1b59f8 0%, #7c3aed 100%);
    --gradient-blue: linear-gradient(135deg, #1b59f8 0%, #1d4ed8 100%);
    --gradient-emerald: linear-gradient(135deg, #16a34a 0%, #10b981 100%);
    --gradient-purple: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
    --gradient-rose: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    --gradient-dark: linear-gradient(180deg, #1a1d2d 0%, #121520 100%);

    /* Shadows & Transitions */
    --shadow-sm: 0 2px 8px -2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 20px -4px rgba(0, 0, 0, 0.7);
    --shadow-glow-blue: 0 0 20px rgba(27, 89, 248, 0.2);
    --shadow-glow-purple: 0 0 20px rgba(124, 58, 237, 0.2);
    --shadow-glow-pink: 0 0 20px rgba(139, 92, 246, 0.2);
    --shadow-glow-green: 0 0 20px rgba(22, 163, 74, 0.2);

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Layout metrics */
    --sidebar-width: 260px;
    --header-height: 70px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
}

/* ── 2. GLOBAL RESET & BASE SETUP ───────────────────────────────────────── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #ffffff;
}

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

a:hover {
    color: var(--accent-pink);
}

input, select, textarea, button {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: none;
    border: none;
    outline: none;
}

/* ── 3. VISUAL DECORATIONS & BACKGROUND GLOWS ──────────────────────────── */
.bg-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.12;
    pointer-events: none;
    z-index: -1;
    animation: pulseGlow 15s infinite alternate ease-in-out;
}

.bg-glow-1 {
    top: -200px;
    right: -100px;
    background: radial-gradient(circle, var(--accent-blue) 0%, var(--accent-indigo) 100%);
}

.bg-glow-2 {
    bottom: -200px;
    left: -100px;
    background: radial-gradient(circle, var(--accent-purple) 0%, var(--accent-pink) 100%);
    animation-delay: 5s;
}

@keyframes pulseGlow {
    0% { transform: scale(1) translate(0, 0); opacity: 0.1; }
    100% { transform: scale(1.2) translate(50px, 50px); opacity: 0.15; }
}

/* ── 4. REUSABLE ATOMIC COMPONENTS ─────────────────────────────────────── */
/* Glassmorphism Panel Cards */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.glass-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.12);
}

/* Custom glow borders on cards */
.glow-blue:hover { box-shadow: var(--shadow-glow-blue); border-color: rgba(59, 130, 246, 0.3); }
.glow-purple:hover { box-shadow: var(--shadow-glow-purple); border-color: rgba(168, 85, 247, 0.3); }
.glow-pink:hover { box-shadow: var(--shadow-glow-pink); border-color: rgba(236, 72, 153, 0.3); }
.glow-green:hover { box-shadow: var(--shadow-glow-green); border-color: rgba(16, 185, 129, 0.3); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-primary {
    background: var(--gradient-primary);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-glow);
    color: #ffffff;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

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

.btn-outline:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.btn-success {
    background: var(--gradient-emerald);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1.1rem;
    border-radius: var(--radius-md);
}

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

.btn-link {
    background: none;
    color: var(--accent-indigo);
    font-weight: 500;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-link:hover {
    color: var(--accent-pink);
    text-decoration: underline;
}

.text-danger {
    color: var(--accent-rose) !important;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-success { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-danger { background: rgba(244, 63, 94, 0.15); color: #f87171; border: 1px solid rgba(244, 63, 94, 0.3); }
.badge-info { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }

/* Forms input fields */
.form-group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-sm);
    color: #ffffff;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent-indigo);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
}

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

.phone-input-group {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.phone-input-group .country-prefix {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border-right: 1px solid var(--border-glow);
    font-weight: 600;
}

.phone-input-group input {
    border: none;
    background: transparent;
    padding: 12px 16px;
}

/* Spinner */
.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ── 5. PUBLIC WEBSITE LAYOUT ─────────────────────────────────────────── */
/* Nav Bar */
.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(7, 9, 19, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glow);
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    cursor: pointer;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.logo span span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-links a:hover {
    color: #ffffff;
}

.mobile-menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 140px 20px 80px 20px;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hero-badge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
}

.hero h1 span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.hero-actions {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.metric-card {
    padding: 20px;
    text-align: center;
}

.metric-card h3 {
    font-size: 2rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.metric-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Floating Device Mockup */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-phone-wrapper {
    position: relative;
    width: 320px;
    height: 480px;
}

.mockup-card {
    position: absolute;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
}

.main-mockup {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: var(--gradient-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

.mockup-header {
    padding: 30px 24px 20px 24px;
    border-bottom: 1px solid var(--border-glow);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.mockup-header h4 {
    font-size: 1.2rem;
}

.mockup-header small {
    color: var(--text-secondary);
}

.mockup-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex: 1;
}

.mockup-metric {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.mockup-metric span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.mockup-metric h3 {
    font-size: 2.2rem;
    color: var(--accent-indigo);
    margin: 4px 0;
}

.mockup-metric small {
    color: var(--text-muted);
}

.mockup-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.action-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-sm);
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.action-item i {
    width: 20px;
    height: 20px;
}

.secondary-mockup {
    width: 260px;
    bottom: -30px;
    right: -60px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.mockup-visitor {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.visitor-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent-indigo);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mockup-visitor h5 {
    font-size: 0.9rem;
}

.mockup-visitor small {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* Sections */
.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 20px;
}

.bg-card-dark {
    background: rgba(11, 15, 25, 0.4);
    border-top: 1px solid var(--border-glow);
    border-bottom: 1px solid var(--border-glow);
    max-width: 100%;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.section-header h2 {
    font-size: 2.5rem;
}

.section-header h2 span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-item {
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.bg-blue { background: var(--gradient-blue); box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3); }
.bg-purple { background: var(--gradient-purple); box-shadow: 0 4px 10px rgba(168, 85, 247, 0.3); }
.bg-pink { background: var(--gradient-primary); box-shadow: 0 4px 10px rgba(236, 72, 153, 0.3); }
.bg-green { background: var(--gradient-emerald); box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3); }
.bg-amber { background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%); box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3); }
.bg-teal { background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%); box-shadow: 0 4px 10px rgba(20, 184, 166, 0.3); }

.feature-item h3 {
    font-size: 1.3rem;
}

.feature-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Search Society Block */
.search-society-wrapper {
    max-width: 700px;
    margin: 0 auto;
    padding: 30px;
}

.search-input-group {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-md);
    overflow: hidden;
    align-items: center;
    padding-right: 8px;
}

.search-input-group input {
    flex: 1;
    padding: 16px;
    font-size: 1.05rem;
}

.search-icon {
    margin-left: 20px;
    color: var(--text-muted);
}

.search-result-container {
    margin-top: 20px;
}

.society-result-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
}

.society-result-info h4 {
    font-size: 1.1rem;
}

.society-result-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.societies-directory {
    margin-top: 60px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.societies-directory h4 {
    font-size: 1.2rem;
    margin-bottom: 24px;
    text-align: center;
    color: var(--text-secondary);
}

.societies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.society-list-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.society-list-card h5 {
    font-size: 1.1rem;
}

.society-list-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    min-height: 40px;
}

.society-list-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-glow);
    padding-top: 12px;
    margin-top: 6px;
}

.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px;
    color: var(--text-secondary);
    grid-column: 1 / -1;
}

/* ── 6. AUTH MODAL OVERLAY & BOXES ──────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(3, 4, 9, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 500px;
    padding: 40px;
    animation: slideUp var(--transition-normal);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: var(--transition-fast);
}

.modal-close:hover {
    color: #ffffff;
}

.auth-sub-form {
    display: none;
    flex-direction: column;
    gap: 20px;
}

.auth-sub-form.active {
    display: flex;
}

.auth-sub-form h2 {
    font-size: 1.8rem;
}

.auth-sub-form p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.auth-switch {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 10px;
}

.otp-timer {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: right;
}

@keyframes slideUp {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ── 7. DASHBOARD SYSTEM VIEW LAYOUT ───────────────────────────────────── */
.page-view {
    display: none;
}

.page-view.active {
    display: block;
}

.page-view.active.dashboard-layout {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg-dark);
}

/* Sidebar */
.dashboard-sidebar {
    width: var(--sidebar-width);
    background: var(--gradient-dark);
    border-right: 1px solid var(--border-glow);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header {
    height: var(--header-height);
    padding: 0 24px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-glow);
}

.user-profile-badge {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-glow);
}

.user-profile-badge .avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glow);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-profile-badge .user-info h4 {
    font-size: 0.95rem;
}

.user-profile-badge .user-info p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.sidebar-nav {
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition-fast);
}

.nav-item i {
    width: 18px;
    height: 18px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: white;
}

.nav-item.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-indigo);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--accent-indigo);
}

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

/* Main Dashboard Wrapper */
.dashboard-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100vh;
}

.dashboard-top-bar {
    height: var(--header-height);
    padding: 0 30px;
    background: rgba(7, 9, 19, 0.5);
    border-bottom: 1px solid var(--border-glow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.dashboard-title h2 {
    font-size: 1.4rem;
}

.dashboard-title p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.connection-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glow);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-rose);
}

.connection-status.active-api .status-dot { background: var(--accent-emerald); box-shadow: 0 0 8px var(--accent-emerald); }
.connection-status.mock-mode .status-dot { background: var(--accent-amber); box-shadow: 0 0 8px var(--accent-amber); }

.notification-bell {
    position: relative;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.notification-bell .dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 6px;
    height: 6px;
    background: var(--accent-pink);
    border-radius: 50%;
}

.dashboard-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

/* ── 8. DASHBOARD PANELS & WIDGETS ─────────────────────────────────────── */
/* Tabs Pane Wrapper */
.dash-tab-pane {
    display: none;
    flex-direction: column;
    gap: 30px;
    animation: fadeIn 0.4s ease-in-out;
}

.dash-tab-pane.active {
    display: flex;
}

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

/* Overview Stat Cards Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stat-card {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--text-secondary);
}

.stat-card.glow-blue .stat-icon { color: var(--accent-blue); background: rgba(59, 130, 246, 0.1); }
.stat-card.glow-purple .stat-icon { color: var(--accent-purple); background: rgba(168, 85, 247, 0.1); }
.stat-card.glow-amber .stat-icon { color: var(--accent-amber); background: rgba(245, 158, 11, 0.1); }
.stat-card.glow-green .stat-icon { color: var(--accent-emerald); background: rgba(16, 185, 129, 0.1); }

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-content span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.stat-content h3 {
    font-size: 1.6rem;
    margin: 2px 0;
}

.stat-content p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Double Grid Rows */
.dash-grid-two-cols {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 30px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-glow);
    padding: 20px 24px;
}

.card-header h4 {
    font-size: 1.1rem;
}

/* Charts Wrapper */
.chart-card {
    padding: 0;
}

.canvas-wrapper {
    padding: 24px;
    height: 280px;
    position: relative;
}

/* Notices Lists */
.notices-summary-card {
    padding: 0;
}

.notices-list-compact {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 280px;
    overflow-y: auto;
}

.notice-item-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-glow);
    cursor: pointer;
    transition: var(--transition-fast);
}

.notice-item-compact:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.notice-item-compact h5 {
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.notice-item-compact small {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* Quick Actions Button */
.quick-actions-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.actions-buttons-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.action-btn {
    padding: 24px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.action-btn i {
    width: 28px;
    height: 28px;
    color: var(--accent-indigo);
    transition: var(--transition-fast);
}

.action-btn:hover i {
    transform: scale(1.1);
    color: var(--accent-pink);
}

.action-btn span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Toolbar Toolbar (search + filter) */
.toolbar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-sm);
    padding: 0 16px;
    flex: 1;
    max-width: 400px;
}

.search-box.compact {
    padding: 0 12px;
}

.search-box i {
    color: var(--text-muted);
}

.search-box input {
    padding: 12px;
    width: 100%;
}

.filter-group {
    display: flex;
    gap: 10px;
}

.filter-btn {
    padding: 8px 16px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glow);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent-indigo);
    color: white;
    border-color: var(--accent-indigo);
}

/* Notices Board Main Panel Grid */
.notices-grid-main {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.notice-card-full {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notice-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.notice-card-full h4 {
    font-size: 1.15rem;
    line-height: 1.4;
}

.notice-card-full p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notice-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-glow);
    padding-top: 14px;
    margin-top: auto;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Facility Bookings Showcase */
.facilities-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.facilities-showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.facility-show-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.facility-img-box {
    height: 160px;
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.facility-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.facility-img-box svg {
    width: 60px;
    height: 60px;
    color: var(--text-muted);
}

.facility-img-badge {
    position: absolute;
    top: 12px;
    right: 12px;
}

.facility-details-box {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.facility-details-box h4 {
    font-size: 1.2rem;
}

.facility-details-box p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.facility-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-glow);
    padding-top: 12px;
}

.facility-meta-row strong {
    color: white;
}

/* Custom Table for bookings list */
.bookings-table-wrapper {
    overflow-x: auto;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.custom-table th {
    padding: 16px 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 2px solid var(--border-glow);
}

.custom-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-glow);
    font-size: 0.9rem;
}

.custom-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}

/* Booking prices card preview */
.booking-price-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    margin-bottom: 18px;
    background: rgba(99, 102, 241, 0.08);
    border-color: var(--border-active);
}

/* Billings & payments tab panels */
.billing-summary-block {
    padding: 30px;
}

.billing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.bill-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bill-total-row h1 {
    font-size: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bill-total-row small {
    color: var(--text-secondary);
}

.bills-split-view {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 30px;
}

.bill-breakdown-card,
.billing-history-card {
    padding: 0;
}

.bill-breakdown-card h4,
.billing-history-card h4 {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-glow);
}

.breakdown-list {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border-glow);
}

.breakdown-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
    font-weight: 600;
}

.transaction-history-list {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 380px;
    overflow-y: auto;
}

.transaction-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-sm);
}

.txn-meta h5 {
    font-size: 0.9rem;
}

.txn-meta small {
    color: var(--text-muted);
}

.txn-amt {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.txn-amt strong {
    font-size: 0.95rem;
}

/* Complaints Tab Layout */
.complaints-view-panels {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 30px;
    height: 520px;
}

.complaints-list-panel {
    padding: 0;
    display: flex;
    flex-direction: column;
}

.complaints-list-panel .panel-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-glow);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.complaints-list {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    flex: 1;
}

.complaint-card-item {
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.complaint-card-item:hover,
.complaint-card-item.selected {
    background: rgba(99, 102, 241, 0.05);
    border-color: var(--accent-indigo);
}

.complaint-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.complaint-card-item h5 {
    font-size: 0.95rem;
    margin-bottom: 6px;
}

.complaint-card-item p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.complaint-detail-panel {
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.detail-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 15px;
    margin-top: 100px;
    color: var(--text-muted);
}

.detail-empty-state i {
    width: 60px;
    height: 60px;
}

.detail-empty-state p {
    max-width: 280px;
    font-size: 0.85rem;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid var(--border-glow);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.detail-header small {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.detail-body {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Complaints Timeline log tracker */
.complaint-timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    padding-left: 20px;
}

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

.timeline-step {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timeline-step::before {
    content: '';
    position: absolute;
    top: 5px;
    left: -20px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
    border: 2px solid var(--bg-dark);
}

.timeline-step.active::before {
    background: var(--accent-indigo);
    box-shadow: 0 0 8px var(--accent-indigo);
}

.timeline-step h6 {
    font-size: 0.9rem;
    color: white;
}

.timeline-step p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.timeline-step small {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Visitor panel columns */
.visitors-layout-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 30px;
}

.active-passes-card,
.visitor-logs-card {
    padding: 0;
}

.active-passes-card h4,
.visitor-logs-card h4 {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-glow);
}

.passes-grid {
    padding: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.pass-card {
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}

.pass-card h5 {
    font-size: 0.95rem;
}

.pass-card p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.pass-code-badge {
    background: rgba(99, 102, 241, 0.1);
    border: 1px dashed var(--accent-indigo);
    border-radius: 6px;
    padding: 8px;
    text-align: center;
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-indigo);
    letter-spacing: 0.1em;
}

.gate-logs-list {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 480px;
    overflow-y: auto;
}

.gate-log-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-glow);
}

.gate-log-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.gate-log-avatar {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.gate-log-info {
    flex: 1;
}

.gate-log-info h5 {
    font-size: 0.9rem;
}

.gate-log-info p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Directory search panels */
.directory-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.directory-card {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.directory-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.directory-card.committee .directory-avatar {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-indigo);
    border-color: rgba(99, 102, 241, 0.3);
}

.directory-card.emergency .directory-avatar {
    background: rgba(244, 63, 94, 0.1);
    color: var(--accent-rose);
    border-color: rgba(244, 63, 94, 0.3);
}

.directory-info {
    flex: 1;
}

.directory-info h5 {
    font-size: 1rem;
}

.directory-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.directory-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.directory-btn {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.directory-btn:hover {
    background: var(--accent-indigo);
    color: white;
}

/* ── 9. PAYMENT OVERLAYS & SUCCESS ANIMATIONS ─────────────────────────── */
.payment-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp var(--transition-normal);
}

.payment-header {
    background: var(--gradient-dark);
    padding: 24px;
    border-bottom: 1px solid var(--border-glow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.amount-badge {
    text-align: right;
}

.amount-badge span {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.amount-badge h3 {
    font-size: 1.4rem;
    color: var(--accent-emerald);
}

.payment-view {
    display: none;
    padding: 24px;
    flex-direction: column;
    gap: 20px;
}

.payment-view.active {
    display: flex;
}

.payment-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    border-bottom: 1px solid var(--border-glow);
    padding-bottom: 20px;
}

.pay-method {
    padding: 12px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glow);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.pay-method i {
    width: 18px;
    height: 18px;
}

.pay-method:hover,
.pay-method.active {
    border-color: var(--accent-indigo);
    background: rgba(99, 102, 241, 0.05);
    color: white;
}

.pay-details-sub {
    display: none;
    flex-direction: column;
}

.pay-details-sub.active {
    display: flex;
}

.upi-qr-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
}

.qr-placeholder {
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: black;
}

.qr-placeholder svg {
    width: 80px;
    height: 80px;
}

.loading-state,
.success-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 20px;
    padding: 30px 10px;
}

.loading-state i.large {
    width: 64px;
    height: 64px;
}

.success-icon {
    font-size: 4rem;
    color: var(--accent-emerald);
    animation: bounceIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-icon svg {
    width: 80px;
    height: 80px;
}

@keyframes bounceIn {
    from { transform: scale(0.3); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.receipt-summary {
    width: 100%;
    padding: 20px;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    border-bottom: 1px dashed var(--border-glow);
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.receipt-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.receipt-row span {
    color: var(--text-secondary);
}

/* ── 10. RESPONSIVE MEDIA QUERIES ─────────────────────────────────────── */
@media (max-width: 1024px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero {
        grid-template-columns: 1fr;
        padding-top: 110px;
        text-align: center;
    }
    .hero-content {
        align-items: center;
    }
    .hero-badge {
        align-self: center;
    }
    .hero-metrics {
        width: 100%;
    }
    .hero-visual {
        margin-top: 30px;
    }
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .dash-grid-two-cols {
        grid-template-columns: 1fr;
    }
    .complaints-view-panels {
        grid-template-columns: 1fr;
        height: auto;
    }
    .complaint-detail-panel {
        display: none; /* In mobile, will overlay or show below */
    }
    .bills-split-view {
        grid-template-columns: 1fr;
    }
    .visitors-layout-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* In simple version, hidden or mobile menu drawer */
    }
    .mobile-menu-toggle {
        display: block;
    }
    .features-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-layout {
        flex-direction: column;
    }
    .dashboard-sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-glow);
    }
    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 10px;
    }
    .nav-item {
        padding: 8px 12px;
        white-space: nowrap;
    }
    .nav-item span {
        display: none; /* Show only icons on mobile sidebar */
    }
    .dashboard-main {
        height: auto;
    }
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .actions-buttons-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.4rem;
    }
    .stats-row {
        grid-template-columns: 1fr;
    }
    .actions-buttons-grid {
        grid-template-columns: 1fr;
    }
    .modal-content {
        padding: 20px;
    }
}
