/* ═══════════════════════════════════════════════════════════════
   GMA Service Portal – app.css
   Gautrain Management Agency brand palette:
     Primary Navy  : #003087
     Gold          : #FFB81C
   Mobile-first, responsive breakpoints at 700px and 420px
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700;800&family=Source+Sans+3:ital,wght@0,300;0,400;0,600;1,400&display=swap');

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

:root {
  --blue:       #003087;
  --blue-dark:  #001f5c;
  --blue-mid:   #004bb5;
  --blue-light: #e8eef8;
  --blue-xlight:#f0f4fb;
  --gold:       #FFB81C;
  --gold-dark:  #c48c00;
  --gold-light: #fff8e1;
  --white:      #ffffff;
  --gray-50:    #f7f8fa;
  --gray-100:   #eef0f4;
  --gray-200:   #d5d9e2;
  --gray-400:   #9aa2b4;
  --gray-600:   #5a6478;
  --gray-800:   #2c3349;
  --red:        #c0392b;
  --red-light:  #fdf0ef;
  --green:      #1a7a3c;
  --green-light:#edf7f1;
  --amber:      #b86800;
  --amber-light:#fff3e0;

  --font-head: 'Montserrat', sans-serif;
  --font-body: 'Source Sans 3', sans-serif;
  --radius:    8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow:    0 2px 12px rgba(0, 48, 135, 0.10);
  --shadow-md: 0 4px 20px rgba(0, 48, 135, 0.14);
  --transition:0.18s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.55;
}

/* ── Focus visible ────────────────────────────────────────────── */
*:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Skip link ────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -48px;
  left: 0;
  background: var(--blue);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 var(--radius) 0;
  font-size: 13.5px;
  font-weight: 700;
  z-index: 999;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ── App shell ────────────────────────────────────────────────── */
.app-shell { display: flex; flex-direction: column; min-height: 100vh; }

.dashboard-body{
  padding: 0 24px;
}
/* ════════════════════════════════════════════════════════════════
   TOP BAR
   ════════════════════════════════════════════════════════════════ */
.top-bar {
  background: var(--blue);
  color: #fff;
  height: 60px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}

