/* ============================================================
   EEPROM Humas Management System
   Global CSS Design System
   Version: 1.0.0
   ============================================================ */

/* ============================================================
   DESIGN TOKENS
   ============================================================ */

:root {
    /* Colors */
    --primary:        #6C63FF;
    --primary-light:  #8B7FFF;
    --primary-dark:   #5A52D5;
    --accent:         #8B5CF6;
    --accent-light:   #A78BFA;

    --bg:             #0F172A;
    --bg-secondary:   #0D1425;
    --card:           #1E293B;
    --card-hover:     #253347;
    --card-active:    #2D3E52;

    --border:         rgba(108, 99, 255, 0.18);
    --border-light:   rgba(255, 255, 255, 0.06);
    --border-hover:   rgba(108, 99, 255, 0.4);

    --text:           #E2E8F0;
    --text-muted:     #94A3B8;
    --text-faint:     #475569;
    --text-invert:    #0F172A;

    --success:        #10B981;
    --warning:        #F59E0B;
    --danger:         #EF4444;
    --info:           #06B6D4;

    /* Spacing */
    --radius:         16px;
    --radius-sm:      10px;
    --radius-xs:      6px;
    --radius-lg:      24px;
    --radius-full:    9999px;

    /* Shadows */
    --shadow-sm:      0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow:         0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg:      0 20px 60px rgba(0, 0, 0, 0.5);
    --shadow-primary: 0 8px 32px rgba(108, 99, 255, 0.25);

    /* Sidebar */
    --sidebar-w:      260px;
    --sidebar-collapsed-w: 72px;
    --header-h:       64px;

    /* Transitions */
    --transition:     all 0.25s 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.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   RESET & BASE
   ============================================================ */

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

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

body {
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition-fast); }
a:hover { color: var(--primary-light); }

img { max-width: 100%; height: auto; display: block; }
input, textarea, select, button { font-family: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; }
pre { font-family: 'Cascadia Code', 'Fira Code', monospace; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(108, 99, 255, 0.3); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1, h2, h3, h4, h5, h6 { font-weight: 600; line-height: 1.3; color: var(--text); }
h1 { font-size: 1.875rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

.text-sm    { font-size: 0.875rem; }
.text-xs    { font-size: 0.75rem; }
.text-lg    { font-size: 1.125rem; }
.text-xl    { font-size: 1.25rem; }
.text-muted { color: var(--text-muted); }
.text-danger{ color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.fw-600     { font-weight: 600; }
.fw-700     { font-weight: 700; }
.line-through { text-decoration: line-through; }
.font-mono  { font-family: 'Cascadia Code', 'Fira Code', monospace; font-size: 0.85rem; }

/* ============================================================
   LAYOUT — APP SHELL
   ============================================================ */

.app-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-wrapper.sidebar-collapsed {
    margin-left: var(--sidebar-collapsed-w);
}

.main-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
}

/* ============================================================
   SIDEBAR
   ============================================================ */

.sidebar {
    width: var(--sidebar-w);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: var(--card);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-w);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 16px 16px;
    border-bottom: 1px solid var(--border-light);
    min-height: 72px;
    flex-shrink: 0;
}

.brand-logo { flex-shrink: 0; }
.brand-logo svg { border-radius: 12px; }

.brand-text {
    flex: 1;
    overflow: hidden;
    opacity: 1;
    transition: var(--transition);
    white-space: nowrap;
}

.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-arrow,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .user-info {
    opacity: 0;
    pointer-events: none;
    width: 0;
    overflow: hidden;
}

.brand-name { display: block; font-weight: 700; font-size: 1rem; color: var(--text); }
.brand-sub  { display: block; font-size: 0.65rem; color: var(--text-muted); }

.sidebar-toggle {
    margin-left: auto;
    flex-shrink: 0;
    color: var(--text-muted);
}

/* Nav */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 8px;
}

.nav-list { display: flex; flex-direction: column; gap: 2px; }
.nav-item { position: relative; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    width: 100%;
    transition: var(--transition-fast);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.nav-link:hover {
    background: rgba(108, 99, 255, 0.08);
    color: var(--text);
}

.nav-link.active {
    background: rgba(108, 99, 255, 0.15);
    color: var(--primary-light);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--primary);
    border-radius: 0 var(--radius-full) var(--radius-full) 0;
}

.nav-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon svg { width: 18px; height: 18px; }

.nav-label { flex: 1; transition: var(--transition); }

.nav-arrow {
    flex-shrink: 0;
    transition: transform 0.25s ease;
    opacity: 0.5;
}

.nav-arrow svg { width: 14px; height: 14px; }

.nav-parent.open .nav-arrow { transform: rotate(90deg); }

/* Submenu */
.nav-children {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
}

.nav-children.open { max-height: 400px; }

.nav-child {
    padding-left: 36px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.nav-child:hover { color: var(--text); }
.nav-child.active { color: var(--primary-light); }

.nav-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.nav-badge {
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Sidebar User */
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid var(--border-light);
    min-height: 68px;
    flex-shrink: 0;
}

.sidebar.collapsed .sidebar-user { justify-content: center; }

/* Tooltip for collapsed sidebar */
.sidebar.collapsed .nav-link::after {
    content: attr(title);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--card-hover);
    color: var(--text);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow);
}

.sidebar.collapsed .nav-link:hover::after { opacity: 1; }

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

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

/* ============================================================
   HEADER
   ============================================================ */

.app-header {
    height: var(--header-h);
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
    flex-shrink: 0;
}

.header-left { display: flex; align-items: center; gap: 12px; }
.header-center { flex: 1; max-width: 480px; }
.header-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.mobile-menu-btn { display: none; }

.breadcrumb {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

/* Search Bar */
.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    transition: var(--transition-fast);
    cursor: text;
}

.search-bar:focus-within {
    border-color: var(--primary);
    background: rgba(108, 99, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

.search-bar svg { color: var(--text-muted); width: 16px; height: 16px; flex-shrink: 0; }

.search-bar input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 0.875rem;
    min-width: 0;
}

.search-bar input::placeholder { color: var(--text-faint); }

.search-bar kbd {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.7rem;
    color: var(--text-faint);
    font-family: inherit;
    white-space: nowrap;
}

/* Notification Button */
.notification-btn-wrapper { position: relative; }

.notification-btn {
    position: relative;
    color: var(--text-muted);
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 360px;
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    pointer-events: none;
    transition: var(--transition-fast);
    z-index: 200;
}

.notification-btn-wrapper.open .notification-dropdown {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
}

.notif-list { max-height: 360px; overflow-y: auto; }

.notif-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition-fast);
    cursor: pointer;
}

