/* ================================================================
   RESET & BASE
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:        #F8FAFC;
    --bg-card:   #FFFFFF;
    --bg-hover:  #F1F5F9;
    --border:    #E2E8F0;
    --border-lt: #CBD5E1;
    --gold:      #2563EB;
    --gold-lt:   #3B82F6;
    --gold-dim:  rgba(37,99,235,.08);
    --accent:    #D97706;
    --txt:       #1E293B;
    --txt-dim:   #64748B;
    --txt-head:  #0F172A;
    --danger:    #DC2626;
    --success:   #16A34A;
    --info:      #0284C7;
    --warning:   #F59E0B;
    --purple:    #7C3AED;
    --f-body:    'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --f-head:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --f-mono:    'JetBrains Mono', 'Cascadia Code', 'Fira Code', Consolas, monospace;
    --topbar-h:  56px;
    --sidebar-w: 240px;
    --r-sm:  4px;
    --r-md:  6px;
    --r-lg:  10px;
    --r-xl:  14px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,.08);
    --shadow-lg: 0 12px 32px rgba(0,0,0,.12);
}

html { font-size: 14px; }
body {
    font-family: var(--f-body);
    background: var(--bg);
    color: var(--txt);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}
a { color: var(--gold); text-decoration: none; transition: color .15s; }
a:hover { color: var(--gold-lt); }
h1,h2,h3,h4,h5,h6 { font-family: var(--f-head); color: var(--txt-head); font-weight: 600; }
code, pre, .mono { font-family: var(--f-mono); }
img { max-width: 100%; }
::selection { background: var(--gold); color: #fff; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-lt); border-radius: 3px; }

/* ================================================================
   TOPBAR
   ================================================================ */
.topbar {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--topbar-h);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex; align-items: center;
    padding: 0 20px;
    z-index: 1000;
    gap: 16px;
}
.topbar-brand {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; flex-shrink: 0;
}
.topbar-brand-icon {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--gold), var(--gold-lt));
    border-radius: var(--r-sm);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--f-head); font-weight: 700;
    font-size: 13px; color: #fff; letter-spacing: .5px;
}
.topbar-brand-logo {
    height: 36px; width: auto;
}
.topbar-brand-text {
    font-family: var(--f-head); font-weight: 600;
    font-size: 15px; color: var(--txt-head);
    letter-spacing: .3px;
}
.topbar-brand-text span { color: var(--gold); }
.topbar-sep { width: 1px; height: 28px; background: var(--border); flex-shrink: 0; }
.topbar-spacer { flex: 1; }
.topbar-btn {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--r-md);
    color: var(--txt-dim); background: none; border: none;
    cursor: pointer; position: relative; transition: all .15s;
    font-size: 17px;
}
.topbar-btn:hover { background: var(--bg-hover); color: var(--txt); }
.topbar-btn .badge-dot {
    position: absolute; top: 6px; right: 6px;
    width: 7px; height: 7px;
    background: var(--danger); border-radius: 50%;
    border: 2px solid var(--bg-card);
}
.topbar-user {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 10px 4px 4px;
    border-radius: var(--r-md);
    cursor: pointer; transition: background .15s;
    position: relative;
}
.topbar-user:hover { background: var(--bg-hover); }
.topbar-avatar {
    width: 32px; height: 32px;
    border-radius: 50%; background: var(--gold-dim);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--f-head); font-weight: 600;
    font-size: 12px; color: var(--gold);
    border: 2px solid var(--gold);
}
.topbar-user-info { line-height: 1.2; }
.topbar-user-name { font-size: 12.5px; font-weight: 600; color: var(--txt-head); }
.topbar-user-role { font-size: 10.5px; color: var(--txt-dim); }
.topbar-dropdown {
    display: none;
    position: absolute; top: 100%; right: 0;
    min-width: 200px; margin-top: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-lg);
    padding: 6px 0; z-index: 2000;
}
.topbar-user:hover .topbar-dropdown,
.topbar-dropdown.show { display: block; }
.topbar-dropdown-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 14px; font-size: 13px;
    color: var(--txt); cursor: pointer; transition: background .1s;
    text-decoration: none;
}
.topbar-dropdown-item:hover { background: var(--bg-hover); color: var(--txt-head); }
.topbar-dropdown-item.danger { color: var(--danger); }
.topbar-dropdown-item.danger:hover { background: rgba(220,38,38,.06); }
.topbar-dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }
.topbar-dropdown-header {
    padding: 6px 14px; font-size: 11px;
    color: var(--txt-dim); text-transform: uppercase;
    letter-spacing: .5px;
}