.top-bar__inner { display: contents; }

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: #fff;
  flex-shrink: 0;
}
.brand__icon {
  width: 36px;
  height: 36px;
  background: rgba(255, 184, 28, 0.16);
  border: 1.5px solid rgba(255, 184, 28, 0.35);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand__icon svg { width: 22px; height: 22px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-family: var(--font-head); font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.brand__sub  { font-size: 10px; opacity: 0.65; letter-spacing: 0.04em; text-transform: uppercase; }

/* Role toggle */
.role-toggle { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.role-toggle__label {
  font-size: 11px;
  opacity: 0.6;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.role-toggle__buttons {
  display: flex;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.role-btn {
  padding: 5px 14px;
  border: none;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.role-btn[aria-pressed="true"].role-btn--staff    { background: #fff; color: var(--blue); }
.role-btn[aria-pressed="true"].role-btn--approver { background: var(--gold); color: var(--blue-dark); }

.approver-badge {
  background: rgba(255, 184, 28, 0.2);
  color: var(--gold);
  border: 1px solid rgba(255, 184, 28, 0.4);
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 10px;
  letter-spacing: 0.03em;
  white-space: nowrap;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: none; } }

/* ════════════════════════════════════════════════════════════════
   PAGE LAYOUT
   ════════════════════════════════════════════════════════════════ */
.page-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* Page header */
.page-header {
  background: var(--white);
  border-bottom: 1.5px solid var(--gray-100);
  padding: 22px 20px 18px;
}
.page-header__inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  font-size: 12px;
  color: var(--gray-400);
  margin-bottom: 7px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--blue); text-decoration: none; font-weight: 500; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb li + li::before { content: '›'; margin-right: 6px; color: var(--gray-400); }

/* Titles */
.page-title {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 800;
  color: var(--blue);
  line-height: 1.15;
}
.page-subtitle {
  font-size: 13.5px;
  color: var(--gray-600);
  margin-top: 4px;
}

/* Approver notice banner */
.approver-notice {
  background: var(--amber-light);
  border: 1.5px solid rgba(255, 184, 28, 0.45);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 12.5px;
  color: var(--amber);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* ════════════════════════════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn--primary  { background: var(--blue); color: #fff; box-shadow: 0 2px 8px rgba(0,48,135,.25); }
.btn--primary:hover:not(:disabled)  { background: var(--blue-mid); }

.btn--secondary { background: var(--white); color: var(--gray-600); border: 1.5px solid var(--gray-200); }
.btn--secondary:hover:not(:disabled) { background: var(--gray-50); color: var(--gray-800); }

.btn--approve { background: var(--green); color: #fff; }
.btn--approve:hover:not(:disabled) { background: #156030; }

.btn--reject { background: var(--red); color: #fff; }
.btn--reject:hover:not(:disabled) { background: #9e2e23; }

.btn--sm { padding: 6px 14px; font-size: 12.5px; }

/* ════════════════════════════════════════════════════════════════
   STAT CARDS
   ════════════════════════════════════════════════════════════════ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 20px 0 0;
}
.stat-card {
  background: var(--white);
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 13px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); }

.stat-card__icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.stat-card__icon--blue  { background: var(--blue-light); }
.stat-card__icon--gold  { background: var(--gold-light); }
.stat-card__icon--red   { background: var(--red-light); }
.stat-card__icon--green { background: var(--green-light); }

.stat-card__value {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  color: var(--gray-800);
}
.stat-card__value--gold  { color: var(--amber); }
.stat-card__value--red   { color: var(--red); }
.stat-card__value--green { color: var(--green); }

.stat-card__label {
  font-size: 11.5px;
  color: var(--gray-400);
  margin-top: 3px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* ════════════════════════════════════════════════════════════════
   TOOLBAR
   ════════════════════════════════════════════════════════════════ */
.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  padding: 18px 0 10px;
}
.toolbar__search {
  position: relative;
  flex: 1 1 200px;
  min-width: 160px;
}
.toolbar__search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  pointer-events: none;
}
.result-count {
  font-size: 12.5px;
  color: var(--gray-400);
  margin-bottom: 12px;
}
.result-count strong { color: var(--gray-600); }

/* ════════════════════════════════════════════════════════════════
   INPUTS
   ════════════════════════════════════════════════════════════════ */
.input {
  width: 100%;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 9px 12px;
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--gray-800);
  background: var(--white);
  transition: var(--transition);
  outline: none;
  line-height: 1.5;
}
.input:hover  { border-color: var(--gray-400); }
.input:focus  { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,48,135,0.10); }

.input--search { padding-left: 34px; }

.input--select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%239aa2b4' d='M8 11L2 5h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 13px;
  padding-right: 30px;
  cursor: pointer;
  flex: 0 0 auto;
  width: auto;
}

.input--textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

/* ════════════════════════════════════════════════════════════════
   BADGES
   ════════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge__dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.badge__dot--pulse { animation: pulse 2s infinite; }

@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

.badge--category  { background: var(--blue-light); color: var(--blue); }
.badge--pending   { background: #f0f2ff; color: #3a52c4; border: 1px solid #c5ceee; }
.badge--review    { background: var(--amber-light); color: var(--amber); border: 1px solid rgba(184,104,0,.25); }
.badge--approved  { background: var(--green-light); color: var(--green); border: 1px solid rgba(26,122,60,.2); }
.badge--rejected  { background: var(--red-light); color: var(--red); border: 1px solid rgba(192,57,43,.2); }
.badge--resolved  { background: #e8f6f9; color: #0b6e8a; border: 1px solid rgba(11,110,138,.2); }
.badge--critical  { background: var(--red-light); color: var(--red); border: 1px solid rgba(192,57,43,.25); }
.badge--high      { background: var(--amber-light); color: var(--amber); border: 1px solid rgba(184,104,0,.2); }
.badge--medium    { background: #fffde7; color: #8a7000; border: 1px solid rgba(138,112,0,.18); }
.badge--low       { background: var(--green-light); color: var(--green); border: 1px solid rgba(26,122,60,.18); }

/* ════════════════════════════════════════════════════════════════
   REQUEST LIST
   ════════════════════════════════════════════════════════════════ */
.request-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 40px;
}

.request-card {
  background: var(--white);
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  box-shadow: var(--shadow);
  animation: slideIn 0.25s ease both;
}
.request-card:hover {
  border-color: rgba(0, 48, 135, 0.28);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

@keyframes slideIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:none} }

.request-card__main { flex: 1; min-width: 0; }
.request-card__meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}
.request-card__id {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--gray-400);
  letter-spacing: 0.08em;
  font-family: var(--font-head);
}
.request-card__title {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--gray-800);
  margin-bottom: 8px;
  line-height: 1.35;
}
.request-card__badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.request-card__side {
  text-align: right;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.request-card__date { font-size: 11.5px; color: var(--gray-400); }
.request-card__due  { font-size: 11px; color: var(--amber); font-weight: 600; }
.request-card__chevron { color: var(--gray-200); margin-top: 2px; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 64px 20px;
  color: var(--gray-400);
}
.empty-state__icon  { font-size: 40px; margin-bottom: 14px; }
.empty-state__title { font-family: var(--font-head); font-size: 18px; font-weight: 700; color: var(--gray-600); margin-bottom: 6px; }
.empty-state__body  { font-size: 13.5px; }

/* ════════════════════════════════════════════════════════════════
   FORM
   ════════════════════════════════════════════════════════════════ */
.form-page { padding: 28px 0 48px; }

.form-card {
  background: var(--white);
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius-xl);
  padding: 32px 32px;
  box-shadow: var(--shadow-md);
  max-width: 680px;
  animation: slideIn 0.3s ease both;
  margin: 0 auto;
}

.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.form-group--error .input { border-color: var(--red); }
.form-group--error .input:focus { box-shadow: 0 0 0 3px rgba(192,57,43,0.1); }

.form-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gray-600);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.form-label .required { color: var(--red); margin-left: 2px; }
.form-label .optional  { font-weight: 400; color: var(--gray-400); text-transform: none; letter-spacing: 0; }

.form-error {
  font-size: 12px;
  color: var(--red);
  display: flex;
  align-items: center;
  gap: 5px;
}
.form-hint { font-size: 11.5px; color: var(--gray-400); }

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

.form-footer-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-top: 4px; }
.char-count { font-size: 11.5px; color: var(--gray-400); white-space: nowrap; }

/* File drop */
.file-drop {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1.5px dashed var(--gray-200);
  border-radius: var(--radius);
  padding: 10px 12px;
  cursor: pointer;
  color: var(--gray-400);
  font-size: 13.5px;
  transition: var(--transition);
  overflow: hidden;
}
.file-drop:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-xlight); }
.file-drop span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 22px;
  border-top: 1.5px solid var(--gray-100);
  margin-top: 4px;
}

