:root {
  color-scheme: light;
  --bg: #f5f0e8;
  --surface: #fffdf8;
  --surface-2: #efe4d3;
  --text: #102936;
  --muted: #667980;
  --line: #dfd3c2;
  --primary: #0b566f;
  --primary-2: #08384b;
  --primary-soft: #e4f0f3;
  --accent: #c5a171;
  --accent-2: #9c7540;
  --danger: #b53636;
  --warning: #c0821d;
  --success: #16724f;
  --info: #26727c;
  --shadow: 0 18px 44px rgba(13, 79, 104, 0.12);
  --radius: 8px;
  --sidebar: 280px;
  font-family:
    "IBM Plex Sans Arabic", "Noto Sans Arabic", "Segoe UI", Tahoma, Arial,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.72), rgba(245, 240, 232, 0.92)),
    var(--bg);
  color: var(--text);
  font-size: 15px;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

.icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

button {
  cursor: pointer;
}

.app-root {
  min-height: 100vh;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  background:
    linear-gradient(120deg, rgba(8, 56, 75, 0.96), rgba(13, 79, 104, 0.9)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='900' viewBox='0 0 900 900'%3E%3Cdefs%3E%3Cpattern id='p' width='120' height='120' patternUnits='userSpaceOnUse'%3E%3Cpath d='M60 10c20 25 36 39 50 50-18 12-34 28-50 50-16-22-32-38-50-50 14-11 30-25 50-50z' fill='none' stroke='%23c5a171' stroke-opacity='.28' stroke-width='2'/%3E%3Ccircle cx='60' cy='60' r='5' fill='%23c5a171' fill-opacity='.25'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='900' height='900' fill='%230b566f'/%3E%3Crect width='900' height='900' fill='url(%23p)'/%3E%3C/svg%3E");
  background-size: cover;
}

.login-visual {
  padding: 56px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.48);
  background: #fff;
  border-radius: 8px;
  font-weight: 800;
  overflow: hidden;
  padding: 4px;
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-title {
  font-size: 22px;
  font-weight: 800;
}

.brand-subtitle {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.75);
}

.login-hero h1 {
  margin: 0 0 18px;
  max-width: 640px;
  font-size: 48px;
  line-height: 1.18;
  letter-spacing: 0;
}

.login-logo-card {
  width: min(430px, 100%);
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 28px;
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.18);
}

.login-logo-card img {
  display: block;
  width: 100%;
  height: auto;
}

.login-hero p {
  margin: 0;
  max-width: 600px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.9;
}

.login-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 680px;
}

.login-metric {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 16px;
}

.login-metric strong {
  display: block;
  font-size: 24px;
}

.login-metric span {
  display: block;
  color: rgba(255, 255, 255, 0.76);
  margin-top: 5px;
}

.login-panel-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  gap: 18px;
  padding: 32px;
  background: var(--bg);
}

.login-panel {
  width: min(100%, 520px);
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.login-credit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.login-whatsapp {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: #168f55;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(22, 143, 85, 0.22);
}

.login-whatsapp:hover {
  background: #0f7d49;
  transform: translateY(-1px);
}

.login-whatsapp .icon {
  width: 17px;
  height: 17px;
  stroke-width: 2;
}

.login-panel h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.login-panel .muted {
  margin-bottom: 22px;
}

.form-stack {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  font-size: 13px;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 11px 12px;
  outline: none;
}

.field textarea {
  min-height: 88px;
  resize: vertical;
}

.readonly-note {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 11px 12px;
  display: flex;
  align-items: center;
  line-height: 1.7;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(11, 86, 111, 0.68);
  box-shadow: 0 0 0 3px rgba(11, 86, 111, 0.12);
}

.field input.is-invalid,
.field select.is-invalid,
.field textarea.is-invalid {
  border-color: var(--danger);
  background: rgba(181, 54, 54, 0.06);
}

.field input.is-invalid:focus,
.field select.is-invalid:focus,
.field textarea.is-invalid:focus {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(181, 54, 54, 0.14);
}

.field-error {
  color: var(--danger);
  font-size: 12px;
  line-height: 1.55;
}

.field-error[hidden] {
  display: none;
}

.demo-grid {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.demo-account {
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: right;
}

.demo-account strong,
.demo-account span {
  display: block;
}

.demo-account span {
  color: var(--muted);
  font-size: 12px;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  width: 100%;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background:
    linear-gradient(180deg, #08384b, #0b566f 52%, #102936);
  color: #fff;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sidebar .brand-lockup {
  padding: 4px 6px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.sidebar .brand-mark {
  width: 48px;
  height: 48px;
  background: #fff;
}

.sidebar .brand-title {
  font-size: 17px;
}

.sidebar .brand-subtitle {
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav-button {
  border: 1px solid transparent;
  width: 100%;
  color: rgba(255, 255, 255, 0.78);
  background: transparent;
  border-radius: 8px;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: right;
  min-height: 44px;
}

.nav-button span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-button .nav-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(197, 161, 113, 0.34);
  border-radius: 6px;
  color: #e6cfa9;
  background: rgba(255, 253, 248, 0.06);
}

.nav-button .nav-icon .icon {
  width: 17px;
  height: 17px;
}

.nav-button.active,
.nav-button:hover {
  color: #fff;
  border-color: rgba(197, 161, 113, 0.35);
  background: rgba(255, 253, 248, 0.12);
}

.nav-button.active .nav-icon,
.nav-button:hover .nav-icon {
  color: #08384b;
  background: #d8be94;
  border-color: #d8be94;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 12px;
}

.user-mini {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary-2);
  font-weight: 800;
  overflow: hidden;
  flex: 0 0 auto;
}

.avatar-large {
  width: 58px;
  height: 58px;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.user-mini strong,
.user-mini span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-mini span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.92);
  backdrop-filter: blur(14px);
}

.topbar h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

.topbar-primary {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.topbar-copy {
  min-width: 0;
}

.topbar-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(92px, 1fr));
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.84);
  border-radius: 8px;
  padding: 4px;
  min-height: 42px;
}