.notif-item:hover { background: rgba(255, 255, 255, 0.03); }
.notif-item.unread { background: rgba(108, 99, 255, 0.05); }

.notif-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.notif-empty svg { width: 32px; height: 32px; opacity: 0.4; }

/* User Menu */
.user-menu-wrapper { position: relative; }

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    transition: var(--transition-fast);
    color: var(--text);
}

.user-menu-btn:hover {
    background: rgba(108, 99, 255, 0.1);
    border-color: var(--border-hover);
}

.user-menu-btn svg { width: 16px; height: 16px; color: var(--text-muted); }

.user-info-header { display: flex; flex-direction: column; align-items: flex-start; }
.user-name-header { font-size: 0.875rem; font-weight: 600; }
.user-role-header { font-size: 0.7rem; color: var(--text-muted); }

.user-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 260px;
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    pointer-events: none;
    transition: var(--transition-fast);
    z-index: 200;
}

.user-menu-wrapper.open .user-dropdown {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.dropdown-header {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 16px;
    background: rgba(108, 99, 255, 0.06);
}

.dropdown-divider { border: none; border-top: 1px solid var(--border-light); margin: 4px 0; }

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    font-size: 0.875rem;
    color: var(--text);
    transition: var(--transition-fast);
}

.dropdown-item:hover { background: rgba(255, 255, 255, 0.04); }
.dropdown-item svg { width: 16px; height: 16px; }

/* ============================================================
   AVATAR
   ============================================================ */

.avatar {
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
    overflow: hidden;
    color: white;
    background: var(--primary);
}

.avatar-xs  { width: 24px; height: 24px; font-size: 0.65rem; }
.avatar-sm  { width: 32px; height: 32px; font-size: 0.75rem; }
.avatar-md  { width: 40px; height: 40px; font-size: 0.875rem; }
.avatar-lg  { width: 48px; height: 48px; font-size: 1rem; }
.avatar-xl  { width: 80px; height: 80px; font-size: 1.5rem; }

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

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    transition: var(--transition-fast);
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: background 0.2s;
}

.btn:hover::after { background: rgba(255,255,255,0.05); }
.btn:active::after { background: rgba(0,0,0,0.1); }

.btn svg { width: 16px; height: 16px; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 4px 16px rgba(108, 99, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(108, 99, 255, 0.4);
}

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

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

.btn-outline:hover {
    background: rgba(108, 99, 255, 0.1);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border-color: transparent;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #DC2626);
    color: white;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

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

.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-xs { padding: 4px 8px; font-size: 0.75rem; }
.btn-full { width: 100%; }
.btn-text { background: none; color: var(--primary); font-size: inherit; font-weight: 600; }
.btn-text:hover { text-decoration: underline; }

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.btn-icon.btn-sm { width: 30px; height: 30px; }
.btn-icon.btn-xs { width: 24px; height: 24px; }
.btn-icon svg { width: 16px; height: 16px; }
.btn-icon.btn-sm svg { width: 14px; height: 14px; }

/* ============================================================
   CARDS
   ============================================================ */

.card {
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover { border-color: var(--border-hover); }

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

.card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.card-title svg { width: 18px; height: 18px; color: var(--primary); }

.card-body { padding: 20px; }

/* ============================================================
   FORM ELEMENTS
   ============================================================ */

.form { display: flex; flex-direction: column; gap: 16px; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
}

.form-group.span-2 { grid-column: span 2; }

label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text);
    font-size: 0.875rem;
    font-family: inherit;
    transition: var(--transition-fast);
    outline: none;
    appearance: none;
}

.form-input:focus {
    border-color: var(--primary);
    background: rgba(108, 99, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.12);
}

.form-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

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

select.form-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394A3B8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
}

select.form-input option { background: var(--card); color: var(--text); }

.form-hint { font-size: 0.75rem; color: var(--text-faint); }

.form-group.error .form-input {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
}

.field-error {
    font-size: 0.75rem;
    color: var(--danger);
}

.form-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 8px 0 4px;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 8px;
}

/* Input with icon */
.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-wrapper > svg:first-child {
    position: absolute;
    left: 14px;
    color: var(--text-faint);
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.input-icon-wrapper .form-input {
    padding-left: 42px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    color: var(--text-faint);
    transition: var(--transition-fast);
}

.password-toggle:hover { color: var(--text); }
.password-toggle svg { width: 18px; height: 18px; }

/* Range Input */
.range-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

input[type="range"] {
    flex: 1;
    appearance: none;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-full);
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    background: var(--primary);
    box-shadow: 0 0 8px rgba(108,99,255,0.5);
    cursor: pointer;
}

/* Search Input Wrapper */
.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper > svg {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: var(--text-faint);
    pointer-events: none;
}

.search-input-wrapper input {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 9px 14px 9px 38px;
    color: var(--text);
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    width: 240px;
    transition: var(--transition-fast);
}

.search-input-wrapper input:focus {
    border-color: var(--primary);
    background: rgba(108,99,255,0.05);
    width: 280px;
    box-shadow: 0 0 0 3px rgba(108,99,255,0.1);
}

.select-input {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 9px 36px 9px 14px;
    color: var(--text);
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394A3B8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    transition: var(--transition-fast);
}

.select-input:focus { border-color: var(--primary); }
.select-input option { background: var(--card); color: var(--text); }

/* ============================================================
   BADGES
   ============================================================ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.badge svg { width: 12px; height: 12px; }

.badge-primary { background: rgba(108,99,255,0.15); color: var(--primary-light); }
.badge-success { background: rgba(16,185,129,0.15); color: var(--success); }
.badge-warning { background: rgba(245,158,11,0.15); color: var(--warning); }
.badge-danger  { background: rgba(239,68,68,0.15); color: var(--danger); }
.badge-muted   { background: rgba(148,163,184,0.12); color: var(--text-muted); }

.tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: rgba(108,99,255,0.1);
    color: var(--primary-light);
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 500;
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */

.progress-bar {
    height: 8px;
    background: rgba(255,255,255,0.06);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar.sm { height: 5px; }

.progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--primary);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.15) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Circular Progress */
.circular-progress {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: conic-gradient(
        var(--color, var(--primary)) calc(var(--progress, 0) * 3.6deg),
        rgba(255,255,255,0.06) 0deg
    );
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.circular-progress::before {
    content: '';
    position: absolute;
    inset: 8px;
    background: var(--card);
    border-radius: 50%;
}

.circular-progress-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.circular-value { font-size: 1.1rem; font-weight: 700; }
.circular-label { font-size: 0.6rem; color: var(--text-muted); text-transform: uppercase; }

/* ============================================================
   TOOLBAR
   ============================================================ */

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.toolbar-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: 10px; }

