/* ═══════════════════════════════════════════════════════════
   ask-rush — Design System
   Adapted from the RLS Core Platform aesthetic:
   navy gradient navbar, soft surfaces, gradient tiles, indigo accents.
═══════════════════════════════════════════════════════════ */

:root {
  /* Brand palette */
  --ar-navy:         #0f172a;
  --ar-navy-mid:     #1e3a8a;
  --ar-indigo:       #4f46e5;
  --ar-indigo-soft:  #818cf8;
  --ar-accent:       #e2a614;

  /* Surfaces */
  --ar-bg:           #f0f4f8;
  --ar-surface:      #ffffff;
  --ar-surface-2:    #f8fafc;
  --ar-border:       #dde3ed;
  --ar-border-strong:#c3cbd9;

  /* Text */
  --ar-text:         #1e293b;
  --ar-muted:        #64748b;

  /* Status */
  --ar-good:         #047857;
  --ar-warn:         #b45309;
  --ar-bad:          #b91c1c;

  /* Legacy aliases so existing templates keep working */
  --bg:           var(--ar-bg);
  --panel:        var(--ar-surface);
  --ink:          var(--ar-text);
  --muted:        var(--ar-muted);
  --line:         var(--ar-border);
  --line-strong:  var(--ar-border-strong);
  --accent:       var(--ar-navy);
  --good:         var(--ar-good);
  --warn:         var(--ar-warn);
  --bad:          var(--ar-bad);
  --shadow:       0 2px 12px rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--ar-bg);
  color: var(--ar-text);
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  min-height: 100vh;
}

a { color: var(--ar-indigo); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { margin: 0 0 .4em; color: var(--ar-navy); font-weight: 800; letter-spacing: -0.01em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ar-muted); font-weight: 700; }
p  { margin: .25em 0; }
code { background: var(--ar-surface-2); padding: 1px 5px; border-radius: 4px; font-size: .88em; color: var(--ar-navy); }

/* ═══════════════════════════════════════════════════════════
   NAVBAR
═══════════════════════════════════════════════════════════ */
.ar-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.5rem;
  height: 62px;
  background: linear-gradient(135deg, var(--ar-navy) 0%, #162554 60%, var(--ar-navy-mid) 100%);
  border-bottom: 1px solid rgba(79, 70, 229, 0.35);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.ar-nav-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none !important;
}
.ar-nav-logo {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: .92;
  transition: opacity .2s;
}
.ar-nav-brand:hover .ar-nav-logo { opacity: 1; }
.ar-nav-title {
  font-size: 1rem;
  font-weight: 800;
  color: rgba(255,255,255,.92);
  letter-spacing: .01em;
}

.ar-nav-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.ar-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem .9rem;
  border-radius: 10px;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .02em;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.9) !important;
  cursor: pointer;
  transition: background .2s, box-shadow .2s, transform .15s, border-color .2s;
  text-decoration: none !important;
  white-space: nowrap;
}
.ar-nav-btn i { font-size: .95rem; color: var(--tool-accent, var(--ar-indigo-soft)); }
.ar-nav-btn:hover {
  background: rgba(79,70,229,.28);
  border-color: rgba(129,140,248,.55);
  box-shadow: 0 0 0 3px rgba(79,70,229,.18);
}
.ar-nav-btn.active {
  background: rgba(79,70,229,.4);
  border-color: rgba(129,140,248,.7);
  box-shadow: 0 0 0 3px rgba(79,70,229,.22);
  color: #fff !important;
}
.ar-nav-btn:active { transform: scale(.97); }

/* ═══════════════════════════════════════════════════════════
   PAGE BODY
═══════════════════════════════════════════════════════════ */
.ar-page-body {
  padding: 1.75rem 1.5rem 3rem;
  max-width: 1300px;
  margin: 0 auto;
}

/* legacy alias used by older templates */
.content {
  max-width: 1300px;
  margin: 1.75rem auto 3rem;
  padding: 0 1.5rem;
}

.ar-footer, .footer {
  text-align: center;
  color: var(--ar-muted);
  font-size: .78rem;
  padding: 20px 0 30px;
}

