/* ======================================================
   UPDATE: assets/app.css
   Updated: 2026-03-21
   UPDATE NOTE:
   - Premium facility portal polish pass
   - Added elevated action-card, stat-card, empty-state, page-hero and icon-chip styles
   - Added stronger table/badge/form polish for enterprise feel
   - Added compact visual hierarchy helpers without changing header/footer
   - Kept existing responsive behaviour and safety overrides intact
====================================================== */

/* ======================================================
   OUTRIGHT PORTAL — assets/app.css
   PREMIUM RESPONSIVE FOUNDATION
====================================================== */

/* ======================================================
   TOKENS / DESIGN SYSTEM
====================================================== */
:root{
  --pagebg:#edf6fd;
  --pagebg-soft:#f7fbff;
  --brand:#17285c;
  --brand-2:#203574;
  --brand-3:#2d5be3;
  --brand-4:#3b82f6;
  --text:#0f1b3d;
  --text-soft:#334155;
  --muted:#64748b;
  --muted-2:#94a3b8;

  --card:#ffffff;
  --card-soft:#fbfdff;
  --border:rgba(23,40,92,.10);
  --border-strong:rgba(23,40,92,.16);

  --shadow-xs:0 2px 8px rgba(2,8,23,.035);
  --shadow-sm:0 6px 16px rgba(2,8,23,.045);
  --shadow-md:0 10px 24px rgba(2,8,23,.075);
  --shadow-lg:0 18px 44px rgba(2,8,23,.12);

  --radius-sm:12px;
  --radius-md:16px;
  --radius-lg:20px;
  --radius-xl:24px;
  --radius-pill:999px;

  --danger:#ef4444;
  --danger-bg:#fef2f2;
  --danger-border:#fca5a5;
  --danger-text:#991b1b;

  --ok:#16a34a;
  --ok-bg:#ecfdf5;
  --ok-border:#86efac;
  --ok-text:#166534;

  --warn:#f59e0b;
  --warn-bg:#fffbeb;
  --warn-border:#fcd34d;
  --warn-text:#92400e;

  --info:#2d5be3;
  --info-bg:#eff6ff;
  --info-border:#93c5fd;
  --info-text:#1d4ed8;

  --neutral:#64748b;
  --neutral-bg:#f8fafc;
  --neutral-border:#cbd5e1;
  --neutral-text:#334155;

  --input-bg:#ffffff;
  --input-border:rgba(23,40,92,.14);
  --input-border-focus:rgba(45,91,227,.42);
  --input-shadow-focus:0 0 0 4px rgba(45,91,227,.10);

  --space-1:4px;
  --space-2:8px;
  --space-3:12px;
  --space-4:16px;
  --space-5:20px;
  --space-6:24px;
  --space-7:28px;
  --space-8:32px;
  --space-9:40px;
  --space-10:48px;

  --content-max:1180px;
  --content-wide:1400px;
  --content-narrow:900px;
}

/* ======================================================
   GLOBAL RESET / BASE
====================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body{
  height:100%;
  max-width:100%;
  overflow-x:hidden;
}

html{
  -webkit-text-size-adjust:100%;
  scroll-behavior:smooth;
}

body{
  margin:0;
  min-height:100vh;
  background:
    radial-gradient(circle at top left, rgba(45,91,227,.045), transparent 24%),
    linear-gradient(180deg, var(--pagebg) 0%, var(--pagebg-soft) 100%);
  color:var(--text);
  font-family:system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  line-height:1.45;
  text-rendering:optimizeLegibility;
}

/* ======================================================
   TYPOGRAPHY
====================================================== */
h1,h2,h3,h4,h5,h6{
  margin:0 0 8px;
  color:var(--brand);
  line-height:1.12;
  letter-spacing:-.02em;
}

h1{
  font-size:clamp(28px, 4vw, 40px);
  font-weight:1000;
}

h2{
  font-size:clamp(22px, 2.8vw, 30px);
  font-weight:1000;
}

h3{
  font-size:clamp(18px, 2vw, 22px);
  font-weight:1000;
}

h4{
  font-size:16px;
  font-weight:900;
}

p{
  margin:0 0 10px;
}

small{
  color:var(--muted);
}

a{
  color:var(--brand-3);
  text-decoration:none;
}

a:hover{
  text-decoration:none;
}

hr{
  border:none;
  border-top:1px solid var(--border);
  margin:18px 0;
}

