
    :root {
      --bg: #F3F1EA;
      --ink: #171717;
      --yellow: #F3E9A8;
      --orange: #F0D0B0;
      --pink: #F0C5CF;
      --blue: #C7E1F2;
      --green: #D7E8CB;
      --scope-main-bg: #B8D7A6;
      --scope-main-ink: #173512;
      --scope-extra-bg: #E7D7F5;
      --scope-extra-ink: #3C2852;
      --white: #ffffff;
      --muted: #5c5c5c;
      --shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
      --radius-xl: 28px;
      --radius-lg: 22px;
      --radius-md: 16px;
    }

    * { box-sizing: border-box; }
    body {
      margin: 0;
      font-family: Inter, Arial, Helvetica, sans-serif;
      background: var(--bg);
      color: var(--ink);
    }

    .app {
      max-width: 1200px;
      margin: 0 auto;
      padding: 20px;
    }

    .shell {
      border: 8px solid var(--ink);
      border-radius: 34px;
      background: var(--bg);
      box-shadow: var(--shadow);
      overflow: hidden;
    }

    .header {
      border-bottom: 4px solid var(--ink);
      padding: 24px;
      display: flex;
      gap: 16px;
      align-items: flex-start;
      justify-content: space-between;
      flex-wrap: wrap;
    }

    .brand {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .brand-title {
      font-size: clamp(28px, 4vw, 46px);
      font-weight: 900;
      letter-spacing: -0.03em;
      line-height: 1;
    }

    .brand-sub {
      font-size: 14px;
      color: var(--muted);
      max-width: 560px;
    }

    .swatches { display: flex; gap: 8px; }
    .swatch { width: 46px; height: 14px; border-radius: 999px; }

    .social-link {
      display: inline-flex;
      align-items: center;
      gap: 12px;
      align-self: center;
      text-decoration: none;
      color: var(--ink);
      background: linear-gradient(135deg, rgba(240, 197, 207, 0.9) 0%, rgba(243, 233, 168, 0.92) 50%, rgba(199, 225, 242, 0.92) 100%);
      border: 3px solid var(--ink);
      border-radius: 20px;
      padding: 12px 16px;
      min-width: 220px;
      box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
      transition: transform 0.12s ease, box-shadow 0.12s ease;
    }

    .social-link:hover {
      transform: translateY(-2px);
      box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
    }

    .social-link-icon {
      width: 42px;
      height: 42px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 14px;
      background: rgba(255, 255, 255, 0.9);
      flex-shrink: 0;
    }

    .social-link-icon svg {
      width: 24px;
      height: 24px;
      fill: currentColor;
    }

    .social-link-copy {
      display: grid;
      gap: 2px;
    }

    .social-link-label {
      font-size: 11px;
      font-weight: 900;
      letter-spacing: .08em;
      text-transform: uppercase;
      color: var(--muted);
    }

    .social-link-handle {
      font-size: 18px;
      font-weight: 900;
      line-height: 1.1;
    }

    .badge {
      background: var(--white);
      border: 3px solid var(--ink);
      border-radius: 18px;
      padding: 12px 14px;
      font-size: 14px;
      font-weight: 700;
      max-width: 340px;
    }

    .main {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 320px;
      gap: 20px;
      padding: 20px;
    }

    .footer {
      border-top: 4px solid var(--ink);
      padding: 18px 20px 22px;
      display: flex;
      flex-wrap: wrap;
      gap: 10px 18px;
      align-items: center;
      justify-content: space-between;
      background: rgba(255, 255, 255, 0.36);
    }

    .footer-company {
      font-size: 14px;
      font-weight: 900;
      letter-spacing: .04em;
      text-transform: uppercase;
    }

    .footer-meta {
      font-size: 13px;
      color: var(--muted);
      line-height: 1.45;
    }

    .panel {
      background: var(--white);
      border: 4px solid var(--ink);
      border-radius: var(--radius-xl);
      padding: 22px;
    }

    .sidebar {
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    .block-chip {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      border-radius: 999px;
      padding: 10px 14px;
      font-size: 13px;
      font-weight: 900;
      background: var(--pink);
      margin-bottom: 12px;
    }

    h1, h2, h3, p { margin-top: 0; }
    h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.05; margin-bottom: 10px; }
    h2 { font-size: 20px; margin-bottom: 10px; }

    .meta {
      color: var(--muted);
      line-height: 1.55;
      font-size: 15px;
    }

    .notice {
      margin-top: 16px;
      background: rgba(255, 247, 214, 0.78);
      border: 3px solid var(--ink);
      border-radius: var(--radius-lg);
      padding: 14px 16px;
      line-height: 1.55;
      font-size: 14px;
    }

    .notice-warning {
      margin-top: 12px;
      display: flex;
      align-items: flex-start;
      gap: 10px;
      padding: 12px 14px;
      border-radius: 16px;
      background: #ffe7a3;
      border: 2px solid rgba(29, 29, 29, 0.18);
      font-weight: 800;
    }

    .notice-warning-icon {
      font-size: 18px;
      line-height: 1;
      flex: 0 0 auto;
    }

    .notice-warning-copy {
      display: block;
      line-height: 1.45;
    }

    .divider { height: 1px; background: rgba(0,0,0,0.12); margin: 18px 0; }

    .options, .steps, .resources {
      display: grid;
      gap: 14px;
    }

    .option-btn, .nav-btn, .action-btn {
      appearance: none;
      border: 3px solid var(--ink);
      background: var(--white);
      color: var(--ink);
      border-radius: 22px;
      padding: 16px 18px;
      font: inherit;
      cursor: pointer;
      transition: transform 0.12s ease, box-shadow 0.12s ease;
    }

    .option-btn:hover, .nav-btn:hover, .action-btn:hover {
      transform: translateY(-1px);
      box-shadow: 0 6px 0 rgba(0,0,0,0.08);
    }

    .option-btn {
      text-align: left;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      font-weight: 900;
      font-size: 18px;
    }

    .option-btn-primary-route {
      border-width: 5px;
      box-shadow: 0 0 0 6px rgba(118, 148, 91, 0.22), 0 8px 0 rgba(0,0,0,0.08);
      transform: translateY(-1px);
      position: relative;
      z-index: 1;
    }

    .option-btn-primary-route .option-progress-badge-main {
      box-shadow: 0 0 0 3px rgba(118, 148, 91, 0.18);
    }

    .option-btn-secondary-route {
      opacity: 0.76;
      filter: saturate(0.74);
    }

    .option-btn-secondary-route:hover {
      opacity: 1;
      filter: saturate(1);
    }

    .option-copy {
      display: grid;
      gap: 4px;
    }

    .option-meta { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 4px; }
    .option-progress {
      display: block;
      font-size: 12px;
      font-weight: 800;
      color: var(--ink);
      margin-top: 2px;
      line-height: 1.4;
    }

    .option-progress-main {
      display: inline;
    }

    .option-progress-badge {
      display: inline-block;
      padding: 2px 8px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 900;
      vertical-align: middle;
    }

    .option-progress-badge-main {
      background: var(--scope-main-bg);
      color: var(--scope-main-ink);
    }

    .option-progress-badge-extra {
      background: var(--scope-extra-bg);
      color: var(--scope-extra-ink);
    }

    .option-progress-divider {
      display: inline-block;
      margin: 0 8px;
      opacity: 0.8;
    }

    .option-progress-extra-wrap {
      display: inline-flex;
      align-items: center;
    }

    .option-progress-extra {
      display: inline-block;
    }

    .option-progress-note {
      display: block;
      margin-top: 4px;
      font-size: 11px;
      font-weight: 700;
      color: var(--muted);
    }

    .report-hero {
      border: 4px solid var(--ink);
      border-radius: 28px;
      padding: 20px;
      background:
        linear-gradient(135deg, rgba(199, 225, 242, 0.85) 0%, rgba(255, 255, 255, 0.96) 55%, rgba(243, 233, 168, 0.72) 100%);
      box-shadow: var(--shadow);
      margin-top: 18px;
    }

    .report-hero-top {
      display: flex;
      justify-content: space-between;
      gap: 16px;
      align-items: flex-start;
      flex-wrap: wrap;
    }

    .report-eyebrow {
      font-size: 12px;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: .08em;
      color: var(--muted);
      margin-bottom: 10px;
    }

    .report-title {
      margin: 0;
      font-size: clamp(26px, 4vw, 38px);
      line-height: 1.05;
    }

    .report-subtitle,
    .report-generated {
      margin: 8px 0 0 0;
      color: var(--muted);
      line-height: 1.5;
    }

    .report-stamp {
      border: 3px solid var(--ink);
      border-radius: 999px;
      padding: 10px 14px;
      font-size: 12px;
      font-weight: 900;
      text-transform: uppercase;
      background: rgba(255,255,255,0.88);
    }

    .report-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 18px;
      margin-bottom: 18px;
    }

    .report-card {
      border: 3px solid var(--ink);
      border-radius: 24px;
      padding: 18px;
      background: rgba(255,255,255,0.92);
      margin-top: 16px;
    }

    .report-card h3 {
      margin-bottom: 12px;
      font-size: 20px;
    }

    .report-card p {
      line-height: 1.6;
      margin-bottom: 10px;
    }

    .report-sections {
      display: grid;
      gap: 14px;
    }

    .report-section {
      border: 2px dashed rgba(0,0,0,0.25);
      border-radius: 18px;
      padding: 14px;
      background: rgba(255, 253, 245, 0.74);
    }

    .report-section h4 {
      margin: 0 0 10px 0;
      font-size: 17px;
    }

    .report-list {
      margin: 0;
      padding-left: 20px;
      line-height: 1.6;
    }

    .report-note {
      white-space: pre-wrap;
      margin: 0;
    }

    .report-item-note {
      margin-top: 6px;
      font-size: 13px;
      color: var(--muted);
      line-height: 1.45;
      white-space: pre-wrap;
    }

    .steps .step-card {
      border: 3px solid var(--ink);
      border-radius: 24px;
      padding: 16px;
      background: var(--white);
    }

    .step-head {
      display: flex;
      justify-content: space-between;
      gap: 16px;
      align-items: flex-start;
      margin-bottom: 10px;
    }

    .step-number {
      display: inline-flex;
      min-width: 34px;
      height: 34px;
      border-radius: 999px;
      border: 3px solid var(--ink);
      align-items: center;
      justify-content: center;
      font-weight: 900;
      background: var(--yellow);
      flex-shrink: 0;
    }

    .step-title {
      font-size: 18px;
      font-weight: 900;
      margin: 0;
    }

    .tag-row { display: flex; flex-wrap: wrap; gap: 8px; }

    .tag {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      border-radius: 999px;
      padding: 8px 11px;
      font-size: 12px;
      font-weight: 800;
      border: 2px solid var(--ink);
      background: var(--bg);
    }

    .resource-box {
      margin-top: 12px;
      border: 2px dashed rgba(0,0,0,0.25);
      border-radius: 16px;
      padding: 12px;
      display: grid;
      gap: 8px;
      background: rgba(255,255,255,0.76);
    }

    .resource-label {
      font-size: 12px;
      font-weight: 900;
      letter-spacing: .04em;
      text-transform: uppercase;
      color: var(--muted);
    }

    .resource-link {
      color: var(--ink);
      text-decoration-thickness: 2px;
      text-underline-offset: 3px;
      font-weight: 700;
    }

    .resource-note {
      margin: 0;
      color: var(--muted);
      font-size: 14px;
      line-height: 1.45;
    }

    .step-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 14px;
    }

    .action-btn {
      padding: 10px 14px;
      border-radius: 14px;
      font-weight: 800;
      font-size: 14px;
    }

    .action-complete { background: var(--green); }
    .action-skip { background: var(--orange); }
    .action-reset { background: var(--white); }

    .step-status {
      font-size: 12px;
      font-weight: 900;
      padding: 7px 10px;
      border-radius: 999px;
      border: 2px solid var(--ink);
      background: var(--bg);
      white-space: nowrap;
    }

    .status-completo { background: var(--green); }
    .status-pulado { background: var(--orange); }
    .status-pendente { background: var(--white); }

    .nav-row {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 20px;
    }

    .nav-btn { font-weight: 900; padding: 12px 15px; }
    .nav-primary { background: var(--blue); }
    .nav-continue {
      background: linear-gradient(135deg, #6ca9d6 0%, #8fc0e6 100%);
      color: #0d2230;
      box-shadow: 0 10px 24px rgba(108, 169, 214, 0.28);
      transform: translateY(0);
      min-width: 220px;
      position: relative;
    }
    .nav-continue::after {
      content: '→';
      font-size: 18px;
      margin-left: 10px;
    }
    .nav-continue:hover {
      transform: translateY(-2px) scale(1.01);
      box-shadow: 0 14px 28px rgba(108, 169, 214, 0.34);
    }
    .nav-secondary { background: var(--white); }
    .nav-danger { background: var(--pink); }

    .summary-box {
      border: 3px solid var(--ink);
      border-radius: 22px;
      padding: 16px;
      background: var(--white);
    }

    .summary-box h3 { margin-bottom: 10px; font-size: 18px; }

    .stack { display: grid; gap: 10px; }

    .small {
      font-size: 13px;
      color: var(--muted);
      line-height: 1.45;
    }

    .breadcrumb {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 12px;
    }

    .crumb {
      padding: 7px 10px;
      border-radius: 999px;
      border: 2px solid var(--ink);
      background: var(--bg);
      font-size: 12px;
      font-weight: 800;
    }

    .empty {
      padding: 20px;
      border-radius: 22px;
      border: 3px dashed rgba(0,0,0,0.3);
      color: var(--muted);
      background: rgba(255,255,255,0.76);
    }

    .color-yellow { background: var(--yellow); }
    .color-orange { background: var(--orange); }
    .color-pink { background: var(--pink); }
    .color-blue { background: var(--blue); }
    .color-green { background: var(--green); }

    @media (max-width: 980px) {
      .main { grid-template-columns: 1fr; }
    }

    @media (max-width: 720px) {
      .social-link {
        width: 100%;
        justify-content: flex-start;
      }
    }

    .patient-form, .patient-list {
      display: grid;
      gap: 14px;
      margin-top: 18px;
    }

    .form-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
    }

    .field {
      display: grid;
      gap: 8px;
    }

    .field label {
      font-size: 13px;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: .04em;
      color: var(--muted);
    }

    .field input, .field textarea {
      width: 100%;
      border: 3px solid var(--ink);
      border-radius: 16px;
      padding: 13px 14px;
      font: inherit;
      background: var(--white);
      color: var(--ink);
    }

    .field textarea {
      min-height: 92px;
      resize: vertical;
    }

    .field.span-2 { grid-column: 1 / -1; }

    .patient-card {
      border: 3px solid var(--ink);
      border-radius: 24px;
      padding: 16px;
      background: var(--white);
      display: grid;
      gap: 12px;
    }

    .patient-card-head {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: flex-start;
      flex-wrap: wrap;
    }

    .patient-code {
      font-size: 22px;
      font-weight: 900;
      line-height: 1.1;
    }

    .patient-sub {
      font-size: 13px;
      color: var(--muted);
      margin-top: 4px;
      line-height: 1.45;
    }

    .patient-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    .inline-note {
      padding: 12px 14px;
      border: 2px solid var(--ink);
      border-radius: 16px;
      background: rgba(255,253,245,0.82);
      font-size: 14px;
      line-height: 1.5;
    }

    .print-btn {
      background: var(--yellow);
    }

    @media (max-width: 720px) {
      .form-grid {
        grid-template-columns: 1fr;
      }
    }


    .access-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg); }
    .access-card { width: min(560px, 100%); border: 6px solid var(--ink); border-radius: 32px; background: var(--white); box-shadow: var(--shadow); padding: 28px; }
    .access-card h1 { font-size: clamp(28px, 5vw, 40px); margin-bottom: 12px; }
    .access-card .access-help { color: var(--muted); line-height: 1.55; margin-bottom: 18px; }
    .access-error { display: none; margin-top: 12px; border: 2px solid var(--ink); border-radius: 16px; padding: 12px 14px; background: var(--pink); font-weight: 800; }
    .access-error.is-visible { display: block; }
    .is-hidden { display: none !important; }
    .block-note-area { margin-top: 18px; border: 3px solid var(--ink); border-radius: 24px; padding: 16px; background: rgba(255,253,245,0.88); }
    .block-note-area label { display: block; font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 8px; }
    .block-note-area textarea { width: 100%; min-height: 120px; border: 3px solid var(--ink); border-radius: 18px; padding: 14px; font: inherit; resize: vertical; background: var(--white); color: var(--ink); }
    .block-note-hint { margin-top: 8px; font-size: 13px; color: var(--muted); line-height: 1.4; }
    .step-note-area { margin-top: 14px; border: 2px dashed rgba(0,0,0,0.22); border-radius: 18px; padding: 14px; background: rgba(255,255,255,0.84); }
    .step-note-area label { display: block; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 8px; }
    .step-note-area textarea { width: 100%; min-height: 88px; border: 2px solid var(--ink); border-radius: 14px; padding: 12px 13px; font: inherit; resize: vertical; background: var(--white); color: var(--ink); }
  
