/* ============================================================
   SIJIS – Sistem Informasi Pengajuan Judul Skripsi
   FTKOM Universitas Cokroaminoto Palopo
   Main Stylesheet
   ============================================================ */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ---- CSS Variables ---- */
:root {
    --maroon:       #800020;
    --maroon-dark:  #600018;
    --maroon-light: #a00028;
    --maroon-bg:    #fff5f7;
    --yellow:       #eab308;
    --blue:         #0284c7;
    --blue-light:   #e0f2fe;
    --green:        #16a34a;
    --green-light:  #dcfce7;
    --red:          #dc2626;
    --red-light:    #fee2e2;
    --gray:         #64748b;
    --gray-light:   #f1f5f9;
    --gray-border:  #e2e8f0;
    --text:         #1e293b;
    --text-muted:   #64748b;
    --white:        #ffffff;
    --shadow:       0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md:    0 4px 6px -1px rgba(0,0,0,.10), 0 2px 4px -1px rgba(0,0,0,.06);
    --shadow-lg:    0 10px 15px -3px rgba(0,0,0,.10), 0 4px 6px -2px rgba(0,0,0,.05);
    --radius:       10px;
    --radius-sm:    6px;
    --radius-lg:    14px;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background-color: var(--gray-light);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--maroon); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-size: 12px; color: #1e293b; }
hr { border: none; border-top: 1px solid var(--gray-border); }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 40%, #f0f4f8 100%);
    padding: 24px 16px;
}

.login-card {
    background: var(--white);
    width: 100%;
    max-width: 420px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--gray-border);
    animation: slideUp 0.35s ease;
}

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

.login-header {
    background: linear-gradient(160deg, var(--maroon) 0%, var(--maroon-dark) 100%);
    padding: 28px 24px 24px;
    text-align: center;
    position: relative;
}

.login-logo-circle {
    width: 72px;
    height: 72px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
    border: 3px solid rgba(255,255,255,.35);
}

.login-title {
    color: var(--white);
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.login-subtitle {
    color: rgba(255,255,255,.80);
    font-size: 12px;
    font-weight: 500;
}

.login-body {
    padding: 28px 28px 24px;
}

.register-link {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 16px;
}

.register-link a {
    color: var(--maroon);
    font-weight: 600;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(135deg, var(--maroon) 0%, var(--maroon-dark) 100%);
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(128,0,32,.35);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-logo-placeholder {
    width: 42px;
    height: 42px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 800;
    color: var(--maroon);
    border: 2px solid rgba(255,255,255,.35);
    flex-shrink: 0;
    letter-spacing: -0.5px;
}

.navbar-title {
    color: var(--white);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: .5px;
    line-height: 1.1;
}

.navbar-subtitle {
    color: rgba(255,255,255,.65);
    font-size: 10px;
    font-weight: 500;
    margin-top: 1px;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 14px;
}

.navbar-user-info { text-align: right; }

.navbar-user-name {
    color: var(--white);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

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

.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,.15);
    color: var(--white);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: var(--radius-sm);
    padding: 6px 13px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
    text-decoration: none;
}

.btn-logout:hover {
    background: rgba(255,255,255,.28);
    text-decoration: none;
}

/* ============================================================
   PAGE LAYOUT
   ============================================================ */
.page-content { padding: 24px 24px 48px; }
.container    { max-width: 1100px; margin: 0 auto; }

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

.page-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--gray-border);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow);
    transition: transform .15s, box-shadow .15s;
}

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

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.stat-icon-yellow { background: #fef9c3; color: #a16207; }
.stat-icon-green  { background: var(--green-light); color: var(--green); }
.stat-icon-red    { background: var(--red-light); color: var(--red); }
.stat-icon-blue   { background: var(--blue-light); color: var(--blue); }
.stat-icon-maroon { background: var(--maroon-bg); color: var(--maroon); }

.stat-number {
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ============================================================
   ALERT BANNERS
   ============================================================ */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 18px;
    border-width: 1px;
    border-style: solid;
}

.alert-info {
    background: var(--blue-light);
    border-color: #bae6fd;
    color: #0c4a6e;
}

.alert-warning {
    background: #fefce8;
    border-color: #fef08a;
    color: #713f12;
}

.alert-success {
    background: var(--green-light);
    border-color: #bbf7d0;
    color: #14532d;
}

.alert-danger {
    background: var(--red-light);
    border-color: #fca5a5;
    color: #7f1d1d;
}

/* ============================================================
   FLASH MESSAGES
   ============================================================ */
.flash-msg {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
    border-width: 1px;
    border-style: solid;
    animation: fadeIn .3s ease;
}

.flash-success {
    background: var(--green-light);
    border-color: #86efac;
    color: #14532d;
}

.flash-error {
    background: var(--red-light);
    border-color: #fca5a5;
    color: #7f1d1d;
}

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

/* ============================================================
   CARD
   ============================================================ */
.card {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--gray-border);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 24px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--gray-border);
    background: #fafafa;
}

.card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.card-body { padding: 20px; }

