/* ============================================================
   DocuPro — Main Stylesheet
   Professional SaaS design: navy sidebar, clean white content
   Fully responsive: mobile / tablet / desktop
   ============================================================ */

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

/* ---- CSS Variables ---------------------------------------- */
:root {
    /* Brand */
    --navy:          #0F1C2E;
    --navy-light:    #1A2D44;
    --navy-border:   #243448;
    --accent:        #3B82F6;
    --accent-hover:  #2563EB;
    --accent-light:  #EFF6FF;

    /* Neutrals */
    --white:         #FFFFFF;
    --gray-50:       #F8FAFC;
    --gray-100:      #F1F5F9;
    --gray-200:      #E2E8F0;
    --gray-300:      #CBD5E1;
    --gray-400:      #94A3B8;
    --gray-500:      #64748B;
    --gray-600:      #475569;
    --gray-700:      #334155;
    --gray-800:      #1E293B;
    --gray-900:      #0F172A;

    /* Status */
    --green:         #10B981;
    --green-light:   #ECFDF5;
    --green-text:    #065F46;
    --teal:          #0EA5E9;
    --teal-light:    #F0F9FF;
    --teal-text:     #0C4A6E;
    --orange:        #F59E0B;
    --orange-light:  #FFFBEB;
    --orange-text:   #78350F;
    --red:           #EF4444;
    --red-light:     #FEF2F2;
    --red-text:      #7F1D1D;
    --purple:        #8B5CF6;
    --purple-light:  #F5F3FF;

    /* Typography */
    --font-main:     'Inter', system-ui, sans-serif;
    --font-brand:    'Poppins', sans-serif;

    /* Layout */
    --sidebar-w:     260px;
    --sidebar-w-sm:  64px;
    --topbar-h:      60px;
    --radius-sm:     6px;
    --radius-md:     10px;
    --radius-lg:     14px;
    --radius-xl:     20px;

    /* Shadows */
    --shadow-sm:     0 1px 3px rgba(0,0,0,.08);
    --shadow-md:     0 4px 16px rgba(0,0,0,.10);
    --shadow-lg:     0 8px 30px rgba(0,0,0,.12);

    /* Transition */
    --transition:    all .2s ease;
}

/* ---- Reset ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
    font-family: var(--font-main);
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ---- Layout Shell ----------------------------------------- */
.app-shell {
    display: flex;
    min-height: 100vh;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    width: var(--sidebar-w);
    background: var(--navy);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    transition: width .25s ease, transform .25s ease;
    overflow: hidden;
}

.sidebar-brand {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--navy-border);
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: var(--topbar-h);
}
.sidebar-brand .brand-icon {
    width: 36px; height: 36px;
    background: var(--accent);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 18px; font-weight: 700; color: #fff;
    font-family: var(--font-brand);
}
.sidebar-brand .brand-name {
    font-family: var(--font-brand);
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.3px;
    white-space: nowrap;
}

/* Nav sections */
.sidebar-nav {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
    overflow-x: hidden;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--navy-border); border-radius: 2px; }

.nav-section-label {
    font-size: .65rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--gray-500);
    padding: 12px 20px 4px;
    white-space: nowrap;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--gray-400);
    font-size: .88rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
}
.nav-item:hover {
    background: var(--navy-light);
    color: #fff;
    border-left-color: var(--accent);
}
.nav-item.active {
    background: var(--navy-light);
    color: #fff;
    border-left-color: var(--accent);
}
.nav-item .nav-icon {
    font-size: 18px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}
.nav-item .nav-badge {
    margin-left: auto;
    background: var(--accent);
    color: #fff;
    font-size: .65rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
}