/* ======================================================
   PAGE WRAPPERS
====================================================== */
.wrap{
  width:100%;
  max-width:var(--content-max);
  margin:16px auto;
  padding:0 16px 22px;
}

.wrap.wide,
.wrap.dashwide{
  max-width:var(--content-wide);
}

.wrap.narrow{
  max-width:var(--content-narrow);
}

.page-hero{
  position:relative;
  margin-bottom:16px;
  padding:18px 20px;
  border:1px solid rgba(23,40,92,.08);
  border-radius:22px;
  background:
    radial-gradient(circle at top right, rgba(59,130,246,.11), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,.96) 0%, rgba(251,253,255,.98) 100%);
  box-shadow:var(--shadow-sm);
  overflow:hidden;
}

.page-hero::after{
  content:"";
  position:absolute;
  inset:auto -40px -50px auto;
  width:160px;
  height:160px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(45,91,227,.08), transparent 66%);
  pointer-events:none;
}

.page-hero > *{
  position:relative;
  z-index:1;
}

.page-hero.compact{
  padding:16px 18px;
}

/* ======================================================
   SURFACES / CARDS
====================================================== */
.card,
.surface,
.panel{
  width:100%;
  max-width:100%;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  padding:16px;
  box-shadow:var(--shadow-sm);
  overflow:hidden;
}

.card.soft,
.surface.soft{
  background:var(--card-soft);
}

.card.flat,
.surface.flat{
  box-shadow:none;
}

.card.tight{
  padding:12px;
}

.card.lg{
  padding:22px;
  border-radius:var(--radius-lg);
}

.section-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:12px;
}

.section-kicker{
  font-size:11px;
  font-weight:1000;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--muted);
  margin-bottom:5px;
}

.section-note{
  font-size:12px;
  color:var(--muted);
  line-height:1.35;
}

.icon-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:42px;
  height:42px;
  border-radius:14px;
  background:linear-gradient(180deg, rgba(45,91,227,.12), rgba(23,40,92,.07));
  border:1px solid rgba(45,91,227,.12);
  color:var(--brand);
  font-size:18px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.5);
}

.icon-chip.sm{
  width:34px;
  height:34px;
  border-radius:12px;
  font-size:15px;
}

.icon-chip.green{
  background:linear-gradient(180deg, rgba(34,197,94,.12), rgba(34,197,94,.06));
  border-color:rgba(34,197,94,.16);
  color:var(--ok-text);
}

.icon-chip.amber{
  background:linear-gradient(180deg, rgba(245,158,11,.14), rgba(245,158,11,.06));
  border-color:rgba(245,158,11,.18);
  color:var(--warn-text);
}

.icon-chip.red{
  background:linear-gradient(180deg, rgba(239,68,68,.13), rgba(239,68,68,.06));
  border-color:rgba(239,68,68,.16);
  color:var(--danger-text);
}

/* ======================================================
   LAYOUT HELPERS
====================================================== */
.row{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.row > *{
  min-width:0;
}

.col{
  flex:1 1 220px;
  min-width:220px;
}

.col-sm{ flex:1 1 180px; min-width:180px; }
.col-md{ flex:1 1 260px; min-width:260px; }
.col-lg{ flex:1 1 320px; min-width:320px; }

.grid{
  display:grid;
  grid-template-columns:repeat(12, minmax(0, 1fr));
  gap:12px;
  min-width:0;
}

.grid2{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
  min-width:0;
}

.grid3{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:12px;
  min-width:0;
}

.grid4{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:12px;
  min-width:0;
}

.g3{ grid-column:span 3; }
.g4{ grid-column:span 4; }
.g5{ grid-column:span 5; }
.g6{ grid-column:span 6; }
.g7{ grid-column:span 7; }
.g8{ grid-column:span 8; }
.g9{ grid-column:span 9; }
.g12{ grid-column:span 12; }

.stack-xs > * + *{ margin-top:6px; }
.stack-sm > * + *{ margin-top:9px; }
.stack-md > * + *{ margin-top:12px; }
.stack-lg > * + *{ margin-top:16px; }

/* ======================================================
   ACTION CARDS / PREMIUM QUICK LINKS
====================================================== */
.action-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:12px;
}

.action-card{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:16px;
  border:1px solid var(--border);
  border-radius:18px;
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow:var(--shadow-xs);
  color:inherit;
  min-height:124px;
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;
  position:relative;
  overflow:hidden;
}

