/* design-system.css
 * CapstCheck centralized design system — tokens + shared components.
 * Load this before every page-specific stylesheet. Page stylesheets should
 * only contain page-unique layout, not redefine buttons/cards/badges/etc.
 */

@import url("https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,500;0,8..60,600;0,8..60,700;1,8..60,600&family=Source+Sans+3:wght@400;500;600;700;800&display=swap");

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  line-height: var(--line-normal, 1.5);
}

:root {
  /* Colors — "Academic" direction: warm paper-like neutrals around the
     official BatStateU red. Calm and document-like; restraint over
     decoration, so the red is spent only on actions and state. */
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-sunken: #faf9f7;
  --border: #e6e3dd;
  --border-hi: rgba(210, 35, 42, 0.28);
  --navy: #2a2623;
  --accent: #d2232a;
  --accent-hover: #a81c22;
  --accent-light: rgba(210, 35, 42, 0.08);
  --text: #211e1b;
  --muted: #6d6860;
  --muted-2: #9b958c;

  --red: #7a1f2b;
  --red-bg: rgba(122, 31, 43, 0.07);
  --red-border: rgba(122, 31, 43, 0.25);
  --green: #16a34a;
  --green-bg: rgba(22, 163, 74, 0.07);
  --green-border: rgba(22, 163, 74, 0.22);
  --orange: #d97706;
  --orange-bg: rgba(217, 119, 6, 0.07);
  --orange-border: rgba(217, 119, 6, 0.22);
  --blue-info: #2563eb;
  --blue-info-bg: rgba(37, 99, 235, 0.07);
  --blue-info-border: rgba(37, 99, 235, 0.22);

  /* Type — serif display for headings and figures, humanist sans for UI.
     --font-mono is the utility face for labels/captions; it was a true
     monospace once, and nothing relies on fixed-width glyphs. */
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-hero: "Source Serif 4", Georgia, "Times New Roman", serif;

  /* Spacing scale — strict 8px rhythm. --space-micro is the one deliberate
     exception, reserved for inline/micro details (badge padding, icon-to-text
     gaps) that would look oversized on the 8px grid — never used for layout. */
  --space-micro: 4px;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  /* Had been commented out while still referenced 28 times across 12
     stylesheets; an undefined var() inside a shorthand invalidates the
     whole declaration, so every one of those paddings/margins was silently
     collapsing to zero (modal headers, empty states, page containers...). */
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;

  /* Typography rhythm */
  --line-tight: 1.25;
  --line-normal: 1.5;
  --line-relaxed: 1.7;

  /* Page-container width tiers */
  --container-narrow: 680px;
  --container-md: 900px;
  /* --container-lg: 1100px; */
  --container-xl: 1300px;

  /* Radius scale — tight corners, closer to paper than to app chrome */
  --radius-sm: 3px;
  --radius-md: 4px;
  --radius-lg: 6px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(33, 30, 27, 0.05);
  --shadow-md: 0 10px 28px rgba(33, 30, 27, 0.1);

  --canvas-pattern: none;
  --card-border-color: var(--border);

  /* Light sidebar; the active item is marked by a red rule on its left edge */
  --sidebar-bg: #ffffff;
  --sidebar-border: var(--border);
  --sidebar-fg: #5b5650;
  --sidebar-fg-strong: var(--text);
  --sidebar-fg-muted: var(--muted-2);
  --sidebar-hover-bg: var(--bg);
  --sidebar-active-bg: rgba(210, 35, 42, 0.06);
  --sidebar-active-fg: #b81f25;
  --sidebar-active-icon: var(--accent);
  --sidebar-mark-bg: var(--accent);
}

/* Inline SVG icons (controller/icons.php) sit on the text baseline and
   inherit colour from their container. */
.ic {
  display: block;
  flex-shrink: 0;
}

/* ==========================================================================
   Base
   ========================================================================== */

