/* ============================================================
   SHARQ44 — Design System
   ============================================================ */

/* --- Tokens ------------------------------------------------- */
:root {
  --bg:           #f4f2ee;
  --surface:      #ffffff;
  --surface2:     #f0ede8;
  --border:       rgba(0,0,0,0.08);
  --border-hover: rgba(0,0,0,0.16);
  --gold:         #b8892a;
  --gold-light:   #a07420;
  --gold-dim:     rgba(184,137,42,0.10);
  --text:         #1a1814;
  --muted:        #8a8480;
  --muted2:       #b0ada8;
  --green:        #2e9e68;
  --red:          #c44e4e;
  --blue:         #3d72bc;
  --radius:       12px;

  --sidebar-w:    260px;
  --font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* --- Reset -------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }
img, svg { display: block; }

/* --- Scrollbar ---------------------------------------------- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--muted2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* --- Animation ---------------------------------------------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up {
  opacity: 0;
  animation: fadeUp 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.10s; }
.delay-3 { animation-delay: 0.15s; }
.delay-4 { animation-delay: 0.20s; }
.delay-5 { animation-delay: 0.25s; }
.delay-6 { animation-delay: 0.30s; }

/* --- Layout ------------------------------------------------- */
.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.main-wrapper {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

.main-content {
  flex: 1;
  padding: 32px 36px;
  width: 100%;
}

/* --- Sidebar ------------------------------------------------ */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  z-index: 50;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), width 0.22s ease;
}

.sidebar-logo {
  padding: 18px 22px 16px;
  border-bottom: 1px solid var(--border);
  isolation: isolate;
}

.sidebar-logo-link {
  display: block;
  isolation: isolate;
}

.sidebar-logo-img {
  width: 100%;
  max-width: 124px;
  height: auto;
  display: block;
  object-fit: contain;
  opacity: 0.9;
  isolation: isolate;
  mix-blend-mode: normal;
}

.sidebar-logo-darkmode-guard {
  display: none;
  position: fixed;
  top: 18px;
  left: 22px;
  width: 124px;
  z-index: 1460;
  pointer-events: none;
}

.sidebar-logo-darkmode-guard img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  opacity: 0.9;
}

.darkmode--activated .sidebar-logo-darkmode-guard,
body.darkmode--activated .sidebar-logo-darkmode-guard {
  display: block;
}

.darkmode--activated .sidebar-logo-img,
body.darkmode--activated .sidebar-logo-img {
  opacity: 0;
}

.sidebar-logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--gold-dim);
  border: 1px solid rgba(184,137,42,0.20);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--gold);
  flex-shrink: 0;
}

.sidebar-logo-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sidebar-logo-sub {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.sidebar-logo-name {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text);
  line-height: 1;
}

.sidebar-nav {
  flex: 1;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted2);
  padding: 0 12px;
  margin-bottom: 6px;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(26,24,20,0.78);
  transition: all 0.18s ease;
  white-space: nowrap;
  letter-spacing: 0.01em;
  position: relative;
}

.nav-item:hover {
  color: var(--text);
  background: rgba(0,0,0,0.04);
}

.nav-item.active {
  color: var(--gold-light);
  background: var(--gold-dim);
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: -14px;
  width: 3px;
  height: 60%;
  border-radius: 0 3px 3px 0;
  background: var(--gold);
  top: 50%;
  transform: translateY(-50%);
}

.nav-item svg {
  flex-shrink: 0;
  color: inherit;
  transition: color 0.15s;
  opacity: 0.8;
}

.nav-item.active svg,
.nav-item:hover svg {
  opacity: 1;
}

.nav-item-disabled {
  cursor: default;
  color: rgba(26,24,20,0.48);
  background: rgba(0,0,0,0.025);
}

.nav-item-disabled:hover {
  color: rgba(26,24,20,0.48);
  background: rgba(0,0,0,0.025);
}

.nav-item-disabled svg {
  opacity: 0.7;
}

.nav-lock {
  margin-left: auto;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(184,137,42,0.10);
  color: var(--gold-light);
  flex-shrink: 0;
}

.nav-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  color: var(--gold);
  background: var(--gold-dim);
  border-radius: 99px;
  padding: 2px 7px;
  line-height: 1.5;
  transition: all 0.18s ease;
}

.nav-item.active .nav-badge {
  background: rgba(184,137,42,0.16);
  color: var(--gold-light);
}

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid var(--border);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius);
  transition: background 0.15s;
  cursor: pointer;
}

.sidebar-user:hover { background: var(--surface2); }

.sidebar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 11px;
  color: var(--muted);
}

.sidebar-logout {
  color: var(--muted);
  flex-shrink: 0;
  transition: color 0.15s;
  display: flex;
  align-items: center;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.sidebar-logout:hover { color: var(--red); }

.sidebar-logout-form {
  margin: 0;
  display: flex;
  align-items: center;
}

/* Mobile top bar */
.mobile-topbar {
  display: none;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 14px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 45;
}

.mobile-topbar::after {
  content: '';
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
}

.mobile-topbar-title {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.02em;
}

.mobile-topbar-toggle {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(184,137,42,0.10);
  border: 1px solid rgba(184,137,42,0.16);
  color: var(--gold);
  flex-shrink: 0;
}

.mobile-topbar-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
}

.mobile-topbar-logo {
  width: 100%;
  max-width: 124px;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 44;
  background: rgba(26,24,20,0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.sidebar-overlay[hidden] {
  display: none !important;
}

/* --- Top Bar ----------------------------------------------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 36px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.topbar-title {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.01em;
  flex: 1;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-help {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

@keyframes notifRing {
  0%, 100% { transform: rotate(0deg); }
  12% { transform: rotate(10deg); }
  24% { transform: rotate(-8deg); }
  36% { transform: rotate(6deg); }
  48% { transform: rotate(-4deg); }
  60% { transform: rotate(2deg); }
}

.global-notif {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 140;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  padding: 0;
}

.global-date-filter {
  position: fixed;
  right: 164px;
  bottom: 28px;
  z-index: 1450;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.darkmode-toggle {
  position: fixed !important;
  right: 96px !important;
  bottom: 28px !important;
  left: auto !important;
  top: auto !important;
  z-index: 1450 !important;
  width: 56px !important;
  height: 56px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(184,137,42,0.18) !important;
  background: var(--gold-dim) !important;
  background-color: rgba(184,137,42,0.10) !important;
  color: var(--gold-light) !important;
  box-shadow: none !important;
  font-size: 18px !important;
  line-height: 1 !important;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.darkmode-toggle:hover {
  transform: translateY(-1px);
  background: rgba(184,137,42,0.14) !important;
  background-color: rgba(184,137,42,0.14) !important;
  border-color: rgba(184,137,42,0.26) !important;
}

.darkmode-layer {
  z-index: 1300 !important;
  pointer-events: none !important;
}

.darkmode-layer--button {
  opacity: 0 !important;
}

.darkmode-layer--expanded,
.darkmode-layer--simple {
  opacity: 1 !important;
}

.darkmode-background {
  background: transparent !important;
}

.global-date-filter-btn {
  width: 56px;
  height: 56px;
  padding: 0;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--gold-dim);
  border: 1px solid rgba(184,137,42,0.18);
  color: var(--gold-light);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.global-date-filter-btn:hover,
.global-date-filter.is-active .global-date-filter-btn {
  transform: translateY(-1px);
  background: rgba(184,137,42,0.14);
  border-color: rgba(184,137,42,0.26);
}

.global-date-filter-btn-icon {
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-light);
}

.global-date-filter-btn-icon svg {
  width: 21px;
  height: 21px;
}

.global-date-filter-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  position: absolute;
  top: 8px;
  right: 8px;
  background: #2e9e68;
  border: 2px solid var(--surface);
}

.global-date-filter-panel {
  width: min(320px, calc(100vw - 28px));
  border-radius: 18px;
  background: #fffdf9;
  border: 1px solid rgba(184,137,42,0.16);
  overflow: hidden;
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
}

.global-date-filter-panel[hidden] {
  display: none !important;
}

.global-date-filter-head,
.global-date-filter-foot {
  padding: 14px 15px;
}

.global-date-filter-head {
  border-bottom: 1px solid rgba(184,137,42,0.08);
}

.global-date-filter-head strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.global-date-filter-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.global-date-filter-body {
  display: grid;
  gap: 12px;
  padding: 14px 15px 15px;
}

.global-date-filter-body label {
  display: grid;
  gap: 7px;
}

.global-date-filter-body label span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.global-date-filter-body input {
  width: 100%;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.08);
  background: #fff;
  color: var(--text);
  padding: 0 12px;
  font: 700 13px/1 Inter, sans-serif;
}

.global-date-filter-body input:focus {
  outline: none;
  border-color: rgba(184,137,42,0.45);
  box-shadow: 0 0 0 4px rgba(184,137,42,0.10);
}

.global-date-filter-note {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.global-date-filter-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid rgba(184,137,42,0.08);
}

.global-date-filter-clear,
.global-date-filter-apply {
  height: 34px;
  padding: 0 12px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 800;
}

.global-date-filter-clear {
  color: var(--muted);
  background: rgba(0,0,0,0.04);
}

.global-date-filter-apply {
  color: var(--gold);
  background: rgba(184,137,42,0.10);
}

.global-notif-btn {
  width: 56px;
  height: 56px;
  padding: 0;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-dim);
  border: 1px solid rgba(184,137,42,0.18);
  color: var(--gold-light);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.global-notif-btn:hover {
  transform: translateY(-1px);
  background: rgba(184,137,42,0.14);
  border-color: rgba(184,137,42,0.26);
}

.global-notif-btn-icon {
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-light);
  background: transparent;
}

.global-notif-btn-icon svg {
  width: 21px;
  height: 21px;
}

.global-notif-btn.is-ringing .global-notif-btn-icon svg {
  transform-origin: top center;
  animation: notifRing 1.6s ease-in-out infinite;
}

.global-notif-count {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #c44e4e;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  position: absolute;
  top: -5px;
  right: -5px;
  border: 2px solid var(--surface);
}

.global-notif-panel {
  width: min(340px, calc(100vw - 28px));
  border-radius: 18px;
  background: #fffdf9;
  border: 1px solid rgba(184,137,42,0.16);
  overflow: hidden;
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
}

.global-notif-panel[hidden] {
  display: none !important;
}

.global-notif-head,
.global-notif-foot {
  padding: 14px 15px;
}

.global-notif-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(184,137,42,0.08);
}

.global-notif-head strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.global-notif-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.global-notif-seen {
  height: 34px;
  padding: 0 12px;
  border-radius: 14px;
  color: var(--gold);
  background: rgba(184,137,42,0.08);
  font-size: 11px;
  font-weight: 700;
}

.global-notif-list {
  max-height: min(52vh, 420px);
  overflow-y: auto;
  padding: 6px 8px 8px;
}

.global-notif-empty {
  padding: 20px 14px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.global-notif-item {
  padding: 12px 12px 13px;
  border-radius: 14px;
  transition: background 0.16s ease, border-color 0.16s ease;
  border: 1px solid transparent;
}

.global-notif-item + .global-notif-item {
  margin-top: 6px;
}

.global-notif-item:hover {
  background: rgba(184,137,42,0.04);
}

.global-notif-item.is-unread {
  background: rgba(184,137,42,0.06);
  border-color: rgba(184,137,42,0.10);
}

.global-notif-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.global-notif-item-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.global-notif-module {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(184,137,42,0.09);
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.global-notif-item time {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.global-notif-mark-one {
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(184,137,42,0.08);
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
}

.global-notif-item strong {
  display: block;
  font-size: 13px;
  line-height: 1.45;
}

.global-notif-item p {
  margin-top: 4px;
  color: #61564a;
  font-size: 11px;
  line-height: 1.65;
}

.global-notif-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.global-notif-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(0,0,0,0.04);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.global-notif-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid rgba(184,137,42,0.08);
}

.global-notif-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 12px;
  border-radius: 14px;
  background: rgba(184,137,42,0.08);
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
}

@media (max-width: 760px) {
  .global-date-filter {
    right: 146px;
    bottom: 18px;
  }

  .global-date-filter-btn {
    width: 52px;
    height: 52px;
    border-radius: 16px;
  }

  .global-date-filter-panel {
    width: min(320px, calc(100vw - 20px));
  }

  .darkmode-toggle {
    right: 82px !important;
    bottom: 18px !important;
    width: 52px !important;
    height: 52px !important;
    border-radius: 16px !important;
  }

  .global-notif {
    right: 18px;
    bottom: 18px;
  }

  .global-notif-btn {
    width: 52px;
    height: 52px;
    border-radius: 16px;
  }

  .global-notif-btn-icon {
    width: 100%;
    height: 100%;
  }

  .global-notif-panel {
    width: min(320px, calc(100vw - 20px));
  }
}

.login-announcement-backdrop {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 24px;
  background: rgba(24, 19, 13, 0.44);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.login-announcement-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.login-announcement-card {
  width: min(560px, calc(100vw - 36px));
  border-radius: 30px;
  border: 1px solid rgba(196, 181, 151, 0.34);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.985), rgba(251, 248, 243, 0.97));
  padding: 34px 34px 28px;
  box-shadow: 0 22px 60px rgba(19, 15, 10, 0.12);
  position: relative;
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  transition: transform 0.24s ease, opacity 0.24s ease;
}

.login-announcement-backdrop.open .login-announcement-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.login-announcement-copy {
  display: grid;
  gap: 20px;
}

.login-announcement-head {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.login-announcement-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(184, 137, 42, 0.10), rgba(184, 137, 42, 0.04));
  border: 1px solid rgba(184, 137, 42, 0.14);
  color: #b8892a;
  flex-shrink: 0;
}

.login-announcement-kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  color: #b8892a;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.login-announcement-body {
  position: relative;
  padding: 22px 22px 20px;
  border-radius: 22px;
  border: 1px solid rgba(184, 137, 42, 0.10);
  background:
    linear-gradient(180deg, rgba(247, 243, 236, 0.88), rgba(243, 238, 230, 0.76));
}

.login-announcement-text {
  color: #1f1b16;
  line-height: 1.58;
  white-space: pre-line;
  max-width: 100%;
  word-break: break-word;
  text-wrap: pretty;
}

.login-announcement-text.is-compact {
  font-size: 15.5px;
  line-height: 1.56;
  letter-spacing: 0.01em;
}

.login-announcement-text.is-normal {
  font-size: 20px;
}

.login-announcement-text.is-large {
  font-size: 25px;
}

.login-announcement-text.is-xlarge {
  font-size: 31px;
  line-height: 1.58;
}

.login-announcement-text.is-left { text-align: left; }
.login-announcement-text.is-center { text-align: center; }
.login-announcement-text.font-sans { font-family: var(--font-body); }
.login-announcement-text.font-soft { font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif; }
.login-announcement-text.font-sidebar { font-family: var(--font-body); letter-spacing: 0.01em; }
.login-announcement-text.font-serif { font-family: Georgia, "Times New Roman", serif; letter-spacing: 0.01em; }
.login-announcement-text.font-editorial { font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif; letter-spacing: 0.005em; }
.login-announcement-text.font-humanist { font-family: Optima, Candara, "Segoe UI", sans-serif; }
.login-announcement-text.weight-light { font-weight: 400; }
.login-announcement-text.weight-regular { font-weight: 500; }
.login-announcement-text.weight-medium { font-weight: 600; }
.login-announcement-text.weight-semibold { font-weight: 700; }

.login-announcement-actions {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
}

.login-announcement-confirm {
  min-width: 148px;
  min-height: 44px;
  border-radius: 15px;
  border: 1px solid rgba(184, 137, 42, 0.18) !important;
  background: linear-gradient(180deg, #f8f2e6, #f3ead8) !important;
  color: #7c5b1d !important;
  box-shadow: none !important;
}

.login-announcement-confirm:hover {
  background: linear-gradient(180deg, #f4ebda, #eee0c3) !important;
  transform: translateY(-1px);
}

@media (max-width: 760px) {
  .login-announcement-backdrop {
    padding: 16px;
  }

  .login-announcement-card {
    width: 100%;
    border-radius: 24px;
    padding: 22px 18px 20px;
  }

  .login-announcement-body {
    padding: 18px 16px 16px;
    border-radius: 18px;
  }

  .login-announcement-text.is-normal {
    font-size: 17px;
  }

  .login-announcement-text.is-large {
    font-size: 21px;
  }

  .login-announcement-text.is-xlarge {
    font-size: 24px;
  }

  .login-announcement-text.is-compact {
    font-size: 13.5px;
  }

  .login-announcement-actions {
    justify-content: flex-end;
  }

  .login-announcement-confirm {
    min-width: 132px;
  }
}

/* --- Page heading ------------------------------------------- */
.page-heading {
  margin-bottom: 28px;
}

.page-heading h1 {
  font-family: var(--font-head);
  font-size: 30px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.page-heading p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

/* --- Stat Cards -------------------------------------------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 22px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.stat-card-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stat-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-value {
  font-size: 30px;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat-trend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.stat-trend.up   { color: var(--green); }
.stat-trend.down { color: var(--red); }

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.gold {
  background: linear-gradient(135deg, #d4a84b 0%, #b8892a 100%);
  color: #fff;
}

.stat-icon.green {
  background: linear-gradient(135deg, #3dbf7a 0%, #2e9e68 100%);
  color: #fff;
}

.stat-icon.blue {
  background: linear-gradient(135deg, #5a8fd4 0%, #3d72bc 100%);
  color: #fff;
}

/* --- Panels ------------------------------------------------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
}

.panel-title {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.01em;
}

.panel-body { padding: 20px 22px; }

/* Chart panel */
.chart-wrap {
  width: 100%;
  overflow: hidden;
}

.chart-legend {
  display: flex;
  gap: 18px;
  padding: 0 22px 16px;
}

.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.chart-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* --- Grid layouts ------------------------------------------ */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* --- List rows --------------------------------------------- */
.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.list-row:last-child { border-bottom: none; }

.row-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.row-info { flex: 1; min-width: 0; }

.row-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 1px;
}

.row-amount {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* --- Cleaner dashboard lists ------------------------------- */
.clean-panel .panel-head {
  padding: 16px 22px;
}

.clean-list {
  padding: 8px 10px 10px;
}

.clean-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 12px;
  border-radius: 10px;
  transition: all 0.18s ease;
}

.clean-row:hover {
  background: var(--surface2);
}

.clean-user-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.clean-row-main {
  flex: 1;
  min-width: 0;
}

.clean-row-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.clean-row-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 1px;
}

.clean-data {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.clean-enroll-head {
  display: grid;
  grid-template-columns: 1.75fr 1.15fr 0.9fr 0.7fr 40px;
  gap: 14px;
  padding: 10px 22px 8px;
  border-bottom: 1px solid var(--border);
}

.clean-enroll-head span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted2);
}

.clean-enroll-list {
  padding: 8px 10px 12px;
}

.clean-enroll-row {
  display: grid;
  grid-template-columns: 1.75fr 1.15fr 0.9fr 0.7fr 40px;
  gap: 14px;
  align-items: center;
  padding: 12px 12px;
  border-radius: 10px;
  transition: all 0.18s ease;
}

.clean-enroll-row:hover {
  background: var(--surface2);
}

.clean-enroll-user {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.clean-enroll-course {
  font-size: 12.5px;
  color: var(--text);
}

.clean-enroll-date {
  font-size: 12px;
  color: var(--muted);
}

.clean-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}

.clean-action-btn:hover {
  background: var(--border);
  color: var(--text);
}

/* --- Status pills ------------------------------------------ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 99px;
  padding: 3px 10px 3px 8px;
}

.pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pill-green  { color: var(--green); background: rgba(46,158,104,0.10); }
.pill-green::before  { background: var(--green); }

.pill-red    { color: var(--red);   background: rgba(196,78,78,0.10); }
.pill-red::before    { background: var(--red); }

.pill-blue   { color: var(--blue);  background: rgba(61,114,188,0.10); }
.pill-blue::before   { background: var(--blue); }

.pill-muted  { color: var(--muted); background: var(--surface2); }
.pill-muted::before  { background: var(--muted2); }

.pill-gold   { color: var(--gold);  background: var(--gold-dim); }
.pill-gold::before   { background: var(--gold); }

/* --- Buttons ----------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  padding: 9px 16px;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  cursor: pointer;
}

.btn-primary {
  background: var(--gold);
  color: #fff;
  border: 1px solid transparent;
}
.btn-primary:hover {
  background: var(--gold-light);
  box-shadow: 0 3px 12px rgba(184,137,42,0.30);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--surface2);
  border-color: var(--border-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  padding: 8px 12px;
}
.btn-ghost:hover {
  background: var(--surface2);
  color: var(--text);
}

.btn-danger {
  background: var(--red);
  color: #fff;
  border: 1px solid transparent;
}
.btn-danger:hover { background: #ae4040; }

.btn-sm {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 8px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
}

/* --- Form controls ----------------------------------------- */
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.form-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-dim);
}

.form-input::placeholder { color: var(--muted2); }

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a8480' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 38px;
}

.form-group { margin-bottom: 16px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* --- Table ------------------------------------------------- */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow-x: auto;
  overflow-y: hidden;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table thead tr {
  background: #fbfaf8;
}

.data-table th {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 16px 20px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  text-align: left;
}

.data-table th:first-child,
.data-table td:first-child {
  padding-left: 24px;
}

.data-table th:last-child,
.data-table td:last-child {
  padding-right: 24px;
}

.data-table .muted {
  color: var(--muted);
  font-weight: 500;
}

.data-table tbody tr:last-child td { border-bottom: none; }

.data-table tbody tr:nth-child(even) td { background: rgba(0, 0, 0, 0.01); }

.data-table tbody tr:hover td { background: #f6f3ee; }

/* --- Search bar -------------------------------------------- */
.search-wrap {
  position: relative;
  flex: 1;
  max-width: 320px;
}

.search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted2);
  pointer-events: none;
}

.search-wrap input {
  padding-left: 38px;
}

/* --- Breadcrumb -------------------------------------------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 20px;
}

.breadcrumb a { transition: color 0.15s; }
.breadcrumb a:hover { color: var(--text); }

.breadcrumb-sep { color: var(--muted2); }

/* --- Tabs -------------------------------------------------- */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
}

.tab-btn {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}

.tab-btn:hover { color: var(--text); }

.tab-btn.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
  font-weight: 600;
}

/* --- Modal ------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(26,24,20,0.45);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--surface);
  border-radius: 18px;
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  border: 1px solid var(--border);
}

.modal-backdrop.open .modal {
  transform: translateY(0) scale(1);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 500;
  color: var(--text);
}

.modal-body { padding: 22px 24px; }

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 24px 20px;
  border-top: 1px solid var(--border);
}

/* --- Toast ------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(360px, calc(100vw - 32px));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
  background: rgba(255,255,255,0.96);
  color: var(--text);
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.08);
  min-width: 0;
  width: 100%;
  box-shadow: 0 18px 38px rgba(22, 16, 8, 0.16);
  backdrop-filter: blur(18px);
  animation: fadeUp 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.toast-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-icon svg,
.toast-close svg,
.app-confirm-icon svg {
  width: 17px;
  height: 17px;
}

.toast-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.toast-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted2);
}

.toast-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}

.toast-close {
  border: 0;
  background: transparent;
  color: var(--muted2);
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}

.toast-close:hover {
  background: rgba(0,0,0,0.05);
  color: var(--text);
}

.toast-success .toast-icon {
  background: rgba(46,158,104,.12);
  color: #81b89a;
}

.toast-error {
  border-color: rgba(201, 77, 77, 0.14);
}

.toast-error .toast-icon {
  background: rgba(201, 77, 77, 0.11);
  color: #cf7e7e;
}

.app-confirm-open {
  overflow: hidden;
}

.app-confirm-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 12, 8, 0.42);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1400;
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
}

.app-confirm-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.app-confirm-card {
  width: min(420px, 100%);
  background: rgba(255,255,255,0.98);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 18px;
  box-shadow: 0 24px 56px rgba(20, 12, 4, 0.17);
  padding: 22px;
  transform: translateY(8px) scale(0.98);
  transition: transform .24s cubic-bezier(.22,1,.36,1);
}

.app-confirm-backdrop.open .app-confirm-card {
  transform: translateY(0) scale(1);
}

.app-confirm-icon-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.app-confirm-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(201,147,39,.18), rgba(122,80,16,.08));
  color: #d2bf93;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}

.app-confirm-copy {
  text-align: center;
}

.app-confirm-title {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  color: var(--text);
}

.app-confirm-message {
  margin: 9px 0 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
  white-space: pre-line;
}

.app-confirm-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.app-confirm-btn {
  min-width: 126px;
  padding: 0 16px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.08);
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.app-confirm-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.app-confirm-btn.is-danger {
  background: linear-gradient(135deg, #f7e3e3, #f5d6d6);
  border-color: rgba(196, 78, 78, 0.18);
  color: #b34a4a;
}

.app-confirm-btn.is-neutral {
  background: linear-gradient(135deg, #f5efe4, #f2eadc);
  border-color: rgba(201, 147, 39, 0.16);
  color: var(--gold-dark);
}
.app-confirm-btn.is-soft {
  background: rgba(184, 137, 42, 0.08);
  border-color: rgba(184, 137, 42, 0.16);
  color: var(--gold-dark);
}

@media (max-width: 640px) {
  .app-confirm-actions {
    flex-direction: column;
  }

  .app-confirm-btn {
    width: 100%;
  }
}

/* --- Upload zone ------------------------------------------- */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 14px;
  padding: 36px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--gold);
  background: var(--gold-dim);
  color: var(--gold);
}

.upload-zone svg { margin: 0 auto 10px; }

/* --- Detail / Info card ------------------------------------ */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
}

.info-item-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}
.info-item-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

/* --- Profile header card ----------------------------------- */
.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 28px 24px;
  display: flex;
  align-items: flex-start;
  gap: 22px;
  margin-bottom: 20px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--gold-dim);
  border: 2px solid rgba(184,137,42,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--gold);
}

.profile-name {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.01em;
}

.profile-meta {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 4px;
}

.profile-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

/* --- Empty state ------------------------------------------- */
.empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--muted);
}

.empty-state svg {
  margin: 0 auto 14px;
  opacity: 0.35;
}

.empty-state h3 {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 6px;
}

.empty-state p { font-size: 13px; }

.app-empty-state-panel {
  padding: 34px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(249,246,240,0.96) 100%);
}

.app-empty-state-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(184,137,42,0.10);
  color: var(--gold);
}

.app-empty-state-panel strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.app-empty-state-panel p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.app-empty-state-panel .btn {
  margin-top: 8px;
}

/* --- Divider ----------------------------------------------- */
.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* --- Filters bar ------------------------------------------- */
.filters-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

/* --- Responsive -------------------------------------------- */
@media (max-width: 1024px) {
  .main-content { padding: 24px 20px; }

  .topbar { padding: 14px 20px; }

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

  .two-col { grid-template-columns: 1fr; }

  .clean-enroll-head {
    display: none;
  }

  .clean-enroll-row {
    grid-template-columns: 1fr auto;
    gap: 8px 14px;
  }

  .clean-enroll-course,
  .clean-enroll-date {
    grid-column: 1 / 2;
  }

  .clean-enroll-row .pill {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    justify-self: end;
  }

  .clean-action-btn {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    justify-self: end;
  }
}

