/* Rooocx admin: one design layer on top of Bootstrap 5 RTL. */
:root {
    --brand: #4f46e5;
    --brand-soft: #eef2ff;
    --sidebar-bg: #111827;
    --sidebar-fg: #cbd5e1;
    --sidebar-active: #1f2937;
    --surface: #ffffff;
    --page: #f4f6fb;
    --border: #e5e7eb;
    --muted: #6b7280;
    --bs-primary: #4f46e5;
    --bs-primary-rgb: 79, 70, 229;
    --bs-link-color: #4f46e5;
    --bs-link-color-rgb: 79, 70, 229;
    --bs-body-font-family: 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
}
[data-bs-theme="dark"] {
    --brand-soft: #1e1b4b;
    --surface: #161b26;
    --page: #0d1117;
    --border: #262d3a;
    --muted: #9ca3af;
    --sidebar-bg: #0b0f17;
    --sidebar-active: #161b26;
}

body { background: var(--page); font-size: .93rem; }
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: #4338ca; --bs-btn-hover-border-color: #4338ca; --bs-btn-active-bg: #3730a3; }
.btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); }
.text-primary { color: var(--brand) !important; }
.bg-primary-soft { background: var(--brand-soft) !important; }

/* Shell */
.admin-shell { display: flex; min-height: 100vh; }
.sidebar { width: 260px; flex-shrink: 0; background: var(--sidebar-bg); color: var(--sidebar-fg); }
@media (min-width: 992px) {
    .sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; }
}
.sidebar .offcanvas-body { flex-direction: column; padding: 0; }
.sidebar-brand { display: flex; align-items: center; gap: .6rem; padding: 1.1rem 1.25rem; color: #fff; font-weight: 700; font-size: 1.15rem; text-decoration: none; }
.sidebar-brand .logo { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); display: grid; place-items: center; color: #fff; }
.sidebar-section { padding: .9rem 1.25rem .35rem; font-size: .72rem; letter-spacing: .04em; color: #6b7280; font-weight: 600; }
.sidebar .nav-link { display: flex; align-items: center; gap: .65rem; color: var(--sidebar-fg); padding: .55rem 1.25rem; margin: 1px .6rem; border-radius: 8px; }
.sidebar .nav-link i { font-size: 1.05rem; opacity: .85; }
.sidebar .nav-link:hover { background: var(--sidebar-active); color: #fff; }
.sidebar .nav-link.active { background: var(--brand); color: #fff; }
.sidebar .nav-link .badge { margin-inline-start: auto; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 1020; background: var(--surface); border-bottom: 1px solid var(--border); padding: .6rem 1.25rem; display: flex; align-items: center; gap: .75rem; }
.topbar .page-title { font-weight: 700; font-size: 1.05rem; margin: 0; }
.content { padding: 1.25rem; }
@media (max-width: 575.98px) { .content { padding: 1rem; } }

/* Cards & tables */
.card { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.card-header { background: transparent; border-bottom: 1px solid var(--border); padding: .9rem 1.1rem; font-weight: 700; }
.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .7rem .9rem; vertical-align: middle; }
.table thead th { font-size: .78rem; color: var(--muted); font-weight: 600; white-space: nowrap; border-bottom-width: 1px; }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: var(--brand-soft); }
.table-responsive { border-radius: 0 0 14px 14px; }

.stat { display: flex; align-items: center; gap: .9rem; padding: 1.05rem 1.1rem; height: 100%; text-decoration: none; color: inherit; }
a.stat:hover { color: inherit; }
.stat .icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.35rem; flex-shrink: 0; }
.stat .label { color: var(--muted); font-size: .8rem; }
.stat .value { font-size: 1.35rem; font-weight: 700; line-height: 1.2; }

.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.page-head h1 { font-size: 1.25rem; font-weight: 700; margin: 0; }
.page-head .sub { color: var(--muted); font-size: .85rem; }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.filters .form-control, .filters .form-select { width: auto; min-width: 140px; }
@media (max-width: 575.98px) { .filters .form-control, .filters .form-select { flex: 1 1 100%; } }

.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: inline-grid; place-items: center; font-weight: 700; flex-shrink: 0; }
.avatar.lg { width: 64px; height: 64px; font-size: 1.5rem; }
.thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; direction: ltr; unicode-bidi: embed; font-size: .82rem; }
.text-muted-2 { color: var(--muted) !important; }
.money { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: embed; }
.kv { display: grid; grid-template-columns: minmax(110px, 40%) 1fr; gap: .45rem .75rem; }
.kv dt { color: var(--muted); font-weight: 500; }
.kv dd { margin: 0; word-break: break-word; }
.nav-tabs .nav-link { color: var(--muted); }
.nav-tabs .nav-link.active { color: var(--brand); font-weight: 600; }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty i { font-size: 2rem; display: block; margin-bottom: .5rem; }
.form-label { font-weight: 600; font-size: .85rem; }
.pagination { margin: 0; }
.chart-box { position: relative; height: 280px; }