.ds-scope,
body {
  font-family: var(--font-body);
  color: var(--text);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--text);
  margin: 0;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: var(--line-tight);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s,
    transform 0.1s,
    box-shadow 0.15s;
  white-space: nowrap;
}
.btn:active {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-sm {
  padding: var(--space-micro) var(--space-1);
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}
.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover {
  border-color: var(--border-hi);
  background: var(--accent-light);
}

.btn-danger {
  background: var(--surface);
  color: var(--red);
  border-color: var(--red-border);
}
.btn-danger:hover {
  background: var(--red-bg);
}

.btn-success {
  background: var(--green);
  color: #fff;
}
.btn-success:hover {
  filter: brightness(0.94);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--accent-light);
  color: var(--accent);
}

/* Soft/tinted variants — for lower-emphasis inline actions (accept/decline
   invites, invite buttons) alongside a solid primary action */
.btn-soft-success {
  background: var(--green-bg);
  color: var(--green);
  border-color: var(--green-border);
}
.btn-soft-success:hover {
  background: rgba(22, 163, 74, 0.14);
}
.btn-soft-danger {
  background: var(--red-bg);
  color: var(--red);
  border-color: var(--red-border);
}
.btn-soft-danger:hover {
  background: rgba(214, 48, 69, 0.12);
}
.btn-soft-info {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--border-hi);
}
.btn-soft-info:hover {
  background: rgba(210, 35, 42, 0.14);
}

/* ==========================================================================
   Form fields
   ========================================================================== */

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-micro);
  margin-bottom: var(--space-2);
}
.field > label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
}

.input,
select.select,
textarea.input {
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: var(--line-tight);
  color: var(--text);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--surface);
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  width: 100%;
}
.input::placeholder {
  color: var(--muted);
  opacity: 0.8;
}
.input:focus,
select.select:focus,
textarea.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(210, 35, 42, 0.1);
}
textarea.input {
  resize: vertical;
  min-height: 90px;
  line-height: var(--line-normal);
}

.password-field {
  position: relative;
}
.password-field .input {
  padding-right: 40px;
}
.password-toggle {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: var(--radius-md);
  padding: 0;
}
.password-toggle:hover {
  color: var(--text);
  background: var(--accent-light);
}
.password-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.password-toggle svg {
  width: 18px;
  height: 18px;
}
.password-toggle .icon-eye-off {
  display: none;
}
.password-toggle.is-visible .icon-eye {
  display: none;
}
.password-toggle.is-visible .icon-eye-off {
  display: block;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
  background: var(--surface);
  border: 1.5px solid var(--card-border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  box-shadow: var(--shadow-sm);
  /* Grid/flex items default to min-width:auto, which lets an oversized
     child (e.g. a wide .table) force the whole card — and the page along
     with it — wider than the viewport instead of scrolling internally via
     .table-wrap's own overflow-x. This override makes shrinking possible
     wherever a .card lives inside a grid or flex container. */
  min-width: 0;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1);
  margin-bottom: var(--space-2);
}
.card-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

/* BEM-style content-card header (title + optional "view all" link) */
.card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-3);
}
.card__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.2px;
}
.card__link {
  font-size: 0.72rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
  transition: color 0.2s;
}
.card__link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Stat card — a plain figure with a tinted icon tile carrying its colour */
.stat-card {
  background: var(--surface);
  border: 1.5px solid var(--card-border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-micro);
  position: relative;
  overflow: hidden;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.stat-card:hover {
  border-color: var(--border-hi);
  box-shadow: var(--shadow-md);
}
/* One colour per card, set once; the icon tile reads it. */
.stat-card { --stat-color: var(--accent); }
.stat-card--blue   { --stat-color: var(--accent); }
.stat-card--green  { --stat-color: var(--green); }
.stat-card--red    { --stat-color: var(--red); }
.stat-card--orange { --stat-color: var(--orange); }
.stat-card--navy   { --stat-color: var(--navy); }
.stat-card--info   { --stat-color: var(--blue-info); }

.stat-card__label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: var(--font-mono);
  position: relative;
  z-index: 1;
  padding-right: 34px;
}
.stat-card__value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
  position: relative;
  z-index: 1;
}
.stat-card__sub {
  font-size: 0.72rem;
  color: var(--muted-2);
  font-family: var(--font-mono);
  position: relative;
  z-index: 1;
}
.stat-card__icon {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--stat-color);
  background: color-mix(in srgb, var(--stat-color) 11%, transparent);
  z-index: 1;
}

