:root {
    --bg: #070707;
    --bg-soft: #101010;
    --panel: rgba(17, 17, 17, 0.94);
    --panel-soft: rgba(23, 23, 23, 0.92);
    --line: rgba(214, 180, 99, 0.28);
    --line-strong: rgba(214, 180, 99, 0.46);
    --gold: #d6b463;
    --gold-soft: #f6dfaa;
    --text: #f8f3e9;
    --muted: #c9c0ad;
    --danger: #f5b1b1;
    --success: #b8e4bc;
    --radius-xl: 26px;
    --radius-lg: 18px;
    --radius-md: 12px;
    --shadow-soft: 0 16px 42px rgba(0, 0, 0, 0.46);
    --shadow-gold: 0 16px 44px rgba(167, 125, 34, 0.34);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    font-family: "Tajawal", sans-serif;
    background:
        radial-gradient(circle at 18% 10%, rgba(214, 180, 99, 0.12), transparent 35%),
        radial-gradient(circle at 84% 6%, rgba(214, 180, 99, 0.08), transparent 32%),
        linear-gradient(160deg, #050505 0%, #0a0a0a 52%, #0d0d0d 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

.container {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
}

.card {
    background: linear-gradient(145deg, var(--panel-soft), var(--panel));
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
}

.sub-card {
    background: rgba(214, 180, 99, 0.08);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: rgba(214, 180, 99, 0.11);
    color: var(--gold-soft);
    font-size: 0.82rem;
    font-weight: 700;
}

.btn {
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.65rem 1.1rem;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.24s ease, filter 0.24s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-gold {
    color: #2a1d04;
    background: linear-gradient(120deg, #fbecc3 0%, #d4ab58 52%, #f5d996 100%);
    box-shadow: var(--shadow-gold);
}

.btn-ghost {
    color: #f7e9c8;
    border-color: var(--line-strong);
    background: rgba(214, 180, 99, 0.1);
}

.btn-danger {
    color: #ffe1e1;
    border-color: rgba(220, 120, 120, 0.45);
    background: rgba(164, 64, 64, 0.23);
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #3f3828;
    background: #111111;
    color: #f6f1e0;
    border-radius: var(--radius-md);
    padding: 0.65rem 0.8rem;
    font-size: 0.93rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(214, 180, 99, 0.75);
    box-shadow: 0 0 0 3px rgba(214, 180, 99, 0.15);
}

label {
    display: block;
    margin-bottom: 0.32rem;
    color: #ebdebc;
    font-size: 0.88rem;
    font-weight: 600;
}

.notice {
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(214, 180, 99, 0.1);
    color: #f5e5bc;
    padding: 0.72rem 0.85rem;
}

.notice.error {
    border-color: rgba(212, 122, 122, 0.45);
    background: rgba(154, 60, 60, 0.18);
    color: #ffd6d6;
}

.grid {
    display: grid;
    gap: 0.9rem;
}

.split-2 {
    grid-template-columns: 1fr 1fr;
}

.split-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.split-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.kpi {
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(214, 180, 99, 0.08);
    padding: 0.8rem;
}

.kpi .label {
    color: var(--muted);
    font-size: 0.82rem;
}

.kpi .value {
    margin-top: 0.24rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--gold-soft);
}

.table-wrap {
    overflow: auto;
    border-radius: 14px;
    border: 1px solid var(--line);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 620px;
}

th,
td {
    border-bottom: 1px solid rgba(214, 180, 99, 0.16);
    padding: 0.58rem;
    text-align: right;
    vertical-align: top;
}

th {
    color: #f6e3b2;
    font-size: 0.88rem;
    background: rgba(214, 180, 99, 0.1);
}

.empty-state {
    border: 1px dashed var(--line-strong);
    border-radius: 16px;
    padding: 1rem;
    text-align: center;
    color: var(--muted);
    background: rgba(214, 180, 99, 0.05);
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 980px) {
    .split-2,
    .split-3,
    .split-4 {
        grid-template-columns: 1fr;
    }

    .container {
        width: min(1180px, calc(100% - 1rem));
    }
}