/* ── Notification dropdown ─────────────────────────── */
.notif-toggle { position: relative; }
.notif-badge {
    position: absolute; top: 2px; right: 2px;
    min-width: 16px; height: 16px; padding: 0 4px;
    background: var(--danger); color: #fff;
    font-size: 10px; font-weight: 700;
    border-radius: 8px; line-height: 16px; text-align: center;
    border: 2px solid var(--bg-card);
    pointer-events: none;
}
.notif-dropdown {
    display: none;
    position: absolute; top: 100%; right: -40px;
    width: 340px; margin-top: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    overflow: hidden;
}
.notif-dropdown.show { display: block; }
.notif-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
}
.notif-header-title { font-size: 13px; font-weight: 600; color: var(--txt-head); }
.notif-mark-all {
    background: none; border: none; cursor: pointer;
    font-size: 12px; color: var(--gold); font-weight: 500;
    display: flex; align-items: center; gap: 4px;
    padding: 2px 6px; border-radius: var(--r-sm);
    transition: background .15s;
}
.notif-mark-all:hover { background: var(--gold-dim); }
.notif-list {
    max-height: 340px; overflow-y: auto;
}
.notif-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 14px;
    text-decoration: none; color: var(--txt);
    border-bottom: 1px solid var(--border);
    transition: background .1s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg-hover); color: var(--txt); }
