/* =====================================================
   Sistem Inventaris Barang Desa Luwunggede
   Modern Dashboard — 2026 Redesign
   =====================================================
   Fonts: Inter, Outfit, Poppins
   Design: Glassmorphism, Soft Shadows, Rounded Corners
   ===================================================== */

/* =====================================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ===================================================== */
:root {
    /* Primary Palette */
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --primary-rgb: 37, 99, 235;
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);

    /* Accent Palette */
    --accent: #7c3aed;
    --accent-light: #8b5cf6;
    --accent-rgb: 124, 58, 237;

    /* Semantic Colors */
    --success: #22c55e;
    --success-light: #4ade80;
    --success-rgb: 34, 197, 94;
    --warning: #f59e0b;
    --warning-light: #fbbf24;
    --warning-rgb: 245, 158, 11;
    --danger: #ef4444;
    --danger-light: #f87171;
    --danger-rgb: 239, 68, 68;
    --info: #06b6d4;
    --info-light: #22d3ee;
    --info-rgb: 6, 182, 212;
    --teal: #14b8a6;
    --teal-rgb: 20, 184, 166;
    --purple: #7c3aed;
    --purple-light: #8b5cf6;
    --purple-rgb: 124, 58, 237;
    --pink: #ec4899;
    --pink-rgb: 236, 72, 153;
    --orange: #f97316;
    --orange-rgb: 249, 115, 22;

    /* Backgrounds */
    --bg: #f4f7fc;
    --bg-body: #f4f7fc;
    --card: #ffffff;
    --bg-white: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-glass: rgba(255, 255, 255, 0.7);
    --bg-sidebar: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);

    /* Text */
    --text: #1f2937;
    --text-primary: #1f2937;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;

    /* Borders */
    --border-color: #e2e8f0;
    --border-light: rgba(0, 0, 0, 0.06);

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-card-hover: 0 10px 40px rgba(0,0,0,0.08);
    --shadow-glow-primary: 0 0 20px rgba(37, 99, 235, 0.15);
    --shadow-glow-success: 0 0 20px rgba(34, 197, 94, 0.15);

    /* Radius */
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* Layout */
    --sidebar-width: 280px;
    --sidebar-collapsed: 80px;
    --navbar-height: 70px;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Z-Index */
    --z-sidebar: 1040;
    --z-navbar: 1030;
    --z-overlay: 1035;
    --z-dropdown: 1050;
    --z-toast: 1090;
    --z-backtop: 1020;
}

/* =====================================================
   DARK MODE
   ===================================================== */
[data-theme="dark"] {
    --bg: #0f172a;
    --bg-body: #0f172a;
    --card: #1e293b;
    --bg-white: #1e293b;
    --bg-card: rgba(30, 41, 59, 0.85);
    --bg-glass: rgba(30, 41, 59, 0.7);
    --bg-sidebar: linear-gradient(180deg, #020617 0%, #0f172a 100%);

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

    --border-color: #334155;
    --border-light: rgba(255, 255, 255, 0.06);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.35);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.35);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.45);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.15);
    --shadow-card-hover: 0 10px 40px rgba(0,0,0,0.3);
    --shadow-glow-primary: 0 0 20px rgba(37, 99, 235, 0.25);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}

.font-outfit {
    font-family: 'Outfit', 'Inter', sans-serif;
}

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

a:hover { color: var(--primary); }

