:root {
  --blue: #1f4e78;
  --blue2: #2f75b5;
  --pale: #eaf3fa;
  --line: #d7dde3;
  --text: #1f2933;
  --muted: #68737d;
  --success: #1f7a43;
  --danger: #a83232;
  --white: #fff;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; color: var(--text); background: #f4f6f8; line-height: 1.45; }
.site-header { background: var(--blue); color: white; padding: 16px 0; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.header-inner { width: min(1180px, 94%); margin: auto; display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.brand-wrap { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 42px; height: 38px; object-fit: contain; background: white; border-radius: 3px; padding: 2px; }
.company { font-weight: 700; letter-spacing: .2px; }
.project { font-size: 14px; opacity: .9; }
.app-name { font-weight: 700; font-size: 18px; }
.container { width: min(1180px, 94%); margin: 24px auto 50px; }
footer { text-align: center; padding: 20px; color: var(--muted); font-size: 12px; }
h1 { color: var(--blue); margin: 0 0 8px; }
h2 { color: var(--blue); font-size: 19px; margin: 0 0 14px; }
h3 { color: var(--blue); }
.page-heading { margin-bottom: 18px; }
.form-card, .review-card, .dash-section, .login-card, .success-card, .error-card { background: white; border-radius: 10px; box-shadow: 0 1px 5px rgba(0,0,0,.08); padding: 22px; margin-bottom: 18px; }
.form-card > section { margin-bottom: 28px; }
.grid.two, .details-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
label { display: block; font-weight: 700; font-size: 14px; color: #33404a; }
input { width: 100%; margin-top: 6px; padding: 11px 12px; border: 1px solid #bbc5ce; border-radius: 6px; font-size: 15px; background: white; }
.memory-note, .small, .muted { color: var(--muted); font-size: 13px; }
.memory-note { margin-top: 10px; padding: 9px 11px; background: #f6f8fa; border-radius: 6px; }
.text-button { padding: 0; margin-left: 6px; border: 0; background: transparent; color: var(--blue2); font-weight: 700; text-decoration: underline; }
.question-section h2 { background: var(--pale); padding: 10px 12px; border-left: 4px solid var(--blue2); }
.question-table { border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.question-row { display: grid; grid-template-columns: 44px 1fr 74px 74px; border-bottom: 1px solid var(--line); align-items: stretch; }
.question-row:last-child { border-bottom: 0; }
.q-number, .q-text, .choice { padding: 10px 9px; }
.q-number { text-align: center; font-weight: 700; background: #fafbfc; border-right: 1px solid var(--line); }
.q-text { border-right: 1px solid var(--line); }
.choice { display: flex; align-items: center; justify-content: center; gap: 6px; border-right: 1px solid var(--line); cursor: pointer; font-size: 13px; }
.choice:last-child { border-right: 0; }
.choice input { width: auto; margin: 0; }
.declaration { background: #f7fafc; border: 1px solid var(--line); padding: 14px 16px; border-radius: 7px; }
.signature-block { margin-top: 20px; max-width: 760px; }
.signature-block.optional { padding-top: 12px; border-top: 1px solid var(--line); }
.signature-pad { width: 100%; height: 180px; display: block; background: white; border: 2px dashed #9aa8b3; border-radius: 7px; touch-action: none; margin: 8px 0; }
button, .button-link { border: 0; border-radius: 6px; padding: 11px 16px; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; display: inline-block; }
.primary, .button-link { background: var(--blue); color: white; }
.secondary { background: #eef1f4; color: #24313b; }
.secondary-link { background: #eef1f4; color: #24313b; }
.whatsapp { background: #1e8e52; }
.submit-bar { position: sticky; bottom: 0; background: rgba(255,255,255,.94); border-top: 1px solid var(--line); padding: 14px 0 2px; text-align: right; }
.success-card { border-top: 5px solid var(--success); }
.error-card, .alert { border-top: 5px solid var(--danger); }
.login-card { max-width: 520px; margin: 50px auto; }
.login-card label { margin-bottom: 14px; }
.dashboard-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 18px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 9px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f5f8fa; color: #40505e; font-size: 13px; }
.mini-link { color: var(--blue2); font-weight: 700; }
.batch-ready { display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid var(--line); border-radius: 7px; padding: 13px; margin: 8px 0; }
.details-grid div { padding: 10px; border: 1px solid var(--line); border-radius: 6px; }
.details-grid span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); margin-bottom: 3px; }
.review-card.compact { padding: 16px 18px; }
.review-q { display: flex; gap: 16px; justify-content: space-between; padding: 7px 2px; border-bottom: 1px solid #edf0f2; font-size: 13px; }
.review-q:last-child { border-bottom: none; }
.ans { flex: 0 0 48px; text-align: center; font-size: 12px; }
.ans.yes { color: var(--success); }
.ans.no { color: var(--danger); }
.signature-preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.signature-preview-grid > div { border: 1px solid var(--line); border-radius: 7px; padding: 12px; }
.signature-preview-grid img { max-width: 100%; height: 90px; object-fit: contain; display: block; margin: 8px 0; border-bottom: 1px solid var(--line); }
.pm-detail { border: 1px solid var(--line); border-radius: 7px; margin: 10px 0; background: #fbfcfd; }
.pm-detail summary { cursor: pointer; padding: 12px 14px; font-weight: 700; color: var(--blue); }
.pm-detail[open] { padding-bottom: 15px; }
.pm-detail[open] > *:not(summary) { margin-left: 14px; margin-right: 14px; }
.small-details { margin-top: 10px; }
.mini-heading { font-size: 14px; margin: 17px 0 6px; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.small-card { max-width: 650px; }
@media (max-width: 760px) {
  .header-inner { align-items: flex-start; flex-direction: column; gap: 7px; }
  .grid.two, .details-grid, .signature-preview-grid { grid-template-columns: 1fr; }
  .question-row { grid-template-columns: 34px 1fr 58px 58px; }
  .q-number, .q-text, .choice { padding: 8px 6px; }
  .q-text { font-size: 13px; }
  .dashboard-head, .batch-ready { flex-direction: column; align-items: stretch; }
  .submit-bar { text-align: stretch; }
  .submit-bar button { width: 100%; }
}
.warning-card { background: white; border-radius: 10px; box-shadow: 0 1px 5px rgba(0,0,0,.08); padding: 22px; margin-bottom: 18px; border-top: 5px solid #b7791f; }
.warning-card h1 { color: #8a5a14; }
.cleanup-summary { background: #fff9ec; border: 1px solid #ead8ad; border-radius: 7px; padding: 13px; margin: 16px 0; }
.danger-button, .danger-link { background: #a83232; color: white; }
.danger-link { border: 0; border-radius: 5px; padding: 7px 10px; font-weight: 700; cursor: pointer; }
.inline-form { display: inline; margin: 0; }
.batch-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.compact-notice { padding: 12px 16px; }