.action-card::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:3px;
  background:linear-gradient(90deg, var(--brand-3), var(--brand));
  opacity:.9;
}

.action-card:hover{
  transform:translateY(-2px);
  box-shadow:var(--shadow-md);
  border-color:rgba(23,40,92,.16);
}

.action-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}

.action-card-title{
  font-size:15px;
  font-weight:1000;
  color:var(--brand);
  line-height:1.15;
}

.action-card-text{
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
}

.action-card-arrow{
  margin-top:auto;
  color:var(--brand-3);
  font-size:13px;
  font-weight:900;
}

/* ======================================================
   METRIC / KPI / STAT CARDS
====================================================== */
.kpi,
.metric,
.stat-card{
  border:1px solid var(--border);
  border-radius:18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(250,252,255,1) 100%);
  padding:15px;
  min-height:118px;
  position:relative;
  overflow:hidden;
  transition:transform .14s ease, box-shadow .14s ease, border-color .14s ease;
  box-shadow:var(--shadow-xs);
}

.kpi::after,
.metric::after,
.stat-card::after{
  content:"";
  position:absolute;
  right:-24px;
  bottom:-32px;
  width:94px;
  height:94px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(45,91,227,.08), transparent 68%);
  pointer-events:none;
}

.kpi:hover,
.metric:hover,
.stat-card:hover{
  transform:translateY(-1px);
  box-shadow:var(--shadow-md);
}

.stat-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:12px;
}

.kpi-value,
.metric-value,
.big-number{
  font-size:clamp(24px, 3vw, 34px);
  font-weight:1000;
  line-height:1;
  color:var(--brand);
  letter-spacing:-.03em;
}

.kpi-label,
.metric-label{
  margin-top:7px;
  font-size:14px;
  font-weight:1000;
  color:var(--text);
  line-height:1.15;
}

.kpi-sub,
.metric-sub{
  margin-top:5px;
  font-size:12px;
  color:var(--muted);
  line-height:1.32;
}

.stat-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:12px;
}

.stat-card.primary{
  border-color:rgba(45,91,227,.14);
}

.stat-card.success{
  border-color:rgba(34,197,94,.18);
}

.stat-card.warning{
  border-color:rgba(245,158,11,.18);
}

.stat-card.neutral{
  border-color:rgba(100,116,139,.18);
}

/* ======================================================
   FORMS
====================================================== */
form{
  max-width:100%;
}

label{
  display:block;
  margin-bottom:6px;
  font-size:13px;
  font-weight:800;
  color:var(--text-soft);
  line-height:1.3;
}

.field-help,
.help{
  margin-top:6px;
  font-size:12px;
  color:var(--muted);
  line-height:1.35;
}

.form-section{
  padding:16px;
  border:1px solid rgba(23,40,92,.08);
  border-radius:18px;
  background:linear-gradient(180deg, rgba(248,251,255,.82), rgba(255,255,255,.96));
}

.form-section + .form-section{
  margin-top:14px;
}

.form-section-title{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:12px;
}

.form-section-title strong{
  display:block;
  color:var(--brand);
  font-size:15px;
  line-height:1.1;
}