.segmented button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 7px 10px;
}

.segmented button.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
}

.content {
  padding: 28px;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

.btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  text-decoration: none;
  max-width: 100%;
  line-height: 1.35;
  text-align: center;
}

.btn:hover {
  border-color: rgba(11, 86, 111, 0.42);
  box-shadow: 0 8px 20px rgba(13, 79, 104, 0.08);
}

.btn-primary {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-2);
}

.btn-danger {
  border-color: rgba(181, 54, 54, 0.35);
  color: var(--danger);
}

.btn-danger:hover {
  border-color: var(--danger);
  background: rgba(181, 54, 54, 0.08);
}

.btn-ghost {
  background: transparent;
  color: inherit;
}

.btn-small {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 13px;
}

.muted {
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(13, 79, 104, 0.06);
  min-width: 0;
}

.card-pad {
  padding: 18px;
}

.circle-card {
  overflow: hidden;
}

.circle-cover {
  position: relative;
  min-height: 152px;
  background: #ece2d2;
  display: grid;
  place-items: center;
  text-align: center;
}

.circle-cover img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}

.circle-cover span,
.circle-cover strong {
  position: relative;
  z-index: 1;
}

.circle-cover span {
  color: var(--muted);
}

.circle-cover:not(.empty-cover) span {
  position: absolute;
  right: 12px;
  bottom: 12px;
  color: #fff;
  background: rgba(8, 56, 75, 0.82);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
}

.empty-cover {
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(11, 86, 111, 0.12), rgba(197, 161, 113, 0.16)),
    #f4ecdf;
}

.media-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.place-card {
  align-content: start;
  overflow: hidden;
}

.place-metrics {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.place-metrics div {
  display: grid;
  gap: 4px;
}

.place-metrics strong {
  line-height: 1.7;
}

.map-button {
  min-height: 34px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 8px;
  padding: 7px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-decoration: none;
  font-size: 13px;
}

.map-button:hover {
  border-color: rgba(11, 86, 111, 0.42);
}

.map-icon {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  color: var(--primary);
}
.map-icon svg {
  width: 18px;
  height: 18px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.checkbox-grid label {
  min-height: 42px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.checkbox-grid input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  accent-color: var(--primary);
}

.checkbox-grid label span {
  min-width: 0;
  line-height: 1.55;
}

.teacher-assignment-panel {
  border: 1px solid rgba(11, 86, 111, 0.18);
  background: rgba(11, 86, 111, 0.045);
  border-radius: 8px;
  padding: 14px;
}

.compact-head {
  margin-bottom: 10px;
}

.compact-head h4 {
  margin: 0 0 4px;
  font-size: 1rem;
  color: var(--primary-dark);
}

.juz-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.surah-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-height: 260px;
  overflow: auto;
  padding: 2px;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--primary);
  padding: 4px 0 0;
  font-size: 12px;
  text-align: right;
}

.link-button:hover {
  color: var(--primary-2);
  text-decoration: underline;
}

.danger-link {
  color: var(--danger);
}

.inline-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf1;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-head > * {
  min-width: 0;
}

.section-head h2,
.section-head h3 {
  margin: 0;
}

.section-head h2 {
  font-size: 20px;
}

.section-head h3 {
  font-size: 17px;
}

.entity-title-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.count-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 4px 9px 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(197, 161, 113, 0.44);
  background:
    linear-gradient(135deg, rgba(197, 161, 113, 0.18), rgba(11, 86, 111, 0.08)),
    #fffaf1;
  color: var(--primary);
  box-shadow: 0 8px 18px rgba(13, 79, 104, 0.07);
}

.count-badge strong {
  font-size: 20px;
  line-height: 1;
  font-weight: 900;
}

.count-badge span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.compact-head {
  margin-bottom: 0;
}

.compact-head h3 {
  font-size: 15px;
}

.kpi {
  display: grid;
  gap: 10px;
  position: relative;
  overflow: hidden;
  min-height: 158px;
}

.kpi::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--primary);
}

.kpi-primary::before {
  background: var(--primary);
}

.kpi-accent::before {
  background: var(--accent);
}

.kpi-success::before {
  background: var(--success);
}

.kpi-info::before {
  background: var(--info);
}

.kpi-danger::before {
  background: var(--danger);
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.kpi-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid rgba(11, 86, 111, 0.12);
}

.kpi-icon .icon {
  width: 20px;
  height: 20px;
}

.kpi-label {
  color: var(--muted);
  font-size: 13px;
}

.kpi-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 36px;
  font-weight: 900;
  color: var(--primary-2);
}

.kpi-value small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.kpi-trend {
  font-size: 13px;
  color: var(--accent-2);
}

.infographic-panel {
  display: grid;
  gap: 16px;
}

.infographic-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat-visual-card {
  min-height: 230px;
  border-radius: 8px;
  padding: 18px;
  color: #fff;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  text-align: center;
  box-shadow: 0 18px 38px rgba(13, 79, 104, 0.16);
}

.stat-visual-card strong {
  font-size: 20px;
}

.stat-visual-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