img { max-width: 100%; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* Selection */
::selection {
    background: rgba(var(--primary-rgb), 0.15);
    color: var(--primary);
}

/* =====================================================
   SIDEBAR — Modern Glass Design
   ===================================================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    color: #fff;
    z-index: var(--z-sidebar);
    transition: var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.sidebar-logo {
    width: 52px;
    height: 52px;
    background: var(--primary-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.4);
    transition: var(--transition);
}

.sidebar-logo:hover {
    transform: scale(1.05) rotate(5deg);
}

.sidebar-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-bottom: 0;
    background: linear-gradient(135deg, #fff, rgba(255,255,255,0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-subtitle {
    font-size: 0.7rem;
    opacity: 0.5;
    margin-bottom: 0;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.sidebar-nav {
    list-style: none;
    padding: 0.5rem 0;
    flex: 1;
    overflow-y: auto;
}

.sidebar-divider {
    padding: 1rem 1.5rem 0.35rem;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.35;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

.sidebar-item {
    margin: 1px 0.75rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 0.84rem;
    font-weight: 400;
    position: relative;
    overflow: hidden;
}

.sidebar-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.15), rgba(var(--accent-rgb), 0.1));
    opacity: 0;
    transition: var(--transition);
    border-radius: inherit;
}

.sidebar-link:hover {
    color: #fff;
    transform: translateX(4px);
}

.sidebar-link:hover::before {
    opacity: 1;
}

.sidebar-link i {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
    position: relative;
    z-index: 1;
    transition: var(--transition);
}

.sidebar-link span {
    position: relative;
    z-index: 1;
}

.sidebar-link .badge {
    position: relative;
    z-index: 1;
    font-size: 0.65rem;
    padding: 0.2em 0.5em;
    animation: badgePulse 2s ease-in-out infinite;
}

.sidebar-item.active .sidebar-link {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.25), rgba(var(--accent-rgb), 0.15));
    color: #fff;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border-left: 3px solid var(--primary-light);
}

.sidebar-item.active .sidebar-link::before {
    opacity: 1;
}

.sidebar-item.active .sidebar-link i {
    color: var(--primary-light);
}

/* =====================================================
   MAIN CONTENT
   ===================================================== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    background: var(--bg-body);
}

/* =====================================================
   TOP NAVBAR — Glassmorphism
   ===================================================== */
.top-navbar {
    height: var(--navbar-height);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: var(--z-navbar);
    box-shadow: var(--shadow-xs);
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: none;
    line-height: 1;
}

.sidebar-toggle:hover {
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary);
}

.page-title-wrapper {
    display: flex;
    flex-direction: column;
}

.page-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Navbar Clock */
.navbar-clock {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-right: 0.5rem;
    line-height: 1.2;
}

.navbar-time {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Outfit', monospace;
}

.navbar-date {
    font-size: 0.68rem;
    color: var(--text-muted);
}

/* Theme Switcher */
.theme-switcher {
    display: flex;
    align-items: center;
    background: rgba(var(--primary-rgb), 0.06);
    border-radius: var(--radius-full);
    padding: 2px;
    gap: 0;
    border: 1px solid var(--border-light);
}

.theme-btn {
    background: none;
    border: none;
    padding: 0.35rem 0.5rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
    color: var(--text-muted);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.3);
}

.theme-btn:hover:not(.active) {
    color: var(--text-primary);
    background: rgba(var(--primary-rgb), 0.1);
}

/* Search Input Navbar */
.navbar-search {
    position: relative;
    margin-right: 0.25rem;
}

.navbar-search .form-control {
    width: 220px;
    height: 38px;
    padding-left: 2.2rem;
    border-radius: var(--radius-full);
    background: rgba(var(--primary-rgb), 0.04);
    border: 1px solid var(--border-color);
    font-size: 0.82rem;
    transition: var(--transition);
}

.navbar-search .form-control:focus {
    width: 300px;
    background: var(--bg-white);
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.navbar-search .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

/* Search Dropdown Results */
.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    min-width: 300px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    z-index: var(--z-dropdown);
    display: none;
    max-height: 400px;
    overflow-y: auto;
}

.search-dropdown.show {
    display: block;
    animation: fadeInDown 0.2s ease;
}

.search-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    transition: var(--transition-fast);
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
}

.search-dropdown-item:hover {
    background: rgba(var(--primary-rgb), 0.04);
}

.search-dropdown-item:last-child {
    border-bottom: none;
}

.search-dropdown-empty {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Notification */
.notif-btn {
    position: relative;
    background: none;
    border: none;
    padding: 0.45rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
    line-height: 1;
}

.notif-btn:hover {
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary);
}

.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--bg-white);
    animation: badgePulse 2s ease-in-out infinite;
}