/* ==========================================================================
   Tables
   ========================================================================== */

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

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
}
.table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: var(--space-1) var(--space-2);
  background: var(--surface-sunken);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td {
  padding: var(--space-2);
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.table tbody tr:hover {
  background: var(--accent-light);
}

/* ==========================================================================
   Badges / status pills
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  line-height: var(--line-tight);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: var(--space-micro) var(--space-1);
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.badge-success {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green-border);
}
.badge-warning {
  background: var(--orange-bg);
  color: var(--orange);
  border: 1px solid var(--orange-border);
}
.badge-danger {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red-border);
}
.badge-info {
  background: var(--blue-info-bg);
  color: var(--blue-info);
  border: 1px solid var(--blue-info-border);
}
.badge-neutral {
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--border);
}

/* ==========================================================================
   Empty states — shared icon + message pattern, previously only defined
   locally for "My Group" (.cg-empty-state) while other empty panels
   (Dashboard's Notifications/Submission History, Feedback, For Review) just
   went blank with no visual treatment at all.
   ========================================================================== */

.empty-state {
  text-align: center;
  padding: var(--space-6) var(--space-2) var(--space-4);
}
.empty-state__icon {
  font-size: 2.2rem;
  margin-bottom: var(--space-2);
  display: block;
}
.empty-state__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-1);
}
.empty-state__sub {
  font-size: 0.8rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

/* ==========================================================================
   Alerts
   ========================================================================== */

.alert {
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  border: 1.5px solid transparent;
  display: flex;
  align-items: flex-start;
  gap: var(--space-1);
}
.alert-success {
  background: var(--green-bg);
  border-color: var(--green-border);
  color: #0f5c2c;
}
.alert-error {
  background: var(--red-bg);
  border-color: var(--red-border);
  color: #8c1a29;
}
.alert-warning {
  background: var(--orange-bg);
  border-color: var(--orange-border);
  color: #7c4a06;
}
.alert-info {
  background: var(--blue-info-bg);
  border-color: var(--blue-info-border);
  color: var(--blue-info);
}

/* ==========================================================================
   Modal
   ========================================================================== */

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 20, 0.45);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(2px);
}
.modal-backdrop.is-open {
  display: flex;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 640px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-4) var(--space-2);
  border-bottom: 1.5px solid var(--border);
  flex-shrink: 0;
}
.modal-header h3 {
  font-size: 1rem;
  font-weight: 600;
}
.modal-body {
  overflow-y: auto;
  padding: var(--space-3) var(--space-4);
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-4);
  border-top: 1.5px solid var(--border);
  flex-shrink: 0;
}
.modal-close {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  flex-shrink: 0;
}
.modal-close:hover {
  background: var(--red-bg);
  border-color: var(--red-border);
  color: var(--red);
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pagination button {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  cursor: pointer;
}
.pagination button:hover {
  border-color: var(--border-hi);
  background: var(--accent-light);
}
.pagination button[aria-current="page"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ==========================================================================
   Loading overlay (used by login, register, index — kept as #overlay /
   .active for zero JS-hook risk, since login.js / register.js / index.js
   toggle it via getElementById + classList)
   ========================================================================== */

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: var(--bg);
  z-index: 999;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
}
.overlay.active {
  display: flex;
}
.dots {
  display: flex;
  gap: 10px;
}
.dots span {
  width: 10px;
  height: 10px;
  background-color: var(--accent);
  border-radius: 50%;
  animation: ds-bounce 0.6s infinite alternate;
}
.dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.dots span:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes ds-bounce {
  from {
    transform: translateY(0);
    opacity: 0.3;
  }
  to {
    transform: translateY(-10px);
    opacity: 1;
  }
}
#loading-text {
  color: var(--muted);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ==========================================================================
   Auth shell — split-panel layout shared by login.php / register.php
   ========================================================================== */

.auth-shell {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-left {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-5);
  background: var(--navy);
  overflow: hidden;
}
/* A single red margin rule, like the margin guide on a manuscript page —
   the one decoration on the panel, and specific to what the tool checks. */
.auth-left::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 28px;
  width: 1px;
  background: rgba(210, 35, 42, 0.6);
  pointer-events: none;
}
.auth-left-top {
  position: relative;
  z-index: 1;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-bottom: var(--space-6);
}
.brand-icon {
  width: 40px;
  height: 40px;
  background: var(--accent);
  border-radius: 22%; /* same corner as the logo tile */
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}
.brand-sub {
  font-size: 0.66rem;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 2px;
}