@media (max-width: 640px) {
  .stat-grid { grid-template-columns: 1fr; }
  .form-row  { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .grid-3    { grid-template-columns: 1fr; }

  .clean-row {
    flex-wrap: wrap;
    row-gap: 6px;
  }

  .clean-row .pill {
    margin-left: 48px;
  }

  .clean-data {
    margin-left: auto;
  }
}

/* --- Legacy aliases (backwards compat with other pages) ---- */
.btn-gold         { background: var(--gold); color: #fff; border: 1px solid transparent; }
.btn-gold:hover   { background: var(--gold-light); }
.btn-outline      { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover{ background: var(--surface2); border-color: var(--border-hover); }

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.page-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-left: auto;
  flex-wrap: wrap;
}
.page-header h2 {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.01em;
}
.page-header p { font-size: 13px; color: var(--muted); margin-top: 4px; }

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

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted2);
  pointer-events: none;
  width: 15px;
  height: 15px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.card-body { padding: 20px 22px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 99px;
  padding: 4px 11px;
  line-height: 1.2;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  flex-shrink: 0;
}

.badge-success,
.badge-green {
  color: #1f8a59;
  background: rgba(46, 158, 104, 0.11);
  border-color: rgba(46, 158, 104, 0.22);
}

.badge-warning {
  color: #9e6e1b;
  background: rgba(184, 137, 42, 0.12);
  border-color: rgba(184, 137, 42, 0.25);
}

.badge-danger,
.badge-red {
  color: #b94141;
  background: rgba(196, 78, 78, 0.11);
  border-color: rgba(196, 78, 78, 0.2);
}

.badge-blue {
  color: #2f63ad;
  background: rgba(61, 114, 188, 0.11);
  border-color: rgba(61, 114, 188, 0.2);
}

.badge-gold {
  color: #9a6c1b;
  background: rgba(184, 137, 42, 0.12);
  border-color: rgba(184, 137, 42, 0.24);
}

.badge-muted,
.badge-neutral {
  color: #5f5a56;
  background: #f2efea;
  border-color: rgba(0, 0, 0, 0.08);
}

/* --- Programmes page -------------------------------------- */
.prog-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.prog-metric-card {
  padding: 18px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.prog-metric-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.prog-metric-value {
  margin-top: 6px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.prog-metric-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.prog-metric-icon.gold  { background: linear-gradient(135deg,#d4a84b,#b8892a); color:#fff; }
.prog-metric-icon.green { background: linear-gradient(135deg,#3dbf7a,#2e9e68); color:#fff; }
.prog-metric-icon.red   { background: linear-gradient(135deg,#f87171,#dc2626); color:#fff; }
.prog-metric-icon.blue  { background: linear-gradient(135deg,#5a8fd4,#3d72bc); color:#fff; }
.prog-metric-icon.muted { background: linear-gradient(135deg,#a09a94,#6d6661); color:#fff; }

.prog-filter-card {
  margin-bottom: 18px;
}

.prog-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: center;
  min-width: 980px;
}

.pay-date-range {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-alt, #f6f3ee);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 10px;
  height: 40px;
  flex-shrink: 0;
}

.pay-date-range svg { opacity: 0.5; flex-shrink: 0; color: var(--muted); }

.pay-date-input {
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  height: auto !important;
  font-size: 12.5px !important;
  width: 118px;
  box-shadow: none !important;
  color: var(--text);
}

.pay-date-sep {
  font-size: 11px;
  color: var(--muted2);
  flex-shrink: 0;
}

.prog-search {
  max-width: none;
  flex: 1 1 360px;
}

.prog-search .form-input {
  height: 40px;
}

.prog-select {
  min-width: 180px;
  height: 40px;
  width: 210px;
}

.prog-reset-btn {
  height: 40px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
}

.prog-inline-count {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}

.prog-inline-count strong {
  color: var(--text);
  font-weight: 700;
}

.prog-name-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.prog-programme-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.prog-programme-id {
  font-size: 11.5px;
  color: var(--muted2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.prog-amount-card {
  width: 168px;
  max-width: 100%;
  padding: 9px 11px;
  border-radius: 14px;
  border: 1px solid rgba(184, 137, 42, 0.12);
  background: linear-gradient(180deg, #fffdfa 0%, #faf6ef 100%);
}

.prog-amount-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.prog-amount-label {
  font-size: 10.25px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted2);
}

.prog-amount-value {
  font-size: 13.8px;
  line-height: 1.15;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.prog-amount-value.is-soft {
  color: rgba(26, 24, 20, 0.74);
  font-weight: 650;
}

.prog-amount-divider {
  height: 1px;
  margin: 7px 0;
  background: rgba(184, 137, 42, 0.12);
}

.prog-meta-cell {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.prog-meta-cell strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.prog-trace-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}

.prog-trace-inline.muted {
  color: var(--muted);
}

.prog-trace-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}

.prog-trace-inline.muted .prog-trace-name {
  color: var(--muted);
}

.prog-trace-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9aa2ad;
  flex-shrink: 0;
}

.prog-trace-time {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted2);
  font-variant-numeric: tabular-nums;
}

.prog-added-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.prog-added-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9aa2ad;
  flex-shrink: 0;
}

.prog-added-copy {
  min-width: 0;
}

.prog-added-copy strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.prog-added-copy small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.prog-enrolled-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.prog-enrolled-inline svg {
  color: var(--gold-light);
  flex-shrink: 0;
}

.prog-meta-cell span {
  font-size: 11.5px;
  color: var(--muted2);
}

.prog-date-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted2);
  white-space: nowrap;
}

.prog-date-inline svg {
  flex-shrink: 0;
  color: var(--gold-light);
}

.prog-user-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.prog-user-inline.muted {
  color: var(--muted2);
}

.prog-user-badge {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(61,114,188,0.12);
  color: #315ea5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.prog-user-badge.muted {
  background: #ede9e3;
  color: #7f7872;
}

.prog-action-form {
  display: inline-flex;
  justify-content: center;
}

.prog-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.prog-action-btn {
  width: auto;
  height: auto;
  border-radius: 8px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  margin: 0 3px;
}

/* View action - Blue */
.prog-action-view {
  color: #3d72bc;
  background: rgba(61, 114, 188, 0.1);
}
.prog-action-view:hover {
  background: rgba(61, 114, 188, 0.18);
}

/* Edit action - Gold */
.prog-action-edit {
  color: #b8892a;
  background: rgba(184, 137, 42, 0.1);
}
.prog-action-edit:hover {
  background: rgba(184, 137, 42, 0.18);
}
.prog-action-disabled {
  opacity: 0.28;
  cursor: default;
  pointer-events: none;
}

/* Delete action - Red */
.prog-action-delete {
  color: #c44e4e;
  background: rgba(196, 78, 78, 0.1);
}
.prog-action-delete:hover {
  background: rgba(196, 78, 78, 0.18);
}

.prog-action-btn.is-on {
  color: #186a45;
  background: rgba(46,158,104,0.08);
}

.prog-action-btn.is-on:hover {
  background: rgba(46,158,104,0.15);
}

.prog-action-btn.is-off {
  color: #a83838;
  background: rgba(196,78,78,0.08);
}

.prog-action-btn.is-off:hover {
  background: rgba(196,78,78,0.15);
}

.prog-empty-row {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 24px !important;
}

.prog-chart-card {
  margin-top: 18px;
  border-color: rgba(61,114,188,0.12);
  background: linear-gradient(180deg, #ffffff 0%, #fbfaf8 100%);
}

.prog-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.prog-chart-head h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}

.prog-chart-head p {
  font-size: 13px;
  color: var(--muted2);
}

.prog-chart-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.prog-chart-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.prog-chart-empty {
  font-size: 13px;
  color: var(--muted);
  padding: 16px 14px;
  border: 1px dashed var(--border);
  border-radius: 12px;
}

.prog-chart-row {
  padding: 12px 14px;
  border: 1px solid #e5e0da;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #fffbf8 50%, #fef8f5 100%);
}

.prog-chart-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.prog-chart-name {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.prog-chart-rank {
  min-width: 32px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(61,114,188,0.10);
  color: #3d72bc;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.prog-chart-name-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(184,137,42,0.10);
  color: var(--gold);
  flex-shrink: 0;
}

.prog-chart-name-icon svg {
  width: 16px;
  height: 16px;
}

.prog-chart-name strong {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.prog-chart-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.prog-chart-value strong {
  font-size: 21px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #2f4c84;
  font-variant-numeric: tabular-nums;
}

.prog-chart-value span {
  font-size: 11.5px;
  color: var(--muted);
}

.prog-chart-track {
  margin-top: 8px;
  height: 5px;
  border-radius: 0;
  background: rgba(61,114,188,0.10);
  overflow: hidden;
}

.prog-chart-fill {
  display: block;
  height: 100%;
  min-width: 8px;
  border-radius: 0;
  background: linear-gradient(90deg, #3d72bc 0%, #6b95d0 100%);
}

.prog-chart-row-foot {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.prog-chart-row-foot .badge {
  font-size: 10px;
  padding: 3px 8px;
}

.prog-chart-badge {
  margin-left: 0;
}

.prog-chart-share {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ── Inline 3-column metrics (replaces sidebar gauge) ── */
.prog-chart-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.prog-chart-metric-card {
  padding: 10px 14px;
  background: rgba(255,255,255,0.4);
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.prog-chart-metric-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.prog-chart-metric-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.prog-chart-metric-sub {
  font-size: 11px;
  color: var(--muted2);
}

/* ── Old sidebar (hidden since gauge removed) ── */
.prog-chart-side {
  display: none;
}

.prog-chart-ring-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 6px 0 2px;
}

.prog-chart-ring {
  --ring-fill: calc(var(--prog-rate, 0) * 1%);
  width: 148px;
  height: 148px;
  border-radius: 50%;
  padding: 14px;
  background:
    radial-gradient(closest-side, #ffffff 78%, transparent 79% 100%),
    conic-gradient(#3d72bc 0 var(--ring-fill), #dfe7f5 var(--ring-fill) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.prog-chart-ring-core {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff 0%, #f6f8fc 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 1px solid rgba(61,114,188,0.10);
}

.prog-chart-ring-core strong {
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #2a4f90;
}

.prog-chart-ring-core span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #667b9d;
}

.prog-chart-ring-wrap p {
  max-width: 240px;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
}

.prog-chart-stats {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prog-chart-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  border: 1px solid rgba(61,114,188,0.10);
  border-radius: 12px;
  background: #fff;
}

.prog-chart-stat span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted2);
  font-weight: 700;
}

.prog-chart-stat strong {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

.prog-chart-stat small {
  font-size: 11.5px;
  color: var(--muted);
}

.prog-logs-card {
  margin-top: 18px;
}

.prog-logs-head h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.prog-logs-head p {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--muted);
}

.prog-logs-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
}

.prog-log-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.prog-log-item:last-child {
  border-bottom: none;
}

.prog-log-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--surface2);
  color: var(--gold-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.prog-log-main p {
  font-size: 13.5px;
  color: var(--text);
}

.prog-log-main span {
  font-size: 12px;
  color: var(--muted2);
}

.prog-logs-empty {
  font-size: 13px;
  color: var(--muted);
  padding: 10px 0;
}

.prog-readonly {
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface2);
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.prog-view-modal {
  max-width: 640px;
  padding: 0;
  overflow: hidden;
}

.prog-view-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 26px 20px;
  background: linear-gradient(135deg, #2c2014 0%, #4b3620 52%, #2c2014 100%);
}

.prog-view-hero-copy {
  min-width: 0;
}

.prog-view-kicker {
  display: block;
  margin-bottom: 6px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.52);
}

.prog-view-hero h3 {
  font-size: 28px;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #fff;
}

.prog-view-hero-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.prog-view-ref,
.prog-view-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.prog-view-ref {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.82);
  border: 1px solid rgba(255,255,255,0.12);
}

.prog-view-status {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.16);
}

.prog-view-status.is-active {
  background: rgba(46,158,104,0.18);
  color: #dcfff0;
  border-color: rgba(46,158,104,0.24);
}

.prog-view-status.is-inactive {
  background: rgba(196,78,78,0.18);
  color: #ffe3e3;
  border-color: rgba(196,78,78,0.22);
}

.prog-view-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
  flex-shrink: 0;
}

.prog-view-close:hover {
  background: rgba(255,255,255,0.16);
  color: #fff;
}

.prog-view-body {
  padding: 22px 24px 10px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.prog-view-amounts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.prog-view-amount-card {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(184, 137, 42, 0.14);
  background: linear-gradient(180deg, #fffdfa 0%, #faf6ef 100%);
}

.prog-view-amount-card span {
  display: block;
  margin-bottom: 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted2);
}

.prog-view-amount-card strong {
  display: block;
  font-size: 22px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.prog-view-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.prog-view-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #faf8f4;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prog-view-item span {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted2);
  font-weight: 800;
}

.prog-view-item strong {
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
  font-weight: 700;
}

.prog-view-audit {
  border-radius: 16px;
  border: 1px solid rgba(184, 137, 42, 0.16);
  background: linear-gradient(180deg, #fcfaf6 0%, #f6f1e8 100%);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.prog-view-audit-kicker {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 800;
  color: #9b7a3a;
}

.prog-view-audit strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.prog-view-audit p {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.prog-view-foot {
  padding-top: 16px;
}

@media (max-width: 1380px) {
  .prog-metrics-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .prog-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .prog-filter-card .card-body {
    overflow-x: auto;
  }

  .prog-chart-layout {
    flex-direction: column;
  }
  .prog-chart-list {
    grid-template-columns: 1fr;
  }
  .prog-chart-metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .prog-metrics-grid {
    grid-template-columns: 1fr;
  }

  .prog-view-grid {
    grid-template-columns: 1fr;
  }

  .prog-view-amounts {
    grid-template-columns: 1fr;
  }
}

.upload-icon {
  width: 32px;
  height: 32px;
  margin: 0 auto 8px;
  display: block;
  color: var(--muted2);
}

.page-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.page-btn:hover:not(:disabled) { background: var(--surface2); border-color: var(--border-hover); color: var(--text); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-btn.active   { background: var(--gold); border-color: var(--gold); color: #fff; }

.section-title {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 14px;
}

.input-group { position: relative; }
.input-group .form-input { padding-left: 38px; }
.input-group svg:first-child {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted2);
  pointer-events: none;
}

/* --- Legacy top header (used by non-dashboard pages) ------- */
.top-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.header-search {
  position: relative;
  flex: 1;
  max-width: 380px;
}

.header-search svg,
.header-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--muted2);
  pointer-events: none;
}

.header-search input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px 8px 38px;
  font-size: 13.5px;
  font-family: var(--font-body);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}

.header-search input:focus { border-color: var(--gold); }

.header-spacer { flex: 1; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hdr-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  position: relative;
}

.hdr-btn:hover { background: var(--surface2); color: var(--text); }

.hdr-btn i, .hdr-btn svg { width: 18px; height: 18px; }

.notif-dot {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  border: 1.5px solid var(--surface);
}

.hdr-user {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4a84b 0%, #b8892a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
}

/* ============================================================
   Dashboard Theme (Stripe + Flowbite inspired)
   ============================================================ */
body.dashboard-theme {
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bg: #f6f9fc;
  --surface: #ffffff;
  --surface2: #f8fafc;
  --border: rgba(15, 23, 42, 0.08);
  --border-hover: rgba(15, 23, 42, 0.18);
  --text: #0f172a;
  --muted: #64748b;
  --muted2: #94a3b8;
  --gold: #c08a24;
  --gold-light: #9a6c1b;
  --gold-dim: rgba(192, 138, 36, 0.1);
  --green: #0f9f6e;
  --red: #d13a4b;
  --blue: #3157d5;
}

body.dashboard-theme {
  background:
    radial-gradient(1100px 560px at 95% -14%, rgba(49, 87, 213, 0.08), transparent 60%),
    radial-gradient(800px 420px at 8% 0%, rgba(192, 138, 36, 0.08), transparent 58%),
    var(--bg);
}

body.dashboard-theme .main-content.dashboard-shell {
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

body.dashboard-theme .dash-toolbar {
  display: flex;
  justify-content: flex-end;
}

body.dashboard-theme .sidebar {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  font-family: var(--font-body);
}

body.dashboard-theme .sidebar-logo {
  padding: 26px 20px 22px;
}

body.dashboard-theme .sidebar-logo-darkmode-guard {
  top: 26px;
  left: 20px;
}

body.dashboard-theme .sidebar-logo-mark {
  background: linear-gradient(135deg, #3f66ea 0%, #274ab7 100%);
  border: 0;
  color: #fff;
  box-shadow: 0 10px 24px rgba(49, 87, 213, 0.22);
}

body.dashboard-theme .sidebar-logo-name {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 600;
}

body.dashboard-theme .sidebar-logo-sub,
body.dashboard-theme .nav-section-label,
body.dashboard-theme .nav-item,
body.dashboard-theme .sidebar-user-name,
body.dashboard-theme .sidebar-user-role {
  font-family: var(--font-body);
}

body.dashboard-theme .nav-section-label {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  font-weight: 700;
}

body.dashboard-theme .nav-item {
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
}

body.dashboard-theme .nav-item:hover {
  background: #f8fafc;
  border-color: rgba(49, 87, 213, 0.14);
}

body.dashboard-theme .nav-item-disabled {
  color: #64748b;
  background: #f8fafc;
  border-color: rgba(148, 163, 184, 0.18);
}

body.dashboard-theme .nav-item-disabled:hover {
  color: #64748b;
  background: #f8fafc;
  border-color: rgba(148, 163, 184, 0.18);
}

body.dashboard-theme .nav-lock {
  background: rgba(49, 87, 213, 0.08);
  color: #3157d5;
}

body.dashboard-theme .nav-item.active {
  color: #274ab7;
  background: rgba(49, 87, 213, 0.1);
  border-color: rgba(49, 87, 213, 0.14);
}

body.dashboard-theme .nav-item.active::before {
  background: #3157d5;
}

body.dashboard-theme .nav-badge {
  background: rgba(49, 87, 213, 0.1);
  color: #3157d5;
}

body.dashboard-theme .sidebar-user-name {
  font-size: 13.5px;
  font-weight: 700;
}

body.dashboard-theme .sidebar-user-role {
  font-size: 11.5px;
  font-weight: 500;
}

body.dashboard-theme .mobile-topbar {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

body.dashboard-theme .dash-header {
  background: linear-gradient(140deg, #ffffff 0%, #f9fbff 56%, #f4f7ff 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px 26px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

body.dashboard-theme .dash-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #5f74c8;
  margin-bottom: 8px;
}

body.dashboard-theme .dash-header h1 {
  font-family: var(--font-head);
  font-size: 34px;
  line-height: 1.06;
  font-weight: 620;
  letter-spacing: -0.025em;
  color: var(--text);
}

body.dashboard-theme .dash-subtitle {
  font-size: 14px;
  color: var(--muted);
  margin-top: 7px;
}

body.dashboard-theme .dash-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

body.dashboard-theme .btn {
  border-radius: 10px;
  font-family: var(--font-body);
  font-weight: 600;
}

body.dashboard-theme .btn-primary {
  background: linear-gradient(135deg, #3157d5 0%, #1f43bf 100%);
  color: #fff;
}

body.dashboard-theme .btn-primary:hover {
  background: linear-gradient(135deg, #3b61de 0%, #2247c7 100%);
  box-shadow: 0 12px 22px -12px rgba(49, 87, 213, 0.45);
}

body.dashboard-theme .btn-secondary {
  background: #fff;
  color: #475569;
  border: 1px solid var(--border);
}

body.dashboard-theme .btn-secondary:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

body.dashboard-theme .dash-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

body.dashboard-theme .dash-metric-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.18s ease;
}

body.dashboard-theme .dash-metric-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 14px 32px -24px rgba(15, 23, 42, 0.32);
  transform: translateY(-2px);
}

body.dashboard-theme .dash-metric-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

body.dashboard-theme .dash-metric-value {
  font-size: 30px;
  line-height: 1.02;
  margin-top: 7px;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

body.dashboard-theme .dash-metric-trend {
  margin-top: 7px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

body.dashboard-theme .dash-metric-trend.up { color: var(--green); }
body.dashboard-theme .dash-metric-trend.down { color: var(--red); }

body.dashboard-theme .dash-metric-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

body.dashboard-theme .dash-metric-icon.gold {
  background: linear-gradient(135deg, #ffe7bc 0%, #ffd98f 100%);
  color: #935f09;
  box-shadow: 0 8px 18px -12px rgba(192, 138, 36, 0.42);
}

body.dashboard-theme .dash-metric-icon.green {
  background: linear-gradient(135deg, #d7f8ec 0%, #b6efda 100%);
  color: #0f7d57;
  box-shadow: 0 8px 18px -12px rgba(15, 159, 110, 0.34);
}

body.dashboard-theme .dash-metric-icon.blue {
  background: linear-gradient(135deg, #dde8ff 0%, #c2d4ff 100%);
  color: #2a4eb8;
  box-shadow: 0 8px 18px -12px rgba(49, 87, 213, 0.34);
}

body.dashboard-theme .dash-metric-icon.rose {
  background: linear-gradient(135deg, #ffe3ea 0%, #ffd1dc 100%);
  color: #b52f3f;
  box-shadow: 0 8px 18px -12px rgba(209, 58, 75, 0.34);
}

body.dashboard-theme .dash-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 14px;
}

body.dashboard-theme .dash-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

body.dashboard-theme .dash-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
}

body.dashboard-theme .dash-card-head h2 {
  font-family: var(--font-head);
  font-size: 19px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.01em;
}

body.dashboard-theme .dash-card-head p {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

body.dashboard-theme .dash-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: linear-gradient(135deg, #3157d5 0%, #1f43bf 100%);
  border: 1px solid transparent;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

body.dashboard-theme .dash-link:hover {
  background: linear-gradient(135deg, #3b61de 0%, #2247c7 100%);
  box-shadow: 0 12px 22px -12px rgba(49, 87, 213, 0.45);
  transform: translateY(-1px);
}

body.dashboard-theme .dash-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

body.dashboard-theme .dash-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--muted);
}

body.dashboard-theme .dash-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

body.dashboard-theme .dash-legend .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

body.dashboard-theme .dash-legend .dot.revenue { background: #3157d5; }
body.dashboard-theme .dash-legend .dot.expense { background: #c08a24; }

body.dashboard-theme .dash-chart-wrap {
  padding: 14px 18px 16px;
}

body.dashboard-theme .dash-chart-wrap svg {
  width: 100%;
  height: auto;
}

body.dashboard-theme .dash-grid-lines line {
  stroke: #e6edf5;
  stroke-width: 1;
}

body.dashboard-theme .dash-axis-labels text {
  fill: #94a3b8;
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 0.04em;
}

body.dashboard-theme .dash-area-revenue { fill: url(#dashRevGrad); }
body.dashboard-theme .dash-area-expense { fill: url(#dashExpGrad); }

body.dashboard-theme .dash-line-revenue {
  fill: none;
  stroke: #3157d5;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.dashboard-theme .dash-line-expense {
  fill: none;
  stroke: #c08a24;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.dashboard-theme .dash-points-revenue circle,
body.dashboard-theme .dash-points-expense circle {
  stroke: #fff;
  stroke-width: 1.5;
}

body.dashboard-theme .dash-points-revenue circle { fill: #3157d5; }
body.dashboard-theme .dash-points-expense circle { fill: #c08a24; }

body.dashboard-theme .dash-overview-minimal {
  padding: 8px 22px 14px;
  display: flex;
  flex-direction: column;
}

body.dashboard-theme .dash-overview-kpi {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid #e9eff8;
}

body.dashboard-theme .dash-overview-kpi:last-child {
  border-bottom: 0;
}

body.dashboard-theme .dash-overview-kpi-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

body.dashboard-theme .dash-overview-kpi-icon.payment {
  background: #edf3ff;
  color: #3157d5;
}

body.dashboard-theme .dash-overview-kpi-icon.collect {
  background: #e8f6ef;
  color: #14794d;
}

body.dashboard-theme .dash-overview-kpi-icon.due {
  background: #fff3df;
  color: #8b5d09;
}

body.dashboard-theme .dash-overview-kpi-title {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #1b273b;
  line-height: 1.2;
}

body.dashboard-theme .dash-overview-kpi-sub {
  margin-top: 3px;
  font-size: 12.5px;
  font-weight: 500;
  color: #77879d;
  line-height: 1.35;
}

body.dashboard-theme .dash-overview-kpi-value {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  line-height: 1;
  min-width: 112px;
  text-align: right;
}

body.dashboard-theme .dash-overview-kpi.is-payment .dash-overview-kpi-value {
  color: #2a4eb8;
}

body.dashboard-theme .dash-overview-kpi.is-due .dash-overview-kpi-value {
  color: #8b5d09;
}

body.dashboard-theme .dash-overview-kpi.is-cash .dash-overview-kpi-value {
  color: #14794d;
}

body.dashboard-theme .dash-list-card .dash-card-head {
  padding: 20px 26px 16px;
}

body.dashboard-theme .dash-list-body {
  padding: 2px 26px 8px;
  display: block;
}

body.dashboard-theme .dash-pay-head {
  display: grid;
  grid-template-columns: 1.6fr 0.9fr 0.85fr 1fr 0.85fr 40px;
  gap: 14px;
  padding: 12px 26px 10px;
  border-bottom: 1px solid #e8edf5;
}

body.dashboard-theme .dash-pay-head span {
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: #7e8aa0;
}

body.dashboard-theme .dash-list-pay {
  padding: 2px 26px 8px;
}

body.dashboard-theme .dash-pay-row {
  display: grid;
  grid-template-columns: 1.6fr 0.9fr 0.85fr 1fr 0.85fr 40px;
  align-items: center;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid #e8edf5;
  border-radius: 0;
  background: transparent;
  transition: none;
}

body.dashboard-theme .dash-pay-row:last-child,
body.dashboard-theme .dash-enroll-row:last-child {
  border-bottom: none;
}

body.dashboard-theme .dash-pay-student {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

body.dashboard-theme .dash-user-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #edf3ff;
  color: #3f5fbf;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

body.dashboard-theme .dash-row-main {
  flex: 1;
  min-width: 0;
}

body.dashboard-theme .dash-row-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #0f172a;
}

body.dashboard-theme .dash-row-sub {
  font-size: 14px;
  font-weight: 500;
  color: #6f7f96;
  margin-top: 3px;
}

body.dashboard-theme .dash-pay-method {
  justify-self: start;
}

body.dashboard-theme .dash-method-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  color: #3354a8;
  background: #edf3ff;
}

body.dashboard-theme .dash-pay-collector {
  font-size: 14.5px;
  font-weight: 600;
  color: #1f2a3d;
}

body.dashboard-theme .dash-value {
  font-size: 16px;
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  min-width: 0;
  text-align: left;
  justify-self: start;
}

body.dashboard-theme .status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  border: 1px solid transparent;
  line-height: 1.2;
  white-space: nowrap;
  text-transform: none;
  box-shadow: none;
  width: fit-content;
}

body.dashboard-theme .status-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 999px;
  box-shadow: none;
}

body.dashboard-theme .status-pill.paid {
  background: #e8f6ef;
  color: #14794d;
  border-color: rgba(20, 121, 77, 0.2);
}

body.dashboard-theme .status-pill.paid::before { background: #14794d; }

body.dashboard-theme .status-pill.pending {
  background: #fff3df;
  color: #8b5d09;
  border-color: rgba(139, 93, 9, 0.22);
}

body.dashboard-theme .status-pill.pending::before { background: #8b5d09; }

body.dashboard-theme .status-pill.cancelled {
  background: #fdeceb;
  color: #aa3131;
  border-color: rgba(170, 49, 49, 0.2);
}

body.dashboard-theme .status-pill.cancelled::before { background: #aa3131; }

body.dashboard-theme .dash-pay-row .status-pill,
body.dashboard-theme .dash-enroll-row .status-pill {
  justify-self: start;
}

body.dashboard-theme .dash-enroll-head {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr 0.9fr 0.8fr 40px;
  gap: 14px;
  padding: 12px 26px 10px;
  border-top: 0;
  border-bottom: 1px solid #e8edf5;
  background: transparent;
}

body.dashboard-theme .dash-enroll-head span {
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: #7e8aa0;
}

body.dashboard-theme .dash-list-enroll {
  padding: 2px 26px 8px;
  display: block;
}

body.dashboard-theme .dash-enroll-row {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr 0.9fr 0.8fr 40px;
  gap: 14px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid #e8edf5;
  border-radius: 0;
  background: transparent;
  transition: none;
}

body.dashboard-theme .dash-enroll-user {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

body.dashboard-theme .dash-enroll-course {
  font-size: 15px;
  font-weight: 600;
  color: #1f2a3d;
}

body.dashboard-theme .dash-enroll-date {
  font-size: 14px;
  font-weight: 500;
  color: #6f7f96;
}

body.dashboard-theme .dash-open-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #66758e;
  border: 0;
  background: #f1f5fb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: none;
}

body.dashboard-theme .dash-open-btn:hover {
  background: #f1f5fb;
  color: #66758e;
}

@media (max-width: 1240px) {
  body.dashboard-theme .dash-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.dashboard-theme .dash-top-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  body.dashboard-theme .main-content.dashboard-shell {
    padding: 24px 20px;
    gap: 16px;
  }

  body.dashboard-theme .dash-header {
    padding: 18px;
    flex-direction: column;
    align-items: flex-start;
  }

  body.dashboard-theme .dash-header h1 {
    font-size: 28px;
  }

  body.dashboard-theme .dash-header-actions {
    width: 100%;
  }
}

@media (max-width: 720px) {
  body.dashboard-theme .dash-metrics {
    grid-template-columns: 1fr;
  }

  body.dashboard-theme .dash-overview-minimal {
    padding: 8px 16px 14px;
  }

  body.dashboard-theme .dash-overview-kpi {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px 12px;
  }

  body.dashboard-theme .dash-overview-kpi-value {
    grid-column: 2 / 3;
    min-width: 0;
    text-align: left;
    font-size: 21px;
  }

  body.dashboard-theme .dash-pay-head,
  body.dashboard-theme .dash-list-body,
  body.dashboard-theme .dash-list-enroll {
    padding: 2px 16px 8px;
  }

  body.dashboard-theme .dash-pay-head,
  body.dashboard-theme .dash-enroll-head {
    display: none;
  }

  body.dashboard-theme .dash-pay-row {
    grid-template-columns: 1fr auto;
    padding: 16px 0;
    gap: 7px 12px;
  }

  body.dashboard-theme .dash-pay-method,
  body.dashboard-theme .dash-pay-row .dash-value,
  body.dashboard-theme .dash-pay-collector {
    grid-column: 1 / 2;
  }

  body.dashboard-theme .dash-pay-row .status-pill {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    justify-self: end;
  }

  body.dashboard-theme .dash-pay-row .dash-open-btn {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    justify-self: end;
  }

  body.dashboard-theme .dash-enroll-row {
    grid-template-columns: 1fr auto;
    padding: 16px 0;
    gap: 6px 12px;
  }

  body.dashboard-theme .dash-enroll-course,
  body.dashboard-theme .dash-enroll-date {
    grid-column: 1 / 2;
  }

  body.dashboard-theme .dash-enroll-row .status-pill {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    justify-self: end;
  }

  body.dashboard-theme .dash-open-btn {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    justify-self: end;
  }
}

/* ============================================================
   DASHBOARD — clean rewrite
   ============================================================ */

/* Header */
.db-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-bottom: 20px;
}
.db-title {
  font-family: var(--font-head);
  font-size: 32px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.01em;
  line-height: 1.15;
}
.db-subtitle {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 4px;
}

/* KPI Grid */
.db-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

/* 3-column KPI Grid (for Parrainage) */
.db-kpi-grid-3 {
  grid-template-columns: repeat(3, 1fr) !important;
}
.db-kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 20px 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.db-kpi-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 2px 16px rgba(0,0,0,0.05);
}
.db-kpi-body {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.db-kpi-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.db-kpi-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.db-kpi-value small {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
}
.db-kpi-trend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
}
.db-kpi-trend.up   { color: var(--green); }
.db-kpi-trend.down { color: var(--red); }

.db-kpi-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.db-kpi-icon.gold  { background: linear-gradient(135deg,#d4a84b,#b8892a); color:#fff; }
.db-kpi-icon.blue  { background: linear-gradient(135deg,#5a8fd4,#3d72bc); color:#fff; }
.db-kpi-icon.green { background: linear-gradient(135deg,#3dbf7a,#2e9e68); color:#fff; }
.db-kpi-icon.rose  { background: linear-gradient(135deg,#f87171,#dc2626); color:#fff; }

/* Mid grid */
.db-mid-grid {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

/* Shared card */
.db-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.db-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--border);
}
.db-card-title {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.01em;
}
.db-card-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}
.db-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 2px;
}
.db-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
}
.db-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Chart */
.db-chart-wrap {
  padding: 16px 16px 6px;
  overflow: hidden;
}

/* Ops card */
.db-ops-card {
  display: flex;
  flex-direction: column;
}
.db-ops-ring-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px 16px;
}
.db-ops-ring-info {}
.db-ops-ring-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.db-ops-ring-sub {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
}
.db-ops-divider {
  height: 1px;
  background: var(--border);
  margin: 0 22px;
}
.db-ops-stats {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 8px 0 4px;
}
.db-ops-stat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.db-ops-stat:last-child { border-bottom: none; }
.db-ops-stat:hover { background: var(--surface2); }
.db-ops-stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.db-ops-stat-icon.gold  { background: rgba(184,137,42,0.10); color: var(--gold); }
.db-ops-stat-icon.blue  { background: rgba(61,114,188,0.10); color: var(--blue); }
.db-ops-stat-icon.green { background: rgba(46,158,104,0.10); color: var(--green); }
.db-ops-stat-icon.rose  { background: rgba(196,78,78,0.10);  color: var(--red); }
.db-ops-stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 3px;
}
.db-ops-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.db-ops-stat-value span {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
  margin-left: 3px;
}
.db-ops-stat-note {
  font-size: 11px;
  color: var(--muted2);
  margin-top: 3px;
  line-height: 1.4;
}

/* Table cards */
.db-table-card {
  margin-bottom: 20px;
}
.db-see-all {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.db-see-all:hover { background: var(--surface2); color: var(--text); }

.db-table-wrap { overflow-x: auto; }

.db-table-head {
  display: grid;
  gap: 0 20px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--border);
}
.db-table-head span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted2);
  white-space: nowrap;
}

.db-table-row {
  display: grid;
  gap: 0 20px;
  align-items: center;
  padding: 17px 28px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.db-table-row:last-child { border-bottom: none; }
.db-table-row:hover { background: var(--surface2); }

.db-row-user {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}
.db-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.db-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 50%;
}
.db-row-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.db-row-meta {
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  margin-top: 2px;
}
.db-row-text {
  font-size: 14px;
  color: var(--text);
  align-self: center;
  font-weight: 500;
}
.db-row-collector {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  align-self: center;
  white-space: nowrap;
}
.db-amount {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  align-self: center;
}

/* Method tag */
.db-method-tag {
  justify-self: start;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 8px;
  padding: 5px 12px;
  white-space: nowrap;
  line-height: 1;
}
.db-method-virement {
  color: var(--blue);
  background: rgba(61,114,188,0.09);
  border: 1px solid rgba(61,114,188,0.15);
}
.db-method-especes {
  color: var(--green);
  background: rgba(46,158,104,0.09);
  border: 1px solid rgba(46,158,104,0.15);
}

/* Status pills — fixed width problem: justify-self start */
.db-status-pill {
  justify-self: start;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  padding: 5px 12px;
  white-space: nowrap;
  line-height: 1;
}
.db-status-pill::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.db-status-paid      { color: var(--green); background: rgba(46,158,104,0.10); }
.db-status-paid::before    { background: var(--green); }
.db-status-pending   { color: var(--gold);  background: rgba(184,137,42,0.10); }
.db-status-pending::before { background: var(--gold); }
.db-status-cancelled { color: var(--red);   background: rgba(196,78,78,0.10); }
.db-status-cancelled::before { background: var(--red); }

/* Action buttons container */
.db-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  align-self: center;
  justify-self: center;
}

/* Base action button style */
.db-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

/* View action - Blue */
.db-action-view {
  color: var(--blue);
  background: rgba(61,114,188,0.08);
}
.db-action-view:hover {
  background: rgba(61,114,188,0.15);
  color: var(--blue);
}

/* Edit action - Gold */
.db-action-edit {
  color: var(--gold);
  background: rgba(184,137,42,0.08);
}
.db-action-edit:hover {
  background: rgba(184,137,42,0.15);
  color: var(--gold);
}

/* Delete action - Red */
.db-action-delete {
  color: #c44e4e;
  background: rgba(196,78,78,0.08);
}
.db-action-delete:hover {
  background: rgba(196,78,78,0.15);
  color: #c44e4e;
}

/* arrow-right icon fallback */
.db-see-all svg { flex-shrink: 0; }

/* ── Parrainage Page Styling ────────────────────────────────── */

/* Sponsor Cards */
.sponsor-card {
  padding: 14px;
  background: var(--surface);
  border-radius: 12px;
  transition: all 0.15s ease;
}

.sponsor-card:hover {
  background: var(--surface2);
}

/* Leaderboard Section */
.leaderboard-section {
  margin-top: 28px;
}

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

.leaderboard-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.leaderboard-card:hover {
  background: var(--surface2);
  border-color: var(--gold);
}

.medal-badge {
  font-size: 32px;
  line-height: 1;
}

.leaderboard-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  line-height: 1.2;
}

.leaderboard-count {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.leaderboard-balance {
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
  margin: 4px 0 0;
}

/* Responsive */
@media (max-width: 1100px) {
  .db-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .db-kpi-grid-3 { grid-template-columns: repeat(2, 1fr) !important; }
  .db-mid-grid { grid-template-columns: 1fr; }
  .leaderboard-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .db-kpi-grid { grid-template-columns: 1fr; }
  .db-kpi-grid-3 { grid-template-columns: 1fr !important; }
  .leaderboard-grid { grid-template-columns: 1fr; }
}

/* ── Payment Tracker ───────────────────────────────── */
.db-tracker-wrap { overflow-x: auto; }

.db-tracker-head,
.db-tracker-row {
  display: grid;
  grid-template-columns: 2.2fr repeat(5, 72px) 130px;
  align-items: center;
  padding: 0 28px;
  gap: 0;
}

.db-tracker-head {
  padding-top: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.db-tracker-head span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted2);
}

.db-tracker-month {
  text-align: center;
}

.db-tracker-row {
  padding-top: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.db-tracker-row:last-child { border-bottom: none; }
.db-tracker-row:hover { background: var(--surface2); }

.db-tracker-student-col { min-width: 0; }

.db-tracker-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Dot status */
.db-track-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.db-track-paid   { background: rgba(46,158,104,0.12); color: var(--green); }
.db-track-late   { background: rgba(184,137,42,0.12); color: var(--gold); }
.db-track-unpaid { background: rgba(196,78,78,0.10);  color: var(--red); }

/* Rate bar */
.db-tracker-rate-col {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 8px;
}
.db-track-bar-wrap {
  flex: 1;
  height: 6px;
  background: var(--surface2);
  border-radius: 99px;
  overflow: hidden;
}
.db-track-bar {
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s ease;
}
.db-track-pct {
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  min-width: 36px;
  text-align: right;
}

/* ═══════════════════════════════════════════════════════════
   Nouvelle Inscription — nreg-* components
   ═══════════════════════════════════════════════════════════ */

/* Layout */
.nreg-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
  min-width: 0;
}

.nreg-col-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.nreg-col-side  { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 28px; min-width: 0; }

/* Section card */
.nreg-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 28px;
  min-width: 0;
}

.nreg-section-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted2);
  margin-bottom: 20px;
}
.nreg-section-label svg { flex-shrink: 0; }

/* Grid helpers */
.nreg-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.nreg-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.nreg-duration-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 145px;
  gap: 10px;
}
.nreg-grid-2 + .nreg-grid-2,
.nreg-grid-2 + .nreg-grid-3,
.nreg-grid-3 + .nreg-grid-2,
.nreg-grid-3 + .nreg-grid-3 {
  margin-top: 16px;
}

/* Optional badge */
.nreg-optional {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted2);
  letter-spacing: 0;
  text-transform: none;
}
.req { color: var(--gold); }

.nreg-path-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.nreg-path-card {
  width: 100%;
  border: 1.5px solid var(--border);
  background: linear-gradient(180deg, #fcfaf7 0%, #f6f1e8 100%);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}
.nreg-path-card:hover {
  border-color: rgba(184,137,42,0.34);
  background: linear-gradient(180deg, #fffdf8 0%, #f7f1e6 100%);
  transform: translateY(-1px);
}
.nreg-path-card.is-active {
  border-color: rgba(184,137,42,0.46);
  background: linear-gradient(180deg, rgba(184,137,42,0.12) 0%, rgba(184,137,42,0.04) 100%);
  box-shadow: 0 10px 26px rgba(184,137,42,0.10);
}
.nreg-path-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9a7121;
  background: rgba(184,137,42,0.12);
  flex-shrink: 0;
}
.nreg-path-card.is-active .nreg-path-icon {
  background: rgba(184,137,42,0.18);
  color: #7f5a18;
}
.nreg-path-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.nreg-path-copy strong {
  font-size: 14px;
  line-height: 1.25;
  color: var(--text);
  font-weight: 700;
}
.nreg-path-copy small {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

/* Radio group */
.nreg-radio-group {
  display: flex;
  gap: 10px;
}
.nreg-radio {
  display: flex;
  align-items: center;
  cursor: pointer;
  flex: 1;
}
.nreg-radio input[type=radio] { display: none; }
.nreg-radio span {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  width: 100%;
  border-radius: 9px;
  border: 1.5px solid var(--border);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  background: var(--bg);
}
.nreg-radio input[type=radio]:checked + span {
  border-color: var(--gold);
  background: rgba(184,137,42,0.07);
  color: var(--text);
  font-weight: 600;
}

/* Upload boxes */
.nreg-upload-box {
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: center;
  background: var(--bg);
  position: relative;
}
.nreg-upload-box:hover,
.nreg-upload-box.drag-over {
  border-color: var(--gold);
  background: rgba(184,137,42,0.04);
}
.nreg-upload-box.has-file {
  border-color: var(--green);
  background: rgba(46,158,104,0.04);
}
.nreg-upload-icon { color: var(--muted2); display: flex; }
.nreg-upload-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}
.nreg-upload-sub {
  font-size: 11.5px;
  color: var(--muted2);
  margin: 0;
}
.nreg-upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  pointer-events: none; /* handled via JS click */
}

/* Payment mode toggle */
.nreg-pay-toggle {
  display: inline-flex;
  background: var(--surface2);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
  margin-bottom: 20px;
}
.nreg-pay-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.nreg-pay-btn.active {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
}

/* Calc display (read-only value boxes) */
.nreg-calc-display {
  height: 42px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface2);
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.nreg-calc-total {
  color: var(--gold);
  background: rgba(184,137,42,0.06);
  border-color: rgba(184,137,42,0.2);
}

#cycleNote {
  margin-top: 12px;
}

/* Toggle switch (parrainage) */
.nreg-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nreg-toggle-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 2px;
}
.nreg-toggle-sub {
  font-size: 12.5px;
  color: var(--muted2);
  margin: 0;
}

.nreg-switch { position: relative; display: inline-flex; flex-shrink: 0; cursor: pointer; }
.nreg-switch input { display: none; }
.nreg-switch-track {
  width: 44px;
  height: 24px;
  border-radius: 99px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  transition: background 0.2s, border-color 0.2s;
  position: relative;
}
.nreg-switch-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--muted2);
  transition: transform 0.2s, background 0.2s;
}
.nreg-switch input:checked + .nreg-switch-track {
  background: var(--gold);
  border-color: var(--gold);
}
.nreg-switch input:checked + .nreg-switch-track::after {
  transform: translateX(20px);
  background: #fff;
}

/* Source chips */
.nreg-source-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.nreg-source-chip {
  cursor: pointer;
  display: flex;
}
.nreg-source-chip input[type=radio] { display: none; }
.nreg-source-chip span {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  width: 100%;
  border-radius: 9px;
  border: 1.5px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: var(--bg);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  white-space: normal;
}
.nreg-source-chip input[type=radio]:checked + span {
  border-color: var(--gold);
  background: rgba(184,137,42,0.07);
  color: var(--text);
  font-weight: 600;
}
.nreg-source-chip span:hover {
  border-color: rgba(184,137,42,0.4);
}

/* Summary card */
.nreg-summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  min-width: 0;
}
.nreg-summary-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}
.nreg-summary-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted2);
}
.nreg-summary-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nreg-summary-empty {
  font-size: 13px;
  color: var(--muted2);
  text-align: center;
  padding: 12px 0;
  margin: 0;
}
.nreg-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
}
.nreg-summary-row span { color: var(--muted); }
.nreg-summary-row strong { color: var(--text); font-weight: 600; text-align: right; }

/* Credentials card */
.nreg-creds-card { /* inherits nreg-section */ }

.nreg-input-readonly {
  height: 42px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-body);
  letter-spacing: 0;
}

@media (max-width: 720px) {
  .nreg-path-grid {
    grid-template-columns: 1fr;
  }
}
.nreg-readonly-hint {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted2);
  font-family: var(--font-body);
  letter-spacing: 0;
  white-space: normal;
  text-align: right;
}

.nreg-creds-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  min-width: 0;
}
.nreg-creds-row .btn-sm {
  padding: 0 12px;
  height: 42px;
  flex-shrink: 0;
  min-width: 110px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 600;
}

#displayPassword {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.nreg-creds-note {
  margin: 12px 0 0;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted2);
}

/* Actions */
.nreg-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nreg-submit-form {
  position: relative;
}

.nreg-submit-scope {
  transition: filter 0.22s ease, opacity 0.22s ease;
}

.nreg-submit-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(247, 244, 239, 0.46);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 220;
}

.nreg-submit-overlay-card {
  min-width: 250px;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  padding: 22px 22px 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(184, 137, 42, 0.18);
}

.nreg-submit-overlay-card strong {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}

.nreg-submit-overlay-card span:last-child {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.nreg-submit-overlay-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(184, 137, 42, 0.18);
  border-top-color: var(--gold);
  animation: nreg-submit-spin 0.75s linear infinite;
}

.nreg-submit-form.is-submitting .nreg-submit-scope {
  filter: blur(2.5px);
  opacity: 0.82;
  pointer-events: none;
  user-select: none;
}

.nreg-submit-form.is-submitting .nreg-submit-overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nreg-submit-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
}

.nreg-submit-default,
.nreg-submit-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.18s ease;
}

.nreg-submit-loading {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.nreg-submit-btn.is-loading {
  cursor: wait;
  opacity: 0.96;
}

.nreg-submit-btn.is-loading .nreg-submit-default {
  opacity: 0;
}

.nreg-submit-btn.is-loading .nreg-submit-loading {
  opacity: 1;
}

.nreg-submit-btn:disabled {
  pointer-events: none;
}

.nreg-submit-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-top-color: #fff;
  animation: nreg-submit-spin 0.7s linear infinite;
}

@keyframes nreg-submit-spin {
  to { transform: rotate(360deg); }
}

/* Page breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted2);
  margin-bottom: 8px;
}
.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}
.breadcrumb a:hover { color: var(--text); }
.breadcrumb-sep { display: flex; align-items: center; color: var(--muted2); }

/* Page heading */
.page-heading { margin-bottom: 28px; }
.page-heading h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
}
.page-heading p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

/* ── Parrain student picker ──────────────────────────── */
.nreg-picker { position: relative; z-index: 40; }
.nreg-picker.open { z-index: 1200; }

.nreg-picker-input-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  background: var(--bg);
  padding: 0 12px;
  gap: 8px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.nreg-picker.open .nreg-picker-input-wrap,
.nreg-picker-input-wrap:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184,137,42,0.10);
}
.nreg-picker-search-icon { color: var(--muted2); display: flex; flex-shrink: 0; }
.nreg-picker-search {
  flex: 1;
  height: 42px;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: var(--text);
}
.nreg-picker-search::placeholder { color: var(--muted2); }
.nreg-picker-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted2);
  padding: 2px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.nreg-picker-clear:hover { color: var(--text); background: var(--surface2); }

