:root {
    --bg: #f5f7fb;
    --card: #ffffff;
    --text: #172033;
    --muted: #64748b;
    --primary: #1d4ed8;
    --primary-dark: #1e40af;
    --green: #15803d;
    --red: #b91c1c;
    --border: #d9e2f1;
    --soft: #eef4ff;
    --shadow: 0 5px 14px rgba(15, 23, 42, .055);
  }

  * { box-sizing: border-box; }
  html, body { width: 100%; max-width: 100%; overflow-x: hidden; min-height: 100%; }

  body {
    margin: 0;
    font-family: Inter, Segoe UI, Roboto, Arial, sans-serif;
    background: linear-gradient(135deg, #eef4ff 0%, #f8fafc 45%, #ecfeff 100%);
    color: var(--text);
    font-size: 14px;
    line-height: 1.35;
  }

  header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255,255,255,.92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
  }

  .topbar {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 10px 18px;
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: space-between;
  }

  .brand { min-width: 250px; }
  .brand h1 { margin: 0; font-size: 20px; letter-spacing: -0.02em; }
  .brand span { display:none; color: var(--muted); font-size: 10px; }

  .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end;
    max-width: 100%;
  }

  .gear-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
  }

  .gear-wrap summary { list-style: none; }
  .gear-wrap summary::-webkit-details-marker { display: none; }

  .gear-btn {
    border: 0;
    border-radius: 7px;
    padding: 8px 11px;
    cursor: pointer;
    background: #0f172a;
    color: white;
    font-weight: 900;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    user-select: none;
  }

  .gear-wrap[open] .gear-btn, .gear-btn:hover { background: #1e293b; }

  .gear-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 80;
    min-width: 245px;
    display: grid;
    gap: 6px;
    padding: 8px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .20);
  }

  .gear-menu button, .gear-menu .file-label {
    width: 100%;
    justify-content: flex-start;
    box-shadow: none;
  }

  button, .file-label {
    border: 0;
    border-radius: 7px;
    padding: 8px 11px;
    cursor: pointer;
    background: var(--primary);
    color: white;
    font-weight: 700;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 13px;
    line-height: 1.15;
    white-space: nowrap;
  }

  button:hover, .file-label:hover { background: var(--primary-dark); }
  button.secondary { background: #334155; }
  button.green { background: var(--green); }
  button.red { background: var(--red); }
  button.light { background: #e2e8f0; color: #0f172a; }

  input, select, textarea {
    width: 100%;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 7px;
    padding: 8px 10px;
    outline: none;
    font: inherit;
    min-height: 38px;
  }

  input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(29, 78, 216, .10);
  }

  main {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 12px 18px;
  }

  .grid { display: grid; grid-template-columns: 1fr; gap: 12px; }

  .kpis {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
  }

  .card {
    min-width: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 12px;
  }

  .kpi {
    padding: 10px 12px;
    border-radius: 10px;
    background: linear-gradient(180deg, #fff, #f8fbff);
    border: 1px solid var(--border);
    min-width: 0;
  }

  .kpi small {
    display: block;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 2px;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: .03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .kpi strong { display: block; font-size: 20px; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  .section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
  }

  .section-title h2 { margin: 0; font-size: 18px; }
  .section-title p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }

  form {
    display: grid;
    grid-template-columns: 125px minmax(230px, 1.15fr) 125px minmax(140px, .7fr) 120px 112px 110px 72px minmax(180px, 1fr) 95px;
    gap: 8px;
    align-items: end;
  }

  label {
    font-size: 12px;
    color: var(--muted);
    font-weight: 800;
    display: block;
    margin-bottom: 2px;
  }

  .filters {
    display: grid;
    grid-template-columns: minmax(280px, 1.5fr) 130px 130px 135px 110px 110px;
    gap: 8px;
    align-items: end;
  }

  .tables { display: grid; grid-template-columns: 1fr; gap: 12px; }

  .summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .table-wrap {
    min-width: 0;
    width: 100%;
    overflow: auto;
    max-height: calc(100vh - 370px);
    border: 1px solid var(--border);
    border-radius: 8px;
  }

  table { width: 100%; border-collapse: collapse; min-width: 1080px; background: white; table-layout: fixed; }
  .summary-grid table, #rankingTable { min-width: 210px; }

  th {
    position: sticky;
    top: 0;
    background: #0f172a;
    color: white;
    text-align: left;
    font-size: 11px;
    letter-spacing: .02em;
    text-transform: uppercase;
    padding: 8px 9px;
    z-index: 3;
    white-space: nowrap;
  }

  td {
    border-bottom: 1px solid #eef2f7;
    padding: 8px 9px;
    font-size: 13px;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  td:nth-child(2) { white-space: normal; overflow-wrap: anywhere; }
  tr:hover td { background: #f8fafc; }

  /* Relação exibida: alterna uma linha com cor e outra sem cor */
  #paymentsBody tr:nth-child(even) td {
    background: #f8fbff;
  }

  #paymentsBody tr:nth-child(odd) td {
    background: #ffffff;
  }

  #paymentsBody tr:hover td {
    background: #eef4ff;
  }

  .money { text-align: right; font-variant-numeric: tabular-nums; font-weight: 800; }
  .center { text-align: center; }
  .muted { color: var(--muted); }

  .tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 2px 5px;
    font-size: 12px;
    font-weight: 800;
    background: var(--soft);
    color: var(--primary-dark);
  }

  .row-actions { display: flex; gap: 3px; justify-content: center; }
  .row-actions button { padding: 6px 8px; border-radius: 8px; font-size: 12px; }

  button:disabled {
    opacity: .45;
    cursor: not-allowed;
  }

  .bulk-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
  }

  .bulk-actions small {
    color: var(--muted);
    font-weight: 800;
  }

  .select-check, #selectAllPayments {
    width: 16px;
    height: 16px;
    min-height: 0;
    padding: 0;
    cursor: pointer;
    accent-color: var(--primary);
  }

  .payments-table th.select-col,
  .payments-table td.select-col {
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    padding-left: 4px !important;
    padding-right: 4px !important;
    text-align: center;
  }

  .payments-table th:nth-child(2),
  .payments-table td:nth-child(2) {
    width: 105px;
  }


  .payments-table {
    table-layout: fixed;
  }

  .payments-table th[data-col] {
    position: sticky;
    user-select: none;
  }

  .col-resizer {
    position: absolute;
    top: 0;
    right: -3px;
    width: 8px;
    height: 100%;
    cursor: col-resize;
    z-index: 8;
    touch-action: none;
  }

  .col-resizer::after {
    content: "";
    position: absolute;
    top: 18%;
    right: 3px;
    width: 2px;
    height: 64%;
    border-radius: 999px;
    background: rgba(255,255,255,.32);
  }

  .payments-table th[data-col]:hover .col-resizer::after {
    background: rgba(255,255,255,.82);
  }

  body.resizing-column {
    cursor: col-resize !important;
    user-select: none !important;
  }

  .column-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 8px 0;
    padding: 8px 10px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
  }

  .column-controls strong { font-size: 12px; color: var(--muted); }

  .column-controls label {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
  }

  .column-controls input {
    width: 14px;
    height: 14px;
    min-height: 0;
    padding: 0;
    accent-color: var(--primary);
  }

  .payments-table.hide-col-data col[data-col="data"],
  .payments-table.hide-col-data [data-col="data"],
  .payments-table.hide-col-descricao col[data-col="descricao"],
  .payments-table.hide-col-descricao [data-col="descricao"],
  .payments-table.hide-col-tipoPix col[data-col="tipoPix"],
  .payments-table.hide-col-tipoPix [data-col="tipoPix"],
  .payments-table.hide-col-chavePix col[data-col="chavePix"],
  .payments-table.hide-col-chavePix [data-col="chavePix"],
  .payments-table.hide-col-vencimento col[data-col="vencimento"],
  .payments-table.hide-col-vencimento [data-col="vencimento"],
  .payments-table.hide-col-tipo col[data-col="tipo"],
  .payments-table.hide-col-tipo [data-col="tipo"],
  .payments-table.hide-col-banco col[data-col="banco"],
  .payments-table.hide-col-banco [data-col="banco"],
  .payments-table.hide-col-valor col[data-col="valor"],
  .payments-table.hide-col-valor [data-col="valor"],
  .payments-table.hide-col-acoes col[data-col="acoes"],
  .payments-table.hide-col-acoes [data-col="acoes"] {
    display: none !important;
  }

  .desc-observacao {
    cursor: pointer;
  }

  .desc-observacao strong {
    color: inherit;
  }


  .pix-cell {
    min-width: 180px;
  }

  .pix-cell button {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    justify-content: flex-start;
    background: #e2e8f0;
    color: #0f172a;
  }


  .result-box {
    display: grid;
    gap: 3px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 10px;
    margin-top: 6px;
  }

  .result-box strong { font-size: 19px; color: var(--green); }
  .hidden { display: none !important; }

  dialog {
    border: 0;
    border-radius: 12px;
    box-shadow: 0 25px 80px rgba(15,23,42,.25);
    width: min(560px, calc(100vw - 14px));
    padding: 0;
  }

  dialog::backdrop { background: rgba(15,23,42,.45); }
  .modal-head { padding: 8px 10px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
  .modal-body { padding: 10px; }
  .modal-actions { padding: 0 10px 10px; display:flex; gap:5px; justify-content:flex-end; }
  #importJson, #importSheet { display:none; }

  /* Larguras compactas para não passar do monitor */
  #tbodyPagamentos td:nth-child(1), #tbodyPagamentos td:nth-child(3), #tbodyPagamentos td:nth-child(4) { width: 82px; }
  #tbodyPagamentos td:nth-child(5) { width: 62px; }
  #tbodyPagamentos td:nth-child(6) { width: 74px; }




  /* Ajuste solicitado: tela wide sem zoom manual e com leitura maior */
  .topbar, main { width: 100%; max-width: none !important; }
  body { min-height: 100vh; }
  .actions { gap: 8px; }
  .summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #paymentsBody td:nth-child(2) { font-weight: 700; }

  @media (max-width: 1080px) {
    .topbar, main { max-width: 100%; }
    .tables, .summary-grid { grid-template-columns: 1fr; }
    .table-wrap { max-height: 340px; }
  }

  @media (max-width: 760px) {
    .topbar { align-items: flex-start; flex-direction: column; }
    .actions { justify-content: flex-start; }
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    form, .filters { grid-template-columns: 1fr 1fr; }
  }

  @media (max-width: 760px) {
    .gear-menu {
      left: 0;
      right: auto;
      min-width: min(260px, calc(100vw - 24px));
    }
  }

  @media (max-width: 520px) {
    .kpis, form, .filters { grid-template-columns: 1fr; }
    main { padding: 5px; }
    .card { padding: 6px; border-radius: 9px; }
    .brand h1 { font-size: 13px; }
    button, .file-label { font-size: 9.5px; padding: 4px 5px; }
    table { min-width: 430px; }
    .summary-grid table, #rankingTable { min-width: 200px; }
  }

  .sync-status {
    position: fixed;
    right: 10px;
    bottom: 10px;
    z-index: 40;
    background: #0f172a;
    color: #fff;
    border-radius: 999px;
    padding: 7px 10px;
    font-weight: 800;
    font-size: 10px;
    box-shadow: 0 10px 30px rgba(15,23,42,.22);
    display: none;
  }

  .sync-status.show { display: block; }

  .print-only { display: none; }

  @media print {
    @page { size: A4 portrait; margin: 12mm; }
    html, body { width: 100%; }
    body {
      background: #ffffff !important;
      color: #0f172a !important;
      font-size: 10.5px;
      zoom: 1 !important;
      -webkit-print-color-adjust: exact;
      print-color-adjust: exact;
    }
    header, main, dialog, .no-print { display: none !important; }
    .print-only { display: block !important; }
    #printReport {
      display: block !important;
      width: 100%;
      margin: 0;
      padding: 0;
    }
    #printReport .print-sheet {
      width: 100%;
      border: 1px solid #cbd5e1;
      border-radius: 14px;
      overflow: hidden;
      background: #ffffff;
    }
    #printReport .print-header {
      padding: 14px 16px 10px;
      border-bottom: 2px solid #1d4ed8;
      background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    }
    #printReport .print-title {
      margin: 0 0 10px;
      font-size: 15px;
      line-height: 1.25;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: .02em;
      color: #0f172a;
    }
    #printReport .print-title span { color: #1d4ed8; }
    #printReport .print-table-wrap { padding: 12px 16px 16px; }
    #printReport table {
      width: 100%;
      min-width: 0 !important;
      border-collapse: collapse;
      table-layout: fixed;
      background: #ffffff;
      border: 1px solid #cbd5e1;
      border-radius: 12px;
      overflow: hidden;
    }
    #printReport th, #printReport td {
      border-bottom: 1px solid #e2e8f0;
      padding: 7px 8px;
      vertical-align: middle;
      color: #0f172a;
      white-space: normal;
      word-break: break-word;
    }
    #printReport th {
      position: static;
      background: #dbeafe !important;
      color: #1e3a8a;
      font-size: 9.5px;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: .03em;
    }
    #printReport tbody tr:nth-child(even) td { background: #f8fafc; }
    #printReport tfoot td {
      background: #eff6ff !important;
      font-weight: 800;
      border-top: 2px solid #93c5fd;
      border-bottom: 0;
    }
    #printReport .col-num { width: 7%; text-align: center; }
    #printReport .col-desc { width: 34%; }
    #printReport .col-banco { width: 10%; text-align: center; }
    #printReport .col-venc { width: 15%; text-align: center; }
    #printReport .col-tipo { width: 12%; text-align: center; }
    #printReport .col-valor { width: 22%; text-align: right; }
    #printReport td.col-valor, #printReport th.col-valor, #printReport tfoot .total-value {
      text-align: right;
      font-weight: 900;
      white-space: nowrap !important;
      word-break: normal !important;
      overflow-wrap: normal !important;
      font-variant-numeric: tabular-nums;
    }
    #printReport tbody td.col-valor, #printReport tfoot .total-value {
      font-size: 11.2px !important;
      line-height: 1.2;
    }
    #printReport tfoot {
      display: none !important;
    }
    #printReport .print-total-row td {
      background: #eff6ff !important;
      font-weight: 900;
      border-top: 2px solid #93c5fd;
      border-bottom: 0;
      font-size: 11.2px !important;
      line-height: 1.2;
    }
    #printReport .print-total-row .total-value {
      text-align: right;
      white-space: nowrap !important;
      word-break: normal !important;
      overflow-wrap: normal !important;
      font-variant-numeric: tabular-nums;
    }
  }

  .money-copy {
    width: 100%;
    justify-content: flex-end;
    text-align: right;
    background: #e2e8f0;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .money-copy:hover {
    background: #cbd5e1;
  }



  .form-actions-inline {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
  }

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

  .parcelamento-form .span-2 { grid-column: span 2; }
  .parcelamento-form .span-4 { grid-column: 1 / -1; }

  .parcelamento-preview-wrap {
    max-height: 320px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-top: 10px;
  }

  .parcelamento-preview-table {
    min-width: 760px;
  }

  .parcelamento-preview-table input,
  .parcelamento-preview-table textarea {
    min-height: 32px;
    padding: 6px 7px;
    font-size: 12px;
  }

  .parcelamento-help {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12px;
  }

  @media (max-width: 760px) {
    .parcelamento-form { grid-template-columns: 1fr 1fr; }
    .parcelamento-form .span-4 { grid-column: 1 / -1; }
  }

  @media (max-width: 520px) {
    .parcelamento-form { grid-template-columns: 1fr; }
    .parcelamento-form .span-2,
    .parcelamento-form .span-4 { grid-column: 1 / -1; }
  }

