/* ============================================================
   University of Dubai — Conference Registration System
   Design system v2 — refined, inspired by Cursor + Claude UIs.
   Class contract preserved from v1 (all view classes still apply).
   ============================================================ */

:root {
  /* Brand — sampled from the official UD logo (royal navy + bronze gold) */
  --ud-navy: #11206E;
  --ud-navy-2: #1A2E86;          /* lighter royal for gradients */
  --ud-navy-dark: #0A1450;
  --ud-gold: #BC9143;            /* logo bronze-gold */
  --ud-gold-2: #C8972A;          /* vivid accent gold */
  --ud-gold-soft: #DCC089;
  --ud-blue-mid: #2E5BD6;
  --ud-blue-light: #EEF2FC;

  /* Surfaces & neutrals (cool canvas + hairlines) */
  --ud-white: #FFFFFF;
  --ud-grey-bg: #F4F6FA;
  --canvas: #EFF2F8;
  --surface: #FFFFFF;
  --surface-2: #FAFBFD;
  --ud-grey-border: #E5E8F0;
  --hairline: #EBEEF5;

  /* Glass */
  --glass-bg: rgba(255,255,255,.70);
  --glass-strong: rgba(255,255,255,.82);
  --glass-border: rgba(255,255,255,.65);
  --glass-blur: blur(16px) saturate(170%);

  /* Text */
  --ud-text-dark: #16202E;
  --ud-text-mid: #5A6473;
  --ud-text-light: #98A1B0;

  /* Status (soft pastel) */
  --st-draft-bg: #F1F3F6;       --st-draft-fg: #5A6473;
  --st-pending-bg: #FEF6E6;     --st-pending-fg: #B07A12;
  --st-approved-bg: #E7F6EE;    --st-approved-fg: #157F4B;
  --st-rejected-bg: #FDECEC;    --st-rejected-fg: #C73B36;
  --st-returned-bg: #FFF1E3;    --st-returned-fg: #C2671A;
  --st-prf-bg: #EAF1FE;         --st-prf-fg: #2257C4;
  --st-prfok-bg: #E2F5F1;       --st-prfok-fg: #0A7C6B;
  --st-overdue-bg: #FDECEC;     --st-overdue-fg: #C73B36;

  /* Elevation */
  --shadow-xs: 0 1px 2px rgba(16,24,40,.04);
  --shadow-card: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.06);
  --shadow-pop: 0 8px 28px rgba(16,24,40,.12), 0 2px 6px rgba(16,24,40,.06);
  --shadow-modal: 0 24px 60px rgba(16,24,40,.22);
  --shadow-focus: 0 0 0 3px rgba(46,107,214,.18);
  --shadow-focus-gold: 0 0 0 3px rgba(200,151,42,.20);

  --r-sm: 8px; --r-md: 10px; --r-lg: 14px; --r-pill: 999px;
}

* { box-sizing: border-box; }
::selection { background: rgba(46,107,214,.16); }

html, body, #root {
  margin: 0; padding: 0; min-height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  color: var(--ud-text-dark);
  font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv02","cv03","cv04","cv11";
}
body {
  background:
    radial-gradient(900px 500px at 88% -8%, rgba(188,145,67,.10), transparent 60%),
    radial-gradient(1000px 620px at -8% 4%, rgba(17,32,110,.10), transparent 58%),
    linear-gradient(180deg, #EFF2F8 0%, #F3F5FA 100%);
  background-attachment: fixed;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: var(--ud-blue-mid); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: 6px; }
.mono, .tabular { font-variant-numeric: tabular-nums; }
.mono { font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12.5px; letter-spacing: -.2px; color: var(--ud-text-mid); }

/* ---------- Shell ---------- */
.app-root { min-height: 100vh; display: flex; flex-direction: column; }

.top-header {
  height: 60px; background: var(--glass-bg); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  display: flex; align-items: center; padding: 0 18px;
  position: sticky; top: 0; z-index: 30;
  box-shadow: 0 1px 0 rgba(16,24,40,.03);
}
.ud-logo-img { height: 30px; width: auto; display: block; }
.hd-left, .hd-center, .hd-right { display: flex; align-items: center; gap: 14px; }
.hd-center { flex: 1; justify-content: center; color: var(--ud-text-light); font-size: 13px; font-weight: 500; letter-spacing: .2px; }
.hd-right { gap: 10px; }

.hamburger { width: 36px; height: 36px; border-radius: var(--r-md); display: grid; place-items: center; color: var(--ud-text-mid); font-size: 16px; transition: background .15s; }
.hamburger:hover { background: var(--ud-grey-bg); color: var(--ud-text-dark); }

.ud-logo { display: flex; align-items: center; gap: 10px; padding: 4px 8px; border-radius: var(--r-md); transition: background .15s; }
.ud-logo:hover { background: var(--ud-grey-bg); text-decoration: none; }
.ud-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(150deg, #22337f, var(--ud-navy-dark));
  color: var(--ud-gold-soft); font-weight: 800; font-size: 13px; letter-spacing: .5px;
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), var(--shadow-xs);
}
.ud-wordmark { display: flex; flex-direction: column; line-height: 1.1; }
.ud-wordmark .l1 { font-size: 11px; color: var(--ud-text-light); }
.ud-wordmark .l2 { font-size: 14px; color: var(--ud-text-dark); font-weight: 700; letter-spacing: -.2px; }