/* Success */
.form-success {
  text-align: center;
  padding: 36px 16px;
  animation: slideIn 0.3s ease both;
}
.form-success__icon {
  width: 60px;
  height: 60px;
  background: var(--green-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  border: 2px solid rgba(26,122,60,.25);
}
.form-success__icon svg { width: 26px; height: 26px; color: var(--green); }
.form-success h2  { font-family: var(--font-head); font-size: 22px; font-weight: 800; color: var(--gray-800); margin-bottom: 8px; }
.form-success p   { font-size: 14px; color: var(--gray-600); margin-bottom: 26px; }
.form-success__actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Spinner */
.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ════════════════════════════════════════════════════════════════
   DETAIL VIEW
   ════════════════════════════════════════════════════════════════ */
.detail-page { padding: 22px 24px 48px; }

.detail-title-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.detail-title-row .page-title { flex: 1; min-width: 0; }

/* Meta grid */
.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.meta-card {
  background: var(--white);
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  box-shadow: var(--shadow);
}
.meta-card__label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--gray-400);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.meta-card__value { font-size: 14px; font-weight: 600; color: var(--gray-800); }
.text--critical { color: var(--red); }
.text--high     { color: var(--amber); }
.text--medium   { color: #8a7000; }
.text--low      { color: var(--green); }

/* Detail section */
.detail-section {
  background: var(--white);
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  animation: slideIn 0.28s ease both;
}

.section-heading {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.section-heading--gold { color: var(--amber); }

.detail-description {
  font-size: 14.5px;
  color: var(--gray-800);
  line-height: 1.75;
  white-space: pre-wrap;
}

/* Timeline */
.timeline { list-style: none; position: relative; padding-left: 30px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 8px;
  bottom: 0;
  width: 1.5px;
  background: var(--gray-100);
}
.timeline__item { position: relative; margin-bottom: 22px; }
.timeline__item:last-child { margin-bottom: 0; }
.timeline__dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--white);
  border: 2.5px solid var(--blue);
  position: absolute;
  left: -30px;
  top: 2px;
  z-index: 1;
}
.timeline__header { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 2px; }
.timeline__action { font-weight: 700; font-size: 14px; color: var(--gray-800); }
.timeline__actor  { font-size: 12px; color: var(--gray-400); }
.timeline__date   { font-size: 11.5px; color: var(--gray-400); display: block; margin-bottom: 6px; }
.timeline__note   {
  background: var(--blue-xlight);
  border-left: 3px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 8px 12px;
  font-size: 13.5px;
  color: var(--gray-600);
  font-style: italic;
  margin-top: 6px;
}

/* Approver panel */
.approver-panel {
  border-color: rgba(255, 184, 28, 0.35);
  background: linear-gradient(135deg, var(--gold-light) 0%, #fff 100%);
}
.approver-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

.already-actioned {
  background: var(--gray-50);
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 14px 18px;
  color: var(--gray-400);
  font-size: 13.5px;
  text-align: center;
  margin-bottom: 14px;
}

/* ════════════════════════════════════════════════════════════════
   DIALOG
   ════════════════════════════════════════════════════════════════ */
.dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 48, 135, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  backdrop-filter: blur(3px);
  padding: 20px;
  animation: fadeIn 0.18s ease;
}
.dialog {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 30px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: slideIn 0.2s ease both;
}
.dialog__title { font-family: var(--font-head); font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.dialog__title--green { color: var(--green); }
.dialog__title--red   { color: var(--red); }
.dialog__body   { font-size: 13.5px; color: var(--gray-600); margin-bottom: 24px; line-height: 1.6; }
.dialog__actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ════════════════════════════════════════════════════════════════
   TOAST
   ════════════════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 999;
  border-radius: var(--radius-lg);
  padding: 12px 20px;
  font-weight: 600;
  font-size: 13.5px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideUp 0.3s ease;
  max-width: 340px;
}
.toast--success { background: var(--green); color: #fff; }
.toast--error   { background: var(--red); color: #fff; }

@keyframes slideUp { from{opacity:0;transform:translateY(14px)} to{opacity:1;transform:none} }

/* ════════════════════════════════════════════════════════════════
   NOT FOUND
   ════════════════════════════════════════════════════════════════ */
.not-found {
  text-align: center;
  padding: 80px 20px;
}
.not-found h1 { font-family: var(--font-head); font-size: 24px; color: var(--blue); margin-bottom: 12px; }
.not-found a  { color: var(--blue); font-weight: 600; }

/* ════════════════════════════════════════════════════════════════
   LOADING STATE (before Blazor initialises)
   ════════════════════════════════════════════════════════════════ */
.blazor-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 16px;
}
.blazor-loading__logo { animation: pulse 1.6s ease infinite; }
.blazor-loading__text { font-family: var(--font-head); font-size: 14px; font-weight: 600; color: var(--gray-400); letter-spacing: 0.02em; }
.blazor-loading__bar  { width: 200px; height: 4px; background: var(--gray-100); border-radius: 2px; overflow: hidden; }
.blazor-loading__bar-inner {
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, var(--blue), var(--gold));
  border-radius: 2px;
  animation: shimmer 1.4s ease infinite;
}
@keyframes shimmer { 0%{transform:translateX(-200%)} 100%{transform:translateX(400%)} }

/* ════════════════════════════════════════════════════════════════
   BLAZOR ERROR UI
   ════════════════════════════════════════════════════════════════ */
#blazor-error-ui {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--red-light);
  border-top: 2px solid var(--red);
  padding: 12px 20px;
  font-size: 13px;
  color: var(--red);
  text-align: center;
  z-index: 1000;
}
#blazor-error-ui .reload  { color: var(--blue); font-weight: 600; margin-left: 8px; }
#blazor-error-ui .dismiss { float: right; cursor: pointer; font-size: 16px; }

