:root {
  font-family: "Segoe UI", Arial, sans-serif;
  color: #17233a;
  background: #eef5ff;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: linear-gradient(135deg, #eef5ff 0%, #e4eaff 100%) fixed; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
:focus-visible { outline: 3px solid #3b82f6; outline-offset: 3px; }

.portal-top { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 clamp(18px, 5vw, 72px); background: #fff; border-bottom: 1px solid #dce4f1; }
.portal-brand { color: #17233a; text-decoration: none; font-weight: 800; font-size: 24px; letter-spacing: -.04em; }
.portal-brand::first-letter { color: #3b82f6; }
.portal-top > span, .portal-top-actions { color: #64748b; font-size: 14px; }
.portal-top-actions { display: flex; align-items: center; gap: 20px; }
.portal-back { color: #3b82f6; font-weight: 700; text-decoration: none; }
.portal-back:hover { text-decoration: underline; }
.portal-link-button { border: 0; padding: 8px 0; background: transparent; color: #3b82f6; font-weight: 700; }
.portal-link-button:hover { text-decoration: underline; }
.portal-main { width: min(1200px, 100%); margin: 0 auto; padding: clamp(32px, 5vw, 72px) 20px 80px; }
.portal-main.narrow { max-width: 700px; }
.portal-hero { max-width: 760px; margin-bottom: 34px; }
.portal-eyebrow { color: #3b82f6; font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; margin: 0 0 13px; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(32px, 4.5vw, 53px); line-height: 1.12; letter-spacing: -.045em; margin-bottom: 18px; }
h2 { font-size: 22px; line-height: 1.25; letter-spacing: -.025em; margin-bottom: 13px; }
.portal-lead { color: #64748b; font-size: 18px; line-height: 1.6; }
.portal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.portal-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.portal-card { padding: clamp(24px, 3vw, 35px); background: #fff; border: 1px solid #dce4f1; border-radius: 16px; box-shadow: 0 10px 32px rgba(24, 39, 76, .06); }
.portal-card > p { color: #64748b; line-height: 1.58; }
.portal-card-icon { width: 50px; height: 50px; display: grid; place-items: center; margin-bottom: 26px; border-radius: 12px; background: #eff6ff; color: #3b82f6; font-size: 25px; }
.portal-button { display: inline-flex; justify-content: center; align-items: center; min-height: 47px; padding: 12px 19px; border: 1px solid #3b82f6; border-radius: 9px; background: #3b82f6; color: white; text-decoration: none; font-weight: 750; line-height: 1.2; }
.portal-button:hover { background: #2563eb; }
.portal-button[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.portal-button.secondary { background: #fff; color: #3b82f6; }
.portal-button.secondary:hover { background: #eff6ff; }
.portal-button.compact { min-height: 40px; align-self: flex-start; font-size: 14px; }
.portal-form { display: grid; gap: 9px; margin-top: 22px; }
.portal-form label, .editor-controls label, .field-card label { color: #17233a; font-size: 14px; font-weight: 750; }
.portal-form input, .portal-form select, .editor-controls input, .editor-controls select, .field-card textarea { width: 100%; min-height: 45px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: #17233a; padding: 10px 12px; }
.portal-form input, .portal-form select { margin-bottom: 8px; }
.portal-form .portal-button { margin-top: 6px; }
.portal-message { min-height: 21px; margin: 13px 0 0; color: #3b82f6; font-size: 14px; }
.portal-message.error { color: #ad3e32; }
.portal-muted { color: #64748b; }
.editor-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.editor-controls > div { display: grid; gap: 8px; }
.field-list { display: grid; gap: 13px; margin-top: 18px; }
.other-text { margin-bottom: 20px; }
.other-text .portal-form { margin-top: 10px; }
.other-text textarea { width: 100%; border: 1px solid #cbd5e1; border-radius: 8px; padding: 10px 12px; resize: vertical; }
.field-card { display: grid; gap: 11px; padding: 19px 22px; }
.field-card textarea { min-height: 70px; resize: vertical; line-height: 1.55; }
.users-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; }
.user-list { display: grid; }
.user-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 14px 0; border-bottom: 1px solid #dce4f1; }
.user-row:last-child { border-bottom: 0; }
.user-row > div { display: grid; gap: 3px; }
.user-row strong { font-size: 15px; }
.user-row div span { color: #64748b; font-size: 13px; }
.role-pill { padding: 6px 9px; border-radius: 6px; background: #eff6ff; color: #3b82f6; font-size: 12px; font-weight: 700; white-space: nowrap; }
.manager-create { max-width: 760px; }
.manager-section { margin-top: 30px; }
.scenario-list { display: grid; gap: 12px; }
.scenario-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 19px 23px; }
.scenario-row > div:first-child { display: grid; gap: 6px; }
.scenario-row label { display: grid; gap: 5px; margin-top: 7px; font-size: 13px; font-weight: 700; color: #17233a; }
.scenario-row select { max-width: 310px; min-height: 38px; padding: 6px 9px; border: 1px solid #cbd5e1; border-radius: 7px; background: #fff; color: #17233a; }
.scenario-row strong { font-size: 17px; }
.scenario-row .portal-muted { font-size: 13px; }
.scenario-actions { display: flex; flex-wrap: wrap; gap: 9px; }
@media (max-width: 850px) { .portal-grid.three { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .portal-grid, .users-grid, .editor-controls { grid-template-columns: 1fr; } .portal-top { height: 66px; } .portal-main { padding-top: 34px; } .portal-card { padding: 23px; } .scenario-row { display: grid; } }
