/* O painel da Samla Aesthetics. Vidro como o My Finance, com as regras da Samla (docs/05_DESIGN.md): sem sombras,
   um aro de luz de 1 px em cima, no máximo 3 elementos desfocados (a barra, o painel e a gaveta), nunca preto puro. */

@font-face { font-family: 'Cormorant Garamond'; font-weight: 300; font-style: normal; font-display: swap; src: url(fonts/cormorant-garamond-latin-300-normal.woff2) format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/cormorant-garamond-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-weight: 500; font-style: normal; font-display: swap; src: url(fonts/cormorant-garamond-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-weight: 300; font-style: italic; font-display: swap; src: url(fonts/cormorant-garamond-latin-300-italic.woff2) format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-weight: 400; font-style: italic; font-display: swap; src: url(fonts/cormorant-garamond-latin-400-italic.woff2) format('woff2'); }

:root {
  --bg: #1B1512;
  --ink: #F2EDEA;
  --ink-2: #B7A99D;
  --ink-3: #8E8076;
  --line: rgba(242, 237, 234, 0.1);
  --line-2: rgba(242, 237, 234, 0.18);
  --gold: #C9B48C;
  --gold-2: #E2D3B3;
  --gold-ink: #241B16;
  --gold-soft: rgba(201, 180, 140, 0.16);
  --fill: linear-gradient(160deg, rgba(242, 237, 234, 0.075), rgba(242, 237, 234, 0.03));
  --fill-h: linear-gradient(160deg, rgba(242, 237, 234, 0.12), rgba(242, 237, 234, 0.05));
  --field: rgba(20, 15, 13, 0.42);
  --rim: inset 0 1px 0 rgba(255, 250, 240, 0.08);
  --sage: #A9B994;
  --rose: #D9A08E;
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-ui: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI Variable Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html {
  background: var(--bg);
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0; min-height: 100dvh; color: var(--ink); background: transparent;
  font: 400 15px/1.5 var(--font-ui); -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
input, select, textarea { font-size: 16px; }
@media (pointer: fine) { input, select, textarea, .input, .select, .textarea { font-size: 15px; } }
::selection { background: rgba(201, 180, 140, 0.35); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }
svg.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* O fundo: a sala de tratamento da landing, escurecida para o vidro se ler. Pinta-se uma vez, sem filtros. */
.bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; transform: translateZ(0);
  background:
    radial-gradient(80% 70% at 55% 35%, rgba(27, 21, 18, 0.05), rgba(27, 21, 18, 0.5) 100%),
    linear-gradient(180deg, rgba(27, 21, 18, 0.18) 0%, rgba(27, 21, 18, 0.42) 55%, rgba(27, 21, 18, 0.7) 100%),
    url(img/sala.webp) 58% 40% / cover no-repeat,
    var(--bg);
}

/* ------------------------------------------------------------------ superfícies */
.panel { background: var(--fill); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--rim); }
.glass {
  background: linear-gradient(150deg, rgba(48, 38, 32, 0.62), rgba(30, 23, 20, 0.5));
  border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(255, 250, 240, 0.12);
  -webkit-backdrop-filter: blur(26px) saturate(130%); backdrop-filter: blur(26px) saturate(130%);
}

/* ------------------------------------------------------------------ marca */
.mark { display: block; background: var(--ink); -webkit-mask: url(img/wordmark.png) center / contain no-repeat; mask: url(img/wordmark.png) center / contain no-repeat; aspect-ratio: 945 / 353; }
.lockup { display: inline-flex; flex-direction: column; align-items: flex-end; }
.lockup .mark { width: 100%; }
.lockup .sub { font: italic 400 1em/1 var(--font-display); color: var(--gold-2); margin-top: 0.1em; letter-spacing: 0.01em; }

/* ------------------------------------------------------------------ entrar */
.gate { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); }
.gate-card { width: min(420px, 100%); border-radius: 32px; padding: 40px 36px 34px; }
.gate-card .lockup { width: 168px; font-size: 27px; margin-bottom: 30px; }
.gate-card h1 { font: 400 34px/1.1 var(--font-display); margin: 0 0 8px; letter-spacing: -0.005em; }
.gate-card p.lede { margin: 0 0 26px; color: var(--ink-2); font-size: 14.5px; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; color: var(--ink-2); margin: 0 0 7px 2px; }
.input, .select, .textarea {
  width: 100%; min-height: 46px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--field);
  padding: 11px 14px; outline: 0; transition: border-color 0.15s, background 0.15s;
}
.textarea { min-height: 88px; resize: vertical; line-height: 1.45; }
.input:focus, .select:focus, .textarea:focus { border-color: rgba(201, 180, 140, 0.6); background: rgba(20, 15, 13, 0.55); }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23B7A99D' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 14px center no-repeat; }
.select option { background: #2A211C; color: var(--ink); }
.err { color: var(--rose); font-size: 13.5px; min-height: 20px; margin: 4px 2px 12px; }
.gate-foot { margin-top: 22px; font-size: 12.5px; color: var(--ink-3); text-align: center; }

/* ------------------------------------------------------------------ botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px;
  border-radius: 999px; border: 1px solid var(--line-2); background: rgba(242, 237, 234, 0.06); color: var(--ink);
  font-size: 14.5px; font-weight: 500; white-space: nowrap; text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn .i { width: 17px; height: 17px; }
.btn.primary { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.btn.full { width: 100%; min-height: 48px; font-size: 15.5px; }
.btn.quiet { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.danger { border-color: rgba(217, 160, 142, 0.45); color: var(--rose); background: transparent; }
.btn.small { min-height: 34px; padding: 0 13px; font-size: 13.5px; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: rgba(242, 237, 234, 0.11); }
  .btn.primary:hover { background: var(--gold-2); border-color: var(--gold-2); }
  .btn.quiet:hover { color: var(--ink); background: rgba(242, 237, 234, 0.06); }
  .btn.danger:hover { background: rgba(217, 160, 142, 0.1); }
}

/* ------------------------------------------------------------------ esqueleto */
.frame { padding: 30px 28px 60px 124px; }
.rail {
  position: fixed; left: 28px; top: 50%; transform: translateY(-50%); z-index: 20;
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 10px; border-radius: 999px;
}
.rail .home { width: 52px; height: 40px; display: grid; place-items: center; margin-bottom: 4px; border: 0; background: none; padding: 0; }
.rail .home .mark { width: 44px; background: var(--gold-2); }
.rail .sep { width: 26px; height: 1px; background: var(--line); margin: 4px 0; }
.rail button.nav {
  position: relative; width: 52px; height: 52px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-2);
  display: grid; place-items: center; transition: color 0.2s, background 0.2s;
}
.rail button.nav .i { width: 22px; height: 22px; }
.rail button.nav.on { background: var(--gold); color: var(--gold-ink); }
.rail button.nav:active { transform: scale(0.95); }
.rail button.nav .dot { position: absolute; right: 10px; top: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.rail button.nav.on .dot { background: var(--gold-ink); }
.rail [data-label]::after {
  content: attr(data-label); position: absolute; left: 64px; top: 50%; translate: -4px -50%; white-space: nowrap;
  font: 500 12.5px/1 var(--font-ui); color: var(--ink); background: #2A211C; border: 1px solid var(--line-2);
  padding: 8px 11px; border-radius: 9px; opacity: 0; pointer-events: none; transition: opacity 0.15s, translate 0.15s;
}
@media (hover: hover) and (pointer: fine) {
  .rail button.nav:not(.on):hover { background: rgba(242, 237, 234, 0.08); color: var(--ink); }
  .rail [data-label]:hover::after { opacity: 1; translate: 0 -50%; }
}

.shell { max-width: 1340px; margin: 0 auto; border-radius: 38px; padding: 38px 42px 42px; min-height: calc(100dvh - 90px); }
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px 24px; flex-wrap: wrap; margin-bottom: 28px; }
.top h1 { margin: 0; font: 400 52px/1 var(--font-display); letter-spacing: -0.012em; }
.top h1 em { font-style: italic; color: var(--gold-2); }
.top .lede { margin: 12px 0 0; color: var(--ink-2); font-size: 14.5px; max-width: 720px; }
.top .lede b { color: var(--ink); font-weight: 500; }
.top .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.top .tt { flex: 1 1 520px; min-width: 0; }
.who { display: inline-flex; align-items: center; gap: 0; height: 40px; padding: 3px; border-radius: 999px; border: 1px solid transparent; background: none; color: var(--ink-2); font-size: 13.5px; transition: all 0.2s var(--ease); align-self: flex-start; }
.who .avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-2); font: 500 16px/1 var(--font-display); flex: none; }
.who .out { max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0; transition: max-width 0.25s var(--ease), opacity 0.2s, padding 0.25s; }
.who.armed { border-color: rgba(217, 160, 142, 0.45); color: var(--rose); }
.who.armed .out { max-width: 90px; opacity: 1; padding: 0 12px 0 10px; }