.notif-item.unread { background: rgba(37,99,235,.04); }
.notif-item.unread:hover { background: rgba(37,99,235,.08); }
.notif-item-icon {
    width: 32px; height: 32px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: var(--gold-dim);
    color: var(--gold); font-size: 14px;
    margin-top: 2px;
}
.notif-item.unread .notif-item-icon { background: var(--gold); color: #fff; }
.notif-item-body { flex: 1; min-width: 0; }
.notif-item-title { font-size: 12.5px; font-weight: 600; color: var(--txt-head); line-height: 1.3; }
.notif-item-msg { font-size: 12px; color: var(--txt-dim); line-height: 1.4; margin-top: 2px; }
.notif-item-time { font-size: 11px; color: var(--txt-dim); margin-top: 3px; opacity: .7; }
.notif-empty {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 32px 14px;
    color: var(--txt-dim); font-size: 13px;
}
.notif-empty i { font-size: 24px; opacity: .5; }
@media (max-width: 480px) {
    .notif-dropdown { width: calc(100vw - 20px); right: -60px; }
}

/* ================================================================
   SIDEBAR
   ================================================================ */
.sidebar {
    position: fixed; top: var(--topbar-h); left: 0; bottom: 0;
    width: var(--sidebar-w);
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    overflow-y: auto; overflow-x: hidden;
    z-index: 900;
    display: flex; flex-direction: column;
    padding: 12px 0;
}
.sidebar-nav { flex: 1; }
.sidebar-group { margin-bottom: 4px; }
.sidebar-group-title {
    padding: 8px 18px 4px;
    font-size: 10px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 1px;
    color: var(--txt-dim);
}
.sidebar-link {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 18px;
    font-size: 13px; font-weight: 500;
    color: var(--txt-dim);
    transition: all .15s;
    border-left: 3px solid transparent;
    text-decoration: none;
}
.sidebar-link i { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }
.sidebar-link:hover { color: var(--txt); background: var(--bg-hover); border-left-color: var(--border-lt); }
.sidebar-link.active { color: var(--gold); background: var(--gold-dim); border-left-color: var(--gold); font-weight: 600; }
.sidebar-link .badge-count {
    margin-left: auto; font-size: 10px;
    background: var(--gold-dim); color: var(--gold);
    padding: 1px 6px; border-radius: 10px;
    font-weight: 600;
}
.sidebar-footer { padding: 12px 18px; border-top: 1px solid var(--border); }
.sidebar-footer-user { display: flex; align-items: center; gap: 10px; }
.sidebar-footer-avatar {
    width: 32px; height: 32px;
    border-radius: 50%; background: var(--gold-dim);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--f-head); font-weight: 600;
    font-size: 12px; color: var(--gold);
    border: 2px solid var(--gold); flex-shrink: 0;
}
.sidebar-footer-info { line-height: 1.2; min-width: 0; }
.sidebar-footer-name { font-size: 12px; font-weight: 600; color: var(--txt-head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-footer-email { font-size: 10.5px; color: var(--txt-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ================================================================
   MAIN LAYOUT
   ================================================================ */
.main-wrapper {
    margin-left: var(--sidebar-w);
    margin-top: var(--topbar-h);
    min-height: calc(100vh - var(--topbar-h));
    display: flex; flex-direction: column;
}
.main-content { flex: 1; padding: 24px 28px; }

/* ================================================================
   PAGE HEADER
   ================================================================ */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.page-header-left { display: flex; flex-direction: column; gap: 4px; }
.page-breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--txt-dim); }
.page-breadcrumb a { color: var(--txt-dim); }
.page-breadcrumb a:hover { color: var(--gold); }
.page-breadcrumb .sep { color: var(--border-lt); }
.page-breadcrumb .current { color: var(--txt); }
.page-title { font-size: 22px; font-weight: 700; color: var(--txt-head); margin: 0; }
.page-header-actions { display: flex; align-items: center; gap: 10px; }
.header-search { display: flex; align-items: center; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-md); padding: 0 12px; gap: 6px; transition: border-color .15s; }
.header-search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }
.header-search i { color: var(--txt-dim); font-size: 14px; }
.header-search input { background: none; border: none; outline: none; color: var(--txt); font-size: 13px; padding: 7px 0; width: 180px; font-family: var(--f-body); }
.header-search input::placeholder { color: var(--txt-dim); }

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 6px; padding: 8px 16px;
    font-family: var(--f-body); font-size: 13px; font-weight: 600;
    border-radius: var(--r-md); border: 1px solid transparent;
    cursor: pointer; transition: all .15s;
    text-decoration: none; white-space: nowrap; line-height: 1;
}
.btn i { font-size: 14px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-gold { background: var(--gold); color: #fff; border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-lt); box-shadow: 0 2px 8px rgba(37,99,235,.25); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { filter: brightness(1.1); color: #fff; }
.btn-ghost { background: transparent; color: var(--txt); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--border-lt); background: var(--bg-hover); color: var(--txt-head); }
.btn-green { background: var(--success); color: #fff; border-color: var(--success); }
.btn-green:hover { filter: brightness(1.1); }
.btn-blue { background: var(--info); color: #fff; border-color: var(--info); }
.btn-blue:hover { filter: brightness(1.1); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { filter: brightness(1.1); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 10px 22px; font-size: 15px; }
.btn-icon { width: 34px; height: 34px; padding: 0; border-radius: var(--r-sm); }
.btn-icon.sm { width: 28px; height: 28px; font-size: 13px; }

/* ================================================================
   CARDS
   ================================================================ */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.card-header { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-header-title { font-family: var(--f-head); font-size: 15px; font-weight: 600; color: var(--txt-head); display: flex; align-items: center; gap: 8px; }
.card-body { padding: 18px; }
.card-footer { padding: 12px 18px; border-top: 1px solid var(--border); }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpi-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--r-lg); padding: 18px;
    display: flex; flex-direction: column; gap: 8px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s, transform .2s;
}
.kpi-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.kpi-card-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-card-label { font-size: 12px; color: var(--txt-dim); text-transform: uppercase; letter-spacing: .5px; font-weight: 500; }
.kpi-card-icon { width: 34px; height: 34px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-size: 16px; }
.kpi-card-icon.gold { background: var(--gold-dim); color: var(--gold); }
.kpi-card-icon.green { background: rgba(22,163,74,.1); color: var(--success); }
.kpi-card-icon.blue { background: rgba(2,132,199,.1); color: var(--info); }
.kpi-card-icon.red { background: rgba(220,38,38,.1); color: var(--danger); }
.kpi-card-icon.purple { background: rgba(124,58,237,.1); color: var(--purple); }
.kpi-card-value { font-size: 26px; font-weight: 700; font-family: var(--f-head); color: var(--txt-head); line-height: 1; }
.kpi-card-footer { font-size: 11.5px; color: var(--txt-dim); display: flex; align-items: center; gap: 4px; }
.kpi-card-footer .up { color: var(--success); }
.kpi-card-footer .down { color: var(--danger); }

/* ================================================================
   TABLES
   ================================================================ */
.table-wrapper { overflow-x: auto; }
table.erp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.erp-table thead th { padding: 10px 14px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--txt-dim); border-bottom: 2px solid var(--border); text-align: left; white-space: nowrap; background: var(--bg-card); position: sticky; top: 0; }
table.erp-table tbody td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--txt); vertical-align: middle; }
table.erp-table tbody tr { transition: background .1s; }
table.erp-table tbody tr:nth-child(even) { background: var(--bg); }
table.erp-table tbody tr:hover { background: var(--bg-hover); }
table.erp-table tbody tr:last-child td { border-bottom: none; }
table.erp-table .col-actions { text-align: right; white-space: nowrap; }
table.erp-table .col-num { font-family: var(--f-mono); font-size: 12px; color: var(--gold); }
table.erp-table .col-amount { font-family: var(--f-mono); font-size: 13px; font-weight: 600; text-align: right; }

/* ================================================================
   BADGES / STATUS
   ================================================================ */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; letter-spacing: .2px; white-space: nowrap; }
