/* =====================
   ZONPAY — DESIGN SYSTEM
   ===================== */

:root {
    --primary: #1a3c6e;
    --primary-dark: #0f2447;
    --primary-light: #2563eb;
    --accent: #0ea5e9;
    --accent-hover: #0284c7;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #6366f1;

    --bg-main: #f0f4f8;
    --bg-sidebar: #1a2744;
    --bg-sidebar-dark: #111c35;
    --bg-card: #ffffff;
    --bg-hover: #f8faff;

    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-white: #ffffff;
    --text-sidebar: #94a3b8;
    --text-sidebar-active: #ffffff;

    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(26,60,110,0.12);
    --shadow-lg: 0 8px 32px rgba(26,60,110,0.16);
    --shadow-sidebar: 4px 0 20px rgba(0,0,0,0.15);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --font-main: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --sidebar-width: 260px;
    --header-height: 64px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
    font-family: var(--font-main);
    background: var(--bg-main);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    height: 100%;
    overflow: hidden;
}

/* =====================
   SCROLLBAR
   ===================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* =====================
   LOGIN PAGE
   ===================== */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f2447 0%, #1a3c6e 40%, #1e40af 70%, #0ea5e9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(14,165,233,0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(99,102,241,0.15) 0%, transparent 50%),
        radial-gradient(circle at 60% 80%, rgba(16,185,129,0.1) 0%, transparent 50%);
}

.login-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 32px 32px;
}

.login-container {
    display: grid;
    grid-template-columns: 1fr 480px;
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0,0,0,0.4);
    width: 900px;
    max-width: 95vw;
    position: relative;
    z-index: 1;
}

.login-left {
    background: linear-gradient(135deg, #1a2744 0%, #1a3c6e 60%, #2563eb 100%);
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(14,165,233,0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.login-left::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -60px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 48px;
}

.login-brand-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: 0 8px 24px rgba(14,165,233,0.4);
}

.login-brand-name {
    font-size: 28px;
    font-weight: 800;
    color: white;
    letter-spacing: -0.5px;
}

.login-brand-name span {
    color: #0ea5e9;
}

.login-tagline {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    margin-top: 2px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.login-headline {
    font-size: 36px;
    font-weight: 800;
    color: white;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.login-headline span {
    color: #0ea5e9;
}

.login-desc {
    font-size: 15px;
    color: rgba(255,255,255,0.65);
    line-height: 1.7;
    margin-bottom: 40px;
}

.login-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,0.8);
    font-size: 14px;
}

.login-features li::before {
    content: '✓';
    width: 24px;
    height: 24px;
    background: rgba(14,165,233,0.2);
    border: 1px solid rgba(14,165,233,0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #0ea5e9;
    flex-shrink: 0;
}

.login-right {
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
}

.login-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.login-subtitle {
    color: var(--text-secondary);
    margin-bottom: 36px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: var(--font-main);
    color: var(--text-primary);
    background: white;
    transition: var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.08);
}

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

.form-input.error { border-color: var(--danger); }

.form-error {
    font-size: 12px;
    color: var(--danger);
    margin-top: 5px;
}

.btn-primary {
    width: 100%;
    padding: 13px 24px;
    background: linear-gradient(135deg, #1a3c6e, #2563eb);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font-main);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(37,99,235,0.3);
    margin-top: 8px;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(37,99,235,0.4);
}

.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

/* =====================
   LAYOUT
   ===================== */
.app-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* =====================
   SIDEBAR
   ===================== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sidebar);
    position: relative;
    z-index: 100;
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(180deg, rgba(14,165,233,0.08) 0%, transparent 100%);
    pointer-events: none;
}

.sidebar-brand {
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(14,165,233,0.35);
}

.sidebar-brand-text strong {
    display: block;
    font-size: 16px;
    font-weight: 800;
    color: white;
    letter-spacing: -0.3px;
}

.sidebar-brand-text span {
    font-size: 10px;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

.sidebar-section {
    margin-bottom: 4px;
}

.sidebar-section-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.25);
    padding: 12px 20px 6px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-sidebar);
    font-size: 13.5px;
    font-weight: 500;
    border-left: 3px solid transparent;
    position: relative;
    text-decoration: none;
}

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

.sidebar-item.active {
    background: rgba(14,165,233,0.12);
    color: white;
    border-left-color: #0ea5e9;
}

.sidebar-item.active .sidebar-icon {
    color: #0ea5e9;
}

.sidebar-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    transition: var(--transition);
}

.sidebar-label { flex: 1; }

.sidebar-badge {
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 99px;
    min-width: 18px;
    text-align: center;
}

.sidebar-badge.green { background: var(--success); }
.sidebar-badge.yellow { background: var(--warning); }

.sidebar-submenu {
    display: none;
    background: rgba(0,0,0,0.15);
}

.sidebar-submenu.open { display: block; }

.sidebar-subitem {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px 8px 46px;
    cursor: pointer;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    transition: var(--transition);
    text-decoration: none;
}

.sidebar-subitem:hover {
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.04);
}

