:root {
        --primary: #0b5fff;
        --accent: var(--primary);
        --accent-600: #094bcc;
        --accent-100: #e9f1ff;
        --text: #0f172a;
        --muted: #475569;
        --bg: #f8fafc;
        --card: #ffffff;
        --ok: #0ea5e9;
        --radius: 14px;
        --shadow: 0 12px 30px rgba(2, 6, 23, 0.08);
        --success: #10b981;
        --warning: #f59e0b;
        --danger: #ef4444;
        --border: #e5e7eb;
      }
      * {
        box-sizing: border-box;
      }
      html,
      body {
        height: 100%;
      }
      body {
        margin: 0;
        background: var(--bg);
        color: var(--text);
        font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Inter, Roboto, Arial,
          sans-serif;
      }
      a {
        color: inherit;
      }
      .container {
        max-width: 1100px;
        margin: 0 auto;
        padding: 32px 28px 40px;
      }
      @media (max-width: 640px) {
        .container {
          padding: 24px 18px 32px;
        }
      }
      .topbar {
        background: #fff;
        position: sticky;
        top: 0;
        z-index: 50;
        border-bottom: 1px solid var(--border);
      }
      .nav {
        display: flex;
        align-items: center;
        gap: 18px;
        justify-content: space-between;
        padding: 12px 18px;
        max-width: 1170px;
        margin: 0 auto;
      }
      .brand {
        display: flex;
        align-items: center;
        gap: 10px;
        font-weight: 800;
        color: var(--primary);
      }
      .brand svg {
        width: 26px;
        height: 26px;
      }
      .menu {
        display: flex;
        gap: 18px;
        flex-wrap: wrap;
        align-items: center;
      }
      .menu a {
        font-weight: 600;
        color: var(--text);
        opacity: 0.9;
        text-decoration: none;
      }
      .menu .cta {
        padding: 10px 14px;
        border-radius: 12px;
        background: var(--primary);
        color: #fff;
        font-weight: 800;
      }
      .notice {
        background: var(--primary);
        color: #fff;
        text-align: center;
        padding: 12px 14px;
        font-weight: 700;
        line-height: 1.45;
      }
      .notice a {
        color: #fff;
        text-decoration: underline;
        font-weight: 800;
      }
      h1 {
        margin: 8px 0 12px;
        font-size: 26px;
        line-height: 1.25;
        color: var(--primary);
        text-align: center;
        text-transform: uppercase;
        letter-spacing: 0.02em;
        font-weight: 800;
      }
      .lead {
        color: var(--muted);
        text-align: center;
        margin: -6px 0 20px;
      }
      .card {
        background: var(--card);
        border-radius: var(--radius);
        border: 1px solid var(--border);
        box-shadow: var(--shadow);
        padding: 22px 24px;
        margin: 18px 0;
      }
      .section-title {
        font-size: 22px;
        margin: 6px 0 14px;
        color: var(--text);
      }
      .section-sub {
        font-size: 16px;
        margin: 4px 0 10px;
        color: var(--muted);
      }
      .row {
        display: grid;
        grid-template-columns: repeat(12, 1fr);
        gap: 14px;
      }
      .col-12 {
        grid-column: span 12;
      }
      .col-6 {
        grid-column: span 12;
      }
      .col-4 {
        grid-column: span 12;
      }
      .col-3 {
        grid-column: span 12;
      }
      @media (min-width: 860px) {
        .col-6 {
          grid-column: span 6;
        }
        .col-4 {
          grid-column: span 4;
        }
        .col-3 {
          grid-column: span 3;
        }
      }
      label {
        display: block;
        font-weight: 600;
        font-size: 14px;
        margin: 6px 0 4px;
        color: var(--muted);
      }
      input,
      select,
      button {
        font: inherit;
      }
      input,
      select {
        width: 100%;
        height: 42px;
        padding: 8px 12px;
        border: 1px solid #d9e2ec;
        border-radius: 10px;
        background: #fff;
        outline: none;
        transition: border-color 0.15s, box-shadow 0.15s;
        font-size: 15px;
      }
      input:focus,
      select:focus {
        outline: none;
        border-color: #1a56db;
        box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.12);
      }
      .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 0 20px;
        min-height: 46px;
        background: #fff;
        color: var(--text);
        font-weight: 700;
        cursor: pointer;
        transition: background 0.2s, border-color 0.2s, transform 0.15s;
      }
      .btn.primary {
        background: var(--accent);
        border-color: var(--accent);
        color: #fff;
        box-shadow: 0 8px 20px rgba(11, 95, 255, 0.18);
      }
      .btn.primary:hover {
        background: var(--accent-600);
        border-color: var(--accent-600);
        transform: translateY(-1px);
      }
      .btn.ghost {
        background: #fff;
        color: var(--accent);
      }
      .btn.success {
        background: var(--success);
        border-color: var(--success);
        color: #fff;
      }
      .inline-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
      }
      .stat {
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 12px;
      }
      .stat small {
        display: block;
        color: var(--muted);
      }
      .stat strong {
        font-size: 18px;
      }
      .hint {
        background: #ecfeff;
        border: 1px solid #bae6fd;
        color: #0ea5e9;
        padding: 10px 12px;
        border-radius: 12px;
      }
      .warn {
        background: #fffbeb;
        border: 1px solid #fde68a;
        color: #92400e;
        padding: 10px 12px;
        border-radius: 12px;
      }
      .danger {
        color: var(--danger);
      }
      table {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0 6px;
        font-size: 14px;
      }
      th {
        text-align: left;
        color: var(--muted);
      }
      td {
        padding: 6px 0;
      }
      .footer {
        color: var(--muted);
        font-size: 14px;
        margin-top: 22px;
        text-align: center;
        padding: 28px;
      }
      .footer a {
        color: var(--primary);
        text-decoration: none;
      }
      .err {
        background: #fee2e2;
        border: 1px solid #fecaca;
        color: #7f1d1d;
        padding: 10px 12px;
        border-radius: 12px;
      }
      .loader {
        font-weight: 700;
        color: var(--primary);
        text-align: center;
        padding: 18px 0;
      }
      @media (max-width: 680px) {
        .nav {
          flex-direction: column;
          align-items: flex-start;
          gap: 10px;
          padding: 14px 16px;
        }
        .menu {
          flex-direction: column;
          align-items: flex-start;
          width: 100%;
          gap: 12px;
        }
        .menu a {
          display: block;
          padding: 0;
        }
        .menu .cta {
          width: 100%;
          text-align: center;
        }
        .notice {
          font-size: 13px;
          line-height: 1.4;
          padding: 8px 12px;
        }
      }
      input[type="date"]::-webkit-date-and-time-value {
        min-height: auto;
        padding: 0;
      }
      input[type="date"]::-webkit-calendar-picker-indicator {
        margin-right: 4px;
      }
      @supports (-webkit-touch-callout: none) {
        input[type="date"] {
          min-height: 44px;
          height: 44px;
          padding: 10px 12px;
        }
      }
      .pdf-export-wrapper {
        position: fixed;
        left: -9999px;
        top: -9999px;
        width: 760px;
        padding: 20px;
        background: #f8fafc;
        font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      }
      .pdf-card {
        width: 720px;
        margin: 0 auto;
        background: #ffffff;
        border-radius: 16px;
        border: 1px solid #dbe3f0;
        box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
        padding: 28px;
        color: #0f172a;
      }
      .pdf-card .pdf-logo {
        text-align: center;
        margin-bottom: 16px;
      }
      .pdf-card .pdf-logo img {
        width: 140px;
        height: auto;
      }
      .pdf-card h1 {
        font-size: 22px;
        margin: 0 0 8px;
        text-align: center;
        color: #1a56db;
      }
      .pdf-meta {
        text-align: center;
        color: #475569;
        font-size: 12px;
        margin-bottom: 18px;
      }
      .pdf-table {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
        margin-bottom: 16px;
        font-size: 13px;
      }
      .pdf-table thead th {
        text-align: left;
        background: #e8f1ff;
        color: #1d4ed8;
        font-weight: 700;
        padding: 10px 14px;
        border: 1px solid #d7e3fa;
      }
      .pdf-table thead th:first-child { border-top-left-radius: 12px; }
      .pdf-table thead th:last-child { border-top-right-radius: 12px; }
      .pdf-table tbody tr td {
        padding: 9px 14px;
        border-left: 1px solid #e2e8f0;
        border-right: 1px solid #e2e8f0;
        border-bottom: 1px solid #e2e8f0;
      }
      .pdf-table td.value {
        text-align: right;
        font-weight: 600;
        color: #0f172a;
      }
      .pdf-table td.label {
        color: #334155;
      }
      .lgpd-consent {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        margin-top: 16px;
        font-size: 13px;
        line-height: 1.45;
        color: #0b1324;
        font-weight: 500;
      }
      .lgpd-consent input[type="checkbox"] {
        width: 18px;
        height: 18px;
        min-width: 18px;
        margin-top: 3px;
        accent-color: var(--primary);
      }
      .pdf-table tbody tr:first-child td {
        border-top: 1px solid #e2e8f0;
      }
      .pdf-table tbody tr:last-child td {
        border-bottom-left-radius: 12px;
        border-bottom-right-radius: 12px;
      }
      .pdf-table tbody tr:last-child td:first-child {
        border-bottom-left-radius: 12px;
      }
      .pdf-table tbody tr:last-child td:last-child {
        border-bottom-right-radius: 12px;
      }
      .pdf-table tbody tr:nth-child(odd) {
        background: #f8fbff;
      }
      .pdf-total-row {
        background: #eff6ff;
        border-radius: 12px;
        padding: 12px 16px;
        font-size: 15px;
        font-weight: 700;
        color: #0f172a;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border: 1px solid #cfe0ff;
        margin-bottom: 16px;
      }
      .pdf-callout {
        background: #fff7db;
        border: 1px solid #f1e0a8;
        border-radius: 12px;
        padding: 12px 16px;
        color: #8a6206;
        font-size: 12.5px;
        line-height: 1.5;
      }
      .pdf-rateio {
        margin-top: 18px;
      }
      .pdf-footer-text {
        margin-top: 18px;
        text-align: center;
        font-size: 10px;
        color: #64748b;
        line-height: 1.4;
      }
