/* style.css - Premium Glassmorphism and Neon Accent Design System with Dark/Light Mode Support */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #0f1524;
    --accent-primary: #6366f1; /* Indigo */
    --accent-secondary: #a855f7; /* Purple */
    --accent-success: #10b981; /* Emerald */
    --accent-danger: #ef4444; /* Rose */
    --accent-warning: #f59e0b; /* Amber */
    --glass-bg: rgba(22, 30, 49, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.03);
    --text-primary: #f8fafc;
    --text-muted: #94a3b8;
    --font-sans: 'Outfit', sans-serif;
    --shadow-neon: 0 0 20px rgba(99, 102, 241, 0.2);
    --shadow-neon-purple: 0 0 20px rgba(168, 85, 247, 0.25);
    --radius-lg: 16px;
    --radius-md: 10px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Theme-specific variables */
    --input-bg: rgba(15, 23, 42, 0.6);
    --input-focus-bg: rgba(15, 23, 42, 0.8);
    --table-header-bg: rgba(15, 23, 42, 0.4);
    --table-row-hover: rgba(255, 255, 255, 0.02);
    --welcome-card-bg: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(168, 85, 247, 0.15) 100%);
    --welcome-card-border: rgba(99, 102, 241, 0.2);
    --modal-bg-fallback: #0f1524;
}

/* Light Theme Variables */
.theme-light {
    --bg-primary: #f1f5f9;
    --bg-secondary: #ffffff;
    --accent-primary: #4f46e5;
    --accent-secondary: #9333ea;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(15, 23, 42, 0.08);
    --glass-highlight: rgba(15, 23, 42, 0.03);
    --text-primary: #0f172a;
    --text-muted: #64748b;
    --shadow-neon: 0 4px 20px rgba(99, 102, 241, 0.12);
    --shadow-neon-purple: 0 4px 20px rgba(168, 85, 247, 0.12);
    
    --input-bg: rgba(241, 245, 249, 0.9);
    --input-focus-bg: #ffffff;
    --table-header-bg: rgba(241, 245, 249, 0.8);
    --table-row-hover: rgba(99, 102, 241, 0.04);
    --welcome-card-bg: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(168, 85, 247, 0.08) 100%);
    --welcome-card-border: rgba(99, 102, 241, 0.15);
    --modal-bg-fallback: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(at 10% 10%, rgba(99, 102, 241, 0.1) 0px, transparent 40%),
        radial-gradient(at 90% 85%, rgba(168, 85, 247, 0.1) 0px, transparent 40%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

/* THEME TOGGLE BUTTON */
.theme-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition-smooth);
    margin-right: 15px;
    outline: none;
}

.theme-toggle-btn:hover {
    color: var(--text-primary);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-neon);
}

.theme-light .theme-toggle-btn {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(79, 70, 229, 0.25);
    color: var(--accent-primary);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.15);
}

.theme-light .theme-toggle-btn:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.theme-toggle-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle-btn:hover svg {
    transform: rotate(30deg);
}

/* LOGIN LAYOUT */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-background-decor {
    position: absolute;
    width: 300px;
    height: 300px;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.2;
    z-index: 0;
    top: 25%;
    left: 25%;
    pointer-events: none;
}

.login-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    width: 100%;
    max-width: 440px;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    z-index: 1;
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.login-header {
    text-align: center;
    margin-bottom: 20px;
}

.login-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 0;
}

.login-logo-img {
    width: 195px;
    height: auto;
    display: block;
    object-fit: contain;
    margin: 0 auto;
}

.login-header h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 6px;
}

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

/* FORM ELEMENTS */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.input-container svg.input-icon {
    position: absolute;
    left: 14px;
    width: 20px;
    height: 20px;
    fill: var(--text-muted);
    transition: var(--transition-smooth);
}

.form-control {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 14px 14px 14px 44px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 15px;
    transition: var(--transition-smooth);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
    background: var(--input-focus-bg);
}

.form-control:focus + svg.input-icon {
    fill: var(--accent-primary);
}

.password-toggle {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    padding: 0;
    transition: var(--transition-smooth);
}

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

.password-toggle svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.btn {
    width: 100%;
    padding: 14px;
    border-radius: var(--radius-md);
    border: none;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: var(--shadow-neon-purple);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.4);
}

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

/* Alert Notification Styles */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 4px solid transparent;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--accent-danger);
    color: #fca5a5;
}

.theme-light .alert-danger {
    color: #b91c1c;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--accent-success);
    color: #a7f3d0;
}

.theme-light .alert-success {
    color: #047857;
}

/* APP MAIN LAYOUT */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR STYLES */
.sidebar {
    width: 270px;
    background: var(--glass-bg);
    border-right: 1px solid var(--glass-border);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
    transition: var(--transition-smooth);
}

.sidebar-brand {
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--glass-border);
}

.sidebar-logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    width: 100%;
}

.sidebar-logo-img {
    width: 195px;
    height: auto;
    display: block;
    object-fit: contain;
    margin: 0 auto;
    transition: opacity 0.2s ease;
}

