/* ============================================================
   VISITOR DASHBOARD PAGE STYLES (visitor_dashboard.css)
   Slate Glassmorphism Refactor
   ============================================================ */

:root {
    --primary: #222222;
    --primary-dark: #111111;
    --primary-soft: #e8e8ec;

    --success: #159a62;
    --success-soft: #eaf8f1;

    --danger: #d94b5c;
    --danger-soft: #fff0f2;

    --ink: #111111;
    --ink-soft: #333333;
    --muted: #666666;

    --background: #e8e8ec;
    --surface: rgba(255, 255, 255, 0.85);
    --surface-soft: rgba(255, 255, 255, 0.60);
    --border: rgba(255, 255, 255, 0.80);

    --shadow-sm: 0 6px 20px rgba(0, 0, 0, .04);
    --shadow-md: 0 18px 45px rgba(0, 0, 0, .07);
    --shadow-lg: 0 25px 70px rgba(0, 0, 0, .10);

    --sidebar-width: 260px;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
}

* {
    font-family: 'Plus Jakarta Sans', 'DM Sans', sans-serif;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background:
        radial-gradient(
            circle at 90% 0%,
            rgba(0, 0, 0, .03),
            transparent 30%
        ),
        radial-gradient(
            circle at 0% 40%,
            rgba(0, 0, 0, .02),
            transparent 25%
        ),
        var(--background);
    color: var(--ink);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- Mobile Top Bar --- */
.mobile-header {
    display: none;
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    align-items: center;
    justify-content: space-between;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1050;
    box-shadow: var(--shadow-sm);
}

.mobile-menu-btn {
    background: var(--surface-soft);
    border: 1px solid rgba(0,0,0,0.08);
    font-size: 20px;
    color: var(--ink);
    border-radius: var(--radius-sm);
    padding: 6px 14px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.mobile-menu-btn:hover {
    background: var(--surface-solid);
    transform: translateY(-1px);
}

/* Sidebar Dark Backdrop */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(18, 18, 20, 0.4);
    z-index: 1090;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.sidebar-overlay.active {
    display: block;
}

/* --- Sidebar Navigation --- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 30px 22px;
    z-index: 1100;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease-in-out;
}

.sidebar-header-mobile {
    display: none;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--ink);
    cursor: pointer;
}

.sidebar .logo {
    font-weight: 800;
    font-size: 17px;
    color: var(--ink);
    margin-bottom: 35px;
    letter-spacing: -0.4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar .nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.sidebar .nav-item {
    margin-bottom: 8px;
}

.sidebar .nav-link-custom {
    text-decoration: none;
    color: var(--muted);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    display: block;
    transition: all 0.2s ease;
    font-weight: 700;
    font-size: 13.5px;
}

.sidebar .nav-link-custom:hover, 
.sidebar .nav-link-custom.active {
    background: var(--primary);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.sidebar .back-btn {
    background: var(--danger-soft);
    color: var(--danger);
    border: 1px solid rgba(217, 75, 92, 0.2);
    text-align: center;
    border-radius: var(--radius-sm);
    padding: 12px;
    text-decoration: none;
    font-weight: 800;
    font-size: 13px;
    transition: 0.2s ease;
}

.sidebar .back-btn:hover {
    background: var(--danger);
    color: #ffffff;
    transform: translateY(-1px);
}

/* --- Main Content Area --- */
.main-content {
    flex-grow: 1;
    padding: 45px 50px;
    overflow-y: auto;
    width: 100%;
}

.welcome-header {
    margin-bottom: 30px;
}

.welcome-header h1 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    color: var(--ink);
    font-size: clamp(24px, 3vw, 32px);
    letter-spacing: -1px;
}

.welcome-header p {
    color: var(--muted);
    font-size: 15px;
    margin-top: 4px;
}

/* --- Status Banner --- */
.status-banner {
    background: var(--surface);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 28px;
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.status-badge {
    background: var(--success-soft);
    color: var(--success);
    border: 1px solid #d9eee4;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 800;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.2px;
}

/* Pulse Status Indicator Dot */
.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(21, 154, 98, 0.4);
    animation: pulse 1.7s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(21, 154, 98, 0.4); }
    50% { transform: scale(1); box-shadow: 0 0 0 6px rgba(21, 154, 98, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(21, 154, 98, 0); }
}

/* --- Dashboard Cards --- */
.stat-card {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0,0,0,0.18);
    box-shadow: var(--shadow-md);
}

.card-label {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.1px;
    font-weight: 800;
    margin-bottom: 8px;
}

.card-value {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.5px;
}

/* Action Button Card */
.action-card-btn {
    background: linear-gradient(135deg, #555555, #222222);
    color: #ffffff;
    border-radius: var(--radius-md);
    padding: 20px 28px;
    text-decoration: none;
    font-weight: 800;
    font-size: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .16);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.action-card-btn:hover {
    color: #ffffff;
    background: #000000;
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(0, 0, 0, .22);
}

/* --- Mobile Responsive Breakpoint (<= 768px) --- */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    .mobile-header {
        display: flex;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 270px;
        transform: translateX(-100%);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.15);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-header-mobile {
        display: flex;
    }

    .sidebar .logo {
        margin-bottom: 20px;
    }

    .main-content {
        padding: 24px 18px;
    }

    .status-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }

    .status-badge {
        width: 100%;
        justify-content: center;
    }
}