/* Dropdown list */
.nreg-picker-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
  z-index: 1300;
  max-height: 264px;
  overflow-y: auto;
  padding: 6px;
}
.nreg-picker-option {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s;
}
.nreg-picker-option:hover,
.nreg-picker-option.highlighted {
  background: var(--surface2);
}
.nreg-picker-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(184,137,42,0.18), rgba(184,137,42,0.08));
  color: var(--gold);
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.03em;
}
.nreg-picker-name {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.nreg-picker-tel {
  font-size: 12.5px;
  color: var(--muted2);
  font-family: 'SF Mono', ui-monospace, monospace;
}
.nreg-picker-empty {
  padding: 14px 12px;
  font-size: 13.5px;
  color: var(--muted2);
  text-align: center;
}

/* Selected state card */
.nreg-picker-selected {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid rgba(184,137,42,0.3);
  background: rgba(184,137,42,0.05);
}
.nreg-picker-sel-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(184,137,42,0.22), rgba(184,137,42,0.10));
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nreg-picker-sel-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.nreg-picker-sel-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.nreg-picker-sel-tel {
  font-size: 12.5px;
  color: var(--muted2);
  font-family: 'SF Mono', ui-monospace, monospace;
}
.nreg-picker-sel-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted2);
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: color 0.15s, background 0.15s;
}
.nreg-picker-sel-remove:hover { color: var(--red); background: rgba(196,78,78,0.08); }

/* Responsive */
@media (max-width: 1100px) {
  .nreg-layout {
    grid-template-columns: 1fr;
  }
  .nreg-col-side {
    position: static;
  }
}
@media (max-width: 860px) {
  .page-heading {
    margin-bottom: 22px;
  }

  .page-heading h1 {
    font-size: 20px;
  }

  .nreg-section {
    padding: 20px 18px;
  }

  .nreg-grid-3 {
    grid-template-columns: 1fr;
  }

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

  .nreg-source-grid {
    grid-template-columns: 1fr 1fr;
  }

  .nreg-toggle-row,
  .nreg-creds-row {
    flex-direction: column;
    align-items: stretch;
  }

  .nreg-creds-row .btn-sm {
    min-width: 0;
    width: 100%;
  }

  .nreg-actions {
    width: 100%;
  }
}
@media (max-width: 680px) {
  .nreg-grid-2 { grid-template-columns: 1fr; }
  .nreg-grid-3 { grid-template-columns: 1fr; }
  .nreg-duration-control { grid-template-columns: 1fr; }
  .nreg-source-grid { grid-template-columns: 1fr; }

  .nreg-radio-group {
    flex-direction: column;
  }

  .nreg-upload-box {
    padding: 18px 12px;
  }
}

/* ═══════════════════════════════════════════════════════════
   Programme page — premium viz chart
   ═══════════════════════════════════════════════════════════ */

.prog-viz-card { overflow: hidden; }

.prog-viz-wrap { padding: 28px 32px; }

/* Header */
.prog-viz-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.prog-viz-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}
.prog-viz-sub {
  font-size: 13px;
  color: var(--muted2);
}

/* Legend */
.prog-viz-legend {
  display: flex;
  align-items: center;
  gap: 20px;
}
.prog-viz-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted2);
}
.prog-viz-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  font-style: normal;
  flex-shrink: 0;
}

/* SVG */
.prog-viz-svg-wrap { overflow-x: auto; }
.prog-viz-svg {
  width: 100%;
  min-width: 320px;
  height: auto;
  display: block;
  margin-bottom: 6px;
}

/* Stats footer — 4-cell grid separated by 1px lines */
.prog-viz-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 20px;
}
.prog-viz-stat {
  background: var(--surface);
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.prog-viz-stat span {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted2);
}
.prog-viz-stat strong {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}
.prog-viz-stat em {
  font-style: normal;
  font-size: 12px;
  color: var(--muted2);
}
.prog-viz-stat-of {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted2);
}
.prog-viz-stat--gold strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.3;
}

@media (max-width: 860px) {
  .prog-viz-stats { grid-template-columns: repeat(2, 1fr); }
  .prog-viz-wrap  { padding: 20px; }
}

/* ============================================================
   PARRAINAGE — par-*
   ============================================================ */
body.parrainage-page .db-header {
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 28px;
}

.par-ledger-card,
.par-reward-section,
.par-milestones {
  margin-bottom: 22px;
}

.par-ledger-head {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(180px, 0.92fr) minmax(150px, 0.72fr) 290px;
  gap: 18px;
  padding: 12px 26px 10px;
  border-bottom: 1px solid var(--border);
}

.par-ledger-head span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted2);
  text-align: left;
}

.par-ledger-head-balance,
.par-ledger-head-count,
.par-ledger-balance,
.par-ledger-count {
  justify-self: start;
  width: 100%;
}

.par-ledger-head-actions {
  justify-self: end;
}

.par-ledger-body {
  display: flex;
  flex-direction: column;
}

.par-ledger-row {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(180px, 0.92fr) minmax(150px, 0.72fr) 290px;
  gap: 18px;
  align-items: center;
  padding: 18px 26px;
  border-bottom: 1px solid var(--border);
}

.par-ledger-row:last-child {
  border-bottom: none;
}

.par-ledger-person {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.par-ledger-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #ece8e1;
  border: 1px solid rgba(0,0,0,0.06);
}

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

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

.par-ledger-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.par-ledger-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.par-ledger-sub {
  font-size: 12.5px;
  color: var(--muted);
}

.par-ledger-balance,
.par-ledger-count {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.par-ledger-balance strong,
.par-ledger-count strong {
  font-size: 18px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.par-ledger-balance span,
.par-ledger-count span {
  font-size: 12px;
  color: var(--muted);
}

.par-ledger-balance strong {
  color: var(--gold);
}

.par-ledger-count-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(61,114,188,0.10);
  color: var(--blue) !important;
  border: 1px solid rgba(61,114,188,0.12);
}

.par-ledger-count-pill svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.par-ledger-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.par-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 12.5px;
  font-weight: 700;
  transition: all 0.18s ease;
}

.par-action-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.par-action-btn.is-view {
  color: #2e62af;
  background: rgba(61,114,188,0.10);
  border-color: rgba(61,114,188,0.12);
}

.par-action-btn.is-view:hover {
  background: rgba(61,114,188,0.15);
}

.par-action-btn.is-balance {
  color: var(--gold);
  background: rgba(184,137,42,0.10);
  border-color: rgba(184,137,42,0.14);
}

.par-action-btn.is-balance:hover {
  background: rgba(184,137,42,0.15);
}

.par-reward-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 14px 22px 22px;
}

.par-reward-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #faf8f4 100%);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.par-reward-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.par-reward-card-main {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.par-reward-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(184,137,42,0.10);
  color: var(--gold);
  flex-shrink: 0;
}

.par-reward-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.par-icon-action {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  transition: all 0.18s ease;
}

.par-icon-action svg {
  width: 14px;
  height: 14px;
}

.par-icon-action.is-edit {
  color: #2e62af;
  background: rgba(61,114,188,0.10);
  border-color: rgba(61,114,188,0.12);
}

.par-icon-action.is-edit:hover {
  background: rgba(61,114,188,0.16);
}

.par-icon-action.is-delete {
  color: #b64242;
  background: rgba(196,78,78,0.10);
  border-color: rgba(196,78,78,0.12);
}

.par-icon-action.is-delete:hover {
  background: rgba(196,78,78,0.16);
}

.par-reward-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.par-reward-desc {
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
}

.par-reward-amount-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.par-reward-amount-item span {
  font-size: 12px;
  color: var(--muted);
}

.par-reward-amount-item strong {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.par-milestones-head {
  margin-bottom: 14px;
}

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

.par-milestone-card {
  background: linear-gradient(180deg, #ffffff 0%, #faf9f6 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
}

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

.par-medal-chip,
.par-milestone-rank {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
}

.par-medal-chip.is-gold {
  background: rgba(184,137,42,0.12);
  color: var(--gold);
}

.par-medal-chip.is-silver {
  background: rgba(125,136,156,0.12);
  color: #66748c;
}

.par-medal-chip.is-bronze {
  background: rgba(167,102,58,0.12);
  color: #9a5b2d;
}

.par-medal-chip.is-slate {
  background: rgba(61,114,188,0.10);
  color: var(--blue);
}

.par-milestone-rank {
  background: #f4f1eb;
  color: var(--muted);
}

.par-milestone-user {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}

.par-milestone-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.par-milestone-sub {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--muted);
}

.par-milestone-stats {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.par-milestone-stats div {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.par-milestone-stats span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted2);
  margin-bottom: 5px;
}

.par-milestone-stats strong {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

.par-modal {
  max-width: 980px;
}

.par-detail-modal {
  max-width: 1080px;
}

.par-detail-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.par-detail-summary article {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #faf8f4;
  padding: 14px 16px;
}

.par-detail-summary span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted2);
  margin-bottom: 6px;
}

.par-detail-summary strong {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.par-detail-head,
.par-detail-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.1fr) 120px 110px 92px;
  gap: 14px;
  align-items: center;
}

.par-detail-head {
  padding: 10px 16px 12px;
  border-bottom: 1px solid var(--border);
}

.par-detail-head span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted2);
}

.par-detail-row {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.par-detail-row:last-child {
  border-bottom: none;
}

.par-detail-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.par-detail-main strong,
.par-detail-programme,
.par-detail-prime {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.par-detail-main small,
.par-detail-date {
  font-size: 12px;
  color: var(--muted);
}

.par-detail-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(46,158,104,0.10);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
}

.par-adjustments-block {
  margin-top: 20px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.par-adjustments-head h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.par-adjustments-head p {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--muted);
}

.par-adjustments-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.par-adjustment-row,
.par-adjustment-empty {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #faf8f4;
  padding: 13px 14px;
}

.par-adjustment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.par-adjustment-row strong {
  display: block;
  font-size: 13px;
  color: var(--text);
}

.par-adjustment-row small,
.par-adjustment-empty {
  font-size: 12px;
  color: var(--muted);
}

.par-adjustment-row span {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
}

.par-balance-current {
  border: 1px solid rgba(184,137,42,0.14);
  background: rgba(184,137,42,0.08);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 18px;
}

.par-balance-current span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin-bottom: 6px;
}

.par-balance-current strong {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.par-balance-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.par-balance-option {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.par-balance-option input {
  display: none;
}

.par-balance-option.is-active {
  border-color: rgba(61,114,188,0.16);
  background: #f8fbff;
}

.par-balance-option-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(61,114,188,0.10);
  color: var(--blue);
}

.par-balance-option strong {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

.par-balance-option small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.par-balance-note {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 1100px) {
  .par-ledger-head,
  .par-ledger-row {
    grid-template-columns: minmax(0, 1fr) minmax(170px, 0.8fr);
  }

  .par-ledger-head span:nth-child(3),
  .par-ledger-head span:nth-child(4) {
    display: none;
  }

  .par-ledger-count,
  .par-ledger-actions {
    grid-column: 1 / -1;
  }

  .par-reward-grid,
  .par-milestones-grid,
  .par-detail-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body.parrainage-page .db-card-head,
  .par-milestones-head {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .par-reward-add {
    align-self: flex-start;
  }

  .par-ledger-head {
    display: none;
  }

  .par-ledger-row,
  .par-reward-grid,
  .par-milestones-grid,
  .par-detail-summary {
    grid-template-columns: 1fr;
  }

  .par-ledger-row {
    padding: 16px 18px;
  }

  .par-ledger-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .par-action-btn {
    width: 100%;
    justify-content: center;
  }

  .par-reward-actions {
    align-self: flex-start;
  }

  .par-detail-head {
    display: none;
  }

  .par-detail-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* ============================================================
   FORMATIONS — frm-*
   ============================================================ */
.frm-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.frm-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow 0.18s, transform 0.18s;
}
.frm-card:hover {
  box-shadow: 0 6px 28px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

/* top strip */
.frm-card-top {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 18px 0;
}

.frm-card-top-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.frm-card-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 2px var(--border);
}

.frm-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}
.frm-badge-ongoing {
  background: rgba(46,158,104,0.12);
  color: #1a7a4a;
}
.frm-badge-ongoing .badge-dot { background: #2e9e68; }
.frm-badge-done {
  background: rgba(109,102,97,0.1);
  color: var(--muted);
}
.frm-badge-done .badge-dot { background: var(--muted); }

.frm-card-days {
  min-width: 72px;
  padding: 10px 12px 8px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fbf7ee 0%, #f5efe4 100%);
  border: 1px solid rgba(184,137,42,0.14);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--gold-light);
}

.frm-card-days strong {
  display: block;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--text);
}

.frm-card-days small {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-light);
}

/* body */
.frm-card-body {
  padding: 12px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.frm-card-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.frm-card-code {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.frm-card-formation {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  margin-top: 4px;
}

.frm-card-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--muted);
}

.frm-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.frm-card-meta svg {
  flex-shrink: 0;
  color: var(--gold-light);
}

.frm-card-period {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 10px 12px;
  background: var(--surface2);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.frm-period-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.frm-period-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-weight: 700;
}

.frm-period-row strong {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}

.frm-period-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
  flex-shrink: 0;
}

.frm-card-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 4px;
}
.frm-card-hint.is-ongoing { color: #1a7a4a; }
.frm-card-hint.is-done    { color: var(--muted); }

/* footer */
.frm-card-foot {
  padding: 12px 18px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
}

.frm-card-foot form {
  display: flex;
  margin: 0;
}

/* empty state */
.frm-empty {
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 48px 24px;
  color: var(--muted);
  text-align: center;
}
.frm-empty strong { font-size: 15px; color: var(--text); }
.frm-empty span   { font-size: 12.5px; }
.frm-empty .btn { margin-top: 6px; }

@media (max-width: 1280px) {
  .frm-cards-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .frm-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .frm-cards-grid { grid-template-columns: 1fr; }
}

.pay-hidden {
  display: none !important;
}

/* ============================================================
   PAIEMENTS — pay-*
   ============================================================ */

/* Paiements page: no top header, give main more room */
body.paiements-page .main-content {
  padding-top: 32px;
}

.pay-filter-card,
.pay-ledger-card {
  overflow: hidden;
}

.pay-filter-card {
  margin-bottom: 18px;
}

.pay-filter-card .card-body {
  padding: 18px 22px;
}

.pay-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  min-width: 1180px;
}

.pay-search {
  flex: 1 1 420px;
}

.pay-select {
  min-width: 185px;
  flex: 0 0 185px;
}

.pay-table-wrap {
  padding-bottom: 10px;
  overflow-x: auto;
}

.pay-table-head {
  padding-top: 12px;
  padding-bottom: 12px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.pay-table-head span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted2);
}

.pay-row:last-child {
  border-bottom: none;
}

.pay-payer {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.pay-payer-cell,
.pay-source-cell,
.pay-payment-cell,
.pay-trace-cell,
.pay-date-cell {
  min-width: 0;
}

.pay-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  overflow: hidden;
  background: #ece8e1;
  border: 1px solid rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

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

.pay-avatar.is-generic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(184, 137, 42, 0.18), rgba(122, 80, 16, 0.10));
  color: var(--gold-light);
}

.pay-payer-copy {
  min-width: 0;
}

.pay-payer-copy strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.pay-payer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 5px;
}

.pay-mini {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.pay-mini svg {
  color: var(--gold-light);
  flex-shrink: 0;
}

.pay-payment-cell,
.pay-source-cell,
.pay-trace-cell,
.pay-date-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.pay-payment-cell small,
.pay-source-cell small,
.pay-date-cell span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.pay-payment-cell .db-amount {
  font-size: 16px;
  line-height: 1;
  white-space: nowrap;
}

.pay-payment-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pay-payment-cell .db-method-tag {
  min-height: 30px;
  padding: 0 10px;
}

.pay-source-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pay-source-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pay-source-programme {
  background: rgba(61, 114, 188, 0.09);
  color: var(--blue);
}

.pay-source-formation {
  background: rgba(184, 137, 42, 0.10);
  color: var(--gold-light);
}

.pay-source-autre {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text);
}

.pay-source-cell strong,
.pay-date-cell strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.pay-source-cell strong,
.pay-source-cell small,
.pay-payment-cell small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pay-manual-flag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(184, 137, 42, 0.08);
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
}

.pay-trace-line span {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted2);
  white-space: nowrap;
}

.pay-trace-line strong {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.pay-trace-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}

.pay-date-cell {
  gap: 2px;
  align-self: center;
}

.pay-row-actions {
  justify-self: end;
  align-self: center;
}

.pay-head-actions {
  display: block;
  justify-self: end;
  text-align: right;
}

.pay-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 36px 24px 30px;
  text-align: center;
  color: var(--muted);
}

.pay-empty-state[hidden] {
  display: none !important;
}

.pay-empty-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(184, 137, 42, 0.10);
  color: var(--gold);
}

.pay-empty-state strong {
  font-size: 15px;
  color: var(--text);
}

.pay-empty-state p {
  margin: 0;
  font-size: 12.5px;
}

.pay-modal {
  max-width: 760px;
}

.pay-detail-modal {
  max-width: 860px;
}

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

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

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

.pay-readonly-chip {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #faf8f4;
  color: var(--text);
  font-weight: 600;
}

.pay-profile-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.pay-profile-preview-line,
.pay-detail-card {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #faf8f4;
}

.pay-profile-preview-line span,
.pay-detail-card span,
.pay-note-box span {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted2);
}

.pay-profile-preview-line strong,
.pay-detail-card strong {
  display: block;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
}

.pay-profile-preview-line--wide,
.pay-detail-card--wide {
  grid-column: span 2;
}

.pay-textarea {
  min-height: 96px;
  resize: vertical;
}

.pay-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pay-note-box {
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(184, 137, 42, 0.14);
  background: linear-gradient(180deg, #fbf8f2 0%, #f5f0e8 100%);
}

.pay-note-box p {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text);
}

.pay-inline-link {
  margin-top: 14px;
}

@media (max-width: 1180px) {
  .pay-filters {
    min-width: auto;
    flex-wrap: wrap;
  }

  .pay-search {
    flex: 1 1 100%;
  }
}

@media (max-width: 980px) {
  .pay-table-head {
    display: none;
  }

  .pay-row {
    grid-template-columns: 1fr;
    gap: 14px;
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 860px) {
  .pay-form-grid-2,
  .pay-form-grid-3,
  .pay-profile-preview,
  .pay-detail-grid {
    grid-template-columns: 1fr;
  }

  .pay-profile-preview-line--wide,
  .pay-detail-card--wide {
    grid-column: span 1;
  }
}

/* ============================================================
   DEPENSES — dep-*
   ============================================================ */
body.depenses-page .page-header {
  margin-bottom: 28px;
}

.dep-kpi-grid {
  margin-bottom: 18px;
}

.dep-stats-wrap {
  display: block;
  margin-bottom: 18px;
}

.dep-breakdown-card-compact {
  width: 100%;
}

.dep-breakdown-list {
  padding: 6px 22px 16px;
  display: flex;
  flex-direction: column;
}

.dep-breakdown-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.72fr) minmax(160px, 1fr) minmax(120px, 0.72fr);
  gap: 14px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.dep-breakdown-row:last-child {
  border-bottom: none;
}

.dep-breakdown-copy {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.dep-breakdown-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(184, 137, 42, 0.10);
  color: var(--gold-light);
}

.dep-breakdown-text {
  min-width: 0;
}

.dep-breakdown-copy strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.dep-breakdown-values strong {
  display: block;
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}

.dep-breakdown-text span {
  display: block;
  margin-top: 3px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
}

.dep-breakdown-values {
  text-align: right;
}

.dep-breakdown-rail {
  height: 7px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.dep-breakdown-rail span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: rgba(184,137,42,.35);
}

.dep-breakdown-rail span.is-top {
  background: var(--gold);
}

.dep-breakdown-values span {
  display: block;
  margin-top: 4px;
  font-size: 16px;
  font-weight: 700;
  color: var(--muted);
}

.dep-breakdown-rail {
  height: 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.dep-breakdown-rail span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: rgba(184, 137, 42, 0.34);
}

.dep-breakdown-rail span.is-top {
  background: linear-gradient(90deg, #c79a3a 0%, #b8892a 100%);
}

.dep-filter-card .card-body {
  padding: 18px 22px;
}

.dep-ledger {
  overflow: hidden;
  overflow-x: auto;
  padding-bottom: 10px;
}

.dep-ledger-head {
  padding: 20px 22px 14px;
}

.dep-tbl-head,
.dep-item {
  display: grid;
  grid-template-columns: minmax(340px, 1.7fr) minmax(120px, 0.62fr) minmax(140px, 0.74fr) minmax(150px, 0.78fr) minmax(230px, 1.06fr) 126px;
  gap: 14px;
  align-items: start;
  min-width: 1080px;
  padding-left: 24px;
  padding-right: 24px;
}

.dep-tbl-head {
  padding-top: 12px;
  padding-bottom: 12px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.dep-th {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted2);
}

.dep-th-right,
.dep-td-right {
  text-align: right;
}

.dep-th-center,
.dep-td-center {
  text-align: center;
}

.dep-item {
  min-height: 88px;
  padding-top: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  transition: background 0.18s ease;
}

.dep-item:last-child {
  border-bottom: none;
}

.dep-item:hover {
  background: rgba(250, 247, 242, 0.7);
}

.dep-td {
  min-width: 0;
  display: flex;
  align-items: center;
}

.dep-td-right {
  justify-content: flex-end;
}

.dep-td-center {
  justify-content: center;
}

.dep-td-desc {
  padding-right: 6px;
}

.dep-desc-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.dep-desc {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dep-desc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted2);
  overflow: hidden;
}

.dep-desc-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
}

.dep-desc-meta-item svg {
  flex-shrink: 0;
  color: var(--gold-light);
}

.dep-cat-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #f8f5ef;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dep-amount {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: auto;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
}

.dep-td-amount,
.dep-td-method {
  align-self: center;
}

.dep-td-resp {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text);
  align-self: center;
}

.dep-td-resp svg {
  flex-shrink: 0;
  color: var(--muted);
}

.dep-resp-copy {
  min-width: 0;
}

.dep-resp-copy strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.dep-resp-copy small {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dep-method-cheque {
  color: var(--gold-light);
  background: rgba(184,137,42,0.09);
  border: 1px solid rgba(184,137,42,0.15);
}

.dep-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.dep-modal {
  max-width: 640px;
}

.dep-view-modal {
  max-width: 720px;
}

.dep-view-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dep-view-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 0 2px 16px;
}

.dep-view-topline-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dep-view-topline-copy strong {
  font-size: 28px;
  line-height: 1;
  color: var(--text);
}

.dep-view-topline-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dep-view-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(184, 137, 42, 0.10);
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dep-view-pill-method {
  background: rgba(61, 114, 188, 0.09);
  color: var(--blue);
}

.dep-view-topline-copy span,
.dep-view-topline-meta span {
  font-size: 12px;
  color: var(--muted);
}

.dep-view-topline-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  text-align: right;
}

.dep-view-card {
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #faf8f4;
}

.dep-view-card--spotlight {
  background: linear-gradient(180deg, #fbf8f2 0%, #f7f2e8 100%);
  border-color: rgba(184, 137, 42, 0.16);
}

.dep-view-card--wide {
  grid-column: span 2;
}

.dep-view-card span {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted2);
}

.dep-view-card strong {
  display: block;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
}

.dep-view-card small {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
}

.dep-view-note {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(184, 137, 42, 0.18);
}

.dep-view-note span {
  margin-bottom: 5px;
}

.dep-view-note p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text);
}

