:root {
    --brand-600: #d97706;
    --brand-700: #b45309;
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

[dir="rtl"] body {
    font-family: 'Tajawal', 'Inter', system-ui, sans-serif;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .375rem;
    padding: .5rem 1rem;
    border-radius: .5rem;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.25rem;
    transition: all .15s ease;
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap;
}

.btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.btn-primary {
    background-color: var(--brand-600);
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--brand-700);
}

.btn-secondary {
    background-color: #fff;
    border-color: #cbd5e1;
    color: #334155;
}

.btn-secondary:hover {
    background-color: #f1f5f9;
}

.btn-danger {
    background-color: #dc2626;
    color: #fff;
}

.btn-danger:hover:not(:disabled) {
    background-color: #b91c1c;
}

.btn-success {
    background-color: #16a34a;
    color: #fff;
}

.btn-success:hover:not(:disabled) {
    background-color: #15803d;
}

.btn-sm {
    padding: .25rem .625rem;
    font-size: .75rem;
    border-radius: .375rem;
}

.card {
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: .75rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
}

.label {
    display: block;
    font-size: .8125rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: .375rem;
}

.input {
    width: 100%;
    padding: .5rem .75rem;
    border: 1px solid #cbd5e1;
    border-radius: .5rem;
    font-size: .875rem;
    background-color: #fff;
    color: #0f172a;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.input:focus {
    outline: none;
    border-color: var(--brand-600);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, .15);
}

.input-error {
    border-color: #dc2626;
}

.error-text {
    color: #dc2626;
    font-size: .75rem;
    margin-top: .25rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: .125rem .5rem;
    border-radius: 9999px;
    font-size: .6875rem;
    font-weight: 600;
    line-height: 1rem;
}

.badge-amber { background-color: #fef3c7; color: #92400e; }
.badge-green { background-color: #dcfce7; color: #166534; }
.badge-red   { background-color: #fee2e2; color: #991b1b; }
.badge-slate { background-color: #e2e8f0; color: #334155; }
.badge-blue  { background-color: #dbeafe; color: #1e40af; }

.table-wrap { overflow-x: auto; }

.table {
    width: 100%;
    font-size: .875rem;
}

.table thead th {
    text-align: start;
    padding: .625rem .75rem;
    background-color: #f8fafc;
    color: #64748b;
    font-size: .6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.table tbody td {
    padding: .75rem;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
    vertical-align: middle;
}

.table tbody tr:hover { background-color: #f8fafc; }

.alert {
    padding: .75rem 1rem;
    border-radius: .5rem;
    font-size: .875rem;
    font-weight: 500;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.alert-success { background-color: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error   { background-color: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info    { background-color: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.alert-amber   { background-color: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

.stat-card {
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: .75rem;
    padding: 1rem 1.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
}

.stat-label {
    font-size: .75rem;
    color: #64748b;
    font-weight: 500;
}

.stat-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: .75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 1.375rem;
    height: 1.375rem;
}

.mono-num { font-variant-numeric: tabular-nums; }

/* --- Admin sidebar ------------------------------------------------------ */

.admin-sidebar {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    transform: translateX(-100%);
    transition: transform .25s ease;
}

[dir="rtl"] .admin-sidebar {
    transform: translateX(100%);
}

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

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, .5);
    z-index: 35;
    display: none;
}

.sidebar-overlay.show {
    display: block;
}

.sidebar-section-title {
    padding: 0 .75rem;
    font-size: .6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #475569;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: .625rem;
    padding: .5rem .75rem;
    border-radius: .5rem;
    font-size: .875rem;
    font-weight: 500;
    color: #94a3b8;
    transition: background-color .15s ease, color .15s ease;
}

.sidebar-link:hover {
    background-color: #1e293b;
    color: #fff;
}

.sidebar-link.active {
    background-color: #b45309;
    color: #fff;
}

.sidebar-link.active:hover {
    background-color: #b45309;
}

@media (min-width: 1024px) {
    .admin-sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
        transform: none;
    }
}
