/* ============================================================
   RMU Claims System — Glassmorphism Design System v1.1
   Corporate / Professional / Glassmorphism
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── CSS Custom Properties ────────────────────────────────── */
:root {
  /* Brand: Regional Maritime University — white + blue.
     Light theme; all surfaces are solid for WCAG AA legibility. */

  /* Design tokens — Sea Blue / Navy system.
     Interactive fills use an AA-safe sea blue (#1B7FA0 = 4.58:1 on white); the
     brighter brand sea blue (#219EBC) is reserved for accents/indicators where
     text contrast is not at stake (focus rings, active markers, gradients). */

  /* Backgrounds */
  --bg-base:          #f7fafc;          /* near-white page */
  --bg-glass:         #ffffff;          /* solid cards/modals (clean, legible) */
  --bg-glass-hover:   #f4fafc;          /* surface hover */
  --bg-glass-strong:  #ffffff;
  --bg-overlay:       rgba(2, 48, 71, 0.45);   /* navy scrim for modals */

  /* Semantic surface/divider tokens */
  --surface:          #ffffff;
  --surface-2:        #f4fafc;          /* Surface — very light blue */
  --divider:          #e2e8f0;          /* Borders — light gray */
  --input-bg:         #ffffff;
  --input-bg-disabled:#f1f5f9;
  --input-border:     #cbd5e1;
  --scroll-thumb:     rgba(2, 48, 71, 0.22);
  --scroll-thumb-hov: rgba(2, 48, 71, 0.38);
  --focus-ring:       rgba(33, 158, 188, 0.55);

  /* Borders */
  --border-glass:     1px solid #e2e8f0;
  --border-glass-md:  1px solid #cbd5e1;

  /* Colours */
  --clr-primary:      #1b7fa0;          /* Sea Blue (AA-safe for white text) */
  --clr-primary-hover:#156a85;
  --clr-primary-glow: rgba(33, 158, 188, 0.30);
  --clr-accent:       #219ebc;          /* brand Sea Blue — accents/indicators */
  --clr-secondary:    #023047;          /* Navy */
  --clr-success:      #047857;          /* Emerald, darkened for AA on white */
  --clr-success-accent:#10b981;
  --clr-warning:      #b45309;          /* Amber, darkened for AA on white */
  --clr-warning-accent:#f59e0b;
  --clr-danger:       #dc2626;          /* Red, AA on white with white text */
  --clr-danger-accent:#ef4444;
  --clr-info:         #6d28d9;

  /* Text */
  --txt-primary:      #1e293b;          /* Dark Slate */
  --txt-secondary:    #64748b;          /* Gray — 4.6:1 on white */
  --txt-muted:        #5b6b80;          /* ~5:1 on white */

  /* Layout */
  --sidebar-w:        260px;
  --header-h:         70px;
  --radius-sm:        8px;
  --radius-md:        12px;
  --radius-lg:        16px;
  --radius-xl:        20px;

  /* Shadows (soft, light theme) */
  --shadow-glass:     0 12px 32px rgba(15, 23, 42, 0.16);
  --shadow-card:      0 2px 10px rgba(15, 23, 42, 0.06);
  --shadow-glow:      0 4px 14px rgba(29, 78, 216, 0.25);
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.9rem;
  background: var(--bg-base);
  background-attachment: fixed;
  color: var(--txt-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--clr-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--clr-secondary); }

/* ── Glass Mixin ──────────────────────────────────────────── */
.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: var(--border-glass);
  border-radius: var(--radius-lg);
}

.glass-strong {
  background: var(--bg-glass-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: var(--border-glass-md);
  border-radius: var(--radius-lg);
}

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hov); }

/* ============================================================
   SIDEBAR
   ============================================================ */
.rmu-sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--clr-secondary);   /* Navy */
  border-right: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow-y: auto;
  overflow-x: hidden;
}

.rmu-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.rmu-sidebar__brand-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: var(--shadow-glow);
}

.rmu-sidebar__brand-text {
  display: flex; flex-direction: column;
}

.rmu-sidebar__brand-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.rmu-sidebar__brand-sub {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.60);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rmu-sidebar__nav {
  flex: 1;
  padding: 16px 0;
}