.dep-proof-panel {
  margin-top: 16px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid rgba(184, 137, 42, 0.14);
  background: linear-gradient(180deg, #fbf8f2 0%, #f5f0e8 100%);
}

.dep-proof-file {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dep-proof-file-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(184, 137, 42, 0.12);
  color: var(--gold-light);
}

.dep-proof-file-copy strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.dep-proof-file-copy span {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

.dep-proof-actions {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dep-proof-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(61,114,188,0.16);
  background: rgba(61,114,188,0.08);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.18s ease;
}

.dep-proof-link:hover {
  background: rgba(61,114,188,0.14);
}

.dep-proof-link.is-soft {
  border-color: rgba(184,137,42,0.16);
  background: rgba(184,137,42,0.08);
  color: var(--gold-light);
}

.dep-proof-link.is-soft:hover {
  background: rgba(184,137,42,0.14);
}

.dep-trace-panel {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.dep-trace-toggle {
  gap: 8px;
}

.dep-trace-toggle svg:last-child {
  transition: transform 0.18s ease;
}

.dep-trace-toggle.is-open svg:last-child {
  transform: rotate(180deg);
}

.dep-trace-body[hidden] {
  display: none;
}

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

.dep-trace-item {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 12px;
}

.dep-trace-bullet {
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c9a84c, #a07830);
}

.dep-trace-copy {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #faf8f4;
}

.dep-trace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.dep-trace-head strong {
  font-size: 13.5px;
  color: var(--text);
}

.dep-trace-head span,
.dep-trace-copy small {
  font-size: 11.5px;
  color: var(--muted);
}

.dep-trace-copy p {
  margin: 8px 0 6px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text);
}

.dep-trace-empty {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #faf8f4;
}

.dep-trace-empty strong,
.dep-trace-empty span {
  display: block;
}

.dep-trace-empty strong {
  font-size: 13px;
  color: var(--text);
}

.dep-trace-empty span {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.dep-upload-zone {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 18px;
  border-radius: 16px;
  border: 1px solid rgba(184, 137, 42, 0.18);
  background: linear-gradient(180deg, #fcfaf6 0%, #f6f1e8 100%);
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.dep-upload-zone:hover {
  border-color: rgba(184, 137, 42, 0.3);
  background: linear-gradient(180deg, #fdfbf7 0%, #f4ede1 100%);
  transform: translateY(-1px);
}

.dep-upload-zone.is-filled {
  border-color: rgba(46, 158, 104, 0.26);
  background: linear-gradient(180deg, #f8fcf9 0%, #eef8f2 100%);
}

.dep-upload-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(184, 137, 42, 0.12);
  color: var(--gold-light);
}

.dep-upload-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.dep-upload-copy strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.dep-upload-copy span {
  font-size: 12px;
  color: var(--muted);
}

.dep-upload-action {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  background: rgba(61, 114, 188, 0.08);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.dep-upload-zone.is-filled .dep-upload-icon {
  background: rgba(46, 158, 104, 0.14);
  color: var(--green);
}

.dep-upload-zone.is-filled .dep-upload-action {
  background: rgba(46, 158, 104, 0.10);
  color: var(--green);
}

@media (max-width: 980px) {
  .dep-breakdown-card-compact {
    width: 100%;
  }

  .dep-tbl-head {
    display: none;
  }

  .dep-item {
    grid-template-columns: 1fr;
    gap: 14px;
    min-width: 0;
    padding-left: 20px;
    padding-right: 20px;
  }

  .dep-td-right,
  .dep-td-center {
    justify-content: flex-start;
    text-align: left;
  }

  .dep-actions {
    justify-content: flex-start;
  }

  .dep-view-grid {
    grid-template-columns: 1fr;
  }

  .dep-view-card--wide {
    grid-column: span 1;
  }

  .dep-upload-zone {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .dep-upload-action {
    margin-left: 0;
  }
}

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

.frm-student-copy {
  min-width: 0;
}

.frm-student-copy strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.frm-student-copy span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.frm-student-copy span svg {
  color: var(--gold-light);
  flex-shrink: 0;
}

.frm-formation-cell {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.frm-formation-cell strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.frm-formation-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.frm-duration-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(61,114,188,0.08);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.frm-formation-type {
  font-size: 12px;
  color: var(--muted);
}

.frm-period-cell {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.frm-period-item {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.frm-period-item svg {
  color: var(--gold-light);
  flex-shrink: 0;
}

.frm-period-item div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.frm-period-item small {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted2);
}

.frm-period-item strong {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}

.frm-amount-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.frm-amount-cell strong {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.frm-amount-cell span {
  font-size: 12px;
  color: var(--muted);
}

.frm-status-cell {
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: flex-start;
}

.frm-status-sub {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.frm-status-ongoing {
  color: var(--green);
  background: rgba(46,158,104,0.10);
}

.frm-status-ongoing::before {
  background: var(--green);
}

.frm-status-finished {
  color: var(--gold-light);
  background: rgba(184,137,42,0.10);
}

.frm-status-finished::before {
  background: var(--gold-light);
}

.frm-actions {
  justify-content: flex-start;
}

.frm-action-view {
  background: rgba(61,114,188,0.08);
  color: var(--blue);
  border-color: rgba(61,114,188,0.14);
}

.frm-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 36px 24px 30px;
  text-align: center;
  color: var(--muted);
}

.frm-empty-state[hidden] {
  display: none !important;
}

.frm-empty-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(184,137,42,0.10);
  color: var(--gold);
}

.frm-empty-state strong {
  font-size: 15px;
  color: var(--text);
}

.frm-empty-state p {
  margin: 0;
  font-size: 12.5px;
}

@media (max-width: 1180px) {
  .frm-filters {
    min-width: auto;
    flex-wrap: wrap;
  }

  .frm-search {
    flex: 1 1 100%;
  }
}

@media (max-width: 980px) {
  .frm-table-head {
    display: none;
  }

  .frm-table-row {
    grid-template-columns: 1fr;
    gap: 14px;
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 640px) {
  .frm-select,
  .frm-reset-btn {
    width: 100%;
    flex: 1 1 100%;
  }
}

/* ============================================================
   ETUDIANTS — etu-*
   ============================================================ */
body.etudiants-page .db-header {
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 28px;
}

.etu-filter-card {
  margin-bottom: 18px;
}

.etu-filter-card .card-body {
  padding: 18px 22px;
}

.etu-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  min-width: 1060px;
}

.etu-search {
  flex: 1 1 360px;
  max-width: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
}

.etu-search .form-input {
  border: 0;
  padding: 0;
  height: auto;
  background: transparent;
}

.etu-search svg {
  color: var(--muted);
  flex-shrink: 0;
}

.etu-select {
  min-width: 180px;
  width: 190px;
  height: 42px;
}

.etu-reset-btn {
  height: 42px;
  white-space: nowrap;
}

.etu-tracker-card {
  overflow: hidden;
}

.etu-legend {
  display: flex;
  align-items: center;
  gap: 14px;
}

.etu-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
}

.etu-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.etu-legend i.is-paid {
  background: var(--green);
}

.etu-legend i.is-pending {
  background: var(--gold);
}

.etu-legend i.is-unpaid {
  background: var(--red);
}

.etu-tracker-wrap {
  overflow-x: auto;
}

.etu-tracker-head,
.etu-tracker-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.32fr) minmax(145px, 0.72fr) minmax(96px, 0.48fr) repeat(5, minmax(48px, 0.26fr)) minmax(88px, 0.62fr) minmax(96px, 0.56fr);
  gap: 12px;
  align-items: center;
  min-width: 920px;
  padding-left: 24px;
  padding-right: 24px;
}

.etu-tracker-head {
  padding-top: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.etu-tracker-head span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted2);
}

.etu-head-month,
.etu-head-rate,
.etu-head-actions {
  text-align: center;
}

.etu-tracker-row {
  padding-top: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.etu-tracker-row:last-child {
  border-bottom: none;
}

.etu-student-cell,
.etu-program-cell,
.etu-group-cell,
.etu-rate-cell,
.etu-actions-cell {
  min-width: 0;
}

.etu-group-cell {
  display: flex;
  align-items: center;
}

.etu-group-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--surface-alt);
  color: var(--muted);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.etu-program-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.etu-program-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.etu-course-chip {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.etu-course-chip--label {
  width: max-content;
  max-width: 100%;
  min-height: 28px;
  padding: 0 10px;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  justify-self: start;
  align-self: center;
}

.etu-course-chip.is-normal {
  color: #b8892a;
  background: rgba(184,137,42,0.10);
  border-color: rgba(184,137,42,0.16);
}

.etu-course-chip.is-soire {
  color: #3d72bc;
  background: rgba(61,114,188,0.10);
  border-color: rgba(61,114,188,0.16);
}

.etu-photo-avatar {
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(0,0,0,0.06);
}

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

.etu-meta-inline {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--muted);
  flex-wrap: nowrap;
}

.etu-meta-inline svg { flex-shrink: 0; opacity: 0.6; }
.etu-meta-inline span { white-space: nowrap; }

.etu-meta-dot {
  color: var(--muted2);
  font-size: 10px;
  flex-shrink: 0;
}

.etu-name-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.etu-name-line .db-row-name {
  margin: 0;
}

.etu-student-code {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(184, 137, 42, 0.10);
  color: var(--gold);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1;
  white-space: nowrap;
}

.etu-student-code svg {
  flex-shrink: 0;
}

.etu-meta-stack .db-row-meta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 0;
}

.etu-meta-stack .db-row-meta svg {
  flex-shrink: 0;
  color: var(--muted2);
}

.etu-month-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.etu-pay-toggle {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  transition: all 0.18s ease;
}

.etu-pay-toggle:disabled {
  cursor: default;
}

.etu-pay-toggle svg {
  width: 12px;
  height: 12px;
}

.etu-pay-toggle.is-paid {
  background: rgba(46,158,104,0.10);
  color: var(--green);
  border-color: rgba(46,158,104,0.14);
}

.etu-pay-toggle.is-pending {
  background: rgba(184,137,42,0.12);
  color: var(--gold);
  border-color: rgba(184,137,42,0.14);
}

.etu-pay-toggle.is-unpaid {
  background: rgba(196,78,78,0.10);
  color: var(--red);
  border-color: rgba(196,78,78,0.12);
}

.etu-pay-toggle.is-locked {
  background: rgba(138,132,128,0.08);
  color: var(--muted2);
  border-color: rgba(138,132,128,0.12);
}

.etu-pay-dash {
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.etu-rate-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-self: start;
  width: 100%;
}

.etu-rate-bar-wrap {
  width: 48px;
  flex: 0 0 48px;
  height: 7px;
  border-radius: 999px;
  background: var(--surface2);
  overflow: hidden;
}

.etu-rate-bar {
  height: 100%;
  border-radius: inherit;
  transition: width 0.18s ease, background 0.18s ease;
}

.etu-rate-value {
  min-width: 32px;
  text-align: left;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}

.etu-actions-cell {
  justify-self: center;
}

.etu-empty-state {
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-align: center;
}

.etu-empty-state strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.etu-empty-state p {
  font-size: 13px;
  color: var(--muted);
}

.etu-modal {
  max-width: 520px;
}

.etu-payment-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.etu-payment-summary article {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #faf8f4;
  padding: 14px 16px;
}

.etu-payment-summary span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted2);
  margin-bottom: 6px;
}

.etu-payment-summary strong {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.etu-payment-state-row,
.etu-payment-methods {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

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

.etu-state-btn,
.etu-method-btn {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all 0.18s ease;
}

.etu-state-btn.is-active,
.etu-method-btn.is-active {
  border-color: rgba(61,114,188,0.16);
  background: #f8fbff;
}

.etu-state-btn.is-paid.is-active {
  color: var(--green);
  border-color: rgba(46,158,104,0.18);
  background: rgba(46,158,104,0.08);
}

.etu-state-btn.is-pending.is-active {
  color: var(--gold);
  border-color: rgba(184,137,42,0.18);
  background: rgba(184,137,42,0.08);
}

.etu-state-btn.is-unpaid.is-active {
  color: var(--red);
  border-color: rgba(196,78,78,0.18);
  background: rgba(196,78,78,0.08);
}

@media (max-width: 1200px) {
  .etu-filters {
    min-width: 920px;
  }
}

@media (max-width: 860px) {
  .etu-filter-card .card-body {
    overflow-x: auto;
  }

  .etu-payment-summary,
  .etu-payment-state-row,
  .etu-payment-methods {
    grid-template-columns: 1fr;
  }
}

/*
   ETUDIANT DETAIL — sdet-*
*/
body.student-detail-page .main-content {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.sdet-actions-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.sdet-overview-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: stretch;
}

.sdet-overview-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 26px 28px;
  overflow: hidden;
  border: 1px solid rgba(184, 137, 42, 0.12);
  background:
    radial-gradient(circle at top right, rgba(184, 137, 42, 0.09), transparent 34%),
    linear-gradient(180deg, #fff 0%, #fcfaf6 100%);
}

.sdet-overview-card--finance {
  justify-content: space-between;
}

.sdet-overview-card--student {
  background:
    radial-gradient(circle at top left, rgba(61, 114, 188, 0.08), transparent 28%),
    linear-gradient(180deg, #fff 0%, #fcfaf6 100%);
}

.sdet-final-doc-card {
  background: var(--surface);
  border-color: var(--border);
}

.sdet-final-doc-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.sdet-final-doc-status {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.sdet-final-doc-status .sdet-inline-note {
  margin: 0;
}

.sdet-final-doc-receipt-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 7px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.sdet-final-doc-receipt-link:hover {
  text-decoration: underline;
}

.sdet-final-doc-receipt-link[hidden] {
  display: none;
}

.sdet-final-doc-edit {
  flex: 0 0 auto;
}

.sdet-final-doc-badge {
  width: fit-content;
  min-height: 34px;
  padding: 0 13px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sdet-final-doc-badge.is-given {
  color: #24714c;
  background: rgba(46, 158, 104, 0.12);
  border: 1px solid rgba(46, 158, 104, 0.22);
}

.sdet-final-doc-badge.is-pending {
  color: #9a6a15;
  background: rgba(184, 137, 42, 0.12);
  border: 1px solid rgba(184, 137, 42, 0.22);
}

.sdet-final-doc-badge svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.sdet-overview-card .db-card-title,
.sdet-overview-card strong {
  font-family: "DM Sans", sans-serif;
}

.sdet-card-headline span {
  display: block;
  margin-bottom: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted2);
}

.sdet-card-headline strong {
  display: block;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
}

.sdet-student-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.sdet-profile-avatar.sdet-profile-avatar--circle {
  border-radius: 50% !important;
  overflow: hidden;
}

.sdet-profile-avatar--circle {
  width: 92px;
  height: 92px;
  border-radius: 50% !important;
}

.sdet-student-hero-copy {
  min-width: 0;
  flex: 1;
}

.sdet-student-hero-copy h1 {
  margin: 0;
  font-size: 29px;
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: var(--text);
}

.sdet-student-hero-copy p {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--muted2);
}

.sdet-student-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.sdet-student-barcode {
  width: 100%;
  max-width: 250px;
  min-width: 250px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(184, 137, 42, 0.14);
  background: linear-gradient(180deg, #fbf8f2 0%, #f6f0e6 100%);
}

.sdet-inline-barcode-label {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: none;
  color: var(--text);
  text-align: center;
}

.sdet-inline-documents {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 10px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(184, 137, 42, 0.10);
  background:
    radial-gradient(circle at top right, rgba(184, 137, 42, 0.07), transparent 34%),
    linear-gradient(180deg, #fff 0%, #faf8f4 100%);
}

.sdet-inline-documents-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.sdet-inline-documents-head .db-card-title {
  margin: 0;
}

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

.sdet-formation-mini-top {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
}

.sdet-formation-mini-icon {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
}

.sdet-formation-mini-icon svg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  display: block;
  transform: translate(-50%, -50%);
}

.sdet-formation-mini-icon.is-gold {
  color: #b07a1a;
  background: rgba(184, 137, 42, 0.10);
}

.sdet-formation-mini-icon.is-blue {
  color: #4774b4;
  background: rgba(61, 114, 188, 0.10);
}

.sdet-formation-mini-icon.is-green {
  color: #2c8b5d;
  background: rgba(46, 158, 104, 0.11);
}

.sdet-formation-mini-icon.is-red {
  color: #c25757;
  background: rgba(196, 78, 78, 0.10);
}

.sdet-formation-mini-icon.is-slate {
  color: #807971;
  background: rgba(138, 132, 128, 0.10);
}

.sdet-formation-mini-card,
.sdet-finance-simple-card {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(2px);
}

.sdet-formation-mini-card span,
.sdet-finance-simple-card span {
  display: block;
  margin-bottom: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted2);
}

.sdet-formation-mini-top span:last-child {
  margin: 0;
}

.sdet-formation-mini-card strong,
.sdet-finance-simple-card strong {
  display: block;
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
}

.sdet-formation-mini-card small,
.sdet-finance-simple-card small {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.sdet-formation-mini-card strong {
  font-size: 18px;
  line-height: 1.22;
}

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

.sdet-finance-simple-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(184, 137, 42, 0.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(249,245,238,0.98) 100%);
}

.sdet-finance-simple-card::after {
  content: '';
  position: absolute;
  inset: auto 18px 0 18px;
  height: 1px;
  background: linear-gradient(90deg, rgba(184,137,42,0), rgba(184,137,42,0.18), rgba(184,137,42,0));
}

.sdet-finance-simple-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  min-height: 38px;
}

.sdet-finance-simple-icon {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
}

.sdet-finance-simple-icon svg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  display: block;
  transform: translate(-50%, -50%);
}

.sdet-finance-simple-icon.is-gold {
  color: #b07a1a;
  background: rgba(184, 137, 42, 0.10);
  box-shadow: none;
}

.sdet-finance-simple-icon.is-green {
  color: #2c8b5d;
  background: rgba(46, 158, 104, 0.11);
  box-shadow: none;
}

.sdet-finance-simple-icon.is-red {
  color: #c25757;
  background: rgba(196, 78, 78, 0.10);
  box-shadow: none;
}

.sdet-finance-simple-icon.is-slate {
  color: #6f6a64;
  background: linear-gradient(135deg, #f0ece6, #e5dfd6);
  box-shadow: 0 10px 22px rgba(26,24,20,0.08);
}

.sdet-finance-simple-top span:last-child {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted2);
  white-space: nowrap;
}

.sdet-finance-simple-card strong {
  margin-bottom: 8px;
}

.sdet-finance-simple-card small {
  margin-top: auto;
}

.sdet-finance-simple-card.is-success strong {
  color: var(--green);
}

.sdet-finance-simple-card.is-alert strong {
  color: var(--red);
}

.sdet-finance-simple-card.is-muted strong {
  color: var(--muted);
}

.sdet-voluntary-btn {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 14px 32px rgba(122,80,16,0.18);
  white-space: nowrap;
}

.sdet-voluntary-btn svg {
  width: 16px;
  height: 16px;
}

.sdet-voluntary-btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  filter: grayscale(0.04);
  box-shadow: none;
}

.sdet-inline-note {
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
}

.sdet-finance-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 6px;
}

.sdet-profile-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.sdet-profile-form-wide {
  grid-column: span 2;
}

.sdet-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.sdet-breadcrumb a {
  color: var(--gold);
}

.sdet-breadcrumb strong {
  color: var(--text);
  font-weight: 700;
}

.sdet-head-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

body.student-detail-page .db-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

.sdet-header-copy {
  min-width: 0;
}

.sdet-header-id-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 240px;
  padding: 14px 20px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fbf8f2 0%, #f5f0e8 100%);
  border: 1px solid rgba(184, 137, 42, 0.12);
}

.sdet-header-id-label {
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted2);
}

.sdet-header-id-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--text);
}

.sdet-header-barcode {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 214px;
  height: 58px;
  padding: 0;
  color: #1f1b17;
}

.sdet-header-barcode-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.sdet-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 24px;
  align-items: stretch;
}

.sdet-profile-panel,
.sdet-documents-panel,
.sdet-finance-panel,
.sdet-months-panel,
.sdet-profile-history-panel {
  overflow: hidden;
}

.sdet-profile-panel {
  height: 100%;
  padding: 26px 28px;
}

.sdet-finance-panel {
  height: 100%;
}

.sdet-profile-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.sdet-profile-avatar {
  width: 86px;
  height: 86px;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(135deg, #f6e1b6, #d4a84b);
  box-shadow: 0 14px 28px rgba(184, 137, 42, 0.18);
  flex-shrink: 0;
}

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

.sdet-profile-copy {
  min-width: 0;
}

.sdet-profile-label {
  margin-bottom: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted2);
}

.sdet-profile-copy h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
}

.sdet-profile-copy p {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.sdet-profile-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.sdet-soft-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.sdet-soft-pill.is-neutral {
  background: rgba(61, 114, 188, 0.08);
  color: var(--blue);
}

.sdet-soft-pill.is-success {
  background: rgba(46, 158, 104, 0.10);
  color: var(--green);
}

.sdet-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding-top: 22px;
}

.sdet-info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #faf8f4;
}

.sdet-info-item--wide {
  grid-column: span 2;
}

.sdet-info-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(184, 137, 42, 0.10);
  color: var(--gold);
  flex-shrink: 0;
}

.sdet-info-item small {
  display: block;
  margin-bottom: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted2);
}

.sdet-info-item strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text);
}

.sdet-documents-panel .db-card-head {
  padding: 20px 24px;
}

.sdet-docs-total {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(184, 137, 42, 0.10);
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
}

.sdet-docs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 18px 24px 24px;
}

.sdet-inline-documents .sdet-docs-grid {
  padding: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.sdet-doc-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 104px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #fff 0%, #faf8f4 100%);
}

.sdet-inline-documents .sdet-doc-card {
  min-height: 96px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
}

.sdet-doc-card-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.sdet-doc-card-icon {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(184, 137, 42, 0.10);
  color: var(--gold);
  flex-shrink: 0;
  border: 1px solid rgba(184, 137, 42, 0.10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  line-height: 0;
}

.sdet-doc-card-svg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  display: block;
  color: var(--gold) !important;
  stroke: currentColor;
  transform: translate(-50%, -50%);
}

.sdet-doc-card-main strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  color: var(--text);
}

.sdet-doc-card-main span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  word-break: break-word;
}

.sdet-doc-card-btn {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(61, 114, 188, 0.12);
  background: rgba(61, 114, 188, 0.06);
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  flex-shrink: 0;
}

.sdet-doc-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.sdet-doc-card-btn.is-soft {
  border-color: rgba(184, 137, 42, 0.12);
  background: rgba(184, 137, 42, 0.07);
  color: #a07420;
}

.sdet-doc-card-btn.is-soft:hover {
  border-color: rgba(184, 137, 42, 0.20);
  background: rgba(184, 137, 42, 0.11);
}

.sdet-doc-card-btn:hover {
  border-color: rgba(61, 114, 188, 0.20);
  background: rgba(61, 114, 188, 0.10);
}

.sdet-finance-panel .db-card-head {
  padding: 22px 24px 0;
}

.sdet-programme-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(180px, 0.4fr));
  gap: 12px;
  padding: 18px 24px 0;
}

.sdet-programme-summary-main,
.sdet-programme-summary-stat {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #faf8f4;
  padding: 16px 18px;
}

.sdet-programme-summary-main span,
.sdet-programme-summary-stat span {
  display: block;
  margin-bottom: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted2);
}

.sdet-programme-summary-main strong,
.sdet-programme-summary-stat strong {
  display: block;
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.sdet-programme-summary-main strong {
  font-size: 22px;
}

.sdet-programme-summary-stat strong {
  font-size: 24px;
}

.sdet-programme-summary-main small,
.sdet-programme-summary-stat small {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.sdet-finance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 24px 24px;
}

.sdet-finance-stat {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #faf8f4;
  padding: 16px 18px;
}

.sdet-finance-stat span {
  display: block;
  margin-bottom: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted2);
}

.sdet-finance-stat strong {
  display: block;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
}

.sdet-finance-stat small {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.sdet-finance-stat.is-alert strong {
  color: var(--red);
}

.sdet-finance-stat.is-coverage strong {
  color: var(--green);
}

.sdet-formation-flow {
  padding: 0 24px 24px;
}

.sdet-formation-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.sdet-formation-stat {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #faf8f4;
  padding: 16px 18px;
}

.sdet-formation-stat.is-highlight {
  background: linear-gradient(180deg, #fbf8f2 0%, #f5f0e8 100%);
  border-color: rgba(184, 137, 42, 0.14);
}

.sdet-formation-stat span {
  display: block;
  margin-bottom: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted2);
}

.sdet-formation-stat strong {
  display: block;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--text);
}

.sdet-formation-stat small {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.sdet-formation-trace {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  padding: 18px;
}

.sdet-months-panel .db-card-head,
.sdet-activity-panel .db-card-head,
.sdet-profile-history-panel .db-card-head {
  padding: 20px 24px;
}

.sdet-month-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.sdet-month-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
}

.sdet-month-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.sdet-month-legend .is-paid { background: var(--green); }
.sdet-month-legend .is-pending { background: var(--gold); }
.sdet-month-legend .is-unpaid { background: var(--red); }
.sdet-month-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 0 24px 24px;
}

.sdet-month-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 252px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.sdet-month-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.sdet-month-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 18px 0 0 18px;
  background: var(--border);
}

.sdet-month-card.is-paid::before { background: var(--green); }
.sdet-month-card.is-pending::before { background: var(--gold); }
.sdet-month-card.is-unpaid::before { background: var(--red); }

.sdet-month-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sdet-month-kicker {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted2);
}

.sdet-month-card-head h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
}

.sdet-month-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.sdet-month-pill.is-paid {
  background: rgba(46, 158, 104, 0.10);
  color: var(--green);
}

.sdet-month-pill.is-pending {
  background: rgba(184, 137, 42, 0.10);
  color: var(--gold);
}

.sdet-month-pill.is-unpaid {
  background: rgba(196, 78, 78, 0.10);
  color: var(--red);
}

.sdet-month-pill.is-locked {
  background: rgba(0, 0, 0, 0.06);
  color: var(--muted);
}

.sdet-month-amount-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.sdet-month-amount-row strong {
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text);
}

.sdet-month-amount-row span {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted2);
}

.sdet-month-amount-row.is-locked strong {
  color: var(--muted2);
}

.sdet-month-meta-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  flex: 1;
}

.sdet-month-meta-list div {
  min-width: 0;
}

.sdet-month-meta-list small {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted2);
}

.sdet-month-meta-list strong {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
}

.sdet-month-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

.sdet-trace-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.sdet-month-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sdet-month-btn {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: all 0.18s ease;
}

.sdet-month-btn.is-primary {
  background: linear-gradient(135deg, #b8892a, #7a5010);
  border-color: transparent;
  color: #fff;
}

.sdet-month-btn.is-primary:hover {
  filter: brightness(1.05);
}

.sdet-month-btn.is-secondary:hover {
  border-color: var(--border-hover);
  background: var(--surface2);
}

.sdet-month-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.08);
}

.sdet-history-list {
  padding: 8px 24px 24px;
}

.sdet-history-collapse[hidden] {
  display: none !important;
}

.sdet-history-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 24px 18px;
}

.sdet-history-overview-card {
  padding: 16px 18px;
  border: 1px solid rgba(184, 137, 42, 0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(249,245,238,0.96) 100%);
}

.sdet-history-overview-card.is-empty {
  grid-column: 1 / -1;
}

.sdet-history-overview-card small {
  display: block;
  margin-bottom: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted2);
}

.sdet-history-overview-card strong {
  display: block;
  font-size: 18px;
  line-height: 1.18;
  color: var(--text);
}

.sdet-history-overview-card span {
  display: block;
  margin-top: 7px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.sdet-history-toggle {
  gap: 8px;
  min-width: 118px;
  justify-content: center;
}

.sdet-history-toggle svg:last-child {
  transition: transform 0.18s ease;
}

.sdet-history-toggle.is-open svg:last-child {
  transform: rotate(180deg);
}

.sdet-history-item {
  display: flex;
  gap: 16px;
  padding: 0 0 14px;
}

.sdet-history-item:last-child {
  padding-bottom: 0;
}

.sdet-history-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  padding-top: 18px;
}

.sdet-history-rail-line {
  width: 1px;
  flex: 1;
  margin-top: 8px;
  background: linear-gradient(180deg, rgba(184,137,42,0.26), rgba(184,137,42,0.05));
}

.sdet-history-copy {
  flex: 1;
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid rgba(184, 137, 42, 0.10);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbf9f5 100%);
}

.sdet-history-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.sdet-history-heading {
  min-width: 0;
}

.sdet-history-field {
  display: inline-flex;
  align-items: center;
  margin-bottom: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(184, 137, 42, 0.10);
  color: #a07420;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sdet-history-top strong {
  display: block;
  font-size: 17px;
  line-height: 1.35;
  color: var(--text);
}

.sdet-history-time {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.04);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.sdet-history-copy p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.sdet-history-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.sdet-history-meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--text);
  background: rgba(184, 137, 42, 0.08);
}

.sdet-history-meta-pill.is-soft {
  color: var(--muted);
  background: rgba(0, 0, 0, 0.04);
}

.sdet-history-marker {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(184, 137, 42, 0.10);
  flex-shrink: 0;
}

.sdet-history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 24px 28px;
  text-align: center;
}

.sdet-history-empty strong {
  font-size: 16px;
  color: var(--text);
}

.sdet-history-empty span {
  font-size: 13px;
  color: var(--muted);
}

.sdet-modal {
  max-width: 780px;
}

.sdet-final-doc-modal {
  max-width: 600px;
}

.sdet-final-doc-modal .modal-body {
  display: grid;
  gap: 22px;
}

.sdet-final-doc-modal .form-group {
  margin: 0;
  min-width: 0;
}

.sdet-final-doc-modal [hidden] {
  display: none;
}

.sdet-final-doc-modal .sdet-final-doc-status-field {
  padding: 12px 0 8px;
}

.sdet-final-doc-modal .sdet-final-doc-field .form-label {
  margin-bottom: 14px;
}

.sdet-final-doc-modal .sdet-state-row {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.sdet-final-doc-modal .sdet-state-row button {
  width: 100%;
  justify-content: center;
  min-height: 62px;
  gap: 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.sdet-final-doc-modal .sdet-state-row button svg {
  width: 18px;
  height: 18px;
}

.sdet-final-doc-modal .sdet-state-row button.is-unpaid.is-active {
  color: #9a6a15;
  border-color: rgba(184, 137, 42, .45);
  background: rgba(184, 137, 42, .08);
}

.sdet-final-doc-modal .sdet-state-row button.is-paid.is-active {
  border-color: rgba(46, 158, 104, .45);
}

.sdet-final-doc-modal .sdet-state-row button:hover {
  border-color: var(--gold);
}

.sdet-month-modal {
  max-width: 860px;
}

.sdet-modal-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.sdet-final-doc-modal-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.sdet-modal-summary article {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #faf8f4;
}

.sdet-final-doc-modal-summary article {
  min-width: 0;
  padding: 0 12px;
}

.sdet-final-doc-modal-summary article:first-child {
  padding-left: 0;
}

.sdet-final-doc-modal-summary article + article {
  border-left: 1px solid var(--border);
}

.sdet-modal-summary span,
.sdet-final-doc-modal-summary span {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted2);
}

.sdet-modal-summary strong,
.sdet-final-doc-modal-summary strong {
  font-size: 16px;
  line-height: 1.3;
  color: var(--text);
}

.sdet-final-doc-modal-summary strong {
  overflow-wrap: anywhere;
}

.sdet-final-doc-upload {
  display: flex;
  width: 100%;
  min-height: 114px;
  padding: 18px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-align: center;
  border: 1.5px dashed var(--border);
  border-radius: 8px;
  background: var(--bg);
  cursor: pointer;
  position: relative;
  transition: border-color .15s, background .15s;
}

.sdet-final-doc-upload:hover,
.sdet-final-doc-upload:focus-within {
  border-color: var(--gold);
  background: rgba(184, 137, 42, .04);
}

.sdet-final-doc-upload.has-file {
  border-color: var(--green);
  background: rgba(46, 158, 104, .04);
}

.sdet-final-doc-upload-icon {
  display: flex;
  color: var(--muted2);
}

.sdet-final-doc-upload-title {
  max-width: 100%;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.sdet-final-doc-upload-sub {
  color: var(--muted2);
  font-size: 12px;
}

.sdet-final-doc-upload input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.sdet-final-doc-print-wrap {
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.sdet-final-doc-print-wrap[hidden] {
  display: none;
}

.sdet-final-doc-print-wrap .btn {
  width: 100%;
  justify-content: center;
}

.sdet-modal-audit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0 14px;
}

.sdet-modal-audit-head strong {
  font-size: 14px;
  color: var(--text);
}

.sdet-inline-download {
  min-height: 34px;
}

.sdet-modal-history {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (max-width: 980px) {
  .sdet-final-doc-body {
    align-items: stretch;
    flex-direction: column;
  }

  .sdet-history-overview {
    grid-template-columns: 1fr;
  }

  .sdet-history-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .sdet-history-time {
    white-space: normal;
  }
}

@media (max-width: 620px) {
  .sdet-final-doc-modal {
    width: calc(100% - 24px);
  }

  .sdet-final-doc-modal-summary {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .sdet-final-doc-modal-summary article,
  .sdet-final-doc-modal-summary article:first-child {
    padding: 0;
  }

  .sdet-final-doc-modal-summary article + article {
    border-left: 0;
  }

  .sdet-final-doc-modal .modal-foot .btn {
    flex: 1 1 0;
    justify-content: center;
  }
}

.sdet-modal-history-item {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #faf8f4;
}

.sdet-modal-history-bullet {
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}

.sdet-modal-history-copy {
  flex: 1;
  min-width: 0;
}

.sdet-modal-history-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.sdet-modal-history-top strong {
  font-size: 14px;
  color: var(--text);
}

.sdet-modal-history-top span {
  font-size: 12px;
  color: var(--muted2);
  white-space: nowrap;
}

.sdet-modal-history-copy p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
}

.sdet-modal-history-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 8px;
}

.sdet-modal-history-meta span {
  font-size: 12px;
  color: var(--muted);
}

.sdet-textarea {
  min-height: 92px;
  resize: vertical;
}

#sdetMonthEditZone.is-disabled {
  opacity: 0.6;
  pointer-events: none;
}

@media (max-width: 1320px) {
  .sdet-docs-grid,
  .sdet-month-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  body.student-detail-page .db-header {
    grid-template-columns: 1fr;
  }

  .sdet-top-grid {
    grid-template-columns: 1fr;
  }

  .sdet-programme-summary {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 860px) {
  .sdet-actions-strip {
    flex-direction: column;
    align-items: flex-start;
  }

  .sdet-head-actions,
  .sdet-month-legend,
  .sdet-month-footer,
  .sdet-modal-audit-head,
  .sdet-history-top,
  .sdet-docs-head,
  .sdet-modal-history-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .sdet-profile-grid,
  .sdet-student-grid,
  .sdet-finance-simple-grid,
  .sdet-formation-summary-grid,
  .sdet-profile-form-grid,
  .sdet-finance-grid,
  .sdet-formation-grid,
  .sdet-docs-grid,
  .sdet-month-grid,
  .sdet-month-meta-list,
  .sdet-modal-summary {
    grid-template-columns: 1fr;
  }

  .sdet-info-item--wide {
    grid-column: span 1;
  }

  .sdet-profile-form-wide {
    grid-column: span 1;
  }

  .sdet-profile-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .sdet-finance-foot {
    flex-direction: column;
    align-items: stretch;
  }

  .sdet-student-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .sdet-student-barcode {
    min-width: 0;
  }

  .sdet-header-id-card {
    width: 100%;
    min-width: 0;
  }
}

/*
   LEADS — lead-*
*/
body.leads-page .main-content {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.lead-list-card {
  overflow: hidden;
}

.lead-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  min-width: 1060px;
  padding: 14px 24px;
}

.lead-search {
  flex: 1 1 360px;
  min-width: 320px;
  max-width: none;
}

.lead-search .form-input {
  padding-left: 40px;
}

.lead-select {
  min-width: 200px;
  flex: 0 0 200px;
}

.lead-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.lead-table-wrap {
  padding-bottom: 10px;
}

.lead-table-head,
.lead-table-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.35fr) minmax(120px, 0.8fr) minmax(170px, 1fr) minmax(120px, 0.7fr) minmax(110px, 0.72fr) minmax(100px, 0.7fr);
  gap: 14px;
  align-items: center;
  padding-left: 24px;
  padding-right: 24px;
}

.lead-table-head {
  padding-top: 12px;
  padding-bottom: 12px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.lead-table-head span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted2);
}

.lead-table-row {
  min-height: 86px;
  padding-top: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.lead-table-row:last-child {
  border-bottom: none;
}

.lead-name-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.lead-name-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  line-height: 0;
  background: linear-gradient(135deg, rgba(184, 137, 42, 0.20), rgba(122, 80, 16, 0.10));
  color: var(--gold-light);
  border: 1px solid rgba(184, 137, 42, 0.16);
  box-shadow: 0 8px 18px rgba(184, 137, 42, 0.12);
  flex-shrink: 0;
}

.lead-name-avatar svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: block;
  width: 17px;
  height: 17px;
  z-index: 1;
}

.leads-page .db-header,
.personnel-page .db-header {
  justify-content: space-between;
}

.leads-page .db-header > div,
.personnel-page .db-header > div {
  margin-right: auto;
  text-align: left;
}

.lead-name-cell strong {
  display: block;
  font-size: 14px;
  color: var(--text);
}

.lead-name-cell span {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

.lead-name-cell .lead-name-avatar {
  display: inline-flex;
  margin-top: 0;
  color: var(--gold-light) !important;
}

.lead-name-cell .lead-name-avatar svg {
  color: currentColor;
}

.lead-contact-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.lead-name-cell .lead-contact-meta,
.lead-name-cell .lead-contact-meta span {
  display: inline-flex;
  align-items: center;
  margin-top: 0;
}

.lead-contact-label {
  margin-top: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted2);
}

.lead-contact-value {
  display: inline-block;
  margin-top: 0;
  padding: 0;
  color: var(--gold-light);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.lead-phone,
.lead-programme,
.lead-date {
  font-size: 13px;
  color: var(--text);
}

.lead-programme {
  font-weight: 700;
}

.lead-phone {
  font-variant-numeric: tabular-nums;
}

.lead-phone-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(184, 137, 42, 0.10);
  color: var(--gold-light);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.lead-phone-chip svg {
  flex-shrink: 0;
}

.lead-date {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
}

.lead-date-main {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.lead-date-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
}

.lead-date-time svg {
  flex-shrink: 0;
}

.lead-actions {
  justify-content: flex-start;
}

.lead-delete-form {
  margin: 0;
}

.lead-status-enrolled {
  color: var(--blue);
  background: rgba(61, 114, 188, 0.10);
}

.lead-status-enrolled::before {
  background: var(--blue);
}

.lead-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 24px 34px;
  color: var(--muted);
  text-align: center;
}

.lead-empty-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(184, 137, 42, 0.10);
  color: var(--gold);
}

.lead-empty-state strong {
  font-size: 15px;
  color: var(--text);
}

.lead-empty-state p {
  margin: 0;
  font-size: 12.5px;
}

.lead-empty-state[hidden] {
  display: none !important;
}

.lead-modal {
  max-width: 520px;
}

.lead-modal-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.lead-modal-summary article {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #faf8f4;
}

.lead-modal-summary span {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted2);
}

.lead-modal-summary strong {
  display: block;
  font-size: 16px;
  line-height: 1.35;
  color: var(--text);
}

@media (max-width: 1180px) {
  .lead-toolbar {
    align-items: center;
  }

  .lead-select {
    flex: 0 0 200px;
  }

  .lead-table-wrap {
    overflow-x: auto;
  }

  .lead-table-head,
  .lead-table-row {
    min-width: 980px;
  }
}

@media (max-width: 760px) {
  .lead-toolbar-actions {
    width: 100%;
  }

  .lead-toolbar-actions .btn {
    flex: 1 1 0;
    justify-content: center;
  }

  .lead-modal-summary {
    grid-template-columns: 1fr;
  }
}

/*
   PERSONNEL — pers-*
*/
body.personnel-page .main-content {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.pers-filter-card {
  overflow: hidden;
}

.pers-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  min-width: 960px;
}

.pers-search {
  flex: 1 1 360px;
  max-width: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
}

.pers-search .form-input {
  border: 0;
  padding: 0;
  height: auto;
  background: transparent;
}

.pers-search svg {
  color: var(--muted);
  flex-shrink: 0;
}

.pers-select {
  min-width: 180px;
  width: 190px;
  height: 42px;
}

.pers-reset-btn {
  height: 42px;
  white-space: nowrap;
}

.pers-panel {
  overflow: hidden;
}

.pers-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 22px;
}

.pers-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 22px 28px;
  color: var(--muted);
  text-align: center;
}

.pers-empty-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(184,137,42,0.10);
  color: var(--gold);
}

.pers-empty-state strong {
  font-size: 15px;
  color: var(--text);
}

.pers-empty-state p {
  margin: 0;
  font-size: 12.5px;
}

.pers-empty-state[hidden] {
  display: none !important;
}

.pers-card {
  padding: 20px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,245,239,0.95));
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.pers-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.pers-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.pers-card-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.pers-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(184,137,42,0.20), rgba(122,80,16,0.10));
  color: var(--gold-light);
  border: 1px solid rgba(184,137,42,0.16);
  flex-shrink: 0;
}

.pers-card-identity h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.pers-card-identity p {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.pers-identity-sep {
  margin: 0 5px;
  color: var(--muted2);
}

.pers-actions {
  flex-shrink: 0;
}

.pers-card-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pers-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.pers-pill.is-trainer {
  background: rgba(184,137,42,0.12);
  color: var(--gold-light);
}

.pers-pill.is-admin {
  background: rgba(61,114,188,0.10);
  color: var(--blue);
}

.pers-pill.is-active {
  background: rgba(46,158,104,0.10);
  color: var(--green);
}

.pers-pill.is-inactive {
  background: rgba(196,78,78,0.10);
  color: var(--red);
}

.pers-pill.is-neutral {
  background: rgba(0,0,0,0.04);
  color: var(--muted);
}

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

.pers-stat {
  padding: 14px 14px 13px;
  border-radius: 14px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(0,0,0,0.05);
  min-width: 0;
}

.pers-stat-label {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted2);
}

.pers-stat strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.pers-card-note {
  padding-top: 2px;
}

.pers-card-note span {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted2);
}

.pers-card-note p {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.55;
}

.pers-modal {
  max-width: 640px;
}

@media (max-width: 1180px) {
  .pers-filter-card {
    overflow-x: auto;
  }

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

@media (max-width: 760px) {
  .pers-grid {
    padding: 18px;
  }

  .pers-card {
    padding: 18px;
  }

  .pers-card-top {
    flex-direction: column;
    align-items: stretch;
  }

  .pers-card-stats {
    grid-template-columns: 1fr;
  }
}

.nreg-field-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 0;
  font-size: 11.5px;
  color: var(--muted);
}

/*
   GROUPS — grp-*
*/
body.groups-page .main-content {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.grp-occupancy-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}
.grp-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  min-width: 38px;
}
.grp-bar {
  width: 80px;
  height: 6px;
  border-radius: 3px;
  background: #e8e3da;
  flex-shrink: 0;
}
.grp-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d4a84b, #b8892a);
}
.grp-pct {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  min-width: 28px;
}

.grp-date-ui {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text);
}

.grp-date-main,
.grp-date-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.grp-date-main {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}

.grp-date-time {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.grp-date-main svg,
.grp-date-time svg {
  flex-shrink: 0;
  color: var(--gold-light);
}
.grp-delete-form {
  margin: 0;
  display: inline-flex;
}

.grp-filter-card,
.grp-table-card,
.grp-highlight-card {
  overflow: hidden;
}

.grp-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  min-width: 980px;
}

.grp-search {
  flex: 1 1 360px;
  max-width: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
}

.grp-search .form-input {
  border: 0;
  padding: 0;
  height: auto;
  background: transparent;
}

.grp-search svg {
  color: var(--muted);
  flex-shrink: 0;
}

.grp-select {
  min-width: 190px;
  width: 200px;
  height: 42px;
}

.grp-reset-btn {
  height: 42px;
  white-space: nowrap;
}

.grp-table-wrap {
  padding-bottom: 8px;
}

.grp-highlight-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
  background:
    radial-gradient(circle at top right, rgba(184,137,42,0.10), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,245,239,0.95));
}

.grp-highlight-main {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.grp-highlight-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted2);
}

.grp-highlight-main strong {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.grp-highlight-main p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.grp-highlight-side {
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: flex-end;
}

.grp-highlight-side span {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold-light);
}

.grp-highlight-meter {
  width: 220px;
  height: 10px;
  border-radius: 999px;
  background: rgba(184,137,42,0.10);
  overflow: hidden;
}

.grp-highlight-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d0a64a, #a67822);
}

.grp-table-head,
.grp-table-row {
  display: grid;
  grid-template-columns: minmax(100px, 0.65fr) minmax(220px, 1.35fr) minmax(170px, 1fr) minmax(160px, 0.9fr) minmax(120px, 0.8fr) minmax(120px, 0.8fr);
  gap: 14px;
  align-items: center;
  padding-left: 24px;
  padding-right: 24px;
}

