/* Shared palette and surfaces for the public site, forms and administration. */
:root {
  color-scheme: light;
  --brand-fill: linear-gradient(115deg, #641621, #902c3a);
  --bg: #fff;
  --surface: #fff;
  --raised: #faf8f8;
  --ink: #201b1c;
  --muted: #6b6062;
  --accent: #8e2533;
  --accent2: #9c3443;
  --on: white;
  --soft: #f9edef;
  --edge: #e9e1e2;
  --glass: var(--surface);
  --glass2: var(--soft);
  --dots: #c9aeb1;
  --shadow: 0 10px 32px -24px #40202435;
  --r: 18px;
}
html[data-mode='dark'] {
  color-scheme: dark;
  --bg: #060606;
  --surface: #111010;
  --raised: #1b1819;
  --ink: #faf5f5;
  --muted: #b9afb0;
  --accent: #e59a9f;
  --accent2: #a6414e;
  --soft: #2b191c;
  --edge: #342b2c;
  --dots: #63464a;
  --shadow: none;
}
html {
  scrollbar-color: var(--edge) var(--bg);
}
body,
body[data-theme='purple'] {
  background-color: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
  line-height: 1.65;
}
body::before,
body::after {
  display: none;
}
body::selection,
::selection {
  background: #b3495555;
  color: var(--ink);
}

.glass,
.card,
.box,
.hero,
.department-nav,
.form-card,
.form-header {
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  backdrop-filter: none;
}
.topbar {
  display: block;
  position: relative;
  top: 0;
  margin: 0;
  padding: 0;
}
.city-ribbon {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: white;
  background: linear-gradient(110deg, #561520, #922c3c);
  font-size: 13px;
}
.city-ribbon strong {
  font: 700 11px/1.5 system-ui;
  padding: 3px 8px;
  border-radius: 99px;
  background: #ffffff26;
}
.demo .city-ribbon:after {
  content: 'معاينة تجريبية';
  padding-inline-start: 8px;
  border-inline-start: 1px solid #ffffff70;
}
.topbar .pill,
.login-head {
  width: min(1180px, 94%);
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  gap: 14px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  backdrop-filter: none;
  padding: 8px 0;
}
.brand {
  color: var(--ink);
  font-family: system-ui, sans-serif;
}
.brand #logo img {
  filter: none;
}
.pill nav,
.city-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.pill nav a,
.mode-switch,
.pill nav button {
  border-radius: 99px;
  font-size: 14px;
  padding: 7px 14px;
  color: var(--ink);
}
.mode-switch {
  background: var(--raised);
  border: 1px solid var(--edge);
}
#guest-login,
[data-owner] {
  color: var(--bg);
  background: var(--ink);
}
nav a[aria-current] {
  background: var(--soft);
  color: var(--accent);
}
main {
  max-width: 1210px;
  margin: auto;
  padding: 24px clamp(14px, 3vw, 34px) 65px;
  min-height: 65vh;
}
main:has(.dash) {
  max-width: 1440px;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
button,
.btn {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--edge);
  box-shadow: none;
}
.primary,
.btn.primary,
.primary:hover:not(:disabled) {
  background: linear-gradient(110deg, #661722, #943143) !important;
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 18px -10px #7d253650;
}
button:hover:not(:disabled),
.btn:hover {
  transform: none;
  border-color: var(--accent);
}
input,
select,
textarea,
select option {
  background: var(--raised);
  color: var(--ink);
  border-color: var(--edge);
  accent-color: var(--accent);
}
input[type='checkbox'],
input[type='radio'] {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin: 0;
  box-shadow: none;
}
select {
  appearance: auto;
  padding-inline: 12px;
}
input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--soft);
}
h1,
h2,
h3,
.side-head {
  color: var(--ink);
}
small,
.glyph,
.qn {
  color: var(--accent);
}
.city-intro {
  text-align: center;
  padding: clamp(44px, 5vw, 76px) 14px clamp(52px, 6vw, 80px);
}
.city-intro h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.16;
  margin: 0;
  font-weight: 700;
}
.city-intro h1 span {
  display: block;
  color: var(--accent);
  font-family: system-ui, sans-serif;
  letter-spacing: -0.045em;
}
.city-intro p {
  max-width: 640px;
  margin: 20px auto 30px;
  color: var(--muted);
}
.city-actions {
  justify-content: center;
  flex-wrap: wrap;
}
.city-actions a {
  padding: 9px 25px;
  border: 1px solid var(--edge);
  background: var(--surface);
  border-radius: 99px;
  font-weight: 700;
}
.city-actions .browse {
  color: white;
  background: linear-gradient(110deg, #641622, #963347);
  box-shadow: 0 7px 20px #79253433;
  border-color: transparent;
}
.city-directory {
  position: relative;
  margin-inline: auto;
  padding: 54px clamp(12px, 4vw, 58px) 32px;
  border-radius: 32px;
  background: linear-gradient(150deg, #a64855, #802533 56%, #541a26);
  scroll-margin-top: 20px;
}
html[data-mode='dark'] .city-directory {
  background: linear-gradient(145deg, #58232c, #391a20 60%, #241316);
}
.city-directory h2 {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  width: max-content;
  max-width: 92%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  color: var(--accent);
  font-size: 17px;
  padding: 9px 30px;
  border-radius: 99px;
  border: 4px solid #bd788477;
  z-index: 1;
}
.directory-sheet {
  padding: 35px 16px 16px;
  border-radius: 20px;
  border: 1px solid #ffffff42;
  background: #ffffff21;
}
.directory-banner {
  display: block;
  width: 100%;
  height: clamp(135px, 19vw, 245px);
  object-fit: cover;
  border-radius: 13px;
}
.directory-sheet .grid {
  margin-top: 15px;
}
.directory-empty {
  padding: 14px;
  color: var(--ink);
  background: var(--surface);
  border-radius: 12px;
  text-align: center;
}
.card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.card::before,
.hero::after {
  display: none;
}
.glyph {
  background: var(--soft);
  border-color: var(--edge);
}
.department-hero h1 {
  color: var(--ink);
  background: none;
}
.department-hero:has(> img) h1,
.department-hero:has(> img) p {
  color: white;
}
.dash {
  grid-template-columns: 216px minmax(0, 1fr);
  gap: 24px;
}
.side {
  padding: 14px;
  top: 16px;
  box-shadow: var(--shadow);
}
.side-head {
  font-size: 16px;
  padding: 9px 12px 18px;
}
.side a {
  border-radius: 10px;
  color: var(--muted);
  padding: 10px;
}
.side a[aria-current] {
  background: var(--soft);
  color: var(--accent);
  box-shadow: none;
  font-weight: 700;
}
.stats {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 142px), 1fr));
  gap: 12px;
}
.stat {
  border-radius: 15px;
  padding: 18px;
  gap: 7px;
}
.stat .ic {
  width: 32px;
  height: 32px;
  padding: 6px;
  border-radius: 9px;
  background: var(--soft);
  color: var(--accent);
}
.stat b {
  font-family: system-ui, sans-serif;
  letter-spacing: -0.05em;
  color: var(--ink);
}
.dash-sec {
  flex-wrap: wrap;
}
.side-foot {
  border-color: var(--edge);
}
.sec-tabs {
  gap: 5px;
  padding: 9px;
}
.sec-tabs a {
  font-size: 14px;
  border-color: transparent;
}
.form-stack {
  max-width: 780px;
  display: grid;
  gap: 14px;
  margin-inline: auto;
}
.form-header,
.form-card {
  padding: clamp(18px, 3.2vw, 32px);
  min-width: 0;
  margin: 0;
}
.form-header {
  border-top: 7px solid var(--accent2);
}
.form-header h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin: 6px 0;
}
.form-header p,
.form-card p:last-child {
  margin-bottom: 0;
}
.form-card legend {
  font-weight: 700;
  color: var(--accent);
  padding-inline: 7px;
}
.form-card legend span {
  color: var(--muted);
  font-size: 0.85em;
  font-weight: 400;
}
.form-card h2 {
  font-size: 1.1rem;
  margin-bottom: 16px;
}
.form-card select {
  width: auto;
  max-width: 100%;
}
.form-option,
.edit-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  border: 1px solid var(--edge);
  border-radius: 11px;
  background: var(--raised);
  color: var(--ink);
  font-size: 15px;
}
.form-option {
  cursor: pointer;
}
.form-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--soft);
}
.edit-option {
  margin: 7px 0;
  background: var(--surface);
}
.edit-option input:not([type='radio'], [type='checkbox']) {
  min-width: 0;
}
.card-tools {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: end;
  padding-top: 14px;
  margin-top: 12px;
  border-top: 1px solid var(--edge);
}
.card-tools button,
.edit-option button {
  font-size: 13px;
  padding: 5px 12px;
}
.grant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 8px;
}
.grant-grid label {
  margin: 0;
}
.savebar {
  background: var(--surface);
  border-color: var(--edge);
}
footer {
  border-top: 1px solid var(--edge);
  background: var(--bg);
}
.login-head {
  border-bottom: 1px solid var(--edge);
  font-weight: 700;
}
.login-screen .box {
  border-top: 5px solid var(--accent2);
}
@media (max-width: 900px) {
  .dash {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .side {
    position: static;
    max-width: 100%;
    overflow: auto;
    align-items: center;
  }
  .side-head,
  .side-foot {
    display: none;
  }
  .side a {
    flex: none;
  }
  .dash-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 620px) {
  main {
    padding: 12px 12px 45px;
  }
  .topbar .pill {
    min-height: 65px;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 5px;
  }
  .pill nav {
    gap: 2px;
  }
  .pill nav a,
  .mode-switch,
  .pill nav button {
    font-size: 12px;
    padding: 6px 9px;
  }
  .brand {
    font-size: 15px;
    gap: 5px;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .city-directory {
    border-radius: 20px;
  }
  .directory-sheet {
    padding-inline: 8px;
  }
  .form-stack {
    gap: 11px;
  }
  .savebar {
    bottom: 6px;
  }
  .sec-tabs b {
    width: 100%;
    border: 0;
  }
  .city-intro p {
    font-size: 15px;
  }
  .table-wrap {
    max-width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Mask the dot grid into separate patches along the page margins. */
body {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body > main {
  flex: 1 0 auto;
  width: 100%;
}
body::before,
.site-footer::before,
.city-directory::before {
  content: '';
  display: block;
  position: absolute;
  pointer-events: none;
  width: auto;
  height: auto;
  inset: 68px 0 0;
  border-radius: 0;
  aspect-ratio: auto;
  filter: none;
  animation: none;
  opacity: 0.8;
  background: radial-gradient(circle, var(--dots) 1.2px, transparent 1.8px) 0 0 / 20px 20px;
  --dot-patches:
    radial-gradient(ellipse min(25vw, 300px) 125px at 4% 55px, #000 20%, transparent),
    radial-gradient(ellipse min(18vw, 220px) 105px at 95% 120px, #000 18%, transparent),
    radial-gradient(ellipse min(14vw, 200px) 150px at 100% 44%, #000 25%, transparent),
    radial-gradient(ellipse min(18vw, 225px) 130px at 0% 69%, #000 25%, transparent),
    radial-gradient(ellipse min(19vw, 250px) 120px at 95% 90%, #000 15%, transparent);
  -webkit-mask-image: var(--dot-patches);
  mask-image: var(--dot-patches);
  z-index: -1;
}
.city-directory {
  isolation: isolate;
}
.city-directory::before {
  inset: 0;
  border-radius: inherit;
  --dots: #efd4d6;
  opacity: 0.5;
  --dot-patches:
    radial-gradient(ellipse 20% 68px at 10% 0%, black, transparent),
    radial-gradient(ellipse 18% 80px at 97% 96%, black, transparent);
}
.pill nav .dashboard-entry,
.city-actions a[href='#dashboard'] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #fff;
  background: var(--brand-fill);
  border: 1px solid #ae5965;
  box-shadow:
    inset 0 1px #ffffff24,
    0 4px 12px #651b241a;
  min-height: 38px;
  padding: 6px 18px;
  border-radius: 999px;
  font-weight: 700;
}
.dashboard-entry .ic {
  width: 16px;
  height: 16px;
}
.pill nav .dashboard-entry:hover,
.city-actions a[href='#dashboard']:hover {
  background: #6d1826;
  color: white;
}
.site-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 0;
  background: var(--surface);
  border-top: 1px solid var(--edge);
}
.site-footer::before {
  inset: 0 15% auto auto;
  width: min(30vw, 350px);
  height: 100%;
  mask-image: radial-gradient(ellipse at center, black, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at center, black, transparent 72%);
  opacity: 0.5;
}
.footer-inner {
  margin: auto;
  max-width: 1180px;
  padding: 24px clamp(16px, 3vw, 34px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.footer-rights,
.maker-credit {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}
.footer-rights strong {
  color: var(--ink);
  font:
    750 16px/1.3 system-ui,
    sans-serif;
}
.maker-credit b {
  color: var(--ink);
}
.sanad-seal {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 11px 11px 4px 11px;
  background: var(--brand-fill);
  color: white;
  font:
    700 22px/1 Georgia,
    'Times New Roman',
    serif;
  box-shadow: inset 0 0 0 1px #ffffff25;
}
@media (max-width: 620px) {
  body::before {
    top: 65px;
    background-size: 14px 14px;
  }
  .footer-inner {
    padding: 18px 14px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .footer-rights,
  .maker-credit {
    gap: 7px;
    font-size: 12px;
  }
  .pill nav .dashboard-entry {
    padding: 5px 10px;
    gap: 5px;
  }
}

/* Shared action palette, including links styled as buttons and upload controls. */
:root {
  --button-bg: #faf8f8;
  --button-text: #312a2b;
  --button-edge: #d9d3d4;
  --button-hover: #eee9ea;
  --switch-off: #8a8789;
  --primary-action: #832333;
}
html[data-mode='dark'] {
  --button-bg: #121213;
  --button-text: #f5f0f1;
  --button-edge: #373336;
  --button-hover: #242123;
  --switch-off: #555458;
  --primary-action: #892839;
}
body :is(button, .btn, [role='button']),
input[type='file']::file-selector-button {
  background: var(--button-bg) !important;
  color: var(--button-text);
  border: 1px solid var(--button-edge);
  box-shadow: none;
}
body :is(button, .btn, [role='button']):hover:not(:disabled),
input[type='file']:hover::file-selector-button {
  background: var(--button-hover) !important;
  color: var(--button-text);
  border-color: #868686;
}
body button.picked {
  box-shadow: inset 0 -2px var(--accent2);
}
body button:disabled {
  opacity: 1;
  color: #aaa;
  cursor: default;
}

/* Navigation sits on a single shared surface. */
.topbar .pill {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
}
.topbar .brand {
  justify-self: start;
}
.pill nav,
.admin-nav,
.department-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 12px;
  background: #101011;
  color: #f5f2f2;
  border: 1px solid #373334;
  border-radius: 18px;
  padding: 7px 16px;
  box-shadow: 0 6px 20px #0000000c;
}
.pill nav {
  grid-column: 2;
}
.pill nav :is(a, button),
.admin-nav :is(a, button),
.department-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 6px 9px;
  border: 0;
  border-radius: 0;
  color: #ddd7d8;
  background: transparent !important;
  box-shadow: none;
}
.pill nav .dashboard-entry,
.pill nav #guest-login {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #f2b5bd;
}
.pill nav :is(a, button):hover,
.admin-nav :is(a, button):hover,
.department-nav a:hover {
  color: white;
  background: transparent !important;
}
.pill nav [aria-current],
.admin-nav a[aria-current],
.department-nav a[aria-current] {
  color: #ffc4cd;
  box-shadow: inset 0 -2px #c55a6a;
}
.dash {
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}
.admin-nav {
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
}
.admin-nav form {
  margin: 0;
}
.admin-nav button {
  font-size: 14px;
}
.department-nav b {
  color: #fff;
}
.city-actions a:not(.browse),
.city-actions a[href='#dashboard'] {
  background: #060606;
  color: white;
  border-color: #505050;
}
.city-actions a.browse {
  background: var(--brand-fill);
  color: #fff;
  border-color: #993b49;
}
.city-actions a:hover {
  filter: brightness(1.15);
}

/* Overview panels stay dark in either page theme. */
.dash-main :is(.stat, .dash-grid .box, .stats ~ .box) {
  --surface: #101011;
  --glass: #181718;
  --ink: #faf7f7;
  --muted: #c2b8ba;
  --edge: #383335;
  --accent: #efa9b4;
  --soft: #302024;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--edge);
}
.stat .ic {
  background: transparent;
  padding: 0;
  width: 24px;
  height: 24px;
}
.form-option,
.form-option:has(input:checked) {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 8px 2px;
  margin: 0;
}
.form-option:has(input:checked) {
  font-weight: 650;
}
.form-header {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 12px 2px 18px;
  border-bottom: 1px solid var(--edge);
}
.form-header small {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.form-header small::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent2);
  transform: rotate(45deg);
}
.login-screen .box,
.qcard {
  border-top: 1px solid var(--edge);
}
.maker-credit .sanad-seal {
  width: 77px;
  height: 45px;
  border-radius: 8px;
  background-color: #060606;
  background-image: var(--sanad-logo);
  background-position: center;
  background-size: cover;
  box-shadow: inset 0 0 0 1px #ffffff19;
}
@media (max-width: 700px) {
  .topbar .pill {
    grid-template-columns: 1fr;
    justify-items: center;
    padding-block: 12px;
    gap: 8px;
  }
  .topbar .brand {
    justify-self: center;
  }
  .pill nav {
    grid-column: 1;
  }
  .admin-nav,
  .department-nav {
    gap: 2px 5px;
    padding: 5px 8px;
  }
  .admin-nav a,
  .admin-nav button {
    font-size: 13px;
    padding-inline: 6px;
  }
}
/* Main navigation and the management rail share their page theme. */
.pill nav,
.admin-nav,
.department-nav {
  background: var(--button-bg);
  border-color: var(--button-edge);
  color: var(--button-text);
}
.pill nav {
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
}
.pill nav :is(a, button),
.pill nav .dashboard-entry,
.pill nav #guest-login,
.admin-nav :is(a, button),
.department-nav :is(a, b) {
  color: var(--button-text);
}
.pill nav :is(a, button),
.pill nav .dashboard-entry,
.pill nav #guest-login {
  border-radius: 999px;
  padding: 6px 16px;
  min-height: 36px;
}
.pill nav :is(a, button):hover,
.admin-nav :is(a, button):hover,
.department-nav a:hover {
  color: var(--button-text);
  background: var(--button-hover) !important;
}
.pill nav a[aria-current],
.pill nav a[aria-current]:hover,
.admin-nav a[aria-current],
.department-nav a[aria-current] {
  background: var(--primary-action) !important;
  color: white;
  box-shadow: none;
}
.dash {
  grid-template-columns: 205px minmax(0, 1fr);
  align-items: start;
  direction: rtl;
}
.admin-rail {
  min-width: 0;
  position: sticky;
  top: 18px;
}
.admin-nav {
  margin: 0;
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 10px;
  justify-content: stretch;
}
.admin-nav :is(a, button) {
  justify-content: flex-start;
  border-radius: 10px;
  padding: 10px 12px;
}
.admin-nav form {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--button-edge);
}
.admin-nav button {
  width: 100%;
}
.rail-toggle {
  display: none;
}
body :is(button.primary, .btn.primary),
body .city-actions .browse {
  color: white;
  background: var(--primary-action) !important;
  border-color: #9b3948;
}
body :is(button.primary, .btn.primary):hover:not(:disabled),
body .city-actions .browse:hover {
  background: #702030 !important;
  color: white;
}
.city-actions a:not(.browse),
.city-actions a[href='#dashboard'] {
  background: var(--button-bg);
  color: var(--button-text);
  border-color: var(--button-edge);
}
.dash-main,
.department-showcase {
  min-width: 0;
}
input[type='checkbox'] {
  appearance: none;
  position: relative;
  display: inline-block;
  vertical-align: middle;
  width: 44px;
  height: 26px;
  flex: 0 0 44px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--switch-off);
  box-shadow: none;
  margin: 0;
  padding: 0;
  cursor: pointer;
}
input[type='checkbox']::before {
  content: '';
  position: absolute;
  top: 2px;
  inset-inline-start: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px #0005;
  transition: inset-inline-start 0.16s;
}
input[type='checkbox']:checked {
  background: var(--primary-action);
}
input[type='checkbox']:checked::before {
  inset-inline-start: 20px;
}
input[type='checkbox']:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
input[type='checkbox']:disabled {
  opacity: 0.55;
  cursor: default;
}
@media (forced-colors: active) {
  input[type='checkbox'] {
    appearance: auto;
    width: 22px;
    height: 22px;
    flex-basis: 22px;
  }
  input[type='checkbox']::before {
    display: none;
  }
}
.department-showcase {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(18px, 3vw, 40px);
  border: 1px solid #9c4858;
  border-radius: 30px;
  background:
    radial-gradient(ellipse at 9% 0%, #a45162, transparent 62%),
    linear-gradient(125deg, #6e2635, #3b111b);
}
.showcase-picker {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  width: fit-content;
  margin: 0 auto 20px;
  padding: 5px;
  background: var(--button-bg);
  border: 1px solid var(--button-edge);
  border-radius: 20px;
}
.showcase-picker button {
  border: 0;
  border-radius: 15px;
  padding: 8px 14px;
}
.showcase-picker button[aria-pressed='true'] {
  color: white;
  background: var(--primary-action) !important;
}
.showcase-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  overflow: hidden;
  border: 1px solid #ffffff32;
  border-radius: 21px;
  background: #140e11;
  color: white;
}
.showcase-copy {
  align-self: center;
  padding: clamp(20px, 4vw, 64px);
  overflow-wrap: anywhere;
}
.showcase-copy h2 {
  font-size: clamp(26px, 3.4vw, 48px);
  margin: 0;
  color: white;
}
.showcase-copy p {
  color: #dacdd0;
  margin: 10px 0 22px;
}
.showcase-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.showcase-art {
  min-height: 250px;
  position: relative;
}
.showcase-art img {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.showcase-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 65%, #140e11);
}
@media (max-width: 760px) {
  .dash {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .admin-rail {
    position: static;
  }
  .rail-toggle {
    display: inline-flex;
  }
  .rail-toggle[aria-expanded='false'] + .admin-nav {
    display: none;
  }
  .admin-nav {
    margin-top: 5px;
  }
  .showcase-panel {
    grid-template-columns: 1fr;
  }
  .showcase-art {
    min-height: 160px;
    grid-row: 1;
  }
  .showcase-art::after {
    background: linear-gradient(transparent 70%, #140e11);
  }
  .showcase-picker button,
  .pill nav :is(a, button),
  .pill nav .dashboard-entry {
    padding: 6px 10px;
  }
}
/* Footer thumbnail from assets/img/sanad-logo.jpg */
.maker-credit {
  --sanad-logo: url('/assets/img/sanad-footer.jpg');
}
.exam-person {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.exam-person img {
  border-radius: 50%;
  object-fit: cover;
  background: var(--raised);
}
.exam-byline {
  margin: 0;
}
.exam-byline bdi {
  color: var(--ink);
  font-weight: 650;
}

.toast {
  inset-inline: auto clamp(12px, 3vw, 32px);
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(390px, calc(100vw - 24px));
  padding: 10px 14px;
  border: 1px solid var(--edge);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 8px 30px #0003;
  font-weight: 650;
}
.notice-icon {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--soft);
  color: var(--accent);
}
.toast:not(.err) .notice-icon {
  background: #dcefe4;
  color: #24563c;
}
.toast.err {
  color: var(--ink);
  border-inline-start: 3px solid var(--accent);
}
.confirm-dialog {
  box-sizing: border-box;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 24px;
  border: 1px solid var(--edge);
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 20px 70px #0004;
  text-align: start;
}
.confirm-dialog::backdrop {
  background: #0e090bbf;
  backdrop-filter: blur(3px);
}
.confirm-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-block-end: 14px;
}
.confirm-heading .notice-icon {
  width: 44px;
  height: 44px;
}
.confirm-dialog h2 {
  margin: 0;
  font-size: 1.22rem;
  overflow-wrap: anywhere;
}
.confirm-dialog p {
  color: var(--muted);
  margin: 0;
  line-height: 1.7;
}
.confirm-actions {
  display: flex;
  gap: 10px;
  margin-block-start: 22px;
  padding-block-start: 16px;
  border-block-start: 1px solid var(--edge);
}
.confirm-actions button {
  flex: 1;
}
button.delete-section {
  color: var(--accent);
}
.login-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 14px;
}
.login-identity, .login-email, .login-date {
  display: grid;
  justify-items: start;
  gap: 2px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.login-row bdi { max-width: 100%; }
.login-handle, .login-row small {
  color: var(--muted);
}
.login-row small {
  font-size: .75rem;
}
.login-row time {
  font-variant-numeric: tabular-nums;
  white-space: normal;
}
@media (max-width: 700px) {
  .login-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 7px 12px;
  }
  .login-row .av {
    grid-row: 1 / 4;
    align-self: start;
  }
  .login-email, .login-date {
    grid-column: 2;
  }
}
@media (prefers-reduced-motion: reduce) {
  .toast {
    transition: none;
  }
}