.notif-count {
    position: absolute;
    top: -2px;
    right: -4px;
    background: var(--danger);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid var(--bg-white);
}

/* Notification Dropdown */
.notif-dropdown {
    width: 360px;
    max-height: 440px;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.notif-dropdown .dropdown-header {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.05), transparent);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notif-dropdown .dropdown-header h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0;
    color: var(--text-primary);
}

.notif-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    transition: var(--transition-fast);
    border-bottom: 1px solid var(--border-light);
}

.notif-item:hover {
    background: rgba(var(--primary-rgb), 0.03);
}

.notif-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.notif-icon.bg-primary { background: rgba(var(--primary-rgb), 0.12); color: var(--primary); }
.notif-icon.bg-success { background: rgba(var(--success-rgb), 0.12); color: var(--success); }
.notif-icon.bg-warning { background: rgba(var(--warning-rgb), 0.12); color: var(--warning); }
.notif-icon.bg-danger { background: rgba(var(--danger-rgb), 0.12); color: var(--danger); }
.notif-icon.bg-info { background: rgba(var(--info-rgb), 0.12); color: var(--info); }

/* User Dropdown */
.user-dropdown {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: none;
    border: 1px solid var(--border-color);
    padding: 0.3rem 0.75rem 0.3rem 0.3rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
}

.user-dropdown:hover {
    background: rgba(var(--primary-rgb), 0.04);
    border-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
}

.user-avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info {
    text-align: left;
}

.user-name {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.user-role {
    display: block;
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* =====================================================
   CONTENT WRAPPER
   ===================================================== */
.content-wrapper {
    padding: 1.5rem;
    flex: 1;
}

/* =====================================================
   HERO DASHBOARD
   ===================================================== */
.dashboard-hero {
    background: var(--primary-gradient);
    border-radius: var(--radius-xl);
    padding: 1.75rem 2rem;
    color: #fff;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(var(--primary-rgb), 0.2);
}

.dashboard-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}

.dashboard-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: 30%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
}

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

.hero-greeting {
    font-size: 0.85rem;
    opacity: 0.85;
    font-weight: 400;
    margin-bottom: 0.25rem;
}

.hero-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.hero-role {
    font-size: 0.82rem;
    opacity: 0.75;
    font-weight: 300;
    margin-bottom: 0;
}

.hero-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.hero-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-meta-item i {
    font-size: 1rem;
    opacity: 0.9;
}

/* =====================================================
   STAT CARDS — Modern with Hover Effects
   ===================================================== */
.stat-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-light);
    position: relative;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    opacity: 0;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card-hover);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card-primary::before { background: var(--primary-gradient); }
.stat-card-info::before { background: linear-gradient(135deg, var(--info), var(--teal)); }
.stat-card-purple::before { background: linear-gradient(135deg, var(--purple), var(--pink)); }
.stat-card-success::before { background: linear-gradient(135deg, var(--success), var(--teal)); }
.stat-card-warning::before { background: linear-gradient(135deg, var(--warning), var(--orange)); }
.stat-card-danger::before { background: linear-gradient(135deg, var(--danger), var(--pink)); }

.stat-card-body {
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.stat-card:hover .stat-icon {
    transform: scale(1.1);
}

.stat-card-primary .stat-icon { background: rgba(var(--primary-rgb), 0.1); color: var(--primary); }
.stat-card-info .stat-icon { background: rgba(var(--info-rgb), 0.1); color: var(--info); }
.stat-card-purple .stat-icon { background: rgba(var(--purple-rgb), 0.1); color: var(--purple); }
.stat-card-success .stat-icon { background: rgba(var(--success-rgb), 0.1); color: var(--success); }
.stat-card-warning .stat-icon { background: rgba(var(--warning-rgb), 0.1); color: var(--warning); }
.stat-card-danger .stat-icon { background: rgba(var(--danger-rgb), 0.1); color: var(--danger); }

.stat-info {
    flex: 1;
    min-width: 0;
}

.stat-info h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.15rem;
    color: var(--text-primary);
}

