@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg:           #EAF0E6;
  --surface:      #FFFFFF;
  --ink:          #1F2A22;
  --ink-soft:     #5C6B5F;
  --ink-faint:    #9CAA9F;
  --green:        #1F6F54;
  --green-dark:   #15503C;
  --green-soft:   #DCEEE3;
  --coral:        #F2845C;
  --coral-soft:   #FCE3D4;
  --error:        #C24E33;
  --error-soft:   #F8E3DD;
  --line:         #E1E8DD;
  --font-display: 'Fraunces', serif;
  --font-body:    'Inter', sans-serif;
  --shadow-panel: 0 32px 64px -28px rgba(21, 30, 24, 0.38);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 18% 8%, #F4F8F0 0%, transparent 45%),
    radial-gradient(circle at 85% 92%, #DDEAE0 0%, transparent 50%),
    var(--bg);
  min-height: 100vh; color: var(--ink);
}
button { font-family: inherit; }
:focus-visible { outline: 2.5px solid var(--coral); outline-offset: 2px; }

.auth-gate { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 18px; gap: 16px; }
.auth-card {
  width: 100%; max-width: 380px; background: var(--surface);
  border: 1px solid rgba(31, 42, 34, 0.06); border-radius: 28px;
  box-shadow: var(--shadow-panel); padding: 32px 26px 28px;
  animation: auth-in .4s ease both;
}
@keyframes auth-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (prefers-reduced-motion: reduce) { .auth-card { animation: none; } }
.auth-brand { text-align: center; margin-bottom: 22px; }
.auth-brand .eyebrow { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--green); font-weight: 600; margin: 0 0 4px; }
.auth-brand h1 { font-family: var(--font-display); font-size: 2rem; font-weight: 600; margin: 0; color: var(--ink); letter-spacing: -0.01em; }
.auth-sprout { width: 48px; height: 48px; border-radius: 50%; background: var(--green-soft); display: flex; align-items: center; justify-content: center; margin: 14px auto 0; }
.auth-intro { font-size: .84rem; color: var(--ink-soft); line-height: 1.5; text-align: center; margin: 0 0 20px; }
.auth-reset-btn { width: 100%; background: none; border: none; color: var(--ink-soft); font-size: .78rem; font-weight: 600; cursor: pointer; padding: 12px 0 2px; margin-top: 4px; text-decoration: underline; text-underline-offset: 2px; }
.auth-reset-btn:hover { color: var(--green); }
.auth-note { font-size: .78rem; color: var(--error); background: var(--error-soft); border-radius: 12px; padding: 10px 12px; margin: 16px 0 0; line-height: 1.45; text-align: center; }
.auth-foot { font-size: .72rem; color: var(--ink-faint); text-align: center; max-width: 360px; margin: 0; line-height: 1.5; }
.auth-foot strong { color: var(--ink-soft); font-weight: 600; }
.reg-desc { font-size: .82rem; color: var(--ink-soft); line-height: 1.5; margin: 0 0 18px; }

.app-shell { background: var(--surface); min-height: 100vh; display: flex; flex-direction: column; position: relative; }
@media (min-width: 860px) {
  .app-shell { max-width: 1120px; margin: 40px auto; min-height: auto; border-radius: 30px; box-shadow: var(--shadow-panel); overflow: hidden; border: 1px solid rgba(31, 42, 34, 0.06); }
}

.app-header { padding: 24px 20px 6px; flex-shrink: 0; }
.header-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.brand .eyebrow { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--green); font-weight: 600; margin: 0 0 4px; }
.brand h1 { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; margin: 0; color: var(--ink); letter-spacing: -0.01em; }
.screen-sub { font-size: .82rem; color: var(--ink-soft); margin: 4px 0 0; }
.header-actions { display: none; }
.desktop-tabs { display: none; }

.cta-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--green); color: #fff; border: none; padding: 11px 20px; border-radius: 999px; font-size: .86rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.cta-btn:hover { background: var(--green-dark); }
.cta-btn svg { width: 15px; height: 15px; }