.auth-headline {
  position: relative;
  z-index: 1;
}
.auth-headline h1 {
  font-family: var(--font-hero);
  font-size: 2.8rem;
  font-weight: 600;
  line-height: 1.12;
  color: #fff;
  letter-spacing: -0.5px;
  margin-bottom: var(--space-2);
}
.auth-headline h1 span {
  color: #ff8a8a;
  font-style: italic;
}
.auth-headline p {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.75;
  max-width: 320px;
}

.auth-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  background: var(--bg);
  position: relative;
  overflow-y: auto;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  position: relative;
  z-index: 1;
  padding: var(--space-3) 0;
}

.portal-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--accent-light);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius-pill);
  padding: var(--space-micro) var(--space-2) var(--space-micro) var(--space-1);
  margin-bottom: var(--space-2);
}
.portal-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: ds-pulse 2s infinite;
}
@keyframes ds-pulse {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(210, 35, 42, 0.35);
  }
  50% {
    opacity: 0.7;
    box-shadow: 0 0 0 5px rgba(210, 35, 42, 0);
  }
}
.portal-badge-text {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 500;
}

.auth-card .card-header {
  display: block;
  margin-bottom: var(--space-4);
}
.auth-card .card-header h2 {
  font-size: 1.9rem;
  font-weight: 600;
  letter-spacing: -0.4px;
  margin-bottom: 6px;
}
.auth-card .card-header p {
  font-size: 0.85rem;
  color: var(--muted);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin: var(--space-2) 0;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-divider span {
  font-size: 0.68rem;
  color: var(--muted-2);
  font-family: var(--font-mono);
}

.auth-back-link {
  display: block;
  text-align: center;
  margin-top: var(--space-3);
  font-size: 0.75rem;
  color: var(--muted-2);
  text-decoration: none;
  font-family: var(--font-mono);
  transition: color 0.2s;
}
.auth-back-link:hover {
  color: var(--accent);
}

.auth-forgot-link {
  align-self: flex-end;
  font-size: 0.75rem;
  color: var(--accent);
  text-decoration: none;
  margin-top: -2px;
}
.auth-forgot-link:hover {
  text-decoration: underline;
}

.fp-intro {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: var(--line-normal);
  margin-bottom: var(--space-2);
}

@media (max-width: 768px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }
  .auth-left {
    display: none;
  }
  .auth-right {
    padding: var(--space-2) var(--space-1);
  }
}

/* ==========================================================================
   Responsive helpers
   ========================================================================== */

@media (max-width: 768px) {
  .card,
  .modal {
    border-radius: var(--radius-md);
  }
}

@media (max-width: 480px) {
  /* Shared modal footer (Cancel + a primary action, used by every
     confirm/form modal) — stack full-width instead of squeezing two
     buttons onto one row on a narrow phone. */
  .modal-footer {
    flex-direction: column-reverse;
  }
  .modal-footer .btn {
    width: 100%;
  }
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.is-hidden {
  display: none;
}

.js-inline-error {
  color: #dc2626;
  font-size: 0.875rem;
  padding: var(--space-2) 0;
}

/* The name as the logo writes it: "Capst" in ink, "Check" in the brand red
   (lifted on the dark login panel so it keeps its contrast there). */
.brand-accent { color: var(--accent); }
.auth-left .brand-accent { color: #f0545a; }
