/**
 * resources/css/app.css
 * EudaMed Check Portal — Full Design System
 * Palette, typography, components, layouts, utilities.
 * Matches the uploaded index.html / login.cfm / register.cfm exactly.
 */

/* ── Google Fonts ─────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Outfit:wght@300;400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

/* ── Design tokens ───────────────────────────────────────────────────────── */
:root {
  --brand:       #9b5597;
  --brand-dark:  #6b3569;
  --brand-deep:  #3e1a3c;
  --brand-deeper:#280f27;
  --brand-mid:   #b872b4;
  --brand-light: #d4a0d2;
  --brand-pale:  #f5edf5;
  --brand-ghost: #fdf9fd;
  --white:       #ffffff;
  --ink:         #1c0f1b;
  --ink-mid:     #4e3a4d;
  --ink-soft:    #7d6a7c;
  --ink-muted:   #a894a7;
  --line:        #ede1ed;
  --gold:        #c9993a;
  --gold-pale:   #fdf4e3;
  --surface:     #fefcfe;
  --error:       #c0392b;
  --error-pale:  #fdf0f0;
  --success:     #27ae60;
  --success-pale:#f0faf4;
  --ease-out:    cubic-bezier(0.22,1,0.36,1);

  /* Nav height */
  --nav-h: 66px;

  /* Sidebar width */
  --sidebar-w: 240px;
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Outfit', sans-serif;
  background: var(--surface);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* ── Typography ──────────────────────────────────────────────────────────── */
h1,h2,h3,h4 { font-family: 'Cormorant Garamond', serif; font-weight: 700; line-height: 1.15; }
.serif   { font-family: 'Cormorant Garamond', serif; }
.mono    { font-family: 'DM Mono', monospace; }
.eyebrow {
  display: inline-block; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2.5px;
  color: var(--brand); margin-bottom: 12px;
}
.sec-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(24px, 3.5vw, 38px);
  font-weight: 700; color: var(--ink);
  letter-spacing: -.4px; margin-bottom: 10px;
}
.sec-sub {
  font-size: 15px; color: var(--ink-soft);
  line-height: 1.7; font-weight: 300;
}

/* ── Layout ──────────────────────────────────────────────────────────────── */
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 32px; }

/* App shell: nav + sidebar + main */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

.app-body {
  flex: 1;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  padding-top: var(--nav-h);
  min-height: calc(100vh - var(--nav-h));
}

.main-content {
  grid-column: 2;
  padding: 36px 40px;
  overflow-x: hidden;
  min-width: 0;
}

/* ── Top Navigation ──────────────────────────────────────────────────────── */
.app-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--nav-h);
  background: rgba(254,252,254,.96);
  backdrop-filter: blur(20px) saturate(1.8);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; }
.nav-logo  { height: 28px; width: auto; }
.nav-sigil {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.nav-sigil svg { width: 17px; height: 17px; }
.nav-wordmark { font-family: 'Cormorant Garamond', serif; font-size: 19px; font-weight: 700; color: var(--brand-dark); }
.nav-wordmark strong { color: var(--brand); }

.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-company-badge {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600;
  color: var(--ink-mid);
  background: var(--brand-pale);
  border: 1px solid var(--line);
  padding: 5px 12px; border-radius: 20px;
}
.nav-company-badge svg { width: 13px; height: 13px; color: var(--brand); }
.nav-user {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--ink-soft);
}
.nav-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--white);
  flex-shrink: 0;
}
.nav-logout {
  font-size: 13px; font-weight: 500; color: var(--ink-muted);
  padding: 5px 10px; border-radius: 7px;
  transition: color .2s, background .2s;
}
.nav-logout:hover { color: var(--error); background: var(--error-pale); }

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--brand-deeper);
  position: fixed;
  top: var(--nav-h);
  left: 0;
  bottom: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  z-index: 100;
  padding: 20px 0;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 2px; }

