@font-face {
    font-family: "Noto Sans Arabic";
    src: url("../fonts/NotoSansArabic.woff2") format("woff2");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

:root {
    color-scheme: light;
    --ink: #18302e;
    --ink-soft: #455b57;
    --muted: #657873;
    --line: #dce6e2;
    --line-strong: #c7d5d0;
    --paper: #fff;
    --canvas: #f1f5f3;
    --accent: #176a59;
    --accent-strong: #105447;
    --accent-soft: #e5f1ec;
    --sidebar: #153a37;
    --sidebar-raised: #204944;
    --sidebar-muted: #b3cbc4;
    --gold: #d5a54d;
    --danger: #a8423a;
    --danger-soft: #fff0ed;
    --warning: #805d19;
    --warning-soft: #fff6e4;
    --success: #23654b;
    --success-soft: #e8f5ed;
    --info: #315d76;
    --info-soft: #eaf3f8;
    --focus: #246ca0;
    --radius-sm: 5px;
    --radius-md: 8px;
    --shadow-drawer: -16px 0 42px rgb(17 45 42 / 18%);
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-6: 24px;
    --space-8: 32px;
    font-family: "Noto Sans Arabic", Tahoma, Arial, sans-serif;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--canvas); }

body {
    min-width: 320px;
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font-size: 16px;
    line-height: 1.55;
}

button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--focus) 52%, transparent);
    outline-offset: 2px;
}

