:root {
  --primary: #006ab5;
  --primary-dark: #00538f;
  --success: #009416;
  --warning: #eda509;
  --danger: #c22515;
  --text: #333333;
  --muted: #667085;
  --line: #d8dee6;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --blue-light: #eaf4fb;
  --green-light: #eaf7ec;
  --yellow-light: #fff7e3;
  --red-light: #fcecea;
  --radius: 6px;
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Arial, Helvetica, sans-serif; line-height: 1.5; }
a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.app-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand img { display: block; width: 310px; max-width: 55vw; height: auto; }
.main-nav { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.main-nav a { padding: 10px 12px; border-radius: 4px; color: var(--text); font-weight: 700; font-size: .92rem; }
.main-nav a:hover { background: var(--blue-light); text-decoration: none; color: var(--primary-dark); }
.main-content { min-height: calc(100vh - 145px); padding: 30px 0 48px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
h1, h2, h3 { color: var(--primary-dark); margin-top: 0; }
h1 { font-size: clamp(1.65rem, 3vw, 2.15rem); margin-bottom: 0; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; }
.app-footer { border-top: 1px solid var(--line); background: #fff; padding: 16px 0; color: var(--muted); font-size: .85rem; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; }
.panel-blue { border-left: 5px solid var(--primary); background: var(--blue-light); }
.panel-green { border-left: 5px solid var(--success); background: var(--green-light); }
.panel-yellow { border-left: 5px solid var(--warning); background: var(--yellow-light); }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card-number { font-size: 2rem; line-height: 1; color: var(--primary-dark); font-weight: 700; margin-bottom: 8px; }
.card-label { color: var(--muted); }
label { display: block; font-weight: 700; margin-bottom: 6px; }
.help-text { color: var(--muted); font-size: .9rem; margin: 4px 0 8px; }
.required { color: var(--danger); }
.form-row { margin-bottom: 18px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=url], select, textarea {
  width: 100%; border: 1px solid #aeb8c5; border-radius: 4px; padding: 11px 12px; background: #fff; color: var(--text); font: inherit; box-shadow: none;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(0,106,181,.15); border-color: var(--primary); }
.choice-list { display: grid; gap: 8px; }
.choice { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; padding: 9px 10px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.choice input { margin-top: 4px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 16px; border: 1px solid transparent; border-radius: 4px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; box-shadow: none; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: #fff; border-color: #9aa6b2; color: var(--text); }
.btn-secondary:hover { background: #f4f6f8; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-small { min-height: 34px; padding: 7px 10px; font-size: .88rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--primary-dark); color: #fff; font-size: .88rem; }
tr:last-child td { border-bottom: 0; }
.status { display: inline-block; padding: 4px 8px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: #eef1f4; }
.status-draft { color: #555; }
.status-in_progress { background: var(--yellow-light); color: #805400; }
.status-completed { background: var(--green-light); color: #087719; }
.alert { border: 1px solid var(--line); border-left-width: 5px; border-radius: 4px; background: #fff; padding: 13px 15px; margin-bottom: 18px; }
.alert-success { border-left-color: var(--success); background: var(--green-light); }
.alert-error { border-left-color: var(--danger); background: var(--red-light); }
.alert-warning { border-left-color: var(--warning); background: var(--yellow-light); }
.alert-info { border-left-color: var(--primary); background: var(--blue-light); }
.login-shell { width: min(520px, calc(100% - 32px)); margin: 46px auto; }
.login-logo { text-align: center; margin-bottom: 24px; }
.login-logo img { width: min(420px, 90%); height: auto; }
.login-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.progress-wrap { margin-bottom: 22px; }
.progress-meta { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; color: var(--muted); margin-bottom: 7px; }
.progress { height: 12px; background: #e4e9ee; border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--primary); }
.step-intro { background: var(--blue-light); border-left: 5px solid var(--primary); padding: 16px; margin-bottom: 22px; }
.field-error { color: var(--danger); font-size: .86rem; margin-top: 5px; }
.signature-wrap { border: 1px solid #9aa6b2; border-radius: 4px; background: #fff; }
#signature-pad { display: block; width: 100%; height: 210px; touch-action: none; }
.signature-tools { padding: 8px; border-top: 1px solid var(--line); }
.autosave-status { color: var(--muted); font-size: .85rem; margin-left: auto; }
.autosave-status.is-error { color: var(--danger); font-weight: 700; }
.empty { text-align: center; padding: 32px; color: var(--muted); }
.code { font-family: Consolas, Monaco, monospace; background: #f0f2f4; border: 1px solid var(--line); padding: 10px; overflow-wrap: anywhere; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
@media (max-width: 860px) {
  .header-inner { align-items: flex-start; flex-direction: column; padding: 18px 0; }
  .brand img { max-width: 90vw; }
  .main-nav { justify-content: flex-start; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .page-heading { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 560px) {
  .container { width: min(100% - 20px, 1180px); }
  .panel, .card, .login-panel { padding: 16px; }
  .btn { width: 100%; }
  .actions { align-items: stretch; flex-direction: column; }
}

.version-number { font-size: 2.4rem; line-height: 1; font-weight: 700; color: var(--primary-dark); margin: 8px 0 18px; }
.danger-zone { border-color: #e5a7a0; background: var(--red-light); }
.inline-form { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.delete-confirm-input { max-width: 145px !important; padding: 7px 9px !important; }
.form-actions-cell { min-width: 220px; }