.tone-green {
  background: linear-gradient(145deg, #16724f, #2b8e65);
}

.tone-gold {
  background: linear-gradient(145deg, #9c7540, #c5a171);
}

.tone-blue {
  background: linear-gradient(145deg, #08384b, #0b566f);
}

.tone-teal {
  background: linear-gradient(145deg, #26727c, #4d9198);
}

.tone-red {
  background: linear-gradient(145deg, #8d4b55, #bd635d);
}

.stat-ring {
  --percent: 0%;
  --ring: #16724f;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.18) 0 54%, transparent 55%),
    conic-gradient(var(--ring) var(--percent), rgba(255, 255, 255, 0.3) 0);
}

.stat-ring span,
.stat-number {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 24px;
  font-weight: 900;
}

.stat-number {
  font-size: 32px;
}

.risk-stack {
  height: 118px;
  display: flex;
  align-items: end;
  gap: 10px;
}

.risk-stack span {
  width: 26px;
  border-radius: 8px 8px 2px 2px;
  background: rgba(255, 255, 255, 0.86);
}

.risk-stack span:nth-child(2) {
  background: rgba(255, 255, 255, 0.64);
}

.risk-stack span:nth-child(3) {
  background: rgba(255, 255, 255, 0.42);
}

.infographic-bars {
  border-color: transparent;
}

.mini-bar-list {
  display: grid;
  gap: 12px;
}

.mini-bar-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 48px;
  gap: 10px;
  align-items: center;
}

.mini-bar-row div {
  height: 16px;
  background: #eee4d5;
  overflow: hidden;
  border-radius: 999px;
}

.mini-bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.pill.success {
  color: var(--success);
  background: rgba(22, 114, 79, 0.1);
}

.pill.warning {
  color: var(--warning);
  background: rgba(192, 130, 29, 0.12);
}

.pill.danger {
  color: var(--danger);
  background: rgba(181, 54, 54, 0.1);
}

.pill.info {
  color: var(--info);
  background: rgba(49, 95, 134, 0.1);
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.filter-bar .field-wide {
  grid-column: span 2;
}

.search-hub {
  display: grid;
  gap: 14px;
}

.search-results {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.search-result {
  min-height: 92px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 7px;
  text-align: right;
  position: relative;
}

.search-result-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid rgba(11, 86, 111, 0.12);
  border-radius: 8px;
}

.search-result strong,
.search-result span:last-child {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result:hover {
  border-color: rgba(11, 86, 111, 0.45);
  background: #fffaf1;
}

.lookup-hint {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  background: #fffaf1;
}

.lookup-hint.warning {
  display: block;
  color: var(--warning);
  background: rgba(192, 130, 29, 0.1);
  border-color: rgba(192, 130, 29, 0.25);
}

.lookup-hint.success {
  border-color: rgba(11, 86, 111, 0.18);
  background: rgba(228, 240, 243, 0.78);
}

.lookup-hint strong,
.lookup-hint span {
  display: block;
}

.lookup-hint span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.followup-hero {
  margin-bottom: 16px;
  border-color: rgba(11, 86, 111, 0.18);
  background:
    linear-gradient(135deg, rgba(228, 240, 243, 0.85), rgba(255, 250, 241, 0.92)),
    var(--surface);
}

.assigned-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.assigned-chip {
  min-height: 74px;
  border: 1px solid rgba(11, 86, 111, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  padding: 12px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.assigned-chip .icon {
  width: 38px;
  height: 38px;
  padding: 8px;
  border-radius: 8px;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid rgba(11, 86, 111, 0.12);
}

.assigned-chip strong,
.assigned-chip span {
  display: block;
}

.assigned-chip span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.followup-filter {
  grid-template-columns: minmax(0, 1fr);
}

.followup-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.compact-list {
  grid-template-columns: 1fr;
  max-height: calc(100dvh - 250px);
  overflow: auto;
  padding-inline-end: 2px;
}

.student-followup-card {
  width: 100%;
  min-height: 168px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 12px;
  text-align: right;
  box-shadow: 0 10px 24px rgba(13, 79, 104, 0.07);
}

.student-followup-card:nth-child(odd) {
  background: rgba(228, 240, 243, 0.72);
}

.student-followup-card:nth-child(even) {
  background: rgba(255, 250, 241, 0.95);
}

.student-followup-card:hover,
.student-followup-card.active {
  border-color: var(--primary);
  box-shadow: 0 14px 30px rgba(13, 79, 104, 0.13);
}

.followup-card-metrics {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.followup-card-metrics span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.followup-card-metrics strong {
  color: var(--primary-2);
}

.followup-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.35fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.followup-sidebar {
  position: sticky;
  top: 18px;
}

.followup-detail {
  display: grid;
  gap: 16px;
}

.student-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.student-detail-grid div,
.followup-guardian-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 12px;
}

.student-detail-grid span,
.student-detail-grid strong {
  display: block;
}

.student-detail-grid strong {
  margin-top: 5px;
}

.followup-guardian-box {
  margin-top: 12px;
}

.compact-date {
  min-width: 190px;
}

.followup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.followup-history {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
}

.followup-date-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.followup-date-strip > div {
  border: 1px solid rgba(11, 86, 111, 0.14);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(228, 240, 243, 0.62));
  padding: 14px;
  box-shadow: 0 10px 24px rgba(13, 79, 104, 0.06);
}

.followup-date-strip span,
.followup-date-strip strong {
  display: block;
}

.followup-date-strip span {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.followup-date-strip strong {
  color: var(--primary-2);
  font-size: 17px;
  line-height: 1.6;
}

.followup-date-strip .field {
  margin: 0;
}

.followup-picker {
  margin-bottom: 16px;
  border-color: rgba(11, 86, 111, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 250, 241, 0.98), rgba(228, 240, 243, 0.72)),
    var(--surface);
}

.followup-picker-grid {
  display: grid;
  grid-template-columns: minmax(170px, 0.8fr) minmax(260px, 1.2fr) minmax(240px, 1fr);
  gap: 12px;
  align-items: end;
}

.readonly-field {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  padding: 11px 12px;
  color: var(--primary-2);
  font-weight: 800;
}

.followup-picker-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.followup-student-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  border: 1px solid rgba(11, 86, 111, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  padding: 12px;
}

.followup-ribbon-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.followup-ribbon-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  padding: 6px 10px;
}

.followup-empty-state {
  min-height: 280px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  gap: 10px;
}

.followup-empty-state .icon {
  width: 54px;
  height: 54px;
  padding: 12px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
}

.followup-empty-state p {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.9;
  margin: 0;
}

.simple-followup {
  gap: 14px;
}

.followup-section {
  border-color: rgba(11, 86, 111, 0.14);
}

.attendance-today {
  border-top: 4px solid var(--primary);
}

.attendance-quick-card {
  display: grid;
  grid-template-columns: minmax(250px, 1.1fr) minmax(210px, 0.9fr) minmax(180px, 0.75fr) minmax(220px, 1fr);
  gap: 12px;
  align-items: end;
}

.attendance-quick-card label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 7px;
}

.quick-status {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.followup-progress-form {
  gap: 14px;
}

.autosave-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(11, 86, 111, 0.16);
  border-radius: 999px;
  background: rgba(245, 248, 247, 0.9);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.autosave-status.saving {
  border-color: rgba(197, 163, 118, 0.36);
  background: rgba(255, 250, 241, 0.95);
  color: #8a6738;
}

.autosave-status.saved {
  border-color: rgba(45, 125, 83, 0.22);
  background: rgba(236, 249, 242, 0.95);
  color: #2d7d53;
}

.advanced-quran-picker {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 12px;
}

.advanced-quran-picker summary {
  cursor: pointer;
  color: var(--primary-2);
  font-weight: 800;
  list-style: none;
}

.advanced-quran-picker summary::-webkit-details-marker {
  display: none;
}

.advanced-quran-picker summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-inline-end: 8px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
}

.advanced-quran-picker[open] summary::before {
  content: "-";
}

.advanced-quran-picker .field {
  margin-top: 12px;
}

.followup-mini-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 14px;
}

.followup-mini-stats div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.75);
  padding: 12px;
}

.followup-mini-stats span,
.followup-mini-stats strong {
  display: block;
}

.followup-mini-stats span {
  color: var(--muted);
  font-size: 12px;
}

.followup-mini-stats strong {
  color: var(--primary-2);
  font-size: 24px;
  margin-top: 4px;
}

.simple-detail-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.followup-guardian-section {
  border-color: rgba(197, 163, 118, 0.28);
  background: linear-gradient(180deg, rgba(255, 250, 241, 0.92), rgba(255, 255, 255, 0.9));
}

.standalone-guardian {
  margin-top: 0;
  background: rgba(255, 255, 255, 0.82);
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
  min-width: 760px;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 0;
  text-align: right;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

th {
  color: var(--primary-2);
  font-size: 12px;
  font-weight: 800;
  background: #f5ecde;
}

tbody tr {
  background: transparent;
  box-shadow: 0 10px 24px rgba(13, 79, 104, 0.08);
  transition: background 0.16s ease;
}

tbody tr:hover {
  background: transparent;
}

tbody td {
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid #d7c3a4;
  border-bottom: 1px solid #d7c3a4;
}

tbody tr:nth-child(odd) td {
  background: rgba(228, 240, 243, 0.78);
}

tbody tr:nth-child(even) td {
  background: rgba(255, 250, 241, 0.92);
}

tbody td:first-child {
  border-inline-start: 5px solid var(--primary);
}

tbody td:last-child {
  border-inline-end: 1px solid #d7c3a4;
}

tbody tr:hover td {
  background: #edf8fb;
  border-color: var(--primary);
}

tbody td:first-child {
  border-start-start-radius: 8px;
  border-end-start-radius: 8px;
}

tbody td:last-child {
  border-start-end-radius: 8px;
  border-end-end-radius: 8px;
}

.student-name {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.section-head .student-name {
  grid-template-columns: auto minmax(0, 1fr);
}

.student-name strong,
.student-name span {
  display: block;
}

.student-name span {
  color: var(--muted);
  font-size: 12px;
}

.contact-cell,
.action-cell {
  display: grid;
  gap: 7px;
  align-items: start;
}

.contact-cell span,
.action-cell span {
  color: var(--muted);
  font-size: 12px;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.contact-button {
  min-height: 30px;
  border-radius: 8px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.contact-button.whatsapp {
  color: #fff;
  background: #168f55;
}

.contact-button.call {
  color: var(--primary-2);
  background: rgba(11, 86, 111, 0.1);
  border: 1px solid rgba(11, 86, 111, 0.2);
}

.contact-button:hover {
  transform: translateY(-1px);
}

.notification-preview {
  border-color: rgba(192, 130, 29, 0.28);
}

.notification-list {
  display: grid;
  gap: 10px;
}

.notification-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.notification-item.warning {
  border-color: rgba(192, 130, 29, 0.28);
}

.notification-item.danger {
  border-color: rgba(181, 54, 54, 0.28);
}

.notification-item p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.compact-control {
  grid-template-columns: repeat(2, minmax(108px, 1fr));
}

.delete-warning {
  border: 1px solid rgba(192, 130, 29, 0.28);
  background: rgba(192, 130, 29, 0.08);
  border-radius: 8px;
  padding: 14px;
}

.delete-warning p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.danger-zone {
  border-color: rgba(181, 54, 54, 0.32);
  background: rgba(181, 54, 54, 0.08);
}

.progress-track {
  height: 9px;
  width: 100%;
  min-width: 120px;
  border-radius: 999px;
  background: #eee4d5;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: inherit;
}

.attendance-control {
  display: inline-grid;
  grid-template-columns: repeat(4, minmax(82px, 1fr));
  gap: 6px;
}

.attendance-activity {
  display: grid;
  gap: 8px;
  min-width: 190px;
}

.attendance-activity select,
.attendance-activity input,
[data-attendance-note] {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--text);
}

.status-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 8px 10px;
  min-height: 36px;
  color: var(--muted);
  white-space: nowrap;
}

.status-btn:hover {
  border-color: rgba(11, 86, 111, 0.28);
  color: var(--primary-2);
}

.status-btn.active.present {
  color: #fff;
  border-color: var(--success);
  background: var(--success);
}

.status-btn.active.late {
  color: #fff;
  border-color: var(--warning);
  background: var(--warning);
}

.status-btn.active.absent {
  color: #fff;
  border-color: var(--danger);
  background: var(--danger);
}

.status-btn.active.excused {
  color: #fff;
  border-color: var(--info);
  background: var(--info);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 16px;
  align-items: start;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  border-right: 3px solid var(--line);
  padding: 0 12px 0 0;
}

.timeline-item strong,
.timeline-item span {
  display: block;
}

.timeline-item span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.bar-list {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 48px;
  gap: 10px;
  align-items: center;
}

.bar {
  height: 12px;
  background: #eee4d5;
  overflow: hidden;
  border-radius: 999px;
}

.bar span {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: inherit;
}

.insight-list {
  display: grid;
  gap: 10px;
}

.insight {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.insight strong {
  font-size: 14px;
}

.insight p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 56, 75, 0.44);
}

.modal {
  width: min(720px, 100%);
  max-height: 88vh;
  overflow: auto;
  background: var(--surface);
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.modal header,
.modal footer {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.modal footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.modal header h3 {
  margin: 0;
}

.modal-body {
  padding: 18px;
}

.empty {
  min-height: 160px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  text-align: center;
  padding: 24px;
}

.compact-empty {
  min-height: 56px;
  padding: 12px;
}

.toast {
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 80;
  transform: translateY(16px);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
  background: var(--primary-2);
  color: #fff;
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu {
  display: none;
}

.sidebar-scrim {
  display: none;
}

@supports (height: 100dvh) {
  body,
  .app-root,
  .login-page,
  .login-visual,
  .login-panel-wrap,
  .shell {
    min-height: 100dvh;
  }

  .sidebar {
    height: 100dvh;
  }

  .modal {
    max-height: 88dvh;
  }
}

@media (max-width: 1100px) {
  .login-page {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: auto;
    gap: 48px;
  }

  .login-panel-wrap {
    min-height: auto;
  }

  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(var(--sidebar), 86vw);
    z-index: 60;
    transform: translateX(110%);
    transition: transform 0.2s ease;
    box-shadow: -18px 0 42px rgba(8, 56, 75, 0.24);
  }

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

  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 55;
    display: block;
    border: 0;
    background: rgba(8, 56, 75, 0.38);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .shell.nav-open .sidebar-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-menu {
    display: inline-flex;
  }

  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .infographic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .assigned-strip,
  .followup-list,
  .followup-date-strip,
  .followup-picker-grid,
  .attendance-quick-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split,
  .followup-layout,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .followup-sidebar {
    position: static;
  }

  .compact-list {
    max-height: none;
  }

  .student-detail-grid,
  .followup-mini-stats,
  .simple-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body {
    font-size: 14px;
  }

  .login-visual,
  .login-panel-wrap,
  .content,
  .topbar {
    padding: 18px;
  }

  .login-hero h1 {
    font-size: 30px;
    line-height: 1.3;
  }

  .login-hero p {
    font-size: 15px;
    line-height: 1.8;
  }

  .login-logo-card {
    width: min(280px, 100%);
    margin-bottom: 18px;
  }

  .login-metrics,
  .grid-4,
  .infographic-grid,
  .search-results,
  .assigned-strip,
  .followup-date-strip,
  .followup-picker-grid,
  .attendance-quick-card,
  .quick-status,
  .followup-mini-stats,
  .followup-list,
  .student-detail-grid,
  .checkbox-grid,
  .juz-grid,
  .surah-grid,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .filter-bar .field-wide {
    grid-column: auto;
  }

  .toolbar {
    width: 100%;
  }

  .toolbar .btn,
  .toolbar .field,
  .toolbar .segmented {
    flex: 1 1 100%;
    width: 100%;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .topbar-primary {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }

  .topbar h1 {
    font-size: 20px;
    line-height: 1.35;
  }

  .topbar-meta {
    line-height: 1.6;
  }

  .content {
    padding-top: 16px;
  }

  .btn,
  .field input,
  .field select,
  .field textarea,
  .status-btn,
  .segmented button {
    min-height: 44px;
  }

  .field input,
  .field select,
  .field textarea {
    font-size: 16px;
  }

  .section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .notification-item {
    flex-direction: column;
  }

  .followup-actions {
    flex-direction: column;
  }

  .followup-picker-footer,
  .followup-student-ribbon {
    align-items: stretch;
    flex-direction: column;
  }

  .followup-ribbon-meta {
    justify-content: flex-start;
  }

  .followup-actions .btn {
    width: 100%;
  }

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

  table.responsive-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 10px;
  }

  table.responsive-table thead {
    display: none;
  }

  table.responsive-table tbody,
  table.responsive-table tr,
  table.responsive-table td {
    display: block;
    width: 100%;
  }

  table.responsive-table tbody tr {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(13, 79, 104, 0.06);
  }

  table.responsive-table td {
    border-bottom: 1px solid var(--line);
    padding: 11px 12px;
    display: grid;
    grid-template-columns: minmax(92px, 0.4fr) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
  }

  table.responsive-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.8;
  }

  table.responsive-table td[colspan] {
    display: block;
  }

  table.responsive-table td[colspan]::before {
    display: none;
  }

  table.responsive-table td:last-child {
    border-bottom: 0;
  }

  table.responsive-table td:first-child,
  table.responsive-table td:last-child {
    border-radius: 0;
  }

  .attendance-control {
    grid-template-columns: repeat(2, minmax(76px, 1fr));
    width: 100%;
  }

  .attendance-activity {
    min-width: 0;
    width: 100%;
  }

  .bar-row {
    grid-template-columns: 1fr;
  }

  .mini-bar-row {
    grid-template-columns: 1fr;
  }

  .modal-backdrop {
    align-items: end;
    padding: 10px;
  }

  .modal {
    width: 100%;
    max-height: calc(100dvh - 20px);
  }

  .modal header,
  .modal footer {
    padding: 14px;
    flex-wrap: wrap;
  }

  .modal footer .btn {
    flex: 1 1 140px;
  }

  .modal-body {
    padding: 14px;
  }

  .toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
    text-align: center;
  }
}

@media (max-width: 420px) {
  .login-visual,
  .login-panel-wrap,
  .content,
  .topbar {
    padding: 14px;
  }

  .login-panel {
    padding: 20px;
  }

  .card-pad {
    padding: 14px;
  }

  .attendance-control {
    grid-template-columns: 1fr;
  }

  table.responsive-table td {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* ===================== سجل التدقيق ===================== */
.audit-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.audit-entry {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px 14px;
}

.audit-entry-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.audit-entity {
  flex: 1 1 220px;
  min-width: 0;
  color: var(--text);
}

.audit-when {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.audit-actor {
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--text);
}

.audit-changes {
  list-style: none;
  margin: 10px 0 0;
  padding: 10px 0 0;
  border-top: 1px dashed var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.audit-changes li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.audit-field {
  font-weight: 700;
  color: var(--muted);
}

.audit-old {
  color: var(--muted);
  text-decoration: line-through;
}

.audit-new {
  color: var(--success);
  font-weight: 600;
}

.audit-error {
  color: var(--danger);
  margin-top: 16px;
}

.age-hint {
  margin-top: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  min-height: 1em;
}

.child-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.child-row input {
  flex: 1 1 180px;
}

.child-match {
  flex: 2 1 200px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.child-match.matched {
  color: var(--success);
}

.child-match.unmatched {
  color: var(--danger);
}

/* ===================== الإشعارات والرسائل ===================== */
.nav-button {
  position: relative;
}

.nav-badge {
  margin-inline-start: auto;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #e5484d;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 2px solid var(--surface);
  box-shadow: 0 2px 8px rgba(229, 72, 77, 0.55);
  animation: nav-badge-pulse 1.8s ease-in-out infinite;
}
.nav-button.active .nav-badge {
  border-color: rgba(255, 255, 255, 0.85);
}
@keyframes nav-badge-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(229, 72, 77, 0.5);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(229, 72, 77, 0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .nav-badge {
    animation: none;
  }
}

.notif-tabs,
.notif-period {
  margin: 14px 0;
  flex-wrap: wrap;
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-inline-start: 4px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

.message-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.message-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.message-item[data-action] {
  cursor: pointer;
}

.message-item[data-action]:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.message-item.unread {
  border-inline-start: 4px solid var(--danger);
  background: #fff;
}

.message-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.message-item p {
  margin: 8px 0 0;
  color: var(--text);
  white-space: pre-wrap;
  line-height: 1.7;
}

.message-meta {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 6px;
}

.read-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.read-chip {
  font-size: 0.78rem;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.read-chip.read {
  color: var(--success);
  border-color: var(--success);
}

.stat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0;
}

@media (max-width: 720px) {
  .audit-when {
    flex-basis: 100%;
  }
}

/* ————————————————— الفترات/المواسم ————————————————— */
.period-switcher {
  position: relative;
}
.period-switcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.9);
  border-radius: 10px;
  padding: 6px 12px;
  min-height: 44px;
  cursor: pointer;
  color: var(--primary-2);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.period-switcher-btn:hover {
  border-color: var(--primary);
}
.period-switcher.open .period-switcher-btn {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11, 86, 111, 0.12);
}
.period-switcher-btn .icon {
  width: 18px;
  height: 18px;
  color: var(--primary);
}
.period-switcher-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}
.period-switcher-text small {
  font-size: 10px;
  color: var(--muted);
}
.period-switcher-text strong {
  font-size: 14px;
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.period-caret {
  width: 16px;
  height: 16px;
  color: var(--muted);
  transition: transform 0.15s;
}
.period-switcher.open .period-caret {
  transform: rotate(180deg);
}
.period-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
}
.period-menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-start: 0;
  z-index: 41;
  width: min(320px, 84vw);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 8px;
  animation: period-menu-in 0.14s ease;
}
@keyframes period-menu-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.period-menu-head {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 8px 8px;
}
.period-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 9px 8px;
  cursor: pointer;
  text-align: start;
}
.period-menu-item:hover {
  background: rgba(11, 86, 111, 0.07);
}
.period-menu-item.current {
  background: rgba(11, 86, 111, 0.1);
}
.period-menu-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--line);
  flex: none;
}
.period-menu-dot.on {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(11, 86, 111, 0.15);
}
.period-menu-label {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.period-menu-label strong {
  font-size: 14px;
}
.period-menu-label small {
  font-size: 11px;
  color: var(--muted);
}
.period-menu-divider {
  height: 1px;
  background: var(--line);
  margin: 8px 4px;
}
.period-menu-action {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 9px 8px;
  cursor: pointer;
  color: var(--primary-2);
  font-size: 13px;
  text-align: start;
}
.period-menu-action:hover {
  background: rgba(11, 86, 111, 0.07);
}
.period-menu-action .icon {
  width: 16px;
  height: 16px;
  color: var(--primary);
}
.period-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: rgba(11, 86, 111, 0.06);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--primary-2);
  font-size: 13px;
}
.period-chip .icon {
  width: 15px;
  height: 15px;
  color: var(--primary);
}
.period-chip-name {
  font-weight: 600;
}
.period-manage-head,
.period-archive-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}
.period-archive-head {
  gap: 6px;
  justify-content: flex-start;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.period-archive-head .icon {
  width: 16px;
  height: 16px;
}
.period-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}
.period-row.current {
  border-color: var(--primary);
  background: rgba(11, 86, 111, 0.05);
}
.period-row.archived {
  opacity: 0.72;
}
.period-row-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.period-row-main strong {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.period-row-main small {
  color: var(--muted);
  font-size: 12px;
}
.period-row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.period-form-hint {
  color: var(--muted);
  font-size: 13px;
  background: rgba(11, 86, 111, 0.05);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0;
}
.period-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}
.period-check input {
  margin-top: 3px;
}
@media (max-width: 720px) {
  .period-switcher-text strong {
    max-width: 120px;
  }
  .period-menu {
    inset-inline-start: 0;
    width: min(320px, 92vw);
  }
}