.rmu-sidebar__section {
  padding: 8px 20px 4px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.50);
}

.rmu-sidebar__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: rgba(255,255,255,0.78);
  font-size: 0.85rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: background .2s, color .2s, border-color .2s;
  cursor: pointer;
}

.rmu-sidebar__link:hover {
  color: #ffffff;
  background: rgba(255,255,255,0.07);
  border-left-color: var(--clr-accent);
  text-decoration: none;
}

.rmu-sidebar__link.active {
  color: #ffffff;
  background: rgba(33, 158, 188, 0.20);   /* Sea Blue wash */
  border-left-color: var(--clr-accent);
}

.rmu-sidebar__link i {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.rmu-sidebar__footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.10);
}

/* ============================================================
   HEADER / TOPBAR
   ============================================================ */
.rmu-header {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: var(--header-h);
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 999;
}

.rmu-header__left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.rmu-header__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--txt-primary);
}

.rmu-header__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rmu-header__btn {
  width: 38px; height: 38px;
  background: var(--surface-2);
  border: var(--border-glass);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--txt-secondary);
  cursor: pointer;
  transition: all .2s;
  font-size: 1rem;
}

.rmu-header__btn:hover {
  background: var(--bg-glass-hover);
  color: var(--txt-primary);
  text-decoration: none;
}

.rmu-header__avatar {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  border: 2px solid rgba(33, 158, 188, 0.45);
}

/* Dropdown */
.rmu-dropdown {
  position: relative;
}

.rmu-dropdown__menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 180px;
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: var(--border-glass-md);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-glass);
  padding: 8px 0;
  z-index: 2000;
}

.rmu-dropdown.open .rmu-dropdown__menu { display: block; }

.rmu-dropdown__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--txt-secondary);
  font-size: 0.83rem;
  transition: all .15s;
  cursor: pointer;
}

.rmu-dropdown__item:hover {
  background: var(--surface-2);
  color: var(--txt-primary);
  text-decoration: none;
}

.rmu-dropdown__divider {
  height: 1px;
  background: var(--divider);
  margin: 4px 0;
}

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */
.rmu-main {
  margin-left: var(--sidebar-w);
  padding-top: var(--header-h);
  min-height: 100vh;
}

.rmu-content {
  padding: 28px 32px;
}

/* Legacy Bootstrap layout wrappers used by claimant/admin/finance portal pages */
.page-body-wrapper {
  margin-left: var(--sidebar-w);
}
.main-panel {
  padding-top: var(--header-h);
  min-height: 100vh;
}
.content-wrapper {
  padding: 28px 32px;
}
/* Bootstrap template wrappers used by admin/approver pages */
.body-wrapper {
  margin-left: var(--sidebar-w);
  padding-top: var(--header-h);
}
/* Inner content container on admin/approver pages. Only Bootstrap's JS is
   loaded (not its CSS), so .container-fluid has no gutters of its own — give it
   the same breathing room as .rmu-content so content never butts against the
   sidebar or the page edges. */
.container-fluid {
  padding: 28px 32px;
  width: 100%;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.rmu-page-header {
  margin-bottom: 28px;
}

.rmu-page-header__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--txt-primary);
  letter-spacing: -0.02em;
}

.rmu-page-header__sub {
  font-size: 0.85rem;
  color: var(--txt-secondary);
  margin-top: 4px;
}

/* ============================================================
   STAT CARDS
   ============================================================ */
.rmu-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.rmu-stat-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  transition: all .25s;
  position: relative;
  overflow: hidden;
}

.rmu-stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--clr-primary), var(--clr-secondary));
  opacity: 0;
  transition: opacity .25s;
}