.grp-table-head {
  padding-top: 12px;
  padding-bottom: 12px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.grp-table-head span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted2);
}

.grp-table-row {
  min-height: 84px;
  padding-top: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.grp-table-row:last-child {
  border-bottom: none;
}

.grp-cell-id strong,
.grp-cell-owner strong,
.grp-cell-date strong {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

.grp-cell-id em,
.grp-cell-owner em,
.grp-cell-date em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: 11.5px;
  color: var(--muted);
}

.grp-cell-name strong,
.grp-cell-count strong {
  display: block;
  font-size: 14.5px;
  color: var(--text);
}

.grp-cell-name em,
.grp-cell-date em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}

.grp-cell-count {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.grp-occupancy {
  display: flex;
  align-items: center;
  gap: 10px;
}

.grp-occupancy small {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
}

.grp-occupancy-bar {
  width: 92px;
  height: 7px;
  border-radius: 999px;
  background: rgba(0,0,0,0.06);
  overflow: hidden;
}

.grp-occupancy-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d0a64a, #a67822);
}

.grp-cell-date {
  display: flex;
  flex-direction: column;
}

.grp-cell-owner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.grp-cell-owner svg {
  width: 34px;
  height: 34px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(184,137,42,0.10);
  color: var(--gold-light);
  flex-shrink: 0;
}

.grp-actions {
  justify-content: flex-start;
  gap: 8px;
}

.grp-delete-form {
  margin: 0;
}

.grp-action-view {
  background: rgba(61,114,188,0.08);
  color: var(--blue);
  border-color: rgba(61,114,188,0.12);
}

.grp-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 36px 24px 30px;
  text-align: center;
  color: var(--muted);
}

.grp-empty-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(184,137,42,0.10);
  color: var(--gold);
}

.grp-empty-state strong {
  font-size: 15px;
  color: var(--text);
}

.grp-empty-state p {
  margin: 0;
  font-size: 12.5px;
}

.grp-empty-state[hidden] {
  display: none !important;
}

.grp-modal {
  max-width: 520px;
}

.grp-modal-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.grp-view-modal {
  max-width: 760px;
}

.grp-view-sub {
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
}

.grp-view-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.grp-view-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.grp-view-summary article {
  padding: 14px 15px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(250,248,244,0.85);
}

.grp-view-summary span {
  display: block;
  margin-bottom: 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted2);
}

.grp-view-summary strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.grp-student-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.grp-student-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(250,248,244,0.75);
}

.grp-student-index {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(184,137,42,0.10);
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.grp-student-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.grp-student-main {
  flex: 1;
  min-width: 0;
}

.grp-student-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

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

.grp-student-meta span:first-child {
  font-weight: 600;
  color: var(--text);
}

.grp-student-link {
  flex-shrink: 0;
}

.grp-view-empty {
  margin: 0;
  padding: 10px 2px 0;
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 1180px) {
  .grp-filter-card,
  .grp-table-wrap {
    overflow-x: auto;
  }

  .grp-highlight-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .grp-highlight-side {
    align-items: flex-start;
  }

  .grp-table-head,
  .grp-table-row {
    min-width: 980px;
  }
}

@media (max-width: 760px) {
  .grp-filters {
    align-items: stretch;
  }

  .grp-reset-btn {
    flex: 1 1 auto;
  }

  .grp-view-head-actions {
    width: 100%;
    justify-content: space-between;
  }

  .grp-view-summary {
    grid-template-columns: 1fr;
  }

  .grp-student-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .grp-student-link {
    width: 100%;
    justify-content: center;
  }
}

/*
   MATRICS — mat-*
*/
body.matrics-page .main-content {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.mat-hero {
  padding: 22px 24px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at top right, rgba(184,137,42,0.10), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,245,239,0.94));
}

.mat-hero-copy {
  max-width: 760px;
}

.mat-hero-kicker {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.mat-hero-copy p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}

.mat-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mat-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.mat-section-kicker {
  display: inline-block;
  margin-bottom: 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted2);
}

.mat-section-head h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 500;
  color: var(--text);
  font-family: var(--font-head);
}

.mat-section-head p {
  max-width: 760px;
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

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

.mat-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100%;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(249,246,241,0.94));
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.mat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

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

.mat-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mat-icon.good {
  background: rgba(46,158,104,0.10);
  color: var(--green);
}

.mat-icon.warn {
  background: rgba(184,137,42,0.10);
  color: var(--gold-light);
}

.mat-icon.alert {
  background: rgba(196,78,78,0.10);
  color: var(--red);
}

.mat-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.mat-chip.good {
  background: rgba(46,158,104,0.10);
  color: var(--green);
}

.mat-chip.warn {
  background: rgba(184,137,42,0.10);
  color: var(--gold-light);
}

.mat-chip.alert {
  background: rgba(196,78,78,0.10);
  color: var(--red);
}

.mat-card-main h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.mat-value {
  margin-top: 10px;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.mat-context {
  margin: 10px 0 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
}

.mat-card-notes {
  display: grid;
  gap: 12px;
}

.mat-note-block {
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.mat-note-block span {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted2);
}

.mat-note-block p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
}

@media (max-width: 1180px) {
  .mat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .mat-grid {
    grid-template-columns: 1fr;
  }

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

  .mat-value {
    font-size: 26px;
  }
}

/* ============================================================
   PAIEMENTS — new table layout (pay-kpi-grid + table cells)
   ============================================================ */
.pay-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 1100px) {
  .pay-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .pay-kpi-grid { grid-template-columns: 1fr; }
}

.prog-metric-icon.rose {
  background: linear-gradient(135deg, #f472b6, #db2777);
  color: #fff;
}

/* Student / Payeur cell */
.pay-student-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pay-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.pay-avatar-generic {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(184,137,42,0.15), rgba(122,80,16,0.10));
  color: var(--gold-light);
  border: 1px solid var(--border);
}

.pay-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.pay-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--muted);
}

.pay-meta svg {
  color: var(--gold-light);
  flex-shrink: 0;
}

/* Source cell */
.pay-source-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pay-source-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.pay-source-sub {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.35;
}

/* Amount cell */
.pay-amount {
  font-size: 20px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.pay-ref {
  margin-top: 5px;
  font-size: 10.5px;
  color: var(--muted2);
  font-variant-numeric: tabular-nums;
  font-family: monospace;
  letter-spacing: 0.04em;
}

/* Collector cell */
.pay-collector-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.pay-collector-by {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--muted);
}

.pay-collector-by svg {
  color: var(--muted2);
  flex-shrink: 0;
}

/* Date cell */
.pay-date-main {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.pay-date-time {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted2);
  font-variant-numeric: tabular-nums;
}

/* Empty row in table */
.prog-empty-row {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
  font-size: 13px;
}

/* Paiements table — per-source left border accent */
.paiements-page .data-table td {
  padding: 20px 18px;
}

.paiements-page .data-table td:first-child {
  padding-left: 24px;
}

.paiements-page .data-table tbody tr:hover td {
  background: #f7f4ef;
}

/* Column widths */
.pay-td-student  { min-width: 220px; }
.pay-td-source   { min-width: 200px; }
.pay-td-amount   { min-width: 140px; white-space: nowrap; }
.pay-td-method   { min-width: 120px; white-space: nowrap; }
.pay-td-collector{ min-width: 160px; }
.pay-td-date     { min-width: 132px; white-space: nowrap; }
.pay-td-actions  { width: 112px; text-align: center; }
.pay-th-actions  { width: 112px; }

/* Method badges */
.pay-method-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
}

.pay-method-espece {
  background: rgba(46, 158, 104, 0.10);
  color: #1a7a4a;
}

.pay-method-virement {
  background: rgba(61, 114, 188, 0.10);
  color: var(--blue);
}

/* ============================================================
   PAIEMENTS — 4-zone ledger (id · source · financial · actions)
   ============================================================ */
.pay-ledger {
  overflow: hidden;
}

#dashboardPaymentsTable {
  margin-top: 28px;
  margin-bottom: 28px;
}

.pay-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  transition: background 0.14s;
}

.pay-item:last-of-type { border-bottom: none; }
.pay-item:hover        { background: #f9f6f1; }

/* ── Table header row ── */
.pay-tbl-head {
  display: grid;
  grid-template-columns: 210px 1fr 120px 108px 188px 164px 112px;
  align-items: center;
  padding: 0 24px;
  height: 40px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.pay-th {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.pay-th-amount    { text-align: right; }
.pay-th-method    { text-align: center; }
.pay-th-date      { text-align: left; }
.pay-th-actions   { text-align: right; }

/* ── Data row grid ── */
.pay-item {
  display: grid;
  grid-template-columns: 210px 1fr 120px 108px 188px 164px 112px;
  align-items: center;
  padding: 0 24px;
  min-height: 68px;
  gap: 0;
}

.pay-td {
  padding: 16px 8px;
  min-width: 0;
}

.pay-td:first-child { padding-left: 0; }
.pay-td:last-child  { padding-right: 0; }

/* Payeur cell */
.pay-td-payer {
  display: flex;
  align-items: center;
  gap: 11px;
}

.ptd-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid var(--border);
}

.ptd-avatar.ptd-avatar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(184,137,42,.13), rgba(122,80,16,.08));
  color: var(--gold-light);
}

.ptd-payer-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.ptd-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ptd-name-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.ptd-inline-ref {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(201, 147, 39, 0.10);
  border: 1px solid rgba(201, 147, 39, 0.14);
  color: var(--gold-dark);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.1;
  white-space: nowrap;
}

.ptd-inline-flag {
  background: rgba(198, 82, 82, 0.09);
  border-color: rgba(198, 82, 82, 0.14);
  color: #a44b4b;
}

.ptd-sub {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Source cell */
.pay-td-source {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.ptd-src-name {
  font-size: 12.5px;
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.ptd-src-ctx {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* Amount cell */
.pay-td-amount {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.ptd-amount {
  font-size: 20px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.ptd-ref {
  font-size: 10px;
  color: var(--muted2);
  font-family: monospace;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* Method cell */
.pay-td-method {
  text-align: center;
}

/* Collector cell */
.pay-td-collector {
  display: flex;
  align-items: center;
  gap: 5px;
}

.pay-td-collector svg { flex-shrink: 0; opacity: 0.55; color: var(--muted); }

.ptd-collector-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.ptd-collector {
  display: block;
  font-size: 12.5px;
  color: var(--text);
  font-weight: 700;
  line-height: 1.25;
}

.ptd-collector-by {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.3;
}

/* Date cell */
.pay-td-date {
  padding-left: 4px;
  padding-right: 18px;
  text-align: left;
}

.ptd-date-copy {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.ptd-date {
  display: inline-flex;
  align-items: center;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.ptd-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
}

.ptd-time svg {
  flex-shrink: 0;
  color: var(--gold-light);
}

/* Actions cell */
.pay-td-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding-left: 0;
  padding-right: 0;
}

/* Method badge */
.pay-method-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.pay-method-espece   { background: rgba(46,158,104,.10); color: #1a7a4a; }
.pay-method-virement { background: rgba(61,114,188,.10); color: var(--blue); }

/* Empty state */
.pay-empty-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 48px 24px;
  color: var(--muted);
  font-size: 13px;
}

/* Meta separator dot */
.pay-meta-dot {
  color: var(--muted2);
  margin: 0 2px;
}

/* ============================================================
   PAIEMENTS — Premium Detail Modal
   ============================================================ */
.pay-detail-modal {
  max-width: 620px;
  padding: 0;
  overflow: hidden;
}

.pay-detail-modal-inner {
  display: flex;
  flex-direction: column;
  max-height: 88vh;
}

/* Hero banner */
.pay-dm-hero {
  background: linear-gradient(135deg, #2c2014 0%, #4a3520 50%, #2c2014 100%);
  padding: 28px 28px 24px;
  flex-shrink: 0;
}

.pay-dm-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.pay-dm-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 6px;
}

.pay-dm-amount {
  font-size: 38px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1;
}

.pay-dm-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.16s, color 0.16s;
}

.pay-dm-close:hover {
  background: rgba(255,255,255,0.16);
  color: #fff;
}

.pay-dm-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pay-dm-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  backdrop-filter: blur(4px);
}

/* Body */
.pay-dm-body {
  padding: 24px 28px 8px;
  overflow-y: auto;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pay-dm-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pay-dm-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted2);
  margin-bottom: 8px;
}

.pay-dm-section-title svg {
  color: var(--gold-light);
}

.pay-dm-rows {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.pay-dm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.pay-dm-row:last-child {
  border-bottom: none;
}

.pay-dm-row span {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 500;
  flex-shrink: 0;
}

.pay-dm-row strong {
  font-size: 13px;
  color: var(--text);
  font-weight: 700;
  text-align: right;
}

/* Note */
.pay-dm-note {
  background: #faf8f4;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}

.pay-dm-note[hidden] { display: none; }

.pay-dm-note-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted2);
  margin-bottom: 8px;
}

.pay-dm-note p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

/* Footer */
.pay-dm-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 28px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.pay-dm-profile-link[hidden] { display: none; }
.pay-dm-invoice-link[hidden] { display: none; }
.pay-dm-print-link[hidden] { display: none; }

/* ═══════════════════════════════════════════
   PARAMÈTRES PAGE
   ═══════════════════════════════════════════ */

/* Layout */
.set-layout {
  display: grid;
  grid-template-columns: 196px 1fr;
  gap: 20px;
  align-items: start;
}

/* Left Nav */
.set-nav {
  padding: 8px !important;
}

.set-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
  margin-bottom: 2px;
}

.set-nav-item:hover {
  background: var(--surface-alt);
  color: var(--text);
}

.set-nav-item.active {
  background: var(--text);
  color: #fff;
}

.set-nav-item svg {
  flex-shrink: 0;
  opacity: 0.75;
}

.set-nav-item.active svg {
  opacity: 1;
}

/* Panels */
.set-panel {
  display: none;
}

.set-panel.active {
  display: block;
}

.set-content {
  min-width: 0;
}

/* Cards */
.set-card {
  margin-bottom: 20px;
  cursor: default;
}

.set-card:last-child {
  margin-bottom: 0;
}

.set-card-narrow {
  max-width: 500px;
}

/* Section heading inside card */
.set-section-head {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 18px;
}

.set-section-head svg {
  opacity: 0.55;
}

/* Section heading with action button */
.set-section-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.set-section-head-row .set-section-head {
  margin-bottom: 0;
}

.set-card-desc {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: -10px;
  margin-bottom: 18px;
  line-height: 1.55;
}

/* Form grid */
.set-form-grid {
  display: grid;
  gap: 12px 16px;
  margin-bottom: 18px;
}

.set-form-grid-2 {
  grid-template-columns: 1fr 1fr;
}

.set-full-col {
  grid-column: 1 / -1;
}

.set-card-foot {
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}

/* Field hint */
.set-field-hint {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 4px;
}

/* Required star */
.form-req {
  color: #dc2626;
  margin-left: 1px;
}

/* Password wrapper */
.set-pw-wrap {
  position: relative;
}

.set-pw-wrap .form-input {
  padding-right: 40px;
}

.set-pw-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  padding: 0;
  display: flex;
  align-items: center;
  line-height: 1;
}

.set-pw-toggle:hover {
  color: var(--text);
}

/* Modal close button (X) */
.modal-x-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  border-radius: 6px;
  padding: 0;
  transition: background 0.15s, color 0.15s;
}

.modal-x-btn:hover {
  background: var(--surface-alt);
  color: var(--text);
}

/* modal-lg */
.modal-lg {
  max-width: 680px;
  width: 100%;
}

/* ── User List ── */
.usr-list-head {
  display: grid;
  grid-template-columns: 1fr 130px 160px 96px 66px 72px;
  gap: 12px;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted2);
}

.usr-list {
  display: flex;
  flex-direction: column;
}

.usr-item {
  display: grid;
  grid-template-columns: 1fr 130px 160px 96px 66px 72px;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}

.usr-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.usr-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.usr-avatar {
  flex-shrink: 0;
}

.usr-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.usr-phone {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

.usr-role-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: rgba(212,168,75,0.12);
  color: var(--gold);
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.usr-last-access,
.usr-perm-count {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}

.usr-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.usr-status::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.usr-status.is-on  { color: var(--green); }
.usr-status.is-on::before  { background: var(--green); }
.usr-status.is-off { color: var(--muted); }
.usr-status.is-off::before { background: var(--muted2); }

.usr-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

/* ── Permission matrix ── */
.perm-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.perm-section-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.perm-section-title svg {
  opacity: 0.6;
}

.perm-matrix {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.perm-matrix-head,
.perm-matrix-row {
  display: grid;
  grid-template-columns: 1fr repeat(4, 88px);
  align-items: center;
}

.perm-matrix-head {
  background: var(--surface-alt);
  padding: 8px 14px;
}

.perm-matrix-row {
  padding: 9px 14px;
  border-top: 1px solid var(--border);
  transition: background 0.12s;
}

.perm-matrix-row:hover {
  background: var(--surface-alt);
}

.perm-col-mod {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}

.perm-matrix-head .perm-col-mod {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted2);
}

.perm-col-act {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted2);
}

/* Custom checkbox */
.perm-cb-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}

.perm-cb {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.perm-cb-box {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}

.perm-cb:checked + .perm-cb-box {
  background: var(--gold);
  border-color: var(--gold);
}

.perm-cb:checked + .perm-cb-box::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
}

.perm-cb-wrap:hover .perm-cb-box {
  border-color: var(--gold);
}

/* ═══════════════════════════════════════════
   PARAMÈTRES — v2 (horizontal tabs)
   ═══════════════════════════════════════════ */

/* Tab bar */
.sett-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 1.5px solid var(--border);
}

.sett-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1.5px;
  transition: color 0.15s;
  border-radius: 6px 6px 0 0;
  white-space: nowrap;
}

.sett-tab svg { flex-shrink: 0; opacity: 0.7; }
.sett-tab:hover { color: var(--text); }
.sett-tab.active { color: var(--text); border-bottom-color: var(--gold); }
.sett-tab.active svg { opacity: 1; }

/* Panels */
.sett-panel { display: none; }
.sett-panel.active { display: block; }

/* Cards */
.sett-card { margin-bottom: 20px; cursor: default; }
.sett-card:last-child { margin-bottom: 0; }
/* 2-col form grid */
.sett-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
  padding: 22px 24px 6px;
}

/* kill the form-group bottom margin — let the grid gap handle it */
.sett-form .form-group { margin-bottom: 0; }

/* single-col variant (sécurité) */
.sett-form-1col {
  grid-template-columns: 1fr;
}

.sett-full-col { grid-column: 1 / -1; }

.sett-card-foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

/* Modal form — no extra padding (modal-body already has it) */
.sett-form-modal {
  padding: 0 0 4px !important;
}
.sett-form-modal .form-group { margin-bottom: 14px; }

/* Security form body padding */
.sett-pw-body {
  padding: 22px 24px 6px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.sett-pw-body .form-group { margin-bottom: 0; }

/* Small hint text */
.sett-hint {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 4px;
}

/* Required star */
.sett-req { color: #dc2626; margin-left: 1px; }

/* Password row */
.sett-pw-row {
  position: relative;
}
.sett-pw-row .form-input {
  padding-right: 40px;
}
.sett-pw-eye {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  padding: 0;
  display: flex;
  align-items: center;
  line-height: 1;
}
.sett-pw-eye:hover { color: var(--text); }

/* Modal close X */
.sett-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  border-radius: 6px;
  padding: 0;
  transition: background 0.15s, color 0.15s;
}
.sett-modal-close:hover { background: var(--surface-alt); color: var(--text); }

/* Large modal */
.modal-lg { max-width: 680px; width: 100%; }
.sett-user-modal {
  max-width: 780px;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: min(92vh, 980px);
}

.sett-user-modal form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.sett-user-modal .modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 28px;
}

.sett-access-card {
  overflow: hidden;
}

.sett-access-head-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sett-access-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(184, 137, 42, 0.16);
  background: linear-gradient(180deg, rgba(184, 137, 42, 0.12), rgba(184, 137, 42, 0.06));
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.sett-access-chip.is-soft {
  border-color: rgba(0, 0, 0, 0.07);
  background: rgba(0, 0, 0, 0.03);
  color: var(--muted);
}

/* User table */
.usr-tbl-head {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) 150px 190px 120px 86px 88px;
  gap: 12px;
  padding: 16px 28px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted2);
  margin-bottom: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.015), rgba(0, 0, 0, 0));
}

.usr-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) 150px 190px 120px 86px 88px;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  transition: background 0.16s ease, transform 0.16s ease;
}
.usr-row:last-child { border-bottom: none; }
.usr-row:hover {
  background: linear-gradient(180deg, rgba(184, 137, 42, 0.035), rgba(184, 137, 42, 0.015));
}

.usr-tbl-head > span:nth-child(3),
.usr-row > :nth-child(3) {
  padding-left: 14px;
  border-left: 1px solid rgba(0, 0, 0, 0.055);
}

.usr-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.usr-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.usr-phone {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
}

.usr-role-pill {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  justify-self: start;
  width: max-content;
  min-height: 0;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.018), rgba(0, 0, 0, 0.01));
  color: #6f6963;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.usr-avatar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(184, 137, 42, 0.18), rgba(184, 137, 42, 0.09));
  border: 1px solid rgba(184, 137, 42, 0.12);
  color: var(--gold-light);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.usr-avatar-icon svg {
  opacity: 0.95;
}

.usr-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}

.usr-meta-perms {
  justify-content: center;
}

.usr-perm-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(46, 158, 104, 0.12), rgba(46, 158, 104, 0.055)),
    rgba(255, 255, 255, 0.7);
  color: #247851;
  border: 1px solid rgba(46, 158, 104, 0.1);
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.usr-perm-pill svg {
  flex-shrink: 0;
}

.usr-perm-pill-copy {
  display: flex;
  align-items: baseline;
}

.usr-perm-pill strong {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-size: 13px;
  font-weight: 800;
  color: #1e6a47;
}

.usr-perm-pill small {
  font-size: 10.5px;
  font-weight: 700;
  color: rgba(36, 120, 81, 0.72);
}

.usr-dot {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.025);
}
.usr-dot::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.usr-dot.on  { color: var(--green); }
.usr-dot.on::before  { background: var(--green); }
.usr-dot.off { color: var(--muted); }
.usr-dot.off::before { background: var(--muted2); }

/* Permission block inside modal */
.sett-perm-block {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.sett-perm-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}
.sett-perm-title svg { opacity: 0.55; }

.sett-perm-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(184, 137, 42, 0.08), rgba(184, 137, 42, 0.03)),
    var(--surface);
  border: 1px solid rgba(184, 137, 42, 0.1);
}

.sett-perm-intro-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sett-perm-intro-copy strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.sett-perm-intro-copy span {
  font-size: 11.5px;
  color: var(--muted);
}

.sett-perm-legend {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: var(--gold-light);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.perm-grid-shell {
  border-radius: 18px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  background:
    radial-gradient(circle at top right, rgba(184, 137, 42, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(244, 242, 238, 0.72));
  overflow: hidden;
}

.perm-grid-shell-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.perm-grid-shell-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.perm-grid-shell-copy strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.perm-grid-shell-copy span {
  font-size: 11.5px;
  color: var(--muted);
}

.perm-grid-shell-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(184, 137, 42, 0.11);
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Permission grid */
.perm-grid {
  overflow: hidden;
  background: transparent;
}

.perm-grid-head,
.perm-grid-row {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) repeat(4, 82px);
  align-items: center;
}

.perm-grid-head {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.018));
  padding: 10px 16px;
}

.perm-grid-row {
  padding: 12px 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.055);
  transition: background 0.14s ease, transform 0.14s ease;
}
.perm-grid-row:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.5));
}

.perm-mod-col {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}
.perm-grid-head .perm-mod-col {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted2);
}

.perm-act-col {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted2);
}

.perm-act-col-disabled {
  opacity: 0.42;
}

/* Custom checkbox */
.perm-check {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  min-height: 34px;
}

.perm-check.is-disabled {
  cursor: not-allowed;
}
.perm-cb {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.perm-box {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.perm-cb:checked + .perm-box {
  background: var(--gold);
  border-color: var(--gold);
  transform: translateY(-1px);
}
.perm-cb:checked + .perm-box::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
}
.perm-check:hover .perm-box { border-color: var(--gold); }
.perm-check.is-disabled:hover .perm-box { border-color: var(--border); }
.perm-check.is-disabled .perm-box {
  background: rgba(0, 0, 0, 0.035);
  border-color: var(--border);
  opacity: 0.75;
}

@media (max-width: 1200px) {
  .usr-tbl-head,
  .usr-row {
    grid-template-columns: minmax(240px, 1.2fr) 140px 160px 110px 82px 84px;
  }
}

@media (max-width: 960px) {
  .sett-access-head-tools {
    width: 100%;
    justify-content: flex-start;
  }

  .perm-grid-shell-head,
  .sett-perm-intro {
    flex-direction: column;
    align-items: flex-start;
  }

  .usr-tbl-head,
  .usr-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .usr-tbl-head {
    display: none;
  }

  .usr-row {
    padding: 18px 20px;
  }

  .usr-row > :nth-child(3) {
    padding-left: 0;
    border-left: none;
  }

  .sett-perm-intro {
    flex-direction: column;
    align-items: flex-start;
  }

  .perm-grid-head,
  .perm-grid-row {
    grid-template-columns: minmax(160px, 1fr) repeat(4, 62px);
  }
}

@media (max-width: 760px) {
  .sett-form {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px 16px 4px;
  }

  .sett-user-modal {
    width: min(96vw, 760px);
    max-height: min(90vh, 90svh);
  }

  .sett-user-modal .modal-head,
  .sett-user-modal .modal-body,
  .sett-user-modal .modal-foot {
    padding-left: 16px;
    padding-right: 16px;
  }

  .sett-user-modal .modal-foot {
    flex-wrap: wrap;
    justify-content: stretch;
  }

  .sett-user-modal .modal-foot .btn {
    flex: 1 1 100%;
  }

  .sett-access-head-tools {
    gap: 8px;
  }

  .sett-access-chip,
  .sett-access-head-tools .btn {
    width: 100%;
    justify-content: center;
  }

  .usr-row {
    padding: 16px;
    gap: 8px;
  }

  .usr-name,
  .usr-phone,
  .usr-meta {
    white-space: normal;
  }

  .usr-meta,
  .usr-meta-perms,
  .sett-access-card .db-row-actions {
    justify-content: flex-start;
  }

  .sett-perm-block {
    margin-top: 18px;
    padding-top: 18px;
  }

  .perm-grid-shell {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .perm-grid {
    min-width: 440px;
  }

  .perm-grid-head,
  .perm-grid-row {
    grid-template-columns: minmax(150px, 1fr) repeat(4, 56px);
  }
}

.sett-span-2 {
  grid-column: 1 / -1;
}

.sett-textarea {
  min-height: 132px;
  resize: vertical;
  padding-top: 14px;
  padding-bottom: 14px;
}

.perm-grid-shell-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.perm-grid-bulk-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.perm-ctl-btn {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(184, 137, 42, 0.14);
  background: rgba(184, 137, 42, 0.08);
  color: var(--gold);
  font-size: 11.5px;
  font-weight: 700;
}

.perm-ctl-btn.is-soft {
  color: var(--muted);
  background: rgba(0, 0, 0, 0.035);
  border-color: rgba(0, 0, 0, 0.08);
}

.sett-announcement-card {
  overflow: hidden;
}

.annc-table-head,
.annc-row {
  display: grid;
  grid-template-columns: minmax(280px, 1.7fr) minmax(150px, 0.9fr) 126px 90px 92px 108px;
  gap: 14px;
  align-items: start;
}

.annc-table-head {
  padding: 16px 28px 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.015), rgba(0, 0, 0, 0));
}

.annc-table-head > span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted2);
}

.annc-row {
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
}

.annc-row:last-child {
  border-bottom: none;
}

.annc-message {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.annc-message-preview-shell {
  display: grid;
  gap: 10px;
  max-width: 560px;
  padding: 14px 15px 13px;
  border-radius: 16px;
  background: rgba(184, 137, 42, 0.045);
}

.annc-message-head {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.annc-message-icon {
  width: 26px;
  height: 26px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(184, 137, 42, 0.08);
  color: #b8892a;
  flex-shrink: 0;
}

.annc-message-preview-kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  color: #b8892a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.annc-message-preview {
  color: var(--announcement-color, #1f1b16);
  font-size: 15px;
  line-height: 1.55;
  word-break: break-word;
  white-space: normal;
  text-wrap: pretty;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}

.annc-message-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.annc-message-meta span,
.annc-audience {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.annc-audience {
  max-width: 160px;
}

.annc-style-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.035);
  color: var(--muted) !important;
  font-size: 10.5px !important;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.annc-mode-pill,
.annc-seen-pill {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(184, 137, 42, 0.08);
  color: var(--gold-light);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.annc-seen-pill {
  background: rgba(46, 158, 104, 0.10);
  color: #247851;
}

.sett-announcement-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sett-choice-chip,
.sett-role-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.sett-choice-chip input,
.sett-role-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sett-choice-chip:has(input:checked),
.sett-role-chip:has(input:checked) {
  border-color: rgba(184, 137, 42, 0.32);
  background: rgba(184, 137, 42, 0.12);
  color: var(--gold);
}

.sett-announcement-scope {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 14px;
}

.sett-editor-toolbar {
  display: grid;
  gap: 16px;
  padding: 18px 18px 16px;
  border-radius: 18px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.72);
}

.sett-editor-toolbar-head {
  display: grid;
  gap: 4px;
}

.sett-editor-toolbar-head strong {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}

.sett-editor-toolbar-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.sett-editor-toolbar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.sett-tool-field {
  display: grid;
  gap: 8px;
}

.sett-tool-field-span-full {
  grid-column: 1 / -1;
}

.sett-alignment-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sett-announcement-roles {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sett-color-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
}

.sett-color-input {
  width: 54px;
  height: 40px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  background: #fff;
  padding: 4px;
}

.sett-color-label {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.04);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.sett-announcement-preview {
  margin-top: 22px;
  border-radius: 18px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 247, 243, 0.94));
  overflow: hidden;
}

.sett-announcement-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(184, 137, 42, 0.10);
}

.sett-announcement-preview-head strong {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}

.sett-announcement-preview-head span {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
}

.sett-announcement-preview-card {
  padding: 20px 18px 22px;
}

.sett-announcement-preview-shell {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(184, 137, 42, 0.04);
}

.sett-announcement-preview-kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  color: #b8892a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sett-announcement-preview-text {
  white-space: pre-line;
  word-break: break-word;
  line-height: 1.58;
  text-wrap: pretty;
}

.sett-announcement-preview-text.is-compact {
  font-size: 15.5px;
  line-height: 1.56;
  letter-spacing: 0.01em;
}

.sett-announcement-preview-text.is-normal {
  font-size: 19px;
}

.sett-announcement-preview-text.is-large {
  font-size: 23px;
}

.sett-announcement-preview-text.is-xlarge {
  font-size: 28px;
  line-height: 1.55;
}

.sett-announcement-preview-text.is-left,
.annc-message-preview.is-left {
  text-align: left;
}

.sett-announcement-preview-text.is-center,
.annc-message-preview.is-center {
  text-align: center;
}

.sett-announcement-preview-text.font-sans,
.annc-message-preview.font-sans {
  font-family: var(--font-body);
}

.sett-announcement-preview-text.font-serif,
.annc-message-preview.font-serif {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.01em;
}

.sett-announcement-preview-text.font-soft,
.annc-message-preview.font-soft {
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.sett-announcement-preview-text.font-sidebar,
.annc-message-preview.font-sidebar {
  font-family: var(--font-body);
  letter-spacing: 0.01em;
}

.sett-announcement-preview-text.font-editorial,
.annc-message-preview.font-editorial {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  letter-spacing: 0.005em;
}

.sett-announcement-preview-text.font-humanist,
.annc-message-preview.font-humanist {
  font-family: Optima, Candara, "Segoe UI", sans-serif;
}

.sett-announcement-preview-text.weight-light,
.annc-message-preview.weight-light {
  font-weight: 400;
}

.sett-announcement-preview-text.weight-regular,
.annc-message-preview.weight-regular {
  font-weight: 500;
}

.sett-announcement-preview-text.weight-medium,
.annc-message-preview.weight-medium {
  font-weight: 600;
}

.sett-announcement-preview-text.weight-semibold,
.annc-message-preview.weight-semibold {
  font-weight: 700;
}

.sett-announcement-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.sett-announcement-stat {
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.84);
  padding: 16px 18px;
  display: grid;
  gap: 6px;
}

.sett-announcement-stat strong {
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.sett-announcement-stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sett-announcement-people {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.sett-announcement-people-col {
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.84);
  overflow: hidden;
}

.sett-announcement-people-head {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted2);
}

.sett-announcement-people-list {
  max-height: 290px;
  overflow-y: auto;
  padding: 8px;
}

.sett-announcement-person,
.sett-announcement-empty {
  padding: 11px 12px;
  border-radius: 12px;
}

.sett-announcement-person + .sett-announcement-person {
  margin-top: 6px;
}

.sett-announcement-person {
  display: grid;
  gap: 4px;
  background: rgba(184, 137, 42, 0.04);
}

.sett-announcement-person strong {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text);
}

.sett-announcement-person span,
.sett-announcement-empty {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
}

@media (max-width: 960px) {
  .annc-table-head,
  .annc-row {
    grid-template-columns: 1fr;
  }

  .annc-table-head {
    display: none;
  }

  .annc-row {
    padding: 18px 20px;
  }

  .annc-message,
  .annc-audience,
  .annc-mode-pill,
  .annc-seen-pill {
    justify-self: start;
  }

  .perm-grid-shell-tools {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .sett-user-modal.sett-announcement-modal .modal-foot .btn {
    flex: 1 1 100%;
  }

  .sett-announcement-toggle,
  .sett-announcement-roles,
  .perm-grid-bulk-actions,
  .sett-editor-toolbar-grid {
    width: 100%;
  }

  .sett-choice-chip,
  .sett-role-chip,
  .perm-ctl-btn {
    width: 100%;
    justify-content: center;
  }

  .sett-announcement-preview-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .sett-editor-toolbar {
    padding: 16px;
  }

  .sett-editor-toolbar-grid {
    grid-template-columns: 1fr;
  }

  .sett-tool-field-span-full {
    grid-column: auto;
  }

  .sett-announcement-stats,
  .sett-announcement-people {
    grid-template-columns: 1fr;
  }

  .sett-announcement-preview-text.is-normal {
    font-size: 17px;
  }

  .sett-announcement-preview-text.is-large {
    font-size: 20px;
  }

  .sett-announcement-preview-text.is-xlarge {
    font-size: 23px;
  }
}

/* Documents page */
.documents-page .main-content {
  gap: 28px;
}

.doc-type-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.doc-type-chip-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.doc-type-chip-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.doc-type-chip-card--bulk {
  border-color: rgba(39, 77, 128, 0.18);
  background: linear-gradient(135deg, rgba(39, 77, 128, 0.07), rgba(255, 255, 255, 0.94));
  color: #274d80;
}

.doc-type-chip-card--bulk .doc-type-chip-icon {
  background: #eaf1fb;
  color: #315f9b;
}

.doc-type-chip-card.is-disabled {
  opacity: 0.68;
  cursor: not-allowed;
}

.doc-type-chip-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.doc-filter-card {
  margin-top: 16px;
}

.doc-ledger {
  overflow: hidden;
  margin-top: 8px;
}

.doc-table-head,
.doc-row {
  display: grid;
  grid-template-columns: 1.45fr 1.15fr .9fr .9fr 1fr .8fr;
  gap: 16px;
  align-items: center;
}

.doc-table-head {
  padding: 16px 24px 12px;
  border-bottom: 1px solid var(--border);
}

.doc-table-head > div {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted2);
}

.doc-table-head-actions {
  text-align: right;
}

