:root {
  --brand: #111827;
  --brand-soft: #eef2f7;
  --ink: #18202a;
  --muted: #667085;
  --line: #e5e7eb;
  --bg: #f5f7fa;
  --card: #ffffff;
  --success: #067647;
  --warning: #b54708;
  --danger: #b42318;
  --radius: 18px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
.shell { min-height: 100vh; }
.portal-header { background: var(--brand); color: white; padding: 18px 24px; }
.portal-header-inner { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; gap: 20px; justify-content: space-between; }
.company-mark { display: flex; align-items: center; gap: 12px; min-width: 0; }
.company-logo-placeholder { width: 44px; height: 44px; border-radius: 12px; background: white; color: var(--brand); display: grid; place-items: center; font-weight: 900; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.company-name { font-weight: 800; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; gap: 8px; flex-wrap: wrap; }
.nav a { padding: 9px 12px; border-radius: 10px; opacity: .92; }
.nav a:hover, .nav a.active { background: rgba(255,255,255,.14); opacity: 1; }
.container { max-width: 1120px; margin: 0 auto; padding: 34px 24px 64px; }
.hero { margin-bottom: 28px; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 800; }
h1 { margin: 6px 0 8px; font-size: clamp(30px, 5vw, 48px); line-height: 1.05; }
h2 { margin: 0 0 16px; font-size: 24px; }
h3 { margin: 0 0 8px; font-size: 18px; }
p { line-height: 1.6; }
.muted { color: var(--muted); }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: 0 8px 30px rgba(16,24,40,.04); }
.job-card { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.meta { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.badge { display: inline-flex; width: fit-content; align-items: center; border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 800; background: #ecfdf3; color: var(--success); }
.badge.pending { background: #fff7ed; color: var(--warning); }
.button { appearance: none; border: 0; border-radius: 12px; padding: 11px 15px; background: var(--brand); color: white; font-weight: 800; cursor: pointer; display: inline-flex; justify-content: center; align-items: center; gap: 8px; }
.button.secondary { background: white; color: var(--ink); border: 1px solid var(--line); }
.button.danger { background: var(--danger); }
.button.small { padding: 8px 11px; font-size: 13px; }
.section { margin-top: 30px; }
.quick-actions { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.quick-actions a { min-height: 100px; display: flex; flex-direction: column; justify-content: space-between; }
.doc-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.doc-row:first-child { border-top: 0; }
.doc-type { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; }
.footer { max-width: 1120px; margin: 0 auto 28px; padding: 0 24px; }
.powered { display: inline-flex; align-items: center; gap: 10px; background: white; border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; color: var(--muted); font-size: 12px; }
.powered img { width: 122px; height: auto; display: block; }
form { display: grid; gap: 14px; }
label { display: grid; gap: 7px; font-size: 13px; font-weight: 700; }
input, textarea, select { width: 100%; border: 1px solid #d0d5dd; border-radius: 11px; padding: 11px 12px; background: white; color: var(--ink); }
textarea { min-height: 130px; resize: vertical; }
.alert { padding: 12px 14px; border-radius: 12px; background: #eff8ff; color: #175cd3; border: 1px solid #b2ddff; }
.equipment-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 18px; }
.equipment-fields div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.equipment-fields strong { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .05em; }

/* ServiceM8 action simulator */
.action-shell { max-width: 680px; margin: 30px auto; padding: 0 18px; }
.action-brand { display:flex; justify-content:center; margin-bottom:18px; }
.action-brand img { width: 220px; height:auto; }
.toggle-row { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }
.toggle-row:first-of-type { border-top: 0; }
.switch { position: relative; width: 52px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background: #d0d5dd; border-radius: 999px; transition: .2s; cursor:pointer; }
.slider:before { content: ""; position:absolute; width:24px; height:24px; left:3px; top:3px; background:white; border-radius:50%; box-shadow:0 1px 3px rgba(0,0,0,.2); transition:.2s; }
.switch input:checked + .slider { background: #12b76a; }
.switch input:checked + .slider:before { transform: translateX(22px); }
.code { background:#101828;color:#e4e7ec;border-radius:12px;padding:14px;overflow:auto;font:12px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace; }

@media (max-width: 760px) {
  .portal-header-inner { align-items: flex-start; flex-direction: column; }
  .nav { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 3px; }
  .grid.two, .grid.three, .quick-actions, .equipment-fields { grid-template-columns: 1fr; }
  .container { padding: 26px 16px 48px; }
  .footer { padding: 0 16px; }
}

/* Customer authentication */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 28px 18px; background: linear-gradient(180deg,var(--brand) 0 34%,var(--bg) 34% 100%); }
.auth-card { width: min(100%, 480px); background: white; border: 1px solid var(--line); border-radius: 22px; padding: 26px; box-shadow: 0 22px 60px rgba(16,24,40,.14); }
.auth-company { display:flex; align-items:center; gap:12px; padding-bottom:18px; margin-bottom:22px; border-bottom:1px solid var(--line); }
.auth-heading { margin-bottom:22px; }
.auth-heading h1 { font-size:38px; }
.auth-powered { display:flex; justify-content:center; align-items:center; gap:10px; padding-top:22px; margin-top:24px; border-top:1px solid var(--line); color:var(--muted); font-size:12px; }
.auth-powered img { width:118px; height:auto; background:#fff; }
.code-input { font-size:26px; letter-spacing:.28em; text-align:center; font-weight:800; }
.poc-code { margin: 16px 0; padding:14px; border-radius:12px; border:1px dashed #f79009; background:#fffaeb; display:flex; align-items:center; justify-content:space-between; gap:14px; color:#93370d; }
.poc-code span { font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.08em; }
.poc-code strong { font-size:24px; letter-spacing:.16em; }
.small-text { font-size:12px; }
.footer-row { display:flex; justify-content:space-between; align-items:center; gap:16px; }
@media (max-width:760px){.footer-row{align-items:flex-start;flex-direction:column}.auth-wrap{padding:18px 12px}.auth-card{padding:20px}.auth-heading h1{font-size:34px}}
