:root {
  --ink: #17202a;
  --muted: #687381;
  --line: #dfe4e9;
  --paper: #ffffff;
  --canvas: #f4f6f8;
  --blue: #0d83c5;
  --blue-dark: #086b9f;
  --navy: #152c3c;
  --green: #18794e;
  --red: #b42318;
  --shadow: 0 14px 38px rgba(18, 38, 54, .08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--canvas); }
button, input, textarea, select { font: inherit; }
.topbar { background: var(--navy); color: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.topbar-inner { max-width: 1220px; min-height: 68px; margin: auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand-row { display: flex; align-items: center; gap: 13px; font-weight: 700; letter-spacing: .01em; }
.brand-mark { display: inline-grid; place-items: center; width: 68px; height: 44px; border-radius: 9px; color: #fff; background: var(--blue); font-weight: 800; font-size: 22px; letter-spacing: -.06em; }
.brand-mark.small { width: 51px; height: 34px; border-radius: 6px; font-size: 17px; }
.top-actions { display: flex; align-items: center; gap: 15px; }
.security-note { color: #cfe8f6; font-size: 13px; }
.shell { max-width: 1220px; margin: auto; padding: 46px 24px 72px; }
.intro { max-width: 760px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 8px; color: var(--blue-dark); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 0 0 10px; font-size: clamp(30px, 4vw, 46px); line-height: 1.08; letter-spacing: -.035em; }
.intro > p:last-child, .muted { color: var(--muted); }
.workspace { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(330px, .8fr); gap: 24px; align-items: start; }
.flow-column, .result-column { display: grid; gap: 24px; }
.panel, .safety-card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 26px; }
.step-heading { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 24px; }
.step-heading > span { flex: 0 0 auto; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #e6f4fb; color: var(--blue-dark); font-weight: 800; }
.step-heading h2 { margin: 0 0 4px; font-size: 20px; }
.step-heading p { margin: 0; color: var(--muted); font-size: 14px; }
label { display: grid; gap: 8px; margin-bottom: 17px; font-size: 13px; font-weight: 700; color: #35424d; }
input, textarea, select { width: 100%; border: 1px solid #cbd3da; border-radius: 8px; background: #fff; color: var(--ink); padding: 11px 12px; outline: none; transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(13,131,197,.13); }
.field-grid { display: grid; gap: 0 18px; }
.field-grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.button { appearance: none; border: 0; border-radius: 8px; min-height: 42px; padding: 0 18px; font-weight: 750; cursor: pointer; transition: background .15s, transform .05s, opacity .15s; }
.button:active { transform: translateY(1px); }
.button.primary { background: var(--blue); color: #fff; }
.button.primary:hover { background: var(--blue-dark); }
.button.ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.3); }
.button:disabled { opacity: .45; cursor: not-allowed; }
.button.wide { width: 100%; margin-top: 12px; }
.button-row { display: flex; align-items: center; gap: 14px; }
.disabled-panel { opacity: .62; }
.license-summary { margin: -4px 0 20px; padding: 15px 16px; border-left: 4px solid var(--blue); background: #f1f8fc; border-radius: 4px 8px 8px 4px; font-size: 14px; line-height: 1.6; }
.confirm-row { grid-template-columns: 20px 1fr; align-items: start; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfc; }
.confirm-row input { width: 18px; height: 18px; margin: 0; }
.result-panel { position: sticky; top: 22px; }
.empty-state { min-height: 310px; display: grid; place-content: center; justify-items: center; text-align: center; color: var(--muted); padding: 24px; }
.empty-icon { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 12px; border: 1px solid #bcdbea; border-radius: 50%; color: var(--blue); font-size: 28px; }
#response-text { min-height: 340px; background: #f8fafb; font-family: inherit; font-size: 14px; }
.manager-notes { margin-top: 18px; padding: 13px 15px; border-radius: 8px; background: #fff8e6; color: #745a12; font-size: 13px; line-height: 1.5; }
.safety-card { border-left: 4px solid var(--green); box-shadow: none; }
.safety-card h3 { margin: 0 0 8px; font-size: 15px; }
.safety-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.alert { margin-bottom: 22px; border: 1px solid #f1b3ae; border-radius: 10px; background: #fff1f0; color: var(--red); padding: 13px 16px; }
.success-note { min-height: 20px; margin: 8px 0 0; color: var(--green); font-size: 13px; }
.form-error { color: var(--red); margin: 0 0 12px; }
.hidden { display: none !important; }
.login-body { display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 15%, #e0f3fb 0, transparent 32%), var(--canvas); }
.login-card { width: min(430px, 100%); padding: 38px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.login-card h1 { margin-top: 18px; font-size: 31px; }
.login-form { margin-top: 26px; }
.login-form .button { width: 100%; }
@media (max-width: 880px) {
  .workspace { grid-template-columns: 1fr; }
  .result-panel { position: static; }
  .security-note { display: none; }
}
@media (max-width: 560px) {
  .shell { padding: 30px 15px 50px; }
  .topbar-inner { padding: 0 15px; }
  .field-grid.two { grid-template-columns: 1fr; }
  .panel, .safety-card, .login-card { padding: 21px; }
}
