:root {
    --primary: #1a3a5c;
    --primary-dark: #122a44;
    --primary-light: #2a5080;
    --accent: #c9a84c;
    --accent-dark: #b8952c;
    --bg: #f4f6f9;
    --text: #2c3e50;
    --muted: #6c757d;
    --sidebar-width: 250px;
}

* { font-family: 'Tajawal', sans-serif; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Tajawal', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0; right: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--primary);
    color: #fff;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    box-shadow: -2px 0 8px rgba(0,0,0,.1);
}
.sidebar .brand {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
    display: flex; align-items: center; gap: .75rem;
    background: var(--primary-dark);
}
.sidebar .brand i { font-size: 2rem; color: var(--accent); }
.sidebar .brand-name { font-size: 1.4rem; font-weight: 700; color: #fff; }
.sidebar .brand-sub { font-size: .8rem; color: rgba(255,255,255,.7); }
.sidebar .nav-list {
    list-style: none;
    padding: 0; margin: 0;
    flex: 1;
    display: flex; flex-direction: column;
}
.sidebar .nav-list li a {
    display: flex; align-items: center; gap: .7rem;
    padding: .8rem 1.2rem;
    color: rgba(255,255,255,.85);
    text-decoration: none;
    border-right: 3px solid transparent;
    transition: all .2s;
}
.sidebar .nav-list li a:hover {
    background: rgba(255,255,255,.06);
    color: #fff;
}
.sidebar .nav-list li a.active {
    background: var(--primary-dark);
    color: var(--accent);
    border-right-color: var(--accent);
}
.sidebar .nav-list li a i { font-size: 1.1rem; min-width: 22px; text-align: center; }
.sidebar .nav-section {
    padding: .75rem 1.2rem .3rem;
    color: rgba(255,255,255,.5);
    font-size: .75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: .5rem;
}
.sidebar .mt-auto { margin-top: auto !important; border-top: 1px solid rgba(255,255,255,.1); }

.main-content {
    margin-right: var(--sidebar-width);
    min-height: 100vh;
}

.topbar {
    background: #fff;
    padding: .9rem 1.5rem;
    border-bottom: 1px solid #e6e8eb;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.topbar .page-title {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.15rem;
}
.topbar .user-info i { color: var(--primary); font-size: 1.5rem; vertical-align: middle; }
.topbar .user-info span { font-weight: 500; margin: 0 .3rem; }

/* Login page */
.login-wrap {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 1rem;
}
.login-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 15px 50px rgba(0,0,0,.2);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}
.login-card .logo { text-align: center; margin-bottom: 1.5rem; }
.login-card .logo i { font-size: 3.5rem; color: var(--accent); }
.login-card h1 { color: var(--primary); font-size: 1.6rem; font-weight: 700; margin-bottom: 0.3rem; text-align: center; }
.login-card .subtitle { color: var(--muted); font-size: .9rem; text-align: center; margin-bottom: 1.5rem; }

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    margin-bottom: 1.2rem;
}
.card-header {
    background: #fff;
    border-bottom: 2px solid #f0f2f5;
    font-weight: 700;
    color: var(--primary);
    padding: 1rem 1.25rem;
}