/* ------------------------------------------------------------------ resumo */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.tile { padding: 22px 22px 20px; border-radius: 24px; text-align: left; border: 1px solid var(--line); background: var(--fill); box-shadow: var(--rim); transition: background 0.2s; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; width: 100%; }
.tile .meter { margin-top: auto; }
.tile .s { margin-bottom: 14px; }
@media (hover: hover) and (pointer: fine) { button.tile:hover { background: var(--fill-h); } }
.tile .k { font-size: 13.5px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.tile .k .i { width: 17px; height: 17px; color: var(--gold); }
.tile .v { font: 300 56px/1 var(--font-display); margin: 18px 0 6px; letter-spacing: -0.01em; font-variant-numeric: lining-nums tabular-nums; }
.tile .v small { font-size: 0.42em; color: var(--ink-3); margin-left: 6px; letter-spacing: 0; }
.tile .s { font-size: 13px; color: var(--ink-3); }
.meter { height: 4px; border-radius: 4px; background: rgba(242, 237, 234, 0.08); overflow: hidden; flex: none; }
.meter i { display: block; height: 100%; border-radius: 4px; background: var(--gold); }
.two { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
.card { padding: 24px 24px 18px; }
.card h2 { margin: 0 0 4px; font: 400 26px/1.15 var(--font-display); }
.card .hint { margin: 0 0 16px; font-size: 13.5px; color: var(--ink-2); }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; padding: 13px 0; border-top: 1px solid var(--line); }
.feed li:first-child { border-top: 0; }
.feed .what { font-size: 14px; }
.feed .meta { font-size: 12.5px; color: var(--ink-3); grid-column: 1; }
.feed .side { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.steps li:first-child { border-top: 0; }
.steps li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; font: 400 16px/1 var(--font-display); color: var(--gold-2); }
.steps b { color: var(--ink); font-weight: 500; }

/* ------------------------------------------------------------------ filtros */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.search { position: relative; flex: 1 1 300px; min-width: 220px; }
.search .i { position: absolute; left: 15px; top: 50%; translate: 0 -50%; width: 17px; height: 17px; color: var(--ink-3); pointer-events: none; }
.search .input { padding-left: 42px; border-radius: 999px; }
.filters .select { width: 210px; min-width: 150px; flex: 0 1 210px; border-radius: 999px; min-height: 44px; padding-top: 0; padding-bottom: 0; text-overflow: ellipsis; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); font-size: 13.5px; transition: all 0.15s;
}
.chip .i { width: 15px; height: 15px; }
.chip[aria-pressed='true'] { background: var(--gold-soft); border-color: rgba(201, 180, 140, 0.55); color: var(--gold-2); }
@media (hover: hover) and (pointer: fine) { .chip:hover { color: var(--ink); border-color: rgba(242, 237, 234, 0.3); } }
.chips .label { font-size: 13px; color: var(--ink-3); align-self: center; margin-right: 2px; }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 18px; flex-wrap: wrap; padding: 14px 18px; border-radius: 18px; margin-bottom: 14px; }
.bar .count { font-size: 14.5px; color: var(--ink-2); }
.bar .count b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.bar .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.confirm { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; width: 100%; padding-top: 12px; margin-top: 2px; border-top: 1px solid var(--line); font-size: 14px; }
.confirm p { margin: 0; flex: 1 1 280px; color: var(--ink); }
.confirm p span { color: var(--ink-2); }