.view-toggle {
    display: flex;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.view-btn {
    padding: 5px 10px;
    border-radius: 6px;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.view-btn.active {
    background: var(--primary);
    color: white;
}

.view-btn svg { width: 16px; height: 16px; }

/* ============================================================
   TABS
   ============================================================ */

.tabs-wrapper {
    margin-bottom: 20px;
}

.tabs {
    display: flex;
    gap: 4px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 4px;
    width: fit-content;
    flex-wrap: wrap;
}

.tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition-fast);
    white-space: nowrap;
}

.tab:hover { color: var(--text); background: rgba(255,255,255,0.04); }

.tab.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(108,99,255,0.3);
}

.tab svg { width: 16px; height: 16px; }

.tab-badge {
    background: rgba(255,255,255,0.2);
    color: inherit;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    min-width: 20px;
    text-align: center;
}

.tab-content { padding-top: 4px; }

/* ============================================================
   PAGE HEADER
   ============================================================ */

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.page-subtitle { color: var(--text-muted); font-size: 0.9rem; }

.page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ============================================================
   DASHBOARD
   ============================================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: center;
    transition: var(--transition);
    cursor: default;
}

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

.stat-card.danger { border-color: rgba(239,68,68,0.3); }

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg { width: 24px; height: 24px; }

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--text), var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label { font-size: 0.82rem; color: var(--text-muted); margin: 4px 0; }

.stat-sub { display: flex; gap: 6px; flex-wrap: wrap; }

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.dashboard-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.dashboard-card-lg { grid-column: span 2; }

/* Programs Progress List */
.programs-progress-list { display: flex; flex-direction: column; gap: 14px; }

.program-progress-item {
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    padding: 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

.program-progress-item:hover {
    background: rgba(255,255,255,0.03);
    border-color: var(--border-light);
}

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

.program-name {
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.program-meta { display: flex; gap: 8px; align-items: center; margin-top: 3px; }

.program-progress-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 200px;
    flex-shrink: 0;
}

.program-progress-bar-wrapper .progress-bar { flex: 1; }

.progress-percent { font-size: 0.8rem; font-weight: 700; min-width: 36px; text-align: right; }

/* Deadline List */
.deadline-list { display: flex; flex-direction: column; gap: 10px; }

.deadline-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

.deadline-item:hover { background: rgba(255,255,255,0.03); border-color: var(--border-light); }
.deadline-item.urgent { border-color: rgba(239,68,68,0.2); background: rgba(239,68,68,0.04); }

.deadline-priority {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.deadline-priority svg { width: 16px; height: 16px; }

.deadline-info { flex: 1; min-width: 0; }
.deadline-title { font-size: 0.875rem; font-weight: 500; }
.deadline-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

.deadline-days {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.deadline-days svg { width: 13px; height: 13px; }

/* Activity List */
.activity-list { display: flex; flex-direction: column; gap: 14px; }

.activity-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon svg { width: 14px; height: 14px; }
.activity-text { font-size: 0.82rem; line-height: 1.4; }
.activity-time { margin-top: 2px; }

/* Mini Calendar */
.mini-calendar {}

.mini-cal-header {
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 12px;
    color: var(--text);
}

.mini-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.mini-cal-day-header {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-faint);
    padding: 4px;
}

.mini-cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
    color: var(--text-muted);
    position: relative;
}

.mini-cal-day:hover { background: rgba(108,99,255,0.1); color: var(--text); }
.mini-cal-day.today { background: var(--primary); color: white; font-weight: 700; }
.mini-cal-day.empty { cursor: default; color: var(--text-faint); opacity: 0.3; }

/* Chart */
.chart-container { position: relative; height: 220px; }
.chart-legend { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.legend-label { flex: 1; color: var(--text-muted); }
.legend-count { font-weight: 600; color: var(--text); }

/* ============================================================
   PROGRAMS GRID
   ============================================================ */

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

.program-card {
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.program-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--border-hover);
}

.program-card-header {
    padding: 20px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.program-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.program-icon svg { width: 22px; height: 22px; }

.program-card-body { padding: 0 20px 20px; }

.program-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.program-card-desc {
    margin-bottom: 14px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.program-card-meta { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.meta-item svg { width: 13px; height: 13px; }

.program-card-progress { margin-bottom: 16px; }

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.program-card-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.stat-mini {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.stat-mini svg { width: 13px; height: 13px; }

.program-card-arrow {
    margin-left: auto;
    color: var(--text-faint);
    transition: var(--transition-fast);
}

.program-card:hover .program-card-arrow { color: var(--primary); transform: translateX(4px); }
.program-card-arrow svg { width: 18px; height: 18px; }

/* Program Stats Row */
.program-stats-row {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.program-stat-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    color: var(--text-muted);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* ============================================================
   PROGRAM DETAIL
   ============================================================ */

.program-detail-header {
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
}

.program-detail-title-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.program-icon-lg {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.program-icon-lg svg { width: 28px; height: 28px; }

.program-detail-info { flex: 1; }

.program-detail-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 8px 0;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.program-detail-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.program-detail-meta svg { width: 14px; height: 14px; }

.program-quick-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.quick-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.quick-stat svg { width: 18px; height: 18px; }

/* Overview Grid */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* Checklist */
.checklist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    font-size: 0.875rem;
}

.checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.checkbox svg { width: 12px; height: 12px; color: white; }

/* Task Status Summary */
.task-status-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}

.task-status-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    width: 110px;
    flex-shrink: 0;
}

.task-status-label svg { width: 14px; height: 14px; }

.task-status-bar {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-status-bar .progress-bar { flex: 1; }
.task-status-count { font-size: 0.8rem; font-weight: 700; min-width: 20px; text-align: right; }

/* Info List */
.info-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 16px;
    font-size: 0.875rem;
}

.info-list dt { color: var(--text-muted); font-weight: 500; }
.info-list dd { color: var(--text); }

/* ============================================================
   TASKS
   ============================================================ */

.task-stats-row {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.task-stat-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    color: var(--text-muted);
    transition: var(--transition-fast);
    cursor: pointer;
}

.task-stat-pill:hover { border-color: var(--border-hover); color: var(--text); }
.task-stat-pill.active { background: rgba(108,99,255,0.1); border-color: var(--primary); color: var(--primary-light); }
.task-stat-pill strong { font-weight: 700; }
.task-stat-pill svg { width: 14px; height: 14px; }

/* Task Cards */
.task-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.task-card {
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 16px;
    transition: var(--transition);
    position: relative;
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--border-hover);
}

.task-card.overdue { border-color: rgba(239,68,68,0.3); }

.task-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.task-card-status {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
}

.task-card-status svg { width: 11px; height: 11px; }

.task-card-priority {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 600;
}

.task-card-priority svg { width: 12px; height: 12px; }
.task-card-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 5px; line-height: 1.4; }
.task-card-desc { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 10px; line-height: 1.4; }
.task-card-program { display: flex; align-items: center; gap: 5px; font-size: 0.78rem; color: var(--primary-light); margin-bottom: 12px; }
.task-card-program svg { width: 12px; height: 12px; }
.task-card-progress { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.task-card-progress .progress-bar { flex: 1; }

.task-card-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.task-card-assignee { display: flex; align-items: center; gap: 6px; flex: 1; }

.task-deadline {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.task-deadline svg { width: 13px; height: 13px; }

.task-card-actions { display: flex; gap: 4px; }

/* Task List Header */
.task-list-header { padding: 8px 0 12px; }

/* Task Row (for program detail) */
.task-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition-fast);
}

.task-row:hover { background: rgba(255,255,255,0.02); }
.task-row.overdue { background: rgba(239,68,68,0.04); }
.status-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.task-row-content { flex: 1; min-width: 0; }
.task-row-title { font-size: 0.875rem; font-weight: 500; }
.task-row-meta { display: flex; gap: 10px; margin-top: 4px; flex-wrap: wrap; }
.task-row-progress { display: flex; align-items: center; gap: 8px; width: 120px; flex-shrink: 0; }
.task-row-progress .progress-bar { flex: 1; }
.task-row-actions { display: flex; gap: 4px; }

/* Tab Toolbar */
.tab-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}

/* ============================================================
   KANBAN
   ============================================================ */

.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    align-items: start;
    overflow-x: auto;
}

