/* ==========================================================================
   Dar Al-Mashreq — Administrative Console
   Identity: deep ink, warm paper, restrained gold. Cairo type, RTL first.
   ========================================================================== */

@font-face {
  font-family: "Cairo";
  src: url("/fonts/cairo-arabic.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: "Cairo";
  src: url("/fonts/cairo-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
  font-family: "Cairo";
  src: url("/fonts/cairo-latin-ext.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
  unicode-range: U+0100-024F, U+1E00-1EFF;
}

:root {
  --ink: #0e1217;
  --ink-2: #151b22;
  --ink-3: #1e262f;
  --gold: #d4af37;
  --gold-deep: #b8860b;
  --gold-soft: #f6ecd2;
  --paper: #f5f6f8;
  --card: #ffffff;
  --text: #171c23;
  --muted: #6b7280;
  --muted-2: #9aa1ab;
  --line: #e6e8ec;
  --line-strong: #d6dae0;
  --ok: #0f7b4f;
  --ok-soft: #e6f4ee;
  --warn: #a15c07;
  --warn-soft: #fdf1dd;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --info: #1d4ed8;
  --info-soft: #e8eefc;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px -18px rgba(16, 24, 40, .35);
  --shadow-lg: 0 24px 60px -24px rgba(9, 13, 18, .45);
  --sidebar: 268px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Cairo", "Segoe UI", system-ui, sans-serif;
  background: var(--paper);
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: inherit; }
::selection { background: var(--gold-soft); color: var(--ink); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cfd4da; border-radius: 10px; border: 2px solid var(--paper); }
::-webkit-scrollbar-track { background: transparent; }

/* --------------------------------------------------------------- utilities */
.hidden { display: none !important; }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; direction: ltr; unicode-bidi: plaintext; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.stack { display: grid; gap: 16px; }
.divider { height: 1px; background: var(--line); border: 0; margin: 18px 0; }

/* ------------------------------------------------------------------ login */
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  background: var(--card);
}
.auth__brand {
  position: relative;
  background: radial-gradient(1200px 600px at 80% -10%, #1d2936 0%, var(--ink) 55%, #090c10 100%);
  color: #f3f4f6;
  padding: 56px 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.auth__brand::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(115deg, transparent 0 48%, rgba(212, 175, 55, .16) 48% 48.35%, transparent 48.35%),
    linear-gradient(65deg, transparent 0 62%, rgba(212, 175, 55, .10) 62% 62.3%, transparent 62.3%),
    radial-gradient(circle at 18% 82%, rgba(212, 175, 55, .16), transparent 36%);
  pointer-events: none;
}
.auth__brand > * { position: relative; z-index: 1; }
.auth__mark { display: flex; align-items: center; gap: 14px; }
.auth__mark svg { width: 44px; height: 44px; }
.auth__mark b { font-size: 20px; font-weight: 700; letter-spacing: .2px; }
.auth__mark span { display: block; font-size: 12px; color: #b9c0c9; font-weight: 400; letter-spacing: .4px; }
.auth__headline { max-width: 460px; }
.auth__headline h1 { font-size: 34px; line-height: 1.35; margin: 0 0 14px; font-weight: 700; }
.auth__headline h1 em { font-style: normal; color: var(--gold); }
.auth__headline p { margin: 0; color: #b9c0c9; font-size: 15px; line-height: 1.9; }
.auth__features { display: grid; gap: 12px; margin-top: 30px; }
.auth__feature { display: flex; gap: 10px; align-items: flex-start; color: #cdd3da; font-size: 13px; }
.auth__feature i {
  flex: none; width: 18px; height: 18px; margin-top: 2px;
  border: 1px solid rgba(212, 175, 55, .55); border-radius: 50%;
  display: grid; place-items: center; font-style: normal; font-size: 10px; color: var(--gold);
}
.auth__foot { color: #7d8794; font-size: 12px; letter-spacing: .2px; }
.auth__panel { padding: 56px 64px; display: flex; flex-direction: column; justify-content: center; }
.auth__panel-inner { width: 100%; max-width: 400px; margin: 0 auto; }
.auth__eyebrow { color: var(--gold-deep); font-size: 12px; font-weight: 700; letter-spacing: 1.2px; margin-bottom: 10px; }
.auth__title { font-size: 26px; font-weight: 700; margin: 0 0 6px; }
.auth__sub { color: var(--muted); margin: 0 0 28px; font-size: 14px; }

/* ------------------------------------------------------------------ forms */
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field > label { font-size: 12.5px; font-weight: 600; color: #38414d; }
.field .hint { font-size: 11.5px; color: var(--muted-2); }
.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  outline: none;
  transition: border-color .16s, box-shadow .16s;
  min-height: 42px;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, .18);
}
.input::placeholder { color: #aeb4bd; }
.input:disabled { background: #f3f4f6; color: var(--muted); }
.select { appearance: none; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%236b7280' d='M6 8 0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 13px center; padding-left: 34px; }
.textarea { min-height: 84px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; align-items: center; gap: 9px; font-size: 13px; color: #38414d; }
.check input { width: 16px; height: 16px; accent-color: var(--gold-deep); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 10px; padding: 0 16px;
  height: 40px; font-weight: 600; font-size: 13.5px; cursor: pointer;
  transition: background .16s, border-color .16s, color .16s, transform .06s;
  white-space: nowrap; user-select: none; background: #fff; color: var(--text);
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn--primary { background: linear-gradient(180deg, #dcb847, var(--gold)); color: #211a05; border-color: #c9a332; box-shadow: 0 1px 0 rgba(255,255,255,.35) inset; }
.btn--primary:hover { background: linear-gradient(180deg, #e2c155, #cfaa32); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: #1b232c; }
.btn--ghost { background: #fff; border-color: var(--line-strong); color: #2b333d; }
.btn--ghost:hover { background: #fafaf7; border-color: #c9ced6; }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: #9c1e14; }
.btn--quiet { background: transparent; color: var(--muted); }
.btn--quiet:hover { background: #eef0f3; color: var(--text); }
.btn--sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn--icon { width: 38px; height: 38px; padding: 0; }
.btn--full { width: 100%; }

/* ----------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  background: var(--ink);
  color: #cfd5dc;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  border-left: 1px solid #0a0d11;
}
.sidebar__brand { display: flex; align-items: center; gap: 12px; padding: 22px 22px 18px; }
.sidebar__brand svg { width: 36px; height: 36px; }
.sidebar__brand b { color: #fff; font-size: 15.5px; display: block; line-height: 1.3; }
.sidebar__brand span { font-size: 11px; color: #8b95a1; letter-spacing: .3px; }
.sidebar__rule { height: 1px; background: linear-gradient(90deg, transparent, rgba(212,175,55,.35), transparent); margin: 2px 18px 12px; }
.nav { padding: 4px 12px; overflow-y: auto; flex: 1; }
.nav__group { margin-bottom: 18px; }
.nav__label { font-size: 10.5px; letter-spacing: 1.4px; color: #6f7987; padding: 0 12px 7px; font-weight: 700; }
.nav__item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 10px; cursor: pointer;
  color: #c3cad3; font-size: 13.5px; font-weight: 500;
  border: 1px solid transparent; margin-bottom: 2px;
  transition: background .14s, color .14s;
}
.nav__item:hover { background: #1a222b; color: #fff; }
.nav__item.active { background: #1d2530; color: #fff; border-color: #26303b; }
.nav__item.active .nav__ico { color: var(--gold); }
.nav__ico { width: 18px; height: 18px; flex: none; color: #8993a1; }
.nav__item.active .nav__ico { color: var(--gold); }
.nav__badge { margin-inline-start: auto; font-size: 11px; background: #232c37; color: #aab3bf; padding: 1px 7px; border-radius: 20px; }
.sidebar__foot { padding: 14px 20px 18px; border-top: 1px solid #1b232c; font-size: 11.5px; color: #77818e; }
.sidebar__status { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; color: #b9c1cb; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); flex: none; }
.dot--ok { background: #34c38f; box-shadow: 0 0 0 3px rgba(52,195,143,.15); }
.dot--warn { background: #e0a13a; box-shadow: 0 0 0 3px rgba(224,161,58,.15); }
.dot--bad { background: #e5534b; box-shadow: 0 0 0 3px rgba(229,83,75,.15); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 68px; background: rgba(255,255,255,.9); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px; padding: 0 30px;
  position: sticky; top: 0; z-index: 20;
}
.topbar__title h1 { font-size: 17px; margin: 0; font-weight: 700; line-height: 1.4; }
.topbar__title p { margin: 0; font-size: 12px; color: var(--muted); }
.topbar__actions { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.userchip { display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.userchip__meta { text-align: left; line-height: 1.25; }
.userchip__meta b { display: block; font-size: 12.5px; }
.userchip__meta span { font-size: 11px; color: var(--muted); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--ink); color: var(--gold);
  display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none;
}
.content { padding: 26px 30px 60px; max-width: 1440px; width: 100%; margin: 0 auto; }

/* ------------------------------------------------------------- page blocks */
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; }
.page-head h2 { margin: 0; font-size: 20px; }
.page-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.page-head .actions { margin-inline-start: auto; display: flex; gap: 10px; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.kpi {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.kpi::after { content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 3px; background: var(--line); }
.kpi--gold::after { background: linear-gradient(180deg, var(--gold), var(--gold-deep)); }
.kpi__label { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi__value { font-size: 30px; font-weight: 700; letter-spacing: -.4px; line-height: 1.25; margin-top: 6px; }
.kpi__value small { font-size: 13px; font-weight: 600; color: var(--muted); margin-inline-start: 4px; }
.kpi__meta { font-size: 11.5px; color: var(--muted-2); margin-top: 4px; display: flex; align-items: center; gap: 6px; }

.grid-2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card__head { display: flex; align-items: center; gap: 10px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.card__head h3 { margin: 0; font-size: 14.5px; font-weight: 700; }
.card__head .actions { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }
.card__body { padding: 18px 20px; }
.card__body.flush { padding: 0; }

/* ----------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; border-radius: 0 0 var(--radius) var(--radius); }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.data th {
  text-align: right; font-size: 11.5px; font-weight: 700; color: #7a828d;
  background: #fafbfc; border-bottom: 1px solid var(--line);
  padding: 10px 16px; white-space: nowrap;
}
table.data td.num { white-space: nowrap; }
table.data td .trunc { display: block; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-actions { justify-content: flex-end; }
table.data td { padding: 12px 16px; border-bottom: 1px solid #f0f1f4; vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #fcfcfa; }
table.data .name { font-weight: 600; }
table.data .sub { font-size: 11.5px; color: var(--muted); }
.cell-actions { display: flex; gap: 4px; justify-content: flex-start; }

/* --- Audit table: fixed rhythm so no column collapses ---------------------- */
table.data td .name {
  max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  /* Keep the readable part of an address visible: Arabic names stay RTL,
     Latin e-mail addresses render LTR and truncate at the end. */
  unicode-bidi: plaintext;
}
table.data--audit th:nth-child(4), table.data--audit td:nth-child(4) { white-space: nowrap; }
table.data--audit td .name { max-width: 150px; }
table.data--audit td:nth-child(5) .mono {
  display: block; max-width: 190px; overflow: hidden; text-overflow: ellipsis;
  unicode-bidi: plaintext;
}

@media (max-width: 1060px) {
  /* The signature column is summarised above the table; it returns on wide screens. */
  table.data--audit th:nth-child(7), table.data--audit td:nth-child(7) { display: none; }
  table.data--audit { font-size: 11.5px; }
  table.data--audit th, table.data--audit td { padding-inline: 6px; }
  table.data--audit td:nth-child(2) { white-space: normal; }
  table.data--audit td .name { max-width: 96px; }
  table.data--audit td:nth-child(5) .mono { max-width: 108px; }
}

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px;
  background: #f1f2f5; color: #4b5563; border: 1px solid transparent; white-space: nowrap;
}
.badge--ok { background: var(--ok-soft); color: var(--ok); }
.badge--warn { background: var(--warn-soft); color: var(--warn); }
.badge--bad { background: var(--danger-soft); color: var(--danger); }
.badge--info { background: var(--info-soft); color: var(--info); }
.badge--gold { background: var(--gold-soft); color: #7a5b06; }
.badge--outline { background: #fff; border-color: var(--line-strong); color: var(--muted); }

.empty { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--text); font-size: 14px; margin-bottom: 4px; }
.empty span { font-size: 12.5px; }

/* ---------------------------------------------------------------- toolbar */
.toolbar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: nowrap; }
.search { position: relative; flex: 1 1 220px; min-width: 150px; }
.search .input { padding-inline-start: 36px; width: 100%; min-width: 0; height: 38px; min-height: 38px; }
.toolbar .select { width: auto; min-width: 138px; flex: none; height: 38px; min-height: 38px; padding-block: 6px; }
.toolbar .btn { flex: none; }
.search svg { position: absolute; inset-inline-start: 12px; top: 11px; color: var(--muted-2); width: 16px; height: 16px; }
.seg { display: inline-flex; background: #f3f4f6; border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.active { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(16,24,40,.08); }

/* ------------------------------------------------------------------ modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(11, 15, 20, .48);
  backdrop-filter: blur(2px); z-index: 60;
  display: grid; place-items: center; padding: 24px;
  animation: fade .14s ease-out;
}
.modal {
  width: 100%; max-width: 560px; max-height: 90vh; overflow: auto;
  background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg);
  animation: rise .18s ease-out;
}
.modal--wide { max-width: 720px; }
.modal__head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 24px 0; }
.modal__head h3 { margin: 0; font-size: 17px; }
.modal__head p { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; }
.modal__head .btn--icon { margin-inline-start: auto; }
.modal__body { padding: 18px 24px; }
.modal__foot { padding: 14px 24px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-start; background: #fbfbfc; border-radius: 0 0 16px 16px; }
.modal__foot .spacer { flex: 1; }

/* ------------------------------------------------------------------ toast */
.toasts { position: fixed; inset-block-end: 22px; inset-inline-start: 22px; z-index: 80; display: grid; gap: 10px; max-width: 420px; }
.toast {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--ink); color: #eef1f4; border-radius: 12px;
  padding: 12px 14px; box-shadow: var(--shadow-lg); font-size: 13px;
  border: 1px solid #263039; animation: rise .18s ease-out;
}
.toast__dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--gold); }
.toast--ok .toast__dot { background: #34c38f; }
.toast--bad .toast__dot { background: #f97066; }
.toast b { display: block; font-weight: 700; margin-bottom: 1px; }
.toast span { color: #aab3bf; font-size: 12px; }

/* ------------------------------------------------------------------- misc */
.notice {
  display: flex; gap: 10px; align-items: flex-start;
  border: 1px solid var(--line); background: #fbfbfc; border-radius: 12px;
  padding: 12px 14px; font-size: 12.5px; color: #4b5563;
}
.notice--warn { background: var(--warn-soft); border-color: #f3dcb4; color: #7a4706; }
.notice--bad { background: var(--danger-soft); border-color: #f6cfcb; color: #8a1c13; }
.notice--ok { background: var(--ok-soft); border-color: #c7e8d8; color: #0b5c3b; }

.svc { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f0f1f4; }
.svc:last-child { border-bottom: 0; }
.svc__name { font-weight: 600; font-size: 13px; }
.svc__meta { font-size: 11.5px; color: var(--muted); }
.svc .badge { margin-inline-start: auto; }

.meter { height: 8px; border-radius: 999px; background: #eef0f3; overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gold-deep), var(--gold)); }

.timeline { display: grid; gap: 0; }
.tl-item { display: grid; grid-template-columns: 118px 1fr; gap: 14px; padding: 11px 0; border-bottom: 1px solid #f2f3f5; }
.tl-item:last-child { border-bottom: 0; }
.tl-item time { font-size: 11.5px; color: var(--muted-2); direction: ltr; text-align: left; }
.tl-item .what { font-size: 13px; }
.tl-item .who { font-size: 11.5px; color: var(--muted); }

.skeleton { background: linear-gradient(90deg, #eef0f3 25%, #f7f8fa 37%, #eef0f3 63%); background-size: 400% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; height: 14px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

.section-title { font-size: 12px; font-weight: 700; letter-spacing: 1px; color: var(--muted-2); margin: 0 0 10px; }

@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 1060px) {
  .seg { display: none; }
  /* The staff table must fit the content pane without clipping a column. */
  table.data { font-size: 12.5px; }
  table.data td .trunc { max-width: 132px; }
  table.data th, table.data td { padding-inline: 8px; }
  table.data .cell-actions { gap: 2px; }
  /* Department is secondary information: it stays searchable and visible in the
     employee card, and the column returns on wider screens. */
  table.data--staff th:nth-child(2), table.data--staff td:nth-child(2) { display: none; }
  table.data--staff th:last-child { width: 104px; }
}
@media (max-width: 620px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .kpis { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset-block: 0; inset-inline-end: 0; width: 280px; z-index: 50; transform: translateX(100%); transition: transform .2s; }
  html[dir="rtl"] .sidebar { transform: translateX(100%); }
  .sidebar.open { transform: none; }
  .auth { grid-template-columns: 1fr; }
  .auth__brand { display: none; }
  .auth__panel { padding: 40px 24px; }
  .content { padding: 18px 16px 50px; }
  .topbar { padding: 0 16px; }
  .field-row { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
}

/* DAM-011: the central logo in place of the built-in icon; keeps the icon's slot and the logo's own proportions */
.brand-logo { display: block; height: 44px; width: auto; max-width: 96px; object-fit: contain; }
.sidebar__brand .brand-logo { height: 36px; max-width: 72px; }