.rmu-stat-card:hover {
  background: var(--bg-glass-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.rmu-stat-card:hover::before { opacity: 1; }

.rmu-stat-card--primary::before   { opacity: 1; background: linear-gradient(90deg, var(--clr-primary), #60a5fa); }
.rmu-stat-card--secondary::before { opacity: 1; background: linear-gradient(90deg, var(--clr-secondary), #67e8f9); }
.rmu-stat-card--success::before   { opacity: 1; background: linear-gradient(90deg, var(--clr-success), #6ee7b7); }
.rmu-stat-card--warning::before   { opacity: 1; background: linear-gradient(90deg, var(--clr-warning), #fcd34d); }
.rmu-stat-card--danger::before    { opacity: 1; background: linear-gradient(90deg, var(--clr-danger), #fca5a5); }
.rmu-stat-card--info::before      { opacity: 1; background: linear-gradient(90deg, var(--clr-info), #c4b5fd); }

.rmu-stat-card__icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 16px;
}

.rmu-stat-card__icon--primary   { background: rgba(59,130,246,0.18);  color: var(--clr-primary); }
.rmu-stat-card__icon--secondary { background: rgba(6,182,212,0.18);   color: var(--clr-secondary); }
.rmu-stat-card__icon--success   { background: rgba(16,185,129,0.18);  color: var(--clr-success); }
.rmu-stat-card__icon--warning   { background: rgba(245,158,11,0.18);  color: var(--clr-warning); }
.rmu-stat-card__icon--danger    { background: rgba(239,68,68,0.18);   color: var(--clr-danger); }
.rmu-stat-card__icon--info      { background: rgba(139,92,246,0.18);  color: var(--clr-info); }

.rmu-stat-card__value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--txt-primary);
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.03em;
}

.rmu-stat-card__label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--txt-secondary);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* ============================================================
   GLASS CARD (generic)
   ============================================================ */
.rmu-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.rmu-card__header {
  padding: 20px 24px 16px;
  border-bottom: var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rmu-card__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--txt-primary);
}

.rmu-card__body {
  padding: 20px 24px;
}

/* ============================================================
   TABLE
   ============================================================ */
.rmu-table-wrap {
  overflow-x: auto;
}

.rmu-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.rmu-table thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--txt-secondary);
  border-bottom: var(--border-glass);
  white-space: nowrap;
}

.rmu-table tbody td {
  padding: 12px 16px;
  color: var(--txt-primary);
  border-bottom: 1px solid var(--divider);
  vertical-align: middle;
}

.rmu-table tbody tr:hover td {
  background: var(--surface-2);
}

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

/* ============================================================
   BUTTONS
   ============================================================ */
.rmu-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 500;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.rmu-btn:disabled, .rmu-btn[aria-disabled="true"] {
  opacity: .6; cursor: not-allowed; transform: none !important; box-shadow: none;
}

/* Loading state (#5): hide the label, overlay a spinner, block further clicks. */
@keyframes rmu-spin { to { transform: rotate(360deg); } }
.rmu-btn.is-loading { color: transparent !important; pointer-events: none; position: relative; }
.rmu-btn.is-loading > * { visibility: hidden; }
.rmu-btn.is-loading::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 1.05em; height: 1.05em; margin: -0.525em 0 0 -0.525em;
  border: 2px solid rgba(255,255,255,0.55); border-top-color: #fff;
  border-radius: 50%; animation: rmu-spin .6s linear infinite;
}
.rmu-btn--secondary.is-loading::after,
.rmu-btn--outline.is-loading::after {
  border-color: rgba(15,23,42,0.30); border-top-color: var(--txt-primary);
}
@media (prefers-reduced-motion: reduce) {
  .rmu-btn.is-loading::after { animation-duration: 1.5s; }
}

.rmu-btn--primary {
  background: var(--clr-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(27,127,160,0.30);
}
.rmu-btn--primary:hover {
  background: var(--clr-primary-hover);
  box-shadow: 0 6px 20px rgba(27,127,160,0.42);
  transform: translateY(-1px);
  color: #fff;
}
.rmu-btn--primary:active { transform: translateY(0); }

.rmu-btn--secondary {
  background: var(--surface);
  color: var(--txt-primary);
  border: var(--border-glass-md);
}
.rmu-btn--secondary:hover {
  background: var(--bg-glass-hover);
  color: var(--txt-primary);
}

.rmu-btn--success {
  background: var(--clr-success);
  color: #fff;
}
.rmu-btn--success:hover { background: #036c4d; color: #fff; }

.rmu-btn--danger {
  background: var(--clr-danger);
  color: #fff;
}
.rmu-btn--danger:hover { background: #b91c1c; color: #fff; }

.rmu-btn--warning {
  background: var(--clr-warning);
  color: #fff;
}
.rmu-btn--warning:hover { background: #96450a; color: #fff; }

.rmu-btn--outline {
  background: transparent;
  border: var(--border-glass-md);
  color: var(--txt-primary);
}
.rmu-btn--outline:hover {
  background: var(--bg-glass);
  color: var(--txt-primary);
}

.rmu-btn--sm {
  padding: 6px 12px;
  font-size: 0.78rem;
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.rmu-form-group {
  margin-bottom: 20px;
}

.rmu-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--txt-secondary);
  margin-bottom: 7px;
  letter-spacing: 0.03em;
}

.rmu-label .required { color: var(--clr-danger); }

.rmu-input,
.rmu-select,
.rmu-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  color: var(--txt-primary);
  font-family: inherit;
  font-size: 0.87rem;
  transition: all .2s;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.rmu-input:focus,
.rmu-select:focus,
.rmu-textarea:focus {
  border-color: var(--clr-primary);
  background: var(--input-bg);
  box-shadow: 0 0 0 3px rgba(33,158,188,0.22);
}

.rmu-input::placeholder { color: var(--txt-muted); }

.rmu-select option {
  background: #ffffff;
  color: var(--txt-primary);
}

.rmu-input[readonly] {
  background: var(--input-bg-disabled);
  color: var(--txt-secondary);
  cursor: not-allowed;
}

.rmu-input.is-invalid { border-color: rgba(239,68,68,0.6); }
.rmu-form-error {
  font-size: 0.76rem;
  color: var(--clr-danger);
  margin-top: 5px;
  display: none;
}
.rmu-input.is-invalid ~ .rmu-form-error { display: block; }

.rmu-form-hint {
  font-size: 0.76rem;
  color: var(--txt-muted);
  margin-top: 5px;
}

/* ============================================================
   BADGE / STATUS
   ============================================================ */
.rmu-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rmu-badge--primary  { background: rgba(33,158,188,0.14);  color: #156a85; }
.rmu-badge--success  { background: rgba(16,185,129,0.15);  color: #047857; }
.rmu-badge--warning  { background: rgba(245,158,11,0.16);  color: #b45309; }
.rmu-badge--danger   { background: rgba(239,68,68,0.13);   color: #b91c1c; }
.rmu-badge--info     { background: rgba(109,40,217,0.12);  color: #6d28d9; }
.rmu-badge--neutral  { background: rgba(2,48,71,0.07);     color: var(--txt-secondary); }

/* ============================================================
   ALERT
   ============================================================ */
.rmu-alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  border-left: 3px solid;
  margin-bottom: 16px;
}

.rmu-alert--info    { background: rgba(29,78,216,0.08);  border-color: var(--clr-primary);   color: #1e40af; }
.rmu-alert--success { background: rgba(4,120,87,0.10);   border-color: var(--clr-success);   color: #065f46; }
.rmu-alert--warning { background: rgba(180,83,9,0.10);   border-color: var(--clr-warning);   color: #92400e; }
.rmu-alert--danger  { background: rgba(185,28,28,0.09);  border-color: var(--clr-danger);    color: #991b1b; }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.rmu-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg-base);
  background-attachment: fixed;
  position: relative;
  overflow: hidden;
}

/* Ambient glow orbs */
.rmu-login-page::before,
.rmu-login-page::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.rmu-login-page::before {
  width: 500px; height: 500px;
  background: rgba(59,130,246,0.1);
  top: -100px; left: -100px;
}

.rmu-login-page::after {
  width: 400px; height: 400px;
  background: rgba(6,182,212,0.08);
  bottom: -80px; right: -80px;
}

.rmu-login-card {
  width: 100%;
  max-width: 900px;
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: var(--border-glass-md);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-glass);
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.rmu-login-brand {
  background: linear-gradient(160deg, rgba(59,130,246,0.18) 0%, rgba(6,182,212,0.12) 100%);
  border-right: var(--border-glass);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  text-align: center;
}

.rmu-login-brand__logo {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(59,130,246,0.45);
  box-shadow: 0 0 40px rgba(59,130,246,0.3);
  margin-bottom: 24px;
}

.rmu-login-brand__name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--txt-primary);
  line-height: 1.3;
}

.rmu-login-brand__tagline {
  font-size: 0.82rem;
  color: var(--txt-secondary);
  margin-top: 8px;
  line-height: 1.5;
}

.rmu-login-form-wrap {
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.rmu-login-form-wrap__title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--txt-primary);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.rmu-login-form-wrap__sub {
  font-size: 0.83rem;
  color: var(--txt-secondary);
  margin-bottom: 32px;
}

.rmu-login-input-group {
  position: relative;
  margin-bottom: 18px;
}

.rmu-login-input-group .rmu-input {
  padding-left: 42px;
}

.rmu-login-input-group__icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--txt-muted);
  font-size: 1rem;
  pointer-events: none;
}

.rmu-login-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary));
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-top: 8px;
  transition: all .25s;
  letter-spacing: 0.02em;
}

.rmu-login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(59,130,246,0.45);
}

.rmu-login-register {
  text-align: center;
  margin-top: 22px;
  font-size: 0.83rem;
  color: var(--txt-secondary);
}

.rmu-login-register a {
  color: var(--clr-primary);
  font-weight: 500;
}

.rmu-login-register a:hover { color: var(--clr-secondary); }

/* ============================================================
   REGISTER PAGE
   ============================================================ */
.rmu-register-page {
  min-height: 100vh;
  background: var(--bg-base);
  background-attachment: fixed;
  padding: 40px 20px;
}

.rmu-register-container {
  max-width: 860px;
  margin: 0 auto;
}

.rmu-register-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.rmu-register-header__title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--txt-primary);
}

.rmu-section-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--clr-primary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(59,130,246,0.25);
}

/* ============================================================
   MODAL (glass)
   ============================================================ */
.rmu-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.40);
  backdrop-filter: blur(6px) saturate(120%);
  -webkit-backdrop-filter: blur(6px) saturate(120%);
  z-index: 1050;
  display: none;
}
.rmu-modal-backdrop.open { display: flex; align-items: center; justify-content: center; }

/* Glassmorphic translucent modal — frosts the blurred page behind it. */
.rmu-modal {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glass);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 0;
}

.rmu-modal__header {
  padding: 20px 24px;
  border-bottom: var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rmu-modal__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--txt-primary);
}

.rmu-modal__close {
  width: 30px; height: 30px;
  background: var(--surface-2);
  border: var(--border-glass);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--txt-secondary);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all .15s;
}
.rmu-modal__close:hover { background: var(--bg-glass-hover); color: var(--txt-primary); }