/* =========================================================
   Cloudflare D1 UI refresh
   ========================================================= */
:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #14202b;
  --muted: #667784;
  --primary: #0f6f8f;
  --primary-dark: #0b5770;
  --green: #147a4a;
  --red: #b4232c;
  --border: #d8e2ea;
  --soft: #edf8fb;
  --shadow: 0 10px 28px rgba(23, 42, 58, .075);
}

body {
  background:
    radial-gradient(circle at 8% -10%, rgba(20, 184, 166, .10), transparent 28%),
    radial-gradient(circle at 92% 0%, rgba(14, 116, 144, .10), transparent 30%),
    linear-gradient(180deg, #f8fbfd 0%, #f3f7fa 100%);
}

.app-header {
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .03);
}

.topbar {
  padding: 11px 18px;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 300px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -.03em;
  background: linear-gradient(145deg, #0f6f8f, #0f9a95);
  box-shadow: 0 8px 20px rgba(15, 111, 143, .24);
  flex: 0 0 auto;
}

.brand-copy { min-width: 0; }
.brand h1 { font-size: 19px; color: #132633; }
.brand span {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.db-health {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid #d7e1e8;
  background: #f8fafc;
  color: #536471;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  transition: .2s ease;
}

.db-health-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, .14);
}

.db-health.online {
  background: #effaf5;
  color: #16613f;
  border-color: #ccebdc;
}
.db-health.online .db-health-dot {
  background: #16a365;
  box-shadow: 0 0 0 3px rgba(22, 163, 101, .13);
}
.db-health.error {
  background: #fff3f3;
  color: #9f2630;
  border-color: #f0cfd2;
}
.db-health.error .db-health-dot {
  background: #c83a44;
  box-shadow: 0 0 0 3px rgba(200, 58, 68, .12);
}

button, .file-label, .gear-btn {
  border-radius: 9px;
  min-height: 36px;
  transition: transform .12s ease, background .16s ease, box-shadow .16s ease;
}
button:hover, .file-label:hover, .gear-btn:hover { transform: translateY(-1px); }
button:active, .file-label:active { transform: translateY(0); }

.card {
  border-radius: 16px;
  border-color: #dce5eb;
  box-shadow: var(--shadow);
}

.kpis { gap: 9px; }
.kpi {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  padding: 12px 13px;
  background: linear-gradient(180deg, #ffffff, #f9fbfc);
}
.kpi::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #0f6f8f;
  opacity: .86;
}
.kpi:nth-child(2)::before { background: #0f9a95; }
.kpi:nth-child(3)::before { background: #315da8; }
.kpi:nth-child(4)::before { background: #7a52a3; }
.kpi:nth-child(5)::before { background: #147a4a; }
.kpi:nth-child(6)::before { background: #b36a18; }
.kpi strong { color: #112733; font-size: 19px; }

.section-title h2 { color: #17303e; }
.section-title p { max-width: 900px; }

input, select, textarea {
  border-color: #d5e0e7;
  background: #fbfdfe;
  transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
}
input:hover, select:hover, textarea:hover { background: #fff; border-color: #bdccd6; }
input:focus, select:focus, textarea:focus {
  background: #fff;
  border-color: #0f819f;
  box-shadow: 0 0 0 3px rgba(15, 129, 159, .11);
}

.table-wrap {
  border-color: #d8e3e9;
  border-radius: 11px;
  background: #fff;
}

th {
  background: #17303e;
  color: #f8fbfc;
  padding-top: 9px;
  padding-bottom: 9px;
}

.payments-table tbody tr { transition: background .12s ease; }
.payments-table tbody tr:hover { background: #f2f9fb; }

.tag {
  border-radius: 999px;
  padding: 4px 7px;
}

.result-box {
  border-color: #d8e8ed;
  background: linear-gradient(90deg, #f4fbfc, #f8fbfd);
}

.sync-status {
  border-radius: 999px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .18);
}

@media (max-width: 1100px) {
  .topbar { align-items: flex-start; }
  .header-tools { flex-wrap: wrap; }
  .db-health { order: 2; }
}

@media (max-width: 720px) {
  .topbar { padding: 10px 12px; }
  .brand { min-width: 0; flex: 1 1 100%; }
  .brand span { white-space: normal; }
  .header-tools { width: 100%; justify-content: space-between; }
  .db-health { max-width: 52vw; overflow: hidden; text-overflow: ellipsis; }
  main { padding-left: 10px; padding-right: 10px; }
}

/* =========================================================
   Autenticação
   ========================================================= */
.hidden { display: none !important; }
body.auth-locked > .app-header,
body.auth-locked > main,
body.auth-locked > dialog,
body.auth-locked > .sync-status { visibility: hidden; }
body.auth-ready > .auth-screen { display: none; }

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 18% 8%, rgba(22, 163, 101, .13), transparent 30%),
    radial-gradient(circle at 88% 92%, rgba(15, 111, 143, .16), transparent 34%),
    linear-gradient(145deg, #eef7f8 0%, #f5f8fb 48%, #edf5f7 100%);
  padding: 24px;
}

.auth-layout {
  width: min(1080px, 100%);
  min-height: min(690px, calc(100vh - 48px));
  margin: auto;
  display: flex;
  align-items: stretch;
  border: 1px solid rgba(128, 154, 169, .24);
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255,255,255,.94);
  box-shadow: 0 30px 90px rgba(23, 48, 62, .15);
}

.auth-hero {
  position: relative;
  flex: 0 0 46%;
  min-width: 0;
  padding: 54px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #f7fbfd;
  background:
    radial-gradient(circle at 22% 15%, rgba(78, 214, 193, .28), transparent 30%),
    linear-gradient(150deg, #173947 0%, #0f637a 53%, #0b817d 100%);
}
.auth-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.65), transparent 82%);
}
.auth-hero > * { position: relative; z-index: 1; }
.auth-hero-mark {
  width: 64px;
  height: 64px;
  border-radius: 19px;
  display: grid;
  place-items: center;
  margin-bottom: 27px;
  font-size: 22px;
  font-weight: 900;
  color: #12333e;
  background: #e6fbf5;
  box-shadow: 0 16px 36px rgba(0,0,0,.15);
}
.auth-eyebrow, .auth-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.auth-eyebrow { color: #bfeae2; }
.auth-hero h1 {
  margin: 9px 0 11px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.02;
  letter-spacing: -.045em;
}
.auth-hero p {
  margin: 0;
  max-width: 430px;
  color: rgba(244, 251, 252, .78);
  font-size: 15px;
  line-height: 1.65;
}
.auth-security-list {
  display: grid;
  gap: 12px;
  margin-top: 38px;
}
.auth-security-list > div {
  display: grid;
  grid-template-columns: 30px 1fr;
  column-gap: 10px;
  align-items: center;
  padding: 11px 13px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 13px;
  background: rgba(255,255,255,.07);
  backdrop-filter: blur(6px);
}
.auth-security-list > div > span {
  grid-row: 1 / span 2;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(207, 250, 238, .16);
  color: #c8faeb;
  font-weight: 900;
}
.auth-security-list strong { font-size: 12px; }
.auth-security-list small { color: rgba(244,251,252,.66); font-size: 10px; margin-top: 2px; }
.auth-hero-foot { margin-top: 34px; color: rgba(244,251,252,.55); }

.auth-card-wrap {
  flex: 1 1 54%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 46px;
  overflow: visible;
  background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(248,251,252,.97));
}
.auth-card {
  position: relative;
  width: 100%;
  max-width: 430px;
  min-width: 0;
  margin: 0 auto;
}
.auth-card-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
}
.auth-card-brand > span {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, #0f6f8f, #0f9a95);
  color: white;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(15,111,143,.2);
}
.auth-card-brand div { display: grid; min-width: 0; }
.auth-card-brand strong { font-size: 13px; color: #16313f; }
.auth-card-brand small { font-size: 10px; color: #71818d; margin-top: 1px; }
.auth-heading { margin-bottom: 22px; }
.auth-kicker { color: #0f819f; }
.auth-heading h2 {
  margin: 6px 0 7px;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -.035em;
  color: #17303e;
}
.auth-heading p { margin: 0; color: #6f7f8a; line-height: 1.55; font-size: 13px; }
.auth-form { display: grid; gap: 15px; width: 100%; min-width: 0; }
.auth-form > label { display: grid; gap: 7px; min-width: 0; font-size: 11px; font-weight: 850; color: #314957; }
.auth-form input:not([type="checkbox"]) {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 45px;
  border-radius: 11px;
  padding: 0 13px;
  font-size: 13px;
}
.password-field { position: relative; width: 100%; min-width: 0; }
.password-field input { padding-right: 78px !important; }
.password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%) !important;
  min-height: 32px;
  padding: 0 9px;
  border: 0;
  background: transparent;
  color: #0f6f8f;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}
.auth-check {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px !important;
  min-width: 0;
  font-weight: 650 !important;
  color: #62727d !important;
}
.auth-check input { flex: 0 0 auto; width: 16px; height: 16px; margin: 0; }
.auth-login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  margin-top: -2px;
}
.auth-link-btn {
  flex: 0 0 auto;
  border: 0;
  padding: 5px 0;
  background: transparent;
  color: #0f6f8f;
  font-size: 10.5px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}
.auth-link-btn:hover { text-decoration: underline; }
.auth-primary {
  width: 100%;
  min-height: 46px;
  margin-top: 3px;
  border: 0;
  border-radius: 11px;
  justify-content: center;
  color: white;
  background: linear-gradient(135deg, #0f6f8f, #0d8984);
  box-shadow: 0 11px 22px rgba(15,111,143,.18);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.auth-primary:hover { box-shadow: 0 14px 28px rgba(15,111,143,.23); }
.auth-form.is-busy .auth-primary { opacity: .75; cursor: wait; }
.auth-secondary {
  width: 100%;
  min-height: 43px;
  border: 1px solid #d8e4e9;
  border-radius: 11px;
  justify-content: center;
  background: #fbfdfe;
  color: #49616e;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}
.auth-secondary:hover { background: #f3f8fa; border-color: #c7d8df; }
.auth-dev-recovery {
  display: grid;
  gap: 7px;
  margin-top: 16px;
  padding: 13px 14px;
  border: 1px dashed #9acfd0;
  border-radius: 12px;
  background: #f2fbfa;
  color: #365c61;
  font-size: 10.5px;
  line-height: 1.5;
}
.auth-dev-recovery strong { color: #136f72; font-size: 11px; }
.auth-dev-recovery a { justify-self: start; margin-top: 2px; color: #0f6f8f; font-weight: 900; text-decoration: none; }
.auth-dev-recovery a:hover { text-decoration: underline; }
.auth-password-help { margin-top: -2px; color: #82909a; font-size: 9.5px; font-weight: 600; line-height: 1.45; }
.auth-message {
  display: none;
  margin: -10px 0 18px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.45;
}
.auth-message.show { display: block; }
.auth-message.error { color: #912833; border: 1px solid #efc9ce; background: #fff4f5; }
.auth-message.success { color: #176043; border: 1px solid #c9e8dc; background: #f2fbf7; }
.auth-setup-warning {
  margin: -6px 0 17px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #f1d7ae;
  background: #fff9ee;
  color: #8a5c14;
  font-size: 10.5px;
  line-height: 1.5;
  font-weight: 750;
}
.auth-card-footer {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e8eef1;
  color: #85929b;
  font-size: 9.5px;
}
.auth-lock-dot { width: 7px; height: 7px; border-radius: 50%; background: #20a26c; box-shadow: 0 0 0 3px rgba(32,162,108,.11); }


/* Auth v1.2.2 – refinamento visual */
.auth-layout {
  width: min(1160px, 100%);
  min-height: min(720px, calc(100vh - 48px));
}

.auth-hero {
  flex: 0 0 41%;
  padding: 46px 40px;
}
.auth-hero h1 {
  margin: 10px 0 12px;
  font-size: clamp(34px, 3.8vw, 52px);
}
.auth-hero p {
  max-width: 380px;
  font-size: 14px;
  line-height: 1.7;
}
.auth-security-list {
  gap: 10px;
  margin-top: 32px;
}
.auth-security-list > div {
  padding: 12px 14px;
}
.auth-hero-foot {
  margin-top: 28px;
}

.auth-card-wrap {
  flex-basis: 59%;
  padding: 34px 34px;
}
.auth-card {
  max-width: 560px;
  padding: 32px 32px 24px;
  border: 1px solid #e5edf1;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfe 100%);
  box-shadow: 0 24px 60px rgba(18, 48, 63, .10);
}
.auth-card-brand {
  margin-bottom: 20px;
}
.auth-card-brand > span {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}
.auth-card-brand strong {
  font-size: 16px;
}
.auth-card-brand small {
  font-size: 11px;
}
.auth-heading {
  margin-bottom: 20px;
}
.auth-heading h2 {
  margin: 7px 0 8px;
  font-size: clamp(34px, 3vw, 42px);
  line-height: 1.02;
}
.auth-heading p {
  max-width: 48ch;
  font-size: 14px;
}
.auth-form {
  gap: 16px;
}
.auth-form > label,
.auth-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}
.auth-form > label,
.auth-field label:not(.auth-check) {
  font-size: 12px;
  font-weight: 850;
  color: #314957;
}
.auth-grid {
  display: grid;
  gap: 16px;
}
.auth-grid.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.auth-span-full {
  grid-column: 1 / -1;
}
.auth-form input:not([type="checkbox"]) {
  height: 48px;
  border: 1px solid #cfdee5;
  background: #fff;
  color: #17303e;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.auth-form input:not([type="checkbox"]):hover {
  border-color: #b9cfd8;
}
.auth-form input:not([type="checkbox"]):focus {
  border-color: #1592a2;
  box-shadow: 0 0 0 4px rgba(21, 146, 162, .12);
  outline: none;
}
.password-field input {
  padding-right: 92px !important;
}
.password-toggle {
  right: 8px;
  min-height: 34px;
  padding: 0 11px;
  border-radius: 10px;
  background: #eef7fa;
  color: #0f6f8f;
  font-size: 10px;
}
.password-toggle:hover {
  background: #e3f2f7;
}
.auth-password-help {
  margin-top: -1px;
  font-size: 10px;
  line-height: 1.5;
}
.auth-password-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 2px;
}
.auth-password-rules span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 999px;
  background: #f3f8fa;
  border: 1px solid #deeaef;
  color: #516a78;
  font-size: 10px;
  font-weight: 750;
}
.auth-password-rules span::before {
  content: "✓";
  color: #159266;
  font-weight: 900;
}
.auth-check-block {
  align-items: flex-start;
  gap: 10px !important;
  padding: 12px 14px;
  border: 1px solid #dbe8ed;
  border-radius: 14px;
  background: #f9fcfd;
}
.auth-check-block span {
  line-height: 1.45;
}
.auth-login-options {
  margin-top: -1px;
}
.auth-link-btn {
  font-size: 11px;
}
.auth-primary {
  min-height: 50px;
  margin-top: 6px;
  font-size: 13px;
}
.auth-secondary {
  min-height: 46px;
  font-size: 12px;
}
.auth-card-footer {
  margin-top: 22px;
  padding-top: 14px;
  font-size: 10px;
}

@media (max-width: 980px) {
  .auth-card-wrap {
    padding: 32px 26px;
  }
  .auth-card {
    max-width: 620px;
    padding: 28px 24px 22px;
  }
}

@media (max-width: 760px) {
  .auth-grid.two-up {
    grid-template-columns: minmax(0, 1fr);
  }
  .auth-heading h2 {
    font-size: 30px;
  }
}

@media (max-width: 560px) {
  .auth-card {
    max-width: 100%;
    padding: 24px 18px 20px;
    border-radius: 20px;
    box-shadow: none;
  }
  .auth-card-brand strong {
    font-size: 15px;
  }
  .auth-heading h2 {
    font-size: 28px;
  }
  .auth-password-rules {
    gap: 6px;
  }
  .auth-password-rules span {
    width: 100%;
    justify-content: flex-start;
  }
}

.auth-user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 4px 5px 4px 6px;
  border: 1px solid #d7e2e8;
  border-radius: 12px;
  background: #fbfdfe;
}
.auth-user-avatar {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(145deg, #e7f7f8, #eaf8f2);
  color: #0f6f8f;
  font-size: 11px;
  font-weight: 950;
}
.auth-user-copy { display: grid; min-width: 80px; max-width: 150px; }
.auth-user-copy strong { font-size: 10px; color: #27404d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auth-user-copy small { margin-top: 1px; font-size: 8.5px; color: #7b8a94; }
.auth-logout {
  min-height: 28px !important;
  padding: 0 8px !important;
  border: 0 !important;
  background: transparent !important;
  color: #8d3c43 !important;
  font-size: 9.5px !important;
  font-weight: 850 !important;
  box-shadow: none !important;
}

@media (max-width: 980px) {
  .auth-screen { align-items: flex-start; padding: 16px; }
  .auth-layout { width: min(620px, 100%); min-height: calc(100vh - 32px); }
  .auth-hero { display: none; }
  .auth-card-wrap { flex: 1 1 auto; padding: 42px clamp(22px, 6vw, 48px); }
  .auth-card { max-width: 460px; }
  .auth-user-copy { display: none; }
}

@media (max-width: 560px) {
  .auth-screen { padding: 0; background: #f7fafb; }
  .auth-layout {
    min-height: 100vh;
    width: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .auth-card-wrap { align-items: flex-start; padding: 28px 20px 36px; }
  .auth-card-brand { margin-bottom: 26px; }
  .auth-heading h2 { font-size: 27px; }
  .auth-login-options { align-items: flex-start; flex-direction: column; gap: 5px; }
}

@media print {
  .auth-screen, .auth-user-chip { display: none !important; }
}

/* ==========================================================
   AUTH v1.2.3 — isolamento total do CSS do sistema principal
   Impede que o grid global do formulário de pagamentos comprima
   os campos das telas de login/primeiro acesso/recuperação.
   ========================================================== */
.auth-screen,
.auth-screen * {
  box-sizing: border-box;
}

.auth-screen .auth-form {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-auto-flow: row !important;
  align-items: stretch !important;
  gap: 16px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

.auth-screen .auth-form > label,
.auth-screen .auth-field {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

.auth-screen .auth-grid {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  gap: 16px !important;
  align-items: start !important;
}

.auth-screen .auth-grid.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.auth-screen .auth-span-full {
  grid-column: 1 / -1 !important;
}

.auth-screen .auth-field > label,
.auth-screen .auth-form > label {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 0 7px !important;
  color: #314957 !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  line-height: 1.3 !important;
}

.auth-screen .auth-form input:not([type="checkbox"]) {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  height: 50px !important;
  margin: 0 !important;
  padding: 0 14px !important;
  border: 1px solid #ccdce4 !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: #17303e !important;
  font-size: 14px !important;
  line-height: normal !important;
}

.auth-screen .auth-form input:not([type="checkbox"]):focus {
  border-color: #0f8f9d !important;
  outline: none !important;
  box-shadow: 0 0 0 4px rgba(15, 143, 157, .12) !important;
}

.auth-screen .password-field {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
}

.auth-screen .password-field input {
  padding-right: 88px !important;
}

.auth-screen .password-toggle {
  position: absolute !important;
  top: 50% !important;
  right: 8px !important;
  transform: translateY(-50%) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-width: 66px !important;
  min-height: 34px !important;
  margin: 0 !important;
  padding: 0 10px !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: #eef7fa !important;
  color: #0d718c !important;
  box-shadow: none !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.auth-screen .auth-primary,
.auth-screen .auth-secondary {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 50px !important;
  margin: 0 !important;
  padding: 0 18px !important;
  border-radius: 12px !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
  white-space: normal !important;
}

.auth-screen .auth-check {
  display: flex !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

.auth-screen .auth-check input[type="checkbox"] {
  flex: 0 0 17px !important;
  width: 17px !important;
  height: 17px !important;
  min-height: 0 !important;
  margin: 1px 0 0 !important;
}

.auth-screen .auth-password-help {
  display: block !important;
  margin: 7px 0 0 !important;
  color: #748792 !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  line-height: 1.5 !important;
}

.auth-screen .auth-password-rules {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 7px !important;
  margin-top: 8px !important;
}

.auth-screen .auth-password-rules span {
  width: 100% !important;
  min-width: 0 !important;
  justify-content: flex-start !important;
  white-space: normal !important;
}

.auth-screen .auth-card-footer {
  width: 100% !important;
}

@media (max-width: 760px) {
  .auth-screen .auth-grid.two-up,
  .auth-screen .auth-password-rules {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Recuperação de senha v1.2.5 */
.auth-recovery-cooldown {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: -4px;
  padding: 10px 12px;
  border: 1px solid #dbe8ed;
  border-radius: 12px;
  background: #f7fbfc;
  color: #607581;
  font-size: 10.5px;
  line-height: 1.45;
}
.auth-recovery-cooldown.hidden { display: none; }
.auth-recovery-cooldown strong { color: #176f87; }
.auth-cooldown-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #1d9b79;
  box-shadow: 0 0 0 4px rgba(29,155,121,.10);
}
#forgotSubmitBtn:disabled {
  cursor: not-allowed;
  opacity: .68;
  box-shadow: none;
}


.auth-account-action {
  min-height: 28px !important;
  padding: 0 8px !important;
  border: 1px solid #d7e7ec !important;
  border-radius: 8px !important;
  background: #f4fafb !important;
  color: #176f87 !important;
  font-size: 9.5px !important;
  font-weight: 850 !important;
  box-shadow: none !important;
}
.auth-account-action:hover {
  background: #eaf6f8 !important;
  border-color: #badbe3 !important;
}
.auth-account-dialog {
  width: min(520px, calc(100vw - 24px));
  max-width: 520px;
  padding: 0;
  border: 1px solid #d6e2e7;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  color: #243d49;
  box-shadow: 0 24px 70px rgba(15, 35, 48, .22);
}
.auth-account-dialog .modal-head { padding: 16px 18px; gap: 16px; }
.auth-account-dialog .modal-head > div { display: grid; gap: 3px; }
.auth-account-dialog .modal-head strong { font-size: 15px; }
.auth-account-dialog .modal-head small { color: #738590; font-size: 10px; font-weight: 600; }
.auth-account-modal-body { display: grid; gap: 14px; padding: 18px; }
.auth-account-field { display: grid; gap: 7px; font-size: 11px; font-weight: 850; color: #314957; }
.auth-account-field > small { color: #7b8a94; font-size: 9.5px; font-weight: 600; line-height: 1.45; }
.auth-account-password-field { position: relative; display: flex; align-items: center; }
.auth-account-password-field input {
  width: 100%; min-width: 0; min-height: 42px; padding: 9px 76px 9px 11px;
  border: 1px solid #cfdce2; border-radius: 10px; background: #fff; color: #203845; outline: none;
}
.auth-account-password-field input:focus { border-color: #63b5c8; box-shadow: 0 0 0 3px rgba(62, 157, 180, .13); }
.auth-account-password-toggle {
  position: absolute; right: 5px; min-height: 30px !important; padding: 0 8px !important;
  border: 0 !important; background: transparent !important; color: #176f87 !important;
  font-size: 9.5px !important; font-weight: 850 !important; box-shadow: none !important;
}
.auth-account-message { display: none; padding: 10px 11px; border-radius: 10px; font-size: 10.5px; font-weight: 750; line-height: 1.45; }
.auth-account-message.show { display: block; }
.auth-account-message.error { color: #912833; border: 1px solid #efc9ce; background: #fff4f5; }
.auth-account-message.success { color: #176043; border: 1px solid #c9e8dc; background: #f2fbf7; }
.auth-account-security-note { display: grid; gap: 2px; padding: 11px 12px; border: 1px solid #d8e8eb; border-radius: 10px; background: #f5fafb; }
.auth-account-security-note strong { color: #176f87; font-size: 10.5px; }
.auth-account-security-note span { color: #687b86; font-size: 9.5px; line-height: 1.45; }
.auth-account-dialog form.is-busy input,
.auth-account-dialog form.is-busy button { pointer-events: none; }
.auth-account-dialog form.is-busy #changePasswordSubmitBtn { opacity: .7; }
@media (max-width: 560px) {
  .auth-account-action {
    width: 30px; padding: 0 !important; overflow: hidden; white-space: nowrap; text-indent: -999px; position: relative;
  }
  .auth-account-action::after {
    content: "🔑"; position: absolute; inset: 0; display: grid; place-items: center; text-indent: 0;
  }
  .auth-account-dialog { width: calc(100vw - 16px); }
}
