﻿/* =========================================================
   ContractTracker theme: black + gold (matches login page)
   ========================================================= */

:root {
    --sidebar-width: 200px;
    --topbar-height: 64px;

    --gold: #d4a017;
    --gold-light: #f0c14b;
    --gold-bright: #ffe08a;
    --gold-line: rgba(212, 160, 23, .45);
    --gold-soft: rgba(212, 160, 23, .16);
    --panel: #050505;
    --text: #f5f5f5;
    --muted: #a1a1a1;

    --brand: #d4a017;
    --brand-dark: #b8860b;
}

[data-bs-theme="dark"] {
    --bs-body-bg: #000;
    --bs-body-color: #f5f5f5;
    --bs-emphasis-color: #fff;
    --bs-heading-color: #fff;
    --bs-secondary-color: #a1a1a1;
    --bs-border-color: rgba(212, 160, 23, .4);
    --bs-secondary-bg: #0a0a0a;
    --bs-tertiary-bg: #111;
    --bs-link-color: #f0c14b;
    --bs-link-hover-color: #ffe08a;
    --bs-focus-ring-color: rgba(212, 160, 23, .3);
}

html, body {
    height: 100%;
}

body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
    background: #000;
    background-image: radial-gradient(circle at 85% 0%, rgba(212, 160, 23, .10) 0%, rgba(0, 0, 0, 0) 45%);
    background-attachment: fixed;
    color: var(--text);
}

a {
    text-decoration: none;
    color: var(--gold-light);
}

a:hover {
    color: var(--gold-bright);
}

::selection {
    background: rgba(212, 160, 23, .45);
    color: #fff;
}

hr {
    border-color: rgba(212, 160, 23, .3);
    opacity: 1;
}

/* ---------------- Layout shell ---------------- */

.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 200px;
    flex-shrink: 0;
    background: #000;
    color: #d6d6d6;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-left: 1px solid var(--gold-line);
    box-shadow: -10px 0 30px rgba(0, 0, 0, .8);
    z-index: 1040;
}

.app-sidebar::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-image: url('/images/moo-logo-t.png');
    background-size: auto 55%;
    background-position: center 60%;
    background-repeat: no-repeat;
    filter: brightness(0) invert(1);
    opacity: .08;
    pointer-events: none;
    z-index: 0;
}

.app-sidebar > * {
    position: relative;
    z-index: 1;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--gold-light);
    border-bottom: 1px solid var(--gold-line);
}

.sidebar-brand i {
    font-size: 1.4rem;
    color: var(--gold);
}

.sidebar-brand-logo {
    height: 42px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}

.sidebar-nav .nav-link {
    color: #d6d6d6;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 700;
    transition: all .15s ease;
}

.sidebar-nav .nav-link i {
    width: 20px;
    text-align: center;
    color: var(--gold);
}

.sidebar-nav .nav-link:hover {
    background: rgba(212, 160, 23, .12);
    border-color: rgba(212, 160, 23, .35);
    color: var(--gold-bright);
}

.sidebar-nav .nav-link.active {
    background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 100%);
    border-color: #000;
    color: #000;
    box-shadow: 0 6px 18px rgba(212, 160, 23, .35);
}

.sidebar-nav .nav-link.active i {
    color: #000;
}

.sidebar-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--gold-line);
    color: var(--gold-light);
}

.app-main {
    margin-right: 200px;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-topbar {
    height: var(--topbar-height);
    background: #000;
    border-bottom: 1px solid var(--gold-line);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.topbar-search {
    flex: 1;
    max-width: 560px;
}

.topbar-actions {
    margin-right: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-clock {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    color: var(--gold-light);
    font-size: 0.95rem;
    font-weight: 600;
}

.app-content {
    padding: 24px;
    flex: 1;
}

/* ---------------- Headings ---------------- */

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

.page-header h1,
.page-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: #fff;
}

h1, h2, h3, h4, h5, h6 {
    color: #fff;
}

/* ---------------- Cards ---------------- */

.card {
    background: #000;
    border: 1px solid var(--gold-line);
    border-radius: 14px;
    box-shadow: 0 0 0 rgba(212, 160, 23, 0), 0 10px 26px rgba(0, 0, 0, .65);
    animation: cardGoldPulse 15s ease-in-out infinite;
}

.card-header,
.card-footer {
    background: rgba(212, 160, 23, .06);
    border-color: rgba(212, 160, 23, .3);
    color: var(--gold-light);
    font-weight: 700;
}

@keyframes cardGoldPulse {
    0%, 84%, 100% {
        border-color: var(--gold-line);
        box-shadow: 0 0 0 rgba(212, 160, 23, 0), 0 10px 26px rgba(0, 0, 0, .65);
    }
    90% {
        border-color: var(--gold-bright);
        box-shadow: 0 0 14px 2px rgba(255, 224, 138, .35), 0 0 30px 6px rgba(212, 160, 23, .20), 0 10px 26px rgba(0, 0, 0, .65);
    }
    96% {
        border-color: var(--gold-line);
        box-shadow: 0 0 0 rgba(212, 160, 23, 0), 0 10px 26px rgba(0, 0, 0, .65);
    }
}

.stat-card {
    border-radius: 16px;
    padding: 18px;
    background: #000;
    border: 1px solid var(--gold-line);
    display: flex;
    align-items: center;
    gap: 14px;
    height: 100%;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .6);
}

.stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #000;
    background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 100%);
    flex-shrink: 0;
}