.form-section-title small{
  display:block;
  margin-top:2px;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select,
textarea{
  width:100%;
  max-width:100%;
  padding:12px 14px;
  border:1px solid var(--input-border);
  border-radius:14px;
  font-size:14px;
  font-family:inherit;
  color:var(--text);
  background:var(--input-bg);
  outline:none;
  transition:border-color .14s ease, box-shadow .14s ease, background .14s ease, transform .14s ease;
  appearance:none;
  -webkit-appearance:none;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):hover,
select:hover,
textarea:hover{
  border-color:rgba(23,40,92,.20);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
select:focus,
textarea:focus{
  border-color:var(--input-border-focus);
  box-shadow:var(--input-shadow-focus);
  background:#fff;
}

textarea{
  min-height:110px;
  resize:vertical;
}

input[type="file"]{
  width:100%;
  max-width:100%;
  padding:10px 12px;
  border:1px dashed var(--input-border);
  border-radius:14px;
  background:#fff;
  font-size:14px;
}

/* ======================================================
   CHECKBOX / RADIO
====================================================== */
input[type="checkbox"],
input[type="radio"]{
  width:18px;
  height:18px;
  cursor:pointer;
  accent-color:var(--brand);
  margin:0;
  vertical-align:middle;
}

.checkrow{
  display:flex;
  align-items:flex-start;
  gap:10px;
}

.checkrow input[type="checkbox"],
.checkrow input[type="radio"]{
  flex:0 0 auto;
  margin-top:2px;
}

.checkrow label{
  margin:0;
  flex:1 1 auto;
  min-width:0;
  white-space:normal;
  word-break:break-word;
  line-height:1.3;
}

/* ======================================================
   BUTTONS
====================================================== */
.btn,
button.btn,
input[type="submit"].btn,
input[type="button"].btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:42px;
  padding:10px 15px;
  border-radius:14px;
  border:1px solid transparent;
  background:var(--brand);
  color:#fff;
  font-weight:900;
  font-size:14px;
  font-family:inherit;
  cursor:pointer;
  text-decoration:none;
  text-align:center;
  transition:transform .12s ease, box-shadow .12s ease, filter .12s ease, background .12s ease, border-color .12s ease;
  box-shadow:0 6px 14px rgba(23,40,92,.12);
}

.btn:hover,
button.btn:hover,
input[type="submit"].btn:hover,
input[type="button"].btn:hover{
  transform:translateY(-1px);
  filter:brightness(.98);
  text-decoration:none;
}

.btn:active,
button.btn:active,
input[type="submit"].btn:active,
input[type="button"].btn:active{
  transform:translateY(0);
}

.btn.primary{
  background:linear-gradient(180deg, var(--brand-2) 0%, var(--brand) 100%);
  color:#fff;
}

.btn.secondary{
  background:#fff;
  color:var(--brand);
  border-color:rgba(23,40,92,.16);
  box-shadow:none;
}

.btn.secondary:hover{
  background:#f8fbff;
}

.btn.ghost{
  background:rgba(23,40,92,.05);
  color:var(--brand);
  border-color:rgba(23,40,92,.08);
  box-shadow:none;
}

.btn.gray{
  background:#475569;
  color:#fff;
}

.btn.danger{
  background:linear-gradient(180deg, #f87171 0%, var(--danger) 100%);
  color:#fff;
}

.btn.ok,
.btn.success{
  background:linear-gradient(180deg, #22c55e 0%, var(--ok) 100%);
  color:#fff;
}

.btn.sm{
  min-height:34px;
  padding:8px 11px;
  font-size:13px;
  border-radius:12px;
}

.btn.lg{
  min-height:48px;
  padding:13px 18px;
  font-size:15px;
  border-radius:16px;
}

.filter-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:36px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(23,40,92,.12);
  background:#fff;
  color:var(--brand);
  font-weight:900;
  font-size:13px;
  transition:all .14s ease;
  box-shadow:var(--shadow-xs);
}

.filter-chip:hover{
  transform:translateY(-1px);
  border-color:rgba(23,40,92,.18);
}

.filter-chip.active{
  background:linear-gradient(180deg, var(--brand-2) 0%, var(--brand) 100%);
  border-color:transparent;
  color:#fff;
  box-shadow:0 8px 18px rgba(23,40,92,.16);
}

/* keep password toggle safe */
.pw-toggle{
  width:auto !important;
  min-width:auto !important;
  padding:8px 10px !important;
  font-size:13px !important;
  border-radius:10px !important;
}

/* ======================================================
   ALERTS / NOTICES
====================================================== */
.alert,
.notice{
  padding:11px 13px;
  border-radius:14px;
  margin:10px 0;
  border:1px solid transparent;
  font-size:14px;
  line-height:1.4;
}

.alert.success{
  background:var(--ok-bg);
  border-color:var(--ok-border);
  color:var(--ok-text);
}

.alert.danger,
.alert.error{
  background:var(--danger-bg);
  border-color:var(--danger-border);
  color:var(--danger-text);
}

.alert.warning{
  background:var(--warn-bg);
  border-color:var(--warn-border);
  color:var(--warn-text);
}

.alert.secondary,
.alert.info{
  background:var(--neutral-bg);
  border-color:var(--neutral-border);
  color:var(--neutral-text);
}

/* ======================================================
   PILLS / TAGS / STATUS
====================================================== */
.pill,
.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:5px 10px;
  border-radius:var(--radius-pill);
  font-weight:900;
  font-size:11px;
  line-height:1;
  border:1px solid rgba(23,40,92,.14);
  background:#fff;
  color:var(--brand);
  white-space:nowrap;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.6);
}