.stat-info p {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Stat card footer */
.stat-card-footer {
    padding: 0.55rem 1.25rem;
    background: rgba(var(--primary-rgb), 0.02);
    border-top: 1px solid var(--border-light);
}

.stat-card-footer a {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.stat-card-footer a:hover {
    color: var(--primary-dark);
    gap: 0.5rem;
}

/* Stat progress bar */
.stat-progress {
    height: 4px;
    background: rgba(var(--primary-rgb), 0.1);
    border-radius: var(--radius-full);
    margin-top: 0.5rem;
    overflow: hidden;
}

.stat-progress-bar {
    height: 100%;
    border-radius: var(--radius-full);
    background: var(--primary-gradient);
    transition: width 1s ease;
}

/* =====================================================
   CONTENT CARD — Glass Effect
   ===================================================== */
.content-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: var(--transition);
}

.content-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    background: linear-gradient(to right, rgba(var(--primary-rgb), 0.02), transparent);
}

.content-card-header h5 {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.content-card-header h5 i {
    color: var(--primary);
}

.content-card-body {
    padding: 1.25rem;
}

/* =====================================================
   QUICK ACTIONS
   ===================================================== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 500;
    text-align: center;
}

.quick-action-btn:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
    color: var(--primary);
}

.quick-action-btn i {
    font-size: 1.5rem;
    color: var(--primary);
    transition: var(--transition);
}

.quick-action-btn:hover i {
    transform: scale(1.15);
}

/* =====================================================
   CHART
   ===================================================== */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* =====================================================
   TABLE — Modern with Sticky Header
   ===================================================== */
.table {
    font-size: 0.85rem;
    --bs-table-bg: transparent;
    margin-bottom: 0;
}

.table thead th {
    background: rgba(var(--primary-rgb), 0.03);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
    padding: 0.8rem 0.75rem;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 2;
}

[data-theme="dark"] .table thead th {
    background-color: rgba(15, 23, 42, 0.6);
    color: var(--text-secondary);
    border-bottom-color: var(--border-color);
}

.table tbody tr {
    transition: var(--transition-fast);
}

.table tbody tr:hover {
    background-color: rgba(var(--primary-rgb), 0.03) !important;
}

[data-theme="dark"] .table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.03) !important;
}

.table td {
    padding: 0.75rem;
    vertical-align: middle;
    border-color: var(--border-light);
    color: var(--text-primary);
}

[data-theme="dark"] .table > :not(caption) > * > * {
    background-color: transparent;
    border-bottom-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .table td {
    border-color: var(--border-color);
}

/* =====================================================
   BADGE
   ===================================================== */
.badge {
    font-weight: 500;
    font-size: 0.72rem;
    padding: 0.35em 0.75em;
    border-radius: var(--radius-xs);
    letter-spacing: 0.2px;
}

/* =====================================================
   BUTTONS — Enhanced
   ===================================================== */
.btn {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 0.85rem;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

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

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.2);
}

.btn-group-sm .btn {
    padding: 0.3rem 0.65rem;
    font-size: 0.78rem;
}

/* Ripple Effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    transform: scale(0);
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* =====================================================
   FORMS — Modern with Icons
   ===================================================== */
.form-control,
.form-select {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    padding: 0.6rem 0.85rem;
    transition: var(--transition);
    background-color: var(--bg-white);
    color: var(--text-primary);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
    background-color: var(--bg-white);
}

.form-label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.input-group-text {
    border-color: var(--border-color);
    background: rgba(var(--primary-rgb), 0.03);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: rgba(15, 23, 42, 0.5);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    background-color: rgba(15, 23, 42, 0.8);
    border-color: var(--primary-light);
    color: var(--text-primary);
}

[data-theme="dark"] .form-control::placeholder {
    color: var(--text-muted);
}

[data-theme="dark"] .input-group-text {
    background-color: rgba(30, 41, 59, 0.8);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

/* =====================================================
   PAGINATION — Modern
   ===================================================== */
.pagination {
    gap: 4px;
}

.page-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    border-radius: var(--radius-sm) !important;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.4rem 0.75rem;
    transition: var(--transition);
    background-color: var(--bg-white);
}

