/* OkPyme interface foundations. One type family and one spacing scale. */
@font-face {
  font-family: 'Source Sans 3';
  src: url('fonts/source-sans-3.woff2') format('woff2');
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
:root {
  --ui-font: 'Source Sans 3', 'Segoe UI', Arial, sans-serif;
  --space-section: 24px;
  --space-card: 24px;
  --space-field: 16px;
  --space-small: 8px;
  --bg: #f5f7f9;
  --text: #283c48;
  --ink: #183645;
  --muted: #627482;
  --line: #dde5ea;
  --shadow: 0 4px 16px rgba(24,54,69,.04);
}
body { font-family: var(--ui-font); font-size: 15px; font-weight: 400; line-height: 1.5; background: var(--bg); }
button, input, select, textarea { font-family: inherit; }
h1, h2, h3, strong, b { font-weight: 600; }
h1, h2, h3 { letter-spacing: -.015em; line-height: 1.3; }
p { margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }
button, .button-light, .button-primary {
  font-size: 14px; font-weight: 500; border-radius: 6px;
  min-height: 38px; height: auto; line-height: 1.4; padding: 8px 14px;
  white-space: normal; overflow: visible; max-width: 100%; gap: 8px;
}
button svg, .button-light svg, .button-primary svg { flex-shrink: 0; }
label { font-size: 14px; font-weight: 500; gap: 6px; }
form { gap: var(--space-field); }
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]), select, textarea {
  font-size: 15px; font-weight: 400; border-radius: 6px;
  min-height: 38px; padding: 7px 10px; line-height: 1.5;
}
input[type=checkbox], input[type=radio] { min-height: 18px; width: 18px; height: 18px; padding: 0; }
textarea { min-height: 96px; }
.app-shell { grid-template-columns: 224px minmax(0,1fr); }
.sidebar { padding: 24px 16px; gap: 24px; }
.brand img { max-width: 132px; max-height: 36px; }
.brand strong { font-size: 11px; font-weight: 500; padding: 3px 7px; }
.sidebar nav { gap: 4px; }
.sidebar nav a, .sidebar nav summary { font-size: 14px; font-weight: 500; padding: 9px 12px; border-radius: 6px; line-height: 1.4; }
.sidebar .nav-sub a { font-size: 13px; padding: 7px 10px; }
.sidebar-user { gap: 4px; padding-top: 16px; }
.sidebar-user strong { font-size: 14px; }
.sidebar-user a, .sidebar-user span { font-size: 13px; font-weight: 400; }
.sidebar-user .portal-install-sidebar { min-height: 36px; padding: 8px 10px; border-radius: 6px; margin-bottom: 8px; }
.sidebar-user .portal-install-sidebar span { font-size: 13px; font-weight: 500; }
.main { padding: 28px 32px; }
.workspace-bar { font-size: 13px; }
.page-head h1 { font-size: 28px; margin: 0 0 8px; }
.page-head p { font-size: 15px; margin: 0; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .08em; }
.panel, .metrics article { padding: var(--space-card); border-radius: 8px; box-shadow: none; border-color: var(--line); }
.panel h2 { font-size: 18px; font-weight: 600; margin: 0 0 16px; line-height: 1.35; }
.panel h3 { font-size: 16px; font-weight: 600; }
.metrics { gap: var(--space-section); }
.metrics strong { font-size: 28px; line-height: 1.2; font-weight: 500; font-variant-numeric: tabular-nums; }
.metrics span { font-size: 14px; }
.grid-2, .billing-layout, .document-actions-grid, .mfa-settings { gap: var(--space-section); align-items: start; }
.table-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
table { font-size: 14px; }
th { font-size: 12px; font-weight: 600; padding: 12px; letter-spacing: .015em; }
td { padding: 12px; vertical-align: middle; line-height: 1.5; }
td button, td .button-light { font-size: 13px; min-height: 34px; padding: 6px 10px; }
td form { margin: 0; }
.actions, .row-actions, .billing-actions { flex-wrap: wrap; gap: 8px; }
.tabs-row { gap: 8px; }
.tabs-row a { font-size: 14px; font-weight: 500; border-radius: 6px; padding: 8px 14px; }
.list-toolbar label, .panel-title-row strong { font-size: 14px; font-weight: 500; }
.welcome-panel { padding: 32px; border-radius: 8px; gap: 32px; }
.welcome-panel h1 { font-size: 32px; font-weight: 500; margin: 8px 0 12px; line-height: 1.2; }
.welcome-panel p { font-size: 15px; line-height: 1.6; max-width: 64ch; }
.welcome-actions { margin-top: 24px; gap: 12px; }
.welcome-context { padding-left: 24px; gap: 8px; }
.welcome-context strong { font-size: 18px; font-weight: 500; }
.service-grid { gap: var(--space-section); }
.service-card { padding: var(--space-card); border-radius: 8px; box-shadow: none; }
.service-card h2 { font-size: 18px; font-weight: 600; margin: 16px 0 8px; }
.service-card p { font-size: 15px; margin-bottom: 24px; line-height: 1.5; }
.service-icon { width: 36px; height: 36px; border-radius: 8px; }
.service-icon svg { width: 22px; height: 22px; }
.service-link { font-size: 14px; font-weight: 600; }
.pending-batches-list { gap: 12px; }
.pending-batch-item { padding: 16px; border-radius: 6px; gap: 16px; }
.pending-batch-item strong { font-size: 15px; font-weight: 600; }
.pending-batch-item small { font-size: 12px; }
.pending-batch-item span { font-size: 14px; }
.recent-document { padding: 16px 0; gap: 16px; }
.document-icon { width: 36px; height: 40px; flex-basis: 36px; }
.upload-disclosure { border-radius: 8px; }
.upload-disclosure>summary { padding: 16px 24px; font-size: 15px; font-weight: 600; }
.portal-footer { padding-top: 16px; font-size: 12px; }
.portal-install-banner { padding: 16px 48px 16px 24px; border-radius: 8px; gap: 16px; box-shadow: none; }
.portal-install-banner>img { width: 36px; height: 36px; flex-basis: 36px; }
.portal-install-copy h2 { font-size: 16px; font-weight: 600; }
.portal-install-copy p { font-size: 14px; }
.portal-install-dismiss { min-height: 32px; width: 32px; height: 32px; padding: 0; font-size: 22px; }
/* Original sign-in composition, logo, gradient background and accent retained. */
.auth-page { --text:#183242; --ink:#102b3a; --muted:#627482; --line:rgba(0,114,153,.14); --shadow:0 18px 48px rgba(6,71,93,.1); }
.login-brand span { font-size: 12px; font-weight: 500; }
.auth-card h1 { font-size: 26px; font-weight: 500; line-height: 1.25; }
.auth-card p { font-size: 14px; line-height: 1.5; }
.auth-card label { font-size: 14px; font-weight: 500; }
.auth-card button { font-size: 14px; font-weight: 500; min-height: 38px; padding: 8px 12px; }
.auth-card form { gap: 16px; }
.auth-card form + p { margin-top: 16px; }
.mfa-form .mfa-otp { font-size: 22px; letter-spacing: .2em; }
.notice, .flash { font-size: 14px; overflow-wrap: anywhere; }
.crm-due-notice { font-size: 12px; color: #85551d; background: #fff0dc; padding: 6px 10px; border-radius: 5px; white-space: normal; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid #007299; outline-offset: 3px; }
/* Layout owns external spacing: cards never add another margin to grid gaps. */
@media screen {
  .main { display: flex; flex-direction: column; gap: var(--space-section); }
  .app-shell > .main > :not(script):not(style), .app-shell > .main > .panel { margin-block: 0; }
  .billing-forms:has(>[hidden]):not(:has(>:not([hidden]))) { display: none; }
  .main > * { flex-shrink: 0; }
  .grid-2 > .panel, .billing-layout > .panel, .document-actions-grid > .panel { margin-block: 0; }
}
@media(max-width:1100px) {
  .app-shell { grid-template-columns: 208px minmax(0,1fr); }
  .main { padding: 24px; }
  .welcome-panel { grid-template-columns: 1fr; }
  .welcome-context { display: none; }
}
@media(max-width:900px) {
  :root { --space-section: 20px; --space-card: 20px; }
  .app-shell { display: block; }
  .sidebar { height: auto; position: relative; padding: 16px; gap: 16px; }
  .main { padding: 20px 16px; }
  .menu-toggle, .sidebar nav a, .sidebar nav summary { min-height: 40px; }
  .page-head h1 { font-size: 26px; }
  .welcome-panel { padding: 24px; }
  .welcome-panel h1 { font-size: 28px; }
  .service-grid { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  button, .button-light, .button-primary, .auth-card button { min-height: 40px; }
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]), select, textarea { font-size: 16px; min-height: 40px; }
  .portal-install-banner>[data-portal-install] { margin-left: 0; }
  .grid-2, .document-actions-grid, .billing-layout { grid-template-columns: minmax(0,1fr); }
}
@media print {
  .main { display: block; padding: 0; }
  .panel { box-shadow: none; }
  .welcome-panel, .welcome-panel p { background: #fff; color: #173044; }
}