.pill.blue,
.badge.blue{
  background:var(--info-bg);
  border-color:rgba(45,91,227,.24);
  color:var(--info-text);
}

.pill.green,
.badge.green{
  background:var(--ok-bg);
  border-color:rgba(34,197,94,.24);
  color:var(--ok-text);
}

.pill.amber,
.badge.amber{
  background:var(--warn-bg);
  border-color:rgba(245,158,11,.24);
  color:var(--warn-text);
}

.pill.red,
.badge.red{
  background:var(--danger-bg);
  border-color:rgba(239,68,68,.24);
  color:var(--danger-text);
}

.pill.gray,
.badge.gray{
  background:var(--neutral-bg);
  border-color:rgba(100,116,139,.20);
  color:var(--neutral-text);
}

.status-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:4px 10px;
  border-radius:var(--radius-pill);
  font-weight:1000;
  font-size:11px;
  border:1px solid rgba(0,0,0,.10);
  background:#fff;
  white-space:nowrap;
  line-height:1;
}

.status-pending{
  border-color:rgba(245,158,11,.30);
  background:rgba(245,158,11,.10);
  color:#92400e;
}
.status-completed{
  border-color:rgba(34,197,94,.30);
  background:rgba(34,197,94,.10);
  color:#166534;
}
.status-expired{
  border-color:rgba(239,68,68,.30);
  background:rgba(239,68,68,.10);
  color:#991b1b;
}
.status-revoked{
  border-color:rgba(100,116,139,.30);
  background:rgba(100,116,139,.10);
  color:#334155;
}

/* ======================================================
   TABLES
====================================================== */
.table-wrap{
  width:100%;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  border:1px solid var(--border);
  border-radius:18px;
  background:#fff;
  box-shadow:var(--shadow-xs);
}

.table{
  width:100%;
  min-width:720px;
  border-collapse:separate;
  border-spacing:0;
  background:#fff;
}

.table th,
.table td{
  padding:12px 14px;
  text-align:left;
  font-size:14px;
  vertical-align:top;
  border-bottom:1px solid rgba(23,40,92,.08);
}