/* ————————————————— تقرير الفترة ————————————————— */
.modal:has(.period-report) {
  width: min(980px, 100%);
}
.period-report-head .report-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.report-view-toggle {
  min-height: 38px;
}
.report-view-toggle button {
  padding: 5px 12px;
  font-size: 13px;
}
.period-report {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.report-hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  border-radius: 12px;
  padding: 20px 22px;
}
.report-hero h2 {
  margin: 8px 0 6px;
  font-size: 24px;
}
.report-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
}
.report-badge .icon {
  width: 14px;
  height: 14px;
}
.report-hero-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.report-hero .pill {
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary-2);
}
.report-note {
  margin: 10px 0 0;
  opacity: 0.92;
  font-size: 13px;
  max-width: 44ch;
}
.report-hero-dates {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-content: flex-start;
}
.report-hero-dates div {
  display: flex;
  flex-direction: column;
}
.report-hero-dates small {
  font-size: 11px;
  opacity: 0.8;
}
.report-hero-dates strong {
  font-size: 15px;
}
.report-kpis {
  gap: 12px;
}
.report-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.report-section > h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}
.report-section > h3 .icon {
  width: 18px;
  height: 18px;
  color: var(--primary);
}
.report-empty {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.report-teacher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.report-teacher-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.report-teacher-card small {
  color: var(--muted);
  font-size: 12px;
}
.report-teacher-circles {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.report-info-grid {
  margin-bottom: 4px;
}
.report-bars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
@media (max-width: 720px) {
  .report-hero {
    flex-direction: column;
  }
}

/* استيراد إلى فترة */
.import-source-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.import-source-pill {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  color: var(--primary-2);
  font-size: 13px;
}
.import-source-pill.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  border-color: transparent;
}
.import-group {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 12px 10px;
}
.import-group > summary {
  cursor: pointer;
  font-weight: 600;
  padding: 6px 0;
  color: var(--primary-2);
  list-style: none;
}
.import-group > summary::-webkit-details-marker {
  display: none;
}
.import-group > summary::before {
  content: "▸";
  display: inline-block;
  margin-inline-end: 6px;
  color: var(--muted);
  transition: transform 0.15s;
}
.import-group[open] > summary::before {
  transform: rotate(90deg);
}
.import-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 4px;
  font-size: 14px;
  cursor: pointer;
  border-top: 1px solid var(--line);
}
.import-check:first-of-type {
  border-top: 0;
}
.import-check input {
  margin-top: 3px;
}
.import-check small {
  color: var(--muted);
  font-size: 12px;
  margin-inline-start: 4px;
}
.import-progress-row {
  background: rgba(11, 86, 111, 0.05);
  border-radius: 8px;
  border-top: 0;
  margin-bottom: 4px;
  font-weight: 600;
}