.sidebar-section { margin-bottom: 6px; }
.sidebar-label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .2em;
  color: rgba(255,255,255,.28);
  padding: 10px 20px 6px;
}
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 20px;
  font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,.58);
  border-radius: 0;
  transition: background .2s, color .2s;
  position: relative;
}
.sidebar-link svg { width: 16px; height: 16px; flex-shrink: 0; opacity: .7; }
.sidebar-link:hover {
  background: rgba(155,85,151,.18);
  color: rgba(255,255,255,.9);
}
.sidebar-link:hover svg { opacity: 1; }
.sidebar-link.active {
  background: rgba(155,85,151,.25);
  color: #ffffff;
  font-weight: 600;
}
.sidebar-link.active::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--brand-light);
  border-radius: 0 2px 2px 0;
}
.sidebar-link.active svg { opacity: 1; }
.sidebar-link.disabled {
  opacity: .38; cursor: not-allowed; pointer-events: none;
}
.sidebar-badge {
  margin-left: auto; font-size: 10px; font-weight: 700;
  background: var(--brand); color: var(--white);
  padding: 2px 6px; border-radius: 10px;
}
.sidebar-bottom {
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 16px 20px;
}
.sidebar-bottom p { font-size: 11px; color: rgba(255,255,255,.28); line-height: 1.5; }
.sidebar-bottom a { color: var(--brand-light); font-size: 11px; }

/* ── Page header ─────────────────────────────────────────────────────────── */
.page-header {
  display: flex; align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.page-header-left { }
.page-title { font-size: clamp(22px, 3vw, 30px); font-family: 'Cormorant Garamond', serif; font-weight: 700; color: var(--ink); letter-spacing: -.3px; }
.page-sub   { font-size: 14px; color: var(--ink-soft); margin-top: 4px; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Outfit', sans-serif; font-size: 14px; font-weight: 600;
  padding: 10px 20px; border-radius: 8px; border: none;
  cursor: pointer; transition: background .2s, transform .18s, box-shadow .2s;
  white-space: nowrap; text-decoration: none;
}
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none !important; }

.btn-primary {
  background: var(--brand); color: var(--white);
  box-shadow: 0 3px 14px rgba(155,85,151,.28);
}
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(155,85,151,.34); }

.btn-outline {
  background: transparent; color: var(--brand);
  border: 1.5px solid var(--brand);
}
.btn-outline:hover { background: var(--brand); color: var(--white); }

.btn-ghost {
  background: var(--brand-pale); color: var(--brand);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover { background: var(--brand); color: var(--white); }

.btn-danger {
  background: var(--error-pale); color: var(--error);
  border: 1.5px solid rgba(192,57,43,.2);
}
.btn-danger:hover { background: var(--error); color: var(--white); }

.btn-sm { font-size: 12px; padding: 6px 12px; }
.btn-lg { font-size: 16px; padding: 13px 28px; border-radius: 10px; }

.btn-icon {
  width: 34px; height: 34px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
}
.btn-icon svg { width: 16px; height: 16px; }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.card-header {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.card-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.card-body  { padding: 22px; }
.card-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: var(--brand-ghost);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
}

/* ── Service cards (dashboard) ───────────────────────────────────────────── */
.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}
.service-card {
  position: relative;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 26px;
  transition: transform .3s var(--ease-out), box-shadow .3s, border-color .3s;
  display: flex; flex-direction: column;
}
.service-card.active {
  border-color: var(--brand-light);
  box-shadow: 0 8px 32px rgba(107,53,105,.1);
}
.service-card.active:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(107,53,105,.15);
}
.service-card.inactive {
  opacity: .65;
}
.service-card-bar {
  height: 3px;
  background: linear-gradient(90deg, var(--brand-dark), var(--brand));
  border-radius: 2px;
  margin-bottom: 18px;
}
.service-card-bar.gold {
  background: linear-gradient(90deg, #a0742a, var(--gold));
}
.service-num {
  font-family: 'DM Mono', monospace; font-size: 10px;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--brand); margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}
.service-num::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}
.service-card-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--brand-pale);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  transition: transform .3s var(--ease-out);
}
.service-card.active:hover .service-card-icon { transform: rotate(-5deg) scale(1.1); }
.service-card-icon svg { width: 22px; height: 22px; }
.service-card-icon.gold { background: var(--gold-pale); }
.service-card-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px; font-weight: 700; color: var(--ink);
  margin-bottom: 6px; line-height: 1.2;
}
.service-card-desc {
  font-size: 13px; color: var(--ink-soft); line-height: 1.6;
  margin-bottom: 18px; flex: 1;
}
.service-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  margin-top: auto;
}
.service-card-badge {
  font-family: 'DM Mono', monospace; font-size: 11px;
  padding: 3px 9px; border-radius: 4px;
  background: var(--brand-pale); color: var(--brand);
  border: 1px solid var(--line);
}
.service-card-badge.inactive {
  background: #f4f4f4; color: var(--ink-muted); border-color: #e8e8e8;
}
.service-card-badge.gold {
  background: var(--gold-pale); color: #8a6510; border-color: #e5d090;
}