.kanban-column {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 12px;
    min-width: 240px;
}

.kanban-col-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 4px 14px;
    font-weight: 600;
    font-size: 0.875rem;
}

.kanban-col-title { display: flex; align-items: center; gap: 8px; }
.kanban-col-title svg { width: 16px; height: 16px; }

.kanban-count {
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-full);
    padding: 1px 8px;
    font-size: 0.75rem;
}

.kanban-cards { display: flex; flex-direction: column; gap: 10px; }
.kanban-empty { text-align: center; font-size: 0.8rem; color: var(--text-faint); padding: 20px; }

.kanban-card {
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 12px;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

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

.kanban-card-priority {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
}

.kanban-card-title { font-size: 0.85rem; font-weight: 500; padding-left: 8px; margin-bottom: 8px; }
.kanban-assignee { display: flex; align-items: center; gap: 4px; padding-left: 8px; margin-bottom: 4px; }
.kanban-deadline { display: flex; align-items: center; gap: 4px; padding-left: 8px; margin-bottom: 8px; }
.kanban-deadline svg { width: 12px; height: 12px; }
.kanban-card-actions { display: flex; gap: 4px; justify-content: flex-end; }

/* ============================================================
   TEMPLATES
   ============================================================ */

.template-type-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.template-type-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: var(--transition-fast);
    cursor: pointer;
}

.template-type-tab:hover { border-color: var(--border-hover); color: var(--text); }
.template-type-tab.active {
    background: rgba(108,99,255,0.15);
    border-color: var(--primary);
    color: var(--primary-light);
}

.template-type-tab svg { width: 16px; height: 16px; }

.template-search { margin-bottom: 20px; }

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.template-card {
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 18px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.template-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--border-hover);
}

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

.template-type-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
}

.template-type-badge svg { width: 12px; height: 12px; }
.template-card-actions { display: flex; gap: 4px; align-items: center; }
.template-card-title { font-size: 0.95rem; font-weight: 600; }

.template-preview {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 12px;
    flex: 1;
}

.template-preview-text {
    font-family: inherit;
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.template-card-tags { display: flex; gap: 6px; flex-wrap: wrap; }

.template-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.template-card-btns {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.template-card-btns .btn-ghost {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 6px 10px;
    border-radius: 8px;
    transition: all 0.2s;
}

.template-card-btns .btn-ghost:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
}

.template-card-btns .btn-ghost.text-danger:hover {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
}

/* Jarkom badge on template card */
.jarkom-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    background: rgba(37, 211, 102, 0.12);
    border: 1px solid rgba(37, 211, 102, 0.3);
    color: #25D366;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
}
.jarkom-badge svg { width: 11px; height: 11px; }

/* Buat Jarkom button */
.btn-success {
    background: linear-gradient(135deg, #19a34a, #25D366);
    color: #fff;
    font-weight: 600;
    border: none;
    transition: var(--transition-fast);
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.25);
}
.btn-success:hover {
    background: linear-gradient(135deg, #15903f, #1fb558);
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    transform: translateY(-1px);
}

/* ============================================================
   JARKOM GENERATOR MODAL
   ============================================================ */

.jarkom-form-wrap {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Info strip */
.jarkom-template-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(108, 99, 255, 0.08);
    border: 1px solid rgba(108, 99, 255, 0.2);
    border-radius: var(--radius-sm);
    font-size: 0.83rem;
    color: var(--primary-light);
}

/* 2-column field grid */
.jarkom-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 18px;
}

/* NB textarea spans full width */
.jarkom-field-group[data-key="nb"] {
    grid-column: 1 / -1;
}

/* Required star */
.required-star {
    color: var(--danger);
    margin-left: 2px;
    font-weight: 700;
}
.optional-label {
    color: var(--text-faint);
    font-size: 0.75rem;
    font-weight: 400;
    margin-left: 4px;
}

/* Jarkom input focus ring */
.jarkom-input:focus {
    border-color: #25D366;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.12);
}

/* Readonly hari input */
.jarkom-input[readonly] {
    background: rgba(255,255,255,0.03);
    color: var(--text-muted);
    cursor: default;
}

/* Full-width column in jarkom grid */
.jarkom-full-col {
    grid-column: 1 / -1;
}

/* Date picker wrapper */
.jarkom-date-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.jarkom-date-input {
    color-scheme: dark;
}

.jarkom-date-preview {
    font-size: 0.8rem;
    color: #25D366;
    font-weight: 600;
    padding: 4px 2px;
    min-height: 22px;
}

/* Auto badge on hari label */
.jarkom-auto-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    background: rgba(108, 99, 255, 0.12);
    border: 1px solid rgba(108, 99, 255, 0.25);
    color: var(--primary-light);
    border-radius: var(--radius-full);
    font-size: 0.68rem;
    font-weight: 600;
    margin-left: 6px;
    vertical-align: middle;
    cursor: default;
}

/* Preview section */
.jarkom-preview-section {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(37, 211, 102, 0.2);
    border-radius: var(--radius);
    overflow: hidden;
}

.jarkom-preview-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(37, 211, 102, 0.07);
    border-bottom: 1px solid rgba(37, 211, 102, 0.15);
    font-size: 0.82rem;
    font-weight: 600;
    color: #25D366;
}