/* ============================================================
   TABLE
   ============================================================ */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

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

.table thead th {
    background: var(--gray-light);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 11px 14px;
    border-bottom: 2px solid var(--gray-border);
    white-space: nowrap;
    text-align: left;
}

.table thead th:first-child { padding-left: 18px; }

.table tbody tr { border-bottom: 1px solid var(--gray-border); transition: background .12s; }
.table tbody tr:last-child { border-bottom: none; }
.table tbody tr:hover { background: #f8fafc; }

.table tbody td {
    padding: 12px 14px;
    vertical-align: top;
    color: var(--text);
}

.table tbody td:first-child { padding-left: 18px; }

.td-empty {
    text-align: center;
    padding: 40px 20px !important;
    color: var(--text-muted);
    font-size: 13px;
}

.td-date {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.td-id {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
    font-family: monospace;
}

.td-judul {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
}

.td-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
}

/* ============================================================
   BADGES (Status)
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1.4;
}

.badge-yellow { background: #fef9c3; color: #713f12; border: 1px solid #fde047; }
.badge-blue   { background: var(--blue-light); color: #075985; border: 1px solid #bae6fd; }
.badge-green  { background: var(--green-light); color: #14532d; border: 1px solid #86efac; }
.badge-red    { background: var(--red-light); color: #7f1d1d; border: 1px solid #fca5a5; }
.badge-gray   { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all .18s;
    line-height: 1;
    white-space: nowrap;
    font-family: inherit;
}

.btn-sm { padding: 5px 12px; font-size: 12px; }

.btn-primary {
    background: var(--maroon);
    color: var(--white);
    border-color: var(--maroon);
}
.btn-primary:hover {
    background: var(--maroon-dark);
    border-color: var(--maroon-dark);
    color: var(--white);
    text-decoration: none;
}

.btn-success {
    background: var(--green);
    color: var(--white);
    border-color: var(--green);
}
.btn-success:hover { background: #15803d; border-color: #15803d; color: var(--white); text-decoration: none; }

.btn-danger {
    background: var(--red);
    color: var(--white);
    border-color: var(--red);
}
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; color: var(--white); text-decoration: none; }

.btn-secondary {
    background: #e2e8f0;
    color: #475569;
    border-color: #cbd5e1;
}
.btn-secondary:hover { background: #cbd5e1; text-decoration: none; color: #1e293b; }
.btn-secondary[disabled] { opacity: .55; cursor: not-allowed; pointer-events: none; }

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

.btn-warning {
    background: #f59e0b;
    color: var(--white);
    border-color: #f59e0b;
}
.btn-warning:hover { background: #d97706; border-color: #d97706; color: var(--white); text-decoration: none; }

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group { margin-bottom: 18px; }

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.form-control {
    display: block;
    width: 100%;
    padding: 9px 13px;
    font-size: 13px;
    font-family: inherit;
    color: var(--text);
    background: var(--white);
    border: 1.5px solid var(--gray-border);
    border-radius: var(--radius-sm);
    transition: border-color .18s, box-shadow .18s;
    appearance: none;
    outline: none;
}

.form-control:focus {
    border-color: var(--maroon);
    box-shadow: 0 0 0 3px rgba(128,0,32,.12);
}

.form-control::placeholder { color: #94a3b8; }

textarea.form-control { resize: vertical; min-height: 90px; line-height: 1.6; }
select.form-control { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 20 20'%3E%3Cpath fill='%2364748b' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; cursor: pointer; }

.form-text { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* row-2col alias (used in PHP templates) */
.row-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Info boxes */
.info-box {
    background: #f8fafc;
    border: 1px solid var(--gray-border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 13px;
}
.info-box-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); margin-bottom: 4px; }
.info-box-value { font-weight: 700; color: var(--text); }

/* ============================================================
   DETAIL BOXES (Review / Tetapkan page)
   ============================================================ */
.detail-box {
    background: var(--gray-light);
    border: 1px solid var(--gray-border);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 16px;
}

.detail-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: .5px;
    margin-bottom: 4px;
}

.detail-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.5;
}

/* ============================================================
   PRINT / CETAK PAGE
   ============================================================ */
.cetak-container {
    max-width: 720px;
    margin: 24px auto;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--gray-border);
}