.sidebar-logo-link:hover .sidebar-logo-img {
    opacity: 0.85;
}

.sidebar-menu {
    list-style: none;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
}

.sidebar-item-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 12px 6px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.sidebar-link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

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

.sidebar-link.active {
    color: #c084fc !important; /* contrastive glowing purple */
    font-weight: 700;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(168, 85, 247, 0.1));
    border: 1px solid rgba(168, 85, 247, 0.4);
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.1);
}

.sidebar-link.active svg {
    fill: #c084fc !important;
}

.theme-light .sidebar-link.active {
    color: #7e22ce !important; /* deep, high-contrast purple */
    background: rgba(147, 51, 234, 0.08);
    border: 1px solid rgba(147, 51, 234, 0.25);
    box-shadow: none;
}

.theme-light .sidebar-link.active svg {
    fill: #7e22ce !important;
}

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

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: #fda4af;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-smooth);
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.1);
}

.sidebar-logout svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.sidebar-logout:hover {
    background: var(--accent-danger);
    color: white;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

/* MAIN CONTENT AREA */
.main-content {
    margin-left: 270px;
    flex-grow: 1;
    min-width: 0;
    padding: 16px 40px 30px;
    min-height: 100vh;
    animation: fadeIn 0.4s ease-out forwards;
}

/* TOP NAVBAR STYLES */
.top-navbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 20px;
    padding: 12px 24px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 5;
    position: relative;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.theme-light .top-navbar {
    background: var(--glass-bg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* Profile Dropdown styling */
.profile-wrapper {
    position: relative;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 6px 14px 6px 6px;
    border-radius: 40px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.profile-trigger:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-neon);
}

.profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.profile-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.profile-role {
    font-size: 11px;
    color: var(--text-muted);
}

.profile-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    width: 220px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 10px;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: var(--transition-smooth);
}

.profile-wrapper:hover .profile-dropdown,
.profile-dropdown.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.dropdown-item svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.dropdown-item:hover {
    color: var(--text-primary);
    background: var(--glass-highlight);
}

.dropdown-divider {
    height: 1px;
    background: var(--glass-border);
    margin: 8px 0;
}

.dropdown-logout {
    color: #fda4af;
}

.dropdown-logout:hover {
    background: rgba(239, 68, 68, 0.15);
    color: white;
}

.theme-light .dropdown-logout {
    color: #b91c1c;
}
.theme-light .dropdown-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* CARDS AND TABLES */
.dashboard-title {
    margin-bottom: 24px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    overflow: hidden;
    margin-bottom: 30px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
    background: var(--glass-bg);
    z-index: 5;
    flex-wrap: wrap;
    gap: 12px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.btn-add {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 10px 18px;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-neon-purple);
    transition: var(--transition-smooth);
}

.btn-add svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
}

/* TABLE STYLING */
.table-responsive {
    width: 100%;
    max-height: 460px;
    overflow: auto;
    padding: 0;
    -webkit-overflow-scrolling: touch;
    position: relative;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.table-custom {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
    text-align: left;
    font-size: 13px;
}

/* Column width definitions (suggested widths for table-layout: auto) */
.table-custom .col-no       { width: 50px; }
.table-custom .col-date     { width: 110px; }
.table-custom .col-noagenda { width: 110px; }
.table-custom .col-origin   { width: 180px; }
.table-custom .col-nosurat  { width: 140px; }
.table-custom .col-lampiran { width: 100px; }
.table-custom .col-perihal  { width: 300px; }
.table-custom .col-aksi     { width: 90px; }

.table-custom th {
    position: sticky;
    top: 0;
    z-index: 10;
    /* Fully opaque so rows never bleed through when scrolling */
    background: #0f1524;
    box-shadow: 0 2px 0 rgba(99,102,241,0.25), inset 0 -1px 0 var(--glass-border);
    padding: 14px 16px;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.8px;
    white-space: nowrap;
    transition: background-color 0.3s ease;
}

/* Light-mode: use an opaque light colour */
.theme-light .table-custom th {
    background: #f1f5f9;
    box-shadow: 0 2px 0 rgba(79,70,229,0.15), inset 0 -1px 0 rgba(15,23,42,0.08);
}

.table-custom td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-muted);
    vertical-align: middle;
    transition: var(--transition-smooth);
    white-space: nowrap;
    line-height: 1.5;
}

/* Specific column styling */
.table-custom td.col-no {
    text-align: center;
}

.table-custom td.col-date {
    /* Kept for consistency */
}

.table-custom td.col-origin {
    font-weight: 600;
    color: var(--text-primary);
}

.table-custom td.col-aksi {
    text-align: center;
}