.rmu-modal__body { padding: 20px 24px; }

/* ============================================================
   GRID HELPERS
   ============================================================ */
.rmu-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rmu-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* ============================================================
   UTILITIES
   ============================================================ */
.rmu-text-primary   { color: var(--clr-primary) !important; }
.rmu-text-secondary { color: var(--clr-secondary) !important; }
.rmu-text-success   { color: var(--clr-success) !important; }
.rmu-text-warning   { color: var(--clr-warning) !important; }
.rmu-text-danger    { color: var(--clr-danger) !important; }
.rmu-text-muted     { color: var(--txt-muted) !important; }

.rmu-mt-0 { margin-top: 0; }
.rmu-mt-1 { margin-top: 8px; }
.rmu-mt-2 { margin-top: 16px; }
.rmu-mt-3 { margin-top: 24px; }
.rmu-mt-4 { margin-top: 32px; }

.rmu-mb-0 { margin-bottom: 0; }
.rmu-mb-1 { margin-bottom: 8px; }
.rmu-mb-2 { margin-bottom: 16px; }
.rmu-mb-3 { margin-bottom: 24px; }
.rmu-mb-4 { margin-bottom: 32px; }

.w-100 { width: 100%; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .rmu-sidebar { transform: translateX(-100%); transition: transform .3s; }
  .rmu-sidebar.open { transform: translateX(0) !important; }
  .rmu-header { left: 0; }
  .rmu-main  { margin-left: 0; }
  /* Sidebar collapses off-canvas, so admin/approver wrappers reclaim the space */
  .body-wrapper, .page-body-wrapper { margin-left: 0; }
}