.jarkom-preview-text {
    font-family: inherit;
    font-size: 0.875rem;
    line-height: 1.75;
    white-space: pre-wrap;
    word-break: break-word;
    padding: 16px;
    color: var(--text-muted);
    min-height: 120px;
    max-height: 280px;
    overflow-y: auto;
    margin: 0;
    transition: color 0.2s;
}

/* Save row */
.jarkom-save-row {
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
}

.jarkom-save-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--text);
}

.jarkom-save-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Mobile jarkom */
@media (max-width: 640px) {
    .jarkom-fields-grid {
        grid-template-columns: 1fr;
    }
    .jarkom-field-group[data-key="nb"] {
        grid-column: 1;
    }
}

/* Link Google Drive wrapper */
.jarkom-link-wrap {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.jarkom-link-input {
    flex: 1;
    min-width: 0;
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    letter-spacing: -0.01em;
}

.jarkom-link-open {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    padding: 0;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.jarkom-link-open:hover {
    background: rgba(108, 99, 255, 0.15);
    color: var(--primary-light);
}



/* ============================================================
   TIMELINE / CALENDAR
   ============================================================ */

.timeline-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 20px;
    align-items: start;
}

.timeline-calendar-card { height: fit-content; }

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

.calendar-header h3 { font-size: 1.05rem; font-weight: 600; }

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    padding: 12px;
}

.cal-header {
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-faint);
    padding: 8px 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 0.82rem;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition-fast);
    color: var(--text-muted);
    position: relative;
    padding: 4px;
}

.cal-day > span { flex-shrink: 0; }

.cal-day:hover { background: rgba(108,99,255,0.1); color: var(--text); }
.cal-day.today { background: var(--primary); color: white; font-weight: 700; }
.cal-day.selected { background: rgba(108,99,255,0.2); border: 1px solid var(--primary); }
.cal-day.other-month { color: var(--text-faint); opacity: 0.3; cursor: default; }
.cal-day.has-event::before {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
}

.cal-event-dots {
    display: flex;
    gap: 2px;
}

.cal-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

/* Event List */
.event-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: var(--transition-fast);
}

.event-item:hover { background: transparent; }
.event-color-bar { width: 3px; border-radius: var(--radius-full); align-self: stretch; flex-shrink: 0; }
.event-content { flex: 1; min-width: 0; }
.event-title { font-size: 0.875rem; font-weight: 600; margin-bottom: 4px; }
.event-meta { display: flex; flex-direction: column; gap: 3px; }
.event-meta span { display: flex; align-items: center; gap: 5px; }
.event-meta svg { width: 12px; height: 12px; }
.event-type-icon svg { width: 18px; height: 18px; }

/* ============================================================
   DATABASE
   ============================================================ */

.db-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.db-stat-card {
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    gap: 14px;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.db-stat-card:hover { transform: translateY(-2px); border-color: var(--border-hover); }
.db-stat-card.active { border-color: var(--primary); background: rgba(108,99,255,0.08); }

.db-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.db-stat-icon svg { width: 20px; height: 20px; }
.db-stat-number { font-size: 1.5rem; font-weight: 700; }
.db-stat-label { font-size: 0.75rem; color: var(--text-muted); }

/* Table */
.table-wrapper { overflow-x: auto; }
.table-info { padding-bottom: 8px; }

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th {
    text-align: left;
    padding: 12px 16px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border-light);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text);
    vertical-align: middle;
}

.data-table tbody tr { transition: var(--transition-fast); }
.data-table tbody tr:hover { background: rgba(255,255,255,0.02); }

.table-name-cell { display: flex; align-items: center; gap: 10px; }
.table-actions { display: flex; gap: 4px; }
.table-thumbnail { width: 48px; height: 36px; object-fit: cover; border-radius: 6px; cursor: pointer; }

/* ============================================================
   DOCUMENTS / GALLERY
   ============================================================ */

.doc-category-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.doc-cat-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
}

.doc-cat-tab:hover { border-color: var(--border-hover); color: var(--text); }
.doc-cat-tab.active {
    background: rgba(108,99,255,0.15);
    border-color: var(--primary);
    color: var(--primary-light);
}

.doc-cat-tab svg { width: 15px; height: 15px; }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow);
    border-color: var(--border-hover);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img { transform: scale(1.05); }

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .gallery-overlay { opacity: 1; }

.gallery-item-title { font-size: 0.875rem; font-weight: 600; color: white; line-height: 1.3; }
.gallery-item-meta { font-size: 0.72rem; color: rgba(255,255,255,0.7); margin-top: 4px; display: flex; gap: 8px; }

.gallery-featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(245,158,11,0.9);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-featured-badge svg { width: 14px; height: 14px; }

.gallery-delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(239,68,68,0.85) !important;
    color: white !important;
    border-radius: 8px !important;
    opacity: 0;
    transition: opacity 0.2s;
}

.gallery-item:hover .gallery-delete-btn { opacity: 1; }

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.lightbox.open {
    opacity: 1;
    pointer-events: all;
}

.lightbox-img-wrapper {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.lightbox-img-wrapper img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.lightbox-caption {
    color: rgba(255,255,255,0.8);
    font-size: 0.875rem;
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition-fast);
}

.lightbox-close:hover { background: rgba(255,255,255,0.2); }
.lightbox-close svg { width: 20px; height: 20px; }

.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition-fast);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.2); }
.lightbox-prev svg, .lightbox-next svg { width: 20px; height: 20px; }

/* Upload Drop Zone */
.upload-drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    transition: var(--transition-fast);
    cursor: pointer;
    position: relative;
}

.upload-drop-zone.dragover {
    border-color: var(--primary);
    background: rgba(108,99,255,0.05);
}

.upload-drop-content { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text-muted); }
.upload-drop-content svg { width: 40px; height: 40px; color: var(--primary); }
.upload-file-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.file-preview {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.preview-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 80px;
}

.preview-thumb img { width: 80px; height: 60px; object-fit: cover; border-radius: 6px; }

/* ============================================================
   EVALUATIONS
   ============================================================ */

.eval-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.eval-summary-card {
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: center;
}

.eval-summary-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.eval-summary-icon svg { width: 22px; height: 22px; }
.eval-summary-value { font-size: 2rem; font-weight: 800; line-height: 1; }

.eval-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.eval-card {
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.eval-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--border-hover);
}

.eval-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    border-bottom: 1px solid var(--border-light);
}

.eval-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.eval-card-icon svg { width: 20px; height: 20px; }
.eval-card-program { flex: 1; }
.eval-card-program h3 { font-size: 0.9rem; font-weight: 600; }