/* ═══════════════════════════════════════════════════════════
   ALERTS / FLASHES
═══════════════════════════════════════════════════════════ */
.ar-alert { border-radius: 12px; border: none; font-size: .9rem; font-weight: 500; padding: .85rem 1.1rem; }
.ar-alert--success { background: #ecfdf5; color: #065f46; }
.ar-alert--danger  { background: #fef2f2; color: #991b1b; }
.ar-alert--warning { background: #fffbeb; color: #92400e; }
.ar-alert--info    { background: #eff6ff; color: #1e40af; }

/* legacy flash classes */
.flashes { margin-bottom: 16px; display: flex; flex-direction: column; gap: 8px; }
.flash { padding: .8rem 1.1rem; border-radius: 12px; border: 1px solid var(--ar-border); background: var(--ar-surface); font-weight: 500; }
.flash-success { background: #ecfdf5; color: #065f46; border-color: #bfe3c9; }
.flash-error   { background: #fef2f2; color: #991b1b; border-color: #f1c2c8; }
.flash-info    { background: #eff6ff; color: #1e40af; border-color: #cfe0f5; }
.flash-warning { background: #fffbeb; color: #92400e; border-color: #f0d9a8; }

/* ═══════════════════════════════════════════════════════════
   HOME — greeting + tile grid
═══════════════════════════════════════════════════════════ */
.ar-home-wrap { max-width: 1200px; margin: 0 auto; padding: .25rem 0 3rem; }

.ar-greeting-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: .4rem;
}
.ar-greeting-text { font-size: 1rem; color: var(--ar-muted); font-weight: 400; }
.ar-greeting-name { font-size: 2.1rem; font-weight: 800; color: var(--ar-navy); line-height: 1.15; letter-spacing: -0.02em; }
.ar-greeting-meta { font-size: .9rem; color: var(--ar-muted); padding-bottom: .25rem; }

.ar-home-subtitle { color: var(--ar-muted); margin-bottom: 1.75rem; font-size: .95rem; max-width: 76ch; }

/* Tiles grid */
.ar-tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.ar-tile {
  display: block;
  border-radius: 20px;
  outline: none;
  transition: transform .28s cubic-bezier(.22,.68,0,1.2), box-shadow .28s ease;
  box-shadow: 0 8px 30px rgba(0,0,0,.15);
  text-decoration: none !important;
}
.ar-tile:hover, .ar-tile:focus-visible {
  transform: translateY(-8px) scale(1.015);
  box-shadow: 0 20px 50px rgba(0,0,0,.22),
              0 0 0 1px var(--tile-glow, #4f46e5),
              0 0 40px rgba(0,0,0,.08);
}

.ar-tile-inner {
  border-radius: 20px;
  padding: 1.75rem 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  min-height: 270px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a8a 0%, #4f46e5 100%);
}

.ar-tile-overlay {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: rgba(0,0,0,.28);
  transition: opacity .3s ease;
  pointer-events: none;
  z-index: 1;
}
.ar-tile:hover .ar-tile-overlay, .ar-tile:focus-visible .ar-tile-overlay { opacity: 0; }

.ar-tile-orb {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  pointer-events: none;
  z-index: 0;
}
.ar-tile-orb-1 { width: 160px; height: 160px; top: -50px; right: -40px; }
.ar-tile-orb-2 { width: 90px; height: 90px; bottom: 50px; left: -25px; background: rgba(255,255,255,.04); }

.ar-tile-status-pill,
.ar-tile-icon-wrap,
.ar-tile-content,
.ar-tile-launch { position: relative; z-index: 2; }

.ar-tile-status-pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255,255,255,.7);
  margin-bottom: 1.25rem;
}
.ar-status-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.ar-status-dot.online  { background: #4ade80; box-shadow: 0 0 6px #4ade80; }
.ar-status-dot.offline { background: rgba(255,255,255,.35); }

.ar-tile-icon-wrap { flex: 1; display: flex; align-items: center; }
.ar-tile-icon {
  font-size: 3.25rem;
  color: rgba(255,255,255,.92);
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.25));
  line-height: 1;
  transition: transform .28s cubic-bezier(.22,.68,0,1.2);
}
.ar-tile:hover .ar-tile-icon { transform: scale(1.1); }

.ar-tile-content { margin-top: 1rem; }
.ar-tile-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.01em;
  line-height: 1.2;
  margin-bottom: .4rem;
  text-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.ar-tile-desc { font-size: .82rem; color: rgba(255,255,255,.78); line-height: 1.5; }

.ar-tile-launch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.18);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: rgba(255,255,255,.85);
  transition: opacity .2s;
}
.ar-tile-launch i { font-size: 1.1rem; transition: transform .2s; }
.ar-tile:hover .ar-tile-launch i { transform: translateX(5px); }

/* Placeholder "slot" tile */
.ar-tile--placeholder { box-shadow: none; }
.ar-tile--placeholder .ar-tile-inner {
  background: var(--ar-surface);
  border: 2px dashed var(--ar-border);
  color: var(--ar-muted);
  box-shadow: none;
}
.ar-tile--placeholder .ar-tile-status-pill { color: var(--ar-muted); }
.ar-tile--placeholder .ar-tile-icon { color: var(--ar-border-strong); }
.ar-tile--placeholder .ar-tile-name { color: var(--ar-muted); text-shadow: none; }
.ar-tile--placeholder .ar-tile-desc { color: var(--ar-muted); }
.ar-tile--placeholder:hover { transform: none; box-shadow: none; }

.ar-tile--disabled { opacity: .65; cursor: default; }
.ar-tile--disabled:hover { transform: none; }

/* Compatibility: keep the older .tile / .tile-grid classes working for nested tools (designs list, quickstart, etc.) */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}
.tile {
  display: block;
  position: relative;
  padding: 1.5rem;
  background: var(--ar-surface);
  border: 1px solid var(--ar-border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  color: var(--ar-text);
  text-decoration: none !important;
}
.tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(15,23,42,.10);
  border-color: var(--ar-indigo-soft);
}
.tile h2 { margin-top: .75rem; color: var(--ar-navy); }
.tile p  { color: var(--ar-muted); margin: .25rem 0; font-size: .9rem; }
.tile-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--ar-indigo) 0%, var(--ar-navy-mid) 100%);
  color: #fff; font-weight: 800; font-size: 1.2rem;
  box-shadow: 0 6px 16px rgba(79,70,229,.3);
}
.tile-placeholder { background: var(--ar-surface-2); border-style: dashed; box-shadow: none; }
.tile-tag {
  position: absolute; top: 14px; right: 14px;
  font-size: .68rem; background: var(--ar-surface-2); padding: 3px 9px;
  border-radius: 999px; color: var(--ar-muted); font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════
   PANELS, CARDS, HEADINGS WITHIN PAGES
═══════════════════════════════════════════════════════════ */
.panel, .ar-card {
  background: var(--ar-surface);
  border: 1px solid var(--ar-border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.1rem;
}
.panel + .panel { margin-top: 0; }

.panel-head {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.panel-head h1, .panel-head h2 { margin: 0; }
.spacer { flex: 1; }

.breadcrumbs {
  font-size: .82rem;
  color: var(--ar-muted);
  margin-bottom: .9rem;
  display: flex;
  align-items: center;
  gap: .25rem;
  flex-wrap: wrap;
}
.breadcrumbs a { color: var(--ar-muted); }
.breadcrumbs a:hover { color: var(--ar-indigo); }
.breadcrumbs .sep { margin: 0 .25rem; opacity: .5; }

.kv {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: .5rem 1rem;
  font-size: .92rem;
}
.kv dt { color: var(--ar-muted); }
.kv dd { margin: 0; }

/* ═══════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--ar-border-strong);
  background: var(--ar-surface);
  color: var(--ar-text);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, box-shadow .15s, transform .12s, border-color .15s, color .15s;
  text-decoration: none !important;
  font-family: inherit;
}
.btn:hover {
  background: var(--ar-surface-2);
  border-color: var(--ar-indigo-soft);
  color: var(--ar-navy);
}
.btn:active { transform: scale(.98); }

.btn-primary {
  background: linear-gradient(135deg, var(--ar-indigo) 0%, #3730a3 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 16px rgba(79,70,229,.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #4338ca 0%, #312e81 100%);
  box-shadow: 0 8px 20px rgba(79,70,229,.42);
  color: #fff;
}

.btn-danger {
  color: var(--ar-bad);
  border-color: #f1c2c8;
  background: var(--ar-surface);
}
.btn-danger:hover {
  background: #fef2f2;
  border-color: var(--ar-bad);
  color: var(--ar-bad);
  box-shadow: 0 0 0 3px rgba(185,28,28,.12);
}

.btn-sm { padding: .35rem .7rem; font-size: .8rem; border-radius: 8px; }

.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; align-items: center; }

/* ═══════════════════════════════════════════════════════════
   FORM FIELDS
═══════════════════════════════════════════════════════════ */
.field { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .9rem; }
.field label {
  font-size: .78rem;
  color: var(--ar-muted);
  font-weight: 600;
  letter-spacing: .02em;
}
.field input[type=text],
.field input[type=number],
.field input[type=date],
.field input[type=email],
.field input[type=password],
.field input[type=color],
.field input[type=file],
.field select,
.field textarea {
  padding: .55rem .8rem;
  border: 1px solid var(--ar-border-strong);
  border-radius: 10px;
  font-size: .9rem;
  font-family: inherit;
  background: var(--ar-surface);
  color: var(--ar-text);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input[type=color] { padding: .25rem; height: 40px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ar-indigo);
  box-shadow: 0 0 0 3px rgba(79,70,229,.18);
  background: #fff;
}
.field textarea { min-height: 70px; resize: vertical; }
.field .hint, .hint {
  color: var(--ar-muted);
  font-size: .78rem;
  line-height: 1.45;
}
.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .9rem;
}

/* ═══════════════════════════════════════════════════════════
   TABLES
═══════════════════════════════════════════════════════════ */
table.data {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: .9rem;
  background: var(--ar-surface);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--ar-border);
}
table.data th,
table.data td {
  padding: .65rem .85rem;
  border-bottom: 1px solid var(--ar-border);
  text-align: left;
  vertical-align: top;
}
table.data thead th {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: rgba(255,255,255,.92);
  font-weight: 700;
  background: linear-gradient(135deg, var(--ar-navy) 0%, var(--ar-navy-mid) 100%);
  border-bottom-color: transparent;
  white-space: nowrap;
}
table.data tbody tr { transition: background .12s; }
table.data tbody tr:hover { background: rgba(79,70,229,.05); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }

.preview-table {
  font-size: .82rem;
  overflow: auto;
  border: 1px solid var(--ar-border);
  border-radius: 12px;
  max-height: 420px;
  background: var(--ar-surface);
}
.preview-table table { border-collapse: collapse; width: 100%; }
.preview-table th, .preview-table td {
  padding: .4rem .55rem;
  border-bottom: 1px solid var(--ar-border);
  border-right: 1px solid var(--ar-border);
  white-space: nowrap;
}
.preview-table th {
  position: sticky;
  top: 0;
  background: var(--ar-surface-2);
  font-weight: 700;
  color: var(--ar-navy);
}

/* ═══════════════════════════════════════════════════════════
   TAGS / EMPTY / MISC
═══════════════════════════════════════════════════════════ */
.tag {
  display: inline-block;
  padding: 2px 10px;
  background: var(--ar-surface-2);
  border: 1px solid var(--ar-border);
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  color: var(--ar-muted);
}
.tag-good { background: #ecfdf5; border-color: #bfe3c9; color: var(--ar-good); }
.tag-warn { background: #fffbeb; border-color: #f0d9a8; color: var(--ar-warn); }
.tag-bad  { background: #fef2f2; border-color: #f1c2c8; color: var(--ar-bad);  }

.empty {
  padding: 2.5rem 2rem;
  text-align: center;
  color: var(--ar-muted);
  border: 2px dashed var(--ar-border);
  border-radius: 16px;
  background: var(--ar-surface);
}

/* ═══════════════════════════════════════════════════════════
   COLUMN MAPPING UI (Payroll/Share import pages)
═══════════════════════════════════════════════════════════ */
.mapping-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 80px;
  gap: .6rem;
  align-items: center;
  margin-bottom: .35rem;
  padding: .25rem .5rem;
  border-radius: 8px;
}
.mapping-grid .head {
  font-size: .7rem;
  text-transform: uppercase;
  color: var(--ar-muted);
  font-weight: 700;
  letter-spacing: .06em;
}
.row-auto { background: #fffaeb; }

/* ═══════════════════════════════════════════════════════════
   PAYSLIP / CERTIFICATE PREVIEW PANELS
═══════════════════════════════════════════════════════════ */
.payslip-preview {
  background: var(--ar-surface);
  border: 1px solid var(--ar-border);
  border-radius: 12px;
  padding: 1.5rem;
  font-size: .9rem;
  box-shadow: var(--shadow);
}

.preview-stage {
  background: #e6e8eb;
  padding: 18px;
  border-radius: 12px;
  overflow: auto;
  border: 1px solid var(--ar-border);
}
.preview-sheet {
  background: #fff;
  box-shadow: 0 2px 12px rgba(15,23,42,.12), 0 0 0 1px #d4d6dc;
  margin: 0 auto;
  box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .ar-navbar { padding: 0 1rem; flex-wrap: wrap; height: auto; padding-top: .5rem; padding-bottom: .5rem; }
  .ar-nav-title { display: none; }
  .ar-nav-btn span { display: none; }
}
@media (max-width: 576px) {
  .ar-greeting-name { font-size: 1.6rem; }
  .ar-tiles-grid { grid-template-columns: 1fr; }
  .ar-tile-inner { min-height: 230px; }
  .ar-page-body { padding: 1.25rem 1rem 2.5rem; }
}

/* ═══════════════════════════════════════════════════════════
   Authentication
═══════════════════════════════════════════════════════════ */

.ar-nav-user {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-left: .5rem;
  padding-left: .75rem;
  border-left: 1px solid rgba(255,255,255,.18);
}
.ar-nav-user form { margin: 0; }
.ar-nav-user-name {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .7rem;
  border-radius: 10px;
  font-size: .82rem;
  font-weight: 600;
  color: rgba(255,255,255,.9) !important;
  text-decoration: none !important;
  white-space: nowrap;
}
.ar-nav-user-name i { font-size: 1rem; color: var(--ar-indigo-soft); }
.ar-nav-user-name:hover { background: rgba(255,255,255,.1); }
.ar-nav-signout i { color: #fca5a5; }
.ar-nav-signout:hover {
  background: rgba(185,28,28,.35);
  border-color: rgba(248,113,113,.55);
  box-shadow: 0 0 0 3px rgba(185,28,28,.2);
}

.ar-login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #172554 45%, #1e3a8a 100%);
  padding: 2rem 1rem;
}
.ar-login-wrap { width: 100%; max-width: 420px; }
.ar-login-card {
  background: var(--ar-surface);
  border: 1px solid var(--ar-border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 18px 50px rgba(2, 6, 23, .45);
}
.ar-login-brand {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin-bottom: 1.5rem;
}
.ar-login-logo {
  height: 46px;
  width: 46px;
  object-fit: contain;
}
.ar-login-title { margin: 0; font-size: 1.4rem; }
.ar-login-sub { margin: 0; color: var(--ar-muted); font-size: .85rem; }
.ar-login-submit { width: 100%; justify-content: center; margin-top: .25rem; }
.ar-login-foot {
  margin: 1.25rem 0 0;
  font-size: .78rem;
  color: var(--ar-muted);
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════
   Metrics, validation reports and gap flags
═══════════════════════════════════════════════════════════ */

.ar-stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
}
.ar-stat {
  background: var(--ar-surface);
  border: 1px solid var(--ar-border);
  border-left: 4px solid var(--ar-border-strong);
  border-radius: 12px;
  padding: .85rem 1rem;
  box-shadow: var(--shadow);
}
.ar-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ar-navy);
  letter-spacing: -.02em;
  line-height: 1.15;
}
.ar-stat-label {
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ar-muted);
  font-weight: 600;
  margin-top: .15rem;
}
.ar-stat--good { border-left-color: var(--ar-good); }
.ar-stat--good .ar-stat-value { color: var(--ar-good); }
.ar-stat--warn { border-left-color: var(--ar-warn); }
.ar-stat--warn .ar-stat-value { color: var(--ar-warn); }
.ar-stat--bad  { border-left-color: var(--ar-bad); }
.ar-stat--bad .ar-stat-value { color: var(--ar-bad); }

.ar-panel-bad  { border-color: #f1c2c8; background: #fffafa; }
.ar-panel-good { border-color: #bfe3c9; background: #fafffb; }

.ar-issue {
  border-radius: 10px;
  padding: .8rem 1rem;
  margin-bottom: .6rem;
  border: 1px solid var(--ar-border);
  background: var(--ar-surface);
}
.ar-issue--bad  { border-left: 4px solid var(--ar-bad); }
.ar-issue--warn { border-left: 4px solid var(--ar-warn); }
.ar-issue-head {
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: .35rem;
}
.ar-issue-fix {
  font-size: .84rem;
  color: var(--ar-text);
  background: var(--ar-surface-2);
  border-radius: 8px;
  padding: .5rem .7rem;
}
.ar-issue-list {
  margin: .5rem 0 0;
  padding-left: 1.1rem;
  font-size: .82rem;
  color: var(--ar-muted);
}
.ar-issue-loc {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .78rem;
  color: var(--ar-text);
}

/* Colour-coded employee rows — green complete, amber gaps, red broken. */
.ar-row--ok      { }
.ar-row--warning { background: #fffdf5; }
.ar-row--error   { background: #fff6f6; }
.ar-row--warning td:first-child { box-shadow: inset 3px 0 0 var(--ar-warn); }
.ar-row--error   td:first-child { box-shadow: inset 3px 0 0 var(--ar-bad); }

.ar-target-form { margin-bottom: .5rem; }

.ar-gap-summary {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

/* Batch progress */
.ar-progress-wrap { margin-top: 1rem; }
.ar-progress {
  height: 22px;
  background: var(--ar-surface-2);
  border: 1px solid var(--ar-border);
  border-radius: 999px;
  overflow: hidden;
}
.ar-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--ar-indigo) 0%, var(--ar-indigo-soft) 100%);
  transition: width .25s ease;
}
.ar-progress-text {
  font-size: .82rem;
  color: var(--ar-muted);
  margin-top: .4rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