/* ── Stats strip ─────────────────────────────────────────────────────────── */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 4px;
}
.stat-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-muted); }
.stat-value { font-family: 'Cormorant Garamond', serif; font-size: 28px; font-weight: 700; color: var(--ink); }
.stat-meta  { font-size: 12px; color: var(--ink-soft); }

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  background: var(--brand-ghost);
  color: var(--ink-mid); font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: .1em;
  padding: 10px 14px; text-align: left;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
tbody td { padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--ink-mid); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--brand-ghost); }
.td-mono { font-family: 'DM Mono', monospace; font-size: 12px; color: var(--brand-dark); }

/* ── Form elements ───────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--ink-mid); }
.field-label .req { color: var(--brand); margin-left: 3px; }
.field-label .opt { color: var(--ink-muted); font-weight: 400; font-size: 12px; margin-left: 4px; }
.field-input,
.field-select,
.field-textarea {
  width: 100%; padding: 10px 13px;
  border-radius: 8px; border: 1.5px solid var(--line);
  background: var(--white); font-size: 14px;
  font-family: 'Outfit', sans-serif; color: var(--ink);
  transition: border-color .2s, box-shadow .2s; outline: none;
  -webkit-appearance: none;
}
.field-input:focus,
.field-select:focus,
.field-textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(155,85,151,.1);
}
.field-input.err { border-color: var(--error); }
.field-err  { font-size: 12px; color: var(--error); display: none; }
.field-err.show { display: block; }
.field-hint { font-size: 12px; color: var(--ink-muted); }
.field-textarea { min-height: 90px; resize: vertical; }
.field-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237d6a7c' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
  padding-right: 36px;
}

/* Section divider inside forms */
.form-section { margin-bottom: 24px; }
.form-section-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .18em; color: var(--brand);
  padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 18px;
}
.form-section-label svg { width: 14px; height: 14px; }