.eval-card-score { text-align: right; flex-shrink: 0; }
.score-big { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.eval-card-no-score { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text-faint); }
.eval-card-no-score svg { width: 20px; height: 20px; }

.eval-card-scores {
    display: flex;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-light);
    justify-content: center;
}

.mini-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.mini-score-bar {
    width: 20px;
    height: 48px;
    background: rgba(255,255,255,0.06);
    border-radius: 4px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.mini-score-fill {
    width: 100%;
    border-radius: 4px;
    transition: height 0.8s ease;
}

.mini-score-value { font-size: 0.78rem; font-weight: 700; }
.mini-score-label { font-size: 0.65rem; color: var(--text-faint); text-align: center; }

.eval-card-snippet {
    display: flex;
    gap: 10px;
    padding: 12px 18px;
    align-items: flex-start;
}

.eval-snippet-label { flex-shrink: 0; }
.eval-snippet-label svg { width: 16px; height: 16px; }

.eval-card-empty { padding: 20px 18px; text-align: center; }

/* Evaluation View */
.score-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.score-card {
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.score-card.overall { border-color: rgba(245,158,11,0.3); background: rgba(245,158,11,0.04); }

.score-icon svg { width: 20px; height: 20px; color: var(--text-muted); }
.score-value { font-size: 1.5rem; font-weight: 800; }
.score-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* Score input */
.score-input-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.evaluation-sections { display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }

.evaluation-section {
    padding: 16px 20px;
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
}

.eval-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 10px;
}

.eval-section-title svg { width: 16px; height: 16px; }
.eval-section-content { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; }

/* Evaluation Form */
.evaluation-form-wrapper { max-width: 800px; }

/* ============================================================
   SETTINGS
   ============================================================ */

.settings-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
    align-items: start;
}

.settings-nav-card { padding: 0; overflow: hidden; }

.settings-nav-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 20px;
    background: rgba(108,99,255,0.06);
    border-bottom: 1px solid var(--border-light);
}

.settings-avatar-wrapper {
    position: relative;
    display: inline-block;
}

.avatar-edit-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    border: 2px solid var(--card);
}

.avatar-edit-btn:hover { background: var(--primary-dark); }
.avatar-edit-btn svg { width: 14px; height: 14px; }

.settings-nav-name { font-weight: 600; font-size: 0.9rem; }

.settings-nav {
    display: flex;
    flex-direction: column;
    padding: 8px;
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: var(--transition-fast);
    text-align: left;
    width: 100%;
}

.settings-nav-item:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.settings-nav-item.active { background: rgba(108,99,255,0.12); color: var(--primary-light); }
.settings-nav-item svg { width: 16px; height: 16px; }
.settings-nav-item.text-danger { color: var(--danger) !important; }
.settings-nav-item.text-danger:hover { background: rgba(239,68,68,0.08); }

.divider { border: none; border-top: 1px solid var(--border-light); margin: 6px 0; }

.settings-section { display: none; }
.settings-section.active { display: block; }

/* Password Input */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper .form-input { padding-right: 44px; }

.password-strength { display: flex; align-items: center; gap: 12px; padding: 4px 0; }
.strength-bars { display: flex; gap: 4px; }

.strength-bar {
    width: 40px;
    height: 5px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.08);
    transition: background 0.3s;
}

.strength-label { font-size: 0.75rem; font-weight: 600; }

/* Toggle Switch */
.preference-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
}

.preference-label { font-weight: 500; font-size: 0.875rem; }

.toggle-switch { position: relative; cursor: pointer; }
.toggle-switch input { position: absolute; opacity: 0; width: 0; height: 0; }

.toggle-track {
    display: block;
    width: 48px;
    height: 26px;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-full);
    position: relative;
    transition: var(--transition-fast);
}

.toggle-track::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.25s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.toggle-switch input:checked + .toggle-track {
    background: var(--primary);
}

.toggle-switch input:checked + .toggle-track::after {
    transform: translateX(22px);
}

/* Color Picker */
.color-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.color-option { cursor: pointer; }
.color-option input { display: none; }
.color-swatch {
    display: block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: var(--transition-fast);
}
.color-option input:checked + .color-swatch { border-color: white; transform: scale(1.2); }

/* ============================================================
   MODAL
   ============================================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s;
}

.modal-overlay.modal-open { opacity: 1; }

.modal {
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.modal-overlay.modal-open .modal {
    transform: translateY(0) scale(1);
}

.modal-sm  { max-width: 400px; }
.modal-md  { max-width: 560px; }
.modal-lg  { max-width: 720px; }
.modal-xl  { max-width: 900px; }

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

.modal-title { font-size: 1.1rem; font-weight: 600; }

.modal-close { color: var(--text-muted); }
.modal-close:hover { color: var(--danger); }

.modal-body { padding: 24px; overflow-y: auto; flex: 1; }

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

/* Confirm Delete Body */
.confirm-delete-body {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 8px 0;
}

.confirm-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirm-icon.danger { background: rgba(239,68,68,0.12); color: var(--danger); }
.confirm-icon svg { width: 28px; height: 28px; }

/* ============================================================
   LOADING
   ============================================================ */

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.loading-overlay.loading-show {
    opacity: 1;
    pointer-events: all;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.loading-text { font-size: 0.875rem; color: var(--text-muted); }

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(108,99,255,0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-sm {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-lg {
    width: 60px;
    height: 60px;
    border-width: 4px;
    border-color: rgba(108,99,255,0.15);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.page-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: 16px;
    color: var(--text-muted);
}

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

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--card-hover);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    transform: translateX(120%);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast.toast-show { transform: translateX(0); }

.toast.toast-hide {
    transform: translateX(120%);
    transition: transform 0.3s ease-in;
}

.toast-success { border-left: 3px solid var(--success); }
.toast-error   { border-left: 3px solid var(--danger); }
.toast-warning { border-left: 3px solid var(--warning); }
.toast-info    { border-left: 3px solid var(--info); }

.toast-icon { flex-shrink: 0; margin-top: 1px; }
.toast-success .toast-icon { color: var(--success); }
.toast-error   .toast-icon { color: var(--danger); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info    .toast-icon { color: var(--info); }
.toast-icon svg { width: 18px; height: 18px; }

.toast-message { flex: 1; font-size: 0.875rem; color: var(--text); line-height: 1.4; }
.toast-close { color: var(--text-faint); flex-shrink: 0; }
.toast-close:hover { color: var(--text); }
.toast-close svg { width: 14px; height: 14px; }

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.3;
    width: 100%;
    transform-origin: left;
}

.toast-progress-animate {
    animation: toast-progress-shrink linear forwards;
}

@keyframes toast-progress-shrink {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

/* ============================================================
   PAGINATION
   ============================================================ */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.page-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--card);
    border: 1px solid var(--border-light);
    transition: var(--transition-fast);
    cursor: pointer;
}

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

.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(108,99,255,0.3);
}