.doc-row {
  padding: 18px 24px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.doc-row:last-of-type {
  border-bottom: 0;
}

.doc-cell {
  min-width: 0;
}

.doc-cell-document {
  display: flex;
  align-items: center;
  gap: 12px;
}

.doc-row-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.doc-row-copy,
.doc-student-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.doc-row-copy strong,
.doc-student-copy strong {
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.45;
}

.doc-row-copy span,
.doc-student-copy span,
.doc-date {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.doc-type-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.doc-ref {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.04em;
}

.doc-cell-actions {
  display: flex;
  justify-content: flex-end;
}

.doc-generate-modal {
  max-width: 720px;
}

.doc-model-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.doc-model-option {
  display: block;
  cursor: pointer;
}

.doc-model-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.doc-model-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.doc-model-card img {
  width: 100%;
  aspect-ratio: 1.42 / 1;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.06);
  background: #f6f2ea;
}

.doc-model-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}

.doc-model-option input:checked + .doc-model-card {
  border-color: rgba(184,137,42,0.48);
  box-shadow: 0 10px 24px rgba(184,137,42,0.12);
  transform: translateY(-1px);
}

.doc-blue-options {
  margin: 14px 0 18px;
  padding: 16px;
  border: 1px solid rgba(61,114,188,0.16);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(61,114,188,0.055), rgba(184,137,42,0.045));
}

.doc-standard-diploma-options {
  margin: 14px 0 18px;
  padding: 16px;
  border: 1px solid rgba(184,137,42,0.18);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(184,137,42,0.07), rgba(255,255,255,0.72));
}

.doc-standard-diploma-options-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(184,137,42,0.14);
}

.doc-standard-diploma-options-head > span {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid rgba(184,137,42,0.18);
  border-radius: 12px;
  background: #fff;
  color: var(--gold);
}

.doc-standard-diploma-options-head strong {
  display: block;
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.35;
}

.doc-standard-diploma-options-head small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.doc-blue-options-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(61,114,188,0.12);
}

.doc-blue-options-head > span {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #fff;
  color: var(--blue);
  border: 1px solid rgba(61,114,188,0.14);
}

.doc-blue-options-head strong {
  display: block;
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.35;
}

.doc-blue-options-head small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.doc-blue-option-card {
  padding: 14px;
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 16px;
  background: rgba(255,255,255,0.72);
}

.doc-blue-option-card + .doc-blue-option-card {
  margin-top: 12px;
}

.doc-blue-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  cursor: pointer;
  color: var(--text);
}

.doc-blue-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.doc-blue-toggle span {
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: rgba(0,0,0,0.10);
  position: relative;
  flex: 0 0 auto;
  transition: background 0.18s ease;
}

.doc-blue-toggle span::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
  transition: transform 0.18s ease;
}

.doc-blue-toggle input:checked + span {
  background: var(--blue);
}

.doc-blue-toggle input:checked + span::after {
  transform: translateX(16px);
}

.doc-blue-toggle strong {
  font-size: 12.5px;
  line-height: 1.4;
}

.doc-blue-dependent {
  margin-bottom: 0;
}

.doc-blue-dependent .form-group {
  margin-bottom: 0;
}

.doc-blue-dependent:has(input:disabled) {
  opacity: .48;
}

.doc-bulk-modal {
  width: min(94vw, 980px);
  max-width: 980px;
  max-height: min(92vh, 920px);
  overflow: hidden;
}

.doc-bulk-modal form,
.doc-bulk-step {
  min-height: 0;
}

.doc-bulk-step:not([hidden]) {
  display: flex;
  flex-direction: column;
  max-height: calc(min(92vh, 920px) - 78px);
}

.doc-bulk-modal .modal-head {
  flex: 0 0 auto;
}

.doc-bulk-modal-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.doc-bulk-config-body,
.doc-bulk-students-body {
  overflow-y: auto;
}

.doc-bulk-config-body {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.doc-bulk-model-panel {
  position: sticky;
  top: 0;
  padding: 12px;
  border: 1px solid rgba(39, 77, 128, 0.15);
  border-radius: 18px;
  background: linear-gradient(155deg, #f7faff 0%, #fff 62%, #fbf7ef 100%);
  box-shadow: 0 14px 32px rgba(35, 55, 79, 0.07);
}

.doc-bulk-model-preview {
  overflow: hidden;
  border: 1px solid rgba(27, 56, 94, 0.1);
  border-radius: 13px;
  background: #fff;
}

.doc-bulk-model-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 1.42 / 1;
  object-fit: cover;
}

.doc-bulk-model-copy {
  padding: 15px 5px 5px;
}

.doc-bulk-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  color: #315f9b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.doc-bulk-model-copy > strong {
  display: block;
  color: var(--text);
  font-family: var(--font-head);
  font-size: 18px;
  line-height: 1.3;
}

.doc-bulk-model-copy p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.doc-bulk-options {
  margin: 0;
}

.doc-bulk-primary-fields .form-group {
  margin-bottom: 0;
}

.doc-bulk-options [data-bulk-dependent] {
  transition: opacity .18s ease;
}

.doc-bulk-options [data-bulk-dependent].is-disabled {
  opacity: .46;
}

.doc-bulk-selection-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.doc-bulk-selection-head h3 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 600;
}

.doc-bulk-selection-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.doc-bulk-selected-count {
  min-height: 32px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(184, 137, 42, .2);
  border-radius: 999px;
  background: rgba(184, 137, 42, .08);
  color: #9a6c17;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.doc-bulk-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.doc-bulk-search {
  flex: 1 1 auto;
}

