/* PrismaWeb Admin + MLS — Unified Design System v1.0 (2026-10-31)
   Shared presentation only. No business logic, permissions, forms, or workflow states changed. */
:root {
  --pw-ink: #152238;
  --pw-muted: #617089;
  --pw-line: #dce4ef;
  --pw-panel: #ffffff;
  --pw-bg: #f3f6fb;
  --pw-blue: #173f70;
  --pw-blue-2: #245a91;
  --pw-blue-soft: #edf4fd;
  --pw-gold: #e5a21a;
  --pw-green: #176b4d;
  --pw-green-soft: #edf9f2;
  --pw-red: #a62d37;
  --pw-red-soft: #fff1f1;
  --pw-amber: #76500a;
  --pw-amber-soft: #fff8e7;
  --pw-radius: 14px;
  --pw-shadow: 0 10px 28px rgba(24, 47, 78, .065);
  --pw-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
html { color-scheme: light; }
body {
  background: var(--pw-bg) !important;
  color: var(--pw-ink) !important;
  font-family: var(--pw-font) !important;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* Keep typography identical across Admin, MLS, finance, newsletter and utility pages. */
body :where(h1,h2,h3,h4,h5,h6,p,li,dt,dd,label,legend,th,td,button,input,select,textarea,small,strong,em,b,i,summary,figcaption,caption) {
  font-family: var(--pw-font) !important;
}
body :where(h1,h2,h3,h4,h5,h6) { color: var(--pw-ink); font-weight: 780; line-height: 1.25; }
body :where(h1) { letter-spacing: -.032em; }
body :where(h2) { letter-spacing: -.018em; }
body :where(p,li,dd,dt) { line-height: 1.58; }
body :where(small,.small,.muted,.text-muted,.help,.hint,.description) { color: var(--pw-muted); }
body a { text-underline-offset: 3px; }
body a:focus-visible,
body button:focus-visible,
body input:focus-visible,
body select:focus-visible,
body textarea:focus-visible,
body summary:focus-visible {
  outline: 3px solid rgba(229,162,26,.72);
  outline-offset: 2px;
}
/* Consistent surfaces without imposing a fixed page layout. */
body :where(.card,.panel,.metric,.stat,.admin-card,.stat-card,.metric-card,.dashboard-card,.content-card,.section-card,.form-section,.pw-commission-card,.pw-commission-hero,.mls-workflow-card,.mls-workspace-workflow) {
  border-radius: var(--pw-radius);
}
body :where(.card,.panel,.metric,.stat,.admin-card,.stat-card,.metric-card,.dashboard-card,.content-card,.section-card,.form-section) {
  background: var(--pw-panel);
  border-color: var(--pw-line);
  box-shadow: var(--pw-shadow);
}
/* Form controls: uniform height, spacing, borders and keyboard focus. */
body :where(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=submit]):not([type=button]):not([type=file]),select,textarea) {
  max-width: 100%;
  border: 1px solid #c8d3e2;
  border-radius: 10px;
  background-color: #fff;
  color: var(--pw-ink);
  font-family: var(--pw-font) !important;
  font-size: .94rem;
  line-height: 1.45;
}
body :where(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=submit]):not([type=button]):not([type=file]),select) {
  min-height: 42px;
  padding: 9px 11px;
}
body textarea { padding: 10px 12px; }
body :where(input,select,textarea):focus-visible { border-color: var(--pw-blue-2); outline: 3px solid rgba(36,90,145,.15); outline-offset: 1px; }
body :where(input[type=checkbox],input[type=radio]) { accent-color: var(--pw-blue-2); }
body :where(button,.btn,.button,input[type=submit],input[type=button],.btn-primary,.button-primary) {
  font-family: var(--pw-font) !important;
  font-weight: 750;
  line-height: 1.3;
  border-radius: 10px;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
body :where(button,.btn,.button,input[type=submit],input[type=button],.btn-primary,.button-primary):hover { box-shadow: 0 5px 14px rgba(23,63,112,.12); }
body :where(button,.btn,.button,input[type=submit],input[type=button],.btn-primary,.button-primary):active { transform: translateY(1px); }
/* Primary controls share the Prisma blue; semantic danger/success/secondary classes keep their intent. */
body :where(button,.btn,.button,input[type=submit],input[type=button],.btn-primary,.button-primary):not(.danger):not(.btn-danger):not(.is-danger):not(.delete):not(.btn-delete):not(.remove):not(.btn-remove):not(.cancel):not(.btn-cancel):not(.secondary):not(.btn-secondary):not(.success):not(.btn-success):not(.warning):not(.btn-warning):not([data-variant="danger"]):not([data-variant="secondary"]) {
  border-color: var(--pw-blue);
}
/* Tables are predictable and readable across operational screens. */
body table { max-width: 100%; border-color: var(--pw-line); }
body :where(table) { border-collapse: separate; border-spacing: 0; }
body :where(th,td) { border-color: #e5ebf3; }
body :where(thead th,table th) { color: #354760; font-weight: 750; }
body :where(.table-wrap,.table-responsive,.table-scroll,.table-container) { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
body :where(tbody tr:hover) { background-color: #f8fbff; }
/* Shared navigation treatment; vertical Workspace sidebar is intentionally not flattened. */
body :where(.page-nav,.mls-nav,.pw-context-nav,.pw-admin-nav,.pw-commission-nav,.admin-nav,.toolbar,.action-bar) { gap: 8px; }
body :where(.page-nav a,.mls-nav a,.pw-context-nav a,.pw-admin-nav a,.pw-commission-nav a,.admin-nav a) {
  border-radius: 10px;
  text-decoration: none;
  text-underline-offset: 3px;
}
/* Semantic feedback states remain visibly distinct. */
body :where(.success,.alert-success,.notice-success,.status-success) { border-radius: 10px; }
body :where(.error,.alert-error,.notice-error,.status-error) { border-radius: 10px; }
body :where(.warning,.alert-warning,.notice-warning,.status-warning) { border-radius: 10px; }
body hr { border: 0; border-top: 1px solid var(--pw-line); }
body :where(pre,code,kbd,samp) { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important; }
@media (max-width: 760px) {
  body { font-size: 14px; }
  body :where(.card,.panel,.metric,.stat,.admin-card,.stat-card,.metric-card,.dashboard-card,.content-card,.section-card,.form-section) { border-radius: 12px; }
  body :where(input,select,textarea) { max-width: 100%; }
  body :where(.page-nav a,.mls-nav a,.pw-context-nav a,.pw-admin-nav a,.pw-commission-nav a) { min-height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  body *, body *::before, body *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