.page-btn.disabled { opacity: 0.3; cursor: not-allowed; }
.page-btn svg { width: 16px; height: 16px; }
.page-dots { padding: 0 4px; color: var(--text-muted); }

/* ============================================================
   EMPTY STATE & ERROR
   ============================================================ */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 60px 20px;
    text-align: center;
    color: var(--text-muted);
}

.empty-state.compact { padding: 30px 20px; }

.empty-state svg { width: 48px; height: 48px; opacity: 0.3; }
.empty-state h3 { font-size: 1rem; font-weight: 600; color: var(--text); }
.empty-state p { font-size: 0.875rem; max-width: 300px; line-height: 1.5; }

.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: 16px;
    text-align: center;
    padding: 40px;
}

.error-page svg { width: 64px; height: 64px; color: var(--danger); opacity: 0.6; }
.error-page h2 { font-size: 1.5rem; }
.error-page p { color: var(--text-muted); max-width: 400px; }

/* ============================================================
   SKELETON LOADING
   ============================================================ */

.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0.04) 0%,
        rgba(255,255,255,0.08) 50%,
        rgba(255,255,255,0.04) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-wave 1.5s linear infinite;
    border-radius: var(--radius-sm);
}

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

.h-4   { height: 16px; }
.h-8   { height: 32px; }
.h-12  { height: 48px; }
.h-20  { height: 80px; }
.h-24  { height: 96px; }
.h-28  { height: 112px; }
.h-40  { height: 160px; }
.h-48  { height: 192px; }
.h-56  { height: 224px; }
.h-72  { height: 288px; }
.h-96  { height: 384px; }
.w-24  { width: 96px; }
.w-48  { width: 192px; }
.w-64  { width: 256px; }
.rounded-full { border-radius: var(--radius-full); }
.mb-2  { margin-bottom: 8px; }
.mb-4  { margin-bottom: 16px; }
.mt-2  { margin-top: 8px; }
.mt-4  { margin-top: 16px; }
.p-4   { padding: 16px; }

/* ============================================================
   PAGE TRANSITIONS
   ============================================================ */

.page-enter {
    opacity: 0;
    transform: translateY(12px);
}

.page-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.page-exit {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */

.login-page {
    display: flex;
    align-items: stretch;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
}

.login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(108,99,255,0.18) 0%, transparent 70%);
    top: -200px;
    left: -200px;
    animation: orb-float 8s ease-in-out infinite;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139,92,246,0.12) 0%, transparent 70%);
    bottom: -150px;
    right: -100px;
    animation: orb-float 10s ease-in-out infinite reverse;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(236,72,153,0.1) 0%, transparent 70%);
    top: 50%;
    left: 40%;
    animation: orb-float 12s ease-in-out infinite 2s;
}

@keyframes orb-float {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(30px, -20px); }
    66% { transform: translate(-20px, 20px); }
}

.bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(108,99,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(108,99,255,0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}

.login-container {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    max-width: 1200px;
    min-height: 100vh;
    margin: 0 auto;
}

/* Brand Panel */
.login-brand-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 48px;
    position: relative;
    overflow: hidden;
}

.brand-content { max-width: 480px; }

.brand-logo-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 32px;
}

.brand-logo-wrap svg {
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(108,99,255,0.4);
}

.brand-glow {
    position: absolute;
    inset: -10px;
    background: radial-gradient(circle, rgba(108,99,255,0.3), transparent 70%);
    border-radius: 50%;
    filter: blur(16px);
    z-index: -1;
}

.brand-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    color: white;
}

.brand-title span {
    background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-desc {
    font-size: 1rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.7;
    margin-bottom: 40px;
}

.brand-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.brand-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: rgba(255,255,255,0.7);
}

.feature-icon {
    width: 32px;
    height: 32px;
    background: rgba(108,99,255,0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-light);
    flex-shrink: 0;
}

.feature-icon svg { width: 16px; height: 16px; }

/* Floating Cards */
.floating-cards {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.float-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    animation: float-updown 4s ease-in-out infinite;
}

.fc-1 { animation-delay: 0s; }
.fc-2 { animation-delay: 1.3s; }
.fc-3 { animation-delay: 2.6s; }

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

.fc-icon { flex-shrink: 0; }
.fc-icon svg { width: 24px; height: 24px; }
.fc-value { font-size: 1.2rem; font-weight: 700; color: white; line-height: 1; }
.fc-label { font-size: 0.72rem; color: rgba(255,255,255,0.5); margin-top: 2px; }

/* Form Panel */
.login-form-panel {
    width: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 48px;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(24px);
    border-left: 1px solid rgba(255,255,255,0.06);
}

.login-form-card { width: 100%; }

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

.login-form-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-form-header p { color: var(--text-muted); font-size: 0.9rem; }

/* Demo Banner */
.demo-banner {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 16px;
    background: rgba(6,182,212,0.08);
    border: 1px solid rgba(6,182,212,0.2);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.82rem;
    color: var(--info);
}

.demo-banner svg { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; }
.demo-banner strong { display: block; margin-bottom: 2px; }
.demo-banner p { color: rgba(255,255,255,0.5); margin: 0; }
.demo-banner code {
    background: rgba(6,182,212,0.15);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: monospace;
}

/* Quick Login */
.quick-login-btns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.quick-login-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: var(--transition-fast);
    cursor: pointer;
}

.quick-login-btn:hover { border-color: var(--primary); color: var(--text); background: rgba(108,99,255,0.06); }
.quick-login-btn.active { border-color: var(--primary); background: rgba(108,99,255,0.1); color: var(--primary-light); }
.quick-login-btn svg { width: 20px; height: 20px; }

.divider-text {
    text-align: center;
    position: relative;
    margin: 20px 0;
    color: var(--text-faint);
    font-size: 0.8rem;
}

.divider-text::before, .divider-text::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 60px);
    height: 1px;
    background: var(--border-light);
}

.divider-text::before { left: 0; }
.divider-text::after { right: 0; }
.divider-text span { position: relative; z-index: 1; padding: 0 12px; background: var(--bg-secondary); }

/* Login Error */
.login-error {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.2);
    border-radius: var(--radius-sm);
    color: var(--danger);
    font-size: 0.875rem;
}

.login-error svg { flex-shrink: 0; width: 16px; height: 16px; }

/* Login Footer */
.login-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.82rem;
    color: var(--text-faint);
}

/* ============================================================
   MISC UTILITIES
   ============================================================ */

.hidden { display: none !important; }
.flex { display: flex; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }

.mobile-brand-header {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
}