.page-link:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateY(-1px);
}

.page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.3);
}

[data-theme="dark"] .page-link {
    background-color: var(--bg-white);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

[data-theme="dark"] .page-link:hover,
[data-theme="dark"] .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* =====================================================
   EMPTY STATE
   ===================================================== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    display: block;
    opacity: 0.4;
}

.empty-state p {
    font-size: 0.9rem;
}

/* =====================================================
   IMAGE PREVIEW
   ===================================================== */
.img-preview {
    max-width: 200px;
    max-height: 200px;
    border-radius: var(--radius-md);
    object-fit: cover;
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.img-preview:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.img-placeholder-sm {
    width: 40px;
    height: 40px;
    background: rgba(var(--primary-rgb), 0.05);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1rem;
}

/* =====================================================
   TIMELINE — Modern Activity
   ===================================================== */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary-light), var(--border-color));
}

.timeline-item {
    position: relative;
    padding-bottom: 1.25rem;
    padding-left: 1rem;
}

.timeline-marker {
    position: absolute;
    left: -1.55rem;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--bg-white);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
    transition: var(--transition);
}

.timeline-item:hover .timeline-marker {
    transform: scale(1.3);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.2);
}

.timeline-content {
    background: rgba(var(--primary-rgb), 0.02);
    border-radius: var(--radius-sm);
    padding: 0.85rem;
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.timeline-content:hover {
    border-color: rgba(var(--primary-rgb), 0.15);
    box-shadow: var(--shadow-sm);
}

/* Activity Log */
.activity-log-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.activity-log-list.compact {
    gap: 0.5rem;
}

.activity-log-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(var(--primary-rgb), 0.02);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.activity-log-item:hover {
    border-color: rgba(var(--primary-rgb), 0.15);
    box-shadow: var(--shadow-sm);
    transform: translateX(4px);
}

.activity-log-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.activity-log-icon.bg-success { background: var(--success); }
.activity-log-icon.bg-danger { background: var(--danger); }
.activity-log-icon.bg-warning { background: var(--warning); }
.activity-log-icon.bg-primary { background: var(--primary); }
.activity-log-icon.bg-info { background: var(--info); }
.activity-log-icon.bg-secondary { background: #64748b; }
.activity-log-icon.bg-purple { background: var(--purple); }

.activity-log-content {
    flex: 1;
    min-width: 0;
}

.activity-log-text {
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 0.2rem;
}

.activity-log-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.activity-log-meta span {
    font-size: 0.72rem;
    color: var(--text-muted);
}

[data-theme="dark"] .activity-log-item {
    background: rgba(255, 255, 255, 0.02);
}

/* =====================================================
   PROFILE
   ===================================================== */
.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2rem;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(var(--primary-rgb), 0.3);
}

.profile-foto-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto;
    display: inline-block;
}

.profile-foto {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

.profile-foto-edit {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    border: 2px solid var(--bg-white);
    transition: var(--transition);
    z-index: 2;
}

.profile-foto-edit:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

/* =====================================================
   FOOTER
   ===================================================== */
.main-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-light);
    background: var(--bg-white);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* =====================================================
   SIDEBAR OVERLAY (Mobile)
   ===================================================== */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-overlay);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* =====================================================
   AUTH / LOGIN PAGE
   ===================================================== */
.auth-body {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

.auth-body::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 10%;
    width: 400px;
    height: 400px;
    background: rgba(var(--primary-rgb), 0.15);
    border-radius: 50%;
    filter: blur(100px);
}

.auth-body::after {
    content: '';
    position: absolute;
    bottom: 10%;
    right: 15%;
    width: 300px;
    height: 300px;
    background: rgba(var(--accent-rgb), 0.1);
    border-radius: 50%;
    filter: blur(80px);
}