.doc-bulk-student-list {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.doc-bulk-student-head,
.doc-bulk-student-row {
  display: grid;
  grid-template-columns: 28px minmax(240px, 1.45fr) minmax(170px, .9fr) 120px;
  gap: 14px;
  align-items: center;
}

.doc-bulk-student-head {
  min-height: 42px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: #fbfaf8;
  color: var(--muted2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.doc-bulk-student-row {
  min-height: 68px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, .055);
  cursor: pointer;
  transition: background .16s ease, box-shadow .16s ease;
}

.doc-bulk-student-row:last-of-type {
  border-bottom: 0;
}

.doc-bulk-student-row:hover {
  background: rgba(49, 95, 155, .035);
}

.doc-bulk-student-row.is-selected {
  background: linear-gradient(90deg, rgba(49, 95, 155, .07), rgba(184, 137, 42, .035));
  box-shadow: inset 3px 0 0 #315f9b;
}

.doc-bulk-checkbox {
  display: inline-flex;
}

.doc-bulk-checkbox input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.doc-bulk-checkbox > span {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d8d1c7;
  border-radius: 7px;
  background: #fff;
  color: transparent;
  transition: border-color .16s ease, background .16s ease, color .16s ease;
}

.doc-bulk-checkbox input:checked + span {
  border-color: #315f9b;
  background: #315f9b;
  color: #fff;
}

.doc-bulk-student-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}

.doc-bulk-avatar {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid rgba(184, 137, 42, .16);
  border-radius: 12px;
  background: #faf5eb;
  color: #a6761d;
  font-size: 11px;
  font-weight: 800;
}

.doc-bulk-student-identity > span:last-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.doc-bulk-student-identity strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-bulk-student-identity small,
.doc-bulk-existing small {
  color: var(--muted);
  font-size: 11px;
}

.doc-bulk-status {
  min-height: 28px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 750;
  white-space: nowrap;
}

.doc-bulk-status.is-regulated {
  background: #eaf6ef;
  color: #218556;
}

.doc-bulk-status.is-pending {
  background: #fff3e8;
  color: #b96621;
}

.doc-bulk-existing {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.doc-bulk-existing strong {
  color: #274d80;
  font-size: 16px;
}

.doc-bulk-empty {
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.doc-bulk-empty[hidden],
.doc-bulk-student-row[hidden] {
  display: none;
}

@media (max-width: 820px) {
  .doc-bulk-config-body {
    grid-template-columns: 1fr;
  }

  .doc-bulk-model-panel {
    position: static;
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 12px;
    align-items: center;
  }

  .doc-bulk-model-copy {
    padding: 4px;
  }

  .doc-bulk-student-head {
    display: none;
  }

  .doc-bulk-student-row {
    grid-template-columns: 28px minmax(0, 1fr) auto;
  }

  .doc-bulk-existing {
    display: none;
  }
}

@media (max-width: 560px) {
  .doc-bulk-modal {
    width: min(96vw, 980px);
  }

  .doc-bulk-modal .modal-head {
    align-items: flex-start;
  }

  .doc-bulk-model-panel {
    grid-template-columns: 1fr;
  }

  .doc-bulk-toolbar,
  .doc-bulk-selection-head {
    align-items: stretch;
    flex-direction: column;
  }

  .doc-bulk-toolbar .btn,
  .doc-bulk-selected-count {
    width: 100%;
    justify-content: center;
  }

  .doc-bulk-student-row {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 10px;
  }

  .doc-bulk-student-row > span:nth-child(3) {
    grid-column: 2;
  }
}

.dcb-ledger {
  overflow: hidden;
}

.dcb-table-head,
.dcb-row {
  display: grid;
  grid-template-columns: .95fr 1.6fr 1fr 1.1fr .8fr;
  gap: 16px;
  align-items: center;
}

.dcb-table-head {
  padding: 16px 24px 12px;
  border-bottom: 1px solid var(--border);
}

.dcb-table-head > div {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted2);
}

.dcb-table-actions {
  text-align: right;
}

.dcb-row {
  padding: 18px 24px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.dcb-row:last-of-type {
  border-bottom: 0;
}

.dcb-cell {
  min-width: 0;
}

.dcb-cell-code,
.dcb-cell-actions {
  display: flex;
}

.dcb-cell-actions {
  justify-content: flex-end;
}

.dcb-code-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(184,137,42,0.10);
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dcb-title-copy,
.dcb-author-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dcb-title-copy strong,
.dcb-author-copy strong {
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.45;
}

.dcb-title-copy span,
.dcb-author-copy span,
.dcb-cell {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.dcb-view-modal {
  max-width: 720px;
}

.dcb-view-grid .dep-view-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
}

.dcb-proof-panel {
  margin-top: 16px;
}

@media (max-width: 980px) {
  .dcb-table-head {
    display: none;
  }

  .dcb-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .dcb-cell-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 1100px) {
  .doc-table-head,
  .doc-row {
    grid-template-columns: 1.25fr 1fr .9fr .9fr .95fr .8fr;
    gap: 12px;
  }
}

@media (max-width: 760px) {
  .doc-model-grid {
    grid-template-columns: 1fr;
  }
}

.trace-page-panel .db-card-head {
  padding-bottom: 16px;
}

.trace-filter-bar {
  width: 100%;
  margin-bottom: 24px;
}

.trace-history-list {
  padding-top: 4px;
}

.trace-history-item .sdet-history-field {
  color: #ad7a1e;
}

.trace-history-item .sdet-history-field.sdet-history-field-alert {
  background: rgba(196, 78, 78, 0.12);
  border-color: rgba(196, 78, 78, 0.22);
  color: #b33b3b;
}

.trace-history-item .sdet-history-copy p {
  max-width: 960px;
}

.dec-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.dec-kpis {
  margin-bottom: 28px;
}

.dec-ledger .dcb-table-head,
.dec-ledger .dcb-row {
  grid-template-columns: 1.15fr 2fr 1.8fr 1fr 1.2fr 1.25fr 0.95fr;
}

.dec-ledger .dcb-cell:nth-child(4) {
  justify-self: start;
}

.dec-bank-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dec-bank-copy strong {
  font-weight: 700;
  color: var(--text-color, #201b16);
}

.dec-bank-copy span {
  font-size: 12px;
  color: var(--muted, #81786e);
}

.dec-amount-copy,
.dcb-meta-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dec-amount-copy strong {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  width: max-content;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(184,137,42,0.16), rgba(184,137,42,0.08));
  color: #8e6315;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.dec-amount-copy span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(142, 99, 21, 0.68);
}

.dcb-meta-copy strong {
  font-size: 13px;
  color: var(--text-color, #201b16);
  line-height: 1.35;
}

.dcb-meta-copy span {
  font-size: 12px;
  color: var(--muted, #81786e);
  line-height: 1.45;
}

.dep-view-pill.is-bank {
  background: rgba(184, 137, 42, 0.14);
  color: var(--gold, #b8892a);
}

.dec-accounts-modal {
  width: min(1000px, 92vw);
}

.dec-account-form {
  padding: 20px;
  border: 1px solid rgba(184, 137, 42, 0.14);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 250, 242, 0.95) 0%, rgba(255, 255, 255, 1) 100%);
  margin-bottom: 18px;
}

.dec-bank-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.dec-bank-picker.is-invalid {
  padding: 8px;
  border: 1px solid rgba(211, 78, 78, 0.2);
  border-radius: 20px;
  background: rgba(255, 246, 246, 0.72);
}

.dec-bank-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 108px;
  padding: 16px 12px;
  border: 1px solid rgba(24, 20, 16, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  cursor: pointer;
  transition: border-color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.dec-bank-tile:hover {
  border-color: rgba(184, 137, 42, 0.22);
  background: rgba(255, 250, 242, 0.96);
  transform: translateY(-1px);
}

.dec-bank-tile:focus-visible {
  outline: 2px solid rgba(184, 137, 42, 0.34);
  outline-offset: 2px;
}

.dec-bank-tile.is-selected {
  border-color: rgba(184, 137, 42, 0.38);
  background: linear-gradient(180deg, rgba(255, 248, 233, 0.98) 0%, rgba(255, 252, 246, 1) 100%);
}

.dec-bank-tile-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 38px;
}

.dec-bank-tile-logo img {
  width: 100%;
  max-width: 92px;
  max-height: 34px;
  object-fit: contain;
  object-position: center;
}

.dec-bank-tile-code {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted, #81786e);
}

.dec-rib-group {
  display: grid;
  grid-template-columns: minmax(84px, 0.9fr) auto minmax(84px, 0.9fr) auto minmax(220px, 1.7fr) auto minmax(72px, 0.7fr);
  align-items: center;
  gap: 6px;
}

.dec-rib-part {
  text-align: center;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  min-height: 46px;
  padding-inline: 12px;
}

.dec-rib-part::placeholder {
  letter-spacing: 0.04em;
}

.dec-rib-part-account {
  letter-spacing: 0.12em;
}

.dec-rib-sep {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(129, 120, 110, 0.82);
  font-size: 14px;
  font-weight: 700;
}

.dec-account-form-bottom {
  align-items: end;
  column-gap: 34px;
}

.dec-account-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-left: 16px;
  margin-top: 14px;
}

.dec-account-panel {
  border: 1px solid rgba(24, 20, 16, 0.08);
  border-radius: 22px;
  background: #fff;
  overflow: hidden;
}

.dec-account-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(24, 20, 16, 0.08);
  color: var(--muted, #81786e);
}

.dec-account-list {
  display: flex;
  flex-direction: column;
}

.dec-account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-top: 1px solid rgba(24, 20, 16, 0.06);
}

.dec-account-row:first-child {
  border-top: none;
}

.dec-account-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dec-account-copy > span,
.dec-account-copy > small {
  color: var(--muted, #81786e);
}

.dec-bank-line,
.dec-rib-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dec-bank-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 5px;
  border-radius: 12px;
  background: rgba(255, 251, 245, 0.96);
  border: 1px solid rgba(184, 137, 42, 0.12);
  flex: 0 0 auto;
}

.dec-bank-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.dec-rib-inline {
  color: var(--muted, #81786e);
}

.dec-rib-inline svg {
  color: var(--gold-light);
  flex: 0 0 auto;
}

.dec-account-mainline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dec-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.dec-status-pill.is-active {
  background: rgba(61, 191, 122, 0.14);
  color: #1d8b57;
}

.dec-status-pill.is-inactive {
  background: rgba(129, 120, 110, 0.12);
  color: #75695c;
}

@media (max-width: 1180px) {
  .dec-ledger .dcb-table-head,
  .dec-ledger .dcb-row {
    grid-template-columns: 1.1fr 1.8fr 1.7fr 0.95fr 1.1fr 1.1fr 0.9fr;
  }
}

@media (max-width: 860px) {
  .dec-header-actions {
    width: 100%;
  }

  .dec-header-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .dec-account-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .dec-account-form-actions {
    justify-content: stretch;
    width: 100%;
  }

  .dec-account-form-actions .btn {
    flex: 1 1 0;
    justify-content: center;
  }

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

  .dec-rib-group {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .dec-rib-sep {
    display: none;
  }
}

/* --- Shared Responsive Shell ------------------------------- */
@media (max-width: 1024px) {
  .app-layout {
    display: block;
    min-height: 100svh;
    height: auto;
    overflow: visible;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 84vw);
    height: 100svh;
    transform: translateX(calc(-100% - 12px));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    box-shadow: 0 24px 60px rgba(0,0,0,0.18);
    z-index: 60;
    transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease, visibility 0.22s ease;
    will-change: transform;
  }

  .sidebar-logo-darkmode-guard {
    top: 18px;
    left: 22px;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .sidebar-overlay {
    display: block;
  }

  body.sidebar-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-topbar {
    display: flex;
  }

  .main-wrapper {
    min-height: calc(100svh - 71px);
    overflow: visible;
  }

  .main-content,
  body.dashboard-theme .main-content.dashboard-shell,
  body.paiements-page .main-content,
  body.depenses-page .main-content,
  body.student-detail-page .main-content,
  body.leads-page .main-content,
  body.personnel-page .main-content,
  body.groups-page .main-content,
  body.matrics-page .main-content,
  body.documents-page .main-content {
    padding: 24px 20px 96px;
  }

  .page-header {
    align-items: flex-start;
    margin-bottom: 22px;
  }

  .page-header-actions {
    margin-left: 0;
  }

  .global-notif {
    right: 20px;
    bottom: 20px;
  }

  .global-notif-panel {
    width: min(340px, calc(100vw - 24px));
  }

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

  .prog-filter-card .card-body,
  .pay-filter-card .card-body {
    overflow: visible;
  }

  .prog-filters,
  .pay-filters,
  .grp-filters,
  .frm-filters,
  .etu-filters,
  .pers-filters {
    min-width: 0;
    flex-wrap: wrap;
    align-items: stretch;
  }

  .search-wrap,
  .prog-search,
  .pay-search {
    flex: 1 1 100%;
    max-width: none;
    width: 100%;
  }

  .prog-select,
  .pay-select,
  .grp-select {
    flex: 1 1 calc(50% - 5px);
    width: calc(50% - 5px);
    min-width: 0;
  }

  .prog-reset-btn,
  .grp-reset-btn,
  .etu-reset-btn,
  .frm-reset-btn,
  .pers-reset-btn {
    flex: 1 1 calc(50% - 5px);
    width: calc(50% - 5px);
    justify-content: center;
  }

  .pay-date-range {
    flex: 1 1 100%;
    width: 100%;
  }

  .pay-date-input {
    width: 100%;
    min-width: 0;
  }

  .prog-inline-count {
    margin-left: 0;
    width: 100%;
  }

  .table-wrap,
  .db-table-wrap,
  .pay-table-wrap,
  .lead-table-wrap,
  .grp-table-wrap {
    -webkit-overflow-scrolling: touch;
  }

  .data-table {
    min-width: 760px;
  }

  .modal {
    width: min(94vw, 680px);
    max-height: min(88vh, 88svh);
  }
}

@media (max-width: 760px) {
  .mobile-topbar {
    padding: 12px 14px;
  }

  .mobile-topbar-logo {
    max-width: 118px;
  }

  .main-content,
  body.dashboard-theme .main-content.dashboard-shell,
  body.paiements-page .main-content,
  body.depenses-page .main-content,
  body.student-detail-page .main-content,
  body.leads-page .main-content,
  body.personnel-page .main-content,
  body.groups-page .main-content,
  body.matrics-page .main-content,
  body.documents-page .main-content {
    padding: 18px 14px 92px;
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .page-header h2 {
    font-size: 24px;
  }

  .page-header-actions {
    width: 100%;
    justify-content: stretch;
    gap: 10px;
  }

  .page-header .btn,
  .page-header-actions .btn,
  .page-header-actions a.btn,
  .page-header-actions button.btn {
    width: 100%;
  }

  .btn {
    max-width: 100%;
  }

  .prog-select,
  .pay-select,
  .grp-select,
  .prog-reset-btn,
  .grp-reset-btn,
  .etu-reset-btn,
  .frm-reset-btn,
  .pers-reset-btn {
    flex-basis: 100%;
    width: 100%;
  }

  .db-kpi-card,
  .prog-metric-card {
    padding: 16px;
  }

  .db-kpi-value {
    font-size: 24px;
  }

  .table-wrap,
  .db-table-wrap,
  .pay-table-wrap,
  .lead-table-wrap,
  .grp-table-wrap {
    margin-inline: -14px;
    border-left: none;
    border-right: none;
    border-radius: 0;
  }

  .data-table {
    min-width: 720px;
  }

  .modal {
    width: min(96vw, 640px);
    border-radius: 16px;
  }

  .modal-head,
  .modal-body,
  .modal-foot {
    padding-left: 16px;
    padding-right: 16px;
  }

  .modal-foot {
    flex-wrap: wrap;
    justify-content: stretch;
  }

  .modal-foot .btn {
    flex: 1 1 100%;
  }

  .global-notif {
    right: 16px;
    bottom: 16px;
  }

  .global-notif-panel {
    width: min(320px, calc(100vw - 20px));
  }
}

@media (max-width: 560px) {
  .sidebar {
    width: min(300px, 88vw);
  }

  .nav-item {
    padding: 11px 12px;
    font-size: 13px;
  }

  .main-content,
  body.dashboard-theme .main-content.dashboard-shell,
  body.paiements-page .main-content,
  body.depenses-page .main-content,
  body.student-detail-page .main-content,
  body.leads-page .main-content,
  body.personnel-page .main-content,
  body.groups-page .main-content,
  body.matrics-page .main-content,
  body.documents-page .main-content {
    padding: 16px 12px 90px;
  }

  .table-wrap,
  .db-table-wrap,
  .pay-table-wrap,
  .lead-table-wrap,
  .grp-table-wrap {
    margin-inline: -12px;
  }

  .data-table {
    min-width: 680px;
  }

  .global-notif-btn {
    width: 52px;
    height: 52px;
    border-radius: 16px;
  }
}

/* ===============================
   Backups
=============================== */
body.backups-page .main-content > .alert,
body.backups-page .main-content > .card{
  margin-top:18px;
}
body.backups-page .backup-note-body{
  display:flex;
  align-items:flex-start;
  gap:14px;
}
body.backups-page .backup-note-icon,
body.backups-page .backup-security-state-icon,
body.backups-page .backup-upload-shell-icon,
body.backups-page .backup-row-icon{
  width:42px;
  height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:14px;
  background:rgba(184,137,42,.10);
  color:var(--gold);
  flex:0 0 auto;
}
body.backups-page .backup-note-body strong,
body.backups-page .backup-security-state-copy strong{
  display:block;
  font-size:15px;
  margin-bottom:4px;
}
body.backups-page .backup-note-body p,
body.backups-page .backup-security-state-copy p,
body.backups-page .backup-security-foot p,
body.backups-page .backup-security-readonly p{
  margin:0;
  color:var(--muted);
  line-height:1.6;
  font-size:13px;
}
body.backups-page .backup-summary-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
}
body.backups-page .backup-summary-item,
body.backups-page .backup-security-state,
body.backups-page .backup-security-form,
body.backups-page .backup-security-readonly{
  border:1px solid var(--border);
  border-radius:18px;
  padding:16px 18px;
  background:linear-gradient(180deg,#fff,rgba(250,247,241,.92));
}
body.backups-page .backup-summary-label{
  display:block;
  font-size:11px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--muted);
  margin-bottom:8px;
}
body.backups-page .backup-summary-item strong{
  display:block;
  font-size:24px;
  line-height:1.15;
}
body.backups-page .backup-count-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  padding:0 14px;
  border-radius:999px;
  border:1px solid rgba(184,137,42,.24);
  background:rgba(184,137,42,.08);
  color:var(--gold-dim);
  font-size:12px;
  font-weight:700;
}
body.backups-page .backup-security-grid{
  display:grid;
  grid-template-columns:minmax(260px,.9fr) minmax(0,1.45fr);
  gap:16px;
}
body.backups-page .backup-security-state{
  display:flex;
  align-items:flex-start;
  gap:14px;
}
body.backups-page .backup-security-state-copy small{
  display:block;
  margin-top:10px;
  font-size:12px;
  color:var(--muted);
  line-height:1.55;
}
body.backups-page .backup-security-question{
  display:inline-flex;
  align-items:center;
  min-height:38px;
  padding:8px 12px;
  margin-top:10px;
  border-radius:14px;
  border:1px solid rgba(184,137,42,.18);
  background:rgba(184,137,42,.07);
  color:var(--text);
  font-size:13px;
  font-weight:600;
  line-height:1.5;
}
body.backups-page .backup-security-form{
  padding:18px;
}
body.backups-page .backup-security-form-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
body.backups-page .backup-security-foot{
  margin-top:14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
body.backups-page .backup-security-foot p{
  max-width:560px;
}
body.backups-page .backup-security-readonly{
  display:flex;
  align-items:center;
}
body.backups-page .backup-table-head,
body.backups-page .backup-row{
  display:grid;
  grid-template-columns:minmax(280px,2.4fr) 120px 120px 170px 170px 150px;
  gap:16px;
  align-items:center;
}
body.backups-page .backup-table-head{
  padding:14px 24px;
  border-top:1px solid var(--border);
  border-bottom:1px solid var(--border);
  font-size:11px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--muted);
}
body.backups-page .backup-row{
  padding:18px 24px;
  border-bottom:1px solid rgba(34,31,27,.06);
}
body.backups-page .backup-row:last-of-type{
  border-bottom:none;
}
body.backups-page .backup-cell{
  min-width:0;
}
body.backups-page .backup-cell-main{
  display:flex;
  align-items:flex-start;
  gap:12px;
}
body.backups-page .backup-row-copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:4px;
}
body.backups-page .backup-row-copy strong,
body.backups-page .backup-meta-stack strong{
  font-size:14px;
  line-height:1.35;
}
body.backups-page .backup-row-copy span,
body.backups-page .backup-meta-stack span,
body.backups-page .backup-muted{
  color:var(--muted);
  font-size:12px;
  line-height:1.5;
}
body.backups-page .backup-meta-stack{
  display:flex;
  flex-direction:column;
  gap:2px;
}
body.backups-page .backup-table-actions{
  text-align:right;
}
body.backups-page .backup-cell-actions .dep-actions{
  justify-content:flex-end;
}
body.backups-page .backup-action-summary{
  display:flex;
  flex-direction:column;
  gap:4px;
  padding:14px 16px;
  margin-bottom:14px;
  border-radius:16px;
  border:1px solid var(--border);
  background:rgba(247,243,235,.72);
}
body.backups-page .backup-action-summary strong{
  font-size:14px;
  line-height:1.35;
}
body.backups-page .backup-action-summary span,
body.backups-page .backup-action-copy{
  color:var(--muted);
  font-size:12px;
  line-height:1.6;
}
body.backups-page .backup-action-copy{
  margin:0 0 14px;
}
body.backups-page .backup-file-input{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  border:0;
}
body.backups-page .backup-upload-shell{
  display:grid;
  grid-template-columns:42px minmax(0,1fr);
  gap:14px;
  align-items:center;
  padding:16px 18px;
  border-radius:18px;
  border:1px dashed rgba(184,137,42,.34);
  background:linear-gradient(180deg,rgba(255,255,255,.95),rgba(250,247,241,.92));
  cursor:pointer;
  transition:border-color .18s ease, background .18s ease, transform .18s ease;
}
body.backups-page .backup-upload-shell:hover{
  border-color:rgba(184,137,42,.58);
  background:linear-gradient(180deg,#fff,rgba(248,243,233,.98));
  transform:translateY(-1px);
}
body.backups-page .backup-upload-shell-copy{
  display:flex;
  flex-direction:column;
  gap:3px;
  min-width:0;
}
body.backups-page .backup-upload-shell-copy strong{
  font-size:14px;
  line-height:1.35;
  color:var(--text);
}
body.backups-page .backup-upload-shell-copy small,
body.backups-page .backup-upload-shell-copy em{
  font-size:12px;
  line-height:1.5;
  color:var(--muted);
  font-style:normal;
}
@media (max-width: 1100px){
  body.backups-page .backup-summary-grid,
  body.backups-page .backup-security-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  body.backups-page .backup-table-head,
  body.backups-page .backup-row{
    grid-template-columns:minmax(240px,2fr) 110px 100px 150px 150px 140px;
  }
}
@media (max-width: 820px){
  body.backups-page .backup-summary-grid,
  body.backups-page .backup-security-grid,
  body.backups-page .backup-security-form-grid{
    grid-template-columns:1fr;
  }
  body.backups-page .backup-table-head{
    display:none;
  }
  body.backups-page .backup-row{
    grid-template-columns:1fr;
    gap:12px;
    padding:18px;
  }
  body.backups-page .backup-cell-actions .dep-actions,
  body.backups-page .backup-security-foot{
    justify-content:flex-start;
  }
  body.backups-page .backup-security-foot{
    flex-direction:column;
    align-items:flex-start;
  }
}
body.backups-page .backup-summary-item{
  position:relative;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  gap:10px;
  min-height:176px;
  padding:20px;
  background:
    radial-gradient(circle at top right, rgba(184,137,42,.13), transparent 42%),
    linear-gradient(180deg, #fff, rgba(249,245,237,.96));
}
body.backups-page .backup-summary-item::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:18px;
  pointer-events:none;
  background:linear-gradient(180deg, rgba(184,137,42,.08), transparent 28%);
  opacity:.9;
}
body.backups-page .backup-summary-icon{
  position:relative;
  z-index:1;
  width:42px;
  height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:14px;
  background:rgba(184,137,42,.12);
  color:var(--gold);
}
body.backups-page .backup-summary-item strong,
body.backups-page .backup-summary-item small,
body.backups-page .backup-summary-item .backup-summary-label{
  position:relative;
  z-index:1;
}
body.backups-page .backup-summary-item small{
  color:var(--muted);
  font-size:12px;
  line-height:1.55;
}
body.backups-page .backup-security-overview .card-body{
  display:grid;
  grid-template-columns:minmax(260px, 1.15fr) minmax(240px, .95fr);
  gap:16px;
}
body.backups-page .backup-security-preview-card,
body.backups-page .backup-security-meta-item{
  border:1px solid var(--border);
  border-radius:18px;
  background:linear-gradient(180deg,#fff,rgba(250,247,241,.94));
}
body.backups-page .backup-security-preview-card{
  display:flex;
  align-items:flex-start;
  gap:14px;
  padding:18px;
}
body.backups-page .backup-security-preview-copy strong{
  display:block;
  margin-bottom:6px;
  font-size:15px;
}
body.backups-page .backup-security-preview-copy p{
  margin:0;
  color:var(--muted);
  font-size:13px;
  line-height:1.6;
}
body.backups-page .backup-security-preview-meta{
  display:grid;
  gap:12px;
}
body.backups-page .backup-security-meta-item{
  padding:16px 18px;
}
body.backups-page .backup-security-meta-item span{
  display:block;
  margin-bottom:8px;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.12em;
  color:var(--muted);
}
body.backups-page .backup-security-meta-item strong{
  display:block;
  font-size:14px;
  line-height:1.5;
}
body.backups-page .backup-ledger{
  overflow:hidden;
}
body.backups-page .backup-table-head{
  background:rgba(247,243,235,.62);
}
body.backups-page .backup-row{
  transition:background .18s ease;
}
body.backups-page .backup-row:hover{
  background:rgba(250,247,241,.72);
}
body.backups-page .backup-row-code{
  display:inline-flex;
  align-items:center;
  width:max-content;
  max-width:100%;
  padding:4px 10px;
  border-radius:999px;
  background:rgba(184,137,42,.08);
  color:var(--gold-dim);
  font-size:11px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
}
body.backups-page .backup-size-stack{
  display:flex;
  flex-direction:column;
  gap:3px;
}
body.backups-page .backup-size-stack strong{
  font-size:15px;
  line-height:1.35;
}
body.backups-page .backup-size-stack span{
  color:var(--muted);
  font-size:12px;
}
body.backups-page .backup-muted-pill{
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:0 12px;
  border-radius:999px;
  background:rgba(34,31,27,.05);
}
body.backups-page .backup-security-modal-body{
  display:flex;
  flex-direction:column;
  gap:16px;
}
body.backups-page .backup-security-modal-intro{
  display:flex;
  gap:14px;
  align-items:flex-start;
  padding:16px 18px;
  border-radius:18px;
  border:1px solid rgba(184,137,42,.18);
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(249,245,237,.96));
}
body.backups-page .backup-security-modal-intro strong{
  display:block;
  margin-bottom:6px;
  font-size:15px;
}
body.backups-page .backup-security-modal-intro p{
  margin:0;
  color:var(--muted);
  font-size:13px;
  line-height:1.6;
}
body.backups-page .backup-security-zone{
  padding:18px;
  border-radius:20px;
  border:1px solid var(--border);
  background:linear-gradient(180deg,#fff,rgba(250,247,241,.94));
}
body.backups-page .backup-security-zone-current{
  box-shadow:inset 0 1px 0 rgba(184,137,42,.05);
}
body.backups-page .backup-security-zone-new{
  background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(247,243,235,.96));
}
body.backups-page .backup-security-zone-head{
  margin-bottom:14px;
}
body.backups-page .backup-security-zone-head p{
  margin:10px 0 0;
  color:var(--muted);
  font-size:13px;
  line-height:1.6;
}
body.backups-page .backup-security-zone-pill{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:0 11px;
  border-radius:999px;
  background:rgba(184,137,42,.10);
  color:var(--gold-dim);
  font-size:11px;
  font-weight:700;
  letter-spacing:.12em;
  text-transform:uppercase;
}
body.backups-page .backup-security-modal-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px;
}
body.backups-page .backup-security-answer-group{
  margin-top:14px;
}
@media (max-width: 1100px){
  body.backups-page .backup-security-overview .card-body{
    grid-template-columns:1fr;
  }
}
@media (max-width: 820px){
  body.backups-page .backup-security-modal-grid{
    grid-template-columns:1fr;
  }
  body.backups-page .backup-summary-item{
    min-height:auto;
  }
}

/* Backups final polish */
body.backups-page .main-content{
  display:flex;
  flex-direction:column;
  gap:18px;
}
body.backups-page .main-content > .card,
body.backups-page .main-content > .alert{
  margin-top:0;
}
body.backups-page .backup-note-card{
  border-color:rgba(184,137,42,.16);
  background:#fff;
}
body.backups-page .backup-note-body{
  align-items:center;
  padding:18px 20px;
}
body.backups-page .backup-note-icon{
  width:38px;
  height:38px;
  border-radius:12px;
  background:var(--gold-dim);
  color:#fff;
}
body.backups-page .backup-note-body strong{
  margin-bottom:3px;
  font-size:14px;
}
body.backups-page .backup-note-body p{
  max-width:920px;
  font-size:12px;
  line-height:1.55;
}
body.backups-page .backup-summary-card .db-card-head{
  padding-bottom:0;
}
body.backups-page .backup-summary-grid{
  gap:12px;
}
body.backups-page .backup-summary-item{
  min-height:142px;
  padding:18px;
  border-radius:14px;
  border:1px solid rgba(34,31,27,.08);
  background:#fff;
}
body.backups-page .backup-summary-item::after{
  display:none;
}
body.backups-page .backup-summary-icon{
  width:36px;
  height:36px;
  border-radius:10px;
  background:rgba(184,137,42,.10);
}
body.backups-page .backup-summary-label{
  margin-bottom:0;
  font-size:10px;
  color:#8d867c;
}
body.backups-page .backup-summary-item strong{
  font-size:26px;
  letter-spacing:0;
}
body.backups-page .backup-summary-item small{
  margin-top:auto;
  max-width:260px;
  font-size:11px;
  line-height:1.45;
}
body.backups-page .backup-security-overview{
  background:linear-gradient(180deg,#fff,rgba(250,247,241,.72));
}
body.backups-page .backup-security-overview .db-card-head{
  align-items:center;
}
body.backups-page .backup-security-overview .card-body{
  grid-template-columns:1.1fr .9fr;
  padding-top:0;
}
body.backups-page .backup-security-preview-card,
body.backups-page .backup-security-meta-item{
  border-radius:12px;
  box-shadow:none;
  background:#fff;
}
body.backups-page .backup-security-preview-card{
  min-height:92px;
  align-items:center;
}
body.backups-page .backup-security-preview-icon{
  width:38px;
  height:38px;
  border-radius:12px;
  background:rgba(184,137,42,.10);
  color:var(--gold-dim);
}
body.backups-page .backup-security-meta-item{
  padding:14px 16px;
}
body.backups-page .backup-security-meta-item span{
  margin-bottom:6px;
  font-size:10px;
}
body.backups-page .backup-ledger .db-card-head{
  border-bottom:1px solid rgba(34,31,27,.08);
}
body.backups-page .backup-table-head,
body.backups-page .backup-row{
  grid-template-columns:minmax(300px,2.15fr) 132px 122px 178px 178px 142px;
}
body.backups-page .backup-table-head{
  padding:12px 24px;
  background:#faf8f3;
  border-top:0;
  color:#9a9288;
}
body.backups-page .backup-row{
  padding:16px 24px;
  background:#fff;
}
body.backups-page .backup-row:hover{
  background:#fffaf1;
}
body.backups-page .backup-row-icon{
  width:38px;
  height:38px;
  border-radius:10px;
  background:rgba(34,31,27,.045);
  color:var(--gold-dim);
}
body.backups-page .backup-row-copy{
  gap:3px;
}
body.backups-page .backup-row-copy strong{
  font-size:14px;
  color:var(--text);
}
body.backups-page .backup-row-code{
  padding:0;
  border-radius:0;
  background:transparent;
  color:var(--gold-dim);
  font-size:11px;
}
body.backups-page .backup-row-code + span{
  max-width:340px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
body.backups-page .backup-size-stack strong,
body.backups-page .backup-meta-stack strong{
  font-size:13px;
}
body.backups-page .backup-size-stack span,
body.backups-page .backup-meta-stack span,
body.backups-page .backup-muted{
  font-size:11px;
}
body.backups-page .backup-cell-actions .dep-actions{
  gap:7px;
}
body.backups-page .backup-security-modal{
  width:min(760px, calc(100vw - 32px));
  border-radius:18px;
  overflow:hidden;
}
body.backups-page .backup-security-modal .modal-head{
  align-items:flex-start;
  padding:22px 24px 18px;
  border-bottom:1px solid rgba(34,31,27,.08);
  background:#fff;
}
body.backups-page .backup-security-modal-subtitle{
  margin:6px 0 0;
  max-width:520px;
  color:var(--muted);
  font-size:12px;
  line-height:1.55;
}
body.backups-page .backup-security-modal-body{
  gap:14px;
  padding:18px 24px;
  background:#fbfaf7;
}
body.backups-page .backup-security-step{
  padding:18px;
  border-radius:14px;
  border:1px solid rgba(34,31,27,.08);
  background:#fff;
}
body.backups-page .backup-security-step-new{
  border-color:rgba(184,137,42,.22);
  background:linear-gradient(180deg,#fff,rgba(250,247,241,.78));
}
body.backups-page .backup-security-step-head{
  display:flex;
  align-items:flex-start;
  gap:12px;
  margin-bottom:16px;
}
body.backups-page .backup-security-step-head > span{
  width:30px;
  height:30px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:#f1eee8;
  color:var(--gold-dim);
  font-size:11px;
  font-weight:800;
  flex:0 0 auto;
}
body.backups-page .backup-security-step-new .backup-security-step-head > span{
  background:var(--gold-dim);
  color:#fff;
}
body.backups-page .backup-security-step-head strong{
  display:block;
  margin-bottom:4px;
  font-size:15px;
}
body.backups-page .backup-security-step-head p{
  margin:0;
  color:var(--muted);
  font-size:12px;
  line-height:1.55;
}
body.backups-page .backup-security-modal-grid{
  gap:12px;
}
body.backups-page .backup-security-modal .form-group{
  margin-bottom:0;
}
body.backups-page .backup-security-answer-group{
  margin-top:12px;
}
body.backups-page .backup-security-modal .modal-foot{
  padding:16px 24px 22px;
  background:#fff;
  border-top:1px solid rgba(34,31,27,.08);
}
@media (max-width: 1100px){
  body.backups-page .backup-table-head,
  body.backups-page .backup-row{
    grid-template-columns:minmax(260px,2fr) 120px 100px 150px 150px 132px;
  }
}
@media (max-width: 820px){
  body.backups-page .backup-security-overview .card-body{
    grid-template-columns:1fr;
  }
  body.backups-page .backup-table-head{
    display:none;
  }
  body.backups-page .backup-row{
    grid-template-columns:1fr;
    gap:11px;
    padding:16px;
  }
  body.backups-page .backup-security-modal .modal-head,
  body.backups-page .backup-security-modal-body,
  body.backups-page .backup-security-modal .modal-foot{
    padding-left:18px;
    padding-right:18px;
  }
}

/* Backups reset: compact, operational, clearer */
body.backups-page .backup-note-card{
  display:none;
}
body.backups-page .backup-summary-card,
body.backups-page .backup-security-overview,
body.backups-page .backup-ledger{
  border-radius:10px;
  box-shadow:none;
}
body.backups-page .backup-summary-card .db-card-head,
body.backups-page .backup-security-overview .db-card-head,
body.backups-page .backup-ledger .db-card-head{
  padding:22px 24px 14px;
}
body.backups-page .backup-summary-card .db-card-sub,
body.backups-page .backup-security-overview .db-card-sub,
body.backups-page .backup-ledger .db-card-sub{
  max-width:760px;
  font-size:12px;
}
body.backups-page .backup-summary-grid{
  gap:0;
  padding:0;
  border-top:1px solid rgba(34,31,27,.08);
}
body.backups-page .backup-summary-item{
  min-height:118px;
  padding:20px 22px;
  border:0;
  border-right:1px solid rgba(34,31,27,.08);
  border-radius:0;
  background:#fff;
  gap:8px;
}
body.backups-page .backup-summary-item:last-child{
  border-right:0;
}
body.backups-page .backup-summary-icon{
  width:30px;
  height:30px;
  border-radius:8px;
  background:#f7f1e6;
  color:#a47117;
}
body.backups-page .backup-summary-label{
  order:2;
  font-size:10px;
  letter-spacing:.13em;
}
body.backups-page .backup-summary-item strong{
  order:3;
  font-size:25px;
  line-height:1.1;
}
body.backups-page .backup-summary-item small{
  order:4;
  margin:0;
  max-width:230px;
  color:#918a80;
  font-size:11px;
  line-height:1.35;
}
body.backups-page .backup-security-overview{
  background:#fff;
}
body.backups-page .backup-security-overview .card-body{
  grid-template-columns:minmax(0,1fr) auto auto;
  align-items:stretch;
  gap:0;
  padding:0;
  border-top:1px solid rgba(34,31,27,.08);
}
body.backups-page .backup-security-preview-card,
body.backups-page .backup-security-meta-item{
  min-height:86px;
  border:0;
  border-right:1px solid rgba(34,31,27,.08);
  border-radius:0;
  background:#fff;
}
body.backups-page .backup-security-preview-card{
  padding:18px 24px;
}
body.backups-page .backup-security-preview-icon{
  width:32px;
  height:32px;
  border-radius:9px;
}
body.backups-page .backup-security-preview-copy strong{
  font-size:14px;
}
body.backups-page .backup-security-preview-copy p{
  max-width:560px;
  font-size:12px;
}
body.backups-page .backup-security-preview-meta{
  display:contents;
}
body.backups-page .backup-security-meta-item{
  min-width:250px;
  padding:18px 22px;
}
body.backups-page .backup-security-meta-item:last-child{
  border-right:0;
}
body.backups-page .backup-ledger .db-card-head{
  align-items:center;
}
body.backups-page .backup-count-chip{
  min-height:30px;
  padding:0 12px;
  border-radius:8px;
}
body.backups-page .backup-table-head,
body.backups-page .backup-row{
  grid-template-columns:minmax(340px,2.3fr) 134px 116px 172px 172px 128px;
  gap:18px;
}
body.backups-page .backup-table-head{
  padding:13px 24px;
  background:#f8f6f0;
}
body.backups-page .backup-row{
  min-height:76px;
  padding:14px 24px;
}
body.backups-page .backup-row-icon{
  width:34px;
  height:34px;
}
body.backups-page .backup-row-copy strong{
  max-width:520px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
body.backups-page .backup-cell-actions .dep-actions{
  justify-content:flex-end;
}
body.backups-page .backup-security-modal{
  width:min(980px, calc(100vw - 56px));
  max-width:none;
  border-radius:14px;
}
body.backups-page .backup-security-modal .modal-head{
  padding:24px 28px 18px;
}
body.backups-page .backup-security-modal-subtitle{
  max-width:680px;
}
body.backups-page .backup-security-modal-body{
  display:grid;
  grid-template-columns:minmax(280px,.9fr) minmax(380px,1.25fr);
  gap:16px;
  padding:20px 28px;
}
body.backups-page .backup-security-step{
  padding:20px;
  border-radius:12px;
  background:#fff;
}
body.backups-page .backup-security-step-current{
  background:#fbfaf7;
}
body.backups-page .backup-security-step-new{
  background:#fff;
}
body.backups-page .backup-security-step-head{
  margin-bottom:18px;
}
body.backups-page .backup-security-step-head p{
  max-width:460px;
}
body.backups-page .backup-security-step-current .backup-security-modal-grid,
body.backups-page .backup-security-step-new .backup-security-modal-grid{
  grid-template-columns:1fr;
}
body.backups-page .backup-security-step .form-input,
body.backups-page .backup-security-step .form-select{
  width:100%;
  min-width:0;
}
body.backups-page .backup-security-step .form-select{
  overflow:hidden;
  text-overflow:ellipsis;
}
body.backups-page .backup-security-modal .modal-foot{
  padding:18px 28px 24px;
}
@media (max-width: 1180px){
  body.backups-page .backup-security-overview .card-body{
    grid-template-columns:1fr;
  }
  body.backups-page .backup-security-preview-card,
  body.backups-page .backup-security-meta-item{
    border-right:0;
    border-bottom:1px solid rgba(34,31,27,.08);
  }
  body.backups-page .backup-security-meta-item:last-child{
    border-bottom:0;
  }
  body.backups-page .backup-security-preview-meta{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media (max-width: 900px){
  body.backups-page .backup-summary-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  body.backups-page .backup-summary-item:nth-child(2){
    border-right:0;
  }
  body.backups-page .backup-summary-item:nth-child(-n+2){
    border-bottom:1px solid rgba(34,31,27,.08);
  }
  body.backups-page .backup-security-modal-body{
    grid-template-columns:1fr;
  }
}
@media (max-width: 640px){
  body.backups-page .backup-summary-grid,
  body.backups-page .backup-security-preview-meta{
    grid-template-columns:1fr;
  }
  body.backups-page .backup-summary-item{
    border-right:0;
    border-bottom:1px solid rgba(34,31,27,.08);
  }
  body.backups-page .backup-summary-item:last-child{
    border-bottom:0;
  }
  body.backups-page .backup-security-modal{
    width:calc(100vw - 24px);
  }
}

body.backups-page .backup-summary-card,
body.backups-page .backup-security-overview,
body.backups-page .backup-ledger{
  overflow:hidden;
  background:linear-gradient(180deg,#fffdfa 0%,#ffffff 100%);
}
body.backups-page .backup-summary-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
  padding:20px 24px 24px;
  border-top:1px solid rgba(34,31,27,.07);
}
body.backups-page .backup-summary-item{
  min-height:0;
  padding:18px 18px 16px;
  border:1px solid rgba(214,196,162,.32);
  border-radius:18px;
  background:linear-gradient(180deg,#fffefb 0%,#ffffff 100%);
  box-shadow:0 14px 32px rgba(36,27,14,.04);
  display:grid;
  grid-template-columns:auto 1fr;
  grid-template-rows:auto auto auto;
  gap:6px 12px;
  align-items:start;
}
body.backups-page .backup-summary-icon{
  grid-row:1 / span 2;
  width:42px;
  height:42px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(180deg,#fbf4e7 0%,#f6ead6 100%);
  color:#b27a1c;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8);
}
body.backups-page .backup-summary-icon svg,
body.backups-page .backup-security-preview-icon svg,
body.backups-page .backup-row-icon svg,
body.backups-page .backup-meta-icon svg,
body.backups-page .backup-head-label svg,
body.backups-page .backup-modal-intro-icon svg,
body.backups-page .backup-upload-shell-icon svg,
body.backups-page .backup-security-tip svg,
body.backups-page .backup-meta-kicker svg{
  display:block;
  stroke:currentColor;
}
body.backups-page .backup-summary-label{
  margin-top:2px;
  color:#9a8c74;
  font-size:10px;
  letter-spacing:.16em;
  text-transform:uppercase;
}
body.backups-page .backup-summary-item strong{
  align-self:end;
  color:#1d1a17;
  font-size:28px;
  font-weight:700;
  line-height:1.04;
}
body.backups-page .backup-summary-item small{
  grid-column:1 / -1;
  margin:6px 0 0;
  color:#857c72;
  font-size:12px;
  line-height:1.45;
}
body.backups-page .backup-security-overview .card-body{
  display:grid;
  grid-template-columns:minmax(0,1.45fr) minmax(220px,.85fr) minmax(240px,.95fr);
  gap:14px;
  padding:22px 24px 24px;
  border-top:1px solid rgba(34,31,27,.07);
}
body.backups-page .backup-security-preview-card,
body.backups-page .backup-security-meta-item{
  border:1px solid rgba(214,196,162,.3);
  border-radius:18px;
  background:linear-gradient(180deg,#fffdf9 0%,#ffffff 100%);
  box-shadow:0 14px 30px rgba(36,27,14,.03);
}
body.backups-page .backup-security-preview-card{
  min-height:118px;
  padding:22px;
  display:flex;
  align-items:center;
  gap:16px;
}
body.backups-page .backup-security-preview-icon{
  width:46px;
  height:46px;
  border-radius:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  background:linear-gradient(180deg,#fbf4e7 0%,#f6ead6 100%);
  color:#b27a1c;
}
body.backups-page .backup-security-preview-copy strong{
  display:block;
  margin-bottom:4px;
  font-size:16px;
  color:#171411;
}
body.backups-page .backup-security-preview-copy p{
  margin:0;
  color:#857c72;
  font-size:13px;
  line-height:1.5;
}
body.backups-page .backup-security-preview-meta{
  display:contents;
}
body.backups-page .backup-security-meta-item{
  min-height:118px;
  padding:18px 20px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:10px;
}
body.backups-page .backup-meta-kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:#9a8c74;
  font-size:10px;
  font-weight:700;
  letter-spacing:.16em;
  text-transform:uppercase;
}
body.backups-page .backup-security-meta-item strong{
  color:#1a1714;
  font-size:18px;
  font-weight:700;
  line-height:1.25;
}
body.backups-page .backup-table-head,
body.backups-page .backup-row{
  grid-template-columns:minmax(360px,2.55fr) 156px 130px 176px 182px 132px;
  gap:14px;
}
body.backups-page .backup-table-head{
  padding:14px 24px;
  background:#faf7f1;
  border-top:1px solid rgba(34,31,27,.06);
}
body.backups-page .backup-head-label{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:#9a8c74;
}
body.backups-page .backup-row{
  min-height:88px;
  padding:16px 24px;
  align-items:center;
  border-top:1px solid rgba(34,31,27,.05);
}
body.backups-page .backup-row-icon{
  width:42px;
  height:42px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(180deg,#fbf4e7 0%,#f6ead6 100%);
  color:#b27a1c;
  flex:0 0 auto;
}
body.backups-page .backup-row-copy{
  display:flex;
  flex-direction:column;
  gap:8px;
}
body.backups-page .backup-row-title{
  display:flex;
  flex-direction:column;
  gap:4px;
}
body.backups-page .backup-row-title strong{
  color:#171411;
  font-size:14px;
  line-height:1.35;
}
body.backups-page .backup-row-code{
  display:inline-flex;
  align-self:flex-start;
  align-items:center;
  min-height:24px;
  padding:0 10px;
  border-radius:999px;
  background:#f6efe4;
  color:#8e6920;
  font-size:11px;
  font-weight:700;
  letter-spacing:.08em;
}
body.backups-page .backup-row-chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
body.backups-page .backup-inline-chip{
  min-height:24px;
  padding:0 10px;
  border-radius:999px;
  border:1px solid rgba(214,196,162,.34);
  background:#fffdf9;
  color:#7d715f;
  display:inline-flex;
  align-items:center;
  gap:7px;
  font-size:11px;
  font-weight:600;
}
body.backups-page .backup-inline-chip-muted{
  color:#918675;
}
body.backups-page .backup-size-stack,
body.backups-page .backup-meta-stack{
  display:flex;
  flex-direction:column;
  gap:3px;
}
body.backups-page .backup-size-stack strong,
body.backups-page .backup-meta-stack strong{
  color:#181512;
  font-size:13px;
  font-weight:700;
}
body.backups-page .backup-size-stack span,
body.backups-page .backup-meta-stack span{
  color:#8a8178;
  font-size:11px;
  line-height:1.35;
}
body.backups-page .backup-meta-stack-with-icon{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:10px;
  align-items:start;
}
body.backups-page .backup-meta-icon{
  width:28px;
  height:28px;
  margin-top:1px;
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#faf3e6;
  color:#b27a1c;
}
body.backups-page .backup-muted-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:28px;
  padding:0 12px;
  border-radius:999px;
  background:#f7f5f0;
  color:#8b8278;
  font-size:11px;
  font-weight:600;
}
body.backups-page .backup-cell-actions .dep-actions{
  gap:8px;
}
body.backups-page .backup-cell-actions .db-action-btn{
  width:34px;
  height:34px;
  border-radius:11px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid transparent;
  box-shadow:none;
}
body.backups-page .backup-cell-actions .db-action-view{
  background:#eef4ff;
  color:#2a6ac8;
}
body.backups-page .backup-cell-actions .db-action-edit{
  background:#f7f1e2;
  color:#b8821f;
}
body.backups-page .backup-cell-actions .db-action-delete{
  background:#fff0ef;
  color:#d4574c;
}
body.backups-page .backup-create-modal,
body.backups-page .backup-upload-modal,
body.backups-page .backup-action-modal,
body.backups-page .backup-security-modal{
  border-radius:24px;
  overflow:hidden;
  box-shadow:0 32px 80px rgba(24,17,7,.2);
}
body.backups-page .backup-create-modal,
body.backups-page .backup-upload-modal,
body.backups-page .backup-action-modal{
  width:min(640px, calc(100vw - 32px));
}
body.backups-page .backup-security-modal{
  width:min(920px, calc(100vw - 32px));
}
body.backups-page .backup-create-modal .modal-head,
body.backups-page .backup-upload-modal .modal-head,
body.backups-page .backup-action-modal .modal-head,
body.backups-page .backup-security-modal .modal-head{
  padding:26px 30px 18px;
  background:linear-gradient(180deg,#fffdfa 0%,#fff7ea 100%);
  border-bottom:1px solid rgba(34,31,27,.06);
}
body.backups-page .backup-create-modal .modal-body,
body.backups-page .backup-upload-modal .modal-body,
body.backups-page .backup-action-modal .modal-body,
body.backups-page .backup-security-modal .modal-body{
  padding:24px 30px 26px;
  background:#fff;
}
body.backups-page .backup-create-modal .modal-foot,
body.backups-page .backup-upload-modal .modal-foot,
body.backups-page .backup-action-modal .modal-foot,
body.backups-page .backup-security-modal .modal-foot{
  padding:18px 30px 28px;
  background:#fff;
}
body.backups-page .backup-modal-subtitle,
body.backups-page .backup-security-modal-subtitle{
  margin:6px 0 0;
  color:#8a8178;
  font-size:13px;
  line-height:1.5;
}
body.backups-page .backup-modal-intro{
  display:flex;
  align-items:flex-start;
  gap:14px;
  padding:16px 18px;
  border-radius:18px;
  background:linear-gradient(180deg,#fff8ed 0%,#fffdf9 100%);
  border:1px solid rgba(214,196,162,.32);
  margin-bottom:18px;
}
body.backups-page .backup-modal-intro-icon,
body.backups-page .backup-upload-shell-icon{
  width:42px;
  height:42px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(180deg,#fbf1de 0%,#f7e7c7 100%);
  color:#b27a1c;
  flex:0 0 auto;
}
body.backups-page .backup-modal-intro strong{
  display:block;
  margin-bottom:3px;
  color:#1a1714;
  font-size:14px;
}
body.backups-page .backup-modal-intro p{
  margin:0;
  color:#877d73;
  font-size:12px;
  line-height:1.5;
}
body.backups-page .backup-modal-points{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:-2px 0 18px;
}
body.backups-page .backup-modal-point{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:28px;
  padding:0 12px;
  border-radius:999px;
  background:#f8f4ea;
  color:#8b6b2d;
  font-size:11px;
  font-weight:700;
}
body.backups-page .backup-upload-shell{
  display:flex;
  align-items:center;
  gap:14px;
  min-height:96px;
  padding:16px 18px;
  border-radius:18px;
  border:1px dashed rgba(191,146,54,.38);
  background:linear-gradient(180deg,#fffdfa 0%,#fff8eb 100%);
}
body.backups-page .backup-upload-shell-copy{
  display:flex;
  flex-direction:column;
  gap:3px;
}
body.backups-page .backup-upload-shell-copy strong{
  color:#1a1714;
  font-size:14px;
}
body.backups-page .backup-upload-shell-copy small,
body.backups-page .backup-upload-shell-copy em{
  color:#8a8178;
  font-size:12px;
  font-style:normal;
}
body.backups-page .backup-passkey-field{
  margin-top:2px;
}
body.backups-page .backup-passkey-digits{
  display:flex;
  gap:10px;
  flex-wrap:nowrap;
}
body.backups-page .backup-passkey-digit{
  width:54px;
  height:58px;
  border-radius:16px;
  border:1px solid rgba(214,196,162,.42);
  background:linear-gradient(180deg,#fffdfa 0%,#ffffff 100%);
  color:#1d1a17;
  text-align:center;
  font-size:24px;
  font-weight:700;
  outline:none;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.85);
}
body.backups-page .backup-passkey-digit:focus{
  border-color:#c7942f;
  box-shadow:0 0 0 4px rgba(199,148,47,.12);
}
body.backups-page .backup-passkey-hint{
  display:block;
  margin-top:10px;
  color:#8b8176;
  font-size:12px;
}
body.backups-page .backup-security-modal-body{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
}
body.backups-page .backup-security-step{
  padding:22px;
  border-radius:20px;
  border:1px solid rgba(214,196,162,.34);
  background:linear-gradient(180deg,#fffdfa 0%,#ffffff 100%);
}
body.backups-page .backup-security-step-current{
  background:linear-gradient(180deg,#fff8ee 0%,#ffffff 100%);
}
body.backups-page .backup-security-step-head{
  display:flex;
  align-items:flex-start;
  gap:14px;
  margin-bottom:18px;
}
body.backups-page .backup-security-step-head > span{
  width:34px;
  height:34px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(180deg,#fbf1de 0%,#f7e7c7 100%);
  color:#b27a1c;
  font-size:12px;
  font-weight:700;
  flex:0 0 auto;
}
body.backups-page .backup-security-step-head strong{
  display:block;
  color:#181512;
  font-size:15px;
  margin-bottom:4px;
}
body.backups-page .backup-security-step-head p{
  margin:0;
  color:#887f76;
  font-size:12px;
  line-height:1.5;
}
body.backups-page .backup-security-tip{
  display:flex;
  align-items:flex-start;
  gap:8px;
  margin-top:14px;
  padding:12px 14px;
  border-radius:14px;
  background:#faf6ed;
  color:#8b6f3d;
  font-size:12px;
  line-height:1.5;
}
body.backups-page .backup-action-summary{
  display:flex;
  flex-direction:column;
  gap:5px;
  padding:16px 18px;
  border-radius:18px;
  background:linear-gradient(180deg,#fff8ed 0%,#fffdfa 100%);
  border:1px solid rgba(214,196,162,.32);
  margin-bottom:14px;
}
body.backups-page .backup-action-summary strong{
  color:#191613;
  font-size:15px;
}
body.backups-page .backup-action-summary span,
body.backups-page .backup-action-copy{
  color:#877d73;
  font-size:12px;
  line-height:1.5;
}
@media (max-width: 1180px){
  body.backups-page .backup-summary-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  body.backups-page .backup-security-overview .card-body{
    grid-template-columns:1fr 1fr;
  }
  body.backups-page .backup-security-preview-card{
    grid-column:1 / -1;
  }
}
@media (max-width: 900px){
  body.backups-page .backup-table-head,
  body.backups-page .backup-row{
    grid-template-columns:minmax(260px,1.8fr) repeat(5,minmax(110px,1fr));
  }
  body.backups-page .backup-security-modal-body{
    grid-template-columns:1fr;
  }
}
@media (max-width: 640px){
  body.backups-page .backup-summary-grid,
  body.backups-page .backup-security-overview .card-body{
    grid-template-columns:1fr;
  }
  body.backups-page .backup-passkey-digits{
    gap:8px;
  }
  body.backups-page .backup-passkey-digit{
    width:44px;
    height:50px;
    border-radius:14px;
    font-size:21px;
  }
}

body.backups-page .backup-summary-grid{
  gap:12px;
  padding:18px 22px 22px;
}
body.backups-page .backup-summary-item{
  min-height:92px;
  padding:16px 16px 14px;
  grid-template-columns:auto 1fr;
  grid-template-rows:auto auto;
  gap:4px 12px;
}
body.backups-page .backup-summary-item small{
  display:none;
}
body.backups-page .backup-summary-icon{
  width:38px;
  height:38px;
  border-radius:13px;
}
body.backups-page .backup-summary-label{
  margin-top:1px;
}
body.backups-page .backup-summary-item strong{
  font-size:24px;
  line-height:1.08;
}
body.backups-page .backup-security-overview .card-body{
  display:block;
  padding:14px 24px 20px;
  border-top:1px solid rgba(34,31,27,.07);
}
body.backups-page .backup-security-preview,
body.backups-page .backup-security-preview-card,
body.backups-page .backup-security-preview-meta,
body.backups-page .backup-security-meta-item{
  all:unset;
}
body.backups-page .backup-security-strip{
  display:flex;
  align-items:center;
  justify-content:flex-start;
}
body.backups-page .backup-security-last-update{
  display:inline-flex;
  align-items:center;
  gap:9px;
  min-height:34px;
  padding:0 14px;
  border-radius:999px;
  background:#f8f4ec;
  color:#8a7d67;
  font-size:12px;
  font-weight:600;
}
body.backups-page .backup-security-last-update strong{
  color:#1a1714;
  font-weight:700;
}
body.backups-page .backup-table-head,
body.backups-page .backup-row{
  grid-template-columns:minmax(290px,2.05fr) 132px 132px 160px 170px 124px;
  gap:12px;
}
body.backups-page .backup-table-head{
  padding:14px 20px;
}
body.backups-page .backup-row{
  min-height:82px;
  padding:14px 20px;
}
body.backups-page .backup-row-code{
  font-size:10px;
}
body.backups-page .backup-row-chips{
  gap:6px;
}
body.backups-page .backup-inline-chip{
  min-height:22px;
  padding:0 9px;
  font-size:10px;
}
body.backups-page .backup-size-stack{
  align-items:flex-start;
  justify-content:center;
}
body.backups-page .backup-size-stack strong{
  font-size:18px;
  line-height:1.1;
}
body.backups-page .backup-size-stack span{
  font-size:10px;
  letter-spacing:.04em;
  text-transform:uppercase;
}
body.backups-page .backup-cell-actions .dep-actions{
  justify-content:flex-start;
}
body.backups-page .backup-cell-actions .db-action-btn{
  width:32px;
  height:32px;
  border-radius:10px;
}
body.backups-page .backup-create-modal .modal-body,
body.backups-page .backup-upload-modal .modal-body,
body.backups-page .backup-action-modal .modal-body,
body.backups-page .backup-security-modal .modal-body{
  text-align:center;
}
body.backups-page .backup-modal-intro,
body.backups-page .backup-action-summary{
  max-width:540px;
  margin-left:auto;
  margin-right:auto;
  text-align:left;
}
body.backups-page .backup-create-modal .form-group,
body.backups-page .backup-upload-modal .form-group,
body.backups-page .backup-action-modal .form-group,
body.backups-page .backup-security-modal .form-group{
  max-width:540px;
  margin-left:auto;
  margin-right:auto;
  text-align:left;
}
body.backups-page .backup-upload-modal .form-group:first-of-type{
  margin-top:4px;
}
body.backups-page .backup-passkey-field{
  max-width:540px;
  margin-left:auto;
  margin-right:auto;
  text-align:center;
}
body.backups-page .backup-passkey-field .form-label{
  display:block;
  text-align:center;
}
body.backups-page .backup-passkey-digits{
  justify-content:center;
}
body.backups-page .backup-passkey-hint{
  text-align:center;
}
body.backups-page .backup-passkey-actions{
  display:flex;
  justify-content:center;
  margin-top:10px;
}
body.backups-page .backup-passkey-reset{
  border:0;
  background:transparent;
  color:#98702a;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
}
body.backups-page .backup-passkey-reset:hover{
  color:#7b5618;
}
body.backups-page .backup-security-modal-body{
  gap:14px;
}
body.backups-page .backup-security-step{
  text-align:left;
}
body.backups-page .backup-security-tip{
  max-width:360px;
  margin:14px auto 0;
  text-align:left;
}
@media (max-width: 900px){
  body.backups-page .backup-table-head,
  body.backups-page .backup-row{
    grid-template-columns:minmax(240px,1.7fr) repeat(5,minmax(96px,1fr));
  }
}

body.backups-page .backup-summary-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  padding:18px 22px 22px;
}
body.backups-page .backup-summary-item{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:flex-start;
  min-height:112px;
  padding:18px 18px 16px;
  gap:6px;
}
body.backups-page .backup-summary-icon{
  width:36px;
  height:36px;
  margin-bottom:2px;
}
body.backups-page .backup-summary-label{
  font-size:11px;
  letter-spacing:.02em;
  text-transform:none;
  color:#7e756a;
  font-weight:700;
}
body.backups-page .backup-summary-item strong{
  width:100%;
  text-align:left;
  font-size:28px;
  line-height:1.08;
}
body.backups-page .backup-summary-item small{
  display:block;
  margin:0;
  color:#9a9085;
  font-size:11px;
  line-height:1.35;
}
body.backups-page .backup-security-overview .db-card-head{
  align-items:center;
}
body.backups-page .backup-security-overview .card-body{
  padding:12px 24px 16px;
}
body.backups-page .backup-security-last-update{
  min-height:30px;
  padding:0 12px;
  font-size:11px;
}
body.backups-page .backup-table-head,
body.backups-page .backup-row{
  display:grid;
  grid-template-columns:1.55fr .92fr .9fr 1fr 1fr .78fr;
  gap:16px;
  align-items:center;
}
body.backups-page .backup-table-head{
  padding:16px 24px 12px;
  border-bottom:1px solid var(--border);
  background:transparent;
}
body.backups-page .backup-table-head > div{
  font-size:11px;
  font-weight:700;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--muted2);
}
body.backups-page .backup-row{
  padding:18px 24px;
  border-bottom:1px solid rgba(0,0,0,.06);
  min-height:0;
}
body.backups-page .backup-row:last-of-type{
  border-bottom:0;
}
body.backups-page .backup-cell{
  min-width:0;
}
body.backups-page .backup-cell-main{
  display:flex;
  align-items:center;
  gap:12px;
}
body.backups-page .backup-row-copy{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0;
}
body.backups-page .backup-row-title{
  display:flex;
  flex-direction:column;
  gap:4px;
}
body.backups-page .backup-row-title strong{
  font-size:13.5px;
  color:var(--text);
  line-height:1.45;
}
body.backups-page .backup-row-code,
body.backups-page .backup-inline-chip,
body.backups-page .backup-size-stack span,
body.backups-page .backup-meta-stack span,
body.backups-page .backup-muted-pill{
  font-size:12px;
  line-height:1.45;
}
body.backups-page .backup-row-code{
  display:block;
  min-height:auto;
  padding:0;
  border-radius:0;
  background:transparent;
  color:var(--muted);
  font-weight:600;
  letter-spacing:0;
}
body.backups-page .backup-row-chips{
  gap:0;
}
body.backups-page .backup-inline-chip{
  min-height:auto;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  color:var(--muted);
  font-weight:500;
}
body.backups-page .backup-inline-chip svg{
  width:12px;
  height:12px;
}
body.backups-page .backup-size-stack,
body.backups-page .backup-meta-stack{
  gap:4px;
}
body.backups-page .backup-size-stack strong,
body.backups-page .backup-meta-stack strong{
  font-size:13.5px;
  color:var(--text);
  line-height:1.45;
}
body.backups-page .backup-meta-stack-with-icon{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:10px;
}
body.backups-page .backup-meta-icon{
  width:28px;
  height:28px;
  border-radius:10px;
}
body.backups-page .backup-cell-actions{
  display:flex;
  justify-content:flex-end;
}
body.backups-page .backup-cell-actions .dep-actions{
  justify-content:flex-end;
}
body.backups-page .backup-passkey-field{
  max-width:420px;
  width:100%;
  margin:0 auto;
  text-align:left;
}
body.backups-page .backup-passkey-group{
  width:100%;
}
body.backups-page .backup-passkey-digits{
  width:100%;
  justify-content:flex-start;
}
body.backups-page .backup-passkey-digit{
  flex:1 1 0;
  width:auto;
  min-width:0;
  max-width:60px;
}
body.backups-page .backup-passkey-hint{
  text-align:left;
}
body.backups-page .backup-passkey-actions{
  justify-content:flex-start;
}
body.backups-page .backup-create-modal .modal-body,
body.backups-page .backup-upload-modal .modal-body,
body.backups-page .backup-action-modal .modal-body,
body.backups-page .backup-security-modal .modal-body{
  text-align:left;
}
body.backups-page .backup-create-modal .form-group,
body.backups-page .backup-upload-modal .form-group,
body.backups-page .backup-action-modal .form-group,
body.backups-page .backup-security-modal .form-group,
body.backups-page .backup-modal-intro,
body.backups-page .backup-action-summary{
  max-width:520px;
}
body.backups-page .backup-modal-intro,
body.backups-page .backup-action-summary,
body.backups-page .backup-create-modal .form-group,
body.backups-page .backup-upload-modal .form-group,
body.backups-page .backup-action-modal .form-group,
body.backups-page .backup-security-modal .form-group,
body.backups-page .backup-passkey-field{
  margin-left:auto;
  margin-right:auto;
}
@media (max-width: 1100px){
  body.backups-page .backup-summary-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media (max-width: 900px){
  body.backups-page .backup-table-head,
  body.backups-page .backup-row{
    grid-template-columns:minmax(240px,1.8fr) repeat(5,minmax(96px,1fr));
  }
}

body.backups-page .backup-size-stack span,
body.backups-page .backup-meta-stack span,
body.backups-page .backup-inline-chip,
body.backups-page .backup-row-code{
  text-transform:none;
  letter-spacing:0;
}

body.backups-page .backup-summary-card .db-card-head{
  display:none;
}
body.backups-page .backup-summary-card .card-body{
  border-top:0;
}
body.backups-page .backup-summary-grid{
  padding:18px 18px;
}
body.backups-page .backup-summary-item{
  min-height:118px;
  padding:18px;
  border-radius:16px;
}
body.backups-page .backup-summary-item strong{
  font-size:30px;
}
body.backups-page .backup-summary-item small{
  margin-top:2px;
}
body.backups-page .backup-table-head,
body.backups-page .backup-row{
  grid-template-columns:1.45fr .92fr .86fr .92fr .98fr .72fr;
  gap:16px;
}
body.backups-page .backup-table-head{
  padding:16px 24px 12px;
}
body.backups-page .backup-table-head > div{
  font-size:11px;
  font-weight:700;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--muted2);
}
body.backups-page .backup-head-label{
  display:inline;
  gap:0;
}
body.backups-page .backup-size-stack strong{
  font-size:24px;
  line-height:1.05;
  font-weight:800;
  color:#18130e;
}
body.backups-page .backup-size-stack span{
  margin-top:2px;
  color:var(--muted);
  font-size:11px;
}
body.backups-page .backup-inline-chip{
  color:var(--muted);
}
body.backups-page .backup-cell-actions{
  align-items:center;
}
body.backups-page .backup-row-icon{
  width:40px;
  height:40px;
}
body.backups-page .backup-meta-stack strong{
  font-size:13.5px;
}
body.backups-page .backup-create-modal .modal-head,
body.backups-page .backup-upload-modal .modal-head{
  display:none;
}
body.backups-page .backup-modal-body-solo{
  position:relative;
  padding-top:28px;
}
body.backups-page .backup-modal-dismiss{
  position:absolute;
  top:18px;
  right:18px;
  width:34px;
  height:34px;
  border:0;
  border-radius:12px;
  background:#faf4ea;
  color:#7f5e24;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
body.backups-page .backup-create-modal .backup-modal-intro,
body.backups-page .backup-upload-modal .backup-modal-intro{
  margin-top:6px;
  margin-bottom:20px;
}
body.backups-page .backup-passkey-field{
  max-width:520px;
}
body.backups-page .backup-passkey-digits{
  gap:10px;
}
body.backups-page .backup-passkey-digit{
  max-width:none;
  height:54px;
}
body.backups-page .backup-passkey-hint,
body.backups-page .backup-passkey-actions{
  text-align:center;
  justify-content:center;
}
@media (max-width: 1100px){
  body.backups-page .backup-table-head,
  body.backups-page .backup-row{
    grid-template-columns:minmax(240px,1.6fr) repeat(5,minmax(96px,1fr));
  }
}

body.backups-page .backup-summary-card{
  background:transparent;
  border:0;
  box-shadow:none;
}
body.backups-page .backup-summary-grid{
  padding:0;
  gap:18px;
}
body.backups-page .backup-summary-item{
  background:transparent;
  border:0;
  box-shadow:none;
  border-radius:0;
  padding:0;
  min-height:0;
}
body.backups-page .backup-summary-icon{
  background:#f7eedf;
}
body.backups-page .backup-create-modal .modal-head,
body.backups-page .backup-upload-modal .modal-head,
body.backups-page .backup-create-modal .backup-modal-intro,
body.backups-page .backup-upload-modal .backup-modal-intro{
  display:none;
}
body.backups-page .backup-modal-body-solo{
  padding-top:26px;
}
body.backups-page .backup-modal-inline-title{
  max-width:520px;
  margin:0 auto 18px;
  color:#1a1714;
  font-size:18px;
  font-weight:700;
  line-height:1.3;
  text-align:left;
}
body.backups-page .backup-passkey-field{
  max-width:520px;
}
body.backups-page .backup-passkey-digits{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:12px;
  width:100%;
}
body.backups-page .backup-passkey-digit{
  width:100%;
  max-width:none;
  min-width:0;
  height:56px;
  border-radius:14px;
}
body.backups-page .backup-passkey-hint,
body.backups-page .backup-passkey-actions{
  display:flex;
  justify-content:center;
  text-align:center;
}
body.backups-page .backup-passkey-hint{
  margin-top:10px;
}
body.backups-page .backup-passkey-actions{
  margin-top:6px;
}
body.backups-page .backup-size-stack strong{
  font-size:28px;
  font-weight:800;
  letter-spacing:-0.02em;
}
@media (max-width: 640px){
  body.backups-page .backup-passkey-digits{
    gap:8px;
  }
  body.backups-page .backup-passkey-digit{
    height:50px;
  }
}

body.backups-page .backup-summary-card{
  background:transparent;
  border:0;
  box-shadow:none;
}
body.backups-page .backup-summary-card .card-body{
  border-top:0;
  padding:0;
}
body.backups-page .backup-summary-grid{
  padding:0;
  gap:18px;
}
body.backups-page .backup-summary-item{
  background:linear-gradient(180deg,#fffefb 0%,#ffffff 100%);
  border:1px solid rgba(214,196,162,.32);
  box-shadow:0 14px 32px rgba(36,27,14,.04);
  border-radius:18px;
  padding:18px 18px 16px;
  min-height:118px;
}

body.backups-page .backup-create-modal,
body.backups-page .backup-upload-modal{
  width:min(560px, calc(100vw - 32px));
}
body.backups-page .backup-create-modal .modal-body,
body.backups-page .backup-upload-modal .modal-body{
  padding:24px 24px 18px;
}
body.backups-page .backup-create-modal .modal-foot,
body.backups-page .backup-upload-modal .modal-foot{
  padding:14px 24px 18px;
}
body.backups-page .backup-modal-inline-title{
  margin:0 auto 16px;
  font-size:17px;
}
body.backups-page .backup-create-modal .form-group,
body.backups-page .backup-upload-modal .form-group{
  max-width:420px;
  margin-bottom:18px;
}
body.backups-page .backup-upload-shell{
  min-height:82px;
  padding:14px 16px;
  border-radius:16px;
}
body.backups-page .backup-upload-shell-icon{
  width:38px;
  height:38px;
  border-radius:12px;
}
body.backups-page .backup-upload-shell-copy strong{
  font-size:13px;
}
body.backups-page .backup-upload-shell-copy small,
body.backups-page .backup-upload-shell-copy em{
  font-size:11px;
  line-height:1.45;
}
body.backups-page .backup-upload-modal .backup-passkey-field,
body.backups-page .backup-create-modal .backup-passkey-field,
body.backups-page .backup-action-modal .backup-passkey-field{
  max-width:360px;
  margin-top:6px;
}
body.backups-page .backup-upload-modal .backup-passkey-digits,
body.backups-page .backup-create-modal .backup-passkey-digits,
body.backups-page .backup-action-modal .backup-passkey-digits{
  display:flex;
  justify-content:center;
  gap:10px;
  width:auto;
}
body.backups-page .backup-upload-modal .backup-passkey-digit,
body.backups-page .backup-create-modal .backup-passkey-digit,
body.backups-page .backup-action-modal .backup-passkey-digit{
  flex:0 0 48px;
  width:48px;
  height:48px;
  max-width:48px;
  border-radius:14px;
  font-size:21px;
}
body.backups-page .backup-upload-modal .backup-passkey-hint,
body.backups-page .backup-create-modal .backup-passkey-hint,
body.backups-page .backup-action-modal .backup-passkey-hint{
  margin-top:10px;
  font-size:11px;
}
body.backups-page .backup-upload-modal .backup-passkey-actions,
body.backups-page .backup-create-modal .backup-passkey-actions,
body.backups-page .backup-action-modal .backup-passkey-actions{
  margin-top:4px;
}
@media (max-width: 640px){
  body.backups-page .backup-upload-modal .backup-passkey-digit,
  body.backups-page .backup-create-modal .backup-passkey-digit,
  body.backups-page .backup-action-modal .backup-passkey-digit{
    flex:0 0 42px;
    width:42px;
    height:42px;
    max-width:42px;
    border-radius:12px;
    font-size:19px;
  }
}

body.backups-page .backup-upload-modal .backup-modal-inline-title,
body.backups-page .backup-create-modal .backup-modal-inline-title{
  max-width:420px;
  margin:0 auto 22px;
}
body.backups-page .backup-upload-modal .form-group:first-of-type,
body.backups-page .backup-create-modal .form-group:first-of-type{
  margin-top:2px;
}
body.backups-page .backup-upload-modal .backup-passkey-field,
body.backups-page .backup-create-modal .backup-passkey-field,
body.backups-page .backup-action-modal .backup-passkey-field{
  max-width:420px;
}
body.backups-page .backup-upload-modal .backup-passkey-digits,
body.backups-page .backup-create-modal .backup-passkey-digits,
body.backups-page .backup-action-modal .backup-passkey-digits{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:10px;
  width:100%;
}
body.backups-page .backup-upload-modal .backup-passkey-digit,
body.backups-page .backup-create-modal .backup-passkey-digit,
body.backups-page .backup-action-modal .backup-passkey-digit{
  width:100%;
  max-width:none;
  min-width:0;
  flex:none;
}

body.backups-page .backup-create-modal,
body.backups-page .backup-upload-modal,
body.backups-page .backup-action-modal,
body.backups-page .backup-security-modal{
  border-radius:24px;
  overflow:hidden;
  box-shadow:0 28px 70px rgba(20,16,10,.20);
}
body.backups-page .backup-create-modal,
body.backups-page .backup-upload-modal,
body.backups-page .backup-action-modal{
  width:min(540px, calc(100vw - 32px));
}
body.backups-page .backup-security-modal{
  width:min(760px, calc(100vw - 32px));
}
body.backups-page .backup-create-modal .modal-head,
body.backups-page .backup-upload-modal .modal-head{
  display:none !important;
}
body.backups-page .backup-security-modal .modal-head,
body.backups-page .backup-action-modal .modal-head{
  padding:20px 22px 14px;
  background:#fff;
  border-bottom:1px solid rgba(34,31,27,.06);
}
body.backups-page .backup-security-modal .modal-title,
body.backups-page .backup-action-modal .modal-title,
body.backups-page .backup-modal-inline-title{
  font-size:18px;
  font-weight:700;
  line-height:1.3;
  color:#181512;
}
body.backups-page .backup-security-modal-subtitle,
body.backups-page .backup-action-copy{
  margin-top:6px;
  color:#8c8176;
  font-size:12px;
  line-height:1.5;
}
body.backups-page .backup-modal-body-solo,
body.backups-page .backup-action-modal .modal-body,
body.backups-page .backup-security-modal .modal-body{
  padding:22px 22px 16px;
  background:#fff;
}
body.backups-page .backup-modal-inline-title{
  max-width:404px;
  margin:0 auto 20px;
  text-align:left;
}
body.backups-page .backup-modal-dismiss{
  top:14px;
  right:14px;
  width:32px;
  height:32px;
  border-radius:10px;
  background:#faf3e7;
}
body.backups-page .backup-create-modal .form-group,
body.backups-page .backup-upload-modal .form-group,
body.backups-page .backup-action-modal .form-group,
body.backups-page .backup-security-modal .form-group,
body.backups-page .backup-passkey-field,
body.backups-page .backup-action-summary{
  max-width:404px;
  margin-left:auto;
  margin-right:auto;
}
body.backups-page .backup-create-modal .form-group,
body.backups-page .backup-upload-modal .form-group,
body.backups-page .backup-action-modal .form-group,
body.backups-page .backup-security-modal .form-group{
  margin-bottom:18px;
}
body.backups-page .backup-upload-shell{
  min-height:84px;
  padding:14px 15px;
  border-radius:16px;
}
body.backups-page .backup-upload-shell-copy strong{
  font-size:13px;
  line-height:1.35;
}
body.backups-page .backup-upload-shell-copy small,
body.backups-page .backup-upload-shell-copy em{
  font-size:11px;
  line-height:1.45;
}
body.backups-page .backup-passkey-field{
  text-align:left;
  margin-top:4px;
}
body.backups-page .backup-passkey-group{
  width:100%;
}
body.backups-page .backup-passkey-digits{
  display:flex;
  justify-content:space-between;
  align-items:center;
  width:100%;
  gap:0;
}
body.backups-page .backup-passkey-digit{
  flex:0 0 54px;
  width:54px;
  height:54px;
  max-width:54px;
  min-width:54px;
  border-radius:14px;
  border:1px solid rgba(214,196,162,.44);
  background:#fffdfa;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9);
  font-size:21px;
  font-weight:700;
  color:#1c1814;
}
body.backups-page .backup-passkey-digit:focus{
  border-color:#c6912f;
  box-shadow:0 0 0 4px rgba(198,145,47,.10);
}
body.backups-page .backup-passkey-hint{
  margin-top:10px;
  display:flex;
  justify-content:center;
  text-align:center;
  color:#8b8176;
  font-size:11px;
}
body.backups-page .backup-passkey-actions{
  margin-top:4px;
  display:flex;
  justify-content:center;
}
body.backups-page .backup-passkey-reset{
  font-size:11px;
  letter-spacing:.02em;
}
body.backups-page .backup-create-modal .modal-foot,
body.backups-page .backup-upload-modal .modal-foot,
body.backups-page .backup-action-modal .modal-foot,
body.backups-page .backup-security-modal .modal-foot{
  padding:12px 22px 16px;
  background:#fff;
  border-top:1px solid rgba(34,31,27,.06);
}
body.backups-page .backup-security-modal-body{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
body.backups-page .backup-security-step{
  padding:18px;
  border-radius:18px;
  background:#fffdf9;
  border:1px solid rgba(214,196,162,.28);
}
body.backups-page .backup-security-step-head{
  margin-bottom:16px;
}
body.backups-page .backup-security-step-head > span{
  width:30px;
  height:30px;
  border-radius:10px;
}
body.backups-page .backup-security-tip{
  max-width:404px;
  margin:12px auto 0;
}
@media (max-width: 640px){
  body.backups-page .backup-create-modal,
  body.backups-page .backup-upload-modal,
  body.backups-page .backup-action-modal,
  body.backups-page .backup-security-modal{
    width:calc(100vw - 22px);
  }
  body.backups-page .backup-create-modal .form-group,
  body.backups-page .backup-upload-modal .form-group,
  body.backups-page .backup-action-modal .form-group,
  body.backups-page .backup-security-modal .form-group,
  body.backups-page .backup-passkey-field,
  body.backups-page .backup-action-summary,
  body.backups-page .backup-modal-inline-title{
    max-width:100%;
  }
  body.backups-page .backup-passkey-digit{
    flex:0 0 46px;
    width:46px;
    height:46px;
    max-width:46px;
    min-width:46px;
    border-radius:12px;
    font-size:19px;
  }
  body.backups-page .backup-security-modal-body{
    grid-template-columns:1fr;
  }
}

body.backups-page .backup-create-modal,
body.backups-page .backup-upload-modal,
body.backups-page .backup-action-modal{
  width:min(520px, calc(100vw - 28px));
}
body.backups-page .backup-create-modal .modal-head,
body.backups-page .backup-upload-modal .modal-head{
  display:flex !important;
  padding:18px 24px 14px;
  background:#fff;
  border-bottom:1px solid rgba(34,31,27,.06);
}
body.backups-page .backup-create-modal .modal-body,
body.backups-page .backup-upload-modal .modal-body,
body.backups-page .backup-action-modal .modal-body{
  padding:22px 24px 18px;
  background:#fff;
}
body.backups-page .backup-create-modal .modal-foot,
body.backups-page .backup-upload-modal .modal-foot,
body.backups-page .backup-action-modal .modal-foot{
  padding:16px 24px 18px;
  background:#fff;
  border-top:1px solid rgba(34,31,27,.06);
}
body.backups-page .backup-modal-body-solo,
body.backups-page .backup-modal-inline-title,
body.backups-page .backup-modal-dismiss{
  all:unset;
}
body.backups-page .backup-create-modal .form-group,
body.backups-page .backup-upload-modal .form-group,
body.backups-page .backup-action-modal .form-group,
body.backups-page .backup-passkey-field,
body.backups-page .backup-action-summary,
body.backups-page .backup-action-copy{
  max-width:404px;
  margin-left:auto;
  margin-right:auto;
}
body.backups-page .backup-create-modal .form-group,
body.backups-page .backup-upload-modal .form-group,
body.backups-page .backup-action-modal .form-group{
  margin-bottom:18px;
}
body.backups-page .backup-upload-shell{
  min-height:84px;
  padding:14px 16px;
  border-radius:16px;
}
body.backups-page .backup-passkey-field{
  width:100%;
  margin-top:6px;
  text-align:left;
}
body.backups-page .backup-passkey-group{
  width:100%;
}
body.backups-page .backup-passkey-digits{
  width:396px;
  max-width:100%;
  margin:0 auto;
  display:grid;
  grid-template-columns:repeat(6,56px);
  justify-content:space-between;
  gap:0;
}
body.backups-page .backup-passkey-digit{
  width:56px;
  height:56px;
  min-width:56px;
  max-width:56px;
  flex:none;
  border-radius:14px;
  font-size:21px;
}
body.backups-page .backup-passkey-hint,
body.backups-page .backup-passkey-actions{
  display:flex;
  justify-content:center;
  text-align:center;
}
body.backups-page .backup-passkey-hint{
  margin-top:10px;
}
body.backups-page .backup-passkey-actions{
  margin-top:4px;
}
body.backups-page .backup-action-summary{
  margin-bottom:12px;
  padding:14px 16px;
  border-radius:16px;
  border:1px solid rgba(214,196,162,.30);
  background:#fff8ee;
  text-align:left;
}
body.backups-page .backup-action-summary strong{
  display:block;
  color:#191613;
  font-size:14px;
  line-height:1.4;
}
body.backups-page .backup-action-summary span{
  display:block;
  margin-top:4px;
  color:#8a7f73;
  font-size:12px;
  line-height:1.45;
}
body.backups-page .backup-action-copy{
  margin-bottom:18px;
  color:#8b8176;
  font-size:12px;
  line-height:1.5;
  text-align:left;
}
@media (max-width: 640px){
  body.backups-page .backup-create-modal,
  body.backups-page .backup-upload-modal,
  body.backups-page .backup-action-modal{
    width:calc(100vw - 20px);
  }
  body.backups-page .backup-create-modal .form-group,
  body.backups-page .backup-upload-modal .form-group,
  body.backups-page .backup-action-modal .form-group,
  body.backups-page .backup-passkey-field,
  body.backups-page .backup-action-summary,
  body.backups-page .backup-action-copy{
    max-width:100%;
  }
  body.backups-page .backup-passkey-digits{
    width:100%;
    grid-template-columns:repeat(6,minmax(0,1fr));
    gap:8px;
  }
  body.backups-page .backup-passkey-digit{
    width:100%;
    min-width:0;
    max-width:none;
    height:48px;
    border-radius:12px;
    font-size:19px;
  }
}

body.backups-page .backup-create-modal .backup-passkey-field,
body.backups-page .backup-upload-modal .backup-passkey-field,
body.backups-page .backup-action-modal .backup-passkey-field,
body.backups-page .backup-security-modal .backup-passkey-field{
  margin-top:18px;
}

body.backups-page .backup-security-modal,
body.backups-page .backup-action-modal{
  width:min(560px, calc(100vw - 28px));
}
body.backups-page .backup-security-modal .modal-head,
body.backups-page .backup-action-modal .modal-head{
  padding:18px 24px 14px;
  background:#fff;
  border-bottom:1px solid rgba(34,31,27,.06);
}
body.backups-page .backup-security-modal .modal-body,
body.backups-page .backup-action-modal .modal-body{
  padding:22px 24px 18px;
  background:#fff;
}
body.backups-page .backup-security-modal .modal-foot,
body.backups-page .backup-action-modal .modal-foot{
  padding:16px 24px 18px;
  background:#fff;
  border-top:1px solid rgba(34,31,27,.06);
}
body.backups-page .backup-security-modal-body{
  display:flex;
  flex-direction:column;
  gap:14px;
}
body.backups-page .backup-security-step{
  padding:18px;
  border-radius:16px;
  background:#fffdf9;
  border:1px solid rgba(214,196,162,.26);
}
body.backups-page .backup-security-step-head{
  display:flex;
  align-items:flex-start;
  gap:12px;
  margin-bottom:14px;
}
body.backups-page .backup-security-step-head > span{
  width:28px;
  height:28px;
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
}
body.backups-page .backup-security-step-head strong{
  display:block;
  margin-bottom:4px;
  font-size:14px;
  color:#181512;
}
body.backups-page .backup-security-step-head p{
  margin:0;
  color:#8b8176;
  font-size:12px;
  line-height:1.45;
}
body.backups-page .backup-security-step .backup-passkey-field,
body.backups-page .backup-action-modal .backup-passkey-field,
body.backups-page .backup-create-modal .backup-passkey-field,
body.backups-page .backup-upload-modal .backup-passkey-field{
  max-width:356px;
  margin:14px auto 0;
}
body.backups-page .backup-security-step .backup-passkey-digits,
body.backups-page .backup-action-modal .backup-passkey-digits,
body.backups-page .backup-create-modal .backup-passkey-digits,
body.backups-page .backup-upload-modal .backup-passkey-digits{
  width:338px;
  max-width:100%;
  margin:0 auto;
  display:grid;
  grid-template-columns:repeat(6,48px);
  justify-content:space-between;
  gap:0;
}
body.backups-page .backup-security-step .backup-passkey-digit,
body.backups-page .backup-action-modal .backup-passkey-digit,
body.backups-page .backup-create-modal .backup-passkey-digit,
body.backups-page .backup-upload-modal .backup-passkey-digit{
  width:48px;
  height:48px;
  min-width:48px;
  max-width:48px;
  border-radius:13px;
  font-size:19px;
}
body.backups-page .backup-security-tip{
  max-width:356px;
  margin:12px auto 0;
  padding:10px 12px;
  border-radius:14px;
  background:#faf5ea;
  font-size:11px;
}
body.backups-page .backup-action-summary{
  max-width:404px;
  margin:0 auto 12px;
  padding:0;
  border:0;
  background:transparent;
}
body.backups-page .backup-action-summary strong{
  font-size:14px;
}
body.backups-page .backup-action-summary span{
  margin-top:3px;
}
body.backups-page .backup-action-copy{
  max-width:404px;
  margin:0 auto 14px;
}
@media (max-width: 640px){
  body.backups-page .backup-security-modal,
  body.backups-page .backup-action-modal{
    width:calc(100vw - 20px);
  }
body.backups-page .backup-security-step .backup-passkey-digits,
  body.backups-page .backup-action-modal .backup-passkey-digits,
  body.backups-page .backup-create-modal .backup-passkey-digits,
  body.backups-page .backup-upload-modal .backup-passkey-digits{
    width:100%;
    grid-template-columns:repeat(6,minmax(0,1fr));
    gap:8px;
  }
  body.backups-page .backup-security-step .backup-passkey-digit,
  body.backups-page .backup-action-modal .backup-passkey-digit,
  body.backups-page .backup-create-modal .backup-passkey-digit,
  body.backups-page .backup-upload-modal .backup-passkey-digit{
    width:100%;
    min-width:0;
    max-width:none;
    height:46px;
    font-size:18px;
  }
}

/* Targeted fixes: backup security modal + payment source cell */
body.backups-page .backup-security-modal{
  width:min(580px, calc(100vw - 28px));
}

body.backups-page .backup-security-modal .modal-head{
  padding:20px 24px 14px;
  border-bottom:1px solid rgba(34,31,27,.06);
}

body.backups-page .backup-security-modal .modal-body{
  padding:18px 24px 18px;
}

body.backups-page .backup-security-modal .modal-foot{
  padding:12px 24px 16px;
}

body.backups-page .backup-security-modal-body{
  display:grid;
  gap:14px;
}

body.backups-page .backup-security-step{
  padding:18px 18px 16px;
  border-radius:16px;
  border:1px solid rgba(214,196,162,.28);
  background:#fffdf9;
}

body.backups-page .backup-security-step-head{
  display:flex;
  align-items:flex-start;
  gap:12px;
  margin-bottom:14px;
}

body.backups-page .backup-security-step-head > span{
  width:30px;
  height:30px;
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  background:linear-gradient(180deg, #fbf1de 0%, #f4e1b8 100%) !important;
  border:1px solid rgba(184,137,42,.18);
  color:#b07a1a !important;
  font-size:11px;
  font-weight:800;
  box-shadow:0 8px 18px rgba(184,137,42,.12);
}

body.backups-page .backup-security-step strong{
  color:#171411;
}

body.backups-page .backup-security-step p{
  color:#8a7f73;
}

body.backups-page .backup-security-step .backup-passkey-field{
  max-width:372px;
  margin:14px auto 0;
}

body.backups-page .backup-security-step .backup-passkey-digits{
  width:100%;
  max-width:372px;
  margin:0 auto;
  grid-template-columns:repeat(6, 52px);
  justify-content:space-between;
  gap:0;
}

body.backups-page .backup-security-step .backup-passkey-digit{
  width:52px;
  height:52px;
  min-width:52px;
  max-width:52px;
  border-radius:14px;
  font-size:20px;
}

body.backups-page .backup-security-tip{
  max-width:372px;
  margin:12px auto 0;
}

.pay-td-source{
  display:grid;
  grid-template-columns:max-content minmax(0, 1fr);
  grid-template-areas:
    "pill name"
    "pill ctx";
  column-gap:8px;
  row-gap:4px;
  align-items:start;
}

.pay-td-source .pay-source-pill{
  grid-area:pill;
  align-self:start;
}

.pay-td-source .ptd-src-name{
  grid-area:name;
  min-width:0;
  flex-shrink:1;
}

.pay-td-source .ptd-src-ctx{
  grid-area:ctx;
  display:block;
  min-width:0;
}

@media (max-width: 640px){
  body.backups-page .backup-security-modal{
    width:calc(100vw - 20px);
  }

  body.backups-page .backup-security-step .backup-passkey-field,
  body.backups-page .backup-security-tip{
    max-width:100%;
  }

  body.backups-page .backup-security-step .backup-passkey-digits{
    max-width:100%;
    grid-template-columns:repeat(6, minmax(0, 1fr));
    gap:8px;
  }

  body.backups-page .backup-security-step .backup-passkey-digit{
    width:100%;
    min-width:0;
    max-width:none;
    height:46px;
    font-size:18px;
  }
}

/* Final fix: stack the backup security modal cleanly */
body.backups-page #backupSecurityModal .backup-security-modal{
  width:min(560px, calc(100vw - 28px));
}

body.backups-page #backupSecurityModal .backup-security-modal-body{
  display:flex !important;
  flex-direction:column !important;
  gap:16px !important;
}

body.backups-page #backupSecurityModal .backup-security-step{
  width:100%;
  padding:18px 18px 16px;
}

body.backups-page #backupSecurityModal .backup-security-step .backup-passkey-field{
  max-width:360px;
  margin:14px auto 0;
}

body.backups-page #backupSecurityModal .backup-security-step .backup-passkey-digits{
  width:312px;
  max-width:100%;
  margin:0 auto;
  display:grid;
  grid-template-columns:repeat(6, 48px);
  justify-content:space-between;
  gap:0;
}

body.backups-page #backupSecurityModal .backup-security-step .backup-passkey-digit{
  width:48px;
  height:48px;
  min-width:48px;
  max-width:48px;
  border-radius:13px;
  font-size:19px;
}

body.backups-page #backupSecurityModal .backup-security-tip{
  max-width:360px;
}

@media (max-width: 640px){
  body.backups-page #backupSecurityModal .backup-security-modal{
    width:calc(100vw - 20px);
  }

  body.backups-page #backupSecurityModal .backup-security-step .backup-passkey-field,
  body.backups-page #backupSecurityModal .backup-security-tip{
    max-width:100%;
  }

  body.backups-page #backupSecurityModal .backup-security-step .backup-passkey-digits{
    width:100%;
    grid-template-columns:repeat(6, minmax(0, 1fr));
    gap:8px;
  }

  body.backups-page #backupSecurityModal .backup-security-step .backup-passkey-digit{
    width:100%;
    min-width:0;
    max-width:none;
    height:46px;
    font-size:18px;
  }
}

/* Final UI cleanup: backups, pop-ups, dashboard tracker and payments */
body.backups-page .backup-create-modal,
body.backups-page .backup-upload-modal,
body.backups-page .backup-action-modal{
  width:min(520px, calc(100vw - 28px));
  border-radius:22px;
  overflow:hidden;
}

body.backups-page .backup-security-modal{
  width:min(620px, calc(100vw - 28px));
  border-radius:24px;
  overflow:hidden;
}

body.backups-page .backup-create-modal .modal-head,
body.backups-page .backup-upload-modal .modal-head,
body.backups-page .backup-action-modal .modal-head{
  display:flex !important;
  align-items:center;
  justify-content:space-between;
  padding:18px 22px 0;
  background:#fff;
  border-bottom:0;
}

body.backups-page .backup-security-modal .modal-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:20px 24px 0;
  background:#fff;
  border-bottom:0;
}

body.backups-page .backup-create-modal .modal-title,
body.backups-page .backup-upload-modal .modal-title,
body.backups-page .backup-action-modal .modal-title,
body.backups-page .backup-security-modal .modal-title{
  font-size:17px;
  font-weight:700;
  color:#171411;
  line-height:1.3;
}

body.backups-page .backup-security-modal-subtitle{
  margin:6px 0 0;
  color:#8a7f73;
  font-size:12px;
  line-height:1.45;
}

body.backups-page .backup-create-modal .modal-body,
body.backups-page .backup-upload-modal .modal-body,
body.backups-page .backup-action-modal .modal-body{
  padding:18px 22px 20px;
  background:#fff;
}

body.backups-page .backup-security-modal .modal-body{
  padding:18px 24px 18px;
  background:#fff;
}

body.backups-page .backup-create-modal .modal-foot,
body.backups-page .backup-upload-modal .modal-foot,
body.backups-page .backup-action-modal .modal-foot,
body.backups-page .backup-security-modal .modal-foot{
  padding:12px 22px 18px;
  background:#fff;
  border-top:1px solid rgba(34,31,27,.06);
}

body.backups-page .backup-security-modal .modal-foot{
  padding-left:24px;
  padding-right:24px;
}

body.backups-page .backup-create-modal .form-group,
body.backups-page .backup-upload-modal .form-group,
body.backups-page .backup-action-modal .form-group,
body.backups-page .backup-security-modal .form-group,
body.backups-page .backup-passkey-field,
body.backups-page .backup-action-summary,
body.backups-page .backup-action-copy{
  max-width:408px;
  margin-left:auto;
  margin-right:auto;
}

body.backups-page .backup-create-modal .form-group,
body.backups-page .backup-upload-modal .form-group,
body.backups-page .backup-action-modal .form-group,
body.backups-page .backup-security-modal .form-group{
  margin-bottom:18px;
}

body.backups-page .backup-upload-modal .form-group:first-of-type{
  margin-top:6px;
}

body.backups-page .backup-upload-shell{
  min-height:84px;
  padding:15px 16px;
  border-radius:16px;
}

body.backups-page .backup-upload-shell-copy strong{
  font-size:13px;
  line-height:1.35;
}

body.backups-page .backup-upload-shell-copy small,
body.backups-page .backup-upload-shell-copy em{
  font-size:11px;
  line-height:1.45;
}

body.backups-page .backup-passkey-field{
  width:100%;
  margin-top:18px;
  text-align:left;
}

body.backups-page .backup-passkey-group{
  width:100%;
}

body.backups-page .backup-passkey-digits{
  width:100%;
  display:grid;
  grid-template-columns:repeat(6, 50px);
  justify-content:space-between;
  gap:0;
}

body.backups-page .backup-passkey-digit{
  width:50px;
  height:50px;
  min-width:50px;
  max-width:50px;
  border-radius:14px;
  border:1px solid rgba(214,196,162,.44);
  background:#fffdfa;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.92);
  font-size:20px;
  font-weight:700;
  color:#171411;
}

body.backups-page .backup-passkey-digit:focus{
  border-color:#c6912f;
  box-shadow:0 0 0 4px rgba(198,145,47,.10);
}

body.backups-page .backup-passkey-hint,
body.backups-page .backup-passkey-actions{
  display:flex;
  justify-content:center;
  text-align:center;
}

body.backups-page .backup-passkey-hint{
  margin-top:11px;
  color:#8a7f73;
  font-size:11px;
}

body.backups-page .backup-passkey-actions{
  margin-top:6px;
}

body.backups-page .backup-action-summary{
  margin-top:4px;
  margin-bottom:12px;
  padding:14px 15px;
  border-radius:16px;
  border:1px solid rgba(214,196,162,.26);
  background:#fdf9f1;
}

body.backups-page .backup-action-summary strong{
  display:block;
  color:#171411;
  font-size:14px;
  line-height:1.35;
}

body.backups-page .backup-action-summary span{
  display:block;
  margin-top:4px;
  color:#8a7f73;
  font-size:12px;
}

body.backups-page .backup-action-copy{
  margin-bottom:14px;
  color:#8a7f73;
  font-size:12px;
  line-height:1.5;
  text-align:left;
}

body.backups-page .backup-security-modal-body{
  display:grid;
  gap:14px;
}

body.backups-page .backup-security-step{
  padding:18px;
  border-radius:16px;
  border:1px solid rgba(214,196,162,.28);
  background:#fffdf9;
}

body.backups-page .backup-security-step-head{
  display:flex;
  align-items:flex-start;
  gap:12px;
  margin-bottom:14px;
}

body.backups-page .backup-security-step-head > span{
  width:30px;
  height:30px;
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  background:linear-gradient(180deg, #fbf1de 0%, #f4e1b8 100%);
  border:1px solid rgba(184,137,42,.16);
  color:#b07a1a;
  font-size:11px;
  font-weight:800;
  box-shadow:0 8px 18px rgba(184,137,42,.12);
}

body.backups-page .backup-security-step-head strong{
  display:block;
  margin-bottom:4px;
  font-size:14px;
  color:#171411;
}

body.backups-page .backup-security-step-head p{
  margin:0;
  color:#8a7f73;
  font-size:12px;
  line-height:1.45;
}

body.backups-page .backup-security-step .backup-passkey-field{
  max-width:408px;
  margin:14px auto 0;
}

body.backups-page .backup-security-tip{
  max-width:408px;
  margin:12px auto 0;
  padding:10px 12px;
  border-radius:14px;
  background:#faf5ea;
  font-size:11px;
  color:#8a7f73;
}

.annc-table-head,
.annc-row{
  grid-template-columns:minmax(320px, 1.55fr) minmax(120px, .72fr) 126px 84px 96px 110px;
  gap:20px;
  align-items:center;
}

.annc-table-head{
  padding:16px 24px 12px;
}

.annc-row{
  padding:18px 24px;
}

.annc-row > *{
  min-width:0;
}

.annc-message{
  gap:8px;
}

.annc-message-preview-shell{
  max-width:520px;
  padding:12px 14px 11px;
  gap:8px;
}

.annc-message-preview{
  font-size:14px;
  line-height:1.45;
}

.annc-message-meta{
  gap:7px;
}

.annc-audience,
.annc-mode-pill,
.annc-seen-pill,
.annc-row .usr-dot{
  align-self:center;
}

.annc-row .db-row-actions{
  justify-self:end;
  align-self:center;
}

.etu-head-rate{
  justify-self:center;
  text-align:center;
}

.etu-rate-cell{
  justify-self:center;
  justify-content:center;
  width:96px;
}

.etu-rate-bar-wrap{
  width:52px;
  flex:0 0 52px;
}

.etu-rate-value{
  min-width:34px;
  text-align:left;
}

.pay-ledger{
  overflow-x:auto;
  overflow-y:hidden;
}

.pay-tbl-head,
.pay-item{
  grid-template-columns:220px 220px 120px 116px 176px 148px 112px;
  justify-content:space-between;
  gap:18px;
  min-width:1120px;
}

.pay-tbl-head{
  padding:0 26px;
}

.pay-item{
  padding:0 26px;
  min-height:74px;
}

.pay-td{
  padding:17px 0;
}

.pay-td-date{
  padding-left:0;
  padding-right:0;
}

.pay-td-date .ptd-date-copy{
  justify-content:flex-start;
}

@media (max-width: 960px){
  .annc-table-head,
  .annc-row{
    grid-template-columns:1fr;
  }
}

@media (max-width: 640px){
  body.backups-page .backup-create-modal,
  body.backups-page .backup-upload-modal,
  body.backups-page .backup-action-modal,
  body.backups-page .backup-security-modal{
    width:calc(100vw - 20px);
  }

  body.backups-page .backup-create-modal .form-group,
  body.backups-page .backup-upload-modal .form-group,
  body.backups-page .backup-action-modal .form-group,
  body.backups-page .backup-security-modal .form-group,
  body.backups-page .backup-passkey-field,
  body.backups-page .backup-action-summary,
  body.backups-page .backup-action-copy,
  body.backups-page .backup-security-tip{
    max-width:100%;
  }

  body.backups-page .backup-passkey-digits{
    grid-template-columns:repeat(6, minmax(0, 1fr));
    gap:8px;
  }

  body.backups-page .backup-passkey-digit{
    width:100%;
    min-width:0;
    max-width:none;
    height:46px;
    font-size:18px;
  }
}