.stat-card .stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
}

.stat-card .stat-label {
    color: var(--muted);
    font-size: .88rem;
    margin-top: 4px;
}

.bg-soft-primary { background: rgba(212, 160, 23, .16); color: var(--gold-light); }
.bg-soft-success { background: rgba(34, 197, 94, .16); color: #4ade80; }
.bg-soft-warning { background: rgba(255, 193, 7, .16); color: #fbbf24; }
.bg-soft-danger { background: rgba(239, 68, 68, .16); color: #f87171; }
.bg-soft-info { background: rgba(56, 189, 248, .16); color: #38bdf8; }
.bg-soft-secondary { background: rgba(148, 163, 184, .16); color: #cbd5e1; }

/* ===== أزرار أيقونات لوحة التحكم (روابط قابلة للنقر) ===== */a.stat-icon-btn {
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

    a.stat-icon-btn:hover,
    a.stat-icon-btn:focus-visible {
        transform: scale(1.12);
        box-shadow: 0 0 0 3px var(--gold-soft), 0 8px 20px rgba(212, 160, 23, .35);
        filter: brightness(1.15);
    }

    a.stat-icon-btn:active {
        transform: scale(.98);
    }

/* ===== نافذة تأكيد الحذف (نعم/لا) ===== */
.confirm-modal {
    background: #000;
    border: 1px solid var(--gold-line, #d4a017);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .7);
}

    .confirm-modal .confirm-modal-icon {
        width: 64px;
        height: 64px;
        margin: 0 auto 14px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.8rem;
        color: #f87171;
        background: rgba(239, 68, 68, .12);
        border: 1px solid rgba(239, 68, 68, .35);
    }

    .confirm-modal h5 {
        color: #fff;
        font-weight: 700;
    }

    .confirm-modal .modal-dialog {
        max-width: 380px;
    }

/* ---------------- Filter chips ---------------- */

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.filter-chips .btn {
    border-radius: 999px;
    font-size: .88rem;
    padding: 6px 14px;
}

.filter-chips .btn .badge {
    margin-right: 6px;
}

/* ---------------- Tables ---------------- */

.table {
    --bs-table-bg: transparent;
    --bs-table-accent-bg: transparent;
    --bs-table-color: var(--text);
    --bs-table-hover-bg: rgba(212, 160, 23, .07);
    --bs-table-hover-color: #fff;
    --bs-table-striped-color: var(--text);
    --bs-table-striped-bg: rgba(212, 160, 23, .05);
    --bs-table-active-color: #fff;
    --bs-table-active-bg: rgba(212, 160, 23, .14);
    color: var(--text);
    border-color: rgba(212, 160, 23, .25);
    margin-bottom: 0;
}

.table th,
.table td {
    border-color: rgba(212, 160, 23, .22);
}

.table-bordered,
.table-bordered > :not(caption) > * > * {
    border-color: rgba(212, 160, 23, .3);
}

.table thead th {
    background: #0a0a0a;
    color: var(--gold-light);
    font-weight: 700;
    font-size: .85rem;
    white-space: nowrap;
    border-bottom: 1px solid var(--gold-line);
}

.table td {
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background: rgba(212, 160, 23, .07);
    color: #fff;
}

/* ---------------- Badges ---------------- */

.badge-status-active { background: rgba(34, 197, 94, .18); color: #4ade80; }
.badge-status-expired { background: rgba(239, 68, 68, .18); color: #f87171; }
.badge-status-renewed { background: rgba(212, 160, 23, .2); color: var(--gold-bright); }
.badge-status-terminated { background: rgba(148, 163, 184, .18); color: #cbd5e1; }

/* ---------------- Empty state ---------------- */

.empty-state {
    text-align: center;
    padding: 48px 16px;
    color: var(--muted);
}

.empty-state i {
    font-size: 2.6rem;
    color: rgba(212, 160, 23, .55);
    display: block;
    margin-bottom: 10px;
}

/* ---------------- Auth (login) ---------------- */

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 0%, #1a1400 0%, #000 55%);
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #000;
    border-radius: 18px;
    padding: 32px;
    border: 2px solid var(--gold);
    box-shadow: 0 0 0 rgba(212, 160, 23, 0), 0 20px 60px rgba(0, 0, 0, .75);
    animation: authCardGlow 15s ease-in-out infinite;
}

@keyframes authCardGlow {
    0%, 84%, 100% {
        border-color: var(--gold);
        box-shadow: 0 0 0 rgba(212, 160, 23, 0), 0 20px 60px rgba(0, 0, 0, .75);
    }
    90% {
        border-color: var(--gold-bright);
        box-shadow: 0 0 18px 4px rgba(255, 224, 138, .85), 0 0 42px 12px rgba(212, 160, 23, .5), 0 20px 60px rgba(0, 0, 0, .75);
    }
    96% {
        border-color: var(--gold);
        box-shadow: 0 0 0 rgba(212, 160, 23, 0), 0 20px 60px rgba(0, 0, 0, .75);
    }
}

.auth-card h1 {
    color: #fff;
}

.auth-card p {
    color: #c9a44a;
}

.auth-card .auth-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 100%);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 16px;
}

.auth-card .auth-logo.auth-logo-img {
    width: auto;
    height: 130px;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    margin: 0 auto 12px;
}

.auth-card .auth-logo.auth-logo-img img {
    width: auto;
    height: 130px;
    max-height: 130px;
    object-fit: contain;
    display: block;
}

/* ---------------- Forms ---------------- */

.form-label {
    font-weight: 600;
    font-size: .9rem;
    color: var(--gold-light);
}

.required::after {
    content: " *";
    color: #f87171;
}

.form-control,
.form-select,
.input-group-text {
    background-color: #000;
    color: #fff;
    border-color: rgba(212, 160, 23, .6);
}

.input-group-text {
    color: var(--gold-light);
}

.form-control:focus,
.form-select:focus {
    background-color: #000;
    color: #fff;
    border-color: var(--gold-bright);
    box-shadow: 0 0 0 .2rem rgba(212, 160, 23, .3);
}

.form-control::placeholder {
    color: #7d7d7d;
}

.form-select option {
    background: #000;
    color: #fff;
}

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

.form-check-input {
    background-color: #000;
    border-color: rgba(212, 160, 23, .7);
}

.form-check-input:checked {
    background-color: var(--gold);
    border-color: var(--gold);
}

.form-check-input:focus {
    border-color: var(--gold-bright);
    box-shadow: 0 0 0 .2rem rgba(212, 160, 23, .3);
}

.form-check-label {
    color: var(--text);
}

/* ---------------- Buttons ---------------- */

.btn {
    border-radius: 10px;
}

.btn-primary {
    background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 100%);
    border: 2px solid #000;
    color: #000;
    font-weight: 700;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
    background: linear-gradient(180deg, var(--gold-bright) 0%, #e0ad1f 100%);
    border-color: #000;
    color: #000;
    box-shadow: 0 0 12px rgba(240, 193, 75, .55);
}

.btn-primary:disabled,
.btn-primary.disabled {
    background: #3a2f10;
    border-color: #000;
    color: #8a7434;
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-light,
.btn-outline-dark {
    color: var(--gold-light);
    border-color: rgba(212, 160, 23, .65);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active,
.btn-outline-light:hover,
.btn-outline-light:focus,
.btn-outline-light:active,
.btn-outline-dark:hover,
.btn-outline-dark:focus,
.btn-outline-dark:active {
    background-color: var(--gold);
    border-color: var(--gold);
    color: #000;
    box-shadow: 0 0 10px rgba(240, 193, 75, .45);
}

.btn-outline-primary:disabled,
.btn-outline-secondary:disabled,
.btn-outline-light:disabled,
.btn-outline-dark:disabled {
    color: #7a6a35;
    border-color: rgba(212, 160, 23, .3);
}

.btn-light {
    background-color: #000;
    border-color: rgba(212, 160, 23, .55);
    color: var(--gold-light);
}

.btn-light:hover,
.btn-light:focus,
.btn-light:active {
    background-color: rgba(212, 160, 23, .18);
    border-color: var(--gold);
    color: var(--gold-bright);
}

.btn-secondary {
    background-color: #111;
    border-color: rgba(212, 160, 23, .45);
    color: var(--gold-light);
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active {
    background-color: rgba(212, 160, 23, .22);
    border-color: var(--gold);
    color: var(--gold-bright);
}

.btn-link {
    color: var(--gold-light);
}

.btn-link:hover,
.btn-link:focus {
    color: var(--gold-bright);
}

.btn-close {
    filter: invert(1) grayscale(1) brightness(1.8);
    opacity: .8;
}

.btn-close:hover {
    opacity: 1;
}

/* ---------------- Dropdowns ---------------- */

.dropdown-menu {
    background: #000;
    border: 1px solid var(--gold-line);
    box-shadow: 0 12px 34px rgba(0, 0, 0, .85);
}

.dropdown-item {
    color: #e5e7eb;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: rgba(212, 160, 23, .18);
    color: var(--gold-bright);
}

.dropdown-divider {
    border-color: rgba(212, 160, 23, .3);
}

/* ---------------- Modals ---------------- */

.modal-content {
    background: #000;
    border: 1px solid var(--gold-line);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .9);
}

.modal-header,
.modal-footer {
    border-color: rgba(212, 160, 23, .3);
}

.modal-title {
    color: var(--gold-light);
}

/* ---------------- Tabs / pills ---------------- */

.nav-tabs {
    border-bottom-color: rgba(212, 160, 23, .35);
}

.nav-tabs .nav-link {
    color: #cfcfcf;
}

.nav-tabs .nav-link:hover {
    border-color: transparent;
    color: var(--gold-bright);
}

.nav-tabs .nav-link.active {
    background: #000;
    color: var(--gold-bright);
    border-color: rgba(212, 160, 23, .5) rgba(212, 160, 23, .5) #000;
}

.nav-pills .nav-link {
    color: #cfcfcf;
}

.nav-pills .nav-link.active {
    background: var(--gold);
    color: #000;
    font-weight: 700;
}

/* ---------------- Pagination ---------------- */

.page-link {
    background: #000;
    border-color: rgba(212, 160, 23, .4);
    color: var(--gold-light);
}

.page-link:hover {
    background: rgba(212, 160, 23, .16);
    border-color: var(--gold);
    color: var(--gold-bright);
}

.page-item.active .page-link {
    background: var(--gold);
    border-color: var(--gold);
    color: #000;
    font-weight: 700;
}

.page-item.disabled .page-link {
    background: #050505;
    border-color: rgba(212, 160, 23, .18);
    color: #5f5f5f;
}

/* ---------------- List groups ---------------- */

.list-group-item {
    background: #000;
    color: var(--text);
    border-color: rgba(212, 160, 23, .25);
}

.list-group-item.active {
    background: var(--gold);
    border-color: var(--gold);
    color: #000;
}

/* ---------------- Content details ---------------- */

.detail-label {
    color: #c9a44a;
    font-size: .82rem;
    margin-bottom: 2px;
}

.detail-value {
    font-weight: 600;
    margin-bottom: 12px;
    word-break: break-word;
    color: #fff;
}

.avatar-thumb {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold-line);
}

.note-item {
    border-right: 3px solid var(--gold);
    background: #070707;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
}

.note-item .note-meta {
    font-size: .78rem;
    color: var(--muted);
}

.timeline-item {
    border-right: 2px solid rgba(212, 160, 23, .3);
    padding: 0 16px 16px 0;
    position: relative;
}

.timeline-item::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gold);
    position: absolute;
    right: -6px;
    top: 4px;
}

.diff-box {
    font-family: Consolas, monospace;
    font-size: .82rem;
    background: #050505;
    color: #e8d9a8;
    border: 1px solid rgba(212, 160, 23, .3);
    border-radius: 10px;
    padding: 12px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ---------------- Scrollbars ---------------- */

* {
    scrollbar-color: rgba(212, 160, 23, .55) #0a0a0a;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: rgba(212, 160, 23, .5);
    border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 160, 23, .75);
}

/* ---------------- Legacy light utilities used in pages ---------------- */

.bg-white,
.bg-light,
.alert-light {
    background-color: #0a0a0a !important;
    color: var(--text) !important;
    border-color: rgba(212, 160, 23, .35) !important;
}

.card-header.bg-white {
    background-color: rgba(212, 160, 23, .06) !important;
    color: var(--gold-light) !important;
}

.bg-light.text-dark,
.bg-white.text-dark {
    color: var(--gold-light) !important;
}

/* ---------------- Bootstrap 5.1 dark fixes (concrete overrides) ---------------- */

.text-muted,
.text-body-secondary {
    color: #a8a8a8 !important;
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23d4a017' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left .75rem center;
    background-size: 16px 12px;
}

.form-select:disabled,
.form-control:disabled,
.form-control[readonly] {
    background-color: #0b0b0b;
    color: #8f8f8f;
    border-color: rgba(212, 160, 23, .3);
}

/* Chrome autofill on black inputs */
.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff;
    -webkit-box-shadow: 0 0 0 1000px #000 inset;
    caret-color: #fff;
}

/* Alerts */
.alert {
    background-color: #0a0a0a;
    border: 1px solid rgba(212, 160, 23, .35);
    color: var(--text);
}

.alert-primary {
    background-color: rgba(212, 160, 23, .12);
    border-color: rgba(212, 160, 23, .45);
    color: var(--gold-bright);
}

.alert-success {
    background-color: rgba(34, 197, 94, .12);
    border-color: rgba(34, 197, 94, .45);
    color: #86efac;
}

.alert-danger {
    background-color: rgba(239, 68, 68, .12);
    border-color: rgba(239, 68, 68, .45);
    color: #fca5a5;
}

.alert-warning {
    background-color: rgba(255, 193, 7, .12);
    border-color: rgba(255, 193, 7, .45);
    color: #fcd34d;
}

.alert-info {
    background-color: rgba(56, 189, 248, .12);
    border-color: rgba(56, 189, 248, .45);
    color: #7dd3fc;
}

.alert-secondary {
    background-color: rgba(148, 163, 184, .12);
    border-color: rgba(148, 163, 184, .45);
    color: #cbd5e1;
}

.alert-light {
    background-color: rgba(212, 160, 23, .08);
    border-color: rgba(212, 160, 23, .35);
    color: var(--text);
}

.alert-heading {
    color: inherit;
}

.alert-link {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
}

/* Badges */
.badge.bg-success {
    background-color: rgba(34, 197, 94, .16) !important;
    color: #4ade80 !important;
}

.badge.bg-danger {
    background-color: rgba(239, 68, 68, .16) !important;
    color: #f87171 !important;
}

.badge.bg-warning {
    background-color: rgba(255, 193, 7, .16) !important;
    color: #fbbf24 !important;
}

.badge.bg-info {
    background-color: rgba(56, 189, 248, .16) !important;
    color: #38bdf8 !important;
}

.badge.bg-secondary {
    background-color: rgba(148, 163, 184, .16) !important;
    color: #cbd5e1 !important;
}

.badge.bg-light,
.badge.bg-white {
    background-color: rgba(212, 160, 23, .16) !important;
    color: var(--gold-light) !important;
}

.badge.text-dark {
    color: #fbbf24 !important;
}

.badge.bg-light.text-dark,
.badge.bg-white.text-dark {
    color: var(--gold-light) !important;
}

/* Notification counter must stay loud */
.topbar-actions .badge.bg-danger {
    background-color: #dc3545 !important;
    color: #fff !important;
}

/* Warning / danger buttons keep the gold identity */
.btn-warning {
    background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 100%);
    border: 2px solid #000;
    color: #000;
    font-weight: 700;
}

.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active {
    background: linear-gradient(180deg, var(--gold-bright) 0%, #e0ad1f 100%);
    border-color: #000;
    color: #000;
    box-shadow: 0 0 12px rgba(240, 193, 75, .55);
}

/* Generic background utilities used on pages */
.bg-secondary {
    background-color: #111 !important;
    color: var(--gold-light) !important;
}

.bg-dark {
    background-color: #000 !important;
    color: var(--text) !important;
}

/* Progress / toast / accordion / breadcrumb */
.progress {
    background-color: #111;
    border: 1px solid rgba(212, 160, 23, .25);
}

.progress-bar {
    background-color: var(--gold);
    color: #000;
}

.toast {
    background-color: #000;
    border: 1px solid var(--gold-line);
    color: var(--text);
}

.toast-header {
    background-color: rgba(212, 160, 23, .08);
    border-color: rgba(212, 160, 23, .3);
    color: var(--gold-light);
}

.accordion-item {
    background-color: #000;
    border-color: rgba(212, 160, 23, .3);
    color: var(--text);
}

.accordion-button {
    background-color: #0a0a0a;
    color: var(--gold-light);
}

.accordion-button:not(.collapsed) {
    background-color: rgba(212, 160, 23, .14);
    color: var(--gold-bright);
    box-shadow: inset 0 -1px 0 rgba(212, 160, 23, .3);
}

.accordion-button::after {
    filter: invert(78%) sepia(52%) saturate(1200%) hue-rotate(2deg) brightness(95%);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(212, 160, 23, .6);
}

.breadcrumb-item.active {
    color: var(--gold-light);
}

/* VIP floor glow */
.floor-vip {
    color: var(--gold-light) !important;
    font-weight: 700;
    text-shadow: 0 0 0 rgba(212, 160, 23, 0);
    animation: floorVipGlow 5s ease-in-out infinite;
}

@keyframes floorVipGlow {
    0%, 70%, 100% {
        color: var(--gold-light);
        text-shadow: 0 0 0 rgba(212, 160, 23, 0);
    }
    85% {
        color: var(--gold-bright);
        text-shadow: 0 0 8px rgba(255, 224, 138, .9), 0 0 16px rgba(212, 160, 23, .6);
    }
}

/* ---------------- Responsive ---------------- */

@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(100%);
        transition: transform .2s ease;
    }

    .app-sidebar.open {
        transform: translateX(0);
    }

    .app-main {
        margin-right: 0;
    }

    .app-content {
        padding: 16px;
    }

    .topbar-search {
        max-width: none;
    }
}

/* ---------------- Print ---------------- */

@media print {
    .app-sidebar, .app-topbar, .filter-chips, .no-print {
        display: none !important;
    }

    .app-main {
        margin: 0;
    }

    .app-content {
        padding: 0;
    }

    body {
        background: #fff !important;
        color: #000 !important;
    }

    .card, .stat-card, .table, .table thead th {
        background: #fff !important;
        color: #000 !important;
        border-color: #999 !important;
        box-shadow: none !important;
        animation: none !important;
    }

    .table thead th,
    .detail-label,
    .form-label {
        color: #333 !important;
    }
}

/* ===== أزرار ذهبية (ميزة هوية العامل) ===== */
.btn-gold {
    background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 100%);
    border: 1px solid var(--gold-line);
    color: #000;
    font-weight: 700;
}

    .btn-gold:hover {
        background: var(--gold-bright);
        color: #000;
    }

.btn-outline-gold {
    background: transparent;
    border: 1px solid var(--gold-line);
    color: var(--gold-light);
    font-weight: 600;
}

    .btn-outline-gold:hover {
        background: var(--gold-soft);
        border-color: var(--gold-bright);
        color: var(--gold-bright);
    }

/* ===== اللوحة الأم (مهام القسم) ===== */
.sidebar-section-label {
    font-size: .78rem;
    font-weight: 700;
    color: var(--muted);
    padding: 10px 12px 4px;
    margin-top: 6px;
    letter-spacing: .2px;
}

.sidebar-section-label-standalone {
    color: var(--gold-light);
    border-top: 1px solid var(--gold-line);
    margin-top: 10px;
    padding-top: 12px;
}

.sidebar-task-label {
    font-size: .92rem;
    font-weight: 700;
    color: var(--gold-light);
    padding: 10px 12px 4px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-task-label i {
    color: var(--gold);
    width: 18px;
    text-align: center;
}

.sidebar-task-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 4px;
    padding-right: 10px;
    border-right: 1px solid rgba(212, 160, 23, .2);
    margin-right: 10px;
}

.sidebar-nav .nav-link.nav-sub-link {
    font-size: .92rem;
    font-weight: 600;
    padding: 6px 10px;
}

.task-card {
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

    .task-card:hover,
    .task-card:focus-visible {
        transform: translateY(-3px);
        border-color: var(--gold-bright);
        box-shadow: 0 0 14px 2px rgba(255, 224, 138, .25), 0 10px 26px rgba(0, 0, 0, .65);
    }

.task-card .task-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #000;
    background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 100%);
    flex-shrink: 0;
}

.task-card .task-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
}

.task-card-standalone {
    border-color: rgba(212, 160, 23, .65);
}