.auth-container {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.auth-card {
    display: flex;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    min-height: 500px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-branding {
    flex: 1;
    background: var(--primary-gradient);
    padding: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-branding-content {
    text-align: center;
    color: #fff;
    position: relative;
    z-index: 2;
}

.auth-logo-icon {
    width: 72px;
    height: 72px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.auth-branding h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.auth-branding h3 {
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.auth-branding p {
    font-size: 0.8rem;
    opacity: 0.7;
}

.auth-decorations {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.decoration-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}

.circle-1 { width: 200px; height: 200px; top: -50px; right: -50px; animation: float 6s ease-in-out infinite; }
.circle-2 { width: 150px; height: 150px; bottom: -30px; left: -30px; animation: float 8s ease-in-out infinite reverse; }
.circle-3 { width: 100px; height: 100px; top: 50%; left: 50%; transform: translate(-50%, -50%); animation: float 5s ease-in-out infinite 1s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.auth-form-wrapper {
    flex: 1;
    background: var(--bg-white);
    padding: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .auth-form-wrapper {
    background: #1e293b;
}

.auth-form-content {
    width: 100%;
    max-width: 340px;
}

.auth-form-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.auth-form-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.75rem;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    z-index: 2;
}

.input-icon-wrapper .form-control {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
    height: 48px;
    border-radius: var(--radius-sm);
    background-color: var(--bg-white);
}

[data-theme="dark"] .input-icon-wrapper .form-control {
    background-color: rgba(15, 23, 42, 0.5);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.password-toggle {
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    z-index: 2;
    transition: var(--transition);
}

.password-toggle:hover {
    color: var(--primary);
}

.btn-login {
    background: var(--primary-gradient);
    border: none;
    color: #fff;
    height: 48px;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.35);
    color: #fff;
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
}

.auth-footer p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.1rem;
}

.auth-footer-sub {
    font-size: 0.7rem !important;
    opacity: 0.6;
}

/* =====================================================
   DROPDOWN
   ===================================================== */
.dropdown-menu {
    font-family: 'Inter', sans-serif;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xl);
    border-radius: var(--radius-md);
    padding: 0.4rem;
    font-size: 0.85rem;
    background-color: var(--bg-white);
    animation: fadeInDown 0.15s ease;
}

.dropdown-item {
    border-radius: var(--radius-xs);
    padding: 0.55rem 0.85rem;
    transition: var(--transition-fast);
    color: var(--text-primary);
}

.dropdown-item:hover {
    background: rgba(var(--primary-rgb), 0.05);
    color: var(--primary);
}

[data-theme="dark"] .dropdown-menu {
    background-color: var(--bg-white);
    border-color: var(--border-color);
}

[data-theme="dark"] .dropdown-item {
    color: var(--text-primary);
}

[data-theme="dark"] .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary-light);
}

/* =====================================================
   ALERT
   ===================================================== */
.alert {
    font-size: 0.85rem;
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    border: none;
}

.alert-danger {
    background: rgba(var(--danger-rgb), 0.08);
    color: var(--danger);
}

.alert-success {
    background: rgba(var(--success-rgb), 0.08);
    color: var(--success);
}

.alert-warning {
    background: rgba(var(--warning-rgb), 0.08);
    color: var(--warning);
}

/* =====================================================
   LOADING SKELETON
   ===================================================== */
.skeleton {
    background: linear-gradient(90deg, var(--border-color) 25%, rgba(var(--primary-rgb), 0.05) 50%, var(--border-color) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

.skeleton-text {
    height: 14px;
    margin-bottom: 0.5rem;
    width: 80%;
}

.skeleton-title {
    height: 20px;
    margin-bottom: 0.75rem;
    width: 60%;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-card {
    height: 120px;
    border-radius: var(--radius-lg);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* =====================================================
   BACK TO TOP
   ===================================================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 42px;
    height: 42px;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: var(--z-backtop);
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

.back-to-top.show {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.4);
}

/* =====================================================
   COUNTER ANIMATION
   ===================================================== */
.counter-value {
    display: inline-block;
}

/* =====================================================
   WIDGET CARDS (Today's Summary)
   ===================================================== */
.widget-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 1rem;
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition);
}

.widget-card:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.widget-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.widget-info h6 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0;
    color: var(--text-primary);
}

.widget-info small {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* =====================================================
   QR CODE
   ===================================================== */
.qr-code-container {
    padding: 1rem;
    background: #fff;
    border-radius: var(--radius-md);
    display: inline-block;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.qr-code-container img {
    display: block;
}

/* =====================================================
   IMPORT GUIDE
   ===================================================== */
.import-icon {
    font-size: 3rem;
    color: var(--primary);
    display: block;
}

.import-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    background: rgba(var(--primary-rgb), 0.01);
}

.import-upload-area:hover {
    border-color: var(--primary-light);
    background: rgba(var(--primary-rgb), 0.03);
}

.import-guide {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.guide-step {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.guide-step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* =====================================================
   BACKUP INFO
   ===================================================== */
.backup-info {
    background: rgba(var(--primary-rgb), 0.02);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    border: 1px solid var(--border-light);
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.info-value {
    font-size: 0.88rem;
    color: var(--text-primary);
    font-weight: 500;
}

.table-item {
    padding: 0.5rem 0.75rem;
    background: rgba(var(--primary-rgb), 0.02);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    border: 1px solid var(--border-light);
}

[data-theme="dark"] .backup-info,
[data-theme="dark"] .table-item {
    background: rgba(255, 255, 255, 0.02);
}

/* =====================================================
   ANIMATIONS
   ===================================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes badgePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.stat-card {
    animation: fadeInUp 0.5s ease forwards;
}

.stat-card:nth-child(1) { animation-delay: 0s; }
.stat-card:nth-child(2) { animation-delay: 0.08s; }
.stat-card:nth-child(3) { animation-delay: 0.16s; }
.stat-card:nth-child(4) { animation-delay: 0.24s; }
.stat-card:nth-child(5) { animation-delay: 0.32s; }
.stat-card:nth-child(6) { animation-delay: 0.4s; }

.content-card {
    animation: fadeInUp 0.4s ease forwards;
}

.badge-pulse {
    animation: badgePulse 2s ease-in-out infinite;
}

/* Loading Spinner */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(var(--primary-rgb), 0.03);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* =====================================================
   TOAST / SWEETALERT
   ===================================================== */
.swal2-popup {
    font-family: 'Inter', sans-serif !important;
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--border-light) !important;
}

[data-theme="dark"] .swal2-popup {
    background: var(--bg-white) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .swal2-title {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .swal2-html-container {
    color: var(--text-secondary) !important;
}

/* =====================================================
   PUBLIC / WARGA PAGES — Elegant Dark Theme
   ===================================================== */
.public-navbar {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.public-navbar .nav-link {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0.75rem;
}

.public-navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-light);
    transition: var(--transition);
    border-radius: var(--radius-full);
}

.public-navbar .nav-link:hover,
.public-navbar .nav-link.active {
    color: #fff;
}

.public-navbar .nav-link:hover::after,
.public-navbar .nav-link.active::after {
    width: 60%;
}

/* Hero Section */
.hero-section {
    padding: 140px 0 100px;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    min-height: 70vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 10%;
    right: 5%;
    width: 500px;
    height: 500px;
    background: rgba(var(--primary-rgb), 0.08);
    border-radius: 50%;
    filter: blur(80px);
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 5%;
    left: 10%;
    width: 400px;
    height: 400px;
    background: rgba(var(--accent-rgb), 0.06);
    border-radius: 50%;
    filter: blur(60px);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    animation: float 3s ease-in-out infinite;
}

.scroll-indicator i {
    font-size: 1.5rem;
}

/* Public Stats */
.public-stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.public-stat-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-6px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Service Menu */
.service-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.service-card:hover {
    background: rgba(var(--primary-rgb), 0.08);
    border-color: rgba(var(--primary-rgb), 0.3);
    transform: translateY(-6px);
    box-shadow: var(--shadow-glow-primary);
}

.service-card-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-light);
    transition: var(--transition);
}

.service-card:hover .service-card-icon {
    transform: scale(1.1) rotate(5deg);
    background: rgba(var(--primary-rgb), 0.2);
}

/* Public Footer */
.footer-section {
    background: #020617;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 60px 0 30px;
    color: var(--text-muted);
}

/* Tracking Card */
.tracking-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.timeline-tracking {
    position: relative;
    padding-left: 30px;
}

.timeline-tracking::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item-track {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline-item-track::before {
    content: '';
    position: absolute;
    left: -35px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.timeline-item-track.active::before {
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(var(--success-rgb), 0.2);
}

/* hover-primary utility */
.hover-primary:hover {
    color: var(--primary-light) !important;
}

/* =====================================================
   DARK MODE — Remaining Component Overrides
   ===================================================== */
[data-theme="dark"] .top-navbar {
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(20px);
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .stat-card,
[data-theme="dark"] .content-card,
[data-theme="dark"] .main-footer {
    background: var(--bg-white);
    border-color: var(--border-color);
}

[data-theme="dark"] .stat-card-footer {
    background: rgba(15, 23, 42, 0.5);
    border-top-color: var(--border-color);
}

[data-theme="dark"] .content-card-header {
    background: linear-gradient(to right, rgba(255, 255, 255, 0.02), transparent);
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .bg-light {
    background-color: rgba(255, 255, 255, 0.06) !important;
}

[data-theme="dark"] .text-dark {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .text-muted {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .timeline-content {
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .import-upload-area {
    border-color: var(--border-color);
}

[data-theme="dark"] .sidebar-toggle,
[data-theme="dark"] .btn-link {
    color: var(--text-secondary);
}

[data-theme="dark"] .sidebar-toggle:hover,
[data-theme="dark"] .btn-link:hover {
    color: var(--text-primary);
}

[data-theme="dark"] .qr-code-container {
    background: #fff;
}

[data-theme="dark"] .widget-card {
    background: var(--bg-white);
    border-color: var(--border-color);
}

[data-theme="dark"] .quick-action-btn {
    background: var(--bg-white);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .quick-action-btn:hover {
    border-color: var(--primary-light);
    color: var(--primary-light);
}

[data-theme="dark"] .navbar-search .form-control {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .navbar-search .form-control:focus {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .theme-switcher {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1199.98px) {
    .navbar-search .form-control {
        width: 180px;
    }
    .navbar-search .form-control:focus {
        width: 220px;
    }
    .navbar-clock {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

    .main-content {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: flex;
    }

    .footer-content {
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }

    .navbar-search {
        display: none;
    }

    .hero-section {
        padding: 100px 0 60px;
        min-height: auto;
    }
}

@media (max-width: 767.98px) {
    .content-wrapper {
        padding: 1rem;
    }

    .stat-card-body {
        padding: 1rem;
    }

    .stat-info h3 {
        font-size: 1.25rem;
    }

    .auth-card {
        flex-direction: column;
        min-height: auto;
    }

    .auth-branding {
        padding: 1.5rem;
    }

    .auth-branding h2 { font-size: 1.1rem; }
    .auth-branding h3 { font-size: 0.9rem; }

    .auth-form-wrapper {
        padding: 1.5rem;
    }

    .chart-container {
        height: 250px;
    }

    .table {
        font-size: 0.8rem;
    }

    .dashboard-hero {
        padding: 1.25rem;
    }

    .hero-name {
        font-size: 1.2rem;
    }

    .hero-meta {
        gap: 0.5rem;
    }

    .hero-meta-item {
        font-size: 0.72rem;
        padding: 0.35rem 0.65rem;
    }

    .quick-actions {
        grid-template-columns: repeat(3, 1fr);
    }

    .notif-dropdown {
        width: 300px;
    }
}

@media (max-width: 575.98px) {
    .content-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .top-navbar {
        padding: 0 1rem;
    }

    .page-title {
        font-size: 1rem;
    }

    .hero-section {
        padding: 80px 0 40px;
    }

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

    .theme-switcher {
        display: none;
    }
}

/* =====================================================
   PRINT STYLES
   ===================================================== */
@media print {
    .sidebar, .top-navbar, .main-footer, .sidebar-overlay,
    .back-to-top, .quick-actions, .dashboard-hero {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
    }
    .content-wrapper {
        padding: 0 !important;
    }
    .stat-card, .content-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}