@media (max-width: 768px) {
  .rmu-login-card { grid-template-columns: 1fr; }
  .rmu-login-brand { display: none; }
  .rmu-login-form-wrap { padding: 36px 28px; }
  .rmu-content, .container-fluid { padding: 20px 16px; }
  .rmu-stats { grid-template-columns: 1fr 1fr; }
  .rmu-grid-2, .rmu-grid-3 { grid-template-columns: 1fr; }
  .rmu-register-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .rmu-stats { grid-template-columns: 1fr; }
  .rmu-login-form-wrap { padding: 28px 20px; }
}

/* ── Mobile-first overflow guard (#1, #6) ──────────────────────────────────────
   Stray wide content (tables, long ids, fixed widths) used to push the page
   wider than the viewport, so phones rendered it shrunk-to-fit like a tiny
   desktop. Contain the page width and keep wide content scrolling *inside* its
   own container instead of widening the page. */
html, body { max-width: 100%; overflow-x: hidden; }
img, svg, video, canvas { max-width: 100%; height: auto; }
.rmu-main, .body-wrapper, .page-wrapper, #main-wrapper,
.container-fluid, .content-wrapper, .rmu-content, .rmu-card {
  min-width: 0; max-width: 100%;
}
.rmu-table-wrap { max-width: 100%; -webkit-overflow-scrolling: touch; }