/* Sidebar footer */
.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--navy-border);
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}
.user-avatar {
    width: 36px; height: 36px;
    background: var(--accent);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .82rem; font-weight: 600; color: #fff;
    flex-shrink: 0;
}
.user-info { min-width: 0; }
.user-info .user-name {
    font-size: .82rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-info .user-role {
    font-size: .72rem;
    color: var(--gray-500);
    text-transform: capitalize;
}
.sidebar-logout {
    margin-left: auto;
    color: var(--gray-500);
    font-size: 16px;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.sidebar-logout:hover { color: var(--red); background: rgba(239,68,68,.1); }

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */
.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: margin-left .25s ease;
}

/* Top bar */
.topbar {
    height: var(--topbar-h);
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--gray-600);
    padding: 4px;
}
.topbar-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
}
.topbar-spacer { flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

/* Page content */
.page-content {
    padding: 28px 28px;
    flex: 1;
}

/* Page header */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.page-header-left h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -.3px;
}
.page-header-left p {
    font-size: .85rem;
    color: var(--gray-500);
    margin-top: 2px;
}
.page-header-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    border-radius: var(--radius-md);
    font-size: .87rem;
    font-weight: 600;
    border: 1.5px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
    line-height: 1.4;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-secondary {
    background: var(--white);
    color: var(--gray-700);
    border-color: var(--gray-300);
}
.btn-secondary:hover { background: var(--gray-50); border-color: var(--gray-400); }
.btn-danger { background: var(--red-light); color: var(--red-text); border-color: #fecaca; }
.btn-danger:hover { background: #fecaca; }
.btn-success { background: var(--green-light); color: var(--green-text); border-color: #a7f3d0; }
.btn-success:hover { background: #a7f3d0; }
.btn-sm { padding: 5px 12px; font-size: .8rem; }
.btn-lg { padding: 11px 24px; font-size: .95rem; }
.btn-icon { padding: 8px; gap: 0; }
.btn-full { width: 100%; justify-content: center; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.card-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.card-title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--gray-800);
}
.card-body { padding: 22px; }
.card-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ============================================================
   KPI STATS CARDS
   ============================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.stat-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-icon {
    width: 44px; height: 44px;
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.stat-icon.blue   { background: var(--accent-light); color: var(--accent); }
.stat-icon.green  { background: var(--green-light);  color: var(--green); }
.stat-icon.orange { background: var(--orange-light); color: var(--orange); }
.stat-icon.red    { background: var(--red-light);    color: var(--red); }
.stat-icon.purple { background: var(--purple-light); color: var(--purple); }
.stat-info { min-width: 0; }
.stat-label {
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--gray-500);
    margin-bottom: 4px;
}
.stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -.5px;
    line-height: 1.2;
}
.stat-sub {
    font-size: .75rem;
    color: var(--gray-400);
    margin-top: 2px;
}

/* ============================================================
   TABLES
   ============================================================ */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: .87rem;
}
thead th {
    background: var(--gray-50);
    color: var(--gray-600);
    font-weight: 600;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 11px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}
tbody td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
    vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--gray-50); }