.badge i { font-size: 10px; }
.st-signed   { background: rgba(22,163,74,.1);   color: #15803D; }
.st-pending  { background: rgba(245,158,11,.1);  color: #B45309; }
.st-draft    { background: rgba(100,116,139,.1);  color: #475569; }
.st-refused  { background: rgba(220,38,38,.1);   color: #B91C1C; }
.st-paid     { background: rgba(22,163,74,.1);   color: #15803D; }
.st-unpaid   { background: rgba(220,38,38,.1);   color: #B91C1C; }
.st-partial  { background: rgba(2,132,199,.1);   color: #0369A1; }
.st-active   { background: rgba(37,99,235,.08);  color: var(--gold); }
.st-done     { background: rgba(22,163,74,.1);   color: #15803D; }
.st-pause    { background: rgba(124,58,237,.1);  color: #6D28D9; }

/* ================================================================
   FILTER BAR
   ================================================================ */
.filter-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg); margin-bottom: 16px; flex-wrap: wrap; box-shadow: var(--shadow-sm); }
.filter-bar .filter-group { display: flex; align-items: center; gap: 6px; }
.filter-bar label { font-size: 11px; color: var(--txt-dim); text-transform: uppercase; letter-spacing: .4px; font-weight: 600; white-space: nowrap; }
.filter-bar select, .filter-bar input[type="text"], .filter-bar input[type="date"], .filter-bar input[type="search"] { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 6px 10px; font-family: var(--f-body); font-size: 12.5px; color: var(--txt); outline: none; transition: border-color .15s; }
.filter-bar select:focus, .filter-bar input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }
.filter-bar .filter-spacer { flex: 1; }

/* ================================================================
   FORMS
   ================================================================ */
.form-group { margin-bottom: 16px; }
.form-label { display: block; margin-bottom: 5px; font-size: 12px; font-weight: 600; color: var(--txt-dim); text-transform: uppercase; letter-spacing: .4px; }
.form-control { width: 100%; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-md); padding: 9px 12px; font-family: var(--f-body); font-size: 13px; color: var(--txt); outline: none; transition: border-color .2s, box-shadow .2s; }
.form-control:hover { border-color: var(--border-lt); }
.form-control:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }
.form-control::placeholder { color: var(--txt-dim); }
.form-control.is-invalid { border-color: var(--danger); }
.invalid-feedback { font-size: 12px; color: var(--danger); margin-top: 4px; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748B' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-check { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.form-check input[type="checkbox"], .form-check input[type="radio"] { width: 16px; height: 16px; accent-color: var(--gold); }
.form-check label { font-size: 13px; color: var(--txt); cursor: pointer; }
.form-row { display: grid; gap: 16px; }
.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-row.cols-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.form-actions { display: flex; align-items: center; gap: 10px; padding-top: 16px; border-top: 1px solid var(--border); margin-top: 8px; }

/* ================================================================
   MODALS
   ================================================================ */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.3); backdrop-filter: blur(4px); z-index: 5000; align-items: center; justify-content: center; }
.modal-overlay.active { display: flex; }
.modal-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-xl); width: 90%; max-width: 560px; max-height: 85vh; overflow-y: auto; box-shadow: var(--shadow-lg); animation: modalIn .2s ease; }
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-family: var(--f-head); font-size: 17px; font-weight: 600; color: var(--txt-head); }
.modal-close { background: none; border: none; color: var(--txt-dim); font-size: 18px; cursor: pointer; padding: 4px; border-radius: var(--r-sm); transition: all .15s; }
.modal-close:hover { color: var(--txt); background: var(--bg-hover); }
.modal-body { padding: 20px; }
.modal-footer { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: flex-end; gap: 10px; }

/* ================================================================
   TOASTS
   ================================================================ */
.toast-container { position: fixed; top: calc(var(--topbar-h) + 12px); right: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 9000; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-md); min-width: 300px; max-width: 420px; animation: toastIn .3s ease; position: relative; }
.toast.toast-out { animation: toastOut .25s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(40px); } }
.toast-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.toast-body { flex: 1; }
.toast-title { font-size: 13px; font-weight: 600; color: var(--txt-head); }
.toast-msg { font-size: 12.5px; color: var(--txt-dim); margin-top: 2px; }
.toast-close { background: none; border: none; color: var(--txt-dim); cursor: pointer; font-size: 14px; padding: 2px; flex-shrink: 0; transition: color .15s; }
.toast-close:hover { color: var(--txt); }
.toast.success { border-left: 3px solid var(--success); }
.toast.success .toast-icon { color: var(--success); }
.toast.error   { border-left: 3px solid var(--danger); }
.toast.error .toast-icon   { color: var(--danger); }
.toast.warning { border-left: 3px solid var(--warning); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.info    { border-left: 3px solid var(--info); }
.toast.info .toast-icon    { color: var(--info); }

/* ================================================================
   CHARTS
   ================================================================ */
.chart-container { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-sm); }
.chart-container canvas { width: 100% !important; }
.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }

/* ================================================================
   DEVIS DETAIL
   ================================================================ */
.devis-detail { display: grid; grid-template-columns: 1fr 320px; gap: 20px; }
.devis-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.devis-meta-item { padding: 12px; background: var(--bg); border-radius: var(--r-md); }
.devis-meta-label { font-size: 11px; color: var(--txt-dim); text-transform: uppercase; letter-spacing: .3px; margin-bottom: 4px; font-weight: 600; }
.devis-meta-value { font-size: 14px; color: var(--txt-head); font-weight: 500; }
.devis-lines-table { margin-top: 16px; }
.devis-totals { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.devis-totals-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13px; }
.devis-totals-row.total { font-size: 16px; font-weight: 700; color: var(--gold); padding-top: 8px; border-top: 1px solid var(--border); margin-top: 4px; }
.devis-sidebar .card { margin-bottom: 16px; }