/* Export Excel Button */
.btn-export {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
    border-radius: var(--radius-md);
    padding: 10px 18px;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.theme-light .btn-export {
    background: rgba(16, 185, 129, 0.08);
    color: #059669;
    border-color: rgba(16, 185, 129, 0.2);
}

.btn-export:hover {
    background: var(--accent-success);
    color: white;
    border-color: var(--accent-success);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
    transform: translateY(-2px);
}

.btn-export svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Filter Bar Styles */
.filter-bar {
    display: flex;
    gap: 15px;
    padding: 16px 24px;
    background: rgba(15, 23, 42, 0.2);
    border-bottom: 1px solid var(--glass-border);
    flex-wrap: wrap;
    align-items: flex-end;
}

.theme-light .filter-bar {
    background: rgba(241, 245, 249, 0.4);
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
    min-width: 150px;
}

.filter-item-search {
    flex-grow: 2;
    min-width: 250px;
}

.filter-bar .form-control {
    padding: 10px 14px;
    font-size: 13px;
    border-radius: 8px;
}

.filter-bar select.form-control {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2394a3b8'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 32px;
}

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

.table-custom tbody tr:hover {
    background: var(--table-row-hover);
}

.table-custom tbody tr:hover td {
    color: var(--text-primary);
}

/* Table badges and actions */
.badge-role {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

.badge-role.super {
    background: rgba(168, 85, 247, 0.15);
    color: #e9d5ff;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.theme-light .badge-role.super {
    background: rgba(147, 51, 234, 0.08);
    color: #7e22ce;
    border: 1px solid rgba(147, 51, 234, 0.2);
}

.badge-role.user {
    background: rgba(99, 102, 241, 0.15);
    color: #e0e7ff;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.theme-light .badge-role.user {
    background: rgba(79, 70, 229, 0.08);
    color: #4338ca;
    border: 1px solid rgba(79, 70, 229, 0.2);
}

.table-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(15, 23, 42, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    color: var(--text-muted);
}

.theme-light .btn-icon {
    background: rgba(241, 245, 249, 0.8);
}

.btn-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.btn-icon-edit:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent-primary);
    color: #818cf8;
}

.theme-light .btn-icon-edit:hover {
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
}

.btn-icon-detail:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--accent-success);
    color: #34d399;
}

.theme-light .btn-icon-detail:hover {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.btn-icon-delete:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--accent-danger);
    color: #f87171;
}

.theme-light .btn-icon-delete:hover {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

/* Empty State Styling */
.empty-state {
    padding: 60px 40px;
    text-align: center;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    fill: var(--text-muted);
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 13px;
}

/* STAT CARDS FOR DASHBOARD HOMEPAGE */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transition: var(--transition-smooth);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--shadow-neon);
}

.stat-details h4 {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.stat-details .stat-val {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
}

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

.stat-icon-wrapper.indigo {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

.stat-icon-wrapper.purple {
    background: linear-gradient(135deg, #a855f7, #9333ea);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.2);
}

.stat-icon-wrapper.emerald {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.stat-icon-wrapper svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
}

/* MODALS FOR CRUD */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(6, 10, 18, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.modal.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-dialog {
    background: var(--modal-bg-fallback);
    border: 1px solid var(--glass-border);
    width: 100%;
    max-width: 600px;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    transform: scale(0.9);
    transition: var(--transition-smooth);
}

.modal.show .modal-dialog {
    transform: scale(1);
}

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

.modal-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

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

.btn-close svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Custom modal input fields */
.modal-body .form-group {
    margin-bottom: 18px;
}

.modal-body .form-control {
    padding: 12px 14px;
}

.modal-body select.form-control {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2394a3b8'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 20px;
    padding-right: 40px;
}

.modal-body select.form-control option {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-cancel {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
}

.btn-cancel:hover {
    background: var(--glass-highlight);
    color: var(--text-primary);
}

/* User profile display card on Home Dashboard */
.welcome-card {
    background: var(--welcome-card-bg);
    border: 1px solid var(--welcome-card-border);
    border-radius: var(--radius-lg);
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.welcome-decor {
    position: absolute;
    right: -50px;
    top: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.welcome-info h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.welcome-info p {
    color: var(--text-muted);
    font-size: 14px;
}

.welcome-date {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text-primary);
}

.theme-light .welcome-date {
    background: rgba(15, 23, 42, 0.04);
}

/* Tooltip & micro interactions */
.tooltip-top {
    position: relative;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .sidebar {
        width: 80px;
    }
    
    .sidebar-brand-name,
    .sidebar-item-label,
    .sidebar-link span {
        display: none;
    }
    
    .sidebar-brand {
        justify-content: center;
        padding: 20px 0;
    }
    
    .sidebar-link {
        justify-content: center;
        padding: 12px;
    }
    
    .sidebar-footer {
        padding: 20px 0;
        display: flex;
        justify-content: center;
    }
    
    .sidebar-logout span {
        display: none;
    }
    
    .sidebar-logout {
        justify-content: center;
        padding: 12px;
        width: 44px;
        height: 44px;
        border-radius: 50%;
    }
    
    .main-content {
        margin-left: 80px;
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .login-card {
        padding: 24px;
    }
    
    .top-navbar {
        margin-bottom: 20px;
    }
    
    .profile-info {
        display: none;
    }
    
    .card-header-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 20px;
    }
    
    .btn-add {
        width: 100%;
        justify-content: center;
    }
}