.mobile-brand-logo {
    position: relative;
    display: inline-block;
    margin-bottom: 12px;
}

.mobile-brand-logo svg {
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(108, 99, 255, 0.35);
}

.mobile-brand-title {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.1;
    color: white;
}

.mobile-brand-title span {
    background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .dashboard-grid-3 { grid-template-columns: 1fr 1fr; }
    .dashboard-card-lg { grid-column: span 1; }
    .score-grid { grid-template-columns: repeat(3, 1fr); }
    .score-input-grid { grid-template-columns: repeat(3, 1fr); }
    .kanban-board { grid-template-columns: repeat(2, minmax(240px, 1fr)); }
    .overview-grid { grid-template-columns: 1fr 1fr; }
    .floating-cards { display: none; }
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.mobile-open { transform: translateX(0); }
    
    .main-wrapper { margin-left: 0 !important; }
    
    .mobile-menu-btn { display: flex; }
    
    .header-center { display: none; }
    
    .login-brand-panel { display: none; }
    
    .login-form-panel {
        width: 100%;
        border-left: none;
    }

    .mobile-brand-header {
        display: flex;
    }
    
    .settings-layout { grid-template-columns: 1fr; }
    
    .db-stats-grid { grid-template-columns: repeat(3, 1fr); }
    
    .timeline-layout { grid-template-columns: 1fr; }
    
    .eval-summary-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .main-content { padding: 16px 14px; }
    
    .page-header {
        flex-direction: column;
        gap: 14px;
    }
    
    .page-title { font-size: 1.3rem; }
    
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    
    .dashboard-grid-3 { grid-template-columns: 1fr; }
    
    .programs-grid { grid-template-columns: 1fr; }
    
    .task-cards { grid-template-columns: 1fr; }
    
    .templates-grid { grid-template-columns: 1fr; }
    
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    
    .form-grid { grid-template-columns: 1fr; }
    .form-group.span-2 { grid-column: span 1; }
    
    .score-grid { grid-template-columns: repeat(3, 1fr); }
    .score-input-grid { grid-template-columns: 1fr 1fr; }
    
    .eval-cards-grid { grid-template-columns: 1fr; }
    
    .db-stats-grid { grid-template-columns: repeat(2, 1fr); }
    
    .kanban-board { grid-template-columns: 1fr; }
    
    .overview-grid { grid-template-columns: 1fr; }
    
    .toolbar { flex-direction: column; align-items: stretch; }
    .toolbar-left, .toolbar-right { width: 100%; }
    
    .search-input-wrapper input { width: 100%; }
    .search-input-wrapper input:focus { width: 100%; }
    
    .program-detail-title-row { flex-direction: column; }
    .program-quick-stats { flex-direction: column; }
    
    /* Login form mobile */
    .login-form-panel { padding: 28px 18px; }
    .login-form-header h2 { font-size: 1.5rem; }
    
    /* Quick login — stack to single column on small screens */
    .quick-login-btns {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .quick-login-btn {
        flex-direction: row;
        gap: 10px;
        padding: 12px 16px;
        font-size: 0.85rem;
        justify-content: flex-start;
    }
    .quick-login-btn svg { width: 18px; height: 18px; }
    
    .modal { margin: 12px; }
    
    .toast-container { left: 12px; right: 12px; bottom: 12px; }

    /* Mobile Header & Profile Dropdown Optimizations */
    .notification-dropdown {
        width: 320px;
        max-width: 92vw;
        right: -60px;
    }
    .user-dropdown {
        width: 250px;
        max-width: 92vw;
    }
    .user-info-header {
        display: none;
    }
    .user-menu-btn {
        padding: 4px;
        background: transparent;
        border-color: transparent;
    }
    .user-menu-btn i[data-lucide="chevron-down"] {
        display: none;
    }
    
    /* Elegant Sidebar Mobile State */
    .sidebar {
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(10px);
    }
    
    /* Card & Stats mobile tweaks */
    .stat-card { padding: 14px; }
    .stat-value { font-size: 1.5rem; }
    
    /* Demo banner mobile */
    .demo-banner { font-size: 0.78rem; padding: 10px 12px; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .gallery-grid { grid-template-columns: 1fr 1fr; }
    .score-grid { grid-template-columns: repeat(2, 1fr); }
    .tabs { width: 100%; }
    .tab { flex: 1; justify-content: center; font-size: 0.8rem; }
    .page-actions { flex-direction: column; width: 100%; }
    .page-actions .btn { width: 100%; }
    
    /* Login extra small */
    .login-form-panel { padding: 20px 14px; }
    .login-form-header h2 { font-size: 1.35rem; }
    .mobile-brand-title { font-size: 1.5rem; }
    .demo-banner code { word-break: break-all; }
    
    /* Make stat cards 1 col for very small phones */
    .stats-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   SPLASH SCREEN
   ============================================================ */

.splash-screen {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease-out;
    overflow: hidden;
}

/* Ambient glow orbs behind splash */
.splash-screen::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(108, 99, 255, 0.15), transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: splashGlow 3s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes splashGlow {
    0%   { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 1;   transform: translate(-50%, -50%) scale(1.15); }
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    position: relative;
    z-index: 1;
    padding: 20px;
}

/* Glowing backdrop behind the logo */
.splash-logo-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.splash-logo-wrap::before {
    content: '';
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(108, 99, 255, 0.25) 0%, rgba(139, 92, 246, 0.1) 50%, transparent 70%);
    filter: blur(8px);
    animation: splashPulse 2.5s ease-in-out infinite;
}

.splash-logo {
    width: 140px;
    height: 140px;
    object-fit: contain;
    /* No border-radius so the logo is shown fully without cropping */
    border-radius: 0;
    filter: drop-shadow(0 12px 32px rgba(108, 99, 255, 0.5));
    animation: splashLogoFloat 2.5s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

.splash-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(108, 99, 255, 0.18);
    border-top-color: var(--primary);
    border-right-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

.splash-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: white;
    letter-spacing: 0.04em;
    text-align: center;
}

.splash-title span {
    background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes splashLogoFloat {
    0%, 100% { transform: translateY(0);    filter: drop-shadow(0 12px 32px rgba(108, 99, 255, 0.5)); }
    50%       { transform: translateY(-8px); filter: drop-shadow(0 20px 48px rgba(108, 99, 255, 0.7)); }
}

@keyframes splashPulse {
    0%, 100% { transform: scale(1);    opacity: 0.7; }
    50%       { transform: scale(1.15); opacity: 1; }
}

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

/* Mobile splash adjustments */
@media (max-width: 480px) {
    .splash-logo { width: 120px; height: 120px; }
    .splash-logo-wrap::before { width: 150px; height: 150px; }
    .splash-title { font-size: 1.35rem; }
}