/* ================================================================
   SIGNATURE
   ================================================================ */
.signature-zone { background: var(--bg); border: 2px dashed var(--border); border-radius: var(--r-lg); padding: 24px; text-align: center; }
.signature-zone.signed { border-color: var(--success); border-style: solid; }
.signature-zone-label { font-size: 12px; color: var(--txt-dim); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.signature-zone-img { max-width: 260px; max-height: 100px; margin: 8px auto; }
.signature-zone-info { font-size: 12px; color: var(--txt-dim); margin-top: 8px; }
.signature-zone canvas { border: 1px solid var(--border); border-radius: var(--r-md); cursor: crosshair; background: #fff; }

/* ================================================================
   REPORTING
   ================================================================ */
.reporting-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.reporting-period-selector { display: flex; align-items: center; gap: 8px; }
.reporting-period-selector select { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 7px 10px; color: var(--txt); font-family: var(--f-body); font-size: 13px; outline: none; }
.reporting-period-selector select:focus { border-color: var(--gold); }
.reporting-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.reporting-summary-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; text-align: center; box-shadow: var(--shadow-sm); }
.reporting-summary-value { font-family: var(--f-head); font-size: 24px; font-weight: 700; color: var(--txt-head); }
.reporting-summary-label { font-size: 12px; color: var(--txt-dim); margin-top: 4px; text-transform: uppercase; letter-spacing: .3px; }
.reporting-chart-row { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 24px; }

/* ================================================================
   PAGINATION
   ================================================================ */
.pagination { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 16px 0; }
.pagination a, .pagination span { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--r-sm); font-size: 13px; font-weight: 500; color: var(--txt-dim); text-decoration: none; transition: all .15s; }
.pagination a:hover { background: var(--bg-hover); color: var(--txt); }
.pagination .active { background: var(--gold-dim); color: var(--gold); font-weight: 700; }
.pagination .disabled { opacity: .3; pointer-events: none; }

/* ================================================================
   EMPTY STATE
   ================================================================ */
.empty-state { text-align: center; padding: 48px 24px; }
.empty-state-icon { font-size: 48px; color: var(--border-lt); margin-bottom: 16px; }
.empty-state-title { font-size: 17px; color: var(--txt-head); font-weight: 600; margin-bottom: 6px; }
.empty-state-desc { font-size: 13px; color: var(--txt-dim); margin-bottom: 20px; }

/* ================================================================
   TABS
   ================================================================ */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab { padding: 10px 18px; font-size: 13px; font-weight: 500; color: var(--txt-dim); border-bottom: 2px solid transparent; cursor: pointer; transition: all .15s; text-decoration: none; }
.tab:hover { color: var(--txt); }
.tab.active { color: var(--gold); border-bottom-color: var(--gold); }

/* ================================================================
   UTILITIES
   ================================================================ */