/* حقل كلمة المرور مع أيقونة العين */
.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.password-wrap input {
  width: 100%;
  padding-inline-end: 44px;
}
.password-toggle {
  position: absolute;
  inset-inline-end: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  padding: 6px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
}
.password-toggle:hover {
  color: var(--primary);
  background: rgba(11, 86, 111, 0.08);
}
.password-toggle .icon {
  width: 20px;
  height: 20px;
}

/* قائمة الحظر */
.users-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ban-list-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e5484d;
  color: #fff;
  border-color: #e5484d;
  box-shadow: 0 2px 8px rgba(229, 72, 77, 0.35);
}
.ban-list-btn:hover {
  background: #d13b40;
  border-color: #d13b40;
  color: #fff;
}
.ban-list-btn .icon {
  width: 16px;
  height: 16px;
}
.ban-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #fff;
  color: #b5363a;
  font-weight: 800;
  font-size: 0.78rem;
  border: 2px solid rgba(255, 255, 255, 0.7);
}
.modal header .ban-count {
  background: #e5484d;
  color: #fff;
  border: 0;
}
.ban-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ban-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-inline-start: 4px solid #e5484d;
  border-radius: 10px;
  padding: 12px 14px;
}
.ban-row-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.ban-row-main strong {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ban-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: var(--muted);
  font-size: 12.5px;
}
.ban-fields code {
  background: rgba(11, 86, 111, 0.08);
  padding: 1px 6px;
  border-radius: 6px;
  font-family: inherit;
}
.guardian-row-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.app-version {
  margin-top: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.2px;
}

