@font-face { font-family: 'Baloo 2'; font-weight: 700; font-display: swap; src: url('../fonts/baloo2-700.woff2') format('woff2'); }
@font-face { font-family: 'Baloo 2'; font-weight: 800; font-display: swap; src: url('../fonts/baloo2-800.woff2') format('woff2'); }
:root {
  --primary: hsl(212 70% 30%);
  --primary-dark: hsl(212 70% 20%);
  --primary-soft: hsl(212 60% 95%);
  --accent: hsl(28 90% 52%);
  --accent-soft: hsl(28 80% 93%);
  --on-accent: #fff;
  --accent-text: hsl(19 90% 42%);
  --bg: #f3f5f8;
  --card: rgba(255, 255, 255, .92);
  --text: #16202c;
  --muted: #66717f;
  --line: #e3e7ed;
  --pos: #0f9d58;
  --neg: #d93025;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
  transition: background .4s;
}
body.noscroll { overflow: hidden; }
#bg-photo {
  position: fixed; inset: -40px; z-index: -1; background-size: cover; background-position: center;
  filter: blur(28px) saturate(1.2); opacity: 0; transition: opacity .8s;
}
#bg-photo.on { opacity: .35; }
#app { max-width: 640px; margin: 0 auto; min-height: 100vh; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-family: var(--font-display); font-weight: 800; letter-spacing: -.01em; }
.big-num, .big-count strong, .btn.big, .mode-switch button, .pill, .trip-card h3 { font-family: var(--font-display); }
.brand-logo { height: 42px; display: block; }
.empty-logo { width: 96px; height: 96px; }
.splash img { width: 160px; animation: pop .6s ease-out; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
a { color: var(--primary); }
small { font-size: .82em; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: .85em; margin: 2px 0; display: block; }
.center { text-align: center; }
.pos { color: var(--pos); } .neg { color: var(--neg); }
.warn { color: #b26a00; display: block; }
.splash { display: grid; place-items: center; height: 100vh; font-size: 48px; }

.page { padding: calc(12px + var(--safe-t)) 14px calc(90px + var(--safe-b)); }
.page.trip { padding: 0 0 calc(80px + var(--safe-b)); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: #fff; color: var(--text);
  padding: 10px 14px; border-radius: 12px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  min-height: 44px;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--primary); color: #fff; border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--neg); }
.btn.big { width: 100%; padding: 14px; font-size: 1.05em; }
.btn:disabled { opacity: .5; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 0;
  background: rgba(0, 0, 0, .05); color: inherit; font-size: 18px; cursor: pointer; text-decoration: none; flex: none;
}
.icon-btn.sm { width: 32px; height: 32px; font-size: 14px; border-radius: 9px; }
.icon-btn.glass { background: rgba(255, 255, 255, .22); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.icon-btn:disabled { opacity: .3; }
.link { background: none; border: 0; color: var(--primary); font: inherit; font-weight: 600; cursor: pointer; padding: 4px; }

/* Formulários */
input, select, textarea {
  width: 100%; font: inherit; font-size: 16px; padding: 11px 12px; border: 1px solid var(--line);
  border-radius: 12px; background: #fff; color: var(--text); min-height: 44px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: -1px; border-color: transparent; }
textarea { resize: vertical; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > span { font-size: .82em; font-weight: 600; color: var(--muted); }

.card { background: var(--card); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.card-title { font-size: 1rem; margin-bottom: 6px; }
.badge { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; font-size: 13px; flex: none; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--accent); color: var(--on-accent); vertical-align: middle; }
.flag { width: 28px; height: 21px; border-radius: 4px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, .1); flex: none; }
.flag.sm { width: 18px; height: 13px; border-radius: 2px; vertical-align: -1px; }
.flag.lg { width: 44px; height: 33px; border-radius: 6px; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips.modes { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; color: var(--text); }
.chip.on { background: var(--primary); color: #fff; border-color: transparent; }

/* Início */
.home-head { display: flex; justify-content: space-between; align-items: flex-start; margin: 8px 0 16px; }
.home-head h1 { font-size: 30px; margin-top: 10px; }
.banner { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; border: 0; background: var(--primary-soft); color: var(--text); padding: 12px 14px; border-radius: var(--radius); font: inherit; margin-bottom: 10px; cursor: pointer; font-size: 22px; }
.banner span { display: flex; flex-direction: column; font-size: 14px; }
.banner.warn { background: #fff4e0; }
.trip-list { display: flex; flex-direction: column; gap: 12px; }
.trip-card {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 180px; padding: 16px;
  border-radius: 20px; color: #fff; text-decoration: none; background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  background-size: cover; background-position: center; box-shadow: var(--shadow); overflow: hidden;
}
.trip-card.concluida { filter: saturate(.5); }
.trip-card h3 { font-size: 22px; margin: 6px 0 2px; text-shadow: 0 1px 6px rgba(0, 0, 0, .4); }
.trip-card small { opacity: .9; }
.trip-card .flags { position: absolute; top: 14px; right: 14px; display: flex; gap: 6px; }
.empty { text-align: center; padding: 30px 16px; }
.empty-icon { font-size: 44px; }
.empty h3 { margin: 8px 0 4px; }
.empty p { color: var(--muted); margin: 0 0 14px; }

/* Topo simples */
.topbar { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; }
.topbar h2 { font-size: 20px; }

/* Viagem */
.hero {
  position: relative; color: #fff; padding: calc(10px + var(--safe-t)) 14px 20px; min-height: 210px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)); background-size: cover; background-position: center;
  display: flex; flex-direction: column; justify-content: space-between; border-radius: 0 0 24px 24px;
}
.hero-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hero-body h1 { font-size: 26px; margin-top: 8px; text-shadow: 0 2px 10px rgba(0, 0, 0, .4); }
.hero-body small { opacity: .92; }
.mode-switch { display: flex; background: rgba(0, 0, 0, .3); border-radius: 999px; padding: 3px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.mode-switch button { border: 0; background: transparent; color: #fff; font: inherit; font-size: 13px; font-weight: 700; padding: 7px 12px; border-radius: 999px; cursor: pointer; }
.mode-switch button.on { background: #fff; color: var(--primary); }
.content { padding: 14px; }
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 640px; z-index: 500;
  display: flex; background: rgba(255, 255, 255, .95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); padding: 6px 6px calc(6px + var(--safe-b));
}
.tabbar button { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 11px; font-weight: 600; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px; border-radius: 12px; cursor: pointer; }
.tabbar button span { font-size: 20px; filter: grayscale(1); opacity: .7; }
.tabbar button.on { color: var(--primary); background: var(--primary-soft); }
.tabbar button.on span { filter: none; opacity: 1; }

.countdown { text-align: center; }
.big-count strong { display: block; font-size: 44px; color: var(--primary); line-height: 1.1; }
.big-count span { font-weight: 600; }
.timeline { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.timeline li { display: flex; gap: 10px; align-items: center; }
.timeline li div { display: flex; flex-direction: column; }
.timeline small { color: var(--muted); }

/* Orçamento */
.budget-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.budget-top > div { display: flex; flex-direction: column; }
.budget-top .right { text-align: right; }
.big-num { font-size: 22px; }
.progress { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; margin-bottom: 6px; }
.progress div { height: 100%; background: var(--primary); border-radius: 99px; transition: width .4s; }
.progress.danger div { background: var(--neg); }
.cats { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.cat-row { display: grid; grid-template-columns: 120px 1fr auto; gap: 8px; align-items: center; font-size: 13px; }
.cat-bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.cat-bar div { height: 100%; border-radius: 99px; }

/* Gastos */
.list-card { padding: 6px 6px 8px; }
.list-head { display: flex; justify-content: space-between; padding: 8px 8px 6px; font-size: 14px; }
.exp-item { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 8px; border-radius: 10px; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.exp-item:hover { background: rgba(0, 0, 0, .03); }
.exp-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.exp-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.exp-main strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exp-main small, .exp-val small { color: var(--muted); }
.exp-val { display: flex; flex-direction: column; align-items: flex-end; }
.amount-row { display: grid; grid-template-columns: 1fr 120px; gap: 8px; }
.amount { font-size: 28px !important; font-weight: 700; }
.conv { margin: 0; background: var(--primary-soft); padding: 8px 12px; border-radius: 10px; }

/* Dia */
.daypicker { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; scroll-snap-type: x proximity; }
.daypicker::-webkit-scrollbar { display: none; }
.daypicker button {
  position: relative; flex: none; width: 92px; border: 1px solid var(--line); background: var(--card); border-radius: 14px;
  padding: 8px; display: flex; flex-direction: column; align-items: flex-start; font: inherit; color: var(--text); cursor: pointer; scroll-snap-align: center;
}
.daypicker button small { color: var(--muted); font-size: 11px; }
.daypicker button span { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.daypicker button i { position: absolute; top: 6px; right: 6px; font-style: normal; font-size: 11px; background: var(--accent); color: var(--on-accent); border-radius: 99px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; }
.daypicker button.today { border-color: var(--accent); }
.daypicker button.on { background: var(--primary); color: #fff; border-color: transparent; }
.daypicker button.on small, .daypicker button.on span { color: rgba(255, 255, 255, .85); }
.day-head h3 { font-size: 20px; }
.day-dests { color: var(--muted); font-size: 14px; }
.day-nav { display: flex; align-items: center; justify-content: space-between; background: var(--card); border-radius: var(--radius); padding: 6px; box-shadow: var(--shadow); }
.day-nav div { display: flex; flex-direction: column; align-items: center; }
.day-nav strong { font-size: 18px; }
.day-nav small { color: var(--muted); }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.quick .quick-stat { grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.quick button { border: 0; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); font: inherit; font-weight: 600; padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; color: var(--text); }
.quick button span { font-size: 22px; }
.quick-stat { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px; display: flex; flex-direction: column; justify-content: center; }
.quick-stat small:first-child { color: var(--muted); }

.map-wrap { position: relative; }
.map { width: 100%; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); z-index: 0; background: #e8ecef; }
.map-fab { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 400; border: 0; background: #fff; color: var(--primary); font: inherit; font-weight: 700; padding: 9px 14px; border-radius: 999px; box-shadow: 0 2px 10px rgba(0, 0, 0, .2); cursor: pointer; white-space: nowrap; }
.pin { width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff; border: 3px solid #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.pin.done { background: #9aa4af; }
.pin.me { width: 20px; height: 20px; background: #1a73e8; box-shadow: 0 0 0 6px rgba(26, 115, 232, .25); }
.route-line { stroke: var(--primary); }
.route-line.dashed { stroke: var(--primary); opacity: .6; }

.acts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.act { display: flex; gap: 10px; align-items: flex-start; background: var(--card); border-radius: 14px; padding: 12px; box-shadow: var(--shadow); }
.act.done .act-main strong { text-decoration: line-through; color: var(--muted); }
.act-main { flex: 1; min-width: 0; cursor: pointer; }
.act-top { display: flex; gap: 8px; align-items: center; }
.act-top .num { width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; flex: none; }
.act-notes { margin: 4px 0 0; font-size: 13px; color: var(--muted); white-space: pre-wrap; }
.act-move { display: flex; flex-direction: column; gap: 4px; }
.check { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--primary); background: #fff; color: #fff; font-weight: 800; cursor: pointer; flex: none; margin-top: 1px; }
.act.done .check { background: var(--pos); border-color: var(--pos); }
.leg { font-size: 13px; color: var(--muted); padding: 2px 0 2px 22px; border-left: 2px dashed var(--line); margin-left: 24px; list-style: none; }
.leg strong { color: var(--accent-text); }

/* Destinos (edição) */
.dest-edit { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: #fff; }
.dest-edit-head { display: flex; gap: 8px; align-items: center; }
.dest-label { flex: 1; }
.dest-chosen { display: flex; align-items: center; gap: 12px; background: var(--primary-soft); padding: 12px; border-radius: 12px; }
.dest-chosen strong { font-size: 17px; }
.dest-edit .place-search input { font-size: 17px; padding: 14px; }
.place-search .row input { flex: 1; min-width: 0; }
.btn.icon-search { width: 54px; flex: none; padding: 0; font-size: 20px; align-self: stretch; }
.dest-chosen div { display: flex; flex-direction: column; flex: 1; }
.dest-chosen small { color: var(--muted); }
.dest-actions { display: flex; gap: 4px; }
.place-search { display: flex; flex-direction: column; gap: 6px; }
.results { list-style: none; margin: 0; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: #fff; max-height: 260px; overflow: auto; }
.results button { width: 100%; text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 8px; font: inherit; cursor: pointer; display: flex; flex-direction: column; color: var(--text); }
.results button:hover { background: var(--primary-soft); }
.results small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.place-chosen { display: flex; gap: 8px; align-items: center; background: var(--primary-soft); padding: 8px 10px; border-radius: 10px; }
.place-chosen div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.place-chosen small { color: var(--muted); }

/* Janela (sheet) */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(10, 15, 25, .45); z-index: 1000; display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
.sheet { background: var(--bg); width: 100%; max-width: 640px; max-height: 92vh; border-radius: 22px 22px 0 0; display: flex; flex-direction: column; animation: up .25s ease-out; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 8px; }
.sheet-head h3 { font-size: 18px; }
.sheet-body { padding: 4px 16px calc(20px + var(--safe-b)); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.menu { display: flex; flex-direction: column; gap: 6px; }
.menu a, .menu button { display: flex; flex-direction: column; text-align: left; padding: 14px; border-radius: 12px; background: #fff; border: 0; font: inherit; font-weight: 600; color: var(--text); text-decoration: none; cursor: pointer; }
.menu small { font-weight: 400; color: var(--muted); margin-top: 2px; }
.steps { padding-left: 20px; margin: 0; } .steps li { margin: 4px 0; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

#toast { position: fixed; left: 50%; bottom: calc(90px + var(--safe-b)); transform: translateX(-50%) translateY(20px); background: #1f2937; color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 2000; max-width: 90vw; text-align: center; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.leaflet-container { font: inherit; }
@media (min-width: 700px) { .page { padding-top: 24px; } .hero { border-radius: 0 0 28px 28px; } }

/* Memórias */
.photo-grid { display: grid; gap: 4px; border-radius: 12px; overflow: hidden; }
.photo-grid.n1 { grid-template-columns: 1fr; } .photo-grid.n1 .thumb { aspect-ratio: 4/3; }
.photo-grid.n2 { grid-template-columns: 1fr 1fr; }
.photo-grid.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; } .photo-grid.n3 .thumb:first-child { grid-row: span 2; aspect-ratio: auto; }
.photo-grid.n4 { grid-template-columns: 1fr 1fr; }
.photo-grid.edit { grid-template-columns: repeat(3, 1fr); border-radius: 0; overflow: visible; }
.thumb { position: relative; aspect-ratio: 1; border: 0; padding: 0; background: #dfe4ea center/cover no-repeat; cursor: pointer; border-radius: 4px; width: 100%; }
.photo-grid.edit .thumb { border-radius: 12px; }
.thumb.add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 2px dashed var(--line); background: #fff; color: var(--muted); font-size: 26px; }
.thumb.add small { font-size: 11px; font-weight: 600; }
.thumb.loading { display: grid; place-items: center; }
.thumb-x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; display: grid; place-items: center; }
.thumb-more { position: absolute; inset: 0; background: rgba(0,0,0,.45); color: #fff; font-size: 24px; font-weight: 800; display: grid; place-items: center; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.memory { padding: 0; overflow: hidden; }
.memory .photo-grid { border-radius: 0; }
.memory-body { padding: 12px 14px 14px; cursor: pointer; }
.memory-body h3 { font-size: 18px; margin: 2px 0 4px; }
.memory-body p { margin: 0 0 6px; white-space: pre-wrap; }
.memory-body .link { padding: 0; font-size: 13px; }
.viewer { position: fixed; inset: 0; z-index: 3000; background: #000; display: flex; align-items: center; justify-content: center; animation: fade .2s; }
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer-bar { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: calc(10px + var(--safe-t)) 12px 10px; color: #fff; z-index: 2; background: linear-gradient(rgba(0,0,0,.5), transparent); }
.viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 30px; width: 44px; height: 64px; border-radius: 12px; cursor: pointer; }
.viewer-nav.l { left: 8px; } .viewer-nav.r { right: 8px; }
.viewer-cap { position: absolute; bottom: 0; left: 0; right: 0; margin: 0; padding: 20px 16px calc(16px + var(--safe-b)); color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.7)); }

/* Documentos */
.doc-list { display: flex; flex-direction: column; gap: 8px; }
.doc { display: flex; align-items: center; gap: 8px; padding: 10px; }
.doc-open { flex: 1; min-width: 0; display: flex; gap: 12px; align-items: center; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; padding: 0; }
.doc-main { display: flex; flex-direction: column; min-width: 0; }
.doc-main strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-notes { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-icon { width: 52px; height: 52px; border-radius: 12px; background: var(--primary-soft); display: grid; place-items: center; font-size: 24px; flex: none; }
.doc-thumb { width: 52px; height: 52px; border-radius: 12px; background: #dfe4ea center/cover; flex: none; display: inline-block; }
.doc-pdf { background: #d93025; color: #fff; font-size: 11px; font-weight: 800; padding: 4px 6px; border-radius: 6px; }
.doc-actions { display: flex; flex-direction: column; gap: 4px; }
.doc-file { display: flex; align-items: center; gap: 10px; background: var(--primary-soft); padding: 8px; border-radius: 12px; }
.doc-file small { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-summary { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.doc-summary > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.alert { margin: 0; padding: 10px 12px; border-radius: 12px; font-size: 14px; background: #fdecea; color: #8a1c13; }
.alert.warn { background: #fff4e0; color: #7a4a00; }
.check-row { display: flex; gap: 10px; align-items: center; background: #fff; padding: 12px; border-radius: 12px; cursor: pointer; }
.check-row input { width: 22px; height: 22px; min-height: 0; flex: none; }
.pin-gate { align-items: center; text-align: center; padding: 28px 18px; }
.pin-input { text-align: center; font-size: 28px !important; letter-spacing: .5em; max-width: 220px; }
.pin-gate .pin-input { margin: 0 auto; }