.text-gold { color: var(--gold); }
.text-dim  { color: var(--txt-dim); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-info    { color: var(--info); }
.text-white   { color: var(--txt-head); }
.text-right   { text-align: right; }
.text-center  { text-align: center; }
.text-mono    { font-family: var(--f-mono); }
.text-sm      { font-size: 12px; }
.text-xs      { font-size: 11px; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mr-1 { margin-right: 8px; }
.ml-auto { margin-left: auto; }
.p-0 { padding: 0; }
.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.d-flex        { display: flex; }
.d-grid        { display: grid; }
.d-none        { display: none; }
.d-inline-flex { display: inline-flex; }
.items-center  { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.w-full { width: 100%; }
.rounded { border-radius: var(--r-md); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
.sidebar-toggle { display: none; background: none; border: none; color: var(--txt); font-size: 20px; cursor: pointer; padding: 4px; }

@media (max-width: 1024px) {
    .charts-grid { grid-template-columns: 1fr; }
    .devis-detail { grid-template-columns: 1fr; }
    .reporting-summary-grid { grid-template-columns: repeat(2, 1fr); }
    .reporting-chart-row { grid-template-columns: 1fr; }
    .form-row.cols-4 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .sidebar-toggle { display: block; }
    .sidebar { transform: translateX(-100%); transition: transform .25s ease; z-index: 950; }
    .sidebar.open { transform: translateX(0); }
    .sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 940; }
    .sidebar-backdrop.active { display: block; }
    .main-wrapper { margin-left: 0; }
    .page-header { flex-direction: column; align-items: flex-start; }
    .header-search input { width: 140px; }
    .kpi-grid { grid-template-columns: 1fr 1fr; }
    .form-row.cols-2, .form-row.cols-3, .form-row.cols-4 { grid-template-columns: 1fr; }
    .devis-meta-grid { grid-template-columns: 1fr; }
    .reporting-summary-grid { grid-template-columns: 1fr; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-bar .filter-group { flex-wrap: wrap; }
    .filter-bar .filter-spacer { display: none; }
    .topbar-user-info { display: none; }
}

@media (max-width: 480px) {
    .main-content { padding: 16px 12px; }
    .kpi-grid { grid-template-columns: 1fr; }
    .page-title { font-size: 18px; }
}

/* ================================================================
   STATUS BADGES  (.st base + French entity values)
   ================================================================ */
.st { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap; letter-spacing: .2px; }
/* Devis */
.st-brouillon   { background: rgba(100,116,139,.1);  color: #475569; }
.st-envoye      { background: rgba(2,132,199,.1);    color: #0369A1; }
.st-en_attente  { background: rgba(245,158,11,.1);   color: #B45309; }
.st-signe       { background: rgba(22,163,74,.1);    color: #15803D; }
.st-refuse      { background: rgba(220,38,38,.1);    color: #B91C1C; }
.st-expire      { background: rgba(100,116,139,.1);  color: #475569; }
/* Factures */
.st-payee              { background: rgba(22,163,74,.1);   color: #15803D; }
.st-non_payee          { background: rgba(220,38,38,.1);   color: #B91C1C; }
.st-partiellement_payee{ background: rgba(2,132,199,.1);   color: #0369A1; }
.st-annulee            { background: rgba(100,116,139,.1); color: #475569; }
/* Prospects */
.st-nouveau      { background: rgba(2,132,199,.1);   color: #0369A1; }
.st-contacte     { background: rgba(245,158,11,.1);  color: #B45309; }
.st-rdv_planifie { background: rgba(37,99,235,.08);  color: #1D4ED8; }
.st-devis_envoye { background: rgba(124,58,237,.1);  color: #6D28D9; }
.st-converti     { background: rgba(22,163,74,.1);   color: #15803D; }
.st-perdu        { background: rgba(220,38,38,.1);   color: #B91C1C; }
/* Chantiers */
.st-planifie  { background: rgba(2,132,199,.1);   color: #0369A1; }
.st-en_cours  { background: rgba(37,99,235,.08);  color: #1D4ED8; }
.st-termine   { background: rgba(22,163,74,.1);   color: #15803D; }
.st-en_pause  { background: rgba(124,58,237,.1);  color: #6D28D9; }
.st-annule    { background: rgba(100,116,139,.1); color: #475569; }
/* Conges */
.st-en_attente { background: rgba(245,158,11,.1); color: #B45309; }
.st-valide     { background: rgba(22,163,74,.1);  color: #15803D; }
.st-rejete     { background: rgba(220,38,38,.1);  color: #B91C1C; }
/* Clients */
.st-actif    { background: rgba(22,163,74,.1);   color: #15803D; }
.st-inactif  { background: rgba(100,116,139,.1); color: #475569; }
.st-prospect { background: rgba(2,132,199,.1);   color: #0369A1; }

/* ================================================================
   DASHBOARD — charts, bar, donut, layout
   ================================================================ */
.chart-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-sm); }
.chart-card h5 { color: var(--gold); margin: 0 0 16px; display: flex; align-items: center; gap: 8px; font-size: 15px; }
.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 160px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bar { width: 100%; max-width: 32px; background: linear-gradient(180deg, var(--gold), var(--gold-lt)); border-radius: 4px 4px 0 0; min-height: 4px; transition: height .4s ease; }
.bar-label { font-size: 10px; color: var(--txt-dim); margin-top: 4px; text-align: center; }
.donut-container { display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap; }
.donut-ring { position: relative; width: 140px; height: 140px; flex-shrink: 0; }
.donut-ring svg { transform: rotate(-90deg); }
.donut-value { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 24px; font-weight: 700; color: var(--gold); }
.dash-bottom { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.dash-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.dash-action-btn { flex-direction: column; gap: 6px; padding: 16px 12px; }
.dash-action-btn i { font-size: 22px; }
.prospect-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.prospect-item:last-child { border-bottom: none; }
.prospect-name { color: var(--txt); font-weight: 500; font-size: 13px; }
.prospect-date { font-size: 12px; color: var(--txt-dim); margin-top: 2px; }

/* ================================================================
   MISSING UTILITIES
   ================================================================ */
.mb-4 { margin-bottom: 32px; }
.mt-4 { margin-top: 32px; }
.d-block { display: block; }

/* data-table — used in dashboard */
table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data-table thead th { padding: 10px 14px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--txt-dim); border-bottom: 2px solid var(--border); text-align: left; white-space: nowrap; }
table.data-table tbody td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--txt); vertical-align: middle; }
table.data-table tbody tr:nth-child(even) { background: var(--bg); }
table.data-table tbody tr:hover { background: var(--bg-hover); }
table.data-table tbody tr:last-child td { border-bottom: none; }

@media (max-width: 1024px) {
    .dash-bottom { grid-template-columns: 1fr; }
    .dash-actions { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .dash-actions { grid-template-columns: 1fr 1fr; }
}

/* ================================================================
   BOOTSTRAP 5 COMPATIBILITY LAYER
   ================================================================ */

/* -- Layout -- */
.container-fluid { width: 100%; }

/* -- Grid -- */
.row { display: flex; flex-wrap: wrap; margin-left: -8px; margin-right: -8px; }
.row > * { padding-left: 8px; padding-right: 8px; box-sizing: border-box; }
/* gap helpers */
.g-2 > * { padding: 4px; }
.g-3 > * { padding: 6px; }
.g-4 > * { padding: 8px; }

/* Columns — base (xs) */
.col-1  { flex: 0 0 8.333%;  max-width: 8.333%; }
.col-2  { flex: 0 0 16.667%; max-width: 16.667%; }
.col-3  { flex: 0 0 25%;     max-width: 25%; }
.col-4  { flex: 0 0 33.333%; max-width: 33.333%; }
.col-5  { flex: 0 0 41.667%; max-width: 41.667%; }
.col-6  { flex: 0 0 50%;     max-width: 50%; }
.col-7  { flex: 0 0 58.333%; max-width: 58.333%; }
.col-8  { flex: 0 0 66.667%; max-width: 66.667%; }
.col-9  { flex: 0 0 75%;     max-width: 75%; }
.col-10 { flex: 0 0 83.333%; max-width: 83.333%; }
.col-11 { flex: 0 0 91.667%; max-width: 91.667%; }
.col-12 { flex: 0 0 100%;    max-width: 100%; }

/* Columns — sm */
@media (min-width: 576px) {
    .col-sm-1  { flex: 0 0 8.333%;  max-width: 8.333%; }
    .col-sm-2  { flex: 0 0 16.667%; max-width: 16.667%; }
    .col-sm-3  { flex: 0 0 25%;     max-width: 25%; }
    .col-sm-4  { flex: 0 0 33.333%; max-width: 33.333%; }
    .col-sm-5  { flex: 0 0 41.667%; max-width: 41.667%; }
    .col-sm-6  { flex: 0 0 50%;     max-width: 50%; }
    .col-sm-7  { flex: 0 0 58.333%; max-width: 58.333%; }
    .col-sm-8  { flex: 0 0 66.667%; max-width: 66.667%; }
    .col-sm-9  { flex: 0 0 75%;     max-width: 75%; }
    .col-sm-10 { flex: 0 0 83.333%; max-width: 83.333%; }
    .col-sm-11 { flex: 0 0 91.667%; max-width: 91.667%; }
    .col-sm-12 { flex: 0 0 100%;    max-width: 100%; }
}

/* Columns — md */
@media (min-width: 768px) {
    .col-md-1  { flex: 0 0 8.333%;  max-width: 8.333%; }
    .col-md-2  { flex: 0 0 16.667%; max-width: 16.667%; }
    .col-md-3  { flex: 0 0 25%;     max-width: 25%; }
    .col-md-4  { flex: 0 0 33.333%; max-width: 33.333%; }
    .col-md-5  { flex: 0 0 41.667%; max-width: 41.667%; }
    .col-md-6  { flex: 0 0 50%;     max-width: 50%; }
    .col-md-7  { flex: 0 0 58.333%; max-width: 58.333%; }
    .col-md-8  { flex: 0 0 66.667%; max-width: 66.667%; }
    .col-md-9  { flex: 0 0 75%;     max-width: 75%; }
    .col-md-10 { flex: 0 0 83.333%; max-width: 83.333%; }
    .col-md-11 { flex: 0 0 91.667%; max-width: 91.667%; }
    .col-md-12 { flex: 0 0 100%;    max-width: 100%; }
}

/* Columns — lg */
@media (min-width: 992px) {
    .col-lg-1  { flex: 0 0 8.333%;  max-width: 8.333%; }
    .col-lg-2  { flex: 0 0 16.667%; max-width: 16.667%; }
    .col-lg-3  { flex: 0 0 25%;     max-width: 25%; }
    .col-lg-4  { flex: 0 0 33.333%; max-width: 33.333%; }
    .col-lg-5  { flex: 0 0 41.667%; max-width: 41.667%; }
    .col-lg-6  { flex: 0 0 50%;     max-width: 50%; }
    .col-lg-7  { flex: 0 0 58.333%; max-width: 58.333%; }
    .col-lg-8  { flex: 0 0 66.667%; max-width: 66.667%; }
    .col-lg-9  { flex: 0 0 75%;     max-width: 75%; }
    .col-lg-10 { flex: 0 0 83.333%; max-width: 83.333%; }
    .col-lg-11 { flex: 0 0 91.667%; max-width: 91.667%; }
    .col-lg-12 { flex: 0 0 100%;    max-width: 100%; }
}

/* -- Flex utilities -- */
.flex-grow-1         { flex-grow: 1; }
.align-items-center  { align-items: center; }
.align-items-start   { align-items: flex-start; }
.align-items-end     { align-items: flex-end; }
.align-middle        { vertical-align: middle; }
.justify-content-between { justify-content: space-between; }
.justify-content-center  { justify-content: center; }
.justify-content-end     { justify-content: flex-end; }

/* -- Spacing -- */
.me-1 { margin-right: 4px; }
.me-2 { margin-right: 8px; }
.me-3 { margin-right: 16px; }
.ms-1 { margin-left: 4px; }
.ms-2 { margin-left: 8px; }
.ms-auto { margin-left: auto; }
.py-1 { padding-top: 4px;  padding-bottom: 4px; }
.py-2 { padding-top: 8px;  padding-bottom: 8px; }
.py-3 { padding-top: 16px; padding-bottom: 16px; }
.py-4 { padding-top: 24px; padding-bottom: 24px; }
.py-5 { padding-top: 40px; padding-bottom: 40px; }
.px-3 { padding-left: 16px; padding-right: 16px; }
.px-4 { padding-left: 0;    padding-right: 0; }
.pe-0 { padding-right: 0; }

/* -- Typography -- */
.h3 { font-size: 22px; font-weight: 600; color: var(--txt-head); margin: 0; display: inline; }
.h4 { font-size: 20px; font-weight: 600; color: var(--txt-head); margin: 0; }
.h5 { font-size: 16px; font-weight: 600; color: var(--txt-head); margin: 0; }
.h6 { font-size: 14px; font-weight: 600; color: var(--txt-head); margin: 0; }
.fw-bold     { font-weight: 700 !important; }
.fw-semibold { font-weight: 600 !important; }
.small       { font-size: 12px !important; }
.text-end    { text-align: right; }
.text-muted  { color: var(--txt-dim); }
.lh-1        { line-height: 1; }

/* -- Tables -- */
.table-responsive { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table thead th { padding: 10px 14px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--txt-dim); border-bottom: 2px solid var(--border); text-align: left; white-space: nowrap; }
.table tbody td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--txt); vertical-align: middle; }
.table tbody tr:nth-child(even) { background: var(--bg); }
.table tbody tr:hover { background: var(--bg-hover); }
.table tbody tr:last-child td { border-bottom: none; }
.table-sm thead th, .table-sm tbody td { padding: 6px 10px; }
.table-hover tbody tr:hover { background: var(--bg-hover); }

/* -- Forms -- */
.form-select {
    width: 100%; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--r-md); padding: 9px 30px 9px 12px;
    font-family: var(--f-body); font-size: 13px; color: var(--txt);
    outline: none; appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748B' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center;
    transition: border-color .2s, box-shadow .2s;
}
.form-select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }
.form-select-sm  { padding: 5px 24px 5px 8px; font-size: 12px; }
.form-control-sm { padding: 5px 8px; font-size: 12px; }

/* -- Progress -- */
.progress { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--gold); border-radius: 4px; transition: width .3s ease; }

/* -- Buttons -- */
.btn-outline-danger { background: transparent; border: 1px solid var(--danger); color: var(--danger); }
.btn-outline-danger:hover { background: rgba(220,38,38,.08); }

/* -- Bootstrap Tabs -- */
.nav { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.nav-tabs { border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.nav-item { }
.nav-link {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 16px; font-size: 13px; font-weight: 500;
    color: var(--txt-dim); border-bottom: 2px solid transparent;
    cursor: pointer; transition: all .15s; text-decoration: none;
}
.nav-link:hover { color: var(--txt) !important; }
.nav-link.active { color: var(--gold) !important; border-bottom-color: var(--gold); }
.tab-content { }
.tab-pane { display: none; }
.tab-pane.show.active { display: block; }

/* -- Misc -- */
.w-100   { width: 100%; }
.lh-sm   { line-height: 1.25; }
.border-0 { border: none; }

/* -- Alert messages -- */
.alert { padding: 12px 16px; border-radius: var(--r-md); margin-bottom: 16px; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.alert-success { background: rgba(22,163,74,.08);  border: 1px solid rgba(22,163,74,.2);  color: #15803D; }
.alert-danger  { background: rgba(220,38,38,.08);  border: 1px solid rgba(220,38,38,.2);  color: #B91C1C; }
.alert-warning { background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.2); color: #B45309; }
.alert-info    { background: rgba(2,132,199,.08);  border: 1px solid rgba(2,132,199,.2);  color: #0369A1; }

/* -- Spinner -- */
.spinner-border { display: inline-block; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .6s linear infinite; vertical-align: middle; }
.spinner-border-sm { width: .8em; height: .8em; border-width: 1.5px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* -- erp-card alias -- */
.erp-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }

/* -- form-text -- */
.form-text { font-size: 11.5px; color: var(--txt-dim); margin-top: 4px; display: block; }

/* -- p-4 -- */
.p-4 { padding: 24px; }