.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 1.2rem;
    border-right: 4px solid var(--primary);
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    transition: transform .15s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card-link {
    display: flex;
    min-height: 100%;
    color: inherit;
    text-decoration: none;
}
.stat-card-link:hover,
.stat-card-link:focus {
    color: inherit;
    text-decoration: none;
}
.stat-card .stat-value { font-size: 2rem; font-weight: 700; color: var(--primary); }
.stat-card .stat-label { color: var(--muted); font-size: .9rem; }
.stat-card .stat-icon { font-size: 2.5rem; opacity: .15; color: var(--primary); }
.stat-card.accent { border-right-color: var(--accent); }
.stat-card.accent .stat-value { color: var(--accent-dark); }
.stat-card.danger { border-right-color: #dc3545; }
.stat-card.danger .stat-value { color: #dc3545; }
.stat-card.success { border-right-color: #198754; }
.stat-card.success .stat-value { color: #198754; }
.stat-card.executive-pending {
    border-right-color: var(--accent);
    background:
        linear-gradient(135deg, #fff 0%, #fffaf0 100%);
    position: relative;
    overflow: hidden;
}
.stat-card.executive-pending::after {
    content: "";
    position: absolute;
    inset-inline-end: -28px;
    bottom: -42px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(201,168,76,.12);
}
.stat-card.executive-pending .stat-value { color: var(--accent-dark); }
.stat-card.executive-pending .stat-icon {
    color: var(--accent-dark);
    opacity: .2;
}

/* Operational dashboard */
.ops-dashboard {
    display: block;
}
.ops-hero {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e8edf2;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    margin-bottom: 1rem;
}
.ops-eyebrow {
    color: var(--accent-dark);
    font-weight: 700;
    font-size: .9rem;
    margin-bottom: .35rem;
}
.ops-hero h2 {
    color: var(--primary);
    font-size: 1.35rem;
    margin: 0 0 .25rem;
    font-weight: 700;
}
.ops-hero p {
    margin: 0;
    color: var(--muted);
    font-size: .92rem;
}
.ops-score {
    min-width: 128px;
    height: 96px;
    border-radius: 10px;
    background: #eaf6ef;
    color: #198754;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.ops-score.danger { background: #fdecea; color: #dc3545; }
.ops-score-link,
.ops-tile-link,
.exec-kpi-link,
.exec-status {
    text-decoration: none;
}
.ops-score-link:hover,
.ops-score-link:focus,
.ops-tile-link:hover,
.ops-tile-link:focus,
.exec-kpi-link:hover,
.exec-kpi-link:focus,
.exec-status:hover,
.exec-status:focus {
    color: inherit;
    text-decoration: none;
    transform: translateY(-2px);
}
.ops-score span { font-size: 2.1rem; font-weight: 700; line-height: 1; }
.ops-score small { font-weight: 700; margin-top: .35rem; }
.ops-tile {
    background: #fff;
    border: 1px solid #e8edf2;
    border-radius: 10px;
    padding: 1rem;
    min-height: 118px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: .25rem .75rem;
    align-items: center;
}
.ops-tile i {
    grid-row: 1 / span 2;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef3f8;
    color: var(--primary);
    font-size: 1.3rem;
}
.ops-tile strong { font-size: 1.7rem; color: var(--primary); line-height: 1; }
.ops-tile span { color: var(--muted); font-size: .9rem; }
.ops-tile.urgent i { background: #fdecea; color: #dc3545; }
.ops-tile.due i { background: #e7f5ff; color: #0d6efd; }
.ops-tile.returned i { background: #fff3cd; color: #997404; }
.ops-card .card-header {
    border-bottom-width: 1px;
}
.ops-stage-list {
    display: grid;
    gap: .85rem;
}
.ops-stage-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    margin-bottom: .35rem;
}
.ops-stage-head b { color: var(--primary); }
.ops-stage-head span { white-space: nowrap; }
.ops-bar {
    height: 10px;
    background: #eef1f4;
    border-radius: 10px;
    overflow: hidden;
}
.ops-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: inherit;
}
.ops-average-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .65rem 0;
    border-bottom: 1px solid #edf0f3;
}
.ops-average-row:last-child { border-bottom: 0; }
.ops-average-row span { color: var(--primary); font-weight: 600; }
.ops-average-row b { color: var(--accent-dark); }

.lifecycle-radar {
    display: block;
}
.radar-hero {
    background: #fff;
    border: 1px solid #e8edf2;
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.radar-hero h2 {
    color: var(--primary);
    font-size: 1.45rem;
    margin: 0 0 .35rem;
    font-weight: 700;
}
.radar-hero p {
    color: var(--muted);
    margin: 0;
}
.radar-filter {
    display: flex;
    align-items: end;
    gap: .6rem;
}
.radar-filter label {
    min-width: 150px;
}
.radar-filter span {
    display: block;
    color: var(--muted);
    font-size: .78rem;
    margin-bottom: .25rem;
}
.radar-card {
    background: #fff;
    border: 1px solid #e8edf2;
    border-right: 4px solid var(--primary);
    border-radius: 10px;
    padding: 1rem;
    min-height: 116px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: .25rem .75rem;
    align-items: center;
    width: 100%;
    text-align: inherit;
}
.radar-card-button {
    cursor: pointer;
    color: inherit;
    transition: transform .15s, box-shadow .15s;
}
.radar-card-button:hover,
.radar-card-button:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(26,58,92,.12);
}
.radar-card i {
    grid-row: 1 / span 3;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef3f8;
    color: var(--primary);
    font-size: 1.25rem;
}
.radar-card strong { font-size: 1.7rem; color: var(--primary); line-height: 1; }
.radar-card b { color: var(--accent-dark); font-size: .88rem; line-height: 1; }
.radar-card span { color: var(--muted); font-size: .9rem; }
.radar-card.today { border-right-color: #198754; }
.radar-card.today i { background: #eaf6ef; color: #198754; }
.radar-card.range { border-right-color: var(--accent); }
.radar-card.range i { background: #fff8e1; color: var(--accent-dark); }
.radar-card.amount { border-right-color: #0d6efd; }
.radar-card.amount i { background: #e7f1ff; color: #0d6efd; }
.radar-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: .75rem;
}
.radar-day {
    background: #fff;
    border: 1px solid #e8edf2;
    border-radius: 10px;
    padding: .85rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.radar-day.today {
    border-color: #badbcc;
    background: #f4fbf7;
}
.radar-day small { color: var(--muted); display: block; }
.radar-day strong { display: block; color: var(--primary); font-size: 1.45rem; line-height: 1.1; margin-top: .25rem; }
.radar-day span { color: var(--muted); font-size: .88rem; }
.radar-day em { display: inline-block; margin-top: .4rem; font-style: normal; color: #dc3545; font-size: .78rem; font-weight: 700; }
.forecast-confidence {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: .25rem .55rem;
    font-size: .78rem;
    font-weight: 700;
    background: #eaf6ef;
    color: #198754;
}
.forecast-confidence.medium { background: #fff3cd; color: #997404; }
.forecast-confidence.low { background: #fdecea; color: #dc3545; }
.radar-modal {
    border: 0;
    border-radius: 10px;
    overflow: hidden;
}
.radar-modal .modal-header {
    background: #f8fafc;
    border-bottom-color: #e8edf2;
}
.radar-modal .modal-title {
    color: var(--primary);
    font-weight: 700;
}

.executive-dashboard {
    display: block;
}
.exec-hero {
    background: #fff;
    border: 1px solid #e8edf2;
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.exec-hero h2 {
    color: var(--primary);
    font-size: 1.45rem;
    margin: 0 0 .35rem;
    font-weight: 700;
}
.exec-hero p {
    color: var(--muted);
    margin: 0;
}
.exec-status {
    display: block;
    min-width: 160px;
    border-radius: 10px;
    padding: 1rem;
    background: #f4fbf7;
    color: #198754;
    text-align: center;
}
.exec-status.warning { background: #fff7e6; color: #997404; }
.exec-status.danger { background: #fff1f2; color: #dc3545; }
.exec-status strong {
    display: block;
    font-size: 1.8rem;
    line-height: 1;
}
.exec-kpi {
    display: block;
    background: #fff;
    border: 1px solid #e8edf2;
    border-radius: 10px;
    padding: 1rem;
    min-height: 112px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.exec-kpi-button {
    font: inherit;
    text-align: start;
    cursor: pointer;
}
.exec-kpi-button:hover {
    transform: translateY(-2px);
}
.exec-kpi small {
    color: var(--muted);
    display: block;
    margin-bottom: .35rem;
}
.exec-kpi strong {
    color: var(--primary);
    font-size: 1.55rem;
    line-height: 1.1;
}
.exec-kpi.accent strong { color: var(--accent-dark); }
.exec-kpi.danger strong { color: #dc3545; }
.exec-kpi.success strong { color: #198754; }
.workflow-heatmap {
    display: grid;
    grid-template-columns: repeat(8, minmax(92px, 1fr));
    gap: .65rem;
}
.heat-stage {
    border-radius: 10px;
    padding: .8rem .65rem;
    min-height: 118px;
    border: 1px solid #e2e8ef;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.heat-stage h6 {
    color: var(--primary);
    font-size: .86rem;
    line-height: 1.35;
    margin: 0;
    font-weight: 700;
}
.heat-stage .heat-count {
    display: flex;
    gap: .35rem;
    flex-wrap: wrap;
    margin-top: .6rem;
}
.heat-stage.heat-0 { background: #f8fafc; }
.heat-stage.heat-1 { background: #eef9f2; border-color: #badbcc; }
.heat-stage.heat-2 { background: #fff8e1; border-color: #ffe69c; }
.heat-stage.heat-3 { background: #fff1f2; border-color: #f1aeb5; }
.heat-stage.heat-4 { background: #f8d7da; border-color: #ea868f; }
.exec-insight {
    background: #fff;
    border: 1px solid #e8edf2;
    border-radius: 10px;
    padding: 1rem;
    min-height: 130px;
}
.exec-insight span {
    color: var(--muted);
    display: block;
    margin-bottom: .35rem;
}
.exec-insight strong {
    color: var(--primary);
    font-size: 1.15rem;
}
.exec-action-card {
    position: relative;
    border: 0;
    border-radius: 14px;
    padding: 1.15rem 1.25rem;
    min-height: 150px;
    width: 100%;
    text-align: start;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(26,58,92,.96), rgba(26,58,92,.82)),
        radial-gradient(circle at 12% 18%, rgba(201,168,76,.42), transparent 28%);
    box-shadow: 0 14px 34px rgba(26,58,92,.22);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
}
.exec-action-card:hover,
.exec-action-card:focus {
    transform: translateY(-3px);
    box-shadow: 0 18px 44px rgba(26,58,92,.28);
}
.exec-action-card::after {
    content: "";
    position: absolute;
    inset-inline-end: -34px;
    bottom: -48px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
}
.exec-action-card .exec-action-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(201,168,76,.24);
    color: #ffe8a3;
    font-size: 1.35rem;
    margin-bottom: .85rem;
}
.exec-action-card small {
    display: block;
    color: rgba(255,255,255,.68);
}
.exec-action-card strong {
    display: block;
    font-size: 2.2rem;
    line-height: 1;
    margin: .2rem 0 .4rem;
}
.exec-action-card .exec-action-hint {
    color: rgba(255,255,255,.82);
    font-size: .9rem;
}
.pending-action-modal .modal-content {
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(15,32,54,.22);
}
.pending-action-modal .modal-header {
    background:
        linear-gradient(135deg, rgba(26,58,92,.98), rgba(24,71,111,.92)),
        radial-gradient(circle at 10% 15%, rgba(201,168,76,.35), transparent 26%);
    border: 0;
    color: #fff;
    align-items: flex-start;
    padding: 1.2rem 1.35rem;
}
.pending-action-modal .btn-close { filter: invert(1) grayscale(100%); opacity: .8; }
.pending-modal-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: #ffe8a3;
    font-size: .82rem;
    margin-bottom: .25rem;
}
.pending-action-modal .modal-title {
    font-weight: 800;
    margin: 0;
}
.pending-action-modal .modal-title span {
    display: inline-flex;
    min-width: 30px;
    height: 30px;
    padding: 0 .55rem;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #fff;
    margin-inline-start: .4rem;
    font-size: .95rem;
}
.pending-action-modal .modal-body {
    background: #f6f8fb;
    padding: 1rem;
}
.pending-action-list {
    display: grid;
    gap: .8rem;
}
.pending-request-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    background: #fff;
    border: 1px solid #e2e8ef;
    border-inline-start: 5px solid var(--primary);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(15,32,54,.05);
}
.pending-request-card.urgent { border-inline-start-color: #ffc107; }
.pending-request-card.overdue { border-inline-start-color: #dc3545; background: #fffafb; }
.pending-request-number {
    display: inline-flex;
    align-items: center;
    background: #eef4fb;
    color: var(--primary);
    border-radius: 999px;
    padding: .22rem .6rem;
    font-size: .82rem;
    font-weight: 800;
    margin-bottom: .45rem;
}
.pending-request-card h6 {
    color: var(--primary);
    font-weight: 800;
    margin: 0 0 .55rem;
}
.pending-request-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem .85rem;
    color: #64748b;
    font-size: .86rem;
}
.pending-request-side {
    min-width: 190px;
    text-align: end;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: .55rem;
}
.pending-request-amount {
    color: var(--accent-dark);
    font-size: 1.15rem;
    font-weight: 900;
}
.pending-request-amount small {
    color: #7a8797;
    font-size: .75rem;
}
.pending-request-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .3rem;
}
.pending-empty {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    color: #64748b;
    text-align: center;
}
.pending-empty i {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eaf6ef;
    color: #198754;
    font-size: 2rem;
}
@media (max-width: 1200px) {
    .workflow-heatmap { grid-template-columns: repeat(4, minmax(120px, 1fr)); }
}
@media (max-width: 768px) {
    .exec-hero { flex-direction: column; align-items: stretch; }
    .radar-hero { flex-direction: column; align-items: stretch; }
    .radar-filter { align-items: stretch; flex-wrap: wrap; }
    .radar-filter label { min-width: 0; flex: 1 1 140px; }
    .workflow-heatmap { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
    .pending-request-card { grid-template-columns: 1fr; }
    .pending-request-side { min-width: 0; align-items: stretch; text-align: start; }
    .pending-request-badges { justify-content: flex-start; }
}

/* Buttons */
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover, .btn-primary:focus { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); }

/* Tables */
.table thead th {
    background: var(--primary);
    color: #fff;
    font-weight: 500;
    border: 0;
    vertical-align: middle;
}
.table tbody tr.row-overdue { background: #fdecea !important; }
.table tbody tr.row-overdue td { border-right: 3px solid #dc3545; }

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1rem;
    font-size: .9rem;
}
.breadcrumb a { color: var(--primary); text-decoration: none; }

/* Form */
.form-label { font-weight: 500; color: var(--primary); }
.form-control:focus, .form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 .2rem rgba(26,58,92,.15);
}

/* Timeline */
.timeline {
    position: relative;
    padding: 1rem 2rem 1rem 0;
}
.timeline::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    right: 15px;
    width: 3px;
    background: #e0e4e9;
}
.tl-item { position: relative; margin-bottom: 1.5rem; padding-right: 2.5rem; }
.tl-item .tl-dot {
    position: absolute;
    right: 6px;
    top: 5px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--primary);
}
.tl-item.approved .tl-dot { background: #198754; box-shadow: 0 0 0 2px #198754; }
.tl-item.rejected .tl-dot { background: #dc3545; box-shadow: 0 0 0 2px #dc3545; }
.tl-item.returned .tl-dot { background: #fd7e14; box-shadow: 0 0 0 2px #fd7e14; }
.tl-item.deferred .tl-dot { background: #ffc107; box-shadow: 0 0 0 2px #ffc107; }
.tl-item.deferred_open .tl-dot { background: #ffc107; box-shadow: 0 0 0 2px #ffc107; }
.tl-item.payment_done .tl-dot { background: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.tl-content {
    background: #fff;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    border-right: 3px solid var(--primary);
}
.tl-item.approved .tl-content { border-right-color: #198754; }
.tl-item.rejected .tl-content { border-right-color: #dc3545; }
.tl-item.returned .tl-content { border-right-color: #fd7e14; }
.tl-item.deferred .tl-content, .tl-item.deferred_open .tl-content { border-right-color: #ffc107; }
.tl-item.payment_done .tl-content { border-right-color: var(--accent); }
.tl-header { display: flex; justify-content: space-between; flex-wrap: wrap; margin-bottom: .5rem; }
.tl-header strong { color: var(--primary); }
.tl-time { color: var(--muted); font-size: .85rem; }
.tl-note { color: var(--text); margin-top: .3rem; }

/* Badges/pills */
.badge { font-weight: 500; padding: .4em .7em; font-size: .78rem; }

/* Quotations */
.quotation-row { background: #fff; border: 1px solid #e6e8eb; border-radius: 8px; padding: 1rem; margin-bottom: .75rem; }
.quotation-row.recommended { border-right: 4px solid var(--accent); background: #fefaf0; }

/* Notification Bell */
.notification-bell {
    position: relative;
    transition: transform 0.2s;
}
.notification-bell:hover {
    transform: scale(1.15);
    color: var(--accent) !important;
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 0.7rem;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* Toast Notifications */
.notification-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1050;
    max-width: 400px;
}

.toast {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 6px;
    border: none;
    animation: slideIn 0.3s ease-out;
    margin-bottom: 0.5rem;
}

.toast-body {
    padding: 1rem;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
    50% { box-shadow: 0 2px 15px rgba(220,53,69,0.4); }
}

.notification-bell.has-unread {
    animation: pulse 2s ease-in-out infinite;
}

.floating-new-request {
    position: fixed;
    bottom: 26px;
    z-index: 1060;
    width: 56px;
    height: 56px;
    padding: 0;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 10px 26px rgba(26,58,92,.28);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

html[dir="rtl"] .floating-new-request {
    right: calc(var(--sidebar-width) + 24px);
    left: auto;
}

html[dir="ltr"] .floating-new-request {
    left: 24px;
    right: auto;
}

.floating-new-request:hover {
    color: #fff;
    background: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(0,0,0,.22);
}

.floating-new-request i {
    font-size: 1.45rem;
    line-height: 1;
}

@media (max-width: 768px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .sidebar {
        width: min(84vw, 292px);
        max-width: 292px;
        transform: translateX(110%);
        transition: transform .25s ease;
        z-index: 1090;
        box-shadow: -14px 0 32px rgba(12, 29, 52, .22);
    }

    html[dir="ltr"] .sidebar {
        right: auto;
        left: 0;
        transform: translateX(-110%);
        box-shadow: 14px 0 32px rgba(12, 29, 52, .22);
    }

    .sidebar.show,
    html[dir="ltr"] .sidebar.show {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(8, 20, 34, .45);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
        z-index: 1085;
    }

    .sidebar-backdrop.show {
        opacity: 1;
        pointer-events: auto;
    }

    .main-content {
        margin-right: 0;
        margin-left: 0;
        width: 100%;
        min-width: 0;
    }

    .main-content > .container-fluid {
        max-width: 100%;
        overflow-x: hidden;
        padding-inline: .75rem !important;
    }

    .topbar {
        padding: .65rem .75rem;
        gap: .45rem;
        flex-wrap: wrap;
    }

    .topbar > .d-flex {
        min-width: 0;
        gap: .45rem !important;
        flex-wrap: wrap;
    }

    .topbar .page-title {
        font-size: 1rem;
        max-width: 42vw;
        white-space: normal;
        line-height: 1.25;
    }

    .topbar .user-info {
        display: none;
    }

    .topbar .form-select-sm {
        max-width: 96px;
    }

    .card,
    .alert,
    .request-steps {
        max-width: 100%;
    }

    .request-steps {
        gap: .55rem;
        padding-bottom: .75rem;
        scroll-snap-type: x proximity;
    }

    .request-step {
        min-width: 72px;
        scroll-snap-align: start;
    }

    .notification-container {
        left: 10px;
        right: 10px;
        max-width: none;
    }

    .floating-new-request {
        bottom: 16px;
        width: 54px;
        height: 54px;
    }

    html[dir="rtl"] .floating-new-request {
        right: 16px;
        left: auto;
    }

    html[dir="ltr"] .floating-new-request {
        left: 16px;
        right: auto;
    }
}