/* ════════════════════════════════════════════════════════════════
   SR-ONLY utility
   ════════════════════════════════════════════════════════════════ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET  (≤ 700px)
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 700px) {
  /* Topbar */
  .top-bar { padding: 0 14px; height: 54px; }
  .brand__sub { display: none; }
  .brand__name { font-size: 13.5px; }
  .role-toggle__label { display: none; }
  .role-btn { padding: 5px 10px; font-size: 11.5px; gap: 4px; }
  .approver-badge { display: none; }

  /* Page header */
  .page-header { padding: 16px 14px 12px; }
  .page-header__inner { flex-direction: column; gap: 10px; align-items: stretch; }
  .page-header__inner .btn { align-self: flex-start; }
  .page-title { font-size: 20px; }
  .page-wrap { padding: 0 14px; }

  /* Stats */
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 8px; padding-top: 14px; }
  .stat-card { padding: 12px 14px; gap: 10px; }
  .stat-card__value { font-size: 22px; }
  .stat-card__label { font-size: 10.5px; }
  .stat-card__icon { width: 34px; height: 34px; font-size: 16px; }

  /* Toolbar */
  .toolbar { gap: 7px; }
  .toolbar__search { flex: 1 1 100%; }
  .input--select { flex: 1 1 calc(50% - 4px); min-width: 0; }

  /* Request card */
  .request-card { padding: 13px 14px; }
  .request-card__title { font-size: 13.5px; }
  .request-card__side { gap: 3px; }
  .request-card__date { font-size: 11px; }

  /* Form */
  .form-page { padding: 18px 0 36px; }
  .form-card { padding: 22px 18px; border-radius: var(--radius-lg); }
  .form-row { grid-template-columns: 1fr; }
  .form-actions { flex-direction: column-reverse; gap: 8px; }
  .form-actions .btn { width: 100%; justify-content: center; }
  .form-success__actions { flex-direction: column; }
  .form-success__actions .btn { width: 100%; justify-content: center; }

  /* Approver */
  .approver-actions { flex-direction: column; }
  .approver-actions .btn { width: 100%; justify-content: center; }

  /* Dialog */
  .dialog { padding: 24px 20px; }
  .dialog__actions { flex-direction: column-reverse; gap: 8px; }
  .dialog__actions .btn { width: 100%; justify-content: center; }

  /* Detail */
  .meta-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-section { padding: 16px 16px; }
  .detail-title-row { flex-direction: column; gap: 10px; }

  /* Toast */
  .toast { left: 14px; right: 14px; bottom: 14px; max-width: none; }
}

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE — SMALL MOBILE  (≤ 420px)
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 420px) {
  .brand__name { font-size: 12.5px; }
  .role-btn span:not(.sr-only) { display: none; } /* icon only */
  .role-btn { padding: 6px 10px; }

  .stats-row { gap: 6px; }
  .stat-card { flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; }
  .stat-card__icon { width: 30px; height: 30px; font-size: 15px; }
  .stat-card__value { font-size: 24px; }

  /* Hide side panel on tiny screens, show date inline */
  .request-card__side { display: none; }/* ═══════════════════════════════════════════════════════════════
   GMA Service Portal – app.css
   Gautrain Management Agency brand palette:
     Primary Navy  : #003087
     Gold          : #FFB81C
   Mobile-first, responsive breakpoints at 700px and 420px
   ═══════════════════════════════════════════════════════════════ */

  @import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700;800&family=Source+Sans+3:ital,wght@0,300;0,400;0,600;1,400&display=swap');

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

  :root {
    --blue:       #003087;
    --blue-dark:  #001f5c;
    --blue-mid:   #004bb5;
    --blue-light: #e8eef8;
    --blue-xlight:#f0f4fb;
    --gold:       #FFB81C;
    --gold-dark:  #c48c00;
    --gold-light: #fff8e1;
    --white:      #ffffff;
    --gray-50:    #f7f8fa;
    --gray-100:   #eef0f4;
    --gray-200:   #d5d9e2;
    --gray-400:   #9aa2b4;
    --gray-600:   #5a6478;
    --gray-800:   #2c3349;
    --red:        #c0392b;
    --red-light:  #fdf0ef;
    --green:      #1a7a3c;
    --green-light:#edf7f1;
    --amber:      #b86800;
    --amber-light:#fff3e0;

    --font-head: 'Montserrat', sans-serif;
    --font-body: 'Source Sans 3', sans-serif;
    --radius:    8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --shadow:    0 2px 12px rgba(0, 48, 135, 0.10);
    --shadow-md: 0 4px 20px rgba(0, 48, 135, 0.14);
    --transition:0.18s ease;
  }

  html { scroll-behavior: smooth; }

  body {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--gray-800);
    background: var(--gray-50);
    line-height: 1.55;
    min-height: 100vh;
  }

  /* ── Focus visible ────────────────────────────────────────────── */
  *:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 2px;
    border-radius: 4px;
  }

  /* ── Skip link ────────────────────────────────────────────────── */
  .skip-link {
    position: absolute;
    top: -48px;
    left: 0;
    background: var(--blue);
    color: #fff;
    padding: 10px 18px;
    border-radius: 0 0 var(--radius) 0;
    font-size: 13.5px;
    font-weight: 700;
    z-index: 999;
    text-decoration: none;
    transition: top 0.2s;
  }
  .skip-link:focus { top: 0; }

  /* ── App shell ────────────────────────────────────────────────── */
  .app-shell { display: flex; flex-direction: column; min-height: 100vh; }

  /* ════════════════════════════════════════════════════════════════
     TOP BAR
     ════════════════════════════════════════════════════════════════ */
  .top-bar {
    background: var(--blue);
    color: #fff;
    height: 60px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
  }

  .top-bar__inner { display: contents; }

  /* Brand */
  .brand {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    color: #fff;
    flex-shrink: 0;
  }
  .brand__icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 184, 28, 0.16);
    border: 1.5px solid rgba(255, 184, 28, 0.35);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .brand__icon svg { width: 22px; height: 22px; }
  .brand__text { display: flex; flex-direction: column; line-height: 1.1; }
  .brand__name { font-family: var(--font-head); font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
  .brand__sub  { font-size: 10px; opacity: 0.65; letter-spacing: 0.04em; text-transform: uppercase; }

  /* Role toggle */
  .role-toggle { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

  .role-toggle__label {
    font-size: 11px;
    opacity: 0.6;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .role-toggle__buttons {
    display: flex;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
  }

  .role-btn {
    padding: 5px 14px;
    border: none;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: rgba(255, 255, 255, 0.72);
    background: transparent;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .role-btn[aria-pressed="true"].role-btn--staff    { background: #fff; color: var(--blue); }
  .role-btn[aria-pressed="true"].role-btn--approver { background: var(--gold); color: var(--blue-dark); }

  .approver-badge {
    background: rgba(255, 184, 28, 0.2);
    color: var(--gold);
    border: 1px solid rgba(255, 184, 28, 0.4);
    border-radius: 20px;
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 10px;
    letter-spacing: 0.03em;
    white-space: nowrap;
    animation: fadeIn 0.2s ease;
  }
  @keyframes fadeIn { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: none; } }

  /* ════════════════════════════════════════════════════════════════
     PAGE LAYOUT
     ════════════════════════════════════════════════════════════════ */
  .page-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
  }

  /* Page header */
  .page-header {
    background: var(--white);
    border-bottom: 1.5px solid var(--gray-100);
    padding: 22px 20px 18px;
  }
  .page-header__inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
  }

  /* Breadcrumb */
  .breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    font-size: 12px;
    color: var(--gray-400);
    margin-bottom: 7px;
    flex-wrap: wrap;
  }
  .breadcrumb a { color: var(--blue); text-decoration: none; font-weight: 500; }
  .breadcrumb a:hover { text-decoration: underline; }
  .breadcrumb li + li::before { content: '›'; margin-right: 6px; color: var(--gray-400); }

  /* Titles */
  .page-title {
    font-family: var(--font-head);
    font-size: 24px;
    font-weight: 800;
    color: var(--blue);
    line-height: 1.15;
  }
  .page-subtitle {
    font-size: 13.5px;
    color: var(--gray-600);
    margin-top: 4px;
  }

  /* Approver notice banner */
  .approver-notice {
    background: var(--amber-light);
    border: 1.5px solid rgba(255, 184, 28, 0.45);
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 12.5px;
    color: var(--amber);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }

  /* ════════════════════════════════════════════════════════════════
     BUTTONS
     ════════════════════════════════════════════════════════════════ */
  .btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 20px;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    white-space: nowrap;
    text-decoration: none;
    flex-shrink: 0;
  }
  .btn:disabled { opacity: 0.5; cursor: not-allowed; }

  .btn--primary  { background: var(--blue); color: #fff; box-shadow: 0 2px 8px rgba(0,48,135,.25); }
  .btn--primary:hover:not(:disabled)  { background: var(--blue-mid); }

  .btn--secondary { background: var(--white); color: var(--gray-600); border: 1.5px solid var(--gray-200); }
  .btn--secondary:hover:not(:disabled) { background: var(--gray-50); color: var(--gray-800); }

  .btn--approve { background: var(--green); color: #fff; }
  .btn--approve:hover:not(:disabled) { background: #156030; }

  .btn--reject { background: var(--red); color: #fff; }
  .btn--reject:hover:not(:disabled) { background: #9e2e23; }

  .btn--sm { padding: 6px 14px; font-size: 12.5px; }

  /* ════════════════════════════════════════════════════════════════
     STAT CARDS
     ════════════════════════════════════════════════════════════════ */
  .stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 20px 0 0;
  }
  .stat-card {
    background: var(--white);
    border: 1.5px solid var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 13px;
    box-shadow: var(--shadow);
    transition: var(--transition);
  }
  .stat-card:hover { box-shadow: var(--shadow-md); }

  .stat-card__icon {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
  }
  .stat-card__icon--blue  { background: var(--blue-light); }
  .stat-card__icon--gold  { background: var(--gold-light); }
  .stat-card__icon--red   { background: var(--red-light); }
  .stat-card__icon--green { background: var(--green-light); }

  .stat-card__value {
    font-family: var(--font-head);
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    color: var(--gray-800);
  }
  .stat-card__value--gold  { color: var(--amber); }
  .stat-card__value--red   { color: var(--red); }
  .stat-card__value--green { color: var(--green); }

  .stat-card__label {
    font-size: 11.5px;
    color: var(--gray-400);
    margin-top: 3px;
    font-weight: 600;
    letter-spacing: 0.01em;
  }

  /* ════════════════════════════════════════════════════════════════
     TOOLBAR
     ════════════════════════════════════════════════════════════════ */
  .toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    padding: 18px 0 10px;
  }
  .toolbar__search {
    position: relative;
    flex: 1 1 200px;
    min-width: 160px;
  }
  .toolbar__search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    pointer-events: none;
  }
  .result-count {
    font-size: 12.5px;
    color: var(--gray-400);
    margin-bottom: 12px;
  }
  .result-count strong { color: var(--gray-600); }

  /* ════════════════════════════════════════════════════════════════
     INPUTS
     ════════════════════════════════════════════════════════════════ */
  .input {
    width: 100%;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 9px 12px;
    font-family: var(--font-body);
    font-size: 13.5px;
    color: var(--gray-800);
    background: var(--white);
    transition: var(--transition);
    outline: none;
    line-height: 1.5;
  }
  .input:hover  { border-color: var(--gray-400); }
  .input:focus  { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,48,135,0.10); }

  .input--search { padding-left: 34px; }

  .input--select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%239aa2b4' d='M8 11L2 5h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 13px;
    padding-right: 30px;
    cursor: pointer;
    flex: 0 0 auto;
    width: auto;
  }

  .input--textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
  }

  /* ════════════════════════════════════════════════════════════════
     BADGES
     ════════════════════════════════════════════════════════════════ */
  .badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
  }
  .badge__dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
  .badge__dot--pulse { animation: pulse 2s infinite; }

  @keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

  .badge--category  { background: var(--blue-light); color: var(--blue); }
  .badge--pending   { background: #f0f2ff; color: #3a52c4; border: 1px solid #c5ceee; }
  .badge--review    { background: var(--amber-light); color: var(--amber); border: 1px solid rgba(184,104,0,.25); }
  .badge--approved  { background: var(--green-light); color: var(--green); border: 1px solid rgba(26,122,60,.2); }
  .badge--rejected  { background: var(--red-light); color: var(--red); border: 1px solid rgba(192,57,43,.2); }
  .badge--resolved  { background: #e8f6f9; color: #0b6e8a; border: 1px solid rgba(11,110,138,.2); }
  .badge--critical  { background: var(--red-light); color: var(--red); border: 1px solid rgba(192,57,43,.25); }
  .badge--high      { background: var(--amber-light); color: var(--amber); border: 1px solid rgba(184,104,0,.2); }
  .badge--medium    { background: #fffde7; color: #8a7000; border: 1px solid rgba(138,112,0,.18); }
  .badge--low       { background: var(--green-light); color: var(--green); border: 1px solid rgba(26,122,60,.18); }

  /* ════════════════════════════════════════════════════════════════
     REQUEST LIST
     ════════════════════════════════════════════════════════════════ */
  .request-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 40px;
  }

  .request-card {
    background: var(--white);
    border: 1.5px solid var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    box-shadow: var(--shadow);
    animation: slideIn 0.25s ease both;
  }
  .request-card:hover {
    border-color: rgba(0, 48, 135, 0.28);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
  }

  @keyframes slideIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:none} }

  .request-card__main { flex: 1; min-width: 0; }
  .request-card__meta {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    margin-bottom: 5px;
  }
  .request-card__id {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--gray-400);
    letter-spacing: 0.08em;
    font-family: var(--font-head);
  }
  .request-card__title {
    font-weight: 600;
    font-size: 14.5px;
    color: var(--gray-800);
    margin-bottom: 8px;
    line-height: 1.35;
  }
  .request-card__badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
  .request-card__side {
    text-align: right;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
  }
  .request-card__date { font-size: 11.5px; color: var(--gray-400); }
  .request-card__due  { font-size: 11px; color: var(--amber); font-weight: 600; }
  .request-card__chevron { color: var(--gray-200); margin-top: 2px; }

  /* Empty state */
  .empty-state {
    text-align: center;
    padding: 64px 20px;
    color: var(--gray-400);
  }
  .empty-state__icon  { font-size: 40px; margin-bottom: 14px; }
  .empty-state__title { font-family: var(--font-head); font-size: 18px; font-weight: 700; color: var(--gray-600); margin-bottom: 6px; }
  .empty-state__body  { font-size: 13.5px; }

  /* ════════════════════════════════════════════════════════════════
     FORM
     ════════════════════════════════════════════════════════════════ */
  .form-page { padding: 28px 0 48px; }

  .form-card {
    background: var(--white);
    border: 1.5px solid var(--gray-100);
    border-radius: var(--radius-xl);
    padding: 32px 32px;
    box-shadow: var(--shadow-md);
    max-width: 680px;
    animation: slideIn 0.3s ease both;
  }

  .form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
  .form-group--error .input { border-color: var(--red); }
  .form-group--error .input:focus { box-shadow: 0 0 0 3px rgba(192,57,43,0.1); }

  .form-label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--gray-600);
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  .form-label .required { color: var(--red); margin-left: 2px; }
  .form-label .optional  { font-weight: 400; color: var(--gray-400); text-transform: none; letter-spacing: 0; }

  .form-error {
    font-size: 12px;
    color: var(--red);
    display: flex;
    align-items: center;
    gap: 5px;
  }
  .form-hint { font-size: 11.5px; color: var(--gray-400); }

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

  .form-footer-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-top: 4px; }
  .char-count { font-size: 11.5px; color: var(--gray-400); white-space: nowrap; }

  /* File drop */
  .file-drop {
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1.5px dashed var(--gray-200);
    border-radius: var(--radius);
    padding: 10px 12px;
    cursor: pointer;
    color: var(--gray-400);
    font-size: 13.5px;
    transition: var(--transition);
    overflow: hidden;
  }
  .file-drop:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-xlight); }
  .file-drop span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 22px;
    border-top: 1.5px solid var(--gray-100);
    margin-top: 4px;
  }

  /* Success */
  .form-success {
    text-align: center;
    padding: 36px 16px;
    animation: slideIn 0.3s ease both;
  }
  .form-success__icon {
    width: 60px;
    height: 60px;
    background: var(--green-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    border: 2px solid rgba(26,122,60,.25);
  }
  .form-success__icon svg { width: 26px; height: 26px; color: var(--green); }
  .form-success h2  { font-family: var(--font-head); font-size: 22px; font-weight: 800; color: var(--gray-800); margin-bottom: 8px; }
  .form-success p   { font-size: 14px; color: var(--gray-600); margin-bottom: 26px; }
  .form-success__actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

  /* Spinner */
  .spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
  }
  @keyframes spin { to { transform: rotate(360deg); } }

  /* ════════════════════════════════════════════════════════════════
     DETAIL VIEW
     ════════════════════════════════════════════════════════════════ */
  .detail-page { padding: 22px 18px 48px; }

  .detail-title-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 4px;
  }
  .detail-title-row .page-title { flex: 1; min-width: 0; }

  /* Meta grid */
  .meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
  }
  .meta-card {
    background: var(--white);
    border: 1.5px solid var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    box-shadow: var(--shadow);
  }
  .meta-card__label {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--gray-400);
    letter-spacing: 0.07em;
    text-transform: uppercase;
    margin-bottom: 4px;
  }
  .meta-card__value { font-size: 14px; font-weight: 600; color: var(--gray-800); }
  .text--critical { color: var(--red); }
  .text--high     { color: var(--amber); }
  .text--medium   { color: #8a7000; }
  .text--low      { color: var(--green); }

  /* Detail section */
  .detail-section {
    background: var(--white);
    border: 1.5px solid var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    margin-bottom: 14px;
    box-shadow: var(--shadow);
    animation: slideIn 0.28s ease both;
  }

  .section-heading {
    font-family: var(--font-head);
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 7px;
  }
  .section-heading--gold { color: var(--amber); }

  .detail-description {
    font-size: 14.5px;
    color: var(--gray-800);
    line-height: 1.75;
    white-space: pre-wrap;
  }

  /* Timeline */
  .timeline { list-style: none; position: relative; padding-left: 30px; }
  .timeline::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 8px;
    bottom: 0;
    width: 1.5px;
    background: var(--gray-100);
  }
  .timeline__item { position: relative; margin-bottom: 22px; }
  .timeline__item:last-child { margin-bottom: 0; }
  .timeline__dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--white);
    border: 2.5px solid var(--blue);
    position: absolute;
    left: -30px;
    top: 2px;
    z-index: 1;
  }
  .timeline__header { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 2px; }
  .timeline__action { font-weight: 700; font-size: 14px; color: var(--gray-800); }
  .timeline__actor  { font-size: 12px; color: var(--gray-400); }
  .timeline__date   { font-size: 11.5px; color: var(--gray-400); display: block; margin-bottom: 6px; }
  .timeline__note   {
    background: var(--blue-xlight);
    border-left: 3px solid var(--blue);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 8px 12px;
    font-size: 13.5px;
    color: var(--gray-600);
    font-style: italic;
    margin-top: 6px;
  }

  /* Approver panel */
  .approver-panel {
    border-color: rgba(255, 184, 28, 0.35);
    background: linear-gradient(135deg, var(--gold-light) 0%, #fff 100%);
  }
  .approver-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

  .already-actioned {
    background: var(--gray-50);
    border: 1.5px solid var(--gray-100);
    border-radius: var(--radius);
    padding: 14px 18px;
    color: var(--gray-400);
    font-size: 13.5px;
    text-align: center;
    margin-bottom: 14px;
  }

  /* ════════════════════════════════════════════════════════════════
     DIALOG
     ════════════════════════════════════════════════════════════════ */
  .dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 48, 135, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 900;
    backdrop-filter: blur(3px);
    padding: 20px;
    animation: fadeIn 0.18s ease;
  }
  .dialog {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 30px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: slideIn 0.2s ease both;
  }
  .dialog__title { font-family: var(--font-head); font-size: 20px; font-weight: 800; margin-bottom: 10px; }
  .dialog__title--green { color: var(--green); }
  .dialog__title--red   { color: var(--red); }
  .dialog__body   { font-size: 13.5px; color: var(--gray-600); margin-bottom: 24px; line-height: 1.6; }
  .dialog__actions { display: flex; gap: 10px; justify-content: flex-end; }

  /* ════════════════════════════════════════════════════════════════
     TOAST
     ════════════════════════════════════════════════════════════════ */
  .toast {
    position: fixed;
    bottom: 22px;
    right: 22px;
    z-index: 999;
    border-radius: var(--radius-lg);
    padding: 12px 20px;
    font-weight: 600;
    font-size: 13.5px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideUp 0.3s ease;
    max-width: 340px;
  }
  .toast--success { background: var(--green); color: #fff; }
  .toast--error   { background: var(--red); color: #fff; }

  @keyframes slideUp { from{opacity:0;transform:translateY(14px)} to{opacity:1;transform:none} }

  /* ════════════════════════════════════════════════════════════════
     NOT FOUND
     ════════════════════════════════════════════════════════════════ */
  .not-found {
    text-align: center;
    padding: 80px 20px;
  }
  .not-found h1 { font-family: var(--font-head); font-size: 24px; color: var(--blue); margin-bottom: 12px; }
  .not-found a  { color: var(--blue); font-weight: 600; }

  /* ════════════════════════════════════════════════════════════════
     LOADING STATE (before Blazor initialises)
     ════════════════════════════════════════════════════════════════ */
  .blazor-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    gap: 16px;
  }
  .blazor-loading__logo { animation: pulse 1.6s ease infinite; }
  .blazor-loading__text { font-family: var(--font-head); font-size: 14px; font-weight: 600; color: var(--gray-400); letter-spacing: 0.02em; }
  .blazor-loading__bar  { width: 200px; height: 4px; background: var(--gray-100); border-radius: 2px; overflow: hidden; }
  .blazor-loading__bar-inner {
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, var(--blue), var(--gold));
    border-radius: 2px;
    animation: shimmer 1.4s ease infinite;
  }
  @keyframes shimmer { 0%{transform:translateX(-200%)} 100%{transform:translateX(400%)} }

  /* ════════════════════════════════════════════════════════════════
     BLAZOR ERROR UI
     ════════════════════════════════════════════════════════════════ */
  #blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--red-light);
    border-top: 2px solid var(--red);
    padding: 12px 20px;
    font-size: 13px;
    color: var(--red);
    text-align: center;
    z-index: 1000;
  }
  #blazor-error-ui .reload  { color: var(--blue); font-weight: 600; margin-left: 8px; }
  #blazor-error-ui .dismiss { float: right; cursor: pointer; font-size: 16px; }

  /* ════════════════════════════════════════════════════════════════
     SR-ONLY utility
     ════════════════════════════════════════════════════════════════ */
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  /* ════════════════════════════════════════════════════════════════
     RESPONSIVE — TABLET  (≤ 700px)
     ════════════════════════════════════════════════════════════════ */
  @media (max-width: 700px) {
    /* Topbar */
    .top-bar { padding: 0 14px; height: 54px; }
    .brand__sub { display: none; }
    .brand__name { font-size: 13.5px; }
    .role-toggle__label { display: none; }
    .role-btn { padding: 5px 10px; font-size: 11.5px; gap: 4px; }
    .approver-badge { display: none; }

    /* Page header */
    .page-header { padding: 16px 14px 12px; }
    .page-header__inner { flex-direction: column; gap: 10px; align-items: stretch; }
    .page-header__inner .btn { align-self: flex-start; }
    .page-title { font-size: 20px; }
    .page-wrap { padding: 0 14px; }

    /* Stats */
    .stats-row { grid-template-columns: repeat(2, 1fr); gap: 8px; padding-top: 14px; }
    .stat-card { padding: 12px 14px; gap: 10px; }
    .stat-card__value { font-size: 22px; }
    .stat-card__label { font-size: 10.5px; }
    .stat-card__icon { width: 34px; height: 34px; font-size: 16px; }

    /* Toolbar */
    .toolbar { gap: 7px; }
    .toolbar__search { flex: 1 1 100%; }
    .input--select { flex: 1 1 calc(50% - 4px); min-width: 0; }

    /* Request card */
    .request-card { padding: 13px 14px; }
    .request-card__title { font-size: 13.5px; }
    .request-card__side { gap: 3px; }
    .request-card__date { font-size: 11px; }

    /* Form */
    .form-page { padding: 18px 0 36px; }
    .form-card { padding: 22px 18px; border-radius: var(--radius-lg); }
    .form-row { grid-template-columns: 1fr; }
    .form-actions { flex-direction: column-reverse; gap: 8px; }
    .form-actions .btn { width: 100%; justify-content: center; }
    .form-success__actions { flex-direction: column; }
    .form-success__actions .btn { width: 100%; justify-content: center; }

    /* Approver */
    .approver-actions { flex-direction: column; }
    .approver-actions .btn { width: 100%; justify-content: center; }

    /* Dialog */
    .dialog { padding: 24px 20px; }
    .dialog__actions { flex-direction: column-reverse; gap: 8px; }
    .dialog__actions .btn { width: 100%; justify-content: center; }

    /* Detail */
    .meta-grid { grid-template-columns: repeat(2, 1fr); }
    .detail-section { padding: 16px 16px; }
    .detail-title-row { flex-direction: column; gap: 10px; }

    /* Toast */
    .toast { left: 14px; right: 14px; bottom: 14px; max-width: none; }
  }

  /* ════════════════════════════════════════════════════════════════
     RESPONSIVE — SMALL MOBILE  (≤ 420px)
     ════════════════════════════════════════════════════════════════ */
  @media (max-width: 420px) {
    .brand__name { font-size: 12.5px; }
    .role-btn span:not(.sr-only) { display: none; } /* icon only */
    .role-btn { padding: 6px 10px; }

    .stats-row { gap: 6px; }
    .stat-card { flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; }
    .stat-card__icon { width: 30px; height: 30px; font-size: 15px; }
    .stat-card__value { font-size: 24px; }

    /* Hide side panel on tiny screens, show date inline */
    .request-card__side { display: none; }
    .request-card { padding: 12px 13px; }

    /* Stack all toolbar selects */
    .input--select { flex: 1 1 100%; width: 100%; }

    /* Meta — full width pairs */
    .meta-grid { grid-template-columns: 1fr 1fr; }

    /* Form */
    .form-card { padding: 16px 12px; }
    .page-title { font-size: 18px; }

    /* Dialog */
    .dialog { padding: 20px 16px; }
  }

  .request-card { padding: 12px 13px; }

  /* Stack all toolbar selects */
  .input--select { flex: 1 1 100%; width: 100%; }

  /* Meta — full width pairs */
  .meta-grid { grid-template-columns: 1fr 1fr; }

  /* Form */
  .form-card { padding: 16px 12px; }
  .page-title { font-size: 18px; }

  /* Dialog */
  .dialog { padding: 20px 16px; }
}