/* Password wrapper */
.pw-wrap { position: relative; }
.pw-wrap .field-input { padding-right: 42px; }
.pw-toggle {
  position: absolute; right: 11px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--ink-muted); line-height: 0; padding: 4px;
}
.pw-toggle:hover { color: var(--brand); }
.pw-toggle svg { width: 17px; height: 17px; }

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.alert {
  display: none; align-items: flex-start; gap: 10px;
  padding: 12px 16px; border-radius: 9px; font-size: 14px;
  margin-bottom: 18px;
}
.alert.show { display: flex; }
.alert svg  { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: var(--success-pale); border: 1px solid #a8d5b5; color: #1a5c32; }
.alert-error   { background: var(--error-pale);   border: 1px solid #f0a8a8; color: #7a1f1f; }
.alert-info    { background: var(--brand-pale);   border: 1px solid var(--brand-light); color: var(--brand-dark); }
.alert-warn    { background: var(--gold-pale);    border: 1px solid #e5d090; color: #7a5a10; }

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 20px; }
.badge-active   { background: #eafaf1; color: #1a7a45; }
.badge-inactive { background: #f4f4f4; color: #888; }
.badge-pending  { background: var(--gold-pale); color: #8a6510; }
.badge-error    { background: var(--error-pale); color: var(--error); }
.badge-brand    { background: var(--brand-pale); color: var(--brand); }

/* ── Upload area ─────────────────────────────────────────────────────────── */
.upload-area {
  border: 2px dashed var(--line);
  border-radius: 12px;
  padding: 36px 24px;
  text-align: center;
  background: var(--brand-ghost);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.upload-area:hover,
.upload-area.drag-over {
  border-color: var(--brand);
  background: var(--brand-pale);
}
.upload-area svg { width: 36px; height: 36px; color: var(--brand-light); margin: 0 auto 12px; }
.upload-area p   { font-size: 14px; color: var(--ink-soft); }
.upload-area strong { color: var(--brand); }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 500;
  background: rgba(28,15,27,.45);
  align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white);
  border-radius: 18px;
  width: 100%; max-width: 760px;
  max-height: 85vh;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,.2);
  animation: modalIn .25s var(--ease-out);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(.96) translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 17px; font-weight: 700; color: var(--ink); font-family: 'Cormorant Garamond', serif; }
.modal-close {
  width: 32px; height: 32px; border-radius: 7px;
  background: var(--brand-pale); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft); transition: background .2s, color .2s;
}
.modal-close:hover { background: var(--brand); color: var(--white); }
.modal-close svg { width: 16px; height: 16px; }
.modal-body { padding: 20px 24px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: flex-end;
  gap: 10px;
}

/* ── Spinner ─────────────────────────────────────────────────────────────── */
.spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff; border-radius: 50%;
  animation: spin .7s linear infinite;
}
.spinner-dark {
  border-color: rgba(155,85,151,.25);
  border-top-color: var(--brand);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Download row ────────────────────────────────────────────────────────── */
.dl-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.dl-row:last-child { border-bottom: none; }
.dl-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.dl-icon.pdf  { background: #fff0f0; }
.dl-icon.json { background: #f0f4ff; }
.dl-icon svg  { width: 18px; height: 18px; }
.dl-info { flex: 1; min-width: 0; }
.dl-label { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-meta  { font-size: 12px; color: var(--ink-muted); }
.dl-actions { display: flex; gap: 6px; }

/* ── Verify badge (public authenticate page) ─────────────────────────────── */
.verify-banner {
  background: var(--brand-deeper);
  padding: 32px;
  border-radius: 18px 18px 0 0;
  text-align: center;
  position: relative; overflow: hidden;
}
.verify-banner::before {
  content: ''; position: absolute;
  top: -40px; right: -40px;
  width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(155,85,151,.35) 0%, transparent 70%);
}
.verify-result {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 18px 18px;
  padding: 28px 32px;
}
.verify-check {
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.verify-check.valid   { background: #eafaf1; }
.verify-check.invalid { background: var(--error-pale); }
.verify-check svg { width: 32px; height: 32px; }

/* ── Auth layout (login / register) ─────────────────────────────────────── */
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
.auth-brand-panel {
  background: var(--brand-deeper);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  justify-content: space-between;
  padding: 48px 44px;
}
.auth-form-panel {
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  padding: 48px 52px; overflow-y: auto;
}
.auth-form-wrap { width: 100%; max-width: 420px; }

/* ── Pagination ──────────────────────────────────────────────────────────── */
.pagination {
  display: flex; align-items: center; gap: 4px;
  margin-top: 20px; flex-wrap: wrap;
}
.page-btn {
  min-width: 34px; height: 34px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 7px; font-size: 13px; font-weight: 500;
  color: var(--ink-mid); background: var(--white);
  border: 1px solid var(--line);
  cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.page-btn:hover, .page-btn.active {
  background: var(--brand); color: var(--white); border-color: var(--brand);
}

/* ── Admin specific ──────────────────────────────────────────────────────── */
.admin-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  margin-bottom: 20px;
}
.admin-search {
  display: flex; align-items: center; gap: 8px;
  flex: 1; max-width: 340px;
}
.admin-search svg { width: 16px; height: 16px; color: var(--ink-muted); flex-shrink: 0; }
.admin-search .field-input { margin-bottom: 0; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .service-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-brand-panel { display: none; }
  .auth-form-panel { padding: 40px 24px; }
  .app-body { grid-template-columns: 1fr; }
  .sidebar  { display: none; }
  .main-content { padding: 24px 20px; }
}
@media (max-width: 640px) {
  .field-row { grid-template-columns: 1fr; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .app-nav { padding: 0 16px; }
  .wrap { padding: 0 16px; }
}

/* ── Utilities ───────────────────────────────────────────────────────────── */
.text-brand  { color: var(--brand); }
.text-muted  { color: var(--ink-muted); }
.text-error  { color: var(--error); }
.text-success{ color: var(--success); }
.text-right  { text-align: right; }
.text-center { text-align: center; }
.fw-600      { font-weight: 600; }
.fw-700      { font-weight: 700; }
.mb-0  { margin-bottom: 0; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.flex  { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: 8px; }
.gap-12{ gap: 12px; }
.flex-1{ flex: 1; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