.logout-btn { background: var(--green-soft); border: none; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--green-dark); cursor: pointer; flex-shrink: 0; }
.logout-btn:hover { background: var(--green); color: #fff; }
.logout-btn svg { width: 18px; height: 18px; }
.logout-btn-mobile { width: 38px; height: 38px; }

@media (min-width: 860px) {
  .app-header { padding: 22px 36px; border-bottom: 1px solid var(--line); }
  .header-inner { align-items: center; }
  .header-actions { display: flex; align-items: center; gap: 10px; }
  .screen-sub { display: none; }
  .brand h1 { font-size: 1.9rem; }
  .logout-btn-mobile { display: none; }
  .desktop-tabs { display: flex; gap: 4px; background: #F1F5EE; padding: 4px; border-radius: 999px; }
  .dtab { border: none; background: none; padding: 8px 20px; border-radius: 999px; font-size: .84rem; font-weight: 700; color: var(--ink-soft); cursor: pointer; }
  .dtab.active { background: var(--surface); color: var(--green); box-shadow: 0 2px 6px -3px rgba(21,30,24,.2); }
}
@media (max-width: 859px) { .header-actions { display: none; } }

.app-main { flex: 1; padding: 6px 20px 112px; }
.screen { display: none; }
.screen.active { display: block; animation: fade-in .35s ease both; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .screen { animation: none; } }
@media (min-width: 860px) { .app-main { padding: 30px 36px 44px; } }

.history-topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-top: 12px; margin-bottom: 14px; }
@media (min-width: 860px) { .history-topbar { align-items: center; margin-top: 0; } }
.screen-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; margin: 0 0 2px; }
@media (min-width: 860px) { .screen-title { font-size: 1.5rem; } }
.screen-title-sub { font-size: .82rem; color: var(--ink-soft); margin: 0; }
.export-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--green-soft); color: var(--green-dark); border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: .78rem; font-weight: 700; cursor: pointer; white-space: nowrap; flex-shrink: 0; transition: background .15s, color .15s; }
.export-btn:hover { background: var(--green); color: #fff; border-color: var(--green); }
.export-btn svg { width: 14px; height: 14px; }

.filter-bar { background: linear-gradient(180deg, #FBFDFA 0%, #F4F8F1 100%); border: 1px solid var(--line); border-radius: 18px; padding: 14px 14px; margin-bottom: 16px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fchip { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 15px; font-size: .78rem; font-weight: 600; color: var(--ink-soft); cursor: pointer; transition: background .12s, color .12s, border-color .12s; }
.fchip:hover { border-color: var(--green); color: var(--green); }
.fchip.active { background: var(--green); border-color: var(--green); color: #fff; }
.filter-inputs { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-top: 0; }
.filter-inputs:not(:empty) { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.fi-group { display: flex; flex-direction: column; gap: 5px; }
.fi-group label { font-size: .72rem; font-weight: 600; color: var(--ink-soft); }
.fi-group input, .fi-group select { border: 1.5px solid var(--line); background: #fff; border-radius: 11px; padding: 9px 12px; font-size: .88rem; color: var(--ink); font-family: var(--font-body); min-width: 130px; }
.fi-group input:focus, .fi-group select:focus { border-color: var(--green); outline: none; }
.fi-amount { position: relative; }
.fi-amount .prefix { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-soft); font-size: .82rem; font-weight: 600; pointer-events: none; }
.fi-amount input { padding-left: 32px !important; font-variant-numeric: tabular-nums; min-width: 120px; }
.fi-clear { background: none; border: none; color: var(--green); font-size: .78rem; font-weight: 700; cursor: pointer; padding: 9px 4px; text-decoration: underline; text-underline-offset: 2px; }
.fi-clear:hover { color: var(--green-dark); }

.hero-row { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 860px) { .hero-row { grid-template-columns: 1.05fr 1fr; align-items: stretch; gap: 30px; } }
.hero { margin-top: 6px; }
.hero .hero-label { font-size: .8rem; color: var(--ink-soft); margin: 0 0 2px; }
.hero .hero-amount { font-family: var(--font-display); font-size: 2.5rem; font-weight: 600; margin: 0; line-height: 1.05; color: var(--ink); font-variant-numeric: tabular-nums; }
.hero .hero-meta { font-size: .85rem; color: var(--ink-soft); margin: 8px 0 0; }
.hero .hero-meta strong { color: var(--green); font-weight: 700; }
@media (min-width: 860px) { .hero { display: flex; flex-direction: column; justify-content: center; } .hero .hero-amount { font-size: 3.4rem; } .hero .hero-meta { font-size: .95rem; margin-top: 12px; } }

.wall-card { margin-top: 22px; background: linear-gradient(180deg, #FBFDFA 0%, #F4F8F1 100%); border: 1px solid var(--line); border-radius: 24px; padding: 18px 18px 14px; display: flex; gap: 14px; align-items: flex-end; }
@media (min-width: 860px) { .wall-card { margin-top: 0; align-items: center; } .wall-visual { width: 190px; } .wall-svg { width: 190px; } }
.wall-visual { flex-shrink: 0; width: 160px; }
.wall-svg { width: 160px; height: auto; display: block; }
.wall-side { flex: 1; padding-bottom: 6px; }
.wall-side .wall-tag { display: inline-flex; align-items: center; gap: 6px; background: var(--coral-soft); color: var(--coral); font-weight: 700; font-size: .78rem; padding: 5px 10px; border-radius: 999px; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.wall-side .wall-tag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--coral); }
.wall-side p { font-size: .78rem; color: var(--ink-soft); margin: 0; line-height: 1.45; }
.wall-side .meta-edit { margin-top: 10px; background: none; border: none; padding: 0; font-size: .74rem; color: var(--green); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.tick-line  { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.tick-label { font-size: 9px; fill: var(--ink-faint); font-family: var(--font-body); }
.axis-line  { stroke: var(--ink-faint); stroke-width: 1; }
.wall-track { fill: var(--green-soft); }
.wall-fill  { fill: var(--green); transition: height .8s cubic-bezier(.22,.61,.36,1), y .8s cubic-bezier(.22,.61,.36,1); }
.wall-marker line   { stroke: var(--coral); stroke-width: 2; }
.wall-marker circle { fill: var(--coral); }
@media (prefers-reduced-motion: reduce) { .wall-fill { transition: none; } }

.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 18px; }
@media (min-width: 860px) { .stats-grid { grid-template-columns: repeat(4, 1fr); margin-top: 26px; } }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.stat-label { font-size: .7rem; color: var(--ink-soft); margin: 0 0 4px; font-weight: 600; }
.stat-value { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; }

.monthly-card { margin-top: 4px; background: linear-gradient(180deg, #FBFDFA 0%, #F4F8F1 100%); border: 1px solid var(--line); border-radius: 20px; padding: 18px 6px 14px 16px; }
.monthly-scroll { display: flex; align-items: flex-end; gap: 18px; overflow-x: auto; padding: 2px 10px 4px 0; min-height: 150px; }
@media (min-width: 860px) { .monthly-scroll { gap: 26px; min-height: 170px; } }
.month-col { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; width: 38px; }
.month-bar-track { width: 22px; height: 96px; background: var(--green-soft); border-radius: 7px 7px 3px 3px; display: flex; align-items: flex-end; overflow: hidden; }
@media (min-width: 860px) { .month-bar-track { height: 114px; } }
.month-bar-fill { width: 100%; background: var(--green); border-radius: 7px 7px 3px 3px; height: 0%; transition: height .8s cubic-bezier(.22,.61,.36,1); }
.month-col.is-current .month-bar-fill { background: var(--green-dark); }
@media (prefers-reduced-motion: reduce) { .month-bar-fill { transition: none; } }
.month-value { font-size: .6rem; font-weight: 700; color: var(--ink-soft); margin-bottom: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.month-label { font-size: .66rem; color: var(--ink-faint); margin-top: 7px; white-space: nowrap; }
.month-empty { font-size: .8rem; color: var(--ink-soft); padding: 18px 4px; margin: 0; line-height: 1.5; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 0 10px; }
.section-head h2 { font-family: var(--font-body); font-size: .92rem; font-weight: 700; margin: 0; color: var(--ink); }
.section-head .link-btn { background: none; border: none; color: var(--green); font-size: .78rem; font-weight: 600; cursor: pointer; padding: 0; }

.mini-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line); }
.mini-row:last-child { border-bottom: none; }
.mini-row .who  { font-size: .86rem; font-weight: 600; color: var(--ink); }
.mini-row .when { font-size: .74rem; color: var(--ink-faint); margin-top: 1px; }
.mini-row .val  { font-weight: 700; color: var(--green); font-size: .88rem; font-variant-numeric: tabular-nums; }

.empty-state { text-align: center; padding: 34px 14px; border: 1.5px dashed var(--line); border-radius: 20px; margin-top: 6px; }
.empty-state .empty-emoji-wrap { width: 46px; height: 46px; border-radius: 50%; background: var(--green-soft); display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.empty-state p { font-size: .84rem; color: var(--ink-soft); margin: 0; line-height: 1.5; }
.empty-state strong { color: var(--ink); font-weight: 600; }

.history-list-head { display: none; }
.history-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); position: relative; }
.history-item:last-child { border-bottom: none; }
.history-rail { flex-shrink: 0; width: 10px; display: flex; justify-content: center; padding-top: 5px; }
.history-rail .node { width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.history-body { flex: 1; min-width: 0; }
.history-body .h-date { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); font-weight: 600; margin: 0 0 3px; }
.history-body .h-name { font-size: .92rem; font-weight: 600; color: var(--ink); margin: 0; }
.history-body .h-val  { font-size: .92rem; font-weight: 700; color: var(--green); margin-top: 2px; font-variant-numeric: tabular-nums; }
.history-comprovante { flex-shrink: 0; display: flex; align-items: center; }
.comprovante-thumb-btn { background: none; border: none; padding: 0; cursor: pointer; border-radius: 10px; display: block; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.comprovante-thumb-btn:hover { transform: scale(1.06); box-shadow: 0 6px 16px -6px rgba(21,30,24,.3); }
.comprovante-thumb-btn img { width: 44px; height: 44px; object-fit: cover; display: block; border-radius: 10px; border: 1px solid var(--line); }
.comprovante-pdf-btn { display: inline-flex; align-items: center; gap: 5px; background: var(--coral-soft); color: var(--coral); border: 1.5px solid rgba(242,132,92,.3); border-radius: 10px; padding: 6px 10px; font-size: .7rem; font-weight: 700; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.comprovante-pdf-btn:hover { background: var(--coral); color: #fff; }
.comprovante-pdf-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.history-actions { display: flex; align-items: center; flex-shrink: 0; }
.icon-btn { background: none; border: none; width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; color: var(--ink-faint); cursor: pointer; }
.icon-btn:hover { background: var(--error-soft); color: var(--error); }

@media (min-width: 860px) {
  .history-rail { display: none; }
  .history-list-head { display: grid; grid-template-columns: 140px 1fr 140px 120px 44px; gap: 14px; padding: 0 4px 10px; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); font-weight: 700; border-bottom: 1px solid var(--line); margin-bottom: 2px; }
  .history-item { display: grid; grid-template-columns: 140px 1fr 140px 120px 44px; align-items: center; gap: 14px; padding: 13px 4px; }
  .history-body  { display: contents; }
  .h-date { grid-column: 1; margin: 0; text-transform: none; font-size: .84rem; color: var(--ink-soft); font-weight: 500; letter-spacing: 0; }
  .h-name { grid-column: 2; }
  .h-val  { grid-column: 3; margin-top: 0; }
  .history-comprovante { grid-column: 4; }
  .history-actions { grid-column: 5; justify-content: flex-end; }
  .comprovante-thumb-btn img { width: 38px; height: 38px; }
}

.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 22px; }
.pagination:empty { display: none; }
.page-btn { display: inline-flex; align-items: center; gap: 4px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px; padding: 9px 18px; font-size: .82rem; font-weight: 700; color: var(--green); cursor: pointer; transition: background .12s, border-color .12s; }
.page-btn:hover:not(:disabled) { background: var(--green-soft); border-color: var(--green); }
.page-btn:disabled { color: var(--ink-faint); cursor: default; opacity: .5; }
.page-info { font-size: .82rem; font-weight: 600; color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }

.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; height: 78px; background: var(--surface); border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-around; padding: 0 18px; z-index: 30; }
.nav-btn { background: none; border: none; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--ink-faint); font-size: .68rem; font-weight: 600; cursor: pointer; padding: 6px 14px; }
.nav-btn.active { color: var(--green); }
.nav-btn svg { width: 22px; height: 22px; }
.add-btn { width: 56px; height: 56px; border-radius: 50%; background: var(--coral); border: none; display: flex; align-items: center; justify-content: center; color: #fff; cursor: pointer; box-shadow: 0 10px 22px -8px rgba(242,132,92,.65); margin-top: -30px; flex-shrink: 0; }
.add-btn svg { width: 24px; height: 24px; }
.add-btn:hover { background: #EE7847; }
@media (min-width: 860px) { .bottom-nav { display: none; } .app-main { padding-bottom: 44px; } }

.sheet-overlay { position: fixed; inset: 0; background: rgba(21,30,24,.46); display: flex; align-items: flex-end; justify-content: center; opacity: 0; visibility: hidden; transition: opacity .25s ease; z-index: 45; }
.sheet-overlay.open { opacity: 1; visibility: visible; }
.sheet { width: 100%; background: var(--surface); border-radius: 28px 28px 0 0; padding: 24px 24px 30px; max-height: 92%; overflow-y: auto; transform: translateY(100%); transition: transform .35s cubic-bezier(.22,.61,.36,1); }
.sheet-overlay.open .sheet { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .sheet, .sheet-overlay { transition: none; } }
@media (min-width: 860px) {
  .sheet-overlay { align-items: center; padding: 24px; }
  .sheet { max-width: 460px; border-radius: 24px; max-height: 84vh; transform: translateY(14px) scale(.98); opacity: 0; transition: transform .25s ease, opacity .25s ease; }
  .sheet-overlay.open .sheet { transform: translateY(0) scale(1); opacity: 1; }
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.sheet-head h2 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; margin: 0; }
.sheet-head .close-btn { background: var(--green-soft); border: none; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--green-dark); cursor: pointer; }
.master-warn { display: flex; gap: 12px; align-items: flex-start; background: var(--error-soft); border-radius: 14px; padding: 14px; margin-bottom: 18px; }
.master-warn svg { width: 22px; height: 22px; color: var(--error); flex-shrink: 0; margin-top: 1px; }
.master-warn p { font-size: .82rem; color: var(--ink); margin: 0; line-height: 1.5; }
.submit-btn.danger { background: var(--error); }
.submit-btn.danger:hover { background: #A63E28; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: .78rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.field-hint { font-weight: 400; color: var(--ink-faint); font-size: .72rem; }
.field input[type="text"], .field input[type="password"], .field input[type="date"], .field input[type="email"] { width: 100%; border: 1.5px solid var(--line); background: #FAFCF9; border-radius: 13px; padding: 12px 14px; font-size: .95rem; color: var(--ink); font-family: var(--font-body); }
.field input[type="text"]:focus, .field input[type="password"]:focus, .field input[type="date"]:focus, .field input[type="email"]:focus { border-color: var(--green); outline: none; }
.amount-wrap { position: relative; }
.amount-wrap .prefix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-soft); font-size: .95rem; font-weight: 600; pointer-events: none; }
.amount-wrap input { padding-left: 38px !important; font-weight: 700; font-variant-numeric: tabular-nums; }
.field-error { font-size: .74rem; color: var(--error); margin-top: 5px; display: none; }
.field.invalid .field-error { display: block; }
.field.invalid input { border-color: var(--error); }
.chip-row { display: flex; gap: 8px; margin-top: 8px; }
.chip { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; font-size: .78rem; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.chip.selected { background: var(--green); border-color: var(--green); color: #fff; }
.upload-btn { display: flex; align-items: center; gap: 8px; border: 1.5px dashed var(--line); background: #FAFCF9; border-radius: 13px; padding: 12px 14px; font-size: .85rem; font-weight: 600; color: var(--ink-soft); cursor: pointer; width: 100%; }
.upload-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.photo-preview { margin-top: 10px; display: flex; align-items: center; gap: 10px; background: var(--green-soft); border-radius: 13px; padding: 8px 10px; }
.photo-preview img { width: 48px; height: 48px; border-radius: 9px; object-fit: cover; border: 1px solid rgba(31,111,84,.15); cursor: pointer; }
.photo-preview-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.photo-preview-label { font-size: .75rem; color: var(--green-dark); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-view-btn { background: var(--green); color: #fff; border: none; border-radius: 6px; padding: 3px 9px; font-size: .7rem; font-weight: 700; cursor: pointer; align-self: flex-start; }
.preview-view-btn:hover { background: var(--green-dark); }
.remove-file-btn { background: none; border: none; color: var(--green-dark); cursor: pointer; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border-radius: 50%; flex-shrink: 0; }
.remove-file-btn:hover { background: rgba(21,80,60,.1); }
.pdf-preview { background: var(--coral-soft); }
.pdf-icon-sm { width: 48px; height: 48px; border-radius: 9px; background: var(--coral); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: .52rem; font-weight: 800; gap: 2px; flex-shrink: 0; }
.pdf-icon-sm svg { width: 18px; height: 18px; }
.submit-btn { width: 100%; background: var(--green); color: #fff; border: none; border-radius: 14px; padding: 15px; font-size: .94rem; font-weight: 700; cursor: pointer; margin-top: 6px; font-family: var(--font-body); }
.submit-btn:hover { background: var(--green-dark); }
.submit-btn:disabled { opacity: .6; cursor: default; }
.meta-edit-row { display: flex; gap: 10px; align-items: center; }
.meta-edit-row input { flex: 1; }

.viewer-overlay { position: fixed; inset: 0; background: rgba(10, 14, 11, 0.88); display: flex; align-items: center; justify-content: center; padding: 16px; opacity: 0; visibility: hidden; transition: opacity .22s ease; z-index: 55; }
.viewer-overlay.open { opacity: 1; visibility: visible; }
@media (prefers-reduced-motion: reduce) { .viewer-overlay { transition: none; } }
.viewer-card { width: 100%; max-width: 860px; max-height: 92vh; background: var(--surface); border-radius: 22px; overflow: hidden; display: flex; flex-direction: column; transform: scale(.96); transition: transform .22s ease; box-shadow: 0 40px 80px -20px rgba(0,0,0,.55); }
.viewer-overlay.open .viewer-card { transform: scale(1); }
@media (prefers-reduced-motion: reduce) { .viewer-card { transition: none; } }
.viewer-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-shrink: 0; gap: 12px; }
.viewer-title { font-size: .86rem; font-weight: 600; color: var(--ink); margin: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.viewer-action-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--green-soft); color: var(--green-dark); border: 1.5px solid var(--line); border-radius: 999px; padding: 7px 14px; font-size: .76rem; font-weight: 700; cursor: pointer; }
.viewer-action-btn:hover { background: var(--green); color: #fff; border-color: var(--green); }
.viewer-action-btn svg { width: 14px; height: 14px; }
.viewer-close-btn { background: rgba(31,42,34,.08); border: none; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--ink-soft); cursor: pointer; }
.viewer-close-btn:hover { background: rgba(31,42,34,.16); }
.viewer-body { flex: 1; overflow: auto; background: #F2F6F0; display: flex; align-items: center; justify-content: center; min-height: 200px; position: relative; }
.viewer-loading { font-size: .84rem; color: var(--ink-soft); font-weight: 500; }
.viewer-body img.viewer-img { max-width: 100%; max-height: 76vh; object-fit: contain; display: block; }
.viewer-pdf-wrap { width: 100%; height: 100%; display: flex; flex-direction: column; }
.viewer-pdf-embed { flex: 1; width: 100%; min-height: 500px; border: none; display: block; }
.viewer-pdf-fallback { padding: 24px; text-align: center; }
.viewer-pdf-fallback p { font-size: .84rem; color: var(--ink-soft); margin: 0 0 12px; }

.toast { position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 12px); background: var(--ink); color: #fff; font-size: .8rem; font-weight: 600; padding: 11px 16px; border-radius: 999px; display: flex; align-items: center; gap: 10px; opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; z-index: 60; white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { background: none; border: none; color: var(--coral-soft); font-weight: 700; cursor: pointer; font-size: .8rem; padding: 0; }
@media (min-width: 860px) { .toast { bottom: 32px; } }