.skip-link {
    position: fixed;
    z-index: 60;
    inset-block-start: 10px;
    inset-inline-start: 10px;
    padding: 9px 13px;
    color: #fff;
    background: var(--ink);
    transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

/* Authentication */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.auth-card {
    width: min(100%, 460px);
    padding: clamp(24px, 5vw, 38px);
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    box-shadow: 0 18px 50px rgb(23 54 50 / 7%);
}
.auth-brand { display: inline-flex; align-items: baseline; gap: 8px; color: var(--ink); text-decoration: none; font-size: 21px; font-weight: 800; letter-spacing: -.035em; }
.auth-brand .muted { font-size: 14px; font-weight: 550; letter-spacing: 0; }
.auth-title { margin: 30px 0 6px; font-size: 27px; line-height: 1.35; letter-spacing: -.035em; }
.auth-intro { margin: 0 0 24px; color: var(--muted); }
.auth-footnote { margin: 22px 0 0; color: var(--muted); font-size: 13px; }
.auth-field-gap, .auth-panel-gap { margin-top: 16px; }
.auth-panel-gap h2 { margin: 0 0 8px; font-size: 16px; }
.recovery-code-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.recovery-code-list li { padding: 9px 11px; border: 1px solid var(--line); border-radius: 5px; background: #f7faf8; text-align: center; }
.recovery-code-list code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; direction: ltr; unicode-bidi: isolate; }
.auth-help-lines { margin-top: 12px; }
.auth-meta-block { margin-top: 12px; }

/* Platform administration shell */
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) 276px; }
.sidebar {
    position: sticky;
    inset-block-start: 0;
    grid-column: 2;
    grid-row: 1;
    height: 100vh;
    min-height: 620px;
    padding: 23px 16px 18px;
    color: #f7fbf9;
    background: var(--sidebar);
}
.sidebar-inner { height: 100%; display: flex; flex-direction: column; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #55746f transparent; }
.sidebar-brand { display: flex; align-items: center; min-height: 68px; padding: 0 10px 20px; color: #fff; text-decoration: none; border-bottom: 1px solid rgb(255 255 255 / 15%); }
.brand-lockup { display: block; }
.brand-name { display: block; font-size: 21px; font-weight: 800; line-height: 1.2; letter-spacing: -.04em; }
.brand-caption { display: block; margin-top: 5px; color: var(--sidebar-muted); font-size: 13px; }
.nav-label { margin: 22px 10px 7px; color: #a7c0b8; font-size: 12px; font-weight: 700; }
.side-nav { display: grid; gap: 3px; }
.side-nav a { position: relative; display: flex; align-items: center; min-height: 42px; padding: 8px 12px; border-radius: 6px; color: #e1ece8; text-decoration: none; font-size: 14px; font-weight: 550; transition: background-color .15s ease, color .15s ease; }
.side-nav a:hover { color: #fff; background: rgb(255 255 255 / 7%); }
.side-nav a[aria-current="page"] { color: #fff; background: var(--sidebar-raised); font-weight: 700; }
.side-nav a[aria-current="page"]::after { position: absolute; inset-block: 9px; inset-inline-start: 0; width: 3px; border-radius: 2px; background: var(--gold); content: ""; }
.nav-dot { display: none; }
.sidebar-bottom { margin-block-start: auto; padding: 18px 10px 0; color: var(--sidebar-muted); font-size: 12px; line-height: 1.7; }
.main-column { min-width: 0; grid-column: 1; grid-row: 1; }
.topbar { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px clamp(18px, 3vw, 38px); border-bottom: 1px solid var(--line); background: var(--paper); }
.topbar-left, .topbar-user { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-context { color: var(--muted); font-size: 14px; font-weight: 600; }
.topbar-user { color: var(--ink-soft); font-size: 14px; }
.topbar-user-name { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logout-form { margin: 0; }
.menu-toggle { display: none; min-width: 42px; min-height: 42px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--ink); background: #fff; cursor: pointer; }
.nav-backdrop { display: none; }
.page-content { width: min(100%, 1540px); margin-inline: auto; padding: clamp(24px, 3vw, 40px) clamp(18px, 3vw, 40px) 56px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.page-heading h1 { margin: 0; color: var(--ink); font-size: clamp(26px, 2.35vw, 34px); font-weight: 760; line-height: 1.3; letter-spacing: -.04em; }
.page-heading p { max-width: 720px; margin: 7px 0 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.eyebrow { display: block; margin-bottom: 7px; color: var(--accent); font-size: 13px; font-weight: 700; }
.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; color: var(--muted); font-size: 13px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs span[aria-current="page"] { color: var(--ink-soft); }

/* Common controls and feedback */
.button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 15px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    color: var(--ink);
    background: #fff;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.button:hover { border-color: #9bb5ab; color: var(--ink); background: #f8fbf9; }
.button-primary { border-color: var(--accent); color: #fff; background: var(--accent); }
.button-primary:hover { border-color: var(--accent-strong); color: #fff; background: var(--accent-strong); }
.button-danger { border-color: #d9a7a2; color: var(--danger); background: #fff; }
.button-danger:hover { border-color: var(--danger); color: #fff; background: var(--danger); }
.button-quiet { border-color: transparent; color: var(--accent); background: transparent; }
.button-small { min-height: 35px; padding: 6px 10px; font-size: 13px; }
.button[disabled] { opacity: .56; cursor: not-allowed; }
.notice { margin: 0 0 18px; padding: 12px 15px; border: 1px solid var(--line); border-inline-start: 4px solid var(--info); border-radius: 5px; color: var(--ink); background: var(--info-soft); }
.notice-success { border-inline-start-color: var(--success); background: var(--success-soft); }
.notice-warning { border-inline-start-color: var(--warning); background: var(--warning-soft); }
.notice-error { border-inline-start-color: var(--danger); background: var(--danger-soft); }
.notice ul { margin: 6px 0 0; padding-inline-start: 22px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Data, summaries, and structured panels */
.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--paper); }
.panel + .panel { margin-top: 18px; }
.panel-header { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.panel-header h2, .panel-header h3 { margin: 0; color: var(--ink); font-size: 17px; line-height: 1.4; }
.panel-header a { font-size: 13px; font-weight: 650; }
.panel-body { padding: 19px; }
.panel-body-tight { padding: 0; }
.panel-note { color: var(--muted); font-size: 13px; }
.section-title { margin: 26px 0 12px; font-size: 18px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-bottom: 24px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); }
.metric { min-height: 94px; padding: 14px 18px; border-inline-start: 1px solid var(--line); }
.metric:first-child { border-inline-start: 0; }
.metric-link { display: block; color: var(--ink); text-decoration: none; }
.metric-link:hover { background: #f8fbf9; }
.metric-label { display: block; color: var(--muted); font-size: 13px; }
.metric-value { display: block; margin-top: 5px; color: var(--ink); font-size: 25px; font-weight: 760; line-height: 1.25; font-variant-numeric: tabular-nums; }
.metric-foot { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.split-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.status-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.status-list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 42px; padding: 9px 0; border-bottom: 1px solid #edf1ef; }
.status-list li:last-child { border-bottom: 0; }
.status-list a { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; }
.status-count { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 750; }
.status { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 4px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.status::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.status-active { border-color: #b9d9c9; color: var(--success); background: var(--success-soft); }
.status-pending, .status-ready_to_activate { border-color: #e6d5a7; color: var(--warning); background: var(--warning-soft); }
.status-suspended, .status-closed { border-color: #e2c0bc; color: var(--danger); background: var(--danger-soft); }
.status-draft { color: var(--muted); background: #f5f7f6; }
.dashboard-activity, .tenant-schools-panel, .lifecycle-panel, .readiness-panel { margin-top: 22px; }
.dashboard-follow-up { margin-bottom: 22px; }
.follow-up-list { display: grid; }
.follow-up-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 18px; min-height: 62px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.follow-up-item:last-child { border-bottom: 0; }
.follow-up-item strong { display: block; font-size: 15px; }
.follow-up-item p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.follow-up-count { min-width: 34px; color: var(--accent); font-size: 20px; font-weight: 760; text-align: center; font-variant-numeric: tabular-nums; }
.dashboard-footprint { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 22px; }
.dashboard-footprint .panel { margin: 0; }
.dashboard-date { color: var(--muted); font-size: 13px; white-space: nowrap; }

/* Filters and forms */
.filter-bar { display: grid; grid-template-columns: minmax(230px, 1.5fr) minmax(180px, .8fr) auto auto; align-items: end; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--line); background: #fbfcfb; }
.filter-bar .field { min-width: 0; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label, .field-label { color: var(--ink-soft); font-size: 14px; font-weight: 650; }
.field-hint { color: var(--muted); font-size: 13px; }
.input, .select, .textarea {
    width: 100%;
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 5px;
    color: var(--ink);
    background: #fff;
    font-size: 15px;
}
.textarea { min-height: 104px; resize: vertical; }
.input::placeholder { color: #7c8d88; }
.input[dir="ltr"] { text-align: left; }
.field-error { color: var(--danger); font-size: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid .field-full { grid-column: 1 / -1; }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.check-row { display: flex; align-items: flex-start; gap: 10px; color: var(--ink-soft); font-size: 14px; }
.check-row input { width: 18px; height: 18px; margin-top: 4px; accent-color: var(--accent); }
.branch-list { display: grid; gap: 11px; }
.branch-entry { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 11px; align-items: end; padding: 13px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfb; }
.branch-entry .field { min-width: 0; }
.form-section { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.form-section h3 { margin: 0 0 5px; font-size: 16px; }
.form-section > p { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.inline-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.search-users-form { grid-template-columns: minmax(0, 1fr) auto; align-items: end; padding: 0; border: 0; background: transparent; }

/* Tables and result states */
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; table-layout: auto; text-align: start; }
.data-table th, .data-table td { padding: 13px 16px; border-bottom: 1px solid #e9efec; vertical-align: middle; }
.data-table th { color: var(--muted); background: #f8faf9; font-size: 13px; font-weight: 700; white-space: nowrap; }
.data-table td { font-size: 14px; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fafcfb; }
.table-primary { display: block; color: var(--ink); font-size: 15px; font-weight: 700; text-decoration: none; }
.table-secondary { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; }
.table-number { font-variant-numeric: tabular-nums; }
.empty-state { padding: 34px 20px; text-align: center; }
.empty-state h3 { margin: 0 0 6px; color: var(--ink); font-size: 17px; }
.empty-state p { max-width: 540px; margin: 0 auto; color: var(--muted); font-size: 14px; }
.empty-state .button { margin-top: 16px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 17px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.pagination-links { display: flex; gap: 7px; }
.pagination-links a, .pagination-links span { min-width: 36px; min-height: 34px; display: inline-grid; place-items: center; padding: 5px 9px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); text-decoration: none; }
.pagination-links .current { color: #fff; border-color: var(--accent); background: var(--accent); }

/* Detail and lifecycle views */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(260px, .8fr); gap: 18px; align-items: start; }
.detail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.detail-list div { min-width: 0; padding: 12px 5px; border-bottom: 1px solid #edf1ef; }
.detail-list dt { color: var(--muted); font-size: 13px; }
.detail-list dd { margin: 3px 0 0; color: var(--ink); font-size: 15px; font-weight: 650; overflow-wrap: anywhere; }
.detail-group + .detail-group { margin-top: 20px; }
.detail-group h3 { margin: 0 0 9px; font-size: 16px; }
.checklist { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.checklist li { display: flex; align-items: flex-start; gap: 10px; color: var(--ink-soft); font-size: 14px; }
.check-icon { width: 20px; height: 20px; display: grid; place-items: center; flex: none; border-radius: 50%; color: var(--success); background: var(--success-soft); font-size: 12px; font-weight: 800; }
.check-icon-no { color: var(--warning); background: var(--warning-soft); }
.danger-zone { border-color: #e7cac7; }
.danger-zone .panel-header { border-bottom-color: #f0d9d6; }
.mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 13px; direction: ltr; unicode-bidi: isolate; }
.confirm-suspension { margin-top: 15px; }
.readiness-panel { border-inline-start: 4px solid var(--accent); }

/* Platform access and safe settings */
.access-layout { display: grid; grid-template-columns: minmax(280px, .85fr) minmax(0, 1.4fr); gap: 18px; align-items: start; }
.access-search { display: grid; gap: 16px; }
.access-search .form-actions { margin-top: 0; padding-top: 0; border-top: 0; }
.access-target { margin-top: 18px; padding: 15px; border: 1px solid var(--line); border-inline-start: 3px solid var(--accent); border-radius: 6px; background: #f8fbf9; }
.access-target h3 { margin: 0; font-size: 16px; }
.access-target p { margin: 3px 0 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.access-target-form { display: grid; gap: 13px; margin-top: 16px; }
.access-assignment-list { display: grid; }
.access-assignment { display: grid; grid-template-columns: minmax(0, 1fr) minmax(130px, .7fr) auto; align-items: center; gap: 14px; padding: 14px 17px; border-bottom: 1px solid var(--line); }
.access-assignment:last-child { border-bottom: 0; }
.access-user-name { display: block; color: var(--ink); font-weight: 700; }
.access-user-email { display: block; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.access-role-name { color: var(--ink-soft); font-size: 14px; font-weight: 650; }
.settings-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.settings-list div { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.settings-list dt { color: var(--muted); font-size: 13px; }
.settings-list dd { margin: 3px 0 0; color: var(--ink); font-size: 15px; font-weight: 650; overflow-wrap: anywhere; }
.settings-readonly { margin-top: 16px; color: var(--muted); font-size: 14px; }

@media (max-width: 1100px) {
    .admin-shell { grid-template-columns: minmax(0, 1fr) 252px; }
    .page-content { padding-inline: 24px; }
    .topbar { padding-inline: 24px; }
    .detail-grid { grid-template-columns: 1fr; }
    .access-layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .admin-shell { display: block; }
    .sidebar { position: fixed; z-index: 40; inset: 0 0 0 auto; width: min(310px, 88vw); height: 100dvh; min-height: 100dvh; overflow: hidden; transform: translateX(105%); transition: transform .2s ease; box-shadow: var(--shadow-drawer); }
    [dir="rtl"] .sidebar { transform: translateX(105%); }
    .admin-shell.nav-open .sidebar, [dir="rtl"] .admin-shell.nav-open .sidebar { transform: translateX(0); }
    .nav-backdrop { position: fixed; z-index: 30; inset: 0; display: none; width: 100%; height: 100%; padding: 0; border: 0; background: rgb(9 29 27 / 48%); }
    .admin-shell.nav-open .nav-backdrop { display: block; }
    .main-column { min-height: 100vh; }
    .menu-toggle { display: inline-grid; place-items: center; }
    .topbar { min-height: 60px; padding: 8px 14px; }
    .topbar-user-name { max-width: 130px; }
    .topbar .button { min-height: 37px; padding: 6px 9px; font-size: 13px; }
    .page-content { padding: 22px 14px 38px; }
    .page-heading { align-items: stretch; flex-direction: column; gap: 14px; margin-bottom: 20px; }
    .page-heading h1 { font-size: 26px; }
    .page-heading .button { width: 100%; }
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .metric:nth-child(odd) { border-inline-start: 0; }
    .metric:nth-child(n + 3) { border-top: 1px solid var(--line); }
    .split-grid, .dashboard-footprint { grid-template-columns: 1fr; }
    .follow-up-item { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; }
    .follow-up-item .button { grid-column: 1 / -1; justify-self: start; }
    .panel-header { align-items: flex-start; flex-wrap: wrap; padding: 12px 14px; }
    .panel-body { padding: 14px; }
    .filter-bar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; padding: 12px; }
    .filter-bar .field:first-child { grid-column: 1 / -1; }
    .filter-bar > .button { width: 100%; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .field-full { grid-column: auto; }
    .branch-entry { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .branch-entry .branch-remove { grid-column: 1 / -1; justify-self: start; }
    .data-table thead { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
    .data-table, .data-table tbody { display: block; }
    .data-table tbody { padding: 9px; }
    .data-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin-bottom: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
    .data-table tr:last-child { margin-bottom: 0; }
    .data-table td { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 0; border: 0; font-size: 14px; overflow-wrap: anywhere; }
    .data-table td::before { color: var(--muted); content: attr(data-label); font-size: 12px; font-weight: 650; }
    .data-table td.mobile-wide { grid-column: 1 / -1; }
    .data-table td[data-label="الإجراء"] { align-items: flex-start; }
    .pagination { align-items: flex-start; flex-direction: column; padding-inline: 14px; }
    .detail-list, .settings-list { grid-template-columns: 1fr; }
    .access-assignment { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
    .access-role-name { grid-column: 1 / -1; }
    .access-assignment .button { grid-column: 2; grid-row: 1 / span 2; }
    .auth-card { padding: 25px 20px; }
}

@media (max-width: 390px) {
    body { font-size: 15px; }
    .topbar-context { font-size: 13px; }
    .topbar-user { gap: 7px; }
    .topbar-user-name { max-width: 96px; }
    .metric { min-height: 88px; padding: 11px 12px; }
    .metric-value { font-size: 22px; }
    .branch-entry { grid-template-columns: 1fr; }
    .branch-entry .branch-remove { grid-column: auto; }
    .filter-bar { grid-template-columns: 1fr; }
    .filter-bar .field:first-child { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
