/* central · estilos */
:root {
  --bg: #F6F5F1; --ink: #16161A; --ink-hover: #2A2A30; --muted: #6B6A66; --soft: #57564F; --faint: #9A988F;
  --line: #E4E2DC; --line2: #EFEDE8; --hover-line: #B9B6AD; --card: #FFFFFF; --card-2: #FBFAF7; --hover: #F7F6F2;
  --input-line: #D9D6CE; --accent: #2563EB; --danger: #9B2C2C; --sel: #EEF3FE; --chip: #F0EEE9;
  --ok-bg: #EAF3E6; --ok-line: #CFE3C7; --ok-fg: #2D5A22; --ok-dot: #3E7A34; --warn-dot: #C27C0E;
  --err-bg: #FBEAE8; --err-line: #F1CFCA; --err-fg: #8A2F23; --tag-bg: #FBF0D9; --tag-fg: #7A4F00;
  --swatch-line: rgba(0,0,0,.1); --shadow: 0 10px 30px rgba(22,22,26,.14);
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
/* Modo noturno: automático (segue o sistema) ou escolhido no botão */
:root[data-theme="dark"] {
  --bg: #121214; --ink: #EDECE8; --ink-hover: #FFFFFF; --muted: #9A988F; --soft: #B8B6AE; --faint: #6B6A66;
  --line: #2A2A2F; --line2: #232327; --hover-line: #4A4A52; --card: #1A1A1D; --card-2: #1F1F23; --hover: #222226;
  --input-line: #3A3A41; --accent: #6B9BF2; --danger: #F08C80; --sel: #1C2538; --chip: #27272C;
  --ok-bg: #16261A; --ok-line: #24402B; --ok-fg: #A7D8A0; --ok-dot: #6FBF62; --warn-dot: #E0A43A;
  --err-bg: #2C1715; --err-line: #4A2420; --err-fg: #F4A99F; --tag-bg: #3A2D12; --tag-fg: #F0C76E;
  --swatch-line: rgba(255,255,255,.12); --shadow: 0 10px 30px rgba(0,0,0,.5);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --bg: #121214; --ink: #EDECE8; --ink-hover: #FFFFFF; --muted: #9A988F; --soft: #B8B6AE; --faint: #6B6A66;
  --line: #2A2A2F; --line2: #232327; --hover-line: #4A4A52; --card: #1A1A1D; --card-2: #1F1F23; --hover: #222226;
  --input-line: #3A3A41; --accent: #6B9BF2; --danger: #F08C80; --sel: #1C2538; --chip: #27272C;
  --ok-bg: #16261A; --ok-line: #24402B; --ok-fg: #A7D8A0; --ok-dot: #6FBF62; --warn-dot: #E0A43A;
  --err-bg: #2C1715; --err-line: #4A2420; --err-fg: #F4A99F; --tag-bg: #3A2D12; --tag-fg: #F0C76E;
  --swatch-line: rgba(255,255,255,.12); --shadow: 0 10px 30px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}

/* Cores dos ícones */
.pal-areia { --pb: #F3E7CC; --pf: #6E4F0C; }
.pal-azul { --pb: #DDE6F4; --pf: #1D4A85; }
.pal-marca { --pb: #2563EB; --pf: #FFFFFF; }
.pal-verde { --pb: #E3ECE0; --pf: #355E2D; }
.pal-rosa { --pb: #F4DEDA; --pf: #8A2F23; }
.pal-lilas { --pb: #E9E1F3; --pf: #5B3A8A; }
.pal-cinza { --pb: #ECEAE4; --pf: #3F3E3A; }
.pal-tinta { --pb: #16161A; --pf: #FFFFFF; }
:root[data-theme="dark"] .pal-areia { --pb: #3A2F17; --pf: #EBCB8B; }
:root[data-theme="dark"] .pal-azul { --pb: #1D2B42; --pf: #A3C0EE; }
:root[data-theme="dark"] .pal-marca { --pb: #2563EB; --pf: #FFFFFF; }
:root[data-theme="dark"] .pal-verde { --pb: #1F2F1D; --pf: #A9CDA0; }
:root[data-theme="dark"] .pal-rosa { --pb: #3E2321; --pf: #EFAEA4; }
:root[data-theme="dark"] .pal-lilas { --pb: #2D2442; --pf: #C9B5EC; }
:root[data-theme="dark"] .pal-cinza { --pb: #2A2A2F; --pf: #D2D0C9; }
:root[data-theme="dark"] .pal-tinta { --pb: #EDECE8; --pf: #16161A; }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .pal-areia { --pb: #3A2F17; --pf: #EBCB8B; }
:root:not([data-theme="light"]) .pal-azul { --pb: #1D2B42; --pf: #A3C0EE; }
:root:not([data-theme="light"]) .pal-marca { --pb: #2563EB; --pf: #FFFFFF; }
:root:not([data-theme="light"]) .pal-verde { --pb: #1F2F1D; --pf: #A9CDA0; }
:root:not([data-theme="light"]) .pal-rosa { --pb: #3E2321; --pf: #EFAEA4; }
:root:not([data-theme="light"]) .pal-lilas { --pb: #2D2442; --pf: #C9B5EC; }
:root:not([data-theme="light"]) .pal-cinza { --pb: #2A2A2F; --pf: #D2D0C9; }
:root:not([data-theme="light"]) .pal-tinta { --pb: #EDECE8; --pf: #16161A; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 40px; }
.mono { font-family: var(--mono); font-size: 12px; }
.muted { color: var(--muted); }
.spacer { flex: 1; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Logo */
.logo { display: inline-flex; align-items: center; gap: 12px; }
.logo-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--ink); display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 8px; flex: none; }
.logo-mark span { background: var(--bg); border-radius: 2px; }
.logo-mark span:last-child { background: var(--accent); }
.logo-name { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.badge { font-family: var(--mono); font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; }

/* Botões */
.btn { height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--hover-line); }
.btn.sm { height: 40px; padding: 0 14px; border-radius: 10px; }
.btn-dark { background: var(--ink); border-color: var(--ink); color: var(--bg); font-weight: 600; }
.btn-dark:hover { background: var(--ink-hover); border-color: var(--ink-hover); }
.btn-dark:disabled { opacity: .4; cursor: not-allowed; }
.btn-dashed { border-style: dashed; border-color: var(--hover-line); background: transparent; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-danger { color: var(--danger); }
.btn-block { width: 100%; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; cursor: pointer; flex: none; }
.icon-btn:hover { border-color: var(--hover-line); }

/* ---------- Home ---------- */
.home { padding: 40px 0 72px; }
.home .wrap { display: flex; flex-direction: column; gap: 48px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.search { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; height: 44px; width: 360px; max-width: 100%; color: var(--muted); }
.search:focus-within { border-color: var(--hover-line); }
.search input { border: 0; outline: 0; background: transparent; font-size: 15px; flex: 1; min-width: 0; color: var(--ink); }
.search input::-webkit-search-cancel-button { cursor: pointer; }
.kbd { font-family: var(--mono); font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.eyebrow { margin: 0 0 10px; font-family: var(--mono); font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.hero h1 { margin: 0; font-size: 64px; line-height: 1; font-weight: 600; letter-spacing: -0.035em; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 14px; cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: var(--hover-line); }
.chip span { color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); font-weight: 500; }
.chip[aria-pressed="true"] span { color: inherit; opacity: .6; }

.area { display: flex; flex-direction: column; gap: 16px; }
.area-head { display: flex; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.area-num { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.area-head h2 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.015em; }
.area-sub { font-size: 14px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 16px; min-height: 180px; transition: border-color .15s; }
.card[href]:hover { border-color: var(--hover-line); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.card-arrow { color: var(--muted); display: flex; transition: transform .15s, color .15s; }
.card[href]:hover .card-arrow { transform: translate(2px, -2px); color: var(--ink); }
.card-body { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.card-name { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.card-desc { font-size: 14px; line-height: 1.45; color: var(--soft); }
.card-host { font-family: var(--mono); font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card.no-url { border-style: dashed; cursor: default; }
.card.no-url .card-arrow { opacity: .3; }

.tile { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; font-weight: 700; font-size: 15px; flex: none; overflow: hidden; background: var(--pb); color: var(--pf); }
.tile.md { width: 40px; height: 40px; border-radius: 10px; font-size: 14px; }
.tile.sm { width: 36px; height: 36px; border-radius: 9px; font-size: 13px; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile.is-mono { font-family: var(--mono); font-size: 14px; }
.tile.sm.is-mono { font-size: 12px; }

.home-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 20px; }
.no-results, .empty-state { color: var(--muted); font-size: 15px; margin: 0; }
.empty-state { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 40px 0; }

@media (max-width: 720px) {
  .wrap { padding: 0 20px; }
  .home { padding: 24px 0 40px; }
  .home .wrap { gap: 28px; }
  .topbar-right { flex-basis: 100%; }
  .search { width: auto; flex: 1; min-width: 0; height: 48px; }
  .topbar-right { gap: 8px; min-width: 0; }
  .search input { font-size: 16px; }
  .kbd { display: none; }
  .hero { gap: 20px; }
  .hero h1 { font-size: 40px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -20px; padding: 0 20px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .area { gap: 10px; }
  .area-head { border: 0; padding: 0; }
  .area-head h2 { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
  .area-num { font-size: 13px; }
  .area-sub { display: none; }
  .grid { grid-template-columns: 1fr; gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
  .card { flex-direction: row; align-items: center; min-height: 0; border: 0; border-radius: 0; border-top: 1px solid var(--line2); padding: 14px 16px; gap: 14px; }
  .card:first-child { border-top: 0; }
  .card.no-url { border-style: solid; }
  .card-top { display: contents; }
  .card-top .tile { width: 40px; height: 40px; border-radius: 10px; font-size: 14px; }
  .card-body { order: 1; gap: 2px; }
  .card-arrow { order: 2; }
  .card-name { font-size: 16px; }
  .card-desc { font-size: 13px; }
  .card-host { display: none; }
  .home-foot .mono { flex-basis: 100%; }
  .home-foot .btn { flex: 1; }
}

/* ---------- Login / instalação ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.auth-card.wide { max-width: 640px; }
.auth-card h1 { margin: 0 0 4px; font-size: 28px; font-weight: 600; letter-spacing: -0.025em; }
.auth-card p { margin: 0; }
.auth-card fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.auth-card legend { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 0 0 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .span2 { grid-column: span 2; }
.reqs { list-style: none; margin: 0; padding: 14px 16px; background: var(--bg); border-radius: 12px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.reqs li { display: flex; align-items: baseline; gap: 10px; }
.req-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; transform: translateY(-1px); }
.reqs .ok .req-dot { background: var(--ok-dot); }
.reqs .warn .req-dot { background: var(--warn-dot); }
.reqs .bad .req-dot { background: var(--danger); }
@media (max-width: 560px) {
  .auth-card { padding: 24px 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span2 { grid-column: auto; }
}

/* ---------- Formulários ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; }
.hint { font-size: 12px; color: var(--muted); font-weight: 400; }
.input { height: 44px; border-radius: 10px; border: 1px solid var(--input-line); background: var(--card); padding: 0 12px; font-size: 15px; width: 100%; }
textarea.input { height: auto; min-height: 80px; padding: 10px 12px; resize: vertical; }
.input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
input[type=file].input { padding: 9px 12px; font-size: 14px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; min-height: 28px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); margin: 0; flex: none; }
.flash { padding: 12px 16px; border-radius: 12px; font-size: 14px; border: 1px solid; }
.flash.ok { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok-fg); }
.flash.err { background: var(--err-bg); border-color: var(--err-line); color: var(--err-fg); }

/* ---------- Admin ---------- */
.adm-top { background: var(--card); border-bottom: 1px solid var(--line); }
.adm-top .wrap { min-height: 68px; display: flex; align-items: center; gap: 24px; }
.adm-top .logo-mark { width: 30px; height: 30px; padding: 7px; border-radius: 8px; }
.adm-top .logo-name { font-size: 18px; }
.adm-nav { display: flex; gap: 4px; }
.adm-nav a { height: 40px; padding: 0 14px; border-radius: 8px; display: flex; align-items: center; font-size: 14px; color: var(--soft); white-space: nowrap; }
.adm-nav a:hover { color: var(--ink); background: var(--hover); }
.adm-nav a[aria-current="page"] { background: var(--chip); color: var(--ink); font-weight: 600; }
.adm-user { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.adm-user form { margin: 0; }
.avatar { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 600; cursor: pointer; display: grid; place-items: center; flex: none; }
.avatar.is-active { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.adm-main { padding: 36px 0 64px; }
.adm-main .wrap { display: flex; flex-direction: column; gap: 24px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { margin: 0 0 6px; font-size: 36px; font-weight: 600; letter-spacing: -0.03em; }
.page-head p { margin: 0; font-size: 15px; color: var(--soft); }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--card-2); min-height: 56px; }
.panel-head h3 { margin: 0; font-size: 16px; font-weight: 600; flex: 1; }
.panel-head .count { font-weight: 400; color: var(--muted); font-size: 14px; }
.panel-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.panel-body h2 { margin: 0; font-size: 18px; font-weight: 600; }
.panel-body p { margin: 0; font-size: 14px; color: var(--soft); line-height: 1.5; }
.dot { width: 12px; height: 12px; border-radius: 4px; border: 1px solid var(--swatch-line); flex: none; background: var(--pb); }

.row { display: grid; grid-template-columns: 28px 36px minmax(0, 1fr) minmax(0, 1fr) 44px auto; align-items: center; gap: 14px; padding: 8px 16px; border-top: 1px solid var(--line2); background: var(--card); }
.row.no-host { grid-template-columns: 28px 36px minmax(0, 1fr) auto; }
.row.user-row { grid-template-columns: 40px minmax(0, 1fr) minmax(0, 1fr) auto; }
.row.is-sel { background: var(--sel); }
.row.is-hidden .tile, .row.is-hidden .row-name { opacity: .45; }
.row.dragging { position: relative; z-index: 3; box-shadow: var(--shadow); border-radius: 10px; }
.row-name { font-size: 15px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-name small { display: block; font-weight: 400; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.row-host { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag { font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--tag-fg); background: var(--tag-bg); border-radius: 6px; padding: 2px 6px; margin-left: 8px; vertical-align: 1px; }
.empty-row { padding: 16px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line2); }
.handle { width: 28px; height: 44px; border: 0; background: transparent; cursor: grab; touch-action: none; display: grid; place-items: center; color: var(--faint); padding: 0; }
.handle:active { cursor: grabbing; }
.switch { width: 44px; height: 26px; border-radius: 999px; border: 0; background: var(--input-line); padding: 3px; display: flex; cursor: pointer; transition: background .15s; }
.switch span { width: 20px; height: 20px; border-radius: 50%; background: var(--card); display: block; transition: transform .15s; }
.switch[aria-pressed="true"] { background: var(--ink); }
.switch[aria-pressed="true"] span { transform: translateX(18px); }
.actions { display: flex; gap: 8px; }
.actions form { margin: 0; }
.sq { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.sq:hover { border-color: var(--hover-line); }
.sq.danger { color: var(--danger); }
.sq:disabled { opacity: .35; cursor: not-allowed; }

.aside { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 24px; }
.aside-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.aside-head h2 { margin: 0; font-size: 18px; font-weight: 600; }
.preview { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 12px; background: var(--bg); min-width: 0; }
.preview-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.preview-text strong { font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-text span { font-size: 13px; color: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview .mono { margin-left: auto; font-size: 11px; color: var(--muted); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--chip); padding: 4px; border-radius: 10px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label span { display: grid; place-items: center; height: 36px; border-radius: 7px; font-size: 13px; color: var(--soft); cursor: pointer; }
.seg input:checked + span { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.sw { position: relative; }
.sw input { position: absolute; opacity: 0; pointer-events: none; }
.sw > span { display: block; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--swatch-line); cursor: pointer; background: var(--pb); }
.sw.sw-text > span { width: auto; padding: 0 10px; display: grid; place-items: center; font-size: 12px; background: var(--card); border-color: var(--line); }
.sw input:checked + span { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }
.sw input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 4px; }
.icon-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; max-height: 208px; overflow-y: auto; padding: 2px; }
.ic { position: relative; }
.ic input { position: absolute; opacity: 0; pointer-events: none; }
.ic > span { height: 44px; border-radius: 8px; border: 1px solid var(--line); display: grid; place-items: center; cursor: pointer; color: var(--soft); }
.ic input:checked + span { border-color: var(--ink); background: var(--chip); color: var(--ink); }
.ic input:focus-visible + span { outline: 2px solid var(--accent); }
.current-img { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.form-actions { display: flex; gap: 8px; border-top: 1px solid var(--line2); padding-top: 18px; flex-wrap: wrap; }
.form-actions .push { margin-left: auto; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-family: var(--mono); font-size: 13px; }

@media (max-width: 1080px) {
  .split { grid-template-columns: 1fr; }
  .aside { position: static; }
}
@media (max-width: 720px) {
  .adm-top .wrap { flex-wrap: wrap; gap: 8px 12px; padding-top: 12px; padding-bottom: 8px; }
  .adm-nav { order: 3; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px; }
  .adm-user .btn { display: none; }
  .adm-main { padding: 24px 0 48px; }
  .page-head h1 { font-size: 28px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .row { grid-template-columns: 28px 36px minmax(0, 1fr) 44px auto; gap: 10px; padding: 8px 12px; }
  .row .row-host { display: none; }
  .row.user-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .aside { padding: 20px; }
  .icon-grid { grid-template-columns: repeat(5, 1fr); }
}
.panel > [data-sortable]:first-child > .row:first-child { border-top: 0; }

/* ---------- Botão de tema ---------- */
.theme-btn .ti { display: none; }
.theme-btn[data-modo="auto"] .ti-auto, .theme-btn:not([data-modo]) .ti-auto,
.theme-btn[data-modo="escuro"] .ti-escuro, .theme-btn[data-modo="claro"] .ti-claro { display: flex; }
.adm-user .theme-btn { width: 40px; height: 40px; border-radius: 10px; }

/* ---------- Páginas de erro ---------- */
.err { min-height: 100vh; max-width: 720px; margin: 0 auto; padding: 40px 24px; display: flex; flex-direction: column; gap: 64px; }
.err-body { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; margin: auto 0; padding-bottom: 10vh; }
.err-code { margin: 0; font-family: var(--mono); font-size: clamp(88px, 20vw, 160px); line-height: .9; font-weight: 500; letter-spacing: -0.06em; color: var(--ink); }
.err-body h1 { margin: 0; font-size: clamp(28px, 5vw, 40px); font-weight: 600; letter-spacing: -0.03em; }
.err-text { margin: 0; font-size: 17px; line-height: 1.5; color: var(--soft); max-width: 46ch; }
.err-path { margin: 0; padding: 6px 10px; border-radius: 8px; background: var(--chip); color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.err-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.err-ref { margin: 8px 0 0; color: var(--muted); }

/* ---------- Minha conta / 2FA ---------- */
.badge-ok { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ok-fg); background: var(--ok-bg); border: 1px solid var(--ok-line); border-radius: 999px; padding: 3px 10px; }
.badge-off { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--chip); border-radius: 999px; padding: 3px 10px; }
.qr-wrap { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.qr-box { padding: 10px; background: #FFFFFF; border-radius: 14px; border: 1px solid var(--line); line-height: 0; }
.qr-box svg { width: 180px; height: 180px; }
.secret { font-family: var(--mono); font-size: 14px; letter-spacing: .08em; word-break: break-all; background: var(--chip); border-radius: 8px; padding: 8px 10px; user-select: all; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 0; padding: 14px; list-style: none; background: var(--chip); border-radius: 12px; font-family: var(--mono); font-size: 15px; }
.input-code { font-family: var(--mono); font-size: 22px; letter-spacing: .3em; text-align: center; height: 52px; }
.steps { margin: 0; padding-left: 20px; font-size: 14px; color: var(--soft); line-height: 1.6; }
.tag.tag-info { background: var(--sel); color: var(--accent); }
.tag.tag-ok { background: var(--ok-bg); color: var(--ok-fg); }

/* ---------- Painel de informações (home) ---------- */
/* Duas colunas independentes: cada bloco fica na coluna e posição escolhidas */
.painel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.painel-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; min-height: 40px; }
.painel-bar { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin: -28px 0 -32px; }
.painel-dica { font-size: 13px; color: var(--muted); margin-right: auto; }
.painel.editando .painel-col { outline: 1.5px dashed var(--line); outline-offset: 6px; border-radius: 18px; }
.painel.editando .widget { position: relative; }
.painel.editando .widget > :not(.bloco-tools) { pointer-events: none; user-select: none; }
.bloco-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -6px -8px 4px; padding: 4px; border-radius: 10px; background: var(--chip); }
.bloco-handle { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--soft); font: inherit; font-size: 13px; cursor: grab; touch-action: none; }
.bloco-handle:active { cursor: grabbing; }
.bloco-setas { display: flex; gap: 2px; }
.bloco-setas button { width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--soft); font-size: 16px; cursor: pointer; }
.bloco-setas button:hover, .bloco-handle:hover { background: var(--card); color: var(--ink); }
.widget.arrastando { position: fixed; z-index: 50; box-shadow: var(--shadow); pointer-events: none; opacity: .96; }
.bloco-fantasma { border: 2px dashed var(--hover-line); border-radius: 16px; background: var(--hover); }
.widget { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.widget-head { display: flex; align-items: center; gap: 12px; }
.widget-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.widget-title h2 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.widget-title span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.widget-open { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); flex: none; }
.widget-open:hover { background: var(--hover); color: var(--ink); }
.widget-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); font-family: var(--mono); border-top: 1px solid var(--line2); padding-top: 12px; }
.widget-foot a { color: var(--ink); }
.widget-foot a:hover { text-decoration: underline; }
.widget-foot .warn { color: var(--tag-fg); }
.widget-erro .widget-title span { color: var(--err-fg); white-space: normal; }
.widget-skeleton { min-height: 220px; gap: 12px; }
.widget-skeleton span { display: block; height: 14px; border-radius: 6px; background: var(--chip); animation: pulso 1.4s ease-in-out infinite; }
.widget-skeleton span:first-child { width: 40%; height: 20px; }
.widget-skeleton span:nth-child(2) { width: 85%; }
.widget-skeleton span:nth-child(3) { width: 65%; }
@keyframes pulso { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .widget-skeleton span { animation: none; } }

.pkg-list { list-style: none; margin: 0 -8px; padding: 0; display: flex; flex-direction: column; }
.pkg { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 10px 8px; border-radius: 10px; }
a.pkg:hover { background: var(--hover); }
.pkg-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; background: var(--k); }
.pkg-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pkg-name { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.pkg-name b { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pkg-kind { font-size: 12px; font-weight: 500; color: var(--k-text, var(--muted)); flex: none; }
.pkg-status { font-size: 13px; color: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pkg-when { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; margin-top: 2px; }
.pkg-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; max-width: 160px; margin-top: 5px; }
.pkg-steps i { height: 3px; border-radius: 2px; background: var(--line); }
.pkg-steps i.on { background: var(--k); }
.k-transito { --k: var(--accent); --k-text: var(--accent); }
.k-atencao { --k: var(--warn-dot); --k-text: var(--tag-fg); }
.k-entregue { --k: var(--ok-dot); --k-text: var(--ok-fg); }
.k-pendente { --k: var(--faint); }

/* Página de integrações */
.int-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 960px) { .int-grid { grid-template-columns: 1fr; } }
.int-head { display: flex; align-items: flex-start; gap: 12px; }
.int-title { flex: 1; min-width: 0; }
.int-title h2 { margin: 0 0 2px; font-size: 18px; }
.int-title p { margin: 0; font-size: 14px; color: var(--soft); }
.panel.is-soon { opacity: .7; }
.badge-warn { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--tag-fg); background: var(--tag-bg); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.mono-input { font-family: var(--mono); font-size: 14px; }

@media (max-width: 720px) {
  .painel { grid-template-columns: 1fr; margin-top: -8px; }
  .int-grid { grid-template-columns: 1fr; }
  .widget { padding: 16px; }
}

/* Ping: bloco de alerta e bolinhas nos atalhos */
.k-down { --k: #D64545; --k-text: var(--err-fg); }
.widget-alerta { border-color: var(--err-line); }
.pkg-mini { padding-top: 6px; padding-bottom: 6px; }
.pkg-mini .pkg-dot { width: 6px; height: 6px; margin: 6px 2px 0; }
.card-name { display: inline-flex; align-items: center; gap: 8px; }
.ping-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--faint); }
.ping-dot.s-up { background: #1E9E6A; }
.ping-dot.s-slow { background: #E0A23B; }
.ping-dot.s-down { background: #D64545; animation: ping-pulso 2s infinite; }
.ping-dot.s-maint { background: #4F7BE0; }
@keyframes ping-pulso { 0% { box-shadow: 0 0 0 0 rgba(214,69,69,.5); } 70% { box-shadow: 0 0 0 6px rgba(214,69,69,0); } }
@media (prefers-reduced-motion: reduce) { .ping-dot.s-down { animation: none; } }

/* Ping: tudo certo */
.widget-ok { padding-top: 12px; padding-bottom: 12px; }
.widget-ok .widget-title h2 { font-size: 15px; }

/* Loterias */
.lot-list { display: flex; flex-direction: column; gap: 14px; }
.lot + .lot { border-top: 1px solid var(--line2); padding-top: 14px; }
.lot { display: flex; flex-direction: column; gap: 10px; }
.lot-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.lot-head h3 { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; }
.lot-head h3::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--lot); }
.lot-meta { font-family: var(--mono); font-size: 12px; }
.lot-head > span:last-child:not(.lot-meta) { margin-left: auto; }
.lot-acum { font-weight: 600; color: var(--tag-fg); }
.lot-balls { display: flex; flex-wrap: wrap; gap: 6px; }
.ball { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: 14px; font-weight: 500; background: var(--lot); color: #FFFFFF; }
.ball.trevo { background: transparent; color: var(--ink); border: 1.5px solid var(--lot); border-radius: 10px; }
.lot-next { margin: 0; font-size: 13px; color: var(--muted); }
.lot-next b { font-weight: 500; color: var(--soft); }
.lot-pick { border: 0; padding: 0; margin: 0; }
.lot-pick legend { font-size: 13px; font-weight: 600; padding: 0 0 6px; }
.lot-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2px 12px; }
.lot-sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
:root[data-theme="dark"] .ball.trevo { color: var(--ink); }

/* Podcasts de hoje */
.pod-list { list-style: none; margin: 0 -8px; padding: 0; display: flex; flex-direction: column; }
.pod { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px; border-radius: 10px; }
a.pod:hover { background: var(--hover); }
.pod-art { width: 48px; height: 48px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: var(--pc); color: #FFFFFF; font-weight: 700; font-size: 18px; }
.pod-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pod-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pod-show { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-title { font-size: 15px; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.pod-st { display: inline-flex; align-items: center; gap: 4px; font-family: var(--sans); font-size: 11px; font-weight: 500; color: var(--soft); background: var(--chip); border-radius: 999px; padding: 1px 8px; }
.pod-st.ok { color: var(--ok-fg); background: var(--ok-bg); }
.pod-st.err { color: var(--err-fg); background: var(--err-bg); }
.pod.is-ouvido .pod-title { color: var(--soft); font-weight: 500; }

/* ---------- Faixa: cotações e previsão do tempo ---------- */
.faixa { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr); gap: 16px; margin-top: -16px; }
.faixa > :only-child { grid-column: 1 / -1; }
.faixa-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.faixa-card.widget-skeleton { min-height: 170px; }
.faixa-tit { margin: 0; font-family: var(--mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.faixa-erro { margin: 0; font-size: 14px; color: var(--muted); }
.faixa-foot { margin: auto 0 0; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.faixa-foot .warn { color: var(--tag-fg); }

.cot-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.cot-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: baseline; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line2); }
.cot-row:first-child { border-top: 0; padding-top: 0; }
.cot-nome { font-size: 15px; font-weight: 600; white-space: nowrap; }
.cot-cod { font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.cot-valor { font-family: var(--mono); font-size: 15px; font-variant-numeric: tabular-nums; text-align: right; }
.cot-var { font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; min-width: 72px; text-align: right; }
.cot-var.up { color: var(--ok-fg); }
.cot-var.down { color: var(--err-fg); }
.cot-var.flat { color: var(--muted); }

.tempo { flex-direction: row; align-items: center; gap: 24px; }
.tempo-agora { display: flex; align-items: center; gap: 14px; flex: 0 1 320px; min-width: 200px; }
.tempo-ic { color: var(--ink); display: flex; }
.tempo-now { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tempo-temp { font-size: 44px; line-height: 1; font-weight: 600; letter-spacing: -0.04em; }
.tempo-cond { font-size: 14px; color: var(--soft); }
.tempo-cond b { font-weight: 600; color: var(--ink); }
.tempo-det { font-size: 12px; color: var(--muted); }
.tempo-dias { list-style: none; margin: 0; padding: 0 0 0 24px; border-left: 1px solid var(--line2); display: grid; grid-template-columns: repeat(7, minmax(40px, 1fr)); gap: 2px; flex: 1 1 auto; min-width: 0; }
.dia { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 2px; border-radius: 10px; text-align: center; }
.dia.is-hoje { background: var(--chip); }
.dia-nome { font-size: 12px; font-weight: 600; color: var(--soft); }
.dia-ic { color: var(--soft); display: flex; height: 24px; align-items: center; }
.dia-max { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dia-min { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dia-chuva { font-family: var(--mono); font-size: 11px; color: var(--accent); min-height: 14px; }

@media (max-width: 1080px) {
  .tempo { flex-direction: column; align-items: stretch; gap: 16px; }
  .tempo-agora { max-width: none; flex: none; }
  .tempo-dias { padding: 16px 0 0; border-left: 0; border-top: 1px solid var(--line2); }
}
@media (max-width: 720px) {
  .faixa { grid-template-columns: 1fr; margin-top: -8px; }
  .painel { grid-template-columns: 1fr; }
  .painel-bar { margin: -12px 0 -16px; }
  .painel-dica { flex-basis: 100%; order: 3; }
  .faixa-card { padding: 16px; }
  .tempo-dias { grid-template-columns: repeat(7, 56px); overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 14px 16px 0; }
  .tempo-dias::-webkit-scrollbar { display: none; }
  .tempo-temp { font-size: 38px; }
}
.field-title { font-size: 14px; font-weight: 600; }
.inline-form { display: flex; gap: 8px; }
.inline-form .input { flex: 1; min-width: 0; }
.city-list { display: flex; flex-direction: column; gap: 2px; }
.check.city { padding: 6px 10px; border-radius: 10px; }
.check.city:hover { background: var(--hover); }

/* ---------- Notas ---------- */
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.link-btn:hover { text-decoration-color: currentColor; }
.link-btn.danger { color: var(--err-fg); font-family: var(--mono); font-size: 12px; }
.nota-add { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.nota-add .nota-data { grid-column: 1 / -1; }
.nota-add .btn.sm, .nota-edit .btn.sm { height: 40px; }
.nota-input { height: 40px; }
.nota-btn { width: 36px; height: 36px; border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; flex: none; }
.nota-btn:hover { background: var(--hover); color: var(--ink); }
.nota-btn.on { color: var(--accent); }
.nota-bell { border-color: var(--line); width: 40px; height: 40px; }
.nota-list { list-style: none; margin: 0 -6px; padding: 0; display: flex; flex-direction: column; }
.nota { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 7px 6px; border-radius: 10px; }
.nota:hover { background: var(--hover); }
.nota-check { width: 20px; height: 20px; margin-top: 1px; border-radius: 6px; border: 1.5px solid var(--hover-line); background: var(--card); color: transparent; display: grid; place-items: center; cursor: pointer; padding: 0; }
.nota-check:hover { border-color: var(--ink); color: var(--muted); }
.nota-check[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.nota-corpo { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.nota-txt { font-size: 14px; line-height: 1.45; cursor: text; overflow-wrap: anywhere; }
.nota-txt a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.nota-lem { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.lem-hoje .nota-lem { color: var(--tag-fg); }
.lem-atrasado .nota-lem { color: var(--err-fg); font-weight: 500; }
.lem-atrasado .nota-check { border-color: var(--err-fg); }
.nota.is-fixada { background: var(--chip); }
.nota.is-feita .nota-txt { text-decoration: line-through; color: var(--muted); }
.nota-acoes { display: flex; gap: 0; opacity: 0; transition: opacity .12s; }
.nota:hover .nota-acoes, .nota:focus-within .nota-acoes, .nota.is-fixada .nota-acoes { opacity: 1; }
.nota.is-fixada .nota-acoes .nota-btn:not(.on) { opacity: 0; }
.nota.is-fixada:hover .nota-acoes .nota-btn { opacity: 1; }
.nota-edit { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.nota-edit .input { height: 38px; font-size: 14px; }
.nota-edit-acoes { display: flex; gap: 6px; }
.notas-feitas { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; border-top: 1px solid var(--line2); padding-top: 10px; }
.notas-feitas .nota-list { width: calc(100% + 12px); }
@media (hover: none) { .nota-acoes { opacity: 1; } }

/* ---------- WhatsApp ---------- */
.whats-form { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.whats-input { height: 40px; font-family: var(--mono); }
.whats-form .btn.sm { height: 40px; }
.whats-form .nota-btn { border-color: var(--line); width: 40px; height: 40px; }
.whats-form .nota-btn:disabled, .whats-form .btn:disabled { opacity: .45; cursor: default; pointer-events: none; }
.nota-btn.on { color: var(--accent); }
.whats-saida { margin: 0; min-height: 18px; font-family: var(--mono); font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.whats-saida:empty { display: none; }
.whats-saida.erro { color: var(--err-fg); }
.whats-list { list-style: none; margin: 0 -6px; padding: 0; display: flex; flex-direction: column; }
.whats-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 2px 6px; border-radius: 10px; }
.whats-item:hover { background: var(--hover); }
.whats-item a { font-family: var(--mono); font-size: 13px; color: var(--ink); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.whats-item a:hover { text-decoration: underline; text-underline-offset: 3px; }
.whats-quando { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.whats-item-acoes { display: flex; opacity: 0; transition: opacity .12s; }
.whats-item:hover .whats-item-acoes, .whats-item:focus-within .whats-item-acoes { opacity: 1; }
@media (hover: none) { .whats-item-acoes { opacity: 1; } }

/* ---------- Agenda (contatos) ---------- */
.ag-busca { position: relative; }
.ag-lupa { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); display: flex; pointer-events: none; }
.ag-input { height: 40px; padding-left: 36px; }
.ag-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.ag-tag { height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 12px; color: var(--soft); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.ag-tag span { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.ag-tag:hover { border-color: var(--hover-line); }
.ag-tag[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.ag-tag[aria-pressed="true"] span { color: inherit; opacity: .6; }
.ag-tag.is-static { cursor: default; height: 24px; background: var(--chip); border-color: transparent; }
.ag-rotulo { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ag-res { display: flex; flex-direction: column; gap: 6px; }
.ag-list { list-style: none; margin: 0 -8px; padding: 0; display: flex; flex-direction: column; }
.ag-item { width: 100%; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 6px 8px; border: 0; border-radius: 10px; background: none; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.ag-item:hover, .ag-item:focus-visible { background: var(--hover); outline: none; }
.ag-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--chip); color: var(--soft); display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
.ag-avatar.lg { width: 52px; height: 52px; font-size: 17px; background: var(--sel); color: var(--accent); }
.ag-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ag-nome { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-nome small { font-weight: 400; color: var(--muted); }
.ag-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-fav { color: var(--accent); display: inline-flex; vertical-align: -1px; }
.ag-vazio { margin: 0; font-size: 14px; color: var(--muted); }
.ag-vazio a, .ag-mais { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); font-size: 14px; }
.data-contato { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; max-width: 100%; }
.data-contato:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Ficha do contato */
.ficha-dialog { width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--card); color: var(--ink); box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.ficha-dialog::backdrop { background: rgba(10, 10, 10, .45); }
.ficha { padding: 22px 24px; display: flex; flex-direction: column; gap: 18px; }
.ficha-head { display: flex; align-items: center; gap: 14px; }
.ficha-titulo { flex: 1; min-width: 0; }
.ficha-titulo h2 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.ficha-titulo p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.ficha-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.ficha-acoes { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; }
.ficha-acao { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border-radius: 12px; border: 1px solid var(--line); font-size: 13px; color: var(--ink); }
.ficha-acao:hover { border-color: var(--hover-line); background: var(--hover); }
.ficha-dados { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 10px 14px; margin: 0; font-size: 14px; align-items: center; }
.ficha-dados dt { color: var(--muted); font-size: 13px; }
.ficha-dados dd { margin: 0; overflow-wrap: anywhere; }
.ficha-dados a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.ficha-tel { display: flex; align-items: center; gap: 2px; }
.ficha-tel > a:first-child { margin-right: auto; font-family: var(--mono); font-size: 13px; }
.ficha-tel .nota-btn { width: 32px; height: 32px; text-decoration: none; }
.ficha-obs { display: flex; flex-direction: column; gap: 6px; }
.ficha-obs p { margin: 0; font-size: 14px; line-height: 1.55; white-space: pre-wrap; }
.ficha-obs a { color: var(--accent); }
.ficha-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line2); padding-top: 14px; font-size: 12px; color: var(--muted); font-family: var(--mono); }
@media (max-width: 560px) {
  .ficha-dialog { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 18px 18px 0 0; }
  .ficha { padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); }
  .ficha-dados { grid-template-columns: 1fr; gap: 2px; }
  .ficha-dados dd { margin-bottom: 8px; }
}

/* Admin › Contatos */
.ct-filtro { display: flex; gap: 8px; }
.ct-busca { position: relative; flex: 1; display: flex; align-items: center; }
.ct-busca svg { position: absolute; left: 12px; color: var(--muted); }
.ct-busca .input { padding-left: 36px; }
.row.ct-row { grid-template-columns: 36px minmax(0, 1fr) auto auto; }
.ct-tags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; max-width: 220px; }
.ct-linhas { display: flex; flex-direction: column; gap: 8px; }
.ct-linha { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px; }
.ct-linha.one { grid-template-columns: 1fr; }
.field > [data-add-linha] { align-self: flex-start; font-size: 13px; }
.ct-paginas { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line2); }
.ct-perigo summary { cursor: pointer; list-style: none; }
.ct-perigo summary::-webkit-details-marker { display: none; }
.ct-perigo summary h3 { color: var(--danger); font-size: 14px; }
@media (max-width: 720px) {
  .row.ct-row { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .ct-tags { display: none; }
}

/* ---------- Próximas datas ---------- */
.data-list { list-style: none; margin: 0 -8px; padding: 0; display: flex; flex-direction: column; }
.data-item { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 7px 8px; border-radius: 10px; }
.data-item.is-hoje { background: var(--chip); }
.data-dia { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--mono); font-size: 10px; text-transform: uppercase; color: var(--muted); line-height: 1.1; }
.data-dia b { font-family: var(--sans); font-size: 17px; color: var(--ink); font-weight: 600; text-transform: none; }
.t-nacional .data-dia, .t-feriado .data-dia { border-color: var(--accent); }
.t-aniversario .data-dia { border-color: #D4708A; }
.data-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.data-tit { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.data-tit svg { color: var(--muted); flex: none; }
.data-sub { font-size: 12px; color: var(--muted); }
.data-quando { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.is-hoje .data-quando { color: var(--ink); font-weight: 500; }

/* Passkeys */
.ou { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; font-family: var(--mono); }
.ou::before, .ou::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.pk-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pk-list li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line2); }
.pk-list li:first-child { border-top: 0; }
.pk-list form { margin: 0; }

/* Backup */
.sub-h { margin: 8px 0 0; font-size: 15px; font-weight: 600; border-top: 1px solid var(--line2); padding-top: 16px; }
.bkp-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.bkp-log li { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 10px; align-items: start; }
.bkp-log small { color: var(--muted); overflow-wrap: anywhere; }
.bkp-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; background: var(--ok-dot); }
.bkp-log .err .bkp-dot { background: #D64545; }
.data-contato:focus-visible { outline-offset: 2px; border-radius: 4px; }