/* ------------------------------------------------------------------ listas */
.list { border-radius: 22px; overflow: hidden; }
.row {
  display: grid; grid-template-columns: 44px minmax(0, 2.3fr) minmax(0, 1fr) minmax(0, 1.5fr) 132px; gap: 16px; align-items: center;
  padding: 12px 18px; border-top: 1px solid var(--line); transition: background 0.15s; cursor: pointer;
}
.row:first-child { border-top: 0; }
@media (hover: hover) and (pointer: fine) { .row:hover { background: rgba(242, 237, 234, 0.035); } }
.row .name { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .host { font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .cell { font-size: 13.5px; color: var(--ink-2); min-width: 0; }
.row .cell .muni { color: var(--ink-3); font-size: 12.5px; }
.row .why { font-size: 13px; color: var(--ink-2); min-width: 0; }
.row .why .by { color: var(--gold-2); }
.row .marks { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; line-height: 1; padding: 5px 8px; border-radius: 999px; background: rgba(242, 237, 234, 0.06); color: var(--ink-2); white-space: nowrap; }
.tag .i { width: 12px; height: 12px; }
.row-head { display: grid; grid-template-columns: 44px minmax(0, 2.3fr) minmax(0, 1fr) minmax(0, 1.5fr) 132px; gap: 16px; padding: 12px 18px; font-size: 12.5px; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.row-head > :last-child { text-align: right; }
.more { display: flex; justify-content: center; padding: 18px; }
.empty { padding: 48px 20px; text-align: center; color: var(--ink-2); }
.empty h3 { font: 400 26px/1.2 var(--font-display); margin: 0 0 6px; color: var(--ink); }

/* O quadrado do logótipo, como na app. */
.logo { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; overflow: hidden; background: #F7F3EE; padding: 6px; }
.logo.dark { background: #2B221D; }
.logo img { width: 100%; height: 100%; object-fit: contain; }
.logo.photo { padding: 0; }
.logo.photo img { object-fit: cover; }
.mono { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(242, 237, 234, 0.07); color: var(--ink-2); font: 400 21px/1 var(--font-display); }

/* O interruptor "na app". */
.switch { display: inline-flex; align-items: center; gap: 10px; justify-self: end; border: 0; background: none; padding: 6px 0; color: var(--ink-2); font-size: 13px; }
.switch .track { width: 44px; height: 26px; border-radius: 999px; background: rgba(242, 237, 234, 0.14); position: relative; transition: background 0.2s var(--ease); flex: none; }
.switch .track::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); transition: transform 0.25s var(--ease); }
.switch[aria-checked='true'] { color: var(--gold-2); }
.switch[aria-checked='true'] .track { background: var(--gold); }
.switch[aria-checked='true'] .track::after { transform: translateX(18px); background: var(--gold-ink); }
.switch:active .track::after { width: 24px; }
.switch[aria-checked='true']:active .track::after { transform: translateX(14px); }

/* ------------------------------------------------------------------ tratamentos */
.group-title { font: 400 24px/1.2 var(--font-display); margin: 26px 0 10px 4px; display: flex; align-items: baseline; gap: 10px; }
.group-title:first-child { margin-top: 4px; }
.group-title small { font: 400 13px/1 var(--font-ui); color: var(--ink-3); }
.trow { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 2.4fr) 120px 132px; gap: 16px; align-items: center; padding: 13px 18px; border-top: 1px solid var(--line); cursor: pointer; transition: background 0.15s; }
.trow:first-child { border-top: 0; }
@media (hover: hover) and (pointer: fine) { .trow:hover { background: rgba(242, 237, 234, 0.035); } }
.trow .name { font-size: 15px; font-weight: 500; }
.trow .pt { font-size: 12.5px; color: var(--ink-3); }
.trow .short { font-size: 13.5px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.trow .n { font-size: 13.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ imagens */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.shot { border-radius: 22px; overflow: hidden; display: flex; flex-direction: column; }
.shot .pic { position: relative; aspect-ratio: 4 / 3; background: rgba(242, 237, 234, 0.05); overflow: hidden; }
.shot .pic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s var(--ease); }
.shot .pic .flag { position: absolute; left: 12px; top: 12px; }
.shot .pic .open { position: absolute; right: 10px; top: 10px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(27, 21, 18, 0.62); color: var(--ink); text-decoration: none; }
.shot .pic .open .i { width: 16px; height: 16px; }
@media (hover: hover) and (pointer: fine) { .shot:hover .pic img { transform: scale(1.03); } }
.shot .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.shot .label { font-size: 14.5px; font-weight: 500; }
.shot .section { font-size: 12.5px; color: var(--ink-3); margin-top: -8px; }
.votes { display: flex; gap: 8px; }
.vote { flex: 1; min-height: 40px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 13.5px; transition: all 0.15s; }
.vote .i { width: 17px; height: 17px; }
.vote.up[aria-pressed='true'] { background: rgba(169, 185, 148, 0.18); border-color: rgba(169, 185, 148, 0.6); color: #CBD8BB; }
.vote.down[aria-pressed='true'] { background: rgba(217, 160, 142, 0.16); border-color: rgba(217, 160, 142, 0.55); color: #EBC3B6; }
@media (hover: hover) and (pointer: fine) { .vote:hover { color: var(--ink); border-color: rgba(242, 237, 234, 0.3); } }
.shot .textarea { min-height: 72px; font-size: 14.5px; border-radius: 14px; }
.saved { font-size: 12px; color: var(--ink-3); min-height: 16px; margin-top: -4px; }
.flagtag { font-size: 12px; padding: 6px 10px; border-radius: 999px; background: rgba(27, 21, 18, 0.72); color: var(--ink); display: inline-flex; gap: 6px; align-items: center; }
.flagtag .i { width: 13px; height: 13px; }
.flagtag.up { color: #CBD8BB; }
.flagtag.down { color: #EBC3B6; }
.sect { font: 400 26px/1.2 var(--font-display); margin: 30px 0 14px 4px; }
.sect:first-of-type { margin-top: 8px; }

/* ------------------------------------------------------------------ equipa e histórico */
.urow { display: grid; grid-template-columns: 44px minmax(0, 1.6fr) minmax(0, 0.7fr) minmax(0, 1.6fr) 290px; gap: 16px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line); }
.urow:first-child { border-top: 0; }
.urow .avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-2); font: 400 19px/1 var(--font-display); }
.urow .acts { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.field > span.pw { display: flex; gap: 8px; margin: 0; }
.pw .input { flex: 1; min-width: 0; }
.pw .input { font-family: ui-monospace, 'SF Mono', Consolas, monospace; letter-spacing: 0.02em; }
.hrow { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 13px 18px; border-top: 1px solid var(--line); font-size: 14px; }
.hrow:first-child { border-top: 0; }
.hrow .when { color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.hrow .by { color: var(--ink-3); font-size: 12.5px; }
.hrow.undone .what { color: var(--ink-3); text-decoration: line-through; text-decoration-color: rgba(242, 237, 234, 0.3); }

/* ------------------------------------------------------------------ gaveta (o terceiro vidro) */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(20, 15, 13, 0.5); opacity: 0; transition: opacity 0.25s var(--ease); }
.scrim.in { opacity: 1; }
.drawer {
  position: fixed; z-index: 41; top: 14px; right: 14px; bottom: 14px; width: min(560px, calc(100vw - 28px)); border-radius: 30px;
  display: flex; flex-direction: column; transform: translateX(calc(100% + 24px)); transition: transform 0.38s var(--ease);
  background: linear-gradient(150deg, rgba(52, 41, 35, 0.86), rgba(33, 26, 22, 0.82));
}
.drawer.in { transform: none; }
.drawer header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 26px 26px 16px; border-bottom: 1px solid var(--line); }
.drawer header h2 { margin: 0; font: 400 30px/1.1 var(--font-display); }
.drawer header p { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-2); }
.drawer .close { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; display: grid; place-items: center; color: var(--ink-2); flex: none; }
.drawer .scroll { overflow-y: auto; overscroll-behavior: contain; padding: 20px 26px 26px; flex: 1; }
.drawer footer { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 16px 26px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.drawer footer .right { display: flex; gap: 10px; margin-left: auto; }
.drawer h3 { font: 400 21px/1.2 var(--font-display); margin: 22px 0 12px; }
.drawer h3:first-child { margin-top: 0; }
.status { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; border-radius: 18px; margin-bottom: 8px; }
.status p { margin: 0; font-size: 14px; }
.status p span { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(242, 237, 234, 0.06); margin-bottom: 14px; }
.tabs button { border: 0; background: none; padding: 7px 15px; border-radius: 999px; color: var(--ink-2); font-size: 13.5px; }
.tabs button[aria-selected='true'] { background: rgba(242, 237, 234, 0.12); color: var(--ink); }
.photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.photo { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: rgba(242, 237, 234, 0.05); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .cover { position: absolute; left: 8px; bottom: 8px; }
.photo .ops { position: absolute; right: 6px; top: 6px; display: flex; gap: 6px; }
.photo .ops button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(27, 21, 18, 0.72); color: var(--ink); display: grid; place-items: center; }
.photo .ops .i { width: 15px; height: 15px; }
.drop { position: relative; aspect-ratio: 1; border-radius: 14px; border: 1px dashed var(--line-2); display: grid; place-items: center; text-align: center; color: var(--ink-2); font-size: 13px; cursor: pointer; padding: 10px; transition: border-color 0.15s, background 0.15s; }
.drop .i { width: 22px; height: 22px; margin: 0 auto 6px; display: block; color: var(--gold); }
.drop.over, .drop:focus-within { border-color: var(--gold); background: var(--gold-soft); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.note { font-size: 12.5px; color: var(--ink-3); margin: 6px 2px 0; }
.inline-confirm { padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(217, 160, 142, 0.4); background: rgba(217, 160, 142, 0.08); font-size: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; width: 100%; }
.inline-confirm p { margin: 0; flex: 1 1 220px; }

/* ------------------------------------------------------------------ aviso */
.toast {
  position: fixed; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom)); translate: -50% 0; z-index: 60;
  display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 20px; border-radius: 999px; max-width: calc(100vw - 32px);
  background: #2E241F; border: 1px solid var(--line-2); box-shadow: inset 0 1px 0 rgba(255, 250, 240, 0.08); font-size: 14px;
  animation: toast-in 0.3s var(--ease);
}
.toast.error { border-color: rgba(217, 160, 142, 0.5); }
.toast .btn { min-height: 34px; }
@keyframes toast-in { from { opacity: 0; translate: -50% 10px; } }

.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(242, 237, 234, 0.2); border-top-color: var(--gold); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: grid; place-items: center; padding: 60px; }
.view { animation: view-in 0.35s var(--ease); }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } }

/* ------------------------------------------------------------------ ecrãs mais pequenos */
@media (max-width: 1180px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .row, .row-head { grid-template-columns: 44px minmax(0, 1fr) 120px; }
  .row .cell.cat, .row .why, .row-head .cat, .row-head .why { display: none; }
  .trow { grid-template-columns: minmax(0, 1fr) 132px; }
  .trow .short, .trow .n { display: none; }
  .urow { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .filters .select { flex: 1 1 180px; width: auto; }
  .urow .role, .urow .seen { display: none; }
}
@media (max-width: 760px) {
  .frame { padding: 0 0 calc(96px + env(safe-area-inset-bottom)); }
  .rail { left: 50%; top: auto; bottom: calc(12px + env(safe-area-inset-bottom)); transform: translateX(-50%); flex-direction: row; padding: 7px 9px; gap: 4px; }
  .rail .home, .rail .sep, .rail button.nav[data-act=signout] { display: none; }
  .rail button.nav { width: 48px; height: 48px; }
  .top { position: relative; }
  .top .tt { padding-right: 48px; }
  .who { position: absolute; top: 2px; right: 0; }
  .drawer header h2 { font-size: 26px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .drawer footer .btn.danger .t { display: none; }
  .drawer footer .btn.danger { width: 42px; min-height: 42px; padding: 0; }
  .drawer footer { flex-wrap: nowrap; }
  .rail [data-label]::after { display: none; }
  .shell { border-radius: 0 0 28px 28px; padding: calc(22px + env(safe-area-inset-top)) 16px 26px; border-top: 0; min-height: 100dvh; }
  .top { margin-bottom: 20px; }
  .top h1 { font-size: 40px; }
  .tiles { gap: 10px; }
  .tile { padding: 16px; border-radius: 20px; }
  .tile .v { font-size: 42px; margin: 12px 0 4px; }
  .filters .select { flex: 1 1 140px; min-width: 0; }
  .row { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; padding: 12px 14px; }
  .row .switch .lbl { display: none; }
  .row-head { display: none; }
  .logo, .mono { width: 40px; height: 40px; }
  .drawer { top: auto; left: 0; right: 0; bottom: 0; width: 100%; height: 92dvh; border-radius: 28px 28px 0 0; transform: translateY(100%); }
  .drawer header, .drawer .scroll, .drawer footer { padding-left: 18px; padding-right: 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .hrow { grid-template-columns: minmax(0, 1fr) auto; }
  .hrow .when { grid-column: 1; grid-row: 2; }
  .grid { grid-template-columns: 1fr; }
  .gate-card { padding: 32px 22px 26px; border-radius: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .glass { background: #2A211C; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
