/* Telas da carteira autenticada: extrato, contas, importação, relatórios, mercado e backup */

.auth-workspace-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.auth-workspace-head h1 { margin: 0 0 6px; }
.auth-workspace-head .auth-lead { margin: 0; }
.auth-entry-list { display: grid; gap: 10px; margin-top: 18px; }
.auth-entry { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px; border: 1px solid #e5eaf1; border-radius: 10px; }
.auth-entry p { margin: 4px 0 0; color: #626e84; font-size: 13px; }
.auth-entry-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.auth-entry-actions button, .auth-secondary { border: 1px solid #dce3ed; border-radius: 8px; background: #fff; padding: 7px 10px; color: #315fc9; font-weight: 650; }
.auth-empty { padding: 18px; border: 1px dashed #cbd5e1; border-radius: 10px; color: #536176; }
.auth-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; }
.auth-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.auth-form-grid .span-2 { grid-column: span 2; }
.auth-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.auth-market-invoice { padding: 14px; border: 1px solid #dce5f2; border-radius: 10px; background: #f7faff; min-width: 0; }
.auth-market-invoice input[type=file] { width: 100%; min-width: 0; }
.auth-market-item { border: 1px solid #e5eaf1; border-radius: 10px; margin: 10px 0; padding: 4px 12px 12px; }
.auth-market-table { display: block; overflow-x: auto; }
.auth-market-table table { border-collapse: collapse; min-width: 720px; width: 100%; }
.auth-market-table th, .auth-market-table td { text-align: left; padding: 9px; border-bottom: 1px solid #e5eaf1; }
.auth-feedback:empty { display: none; }
.auth-import-upload { display: grid; gap: 12px; }
.auth-import-upload .auth-primary { width: auto; padding: 0 22px; }
.auth-import-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.auth-import-head h2 { margin-bottom: 5px; }
.auth-import-head .auth-lead { margin: 0; }
.auth-import-actions { display: flex; gap: 8px; flex-shrink: 0; }
.auth-import-actions button { min-height: 42px; }
.auth-import-summary, .auth-import-notes { color: #626e84; font-size: 13px; }
.auth-import-rows { display: grid; gap: 10px; margin: 16px 0; }
.auth-import-row { padding: 14px; border: 1px solid #e5eaf1; border-radius: 10px; }
.auth-import-select, .auth-import-allow, .auth-import-fixed { display: flex !important; align-items: center; gap: 8px; }
.auth-import-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.auth-import-grid label { display: grid; gap: 5px; color: #536176; font-size: 12px; font-weight: 650; }
.auth-import-grid input, .auth-import-grid select { width: 100%; min-width: 0; min-height: 40px; padding: 8px; border: 1px solid #dce3ed; border-radius: 8px; background: #fff; color: #273348; }
.auth-import-description { grid-column: span 2; }
.auth-import-fixed { align-self: end; min-height: 40px; }
.auth-import-grid .auth-import-fixed input { flex: none; width: 20px; height: 20px; min-height: 0; padding: 0; }
.auth-import-duplicate { color: #a73543; font-size: 13px; }
.auth-import-duplicate[data-kind=possible] { color: #946400; }
.auth-import-notes { margin: 8px 0 0; }
.auth-import-actions .auth-primary { width: auto; margin: 0; padding: 0 15px; }
.auth-report-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 16px 0; }
.auth-report-filters label, .auth-report-budget-form label { display: grid; gap: 5px; flex: 1; min-width: 130px; color: #536176; font-size: 12px; font-weight: 650; }
.auth-report-filters select, .auth-report-budget-form select, .auth-report-budget-form input { width: 100%; min-width: 0; min-height: 40px; padding: 8px; border: 1px solid #dce3ed; border-radius: 8px; background: #fff; color: #273348; }
.auth-report-exports { display: flex; gap: 8px; flex-wrap: wrap; }
.auth-report-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.auth-report-kpis article, .auth-report-compare article { min-width: 0; border: 1px solid #e5eaf1; border-radius: 10px; padding: 12px; background: #fff; }
.auth-report-kpis small, .auth-report-compare small, .auth-report-budget small, .auth-report-bill small { display: block; color: #626e84; font-size: 12px; line-height: 1.45; }
.auth-report-kpis strong, .auth-report-compare strong { display: block; margin: 5px 0; font-size: 18px; overflow-wrap: anywhere; }
.auth-report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.auth-report-panel { min-width: 0; margin: 0 0 12px; padding: 15px; border: 1px solid #e5eaf1; border-radius: 10px; background: #fff; }
.auth-report-panel h3 { margin: 0 0 12px; font-size: 16px; }
.auth-report-chart { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.auth-report-month { text-align: center; min-width: 0; padding: 8px 4px; border: 1px solid #e5eaf1; border-radius: 8px; }
.auth-report-bars { height: 105px; display: flex; align-items: end; justify-content: center; gap: 6px; border-bottom: 1px solid #e5eaf1; padding-bottom: 4px; }
.auth-report-bars i { width: min(28px, 38%); min-height: 0; border-radius: 4px 4px 1px 1px; }
.auth-report-bars .income { background: var(--dx-income); }
.auth-report-bars .expense { background: var(--dx-expense); }
.auth-report-month strong, .auth-report-month small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 5px; font-size: 11px; }
.auth-report-month small { color: #626e84; font-size: 10px; }
.auth-report-legend { display: flex; gap: 12px; margin-bottom: 8px; color: #626e84; font-size: 11px; }
.auth-report-legend span:before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 2px; background: var(--dx-income); }
.auth-report-legend span + span:before { background: var(--dx-expense); }
.auth-report-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid #edf0f5; font-size: 13px; }
.auth-report-row:last-child { border-bottom: 0; }
.auth-report-compare { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.auth-report-obligation-kpis { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.auth-report-obligation-kpis span { color: #626e84; font-size: 12px; }
.auth-report-obligation-kpis strong { display: block; color: #273348; font-size: 15px; }
.auth-report-bill, .auth-report-budget { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid #edf0f5; }
.auth-report-bill > div, .auth-report-budget > div:first-child { min-width: 0; }
.auth-report-bill strong { overflow-wrap: anywhere; }
.auth-report-budget strong { display: block; overflow-wrap: anywhere; }
.auth-report-budget-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.auth-report-progress { height: 6px; margin: 6px 0; background: #edf0f5; border-radius: 8px; overflow: hidden; }
.auth-report-progress i { display: block; height: 100%; }
.auth-report-budget-form { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.auth-report-budget-form button { min-height: 40px; }
.auth-tools-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.auth-tools-panel { padding: 16px; border: 1px solid #e5eaf1; border-radius: 12px; background: #fff; min-width: 0; }
.auth-tools-panel h2 { margin-top: 0; }
.auth-tools-panel form { display: grid; gap: 12px; }
.auth-tools-panel input[type=file], .auth-tools-panel textarea { width: 100%; min-width: 0; }
.auth-tools-summary { max-height: 180px; overflow: auto; color: #536176; font-size: 13px; }
.auth-migration-panel { margin-top: 16px; }
.auth-migration-panel > p, .auth-migration-panel li { overflow-wrap: anywhere; }
.auth-migration-inventory, .auth-migration-preview { padding: 12px; border: 1px solid #e5eaf1; border-radius: 8px; background: #f8fafc; }
.auth-migration-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.auth-migration-panel select { width: 100%; min-width: 0; }
.auth-migration-export { margin: 12px 0; }
.auth-tools-actions { display: grid; gap: 10px; }
.auth-migration-history { margin-top: 16px; padding-top: 12px; border-top: 1px solid #e5eaf1; }
.auth-migration-history li { margin: 6px 0; color: #536176; font-size: 13px; }
.auth-entry-actions button { border: 1px solid #dce3ed; border-radius: 8px; background: #fff; padding: 7px 10px; color: #315fc9; font-weight: 650; }
.auth-entry-amount { font-weight: 750; white-space: nowrap; }
.auth-checkbox { display: flex; align-items: center; gap: 8px; margin: 10px 0; }
.auth-filter { max-width: 210px; }
@media (max-width: 600px) {
  .auth-workspace-head { align-items: flex-start; flex-direction: column; }
  .auth-workspace-head .auth-secondary { width: 100%; }
  .auth-form-grid, .auth-grid { grid-template-columns: 1fr; }
  .auth-form-grid .span-2 { grid-column: auto; }
  .auth-entry { align-items: flex-start; flex-direction: column; }
  .auth-entry-actions { width: 100%; flex-wrap: wrap; }
  .auth-entry-actions button { flex: 1; }
  .auth-market-item .auth-form-grid { grid-template-columns: 1fr; }
  .auth-market-item .span-2 { grid-column: auto; }
  .auth-import-upload { grid-template-columns: 1fr; }
  .auth-import-upload .auth-primary { width: 100%; }
  .auth-import-head { flex-direction: column; }
  .auth-import-actions { width: 100%; flex-wrap: wrap; }
  .auth-import-actions button { flex: 1; }
  .auth-import-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-import-description { grid-column: span 2; }
  .auth-import-fixed { align-self: center; }
  .auth-import-row { padding: 11px; }
  .auth-tools-grid { grid-template-columns: 1fr; }
  .auth-tools-panel { padding: 12px; }
  .auth-migration-options { grid-template-columns: 1fr; }
  .auth-grid, .auth-form-grid { grid-template-columns: 1fr; }
  .auth-form-grid { grid-template-columns: 1fr; }
  .auth-filter { max-width: none; width: 100%; }
}
@media (max-width: 650px) {
  .auth-report-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-report-grid { grid-template-columns: 1fr; }
  .auth-report-chart { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .auth-report-compare { grid-template-columns: 1fr; }
  .auth-report-budget { align-items: flex-start; flex-direction: column; }
  .auth-report-budget-actions { width: 100%; }
  .auth-report-budget-actions button { flex: 1; }
  .auth-report-exports { width: 100%; }
  .auth-report-exports button { flex: 1; }
}

/* Extrato */
.ex-page { padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; }
.ex-bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; margin-bottom: 12px; }
.ex-bar input, .ex-bar select { min-height: 44px; width: 100%; min-width: 0; }
.period-nav { display: inline-flex; align-items: center; min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.period-nav > button { flex: none; width: 40px; height: 44px; border: 0; background: transparent; color: inherit; font: inherit; font-size: 20px; cursor: pointer; }
.period-nav > button:disabled { opacity: .35; cursor: default; }
.period-nav select { width: auto; min-height: 44px; border: 0 !important; background: transparent !important; font-weight: 700; text-align: center; text-align-last: center; }
.period-nav :is(button, select):focus-visible { outline: 2px solid #2563EB; outline-offset: -2px; border-radius: 12px; }
.ex-totals { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0 0 14px; color: #475569; font-size: 14px; }
.ex-totals b { margin-left: 4px; color: #172554; }
.ex-totals .is-in, .ex-value.is-in { color: #0B6E4D; }
.ex-totals .is-out { color: #A3243A; }
.ex-list { display: grid; border: 1px solid #E2E8F0; border-radius: 16px; background: #fff; overflow: hidden; }
.ex-day { padding: 0 16px 4px; }
.ex-day + .ex-day { border-top: 1px solid #E2E8F0; }
.auth-workspace .ex-day > h3 { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 12px 0 2px; color: #56627A; font-size: 12.5px; font-weight: 700; letter-spacing: .02em; }
.ex-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; min-height: 52px; padding: 6px 0; border: 0; border-top: 1px solid #EDF0F5; background: transparent; color: #172554; font: inherit; text-align: left; cursor: pointer; }
.ex-day > h3 + .ex-row { border-top: 0; }
.ex-list > .ex-empty, .ex-list > .ex-more { margin: 0; padding: 16px; }
.ex-icon.ex-c0 { background: #E8F1FF; color: #1D4ED8; } .ex-icon.ex-c1 { background: #E3F6EE; color: #0B6E4D; } .ex-icon.ex-c2 { background: #FFF1DC; color: #8A4B00; } .ex-icon.ex-c3 { background: #FDE8EE; color: #A3243A; }
.ex-icon.ex-c4 { background: #EFEAFE; color: #5B3CC4; } .ex-icon.ex-c5 { background: #E0F5F7; color: #0E6670; } .ex-icon.ex-c6 { background: #F3F4F6; color: #374151; } .ex-icon.ex-c7 { background: #FCE9F6; color: #9D2383; }
.ex-row:hover .ex-text b { text-decoration: underline; }
.ex-row:focus-visible { outline: 2px solid #2563EB; outline-offset: 2px; border-radius: 10px; }
.ex-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: #E8F1FF; color: #1D4ED8; font-weight: 700; }
.ex-text { min-width: 0; }
.ex-text b, .ex-text small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-text b { font-weight: 700; }
.ex-text small { color: #56627A; font-size: 12.5px; }
.ex-value { display: grid; justify-items: end; gap: 2px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ex-value em { padding: 1px 7px; border-radius: 99px; background: #E8F1FF; color: #1E40AF; font-size: 12px; font-style: normal; font-weight: 650; }
.ex-empty { padding: 34px 16px; border: 1px dashed #CBD5E1; border-radius: 16px; color: #475569; text-align: center; }
.ex-more { text-align: center; }
.auth-head-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.auth-head-row h2 { margin: 0; }
.auth-entry-actions .is-main { border-color: #2563EB !important; background: #2563EB !important; color: #fff !important; }
.wx-plain { min-width: 0; margin: 0; padding: 0; border: 0; }
.toast-action { margin-left: 12px; min-height: 32px; padding: 0 12px; border: 1px solid currentColor; border-radius: 99px; background: transparent; color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
.wx-dialog output { display: flex; align-items: center; min-height: 42px; }
@media (max-width: 719px) {
  .ex-bar { grid-template-columns: minmax(0, 1fr) auto; }
  .ex-search { grid-column: 1 / -1; grid-row: 2; }
  .ex-day { padding: 4px 12px 6px; }
}

/* Conciliação */
.auth-import-row.is-matched { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px; align-items: center; border-left: 4px solid #2563EB; }
.auth-import-row.is-matched p { margin: 3px 0 0; color: #56627A; font-size: 13px; }
.auth-import-row.is-matched label { display: grid; gap: 4px; min-width: 0; font-size: 12px; font-weight: 650; }
.auth-import-row.is-matched select { width: 100%; min-width: 0; min-height: 42px; text-overflow: ellipsis; }
.auth-import-match { margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; background: #E8F1FF; color: #1E3A8A; font-weight: 650; }
@media (max-width: 719px) { .auth-import-row.is-matched { grid-template-columns: minmax(0, 1fr); } }

.auth-disclosure + .auth-disclosure, .auth-entry-list + .auth-disclosure { margin-top: 10px; }
.auth-workspace section:not(.ex-day) > h3 { margin-top: 18px; }
.wx-dialog .form-grid { align-items: start; }
/* Categoria e responsável só aparecem quando a linha vai entrar como nova. */
.auth-import-row.is-matched:not(:has(option[value=import]:checked)) .auth-import-asnew { display: none; }
[data-account-root] { display: grid; gap: 12px; margin-top: 16px; }
[data-account-root] > .auth-actions { justify-content: flex-start; }
.account-activity { margin: 8px 0 0; padding: 0; list-style: none; }
.account-activity li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #E2E8F0; }
/* Assinatura Growvo, cores oficiais da marca: fundo azul noite, borda índigo, gradiente Grow só no nome. */
.growvo-sign{--growvo-night:#14173A;--growvo-indigo:#404680;--growvo-cyan:#00C7CF;--growvo-green:#00B46C;--growvo-leaf:#00A213;--growvo-text:#DDE0F7;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:7px;width:fit-content;max-width:100%;box-sizing:border-box;margin:16px auto 0;padding:8px 18px;border:1px solid;border-color:var(--growvo-indigo);border-radius:999px;background:var(--growvo-night);color:var(--growvo-text);font-size:13px;font-weight:550;letter-spacing:.01em;line-height:1.3;text-align:center}
.growvo-heart{flex:none;width:15px;height:15px;fill:var(--growvo-cyan);animation:growvo-beat 2.4s ease-in-out infinite}
.growvo-name{font-size:15.5px;font-weight:800;letter-spacing:.03em;background:linear-gradient(135deg,var(--growvo-cyan),var(--growvo-green) 60%,var(--growvo-leaf));-webkit-background-clip:text;background-clip:text;color:transparent}
.growvo-name{text-decoration:none;border-radius:4px;text-decoration-color:var(--growvo-cyan);text-underline-offset:3px;text-decoration-thickness:2px}
.growvo-name:hover{text-decoration-line:underline}
.growvo-name:focus-visible{outline:2px solid var(--growvo-cyan);outline-offset:3px}
@keyframes growvo-beat{0%,60%,100%{transform:scale(1)}30%{transform:scale(1.18)}}
@media(prefers-reduced-motion:reduce){.growvo-heart{animation:none}}
@media(forced-colors:active){.growvo-name{background:none;color:LinkText}.growvo-heart{fill:CanvasText}}
/* Área de importar: tocar, arrastar ou fotografar. */
.auth-drop { position: relative; display: grid; justify-items: center; gap: 4px; padding: 28px 18px; border: 2px dashed #B9C8EA; border-radius: 16px; background: #F5F8FF; color: #1D4ED8; text-align: center; cursor: pointer; }
.auth-drop b { color: #172554; font-size: 16px; }
.auth-drop-hint { color: #56627A; font-size: 14px; }
.auth-drop-formats { margin-top: 6px; color: #56627A; font-size: 12.5px; }
.auth-drop:hover, .auth-drop.is-over { border-color: #2563EB; background: #EAF1FF; }
.auth-drop:focus-within, .auth-drop-photo:focus-within { outline: 2px solid #2563EB; outline-offset: 2px; }
.auth-drop-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.auth-drop-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.auth-drop-photo { position: relative; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .auth-drop-photo { display: none; } }
@media (max-width: 719px) { .auth-drop-actions > * { flex: 1; min-height: 48px; } }