/* Backdrop shown behind the off-canvas sidebar on small screens (toggled by
   rmu-ui.js), so opening the menu dims the page and tapping outside closes it. */
.rmu-sidebar-backdrop {
  position: fixed; inset: 0; background: rgba(2,48,71,0.45);
  z-index: 999; opacity: 0; visibility: hidden; transition: opacity .25s;
}
@media (max-width: 1024px) {
  body.rmu-sidebar-open .rmu-sidebar-backdrop { opacity: 1; visibility: visible; }
  body.rmu-sidebar-open { overflow: hidden; }
}
@media (min-width: 1025px) { .rmu-sidebar-backdrop { display: none; } }

/* Claim editor on small screens: the recurring-date generator's fixed-width
   date inputs used to overflow the session card. Let them stack full-width and
   keep all session inputs within the card. */
@media (max-width: 560px) {
  .recur-panel .rmu-form-group { flex: 1 1 100%; }
  .recur-panel .recur-from,
  .recur-panel .recur-to { width: 100% !important; }
  /* Session time row: 4 columns don't fit a phone — go 2-up and let the
     native time inputs shrink instead of forcing the card wider than screen. */
  .slot-time-grid { grid-template-columns: 1fr 1fr !important; }
  .rmu-slot-card .rmu-input,
  .rmu-slot-card .rmu-select,
  .slot-time-grid .rmu-input { max-width: 100%; min-width: 0; }
}

/* ============================================================
   ACCESSIBILITY (WCAG 2.2 AA)
   ============================================================ */

/* Visible keyboard focus on all interactive controls (2.4.7, 2.4.13).
   Uses :focus-visible so it shows for keyboard/AT, not on mouse click. */
a:focus-visible,
button:focus-visible,
.rmu-btn:focus-visible,
.rmu-sidebar__link:focus-visible,
.rmu-dropdown__item:focus-visible,
.rmu-modal__close:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Ensure form controls keep an accessible ring even where a custom
   box-shadow focus style exists. */
.rmu-input:focus-visible,
.rmu-select:focus-visible,
.rmu-textarea:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 1px;
}

/* Status pill that pairs colour with an icon/text (never colour alone, 1.4.1). */
.rmu-status { display: inline-flex; align-items: center; gap: 5px; }
.rmu-status i { font-size: 0.85em; }

/* Screen-reader-only text for icon-only controls and table context. */
.rmu-sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Respect reduced-motion preference (2.3.3). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
