:root {
  --brand-blue: #0f4c81;
  --brand-orange: #f28c28;
  --brand-sand: #f7f9fc;
  --brand-ink: #1f2937;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
}

.admin-tool-page { border-radius: .85rem; }
.admin-tool-summary,
.diagnostic-session,
.district-admin-row {
  border: 1px solid var(--slate-200);
  border-radius: .75rem;
  padding: 1rem;
}
.admin-tool-summary {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
}
.diagnostic-session-head,
.district-admin-row {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}
.diagnostic-session h3,
.district-admin-row h3 {
  color: var(--brand-blue);
  font-weight: 700;
}
.diagnostic-session p,
.district-admin-row p,
.district-admin-row small { overflow-wrap: anywhere; }
.diagnostic-reasons {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: .75rem;
}
.diagnostic-reasons > div {
  background: var(--slate-50);
  border-radius: .5rem;
  padding: .75rem;
}
.diagnostic-ok {
  color: #16794b;
  font-size: .85rem;
  margin-top: .45rem;
}
.diagnostic-blocked {
  color: #b42318;
  font-size: .85rem;
  margin-top: .45rem;
}

@media (max-width: 640px) {
  .admin-tool-page { padding: 1rem; }
  .admin-tool-form,
  .diagnostic-session-head,
  .district-admin-row {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
  }
  .diagnostic-reasons { grid-template-columns: 1fr; }
}

* { box-sizing: border-box; }
html { min-height: 100%; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: 0; }
table { border-collapse: collapse; }
img { max-width: 100%; display: block; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }

.min-h-screen { min-height: 100vh; }
.sticky { position: sticky; }
.fixed { position: fixed; }
.relative { position: relative; }
.absolute { position: absolute; }
.inset-x-0 { left: 0; right: 0; }
.top-0 { top: 0; }
.top-full { top: 100%; }
.right-0 { right: 0; }
.z-50 { z-index: 50; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-1 { margin-top: .25rem; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: .75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-3 { margin-bottom: .75rem; }
.mb-6 { margin-bottom: 1.5rem; }
.block { display: block; }
.inline-flex { display: inline-flex; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.grid { display: grid; }
.hidden { display: none; }
.select-none { user-select: none; }
.w-full { width: 100%; }
.w-24 { width: 6rem; }
.w-40 { width: 10rem; }
.w-12 { width: 3rem; }
.w-14 { width: 3.5rem; }
.w-56 { width: 14rem; }
.h-12 { height: 3rem; }
.h-14 { height: 3.5rem; }
.h-24 { height: 6rem; }
.min-w-0 { min-width: 0; }
.min-w-72 { min-width: 18rem; }
.max-w-xs { max-width: 20rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-xl { max-width: 36rem; }
.max-w-7xl { max-width: 80rem; }
.shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.space-y-2 > * + * { margin-top: .5rem; }
.space-y-3 > * + * { margin-top: .75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.divide-y > * + * { border-top-width: 1px; }
.divide-slate-100 > * + * { border-color: var(--slate-100); }
.divide-slate-200 > * + * { border-color: var(--slate-200); }

.rounded-lg { border-radius: .5rem; }
.rounded-xl { border-radius: .75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-full { border-radius: 9999px; }
.rounded-\[1\.5rem\] { border-radius: 1.5rem; }
.rounded-\[2rem\] { border-radius: 2rem; }
.border { border: 1px solid; }
.border-b { border-bottom: 1px solid; }
.border-t { border-top: 1px solid; }
.border-slate-100 { border-color: var(--slate-100); }
.border-slate-200 { border-color: var(--slate-200); }
.border-slate-300 { border-color: var(--slate-300); }
.border-brand-blue { border-color: var(--brand-blue); }
.border-orange-200 { border-color: #fed7aa; }
.border-red-200 { border-color: #fecaca; }

.bg-white { background-color: #fff; }
.bg-white\/95 { background-color: rgba(255, 255, 255, .95); }
.bg-white\/90 { background-color: rgba(255, 255, 255, .9); }
.bg-slate-50 { background-color: var(--slate-50); }
.bg-slate-100 { background-color: var(--slate-100); }
.bg-slate-200 { background-color: var(--slate-200); }
.bg-slate-50 { background-color: var(--slate-50); }
.bg-brand-blue { background-color: var(--brand-blue); }
.bg-brand-orange { background-color: var(--brand-orange); }
.bg-brand-sand { background-color: var(--brand-sand); }
.bg-sky-50 { background-color: #f0f9ff; }
.bg-sky-100 { background-color: #e0f2fe; }
.bg-orange-50 { background-color: #fff7ed; }
.bg-orange-100 { background-color: #ffedd5; }
.bg-emerald-100 { background-color: #d1fae5; }
.bg-emerald-600 { background-color: #059669; }
.bg-red-50 { background-color: #fef2f2; }
.bg-\[radial-gradient\(circle_at_top_left\,_rgba\(15\,76\,129\,0\.08\)\,_transparent_30\%\)\,radial-gradient\(circle_at_bottom_right\,_rgba\(242\,140\,40\,0\.12\)\,_transparent_25\%\)\] {
  background:
    radial-gradient(circle at top left, rgba(15, 76, 129, .08), transparent 30%),
    radial-gradient(circle at bottom right, rgba(242, 140, 40, .12), transparent 25%);
}

.object-cover { object-fit: cover; }
.p-3 { padding: .75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-3 { padding-left: .75rem; padding-right: .75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-1 { padding-top: .25rem; padding-bottom: .25rem; }
.py-2 { padding-top: .5rem; padding-bottom: .5rem; }
.py-3 { padding-top: .75rem; padding-bottom: .75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.pb-1 { padding-bottom: .25rem; }
.pt-6 { padding-top: 1.5rem; }

.text-left { text-align: left; }
.text-center { text-align: center; }
.align-top { vertical-align: top; }
.text-xs { font-size: .75rem; line-height: 1rem; }
.text-sm { font-size: .875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.leading-7 { line-height: 1.75rem; }
.leading-tight { line-height: 1.18; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: .025em; }
.tracking-\[0\.3em\] { letter-spacing: .3em; }
.tracking-\[0\.35em\] { letter-spacing: .35em; }
.tracking-\[0\.2em\] { letter-spacing: .2em; }
.text-white { color: #fff; }
.text-brand-ink { color: var(--brand-ink); }
.text-brand-blue { color: var(--brand-blue); }
.text-brand-orange { color: var(--brand-orange); }
.text-slate-400 { color: var(--slate-400); }
.text-slate-500 { color: var(--slate-500); }
.text-slate-600 { color: var(--slate-600); }
.text-slate-700 { color: var(--slate-700); }
.text-slate-800 { color: var(--slate-800); }
.text-slate-900 { color: var(--slate-900); }
.text-orange-700 { color: #c2410c; }
.text-red-700 { color: #b91c1c; }
.text-emerald-700 { color: #047857; }

.shadow-sm { box-shadow: 0 1px 2px rgba(15, 23, 42, .08); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(15, 23, 42, .12), 0 4px 6px -4px rgba(15, 23, 42, .12); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(15, 23, 42, .12), 0 8px 10px -6px rgba(15, 23, 42, .1); }
.shadow-slate-200 { --shadow-color: #e2e8f0; }
.outline-none { outline: 2px solid transparent; outline-offset: 2px; }
.transition { transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease; }
.backdrop-blur { backdrop-filter: blur(8px); }
.cursor-pointer { cursor: pointer; }
.list-none { list-style: none; }
.min-w-full { min-width: 100%; }

.hover\:text-brand-blue:hover { color: var(--brand-blue); }
.hover\:bg-slate-50:hover { background-color: var(--slate-50); }
.hover\:bg-sky-50:hover { background-color: #f0f9ff; }
.hover\:bg-orange-50:hover { background-color: #fff7ed; }
.hover\:bg-sky-800:hover { background-color: #075985; }
.hover\:border-brand-blue:hover { border-color: var(--brand-blue); }
.hover\:border-brand-orange:hover { border-color: var(--brand-orange); }
.focus\:border-brand-blue:focus { border-color: var(--brand-blue); }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px rgba(14, 165, 233, .16); }
.focus\:ring-sky-100:focus { box-shadow: 0 0 0 2px #e0f2fe; }

.btn {
  align-items: center;
  border-radius: 9999px;
  display: inline-flex;
  font-size: .875rem;
  font-weight: 600;
  justify-content: center;
  line-height: 1.2;
  min-height: 2.35rem;
  padding: .58rem 1rem;
  white-space: nowrap;
}
.btn-primary { background: var(--brand-blue); color: #fff; }
.btn-accent { background: var(--brand-orange); color: #fff; }
.btn-outline { background: #fff; border: 1px solid var(--brand-blue); color: var(--brand-blue); }
.btn-danger { background: #fff; border: 1px solid #fecaca; color: #b91c1c; }
.btn-success { background: #059669; color: #fff; }
.btn-mini {
  border-radius: .65rem;
  font-size: .75rem;
  min-height: 2rem;
  padding: .45rem .7rem;
}
.form-control {
  border: 1px solid var(--slate-300);
  border-radius: .65rem;
  color: var(--slate-700);
  padding: .55rem .7rem;
  width: 100%;
}
.form-control:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 2px #e0f2fe;
  outline: 0;
}

.dashboard-heading {
  align-items: end;
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  padding: .25rem 0 1.25rem;
}
.dashboard-sync-form {
  flex-shrink: 0;
}
.dashboard-eyebrow,
.dashboard-chart-title p {
  color: var(--brand-orange);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  margin: 0;
  text-transform: uppercase;
}
.dashboard-heading h2 {
  color: var(--brand-blue);
  font-size: 2rem;
  line-height: 1.1;
  margin: .45rem 0 0;
}
.dashboard-scope {
  color: var(--slate-500);
  font-size: .9rem;
  margin: .45rem 0 0;
}
.dashboard-filters {
  align-items: end;
  display: grid;
  gap: .65rem;
  grid-template-columns: minmax(9rem, 1fr) minmax(9rem, 1fr) minmax(9rem, 1fr) auto;
}
.dashboard-filters label span {
  color: var(--slate-600);
  display: block;
  font-size: .75rem;
  font-weight: 700;
  margin-bottom: .3rem;
}
.dashboard-filter-actions { display: flex; gap: .45rem; }
.dashboard-kpis {
  display: grid;
  gap: .8rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.dashboard-kpi {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-left: 4px solid var(--brand-blue);
  border-radius: .5rem;
  padding: 1rem;
}
.dashboard-kpi span {
  color: var(--slate-500);
  display: block;
  font-size: .76rem;
  font-weight: 700;
  min-height: 2rem;
  text-transform: uppercase;
}
.dashboard-kpi strong {
  color: var(--slate-900);
  display: block;
  font-size: 1.8rem;
  line-height: 1;
  margin-top: .45rem;
}
.dashboard-kpi-link {
  color: var(--brand-blue);
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  margin-top: .5rem;
}
.dashboard-kpi-clickable {
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.dashboard-kpi-clickable:hover {
  box-shadow: 0 8px 18px rgba(15, 76, 129, .12);
  transform: translateY(-1px);
}
.dashboard-kpi-green { border-left-color: #059669; }
.dashboard-kpi-orange { border-left-color: var(--brand-orange); }
.dashboard-kpi-red { border-left-color: #dc2626; }
.dashboard-rates {
  display: grid;
  gap: .8rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: .8rem;
}
.dashboard-rates article {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: .5rem;
  padding: .9rem 1rem;
}
.dashboard-rates article > div:first-child {
  display: flex;
  font-size: .85rem;
  justify-content: space-between;
}
.dashboard-rates small { color: var(--slate-500); font-size: .72rem; }
.dashboard-progress,
.dashboard-bar-track {
  background: var(--slate-100);
  border-radius: 9999px;
  height: .42rem;
  margin: .65rem 0 .45rem;
  overflow: hidden;
}
.dashboard-progress i,
.dashboard-bar-track i {
  background: var(--brand-blue);
  border-radius: inherit;
  display: block;
  height: 100%;
}
.dashboard-chart-grid,
.dashboard-feed-grid {
  display: grid;
  gap: .8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: .8rem;
}
.dashboard-chart,
.dashboard-shortcuts,
.dashboard-feed {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: .5rem;
  padding: 1rem;
}
.dashboard-chart-title {
  align-items: start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}
.dashboard-chart-title h3,
.dashboard-feed h3 {
  color: var(--brand-blue);
  font-size: 1rem;
  margin: .28rem 0 0;
}
.dashboard-chart-title > strong {
  color: var(--brand-blue);
  font-size: 1.45rem;
}
.dashboard-bars {
  display: grid;
  gap: .72rem;
  margin-top: 1rem;
}
.dashboard-bar-row > div:first-child {
  display: flex;
  font-size: .78rem;
  gap: .6rem;
  justify-content: space-between;
}
.dashboard-bar-row span {
  color: var(--slate-600);
  overflow-wrap: anywhere;
}
.dashboard-bar-link {
  border-radius: .4rem;
  display: block;
  padding: .18rem .28rem;
}
.dashboard-bar-link:hover { background: var(--slate-50); }
.dashboard-bar-track { margin: .3rem 0 0; }
.dashboard-bar-orange { background: var(--brand-orange) !important; }
.dashboard-bar-green { background: #059669 !important; }
.dashboard-bar-blue { background: var(--brand-blue) !important; }
.dashboard-shortcut-grid {
  display: grid;
  gap: .55rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}
.dashboard-shortcut-grid a,
.dashboard-shortcut-grid button {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: .5rem;
  color: var(--brand-blue);
  cursor: pointer;
  font-size: .82rem;
  font-weight: 700;
  padding: .8rem;
  text-align: left;
  width: 100%;
}
.dashboard-shortcut-grid form { margin: 0; }
.dashboard-shortcut-grid button:hover,
.dashboard-shortcut-grid a:hover { background: var(--slate-50); }
.dashboard-feed-list {
  display: grid;
  gap: .55rem;
  margin-top: .85rem;
}
.dashboard-feed-list > div {
  border-top: 1px solid var(--slate-100);
  padding-top: .7rem;
}
.dashboard-feed-list p { color: var(--slate-800); font-size: .85rem; font-weight: 700; margin: 0; }
.dashboard-feed-list small { color: var(--slate-500); display: block; font-size: .74rem; margin: .15rem 0 .35rem; }
.dashboard-empty { color: var(--slate-500); font-size: .82rem; }

.assistant-page {
  display: grid;
  gap: 1rem;
}
.assistant-hero,
.assistant-card,
.assistant-profile {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: .5rem;
  padding: 1.1rem;
}
.assistant-hero {
  align-items: start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}
.assistant-hero h2 {
  color: var(--brand-blue);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.05;
  margin: .25rem 0 .45rem;
}
.assistant-hero p:last-child {
  color: var(--slate-600);
  margin: 0;
  max-width: 48rem;
}
.assistant-search {
  align-items: end;
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: .5rem;
  display: grid;
  gap: .75rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 1rem;
}
.assistant-search label span,
.assistant-label {
  color: var(--slate-500);
  display: block;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  margin-bottom: .35rem;
  text-transform: uppercase;
}
.assistant-profile {
  align-items: start;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, .8fr);
}
.assistant-profile h3 {
  color: var(--brand-blue);
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0;
}
.assistant-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .8rem;
}
.assistant-badges span {
  background: #e8f3fb;
  border: 1px solid #d5e8f4;
  border-radius: 999px;
  color: var(--brand-blue);
  font-size: .76rem;
  font-weight: 800;
  padding: .35rem .65rem;
}
.assistant-profile dl {
  display: grid;
  gap: .55rem;
  margin: 0;
}
.assistant-profile dl div {
  border-bottom: 1px solid var(--slate-100);
  padding-bottom: .45rem;
}
.assistant-profile dt {
  color: var(--slate-500);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
}
.assistant-profile dd {
  color: var(--slate-800);
  font-size: .9rem;
  font-weight: 700;
  margin: .12rem 0 0;
}
.assistant-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.assistant-card h3 {
  color: var(--brand-blue);
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 .75rem;
}
.assistant-card ol {
  color: var(--slate-700);
  display: grid;
  gap: .45rem;
  margin: 0 0 1rem 1.15rem;
  padding: 0;
}
.assistant-guidance {
  display: grid;
  gap: .65rem;
}
.assistant-guidance div {
  background: var(--slate-50);
  border: 1px solid var(--slate-100);
  border-radius: .5rem;
  padding: .75rem;
}
.assistant-guidance strong {
  color: var(--brand-blue);
  display: block;
  font-size: .9rem;
}
.assistant-guidance p {
  color: var(--slate-600);
  font-size: .84rem;
  margin: .25rem 0 0;
}
.assistant-section-title {
  align-items: end;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}
.assistant-section-title span {
  color: var(--slate-500);
  font-size: .82rem;
  font-weight: 800;
}
.assistant-session-list {
  display: grid;
  gap: .75rem;
}
.assistant-session-list article {
  align-items: center;
  border: 1px solid var(--slate-200);
  border-radius: .5rem;
  display: grid;
  gap: .75rem;
  grid-template-columns: minmax(14rem, .8fr) minmax(0, 1.2fr) auto;
  padding: .85rem;
}
.assistant-session-main p {
  color: var(--brand-blue);
  font-weight: 800;
  margin: 0;
}
.assistant-session-main small {
  color: var(--slate-500);
  display: block;
  font-size: .78rem;
  margin-top: .2rem;
}
.assistant-session-status {
  display: grid;
  gap: .35rem;
}
.assistant-session-status p {
  border-radius: .45rem;
  font-size: .8rem;
  margin: 0;
  padding: .5rem .65rem;
}
.assistant-ok {
  background: #ecfdf5;
  color: #047857;
}
.assistant-blocked {
  background: #fff7ed;
  color: #9a3412;
}
.assistant-chat-page {
  display: grid;
  min-height: calc(100vh - 8rem);
}
.assistant-chat-shell {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: .75rem;
  box-shadow: 0 18px 45px rgba(15, 76, 129, .08);
  display: grid;
  grid-template-rows: auto minmax(20rem, 1fr) auto auto;
  min-height: calc(100vh - 9rem);
  overflow: hidden;
}
.assistant-chat-header {
  align-items: start;
  background: linear-gradient(135deg, #fff, #f8fafc);
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1.1rem;
}
.assistant-chat-header h2 {
  color: var(--brand-blue);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.05;
  margin: .25rem 0 .35rem;
}
.assistant-chat-header p:last-child {
  color: var(--slate-600);
  margin: 0;
  max-width: 50rem;
}
.assistant-chat-messages {
  background: #f8fafc;
  display: grid;
  gap: .75rem;
  overflow-y: auto;
  padding: 1rem;
}
.assistant-message {
  border-radius: .9rem;
  max-width: min(42rem, 88%);
  padding: .8rem .95rem;
  white-space: pre-line;
}
.assistant-message p {
  margin: 0;
}
.assistant-message-bot {
  background: #fff;
  border: 1px solid var(--slate-200);
  color: var(--slate-800);
  justify-self: start;
}
.assistant-message-user {
  background: var(--brand-blue);
  color: #fff;
  justify-self: end;
}
.assistant-chat-actions {
  border-top: 1px solid var(--slate-200);
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  padding: .75rem 1rem 0;
}
.assistant-chat-actions button,
.assistant-chat-actions a {
  background: #e8f3fb;
  border: 1px solid #d5e8f4;
  border-radius: 999px;
  color: var(--brand-blue);
  cursor: pointer;
  font-size: .78rem;
  font-weight: 800;
  padding: .45rem .75rem;
  text-decoration: none;
}
.assistant-chat-form {
  display: grid;
  gap: .65rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: .75rem 1rem 1rem;
}
.assistant-chat-form input {
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  min-height: 3rem;
  padding: 0 1rem;
}
.auth-assistant-progress {
  background: #f8fafc;
  border: 1px solid var(--slate-200);
  border-radius: .75rem;
  display: grid;
  gap: .8rem;
  margin-top: 1rem;
  padding: .9rem;
}
.auth-assistant-progress h3 {
  color: var(--brand-blue);
  font-size: 1rem;
  font-weight: 800;
  margin: 0;
}
.auth-assistant-progress p {
  color: var(--slate-600);
  font-size: .86rem;
  margin: .25rem 0 0;
}
.auth-assistant-progress ol {
  display: grid;
  gap: .4rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}
.auth-assistant-progress li {
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  color: var(--slate-500);
  font-size: .72rem;
  font-weight: 800;
  padding: .35rem .45rem;
  text-align: center;
}
.auth-step-done {
  background: #ecfdf5;
  border-color: #bbf7d0 !important;
  color: #047857 !important;
}
.auth-step-current {
  background: #e8f3fb;
  border-color: #bfdbfe !important;
  color: var(--brand-blue) !important;
}
.formatech-floating-assistant {
  align-items: center;
  background: var(--brand-blue);
  border: 2px solid #fff;
  border-radius: 999px;
  bottom: 1.25rem;
  box-shadow: 0 14px 30px rgba(15, 76, 129, .28);
  color: #fff;
  display: inline-flex;
  font-size: .88rem;
  font-weight: 900;
  gap: .45rem;
  letter-spacing: .01em;
  padding: .82rem 1rem;
  position: fixed;
  right: 1.25rem;
  text-decoration: none;
  z-index: 80;
}
.formatech-floating-assistant::before {
  background: var(--brand-orange);
  border-radius: 999px;
  content: "";
  display: inline-block;
  height: .62rem;
  width: .62rem;
}
.formatech-floating-assistant:hover {
  background: #0b3f6d;
}
.formatech-chat-widget {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: .85rem;
  bottom: 5.1rem;
  box-shadow: 0 24px 55px rgba(15, 23, 42, .22);
  display: grid;
  grid-template-rows: auto minmax(13rem, 1fr) auto auto;
  max-height: min(34rem, calc(100vh - 7rem));
  overflow: hidden;
  position: fixed;
  right: 1.25rem;
  width: min(24rem, calc(100vw - 2rem));
  z-index: 85;
}
.formatech-chat-widget[hidden] {
  display: none;
}
.formatech-chat-widget > header {
  align-items: center;
  background: var(--brand-blue);
  color: #fff;
  display: flex;
  justify-content: space-between;
  padding: .8rem .9rem;
}
.formatech-chat-widget header p {
  color: rgba(255,255,255,.72);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  margin: 0;
  text-transform: uppercase;
}
.formatech-chat-widget header h2 {
  font-size: 1rem;
  font-weight: 900;
  margin: .15rem 0 0;
}
.formatech-chat-widget header button {
  background: rgba(255,255,255,.14);
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font-size: 1.25rem;
  height: 2rem;
  line-height: 1;
  width: 2rem;
}
.formatech-chat-body {
  background: #f8fafc;
  display: grid;
  gap: .65rem;
  overflow-y: auto;
  padding: .75rem;
}
.formatech-chat-body .assistant-message {
  max-width: 92%;
  padding: .65rem .75rem;
}
.formatech-chat-quick {
  background: #fff;
  border-top: 1px solid var(--slate-200);
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  padding: .55rem .75rem 0;
}
.formatech-chat-quick button,
.formatech-chat-quick a {
  background: #e8f3fb;
  border: 1px solid #d5e8f4;
  border-radius: 999px;
  color: var(--brand-blue);
  cursor: pointer;
  font-size: .72rem;
  font-weight: 800;
  padding: .35rem .55rem;
  text-decoration: none;
}
.formatech-chat-form {
  background: #fff;
  display: grid;
  gap: .45rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: .6rem .75rem .75rem;
}
.formatech-chat-form input {
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  min-height: 2.55rem;
  padding: 0 .85rem;
}
.formatech-chat-form button {
  background: var(--brand-blue);
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 900;
  padding: 0 .85rem;
}

[data-profile-photo-picker] input[type="file"] {
  height: 1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  width: 1px;
}
.photo-source-button {
  min-height: 2.75rem;
}
.identity-photo-preview {
  aspect-ratio: 4 / 5;
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: .85rem;
  height: auto;
  max-width: 9rem;
  object-fit: cover;
  width: 100%;
}
.photo-cropper {
  margin-top: .75rem;
}
.photo-crop-frame {
  aspect-ratio: 4 / 5;
  background:
    linear-gradient(rgba(15, 76, 129, .08), rgba(15, 76, 129, .08)),
    #fff;
  border: 2px solid var(--brand-blue);
  border-radius: .9rem;
  cursor: grab;
  max-width: 14rem;
  overflow: hidden;
  position: relative;
  touch-action: none;
  width: 100%;
}
.photo-crop-frame:active {
  cursor: grabbing;
}
.photo-crop-frame::after {
  border: 1px dashed rgba(255, 255, 255, .85);
  bottom: .75rem;
  content: "";
  left: .75rem;
  pointer-events: none;
  position: absolute;
  right: .75rem;
  top: .75rem;
}
.photo-crop-frame img {
  height: 100%;
  left: 0;
  object-fit: cover;
  position: absolute;
  top: 0;
  transform-origin: center;
  user-select: none;
  width: 100%;
  will-change: transform;
}
.photo-zoom-range {
  accent-color: var(--brand-blue);
  padding: 0;
  width: min(14rem, 100%);
}
.photo-crop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .75rem;
}

.sessions-page {
  overflow: visible;
}
.sessions-header {
  border-bottom: 1px solid var(--slate-100);
  padding-bottom: 1.25rem;
}
.sessions-actions {
  justify-content: flex-end;
}
.sessions-table-wrap {
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}
.sessions-table {
  border-collapse: separate;
  border-spacing: 0;
}
.sessions-table th {
  background: var(--slate-50);
  color: var(--slate-500);
  font-size: .72rem;
  letter-spacing: .04em;
  padding: .85rem 1rem;
  white-space: nowrap;
}
.sessions-table td {
  color: var(--slate-600);
  padding: 1rem;
}
.sessions-table tbody tr:hover {
  background: #f8fbff;
}
.sessions-table p {
  margin: 0;
}
.session-title {
  color: var(--slate-900);
  font-weight: 700;
  margin-bottom: .45rem !important;
  max-width: 12rem;
}
.session-status {
  background: #e0f2fe;
  border-radius: 9999px;
  color: var(--brand-blue);
  display: inline-flex;
  font-size: .72rem;
  font-weight: 700;
  padding: .18rem .55rem;
}
.session-training {
  color: var(--brand-blue);
  font-weight: 700;
}
.session-row-actions {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  min-width: 15rem;
}
.session-row-actions form {
  margin: 0;
  width: 100%;
}
.session-row-actions .btn,
.session-row-actions a,
.session-row-actions button {
  width: 100%;
}
.derogation-box {
  max-width: 18rem;
  min-width: 15rem;
}
.sessions-page + .mb-4,
.sessions-page .mb-4 {
  align-items: center;
}

/* Global FORMATECH polish: cards, tables, forms and action buttons */
section.rounded-\[2rem\],
div.rounded-\[2rem\] {
  background: rgba(255, 255, 255, .98);
}

main > section,
main > div {
  max-width: 100%;
}

input,
select,
textarea {
  background: #fff;
}

input[class*="border"],
select[class*="border"],
textarea[class*="border"] {
  border-color: var(--slate-300);
}

input[class*="rounded"],
select[class*="rounded"],
textarea[class*="rounded"] {
  border-radius: .75rem;
  min-height: 2.55rem;
  padding: .58rem .75rem;
}

button[class*="bg-brand-blue"],
a[class*="bg-brand-blue"],
button[class*="bg-brand-orange"],
a[class*="bg-brand-orange"],
button[class*="border-brand-blue"],
a[class*="border-brand-blue"],
button[class*="border-red-200"],
a[class*="border-red-200"] {
  align-items: center;
  display: inline-flex;
  font-weight: 600;
  justify-content: center;
  line-height: 1.2;
  min-height: 2.35rem;
  text-align: center;
  white-space: nowrap;
}

button[class*="px-3"],
a[class*="px-3"] {
  min-height: 2rem;
}

table {
  width: 100%;
}

thead th {
  background: var(--slate-50);
  color: var(--slate-500);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: .8rem 1rem;
  white-space: nowrap;
}

tbody td {
  padding: .95rem 1rem;
  vertical-align: top;
}

tbody tr:hover {
  background: #f8fbff;
}

td p {
  margin-bottom: .18rem;
}

td:last-child > .flex.flex-wrap,
td:last-child .flex.flex-wrap.gap-2,
.table-actions,
.card-actions {
  align-items: stretch;
  flex-direction: column;
  flex-wrap: nowrap;
  min-width: 9.5rem;
}

td:last-child > .flex.flex-wrap > a,
td:last-child > .flex.flex-wrap > form,
td:last-child .flex.flex-wrap.gap-2 > a,
td:last-child .flex.flex-wrap.gap-2 > form,
.table-actions > a,
.table-actions > form,
.card-actions > a,
.card-actions > form {
  width: 100%;
}

td:last-child > .flex.flex-wrap button,
td:last-child > .flex.flex-wrap a,
td:last-child .flex.flex-wrap.gap-2 button,
td:last-child .flex.flex-wrap.gap-2 a,
.table-actions button,
.table-actions a,
.card-actions button,
.card-actions a {
  width: 100%;
}

.desktop-menu { display: none; }
.public-menu {
  align-items: center;
  display: flex;
  flex-shrink: 0;
  gap: .55rem;
}
.mobile-menu { position: relative; flex-shrink: 0; }
.mobile-menu { margin-left: auto; }
.mobile-menu-button {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border-radius: 9999px;
  background: var(--brand-blue);
  color: #fff;
  padding: .6rem 1rem;
  font-size: .875rem;
  font-weight: 600;
}
.mobile-menu-panel {
  position: fixed;
  left: 1rem;
  right: 1rem;
  top: 5.75rem;
  z-index: 60;
  display: grid;
  width: auto;
  gap: .25rem;
  border: 1px solid var(--slate-200);
  border-radius: 1rem;
  background: #fff;
  max-height: calc(100dvh - 6.5rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: .75rem;
  box-shadow: 0 20px 25px -5px rgba(15, 23, 42, .18);
  -webkit-overflow-scrolling: touch;
}
.mobile-menu-panel a,
.mobile-menu-panel form {
  display: block;
}
.mobile-menu-panel a {
  border-radius: .75rem;
  color: var(--slate-700);
  padding: .7rem .85rem;
}
.mobile-menu-panel a:hover {
  background: var(--slate-50);
  color: var(--brand-blue);
}

.site-title {
  max-width: min(32rem, calc(100vw - 12rem));
  min-width: 12rem;
}

.site-title h1 {
  line-height: 1.18;
  white-space: normal;
}

.site-title p {
  line-height: 1rem;
}

.mobile-only,
.mobile-cards {
  display: grid;
}

.desktop-only,
.desktop-table {
  display: none;
}

.mobile-stat-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mobile-stat-grid article,
.mobile-card {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
  min-width: 0;
}

.mobile-stat-grid article {
  padding: 1rem;
}

.mobile-stat-grid span {
  color: var(--slate-500);
  display: block;
  font-size: .75rem;
  line-height: 1.05rem;
}

.mobile-stat-grid strong {
  color: var(--brand-blue);
  display: block;
  font-size: 1.75rem;
  line-height: 2rem;
  margin-top: .35rem;
}

.quick-grid {
  display: grid;
  gap: .65rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quick-grid a {
  align-items: center;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: .85rem;
  color: var(--brand-blue);
  display: flex;
  font-size: .86rem;
  font-weight: 700;
  justify-content: center;
  min-height: 3rem;
  padding: .65rem;
  text-align: center;
}

.responsive-row {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.status-pill {
  background: #e0f2fe;
  border-radius: 9999px;
  color: var(--brand-blue);
  display: inline-flex;
  flex-shrink: 0;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1;
  padding: .45rem .65rem;
}
.status-pill-approved {
  background: #dcfce7;
  color: #16794b;
}
.status-pill-rejected {
  background: #fee2e2;
  color: #b42318;
}
.password-criteria {
  background: #f8fafc;
  border: 1px solid var(--slate-200);
  border-radius: .75rem;
  color: var(--slate-600);
  font-size: .85rem;
  padding: .85rem 1rem;
}
.password-criteria p {
  color: var(--slate-800);
  font-weight: 700;
}
.password-criteria ul {
  list-style: disc;
  margin: .45rem 0 0 1rem;
}
.password-criteria li {
  color: var(--slate-600);
  transition: color .16s ease;
}
.password-criteria li::marker { color: var(--slate-400); }
.password-criteria li.password-criterion-valid {
  color: #16794b;
  font-weight: 700;
}
.password-criteria li.password-criterion-valid::marker { color: #16794b; }

.mobile-cards {
  gap: .85rem;
}

.mobile-card {
  padding: 1rem;
}

.mobile-card h3 {
  color: var(--slate-900);
  font-size: 1rem;
  line-height: 1.35rem;
  margin: 0;
}
.session-empty-message {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: .75rem;
  color: var(--slate-700);
  padding: 1rem;
}
.session-empty-message h3 {
  color: #9a3412;
  font-size: 1rem;
  font-weight: 700;
}
.session-empty-message > p { margin-top: .45rem; }
.session-empty-reasons {
  display: grid;
  gap: .55rem;
  margin-top: .8rem;
}
.session-empty-reasons > div {
  background: #fff;
  border: 1px solid #fed7aa;
  border-radius: .55rem;
  padding: .7rem;
}
.session-empty-reasons strong { color: var(--slate-900); }
.session-empty-reasons p {
  font-size: .85rem;
  margin-top: .25rem;
}

.mobile-card p {
  margin: .15rem 0 0;
}

.mobile-card-head {
  align-items: flex-start;
  display: flex;
  gap: .75rem;
  justify-content: space-between;
}

.mobile-card-head > div {
  min-width: 0;
}

.mobile-card-head p {
  color: var(--slate-500);
  font-size: .78rem;
}

.mobile-meta-grid {
  display: grid;
  gap: .65rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.mobile-meta-grid dt {
  color: var(--slate-400);
  font-size: .68rem;
  font-weight: 700;
  margin: 0;
  text-transform: uppercase;
}

.mobile-meta-grid dd {
  color: var(--slate-700);
  font-size: .82rem;
  line-height: 1.2rem;
  margin: .1rem 0 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.payment-session-card {
  overflow: hidden;
}

.mobile-empty-state {
  background: #fff;
  border: 1px dashed var(--slate-300);
  border-radius: .75rem;
  color: var(--slate-500);
  font-size: .85rem;
  padding: 1rem;
}

.online-session-card {
  min-width: 0;
  overflow: hidden;
}
.notification-link { align-items: center; display: inline-flex; gap: .35rem; }
.notification-link span {
  align-items: center;
  background: #dc2626;
  border-radius: 9999px;
  color: #fff;
  display: inline-flex;
  font-size: .65rem;
  font-weight: 700;
  height: 1.2rem;
  justify-content: center;
  min-width: 1.2rem;
  padding: 0 .3rem;
}
.notification-item {
  align-items: center;
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: .65rem;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: .9rem;
}
.notification-item-unread { border-left: 4px solid var(--brand-orange); }
.notification-item h3 { color: var(--slate-900); font-size: .92rem; margin: 0; }
.notification-item p { color: var(--slate-600); font-size: .82rem; margin: .25rem 0; }
.notification-item small { color: var(--slate-400); font-size: .72rem; }

.application-mobile-head {
  display: grid;
  gap: .65rem;
  grid-template-columns: minmax(0, 1fr);
}
.application-mobile-head > div { min-width: 0; }
.application-mobile-head h3,
.application-mobile-head p { overflow-wrap: anywhere; }
.application-status-pill {
  justify-self: start;
  line-height: 1.2;
  max-width: 100%;
  white-space: normal;
}
.application-decisions {
  align-items: flex-start;
}
.application-decisions span {
  line-height: 1.2;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}

.profile-change-mobile { display: grid; gap: .65rem; }
.profile-change-desktop { display: none; }
.profile-change-mobile-field {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: .65rem;
  padding: .75rem;
}
.profile-change-mobile-field-changed { border-left: 4px solid var(--brand-orange); }
.profile-change-mobile-field h4 {
  color: var(--slate-800);
  font-size: .82rem;
  margin: 0 0 .65rem;
}
.profile-change-values {
  display: grid;
  gap: .65rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.profile-change-values span {
  color: var(--slate-400);
  display: block;
  font-size: .64rem;
  font-weight: 700;
  text-transform: uppercase;
}
.profile-change-values p,
.profile-change-values a {
  color: var(--slate-700);
  display: block;
  font-size: .78rem;
  line-height: 1.15rem;
  margin: .2rem 0 0;
  overflow-wrap: anywhere;
}
.profile-change-values a { color: var(--brand-blue); font-weight: 700; }
.profile-change-image {
  border-radius: .45rem;
  height: 5rem;
  margin-top: .35rem;
  object-fit: cover;
  width: 4rem;
}

.form-shell {
  overflow: hidden;
}

.form-heading {
  border-bottom: 1px solid var(--slate-100);
  padding-bottom: 1.25rem;
}

.form-field {
  min-width: 0;
}

.form-field label {
  display: block;
  line-height: 1.25rem;
}

.form-field input,
.form-field select,
.form-field textarea {
  max-width: 100%;
}

.form-field select {
  min-height: 2.75rem;
}

.form-actions {
  align-items: stretch;
}

.profile-information-panel,
.profile-summary,
.profile-summary > div,
.profile-information-list,
.profile-change-form,
.profile-change-form > div {
  min-width: 0;
  max-width: 100%;
}
.profile-summary p,
.profile-information-list p,
.profile-information-list a {
  overflow-wrap: anywhere;
}
.profile-change-form input,
.profile-change-form select,
.profile-change-form textarea,
.profile-change-form button {
  max-width: 100%;
}

.approval-card,
.approval-card-head,
.approval-personal-information,
.approval-personal-information > div {
  min-width: 0;
  max-width: 100%;
}
.approval-personal-information h3,
.approval-personal-information p {
  overflow-wrap: anywhere;
}
.approval-status {
  line-height: 1.2;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}
.approvals-page {
  border-radius: .55rem;
}
.approval-card {
  border-radius: .55rem;
  padding: 1rem;
}
.approval-card-head {
  gap: .75rem;
}
.approval-personal-information {
  gap: .75rem;
}
.approval-avatar {
  border: 1px solid var(--slate-200);
  border-radius: .55rem;
  flex-shrink: 0;
  height: 3rem;
  width: 3rem;
}
.approval-personal-information h3 {
  font-size: 1rem;
  line-height: 1.35rem;
}
.approval-territory {
  margin-top: .3rem;
}
.approval-profile-link {
  margin-top: .55rem;
  padding: .4rem .65rem;
}
.approval-facts {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: .45rem;
  gap: .65rem;
  margin-top: .75rem;
  padding: .65rem .75rem;
}
.approval-facts p {
  margin: 0;
  overflow-wrap: anywhere;
}
.approval-support-block {
  border-radius: .45rem;
  padding: .75rem;
}
.approval-notes {
  margin-top: .75rem;
}
.approval-decision-form {
  gap: .75rem;
  margin-top: 1rem;
}
.approval-desktop-main {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(15rem, 1.2fr) minmax(18rem, 1fr) minmax(14rem, .9fr);
}
.approval-desktop-meta {
  display: grid;
  gap: .7rem 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.approval-desktop-meta dt,
.approval-desktop-territory span {
  color: #64748b;
  display: block;
  font-size: .68rem;
  font-weight: 700;
  margin-bottom: .22rem;
  text-align: center;
  text-transform: uppercase;
}
.approval-desktop-meta dd,
.approval-desktop-territory {
  color: #334155;
  font-weight: 700;
  text-align: center;
}
.approval-desktop-territory {
  display: grid;
  gap: .55rem;
}
.approval-desktop-session-title,
.approval-desktop-training-title {
  font-weight: 700;
  text-align: center;
}

@media (min-width: 640px) {
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .sm\:h-14 { height: 3.5rem; }
  .sm\:w-14 { width: 3.5rem; }
  .sm\:text-xl { font-size: 1.25rem; line-height: 1.75rem; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sm\:max-w-sm { max-width: 24rem; }
}

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .md\:col-span-2 { grid-column: span 2 / span 2; }
}

@media (min-width: 1024px) {
  .mobile-only,
  .mobile-cards { display: none; }
  .desktop-only { display: grid; }
  .desktop-table { display: block; }
  .profile-change-mobile { display: none; }
  .profile-change-desktop { display: block; }
  .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
  .lg\:flex-row { flex-direction: row; }
  .lg\:items-center { align-items: center; }
  .lg\:justify-between { justify-content: space-between; }
  .lg\:w-auto { width: auto; }
  .lg\:overflow-visible { overflow: visible; }
  .lg\:pb-0 { padding-bottom: 0; }
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .lg\:grid-cols-\[1\.3fr_0\.7fr\] { grid-template-columns: 1.3fr .7fr; }
  .lg\:grid-cols-\[1\.2fr_0\.8fr\] { grid-template-columns: 1.2fr .8fr; }
  .lg\:grid-cols-\[1\.1fr_0\.9fr\] { grid-template-columns: 1.1fr .9fr; }
  .lg\:grid-cols-\[0\.8fr_1\.2fr\] { grid-template-columns: .8fr 1.2fr; }
  .lg\:grid-cols-\[1fr_2fr_auto\] { grid-template-columns: 1fr 2fr auto; }
  .chat-thread-card {
    align-items: center;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1.3fr) minmax(20rem, .9fr);
    padding: 1.1rem 1.25rem;
  }
  .chat-thread-session {
    margin-top: .25rem;
  }
  .chat-thread-summary {
    border-left: 1px solid #e2e8f0;
    border-top: 0;
    display: grid;
    gap: .35rem 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 0;
    padding-left: 1.25rem;
    padding-top: 0;
  }
  .chat-thread-summary p {
    margin: 0;
  }
}

@media (min-width: 1280px) {
  .desktop-menu {
    display: flex;
    flex-wrap: wrap;
    font-size: .78rem;
    gap: .55rem;
    justify-content: flex-end;
    max-width: calc(100vw - 25rem);
    row-gap: .35rem;
  }
  .mobile-menu { display: none; }
  .site-title {
    max-width: 24rem;
    min-width: 15rem;
  }
  .xl\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.application-desktop-card {
  border-radius: .75rem;
}
.application-desktop-main {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(15rem, 1.2fr) minmax(18rem, 1fr) minmax(14rem, .9fr);
}
.application-desktop-meta {
  display: grid;
  gap: .7rem 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.application-desktop-meta dt,
.application-desktop-territory span {
  display: block;
  font-size: .68rem;
  font-weight: 700;
  margin-bottom: .22rem;
  text-transform: uppercase;
  color: #64748b;
  text-align: center;
}
.application-desktop-meta dd {
  color: #334155;
  font-weight: 700;
  text-align: center;
}
.application-desktop-territory {
  display: grid;
  gap: .55rem;
  font-weight: 700;
  text-align: center;
}
.application-desktop-footer {
  align-items: start;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) auto;
}
.application-desktop-session-title,
.application-desktop-training-title {
  font-weight: 700;
  text-align: center;
}
.chat-receipt {
  border-radius: 999px;
  display: inline-flex;
  font-size: .72rem;
  font-weight: 700;
  padding: .25rem .65rem;
}
.chat-receipt-sent { background: #f1f5f9; color: #475569; }
.chat-receipt-received { background: #fef3c7; color: #a16207; }
.chat-receipt-read { background: #d1fae5; color: #047857; }
.chat-receipt-mobile { display: none; }
.chat-thread-badges {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  justify-content: flex-end;
}
.chat-unread-pill {
  background: #ffedd5;
  border-radius: 999px;
  color: #c2410c;
  display: inline-flex;
  font-size: .72rem;
  font-weight: 700;
  padding: .25rem .65rem;
}
.chat-thread-meta {
  border-top: 1px solid #e2e8f0;
  display: grid;
  gap: .45rem;
  margin-top: .75rem;
  padding-top: .75rem;
}
.chat-thread-meta div { display: block; }
.chat-thread-meta dt {
  color: #64748b;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
}
.chat-thread-meta dd {
  color: #0f4c81;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.35;
  margin: .1rem 0 0;
  overflow-wrap: break-word;
  word-break: normal;
}
.chat-thread-title {
  color: #0f172a;
  display: block;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
  overflow-wrap: break-word;
}
.chat-thread-session {
  color: #475569;
  display: block;
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.35;
  margin: .4rem 0 0;
  overflow-wrap: break-word;
}
.chat-thread-summary {
  border-top: 1px solid #e2e8f0;
  display: block;
  margin-top: .75rem;
  padding-top: .65rem;
}
.chat-thread-summary p {
  color: #64748b;
  display: block;
  font-size: .78rem;
  line-height: 1.35;
  margin: .2rem 0;
  overflow-wrap: break-word;
  word-break: normal;
}
.chat-thread-summary strong { color: #334155; }
.chat-thread-summary .chat-thread-unread { color: #c2410c; }

@media (max-width: 760px) {
  body { overflow-x: hidden; }
  .site-title {
    max-width: calc(100vw - 10.5rem);
  }
  .site-title p {
    letter-spacing: .18em;
  }
  .site-title h1 {
    font-size: .95rem;
    line-height: 1.18rem;
    max-width: 100%;
    overflow-wrap: normal;
  }
  main.mx-auto { padding-top: 1.25rem; }
  .p-8 { padding: 1rem; }
  .p-6 { padding: 1rem; }
  .text-3xl { font-size: 1.5rem; line-height: 2rem; }
  .text-2xl { font-size: 1.35rem; line-height: 1.8rem; }
  .tracking-\[0\.35em\] { letter-spacing: .16em; }
  .responsive-row,
  .sessions-header,
  .applications-header {
    align-items: stretch;
    flex-direction: column;
  }
  .applications-page {
    border-radius: 1rem;
    padding: 1rem;
  }
  .applications-page .mobile-card {
    border-radius: .75rem;
    padding: .9rem;
  }
  .applications-page .mobile-meta-grid {
    gap: .55rem;
    grid-template-columns: 1fr;
  }
  .applications-page .card-actions form {
    min-width: 0;
    width: 100%;
  }
  .applications-page .card-actions select,
  .applications-page .card-actions textarea,
  .applications-page .card-actions button {
    max-width: 100%;
    width: 100%;
  }
  .learning-path-page {
    gap: 1rem;
  }
  .profile-information-panel {
    border-radius: 1rem;
    overflow: hidden;
    padding: 1rem;
  }
  .profile-summary {
    align-items: flex-start;
  }
  .profile-summary img,
  .profile-summary > div:first-child {
    flex-shrink: 0;
  }
  .profile-change-form .sm\:grid-cols-2 {
    grid-template-columns: 1fr;
  }
  .profile-change-form button {
    white-space: normal;
    width: 100%;
  }
  .approvals-page {
    border-radius: 1rem;
    padding: 1rem;
  }
  .approval-card {
    background: #fff;
    border-radius: .75rem;
    box-shadow: 0 8px 22px rgba(15, 76, 129, .06);
    padding: .85rem;
  }
  .approval-card-head {
    display: grid;
    gap: .75rem;
    grid-template-columns: minmax(0, 1fr);
  }
  .approval-desktop-main {
    display: grid;
    gap: .75rem;
    grid-template-columns: minmax(0, 1fr);
  }
  .approval-personal-information {
    gap: .7rem;
  }
  .approval-avatar {
    border-radius: .65rem;
    height: 3rem;
    width: 3rem;
  }
  .approval-personal-information h3 {
    font-size: 1rem;
    line-height: 1.3rem;
  }
  .approval-personal-information a,
  .approval-card a,
  .approval-card button,
  .approval-card select,
  .approval-card textarea {
    max-width: 100%;
  }
  .approval-profile-link {
    margin-top: .45rem;
    padding: .35rem .6rem;
  }
  .approval-status {
    justify-self: start;
  }
  .approval-facts {
    display: grid;
    gap: .45rem;
    margin-top: .7rem;
    padding: .65rem;
  }
  .approval-support-block {
    padding: .7rem;
  }
  .approval-decision-form {
    gap: .75rem;
    margin-top: .9rem;
  }
  .approval-card form {
    min-width: 0;
  }
  .responsive-page-shell {
    border-radius: 1rem;
    padding: 1rem;
  }
  .responsive-page-heading h2 {
    font-size: 1.45rem;
    line-height: 1.85rem;
  }
  .responsive-page-heading p {
    line-height: 1.25rem;
  }
  .online-session-card,
  .payment-session-card {
    border-radius: .75rem;
    padding: 1rem;
  }
  .online-session-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .online-session-card h3 {
    font-size: 1rem;
    line-height: 1.35rem;
  }
  .online-session-card p {
    overflow-wrap: anywhere;
  }
  .online-session-actions .btn {
    width: 100%;
  }
  .payment-session-card .responsive-row {
    gap: .55rem;
  }
  .profile-change-page {
    border-radius: 1rem;
    padding: 1rem;
  }
  .profile-change-request {
    border-radius: .75rem;
    padding: .85rem;
  }
  .profile-change-values {
    grid-template-columns: 1fr;
  }
  .notification-item {
    align-items: stretch;
    flex-direction: column;
  }
  .notification-item .btn { width: 100%; }
  .chat-page {
    border-radius: 1rem;
    overflow: hidden;
    padding: 1rem;
  }
  .chat-page,
  .chat-thread-list,
  .chat-thread-card,
  .chat-thread-card-head,
  .chat-thread-card-head > div,
  .chat-thread-badges {
    max-width: 100%;
    min-width: 0;
  }
  .chat-thread-list + *,
  .chat-thread-list {
    width: 100%;
  }
  .chat-thread-list > .mb-4 {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }
  .chat-thread-list > .mb-4 p {
    display: block;
    margin: .25rem 0 0;
  }
  .chat-thread-list > .mb-4 input {
    max-width: 100%;
    width: 100%;
  }
  .chat-page .responsive-row {
    gap: .75rem;
  }
  .chat-page .responsive-row .btn {
    width: 100%;
  }
  .chat-thread-card {
    display: block !important;
    min-height: 0 !important;
    padding: .8rem;
  }
  .chat-thread-card-head,
  .chat-detail-head,
  .chat-message-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .chat-thread-card h3,
  .chat-detail-head h2,
  .chat-message p {
    overflow-wrap: anywhere;
  }
  .chat-detail-head .status-pill,
  .chat-thread-card .status-pill {
    justify-self: start;
    max-width: 100%;
    overflow-wrap: normal;
    white-space: normal;
    word-break: normal;
  }
  .chat-thread-badges {
    display: none;
  }
  .chat-thread-update {
    line-height: 1.3;
    overflow-wrap: break-word;
  }
  .chat-message {
    padding: .8rem;
  }
  .chat-reply-form select,
  .chat-reply-form textarea,
  .chat-reply-form button {
    max-width: 100%;
    width: 100%;
  }
  .chat-receipt-mobile { display: block; }
  .chat-receipt-desktop { display: none; }
  .sessions-actions,
  .card-actions,
  .form-actions {
    display: grid;
    gap: .5rem;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }
  .sessions-actions .btn,
  .sessions-actions a,
  .sessions-actions form,
  .card-actions .btn,
  .card-actions a,
  .card-actions button,
  .card-actions input,
  .form-actions .btn,
  .form-actions a,
  .form-actions button {
    width: 100%;
  }
  .form-grid {
    gap: 1rem;
  }
  .form-field {
    border-bottom: 1px solid var(--slate-100);
    padding-bottom: .85rem;
  }
  .form-field:last-of-type {
    border-bottom: 0;
  }
  .form-field label {
    font-size: .82rem;
  }
  .form-field input,
  .form-field select,
  .form-field textarea {
    font-size: .95rem;
    min-height: 2.8rem;
  }
  .mobile-menu-panel {
    max-height: calc(100vh - 6.5rem);
    overflow-y: auto;
  }
  .dashboard-heading {
    align-items: stretch;
    flex-direction: column;
  }
  .dashboard-sync-form .btn {
    width: 100%;
  }
  .dashboard-heading h2 { font-size: 1.55rem; }
  .dashboard-filters {
    grid-template-columns: 1fr;
  }
  .dashboard-filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .dashboard-kpis {
    gap: .55rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-kpi { padding: .8rem; }
  .dashboard-kpi span {
    font-size: .68rem;
    min-height: 2.3rem;
  }
  .dashboard-kpi strong { font-size: 1.5rem; }
  .dashboard-rates,
  .dashboard-chart-grid,
  .dashboard-feed-grid {
    gap: .55rem;
    grid-template-columns: 1fr;
  }
  .dashboard-chart,
  .dashboard-shortcuts,
  .dashboard-feed { padding: .85rem; }
  .dashboard-shortcut-grid { grid-template-columns: 1fr; }
  .public-menu {
    display: grid;
    gap: .4rem;
  }
  .public-menu .btn {
    padding: .55rem .75rem;
  }
  .assistant-hero,
  .assistant-profile,
  .assistant-section-title {
    align-items: stretch;
    flex-direction: column;
  }
  .assistant-hero {
    display: flex;
    padding: 1rem;
  }
  .assistant-hero h2 {
    font-size: 1.8rem;
  }
  .assistant-search {
    grid-template-columns: 1fr;
  }
  .assistant-search .btn,
  .assistant-hero .btn,
  .assistant-card .btn {
    width: 100%;
  }
  .assistant-profile,
  .assistant-grid,
  .assistant-session-list article {
    grid-template-columns: 1fr;
  }
  .assistant-profile,
  .assistant-card {
    padding: .9rem;
  }
  .assistant-profile h3 {
    font-size: 1.2rem;
    overflow-wrap: anywhere;
  }
  .assistant-badges span {
    border-radius: .45rem;
  }
  .assistant-session-status p {
    font-size: .78rem;
    overflow-wrap: anywhere;
  }
  .assistant-chat-page {
    min-height: calc(100vh - 7rem);
  }
  .assistant-chat-shell {
    border-radius: .65rem;
    min-height: calc(100vh - 8rem);
  }
  .assistant-chat-header {
    align-items: stretch;
    flex-direction: column;
    padding: .9rem;
  }
  .assistant-chat-header h2 {
    font-size: 1.55rem;
  }
  .assistant-message {
    max-width: 94%;
  }
  .assistant-chat-form {
    grid-template-columns: 1fr;
  }
  .assistant-chat-form .btn {
    width: 100%;
  }
  .auth-assistant-progress ol {
    grid-template-columns: 1fr;
  }
  .auth-assistant-progress li {
    border-radius: .45rem;
    text-align: left;
  }
  .formatech-floating-assistant {
    bottom: .9rem;
    font-size: .78rem;
    padding: .7rem .82rem;
    right: .85rem;
  }
  .formatech-chat-widget {
    bottom: 4.65rem;
    max-height: min(31rem, calc(100vh - 6rem));
    right: .65rem;
    width: calc(100vw - 1.3rem);
  }
  .formatech-chat-form {
    grid-template-columns: 1fr;
  }
  .formatech-chat-form button {
    min-height: 2.45rem;
    width: 100%;
  }
}