td.td-number { font-weight: 600; color: var(--gray-900); font-variant-numeric: tabular-nums; }
td.td-actions { text-align: right; white-space: nowrap; }
td.td-amount { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ============================================================
   BADGES / STATUS
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 600;
    text-transform: capitalize;
    white-space: nowrap;
}
.badge-gray   { background: var(--gray-100); color: var(--gray-600); }
.badge-blue   { background: var(--teal-light); color: var(--teal-text); }
.badge-teal   { background: #E0F2FE; color: #075985; }
.badge-green  { background: var(--green-light); color: var(--green-text); }
.badge-red    { background: var(--red-light); color: var(--red-text); }
.badge-orange { background: var(--orange-light); color: var(--orange-text); }
.badge-purple { background: var(--purple-light); color: #5B21B6; }

/* ============================================================
   FORMS
   ============================================================ */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}
.form-grid-2 { grid-template-columns: 1fr 1fr; }
.form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.col-span-2 { grid-column: span 2; }
.form-group.col-span-3 { grid-column: span 3; }

label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--gray-700);
}
label .required { color: var(--red); margin-left: 2px; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 9px 13px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: .88rem;
    color: var(--gray-800);
    background: var(--white);
    transition: var(--transition);
    outline: none;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
input::placeholder, textarea::placeholder { color: var(--gray-400); }
textarea { resize: vertical; min-height: 90px; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748B' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-hint { font-size: .77rem; color: var(--gray-400); }
.form-error { font-size: .77rem; color: var(--red); }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: .87rem;
    font-weight: 500;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert-success { background: var(--green-light); color: var(--green-text); border: 1px solid #a7f3d0; }
.alert-error   { background: var(--red-light);   color: var(--red-text);   border: 1px solid #fecaca; }
.alert-warning { background: var(--orange-light); color: var(--orange-text); border: 1px solid #fde68a; }
.alert-info    { background: var(--teal-light);   color: var(--teal-text);  border: 1px solid #bae6fd; }

/* ============================================================
   LINE ITEMS TABLE (for document editor)
   ============================================================ */
.line-items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .87rem;
}
.line-items-table th {
    background: var(--gray-50);
    color: var(--gray-600);
    font-weight: 600;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 10px 12px;
    border-bottom: 1px solid var(--gray-200);
    text-align: left;
}
.line-items-table td {
    padding: 8px 6px;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}
.line-items-table input {
    padding: 7px 10px;
    font-size: .86rem;
}
.line-items-table .col-desc  { width: 35%; }
.line-items-table .col-qty   { width: 10%; }
.line-items-table .col-price { width: 14%; }
.line-items-table .col-tax   { width: 10%; }
.line-items-table .col-total { width: 14%; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.line-items-table .col-del   { width: 5%;  text-align: center; }

.totals-box {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
}
.totals-inner {
    width: 300px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.totals-row {
    display: flex;
    justify-content: space-between;
    padding: 9px 16px;
    font-size: .87rem;
    border-bottom: 1px solid var(--gray-200);
}
.totals-row:last-child { border-bottom: none; }
.totals-row.grand {
    background: var(--navy);
    color: #fff;
    font-weight: 700;
    font-size: .95rem;
}
.totals-row .lbl { color: var(--gray-600); }
.totals-row.grand .lbl { color: rgba(255,255,255,.7); }
.totals-row .val { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ============================================================
   FILTERS BAR
   ============================================================ */
.filters-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    align-items: center;
}
.filters-bar input,
.filters-bar select {
    width: auto;
    min-width: 160px;
}
.filters-bar .spacer { flex: 1; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-400);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; opacity: .4; }
.empty-state h3 { font-size: 1rem; font-weight: 600; color: var(--gray-600); margin-bottom: 6px; }
.empty-state p  { font-size: .87rem; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 0;
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border-radius: var(--radius-sm);
    font-size: .85rem;
    font-weight: 500;
    border: 1px solid var(--gray-200);
    color: var(--gray-600);
    transition: var(--transition);
}
.pagination a:hover { background: var(--accent-light); border-color: var(--accent); color: var(--accent); }
.pagination span.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--navy) 0%, #1a3a5c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.login-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 44px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}
.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    justify-content: center;
}
.login-brand .brand-icon {
    width: 44px; height: 44px;
    background: var(--accent);
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 700; color: #fff;
    font-family: var(--font-brand);
}
.login-brand .brand-name {
    font-family: var(--font-brand);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gray-900);
}
.login-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 4px;
}
.login-subtitle { font-size: .87rem; color: var(--gray-500); margin-bottom: 28px; }
.login-submit {
    width: 100%;
    padding: 12px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 8px;
}
.login-submit:hover { background: var(--accent-hover); }
.login-footer {
    text-align: center;
    font-size: .8rem;
    color: var(--gray-400);
    margin-top: 28px;
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,28,46,.6);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
    background: var(--white);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: transform .2s;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-title { font-size: 1rem; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 20px; color: var(--gray-400); cursor: pointer; padding: 4px; }
.modal-close:hover { color: var(--gray-700); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--gray-100); display: flex; justify-content: flex-end; gap: 10px; }

/* ============================================================
   RESPONSIVE — TABLET (< 1024px)
   ============================================================ */
@media (max-width: 1024px) {
    :root { --sidebar-w: var(--sidebar-w-sm); }

    .sidebar-brand .brand-name,
    .nav-section-label,
    .nav-item span.nav-label,
    .nav-item .nav-badge,
    .sidebar-footer .user-info,
    .sidebar-footer .sidebar-logout { display: none; }

    .sidebar-brand { justify-content: center; padding: 16px; }
    .nav-item { padding: 12px; justify-content: center; border-left: none; border-bottom: 3px solid transparent; }
    .nav-item:hover, .nav-item.active { border-left-color: transparent; border-bottom-color: var(--accent); }
    .sidebar-footer { padding: 12px; justify-content: center; display: flex; }
    .sidebar-user { justify-content: center; }

    .page-content { padding: 20px; }
}

/* ============================================================
   RESPONSIVE — MOBILE (< 768px)
   ============================================================ */
@media (max-width: 768px) {
    :root { --sidebar-w: 100%; }

    .sidebar {
        transform: translateX(-100%);
        width: 260px;
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-brand .brand-name,
    .nav-section-label,
    .nav-item span.nav-label,
    .nav-item .nav-badge,
    .sidebar-footer .user-info,
    .sidebar-footer .sidebar-logout { display: block; }
    .sidebar-brand { justify-content: flex-start; padding: 20px; }
    .nav-item { padding: 10px 20px; justify-content: flex-start; border-left: 3px solid transparent; border-bottom: none; }
    .sidebar-footer { flex-direction: row; }

    .main-content { margin-left: 0; }
    .topbar-toggle { display: flex; }

    .stats-grid { grid-template-columns: 1fr 1fr; }
    .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
    .form-group.col-span-2, .form-group.col-span-3 { grid-column: span 1; }

    .page-content { padding: 16px; }
    .page-header { flex-direction: column; }

    .totals-inner { width: 100%; }

    .line-items-table .col-qty,
    .line-items-table .col-tax { display: none; }
}

/* ============================================================
   SIDEBAR OVERLAY (mobile)
   ============================================================ */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 99;
}
@media (max-width: 768px) {
    .sidebar-overlay.open { display: block; }
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-right  { text-align: right; }
.text-center { text-align: center; }
.text-muted  { color: var(--gray-500); }
.text-small  { font-size: .8rem; }
.text-danger { color: var(--red); }
.text-success{ color: var(--green); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.mt-4   { margin-top: 1rem; }
.mb-4   { margin-bottom: 1rem; }
.mb-6   { margin-bottom: 1.5rem; }
.gap-2  { gap: .5rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.hidden { display: none; }