.sidebar-subitem.active { color: #0ea5e9; }

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.15);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border-radius: var(--radius-md);
    padding: 8px;
    transition: var(--transition);
}

.sidebar-user:hover { background: rgba(255,255,255,0.05); }

.sidebar-avatar {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    font-weight: 700;
    flex-shrink: 0;
}

.sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: white;
    line-height: 1.2;
}

.sidebar-user-role {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
}

/* =====================
   MAIN CONTENT
   ===================== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

/* =====================
   HEADER
   ===================== */
.header {
    height: var(--header-height);
    background: white;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    flex-shrink: 0;
    z-index: 50;
}

.header-breadcrumb {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-breadcrumb-main {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.header-breadcrumb-sep { color: var(--text-muted); }

.header-breadcrumb-sub {
    font-size: 14px;
    color: var(--text-secondary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-btn {
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    background: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
}

.header-btn:hover {
    background: var(--bg-hover);
    border-color: var(--primary-light);
    color: var(--primary-light);
}

.header-notif-dot {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 7px;
    height: 7px;
    background: var(--danger);
    border-radius: 50%;
    border: 1.5px solid white;
}

/* =====================
   PAGE CONTENT
   ===================== */
.page-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px;
}

/* =====================
   CARDS
   ===================== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

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

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.card-body { padding: 24px; }

/* =====================
   STAT CARDS
   ===================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: var(--transition);
}

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

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

.stat-icon.blue { background: rgba(37,99,235,0.1); color: #2563eb; }
.stat-icon.green { background: rgba(16,185,129,0.1); color: #10b981; }
.stat-icon.orange { background: rgba(245,158,11,0.1); color: #f59e0b; }
.stat-icon.red { background: rgba(239,68,68,0.1); color: #ef4444; }
.stat-icon.purple { background: rgba(99,102,241,0.1); color: #6366f1; }
.stat-icon.cyan { background: rgba(14,165,233,0.1); color: #0ea5e9; }

.stat-info { flex: 1; min-width: 0; }
.stat-label { font-size: 12px; color: var(--text-secondary); font-weight: 500; margin-bottom: 4px; }
.stat-value { font-size: 24px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.5px; line-height: 1; }
.stat-change { font-size: 12px; margin-top: 4px; }
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* =====================
   TABLE
   ===================== */
.table-wrap { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

thead th {
    padding: 11px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
    background: var(--bg-main);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

tbody td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }

tbody tr:hover td { background: var(--bg-hover); }

/* =====================
   BADGES
   ===================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.badge-success { background: rgba(16,185,129,0.1); color: #059669; }
.badge-danger { background: rgba(239,68,68,0.1); color: #dc2626; }
.badge-warning { background: rgba(245,158,11,0.1); color: #d97706; }
.badge-info { background: rgba(99,102,241,0.1); color: #4f46e5; }
.badge-primary { background: rgba(37,99,235,0.1); color: #1d4ed8; }
.badge-secondary { background: rgba(100,116,139,0.1); color: #475569; }

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* =====================
   BUTTONS
   ===================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-main);
    cursor: pointer;
    transition: var(--transition);
    border: 1.5px solid transparent;
    white-space: nowrap;
    text-decoration: none;
}

.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 11px 22px; font-size: 14px; }
.btn-icon { padding: 8px; }

.btn-filled-primary {
    background: var(--primary-light);
    color: white;
    border-color: var(--primary-light);
    box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}
.btn-filled-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 4px 14px rgba(37,99,235,0.35);
    transform: translateY(-1px);
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary-light);
    border-color: var(--primary-light);
}
.btn-outline-primary:hover {
    background: rgba(37,99,235,0.06);
}

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

.btn-danger {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}
.btn-danger:hover { background: #dc2626; }

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

/* =====================
   FORMS
   ===================== */
.field-group { margin-bottom: 20px; }

.field-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 7px;
}

.field-input,
.field-select,
.field-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-family: var(--font-main);
    color: var(--text-primary);
    background: white;
    transition: var(--transition);
    outline: none;
}

.field-input:focus,
.field-select:focus,
.field-textarea:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.08);
}

.field-textarea { resize: vertical; min-height: 90px; }
.field-select { cursor: pointer; }

.field-row {
    display: grid;
    gap: 16px;
}
.field-row.cols-2 { grid-template-columns: 1fr 1fr; }
.field-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }

/* =====================
   MODAL
   ===================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,36,71,0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: 0 32px 80px rgba(0,0,0,0.35);
    width: 100%;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-sm { max-width: 440px; }
.modal-md { max-width: 620px; }
.modal-lg { max-width: 820px; }
.modal-xl { max-width: 1060px; }

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

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

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-main);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 16px;
    color: var(--text-secondary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-close:hover { background: var(--border); }

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

.modal-footer {
    padding: 18px 28px;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
}

/* =====================
   FILTERS / TOOLBAR
   ===================== */
.toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 220px;
    max-width: 340px;
    padding: 9px 14px 9px 38px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 13.5px;
    font-family: var(--font-main);
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E") 12px center no-repeat;
    outline: none;
    transition: var(--transition);
    color: var(--text-primary);
}
.search-input:focus { border-color: var(--primary-light); }

.filter-select {
    padding: 9px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-family: var(--font-main);
    color: var(--text-primary);
    background: white;
    cursor: pointer;
    outline: none;
}

/* =====================
   TOGGLE
   ===================== */
.toggle {
    width: 40px;
    height: 22px;
    background: var(--border);
    border-radius: 99px;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
    border: none;
    flex-shrink: 0;
}

.toggle::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: var(--transition);
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.toggle.on { background: var(--success); }
.toggle.on::after { left: 21px; }

/* ADD THESE RULES to existing app.css */

/* =====================
   SIDEBAR SUBMENU — HOVER BASED
   ===================== */
.sidebar-section {
    position: relative;
}

.sidebar-item-wrapper {
    position: relative;
}

.sidebar-subitem-wrap {
    display: none; /* Hidden by default */
    background: rgba(0,0,0,0.15);
    border-left: 2px solid rgba(14,165,233,0.2);
    margin-left: 0;
}

/* Show submenu on hover of parent item or submenu itself */
.sidebar-item-wrapper:hover .sidebar-subitem-wrap,
.sidebar-subitem-wrap:hover {
    display: block;
}

/* Active parent keeps submenu visible */
.sidebar-item.active ~ .sidebar-subitem-wrap {
    display: block;
}

.sidebar-subitem {
    display: flex;
    align-items: center;
    padding: 7px 20px 7px 36px;
    font-size: 12.5px;
    color: rgba(255,255,255,0.45);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    gap: 6px;
}

.sidebar-subitem:hover {
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.05);
    padding-left: 40px;
}

.sidebar-subitem.active {
    color: #0ea5e9;
    background: rgba(14,165,233,0.1);
}

.sidebar-subitem::before {
    content: '↳';
    color: rgba(255,255,255,0.25);
    font-size: 11px;
}

/* Sidebar item with children — arrow indicator */
.sidebar-item.has-children::after {
    content: '›';
    margin-left: auto;
    font-size: 14px;
    color: rgba(255,255,255,0.25);
    transition: transform 0.2s;
}

.sidebar-item-wrapper:hover .sidebar-item.has-children::after {
    transform: rotate(90deg);
    color: rgba(255,255,255,0.5);
}

/* Smooth appearance */
.sidebar-subitem-wrap {
    animation: fadeIn 0.15s ease;
}

/* =====================
   ALERTS
   ===================== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 13.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.alert-danger { background: rgba(239,68,68,0.08); color: #dc2626; border: 1px solid rgba(239,68,68,0.2); }
.alert-success { background: rgba(16,185,129,0.08); color: #059669; border: 1px solid rgba(16,185,129,0.2); }
.alert-warning { background: rgba(245,158,11,0.08); color: #d97706; border: 1px solid rgba(245,158,11,0.2); }
.alert-info { background: rgba(99,102,241,0.08); color: #4f46e5; border: 1px solid rgba(99,102,241,0.2); }

/* =====================
   LOADING
   ===================== */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    color: var(--text-muted);
    flex-direction: column;
    gap: 16px;
}

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

.spinner-sm {
    width: 18px;
    height: 18px;
    border-width: 2px;
}

/* =====================
   EMPTY STATE
   ===================== */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-secondary);
}

.empty-state-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--text-primary); }
.empty-state-desc { font-size: 13.5px; color: var(--text-secondary); margin-bottom: 20px; }

/* =====================
   PAGINATION
   ===================== */
.pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-light);
}

.pagination-info { flex: 1; font-size: 13px; color: var(--text-secondary); }

.page-btn {
    width: 32px;
    height: 32px;
    border: 1.5px solid var(--border);
    background: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-family: var(--font-main);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.page-btn:hover { border-color: var(--primary-light); color: var(--primary-light); }
.page-btn.active { background: var(--primary-light); border-color: var(--primary-light); color: white; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* =====================
   DETAIL ROWS
   ===================== */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.detail-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    gap: 12px;
}

.detail-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 140px;
}

.detail-value {
    font-size: 13.5px;
    color: var(--text-primary);
    font-weight: 500;
}

/* =====================
   TABS
   ===================== */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border-light);
    gap: 0;
    margin-bottom: 24px;
}

.tab {
    padding: 10px 20px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
    white-space: nowrap;
}

.tab:hover { color: var(--primary-light); }
.tab.active { color: var(--primary-light); border-bottom-color: var(--primary-light); }

/* =====================
   ANIMATIONS
   ===================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

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

.fade-in { animation: fadeIn 0.3s ease; }

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 768px) {
    .sidebar { position: fixed; left: -260px; transition: var(--transition); }
    .sidebar.open { left: 0; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .field-row.cols-2, .field-row.cols-3 { grid-template-columns: 1fr; }
    .login-container { grid-template-columns: 1fr; }
    .login-left { display: none; }
    .detail-grid { grid-template-columns: 1fr; }
}