.table th{
  position:sticky;
  top:0;
  z-index:1;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:var(--muted);
  font-weight:1000;
  background:linear-gradient(180deg, #f8fbff 0%, #f4f8fd 100%);
}

.table tbody tr{
  transition:background .12s ease;
}

.table tbody tr:hover{
  background:rgba(23,40,92,.025);
}

.table tbody tr:last-child td{
  border-bottom:none;
}

.cell-strong{
  font-weight:900;
  color:var(--brand);
}

.cell-soft{
  color:var(--muted);
  font-size:13px;
}

.empty-state{
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:16px;
  border:1px dashed rgba(23,40,92,.14);
  border-radius:18px;
  background:linear-gradient(180deg, rgba(248,251,255,.9), rgba(255,255,255,1));
  color:var(--muted);
}

.empty-state-icon{
  flex:0 0 auto;
}

/* ======================================================
   INLINE LIST / KEY VALUE / META
====================================================== */
.meta-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.kv{
  display:grid;
  grid-template-columns:160px 1fr;
  gap:12px;
  align-items:start;
}

.kv .k{
  color:var(--muted);
  font-weight:800;
  font-size:13px;
}

.kv .v{
  color:var(--text);
  font-weight:600;
  min-width:0;
}

/* ======================================================
   RATING ROWS
====================================================== */
.rating-grid{
  display:grid;
  grid-template-columns:1fr 220px;
  gap:10px;
  align-items:center;
  padding:11px 0;
  border-bottom:1px solid var(--border);
}

.rating-grid:last-child{
  border-bottom:none;
}

.rating-label{
  font-weight:1000;
  color:var(--text);
}

/* ======================================================
   LIST ITEMS / ACTION ROWS
====================================================== */
.list-row{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  padding:11px 0;
  border-bottom:1px solid var(--border);
}

.list-row:last-child{
  border-bottom:none;
}

.list-title{
  font-weight:1000;
  color:var(--text);
}

.list-sub{
  margin-top:4px;
  color:var(--muted);
  font-size:12px;
  line-height:1.35;
}

/* ======================================================
   UTILITIES
====================================================== */
.text-muted{ color:var(--muted) !important; }
.text-soft{ color:var(--text-soft) !important; }
.text-brand{ color:var(--brand) !important; }
.text-danger{ color:var(--danger-text) !important; }
.text-ok{ color:var(--ok-text) !important; }

.bg-white{ background:#fff !important; }
.hidden{ display:none !important; }

.w-100{ width:100% !important; }
.max-w-100{ max-width:100% !important; }

.mt-0{ margin-top:0 !important; }
.mt-1{ margin-top:4px !important; }
.mt-2{ margin-top:8px !important; }
.mt-3{ margin-top:12px !important; }
.mt-4{ margin-top:16px !important; }
.mt-5{ margin-top:20px !important; }
.mt-6{ margin-top:24px !important; }

.mb-0{ margin-bottom:0 !important; }
.mb-1{ margin-bottom:4px !important; }
.mb-2{ margin-bottom:8px !important; }
.mb-3{ margin-bottom:12px !important; }
.mb-4{ margin-bottom:16px !important; }
.mb-5{ margin-bottom:20px !important; }
.mb-6{ margin-bottom:24px !important; }

.pt-0{ padding-top:0 !important; }
.pb-0{ padding-bottom:0 !important; }

.center{ text-align:center !important; }
.right{ text-align:right !important; }

/* ======================================================
   RESPONSIVE
====================================================== */
@media (max-width: 1200px){
  .wrap.wide,
  .wrap.dashwide{
    max-width:1180px;
  }
}

@media (max-width: 980px){
  .grid3,
  .grid4,
  .action-grid,
  .stat-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .g3,.g4,.g5,.g6,.g7,.g8,.g9{
    grid-column:span 12;
  }

  .kv{
    grid-template-columns:1fr;
    gap:6px;
  }
}

@media (max-width: 820px){
  .wrap,
  .wrap.wide,
  .wrap.dashwide,
  .wrap.narrow{
    width:100%;
    max-width:100%;
    padding-left:12px;
    padding-right:12px;
    margin:14px auto;
  }

  .card,
  .surface,
  .panel{
    width:100%;
    max-width:100%;
    padding:14px;
    border-radius:16px;
  }

  .page-hero{
    padding:16px 16px;
    border-radius:20px;
  }

  .grid2,
  .grid3,
  .grid4,
  .action-grid,
  .stat-grid{
    grid-template-columns:1fr;
  }

  .rating-grid{
    grid-template-columns:1fr;
    gap:8px;
  }

  label{
    font-size:14px;
  }

  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  select,
  textarea{
    font-size:16px;
    padding:13px 13px;
    border-radius:14px;
  }

  textarea{
    min-height:120px;
  }

  button:not(.pw-toggle):not(.tile-handle):not(.hamburger),
  .btn,
  input[type="submit"]{
    width:100%;
    padding:14px 14px !important;
    border-radius:14px !important;
    font-size:16px !important;
    font-weight:900 !important;
  }

  .table{
    min-width:640px;
  }
}

@media (max-width: 768px){
  input[type="checkbox"],
  input[type="radio"]{
    width:20px;
    height:20px;
  }
}

@media (max-width: 520px){
  h1{ font-size:28px; }
  h2{ font-size:22px; }
  h3{ font-size:18px; }

  .card,
  .surface,
  .panel{
    padding:13px;
  }

  .kpi,
  .metric,
  .stat-card{
    padding:13px;
    min-height:104px;
  }

  .kpi-value,
  .metric-value,
  .big-number{
    font-size:27px;
  }

  .table{
    min-width:560px;
  }
}

/* ======================================================
   HARD SAFETY OVERRIDES
====================================================== */
.wrap,
.card,
.surface,
.panel,
form,
.grid,
.grid2,
.grid3,
.grid4,
.row,
.table-wrap{
  max-width:100%;
  min-width:0;
}

.card,
.surface,
.panel{
  margin-left:0;
  margin-right:0;
}

input,
select,
textarea,
button{
  max-width:100%;
  box-sizing:border-box;
}

input[type="file"]{
  width:100%;
}

.avail-table{
  width:100%;
  max-width:100%;
}

.timesheet-table-wrap{
  overflow-x:auto;
  padding:0 14px 10px 18px;
  scrollbar-gutter: stable both-edges;
}

.timesheet-table{
  min-width:1320px;
  width:max-content;
}

.timesheet-table th:last-child,
.timesheet-table td:last-child{
  min-width:180px;
  padding-right:18px;
}