/* طباعة / تصدير PDF لتقرير الفترة */
@media print {
  body > *:not(#modal-root) {
    display: none !important;
  }
  #modal-root {
    position: static !important;
  }
  .modal-backdrop {
    position: static !important;
    inset: auto !important;
    display: block !important;
    padding: 0 !important;
    background: #fff !important;
  }
  .modal {
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    box-shadow: none !important;
    border: 0 !important;
    overflow: visible !important;
  }
  .modal-body {
    padding: 0 !important;
  }
  .no-print {
    display: none !important;
  }
  .report-hero {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

/* ===== الصفحات والروابط العامة ===== */
.pages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.page-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(13, 79, 104, 0.06);
}
.page-card.inactive {
  opacity: 0.72;
  background: var(--surface-2);
}
.page-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.page-card h3 {
  margin: 0;
  font-size: 17px;
  color: var(--text);
}
.page-card-meta {
  font-size: 13px;
}
.page-card-meta .pending-count {
  color: var(--danger);
}
.page-link {
  display: flex;
  gap: 6px;
  align-items: center;
}
.page-link input {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  padding: 7px 9px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--muted);
  direction: ltr;
  text-align: left;
}
.page-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}
.page-card-actions .btn {
  flex: 1 1 auto;
}
/* نموذج إنشاء الصفحة */
.page-type-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.page-type-tab {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.page-type-tab svg {
  width: 18px;
  height: 18px;
}
.page-type-tab.active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-2);
}
.page-circle-list {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 10px;
  max-height: 220px;
  overflow-y: auto;
  background: var(--surface);
}
.page-images-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.page-image-thumb {
  position: relative;
  width: 96px;
}
.page-image-thumb img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: block;
}
.page-image-thumb .btn {
  width: 100%;
  margin-top: 4px;
  padding: 3px;
  font-size: 11px;
}