.hd-divider { width: 1px; height: 24px; background: var(--hairline); }

.role-pill {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 10px 5px 5px; border: 1px solid var(--ud-grey-border);
  border-radius: var(--r-pill); background: var(--surface); transition: all .15s;
}
.role-pill:hover { border-color: #D4D8E0; box-shadow: var(--shadow-xs); }
.role-pill .av {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(150deg, #22337f, var(--ud-navy-dark)); color: var(--ud-gold-soft);
  display: grid; place-items: center; font-weight: 700; font-size: 11px;
}
.role-pill .meta { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.role-pill .meta .n { font-size: 13px; color: var(--ud-text-dark); font-weight: 600; }
.role-pill .meta .r { font-size: 11px; color: var(--ud-text-light); }

.bell { position: relative; width: 36px; height: 36px; border-radius: var(--r-md); display: grid; place-items: center; color: var(--ud-text-mid); transition: background .15s; }
.bell:hover { background: var(--ud-grey-bg); }
.bell .badge { position: absolute; top: 5px; right: 5px; min-width: 15px; height: 15px; padding: 0 4px; background: #E5484D; color: #fff; border-radius: 8px; font-size: 10px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface); }

.ay-select { padding: 7px 12px; border: 1px solid var(--ud-grey-border); border-radius: var(--r-md); background: var(--surface); font-size: 13px; color: var(--ud-text-mid); cursor: pointer; transition: border .15s; }
.ay-select:hover { border-color: #D4D8E0; }

/* ---------- Layout (sidebar + main) ---------- */
.layout { display: flex; flex: 1; min-height: 0; }
.sidebar {
  width: 248px; background: linear-gradient(180deg, #16245f 0%, var(--ud-navy-dark) 100%);
  color: #cdd6e4; transition: width .2s ease;
  display: flex; flex-direction: column; padding: 12px;
  position: sticky; top: 60px; align-self: flex-start;
  height: calc(100vh - 60px); overflow-y: auto;
  border-right: 1px solid rgba(255,255,255,.04);
}
.sidebar.collapsed { width: 70px; }
.sidebar .sb-item {
  height: 40px; padding: 0 12px; margin-bottom: 2px;
  display: flex; align-items: center; gap: 12px;
  font-size: 13.5px; color: #b9c3d6; font-weight: 500;
  border-radius: var(--r-md); cursor: pointer;
  white-space: nowrap; overflow: hidden; transition: all .14s;
}
.sidebar .sb-item:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.sidebar .sb-item.active { background: rgba(255,255,255,.12); color: #fff; font-weight: 600; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.sidebar .sb-item .ic { width: 22px; display: grid; place-items: center; flex-shrink: 0; font-size: 15px; opacity: .92; }
.sidebar .sb-item .lbl { flex: 1; }
.sidebar .sb-item .bdg { background: var(--ud-gold); color: var(--ud-navy-dark); font-size: 10px; font-weight: 800; padding: 1px 7px; border-radius: var(--r-pill); min-width: 18px; text-align: center; }
.sidebar.collapsed .lbl, .sidebar.collapsed .bdg { display: none; }
.sidebar.collapsed .sb-item { padding: 0; justify-content: center; }
.sb-bottom { margin-top: auto; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.07); }
.sb-bottom .sb-item { font-size: 13px; }
.sb-ver { padding: 8px 12px; font-size: 11px; color: rgba(255,255,255,.32); }
.sidebar.collapsed .sb-ver { text-align: center; padding: 8px 0; }

.main { flex: 1; min-width: 0; padding: 28px 36px 96px; max-width: 1320px; width: 100%; margin: 0 auto; }

.breadcrumb { font-size: 12px; color: var(--ud-text-light); margin-bottom: 14px; display: flex; gap: 6px; align-items: center; }
.breadcrumb a { color: var(--ud-text-light); }
.breadcrumb a:hover { color: var(--ud-blue-mid); }
.breadcrumb .sep { color: var(--ud-grey-border); }
.breadcrumb .cur { color: var(--ud-text-dark); font-weight: 600; }

.page-title { font-size: 23px; font-weight: 700; letter-spacing: -.4px; color: var(--ud-text-dark); margin: 0; }
.page-caption { font-size: 13.5px; color: var(--ud-text-mid); margin-top: 5px; line-height: 1.55; }
.section-heading { font-size: 16px; font-weight: 650; letter-spacing: -.2px; color: var(--ud-text-dark); margin: 0; }
.sub-heading { font-size: 14px; font-weight: 650; color: var(--ud-text-dark); margin: 0; }
.caption { font-size: 12px; color: var(--ud-text-light); }

/* ---------- Card (glass) ---------- */
.card {
  background: var(--glass-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border); border-radius: var(--r-lg); padding: 18px;
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255,255,255,.5);
}
.card-tight { padding: 12px; }
.card-pad { padding: 22px; }
/* Emphasis card — subtle gold-tinted wash instead of a hard stripe */
.card-gold-top { background: linear-gradient(180deg, rgba(188,145,67,.07), rgba(255,255,255,0) 46%), var(--glass-strong); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 16px; border-radius: var(--r-md);
  font-size: 13.5px; font-weight: 600; letter-spacing: -.1px;
  border: 1px solid transparent; transition: all .15s; white-space: nowrap;
}
.btn:active { transform: translateY(.5px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--ud-navy); color: #fff; box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255,255,255,.08); }
.btn-primary:hover:not(:disabled) { background: #172a7a; box-shadow: var(--shadow-card); text-decoration: none; }
.btn-cta { height: 40px; padding: 0 18px; }
.btn-secondary { background: var(--surface); color: var(--ud-text-dark); border-color: var(--ud-grey-border); box-shadow: var(--shadow-xs); }
.btn-secondary:hover:not(:disabled) { border-color: #D0D5DE; background: var(--surface-2); text-decoration: none; }
.btn-danger { background: #D93A35; color: #fff; }
.btn-danger:hover:not(:disabled) { background: #C0322D; }
.btn-warning { background: #E07B26; color: #fff; }
.btn-warning:hover:not(:disabled) { background: #C96A1B; }
.btn-ghost { background: transparent; color: var(--ud-text-mid); border-color: transparent; }
.btn-ghost:hover:not(:disabled) { background: var(--ud-grey-bg); color: var(--ud-text-dark); text-decoration: none; }
.btn-success { background: #18804E; color: #fff; }
.btn-success:hover:not(:disabled) { background: #146B42; }
.btn-icon { height: 32px; width: 32px; padding: 0; border-radius: var(--r-md); display: grid; place-items: center; color: var(--ud-text-mid); transition: background .15s; }
.btn-icon:hover { background: var(--ud-grey-bg); color: var(--ud-text-dark); }

/* ---------- Form ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--ud-text-dark); }
.field .req { color: #D93A35; margin-left: 2px; }
.field .helper { font-size: 12px; color: var(--ud-text-light); line-height: 1.45; }
.field .err { font-size: 12px; color: #D93A35; }
.input, .select, .textarea {
  height: 40px; padding: 0 12px; border-radius: var(--r-md);
  border: 1px solid var(--ud-grey-border); background: var(--surface);
  font-size: 14px; outline: none; transition: border .15s, box-shadow .15s; color: var(--ud-text-dark);
}
.input::placeholder, .textarea::placeholder { color: var(--ud-text-light); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--ud-blue-mid); box-shadow: var(--shadow-focus); }
.textarea { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; line-height: 1.55; }
.input.autofilled, .select.autofilled { background: var(--ud-blue-light); border-color: #D7E3F6; color: var(--ud-text-mid); }
.autofill-wrap { position: relative; }
.autofill-wrap .lock { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: var(--ud-blue-mid); font-size: 12px; }
.input.error, .select.error, .textarea.error { border-color: #D93A35; box-shadow: 0 0 0 3px rgba(217,58,53,.14); }
.input:disabled, .select:disabled, .textarea:disabled { background: var(--ud-grey-bg); color: var(--ud-text-light); }

.radio-group, .check-group { display: flex; gap: 10px; flex-wrap: wrap; }
.radio, .check {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border: 1px solid var(--ud-grey-border);
  border-radius: var(--r-md); background: var(--surface); cursor: pointer; font-size: 13.5px; font-weight: 500; transition: all .14s;
}
.radio:hover, .check:hover { border-color: #D0D5DE; background: var(--surface-2); }
.radio.selected, .check.selected { border-color: var(--ud-blue-mid); background: var(--ud-blue-light); color: var(--ud-navy); font-weight: 600; box-shadow: var(--shadow-focus); }

/* ---------- Status badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: var(--r-pill); line-height: 1.3; white-space: nowrap; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-draft { background: var(--st-draft-bg); color: var(--st-draft-fg); }
.badge-pending { background: var(--st-pending-bg); color: var(--st-pending-fg); }
.badge-approved { background: var(--st-approved-bg); color: var(--st-approved-fg); }
.badge-rejected { background: var(--st-rejected-bg); color: var(--st-rejected-fg); }
.badge-returned { background: var(--st-returned-bg); color: var(--st-returned-fg); }
.badge-prf { background: var(--st-prf-bg); color: var(--st-prf-fg); }
.badge-prfok { background: var(--st-prfok-bg); color: var(--st-prfok-fg); }
.badge-overdue { background: var(--st-overdue-bg); color: var(--st-overdue-fg); }

/* ---------- Table ---------- */
.tbl-wrap { background: var(--glass-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255,255,255,.5); }
.tbl th { background: rgba(250,251,253,.7); }
.tbl-toolbar { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--hairline); background: var(--surface); }
.tbl-search { flex: 1; max-width: 360px; display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 38px; border: 1px solid var(--ud-grey-border); border-radius: var(--r-md); background: var(--surface); transition: border .15s, box-shadow .15s; }
.tbl-search:focus-within { border-color: var(--ud-blue-mid); box-shadow: var(--shadow-focus); }
.tbl-search input { border: none; outline: none; flex: 1; font-size: 13.5px; background: transparent; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  background: var(--surface-2); color: var(--ud-text-light);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; text-align: left;
  padding: 11px 14px; white-space: nowrap; border-bottom: 1px solid var(--hairline);
}
.tbl th .th-sort { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.tbl td { padding: 13px 14px; border-bottom: 1px solid var(--hairline); font-size: 13.5px; color: var(--ud-text-dark); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tr { cursor: pointer; transition: background .12s; }
.tbl tbody tr:hover td { background: var(--ud-blue-light); }
.tbl tr.overdue td { background: #FEF6F5; }
.tbl tr.overdue td:first-child { box-shadow: inset 3px 0 0 #D93A35; }
.tbl-foot { padding: 10px 16px; display: flex; justify-content: space-between; align-items: center; background: var(--surface); border-top: 1px solid var(--hairline); font-size: 12px; color: var(--ud-text-mid); }
.pgr { display: flex; gap: 4px; align-items: center; }
.pgr button { height: 30px; min-width: 30px; padding: 0 9px; border-radius: var(--r-sm); font-size: 12px; border: 1px solid var(--ud-grey-border); background: var(--surface); color: var(--ud-text-dark); }
.pgr button.active { background: var(--ud-navy); color: #fff; border-color: var(--ud-navy); }
.pgr button:disabled { opacity: .4; }

.sla-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.sla-green { background: #21A366; box-shadow: 0 0 0 3px rgba(33,163,102,.16); }
.sla-amber { background: #E07B26; box-shadow: 0 0 0 3px rgba(224,123,38,.16); }
.sla-red { background: #D93A35; box-shadow: 0 0 0 3px rgba(217,58,53,.16); }

/* ---------- KPI card ---------- */
.kpi-row { display: grid; gap: 16px; margin-bottom: 24px; }
.kpi-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
.kpi-row.cols-4 { grid-template-columns: repeat(4, 1fr); }
.kpi-row.cols-5 { grid-template-columns: repeat(5, 1fr); }
.kpi { background: var(--glass-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-border); border-radius: var(--r-lg); padding: 18px; display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255,255,255,.5); transition: box-shadow .15s, transform .15s; }
.kpi:hover { box-shadow: var(--shadow-pop); transform: translateY(-2px); }
.kpi .v { font-size: 30px; font-weight: 750; letter-spacing: -1px; color: var(--ud-text-dark); line-height: 1; font-variant-numeric: tabular-nums; }
.kpi.big .v { font-size: 34px; }
.kpi .l { font-size: 12.5px; color: var(--ud-text-mid); margin-top: 7px; line-height: 1.4; }
.kpi .trend { font-size: 12px; margin-top: 5px; font-weight: 600; }
.kpi .trend.up { color: #18804E; } .kpi .trend.down { color: #C0322D; }
.kpi .icbox { width: 40px; height: 40px; border-radius: var(--r-md); background: var(--ud-blue-light); color: var(--ud-blue-mid); display: grid; place-items: center; flex-shrink: 0; font-size: 18px; }

/* ---------- Approval stepper ---------- */
.stepper { display: flex; align-items: flex-start; padding: 18px 0 6px; gap: 0; }
.step { flex: 1; display: flex; flex-direction: column; align-items: center; position: relative; min-width: 0; }
.step .node { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; border: 2px solid var(--ud-grey-border); background: var(--surface); color: var(--ud-text-light); position: relative; z-index: 2; transition: all .2s; }
.step.done .node { background: #18804E; border-color: #18804E; color: #fff; }
.step.current .node { background: var(--ud-gold); border-color: var(--ud-gold); color: #fff; animation: pulse 1.8s infinite; }
.step.upcoming .node { background: var(--surface); }
.step.rejected .node { background: #D93A35; border-color: #D93A35; color: #fff; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(200,151,42,.5); } 50% { box-shadow: 0 0 0 7px rgba(200,151,42,0); } }
.step .connector { position: absolute; top: 16px; left: 50%; right: -50%; height: 2px; background: var(--ud-grey-border); z-index: 1; }
.step.done .connector { background: #18804E; }
.step:last-child .connector { display: none; }
.step .stp-lbl { font-size: 12px; font-weight: 600; color: var(--ud-text-dark); margin-top: 9px; }
.step .stp-state { font-size: 11px; color: var(--ud-text-light); margin-top: 2px; }
.step.current .stp-state { color: var(--ud-gold); font-weight: 600; }
.step .stp-meta { font-size: 11px; color: var(--ud-text-light); margin-top: 2px; }

/* ---------- Alert banners ---------- */
.alert { display: flex; gap: 11px; align-items: flex-start; padding: 13px 16px; border-radius: var(--r-md); font-size: 13.5px; border: 1px solid; margin-bottom: 16px; line-height: 1.5; }
.alert-red { background: var(--st-rejected-bg); color: #A52F2A; border-color: #F6CFCD; }
.alert-amber { background: var(--st-returned-bg); color: #A8551A; border-color: #F6D9BC; }
.alert-gold { background: #FEF6E6; color: #7A5A12; border-color: #EAD49A; }
.alert-blue { background: var(--ud-blue-light); color: #1E477E; border-color: #D2E1F7; }
.alert-green { background: var(--st-approved-bg); color: #137043; border-color: #BFE6CE; }
.alert .ic { flex-shrink: 0; margin-top: 1px; }
.alert .body { flex: 1; }
.alert .body strong { display: block; margin-bottom: 2px; }

/* ---------- Modal ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(16,24,40,.45); backdrop-filter: blur(2px); display: grid; place-items: center; z-index: 100; padding: 24px; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal { background: var(--glass-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border-radius: var(--r-lg); box-shadow: var(--shadow-modal); width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; border: 1px solid var(--glass-border); }
.modal.wide { max-width: 660px; }
.modal-header { padding: 22px 24px 12px; }
.modal-header .t { font-size: 17px; font-weight: 700; letter-spacing: -.2px; color: var(--ud-text-dark); }
.modal-header .s { font-size: 13px; color: var(--ud-text-mid); margin-top: 5px; line-height: 1.5; }
.modal-body { padding: 12px 24px; }
.modal-foot { padding: 16px 24px 20px; display: flex; justify-content: flex-end; gap: 8px; }
.modal.danger .modal-header .t { color: #C0322D; }

/* ---------- Welcome bar ---------- */
.welcome { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 26px; gap: 16px; flex-wrap: wrap; }
.welcome .greet { font-size: 25px; font-weight: 750; letter-spacing: -.6px; color: var(--ud-text-dark); margin: 0; }
.welcome .sub { font-size: 13.5px; color: var(--ud-text-mid); margin-top: 5px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--hairline); margin-bottom: 18px; }
.tab { padding: 10px 14px; font-size: 13.5px; font-weight: 600; color: var(--ud-text-mid); border-bottom: 2px solid transparent; cursor: pointer; margin-bottom: -1px; transition: color .15s; }
.tab:hover { color: var(--ud-text-dark); }
.tab.active { color: var(--ud-navy); border-color: var(--ud-gold); }

/* ---------- Helpers ---------- */
.row { display: flex; gap: 16px; }
.col { display: flex; flex-direction: column; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; gap: 8px; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.ms-8 { margin-left: 8px; }
.grow { flex: 1; }
.txt-mid { color: var(--ud-text-mid); } .txt-light { color: var(--ud-text-light); }
.txt-navy { color: var(--ud-navy); } .txt-gold { color: var(--ud-gold); }
.fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; }
.fs-12 { font-size: 12px; } .fs-13 { font-size: 13px; } .fs-14 { font-size: 14px; } .fs-15 { font-size: 15px; }
.dot-sep { color: var(--ud-grey-border); margin: 0 6px; }
.divider { height: 1px; background: var(--hairline); margin: 16px 0; }

/* ---------- Notification dropdown ---------- */
.notif-dropdown { position: absolute; top: 52px; right: 18px; width: 370px; max-height: 480px; background: var(--glass-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); z-index: 50; overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--glass-border); }
.notif-dropdown .hd { padding: 13px 16px; border-bottom: 1px solid var(--hairline); display: flex; justify-content: space-between; align-items: center; }
.notif-dropdown .ls { overflow-y: auto; }
.notif-item { padding: 12px 16px; border-bottom: 1px solid var(--hairline); display: flex; gap: 10px; cursor: pointer; border-left: 2px solid transparent; transition: background .12s; }
.notif-item:hover { background: var(--ud-blue-light); }
.notif-item.unread { background: var(--surface); border-left-color: var(--ud-gold); }
.notif-item.read { background: var(--surface-2); }
.notif-item .t { font-size: 13px; font-weight: 700; color: var(--ud-text-dark); }
.notif-item .b { font-size: 12px; color: var(--ud-text-mid); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notif-item .meta { font-size: 11px; color: var(--ud-text-light); margin-top: 4px; }
.notif-item .ts { font-size: 11px; color: var(--ud-text-light); white-space: nowrap; }
.notif-dropdown .ft { padding: 11px; text-align: center; border-top: 1px solid var(--hairline); }

.icon { display: inline-block; vertical-align: middle; }
.link { color: var(--ud-blue-mid); cursor: pointer; font-weight: 500; }
.link:hover { text-decoration: underline; }

/* progress */
.progress { height: 8px; background: var(--ud-grey-bg); border-radius: var(--r-pill); overflow: hidden; }
.progress .fill { height: 100%; background: linear-gradient(90deg, var(--ud-gold-soft), var(--ud-gold)); border-radius: var(--r-pill); transition: width .3s; }
.progress.thin { height: 5px; }

/* ---------- Login page ---------- */
.login-bg {
  min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 700px at 82% 110%, rgba(188,145,67,.45), transparent 55%),
    radial-gradient(1000px 800px at 10% -10%, rgba(42,62,150,.55), transparent 55%),
    linear-gradient(150deg, #0A1450 0%, #11206E 48%, #1A2E86 100%);
}
.login-logo { width: 92px; height: auto; margin: 0 auto 6px; display: block; filter: drop-shadow(0 6px 18px rgba(0,0,0,.3)); }
.login-card {
  width: 430px; max-width: 100%; border-radius: 20px; padding: 40px 44px 36px; text-align: center;
  background: var(--glass-bg); -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid var(--glass-border); box-shadow: var(--shadow-modal), inset 0 1px 0 rgba(255,255,255,.6);
}
.login-card .lk-name { font-size: 14px; color: var(--ud-text-light); margin-top: 18px; letter-spacing: .2px; }
.login-card .lk-sys { font-size: 22px; font-weight: 750; letter-spacing: -.5px; color: var(--ud-text-dark); margin-top: 4px; }
.login-card .lk-rule { width: 42px; height: 3px; border-radius: 2px; background: var(--ud-gold); margin: 16px auto; }
.login-card .lk-msg { font-size: 14px; color: var(--ud-text-mid); margin: 22px 0; line-height: 1.6; }
.login-card .lk-btn { width: 100%; height: 46px; background: var(--ud-navy); color: #fff; border-radius: var(--r-md); font-weight: 600; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: var(--shadow-card); transition: background .15s; }
.login-card .lk-btn:hover { background: #172a7a; text-decoration: none; }
.login-card .lk-help { font-size: 12px; color: var(--ud-text-light); margin-top: 16px; }
.login-foot { text-align: center; font-size: 12px; color: rgba(255,255,255,.65); margin-top: 22px; }

/* ---------- Form wizard ---------- */
.wiz { display: grid; grid-template-columns: 248px 1fr; gap: 24px; align-items: flex-start; }
.wiz-nav { position: sticky; top: 84px; }
.wiz-step { display: flex; gap: 11px; align-items: flex-start; padding: 9px 8px; cursor: pointer; position: relative; border-radius: var(--r-sm); transition: background .12s; }
.wiz-step:hover { background: var(--ud-grey-bg); }
.wiz-step .num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--ud-grey-bg); color: var(--ud-text-light); border: 2px solid var(--ud-grey-border); flex-shrink: 0; transition: all .15s; }
.wiz-step.done .num { background: #18804E; color: #fff; border-color: #18804E; }
.wiz-step.current .num { background: var(--ud-gold); color: #fff; border-color: var(--ud-gold); box-shadow: var(--shadow-focus-gold); }
.wiz-step .info { display: flex; flex-direction: column; line-height: 1.25; padding-top: 3px; }
.wiz-step .info .ttl { font-size: 13px; color: var(--ud-text-dark); font-weight: 500; }
.wiz-step.current .info .ttl { color: var(--ud-navy); font-weight: 700; }
.wiz-step .info .st { font-size: 11px; color: var(--ud-text-light); }
.wiz-step.done .info .st { color: #18804E; }
.wiz-step .vline { position: absolute; left: 21px; top: 33px; bottom: -7px; width: 2px; background: var(--ud-grey-border); }
.wiz-step.done .vline { background: #18804E; }
.wiz-step:last-child .vline { display: none; }
.wiz-actions { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--hairline); padding: 14px 0 4px; display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }

/* sticky bottom action bar */
.action-bar { position: sticky; bottom: 0; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-top: 1px solid var(--hairline); padding: 16px 36px; margin: 24px -36px -96px; box-shadow: 0 -6px 24px rgba(16,24,40,.06); z-index: 20; }
.action-bar .row1 { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.action-bar .row2 { display: flex; gap: 8px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.action-bar textarea { flex: 1; min-height: 54px; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--ud-grey-border); resize: vertical; font-size: 13.5px; outline: none; transition: border .15s, box-shadow .15s; }
.action-bar textarea:focus { border-color: var(--ud-blue-mid); box-shadow: var(--shadow-focus); }

/* drawer */
.drawer-overlay { position: fixed; inset: 0; background: rgba(16,24,40,.4); z-index: 100; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 420px; background: var(--surface); box-shadow: var(--shadow-modal); z-index: 101; display: flex; flex-direction: column; }
.drawer .hd { padding: 20px 24px; border-bottom: 1px solid var(--hairline); display: flex; justify-content: space-between; align-items: center; }
.drawer .bd { flex: 1; overflow-y: auto; padding: 20px 24px; }
.drawer .ft { padding: 16px 24px; border-top: 1px solid var(--hairline); display: flex; gap: 8px; justify-content: flex-end; }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: var(--r-pill); background: var(--ud-blue-light); color: var(--ud-navy); font-size: 12px; font-weight: 600; }

/* upload */
.upload-card { padding: 16px; border: 1px solid var(--ud-grey-border); border-radius: var(--r-md); background: var(--surface); margin-bottom: 12px; }
.upload-dz { margin-top: 12px; border: 1.5px dashed var(--ud-grey-border); border-radius: var(--r-md); padding: 26px; text-align: center; background: var(--surface-2); color: var(--ud-text-mid); font-size: 13px; transition: border .15s, background .15s; }
.upload-dz:hover { border-color: var(--ud-blue-mid); background: var(--ud-blue-light); }
.upload-file { margin-top: 12px; padding: 10px 12px; background: var(--ud-blue-light); border-radius: var(--r-md); display: flex; align-items: center; gap: 10px; }

/* charts */
.chart-wrap { width: 100%; }
.chart-svg { width: 100%; height: auto; display: block; }

/* admin quick grid */
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 8px; }
.qg-card { background: var(--surface); border: 1px solid var(--ud-grey-border); border-radius: var(--r-lg); padding: 20px; display: flex; gap: 13px; align-items: center; cursor: pointer; transition: all .15s; box-shadow: var(--shadow-card); }
.qg-card:hover { border-color: #D0D5DE; box-shadow: var(--shadow-pop); transform: translateY(-2px); text-decoration: none; }
.qg-card .ic { width: 44px; height: 44px; border-radius: var(--r-md); background: var(--ud-blue-light); color: var(--ud-navy); display: grid; place-items: center; flex-shrink: 0; font-size: 20px; }
.qg-card .info .t { font-weight: 650; font-size: 14px; color: var(--ud-text-dark); }
.qg-card .info .s { font-size: 12px; color: var(--ud-text-mid); margin-top: 3px; line-height: 1.4; }

/* segmented toggle / menus */
.seg-toggle { display: inline-flex; padding: 3px; background: var(--ud-grey-bg); border-radius: var(--r-md); border: 1px solid var(--ud-grey-border); }
.seg-item { padding: 6px 12px; border-radius: var(--r-sm); font-size: 12px; font-weight: 600; color: var(--ud-text-mid); cursor: pointer; transition: all .12s; }
.seg-item:hover { color: var(--ud-navy); }
.seg-item.active { background: var(--surface); color: var(--ud-navy); box-shadow: var(--shadow-xs); }
.menu { position: absolute; background: var(--glass-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border-radius: var(--r-md); box-shadow: var(--shadow-pop); border: 1px solid var(--glass-border); min-width: 240px; z-index: 60; overflow: hidden; max-height: 78vh; overflow-y: auto; padding: 4px; }
.menu .mh { padding: 9px 12px 5px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--ud-text-light); }
.menu .mi { padding: 9px 12px; display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; border-radius: var(--r-sm); }
.menu .mi:hover { background: var(--ud-grey-bg); text-decoration: none; }
.menu .mi.active { background: var(--ud-blue-light); color: var(--ud-navy); font-weight: 600; }
.menu .mi .av { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(150deg,#22337f,var(--ud-navy-dark)); color: var(--ud-gold-soft); display: grid; place-items: center; font-weight: 700; font-size: 11px; }
.menu .mi .meta { display: flex; flex-direction: column; line-height: 1.25; }
.menu .mi .meta .n { font-weight: 600; }

[x-cloak] { display: none !important; }