.cetak-header {
    background: linear-gradient(135deg, var(--maroon) 0%, var(--maroon-dark) 100%);
    color: var(--white);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.cetak-body { padding: 24px; }

.cetak-row {
    display: flex;
    border-bottom: 1px solid var(--gray-border);
    padding: 10px 0;
    gap: 12px;
    font-size: 13px;
}

.cetak-row:last-child { border-bottom: none; }
.cetak-label { width: 180px; flex-shrink: 0; color: var(--text-muted); font-size: 12px; }
.cetak-value { flex: 1; font-weight: 600; color: var(--text); }

@media print {
    .no-print { display: none !important; }
    body { background: white; }
    .cetak-container { box-shadow: none; border: none; margin: 0; max-width: 100%; }
    .cetak-header { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-maroon  { color: var(--maroon); }
.text-muted   { color: var(--text-muted); }
.text-sm      { font-size: 12px; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.fw-600       { font-weight: 600; }
.fw-700       { font-weight: 700; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }

.d-flex       { display: flex; }
.align-center { align-items: center; }
.gap-2        { gap: 8px; }
.gap-3        { gap: 12px; }
.gap-4        { gap: 16px; }

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

/* ============================================================
   BACK LINK
   ============================================================ */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--maroon);
    font-weight: 600;
    margin-bottom: 16px;
}

.back-link:hover { text-decoration: underline; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .navbar { padding: 10px 16px; }
    .navbar-subtitle { display: none; }
    .page-content { padding: 16px 16px 40px; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .form-row, .row-2col { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    .stat-grid { grid-template-columns: 1fr; }
    .navbar-user-info { display: none; }
    .login-body { padding: 20px 18px 18px; }
}

/* ============================================================
   SIDEBAR LAYOUT
   ============================================================ */
:root {
    --sidebar-width: 240px;
    --sidebar-collapsed: 70px;
    --sidebar-bg: linear-gradient(180deg, #800020 0%, #600018 100%);
    --sidebar-text: rgba(255,255,255,0.85);
    --sidebar-active-bg: rgba(255,255,255,0.18);
    --sidebar-hover-bg: rgba(255,255,255,0.10);
    --sidebar-border: rgba(255,255,255,0.12);
}

/* Wrapper utama */
.sidebar-layout {
    display: flex;
    min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 200;
    box-shadow: 4px 0 24px rgba(128,0,32,.25);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
}

/* ---- Brand / Header ---- */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 16px 14px;
    flex-shrink: 0;
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 800;
    color: var(--maroon);
    border: 2px solid rgba(255,255,255,.30);
    flex-shrink: 0;
    letter-spacing: -0.5px;
}

.sidebar-brand-text { flex: 1; min-width: 0; }

.sidebar-title {
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .5px;
    line-height: 1.1;
}

.sidebar-subtitle {
    color: rgba(255,255,255,.60);
    font-size: 9.5px;
    font-weight: 500;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Tombol close (mobile only) */
.sidebar-close-btn {
    display: none;
    background: none;
    border: none;
    color: rgba(255,255,255,.7);
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
    transition: color .18s;
}

.sidebar-close-btn:hover { color: #fff; }

/* ---- User Info ---- */
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 14px;
    flex-shrink: 0;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,.18);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 15px;
    flex-shrink: 0;
}

.sidebar-user-info { min-width: 0; }

.sidebar-user-name {
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.sidebar-user-role { margin-top: 3px; }

.role-badge {
    display: inline-block;
    background: rgba(255,255,255,.20);
    color: rgba(255,255,255,.90);
    font-size: 10px;
    font-weight: 700;
    padding: 1px 8px;
    border-radius: 20px;
    letter-spacing: .3px;
}

/* ---- Divider ---- */
.sidebar-divider {
    height: 1px;
    background: var(--sidebar-border);
    margin: 0 16px;
    flex-shrink: 0;
}

/* ---- Nav ---- */
.sidebar-nav {
    padding: 12px 8px;
    flex-shrink: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.15) transparent;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 4px; }

.sidebar-nav-label {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,.45);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 10px 6px;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    margin-bottom: 2px;
    color: var(--sidebar-text);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background .18s, color .18s, transform .12s;
    position: relative;
}

.sidebar-nav-item:hover {
    background: var(--sidebar-hover-bg);
    color: #fff;
    text-decoration: none;
}

.sidebar-nav-item.active {
    background: var(--sidebar-active-bg);
    color: #fff;
    box-shadow: inset 3px 0 0 rgba(255,255,255,.8);
}

.sidebar-nav-icon {
    width: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.sidebar-nav-text { flex: 1; }

/* ---- Spacer ---- */
.sidebar-spacer { flex: 1; }

/* ---- Footer / Logout ---- */
.sidebar-footer {
    padding: 10px 8px 16px;
    flex-shrink: 0;
}

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: rgba(255,255,255,.80);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background .18s, color .18s;
}

.sidebar-logout:hover {
    background: rgba(255,255,255,.12);
    color: #fff;
    text-decoration: none;
}

/* ---- Main Content Area ---- */
.sidebar-main {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Topbar minimal (toggle + page title on mobile) */
.topbar {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--maroon);
    box-shadow: 0 2px 8px rgba(128,0,32,.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.topbar-title {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

/* ---- Overlay (mobile) ---- */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 199;
    backdrop-filter: blur(2px);
}

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

/* ---- Sidebar JS helper ---- */
.sidebar.sidebar-open { transform: translateX(0) !important; }

/* ============================================================
   SIDEBAR RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .sidebar {
        transform: translateX(calc(-1 * var(--sidebar-width)));
    }
    .sidebar-close-btn { display: flex; }
    .sidebar-main { margin-left: 0; }
    .topbar { display: flex; }
}