/* ===== الصفحة العامة (رابط تسجيل/إعلان) ===== */
body.public-mode {
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(197, 161, 113, 0.22), transparent 60%),
    linear-gradient(160deg, #0b566f 0%, #08384b 42%, #0b2a38 100%);
  min-height: 100vh;
}
.public-wrap {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px 56px;
}
.public-card {
  width: 100%;
  max-width: 560px;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: 0 30px 70px rgba(3, 30, 42, 0.4);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.public-head {
  text-align: center;
  padding: 34px 28px 26px;
  background:
    radial-gradient(600px 240px at 50% -40%, rgba(197, 161, 113, 0.4), transparent 70%),
    linear-gradient(160deg, #0b566f, #08384b);
  color: #fff;
}
.public-badge {
  width: 62px;
  height: 62px;
  margin: 0 auto 14px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.public-badge svg {
  width: 30px;
  height: 30px;
  stroke: #f4e7d2;
}
.public-assoc {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.public-period {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 13px;
  font-weight: 600;
}
.public-period svg {
  width: 15px;
  height: 15px;
}
.public-title {
  margin: 16px 0 0;
  font-size: 22px;
  font-weight: 800;
}
.public-body {
  padding: 26px 28px 30px;
}
.public-intro {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.9;
  text-align: center;
}
.public-form .field {
  margin-bottom: 16px;
}
.public-form label {
  font-weight: 700;
  font-size: 14px;
}
.public-form input {
  height: 46px;
  font-size: 15px;
}
.public-circles {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.public-circle {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  background: var(--surface);
  transition: all 0.15s ease;
}
.public-circle:hover {
  border-color: var(--accent);
}
.public-circle input {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  flex: 0 0 auto;
}
.public-circle:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 0 0 3px rgba(11, 86, 111, 0.12);
}
.public-circle.static {
  cursor: default;
}
.public-circle-body {
  flex: 1;
  min-width: 0;
}
.public-circle-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
}
.public-circle-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}
.public-circle-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.public-circle-meta svg {
  width: 15px;
  height: 15px;
}
.public-circle-map {
  margin-top: 10px;
}
.public-submit {
  width: 100%;
  height: 50px;
  font-size: 16px;
  margin-top: 8px;
  justify-content: center;
}
.public-submit svg {
  width: 20px;
  height: 20px;
}
.public-foot {
  padding: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.public-notice {
  text-align: center;
  padding: 22px 10px;
}
.public-notice-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
}
.public-notice.success .public-notice-icon {
  background: rgba(22, 114, 79, 0.14);
  color: var(--success);
}
.public-notice-icon svg {
  width: 32px;
  height: 32px;
}
.public-notice h1,
.public-notice h2 {
  margin: 0 0 8px;
  font-size: 20px;
}
.public-notice p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}
.public-heading {
  margin: 0 0 16px;
  font-size: 22px;
  text-align: center;
}
.public-text {
  line-height: 2;
  color: var(--text);
  font-size: 15px;
  white-space: normal;
}
.public-images {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}
.public-images img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  display: block;
}
.public-empty {
  text-align: center;
  color: var(--muted);
  padding: 20px 0;
}

/* ===== طلبات التسجيل ===== */
.reg-group-title {
  margin: 22px 0 12px;
  font-size: 15px;
  color: var(--muted);
}
.reg-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.reg-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.reg-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.reg-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
}
.reg-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}
.reg-target {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 13px;
  color: var(--muted);
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.reg-target span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.reg-target svg {
  width: 15px;
  height: 15px;
}
.reg-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.reg-actions {
  display: flex;
  gap: 6px;
}
.reg-actions svg {
  width: 15px;
  height: 15px;
}

/* ===== شعار الموقع (الإعدادات) ===== */
.logo-settings {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}
.logo-preview {
  width: 96px;
  height: 96px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
}
.logo-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.logo-settings-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
.logo-upload-btn {
  cursor: pointer;
}
.logo-hint {
  font-size: 12px;
  margin: 2px 0 0;
}
/* شعار داخل شارة الصفحة العامة */
.public-badge.has-logo {
  background: #fff;
  padding: 7px;
}
.public-badge.has-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
}
