/* ==========================================================================
   Homepage (Views/Home/Index.cshtml): shell com sidebar, header, painel e palette.
   Tokens em .app; tema claro/escuro via [data-theme] do <html>.
   ========================================================================== */
.app, .auth {
    --bg: #eff1f5;
    --surface: #ffffff;
    --surface-2: #f5f6f9;
    --line: #dde1e8;
    --text: #121a29;
    --text-2: #3b4659;
    --muted: #5d6879;
    --accent: #152031;
    --accent-ink: #ffffff;
    --accent-soft: #e6e9ef;
    --side: #152031;
    --side-text: #b9c2d2;
    --side-hover: rgba(255, 255, 255, .08);
    --side-active: rgba(139, 180, 255, .16);
    --side-accent: #8bb4ff;
    --shadow: 0 1px 2px rgba(21, 32, 49, .06), 0 6px 20px rgba(21, 32, 49, .06);
    --r: 12px;
    --ease: cubic-bezier(.22, 1, .36, 1);
    --side-w: 272px;
    --side-w-min: 68px;

    display: flex;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
}
.sidebar, .topbar, .palette, .home, .auth { font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif; font-size: 15px; line-height: 1.45; }

[data-theme="dark"] .app, [data-theme="dark"] .auth {
    --bg: #0b1019;
    --surface: #131c2b;
    --surface-2: #1a2538;
    --line: #25314a;
    --text: #e8edf6;
    --text-2: #b7c1d3;
    --muted: #8c98ae;
    --accent: #8bb4ff;
    --accent-ink: #0b1019;
    --accent-soft: rgba(139, 180, 255, .14);
    --side: #152031;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
}

.app *, .app *::before, .app *::after, .auth *, .auth *::before, .auth *::after { box-sizing: border-box; }
/* resets com especificidade zero, para não vencerem as classes dos componentes */
:where(.sidebar, .topbar, .palette, .home, .auth) a { color: inherit; text-decoration: none; }
:where(.sidebar, .topbar, .palette, .home, .auth) ul { list-style: none; margin: 0; padding: 0; }
:where(.sidebar, .topbar, .palette, .home, .auth) h1, :where(.sidebar, .topbar, .palette, .home, .auth) h2, :where(.sidebar, .topbar, .palette, .home, .auth) h3, :where(.sidebar, .topbar, .palette, .home, .auth) p { margin: 0; padding: 0; }
:where(.sidebar, .topbar, .palette, .home, .auth) button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
.sidebar :focus-visible, .topbar :focus-visible, .palette :focus-visible, .home :focus-visible, .auth :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sidebar :focus-visible { outline-color: var(--side-accent); }
.sidebar kbd, .topbar kbd, .palette kbd, .home kbd {
    font: 600 11px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    padding: 3px 6px; border-radius: 5px; border: 1px solid var(--line);
    background: var(--surface-2); color: var(--muted);
}

/* ---------- Sidebar ---------- */
.sidebar {
    width: var(--side-w);
    flex: none;
    position: sticky;
    top: 0;
    height: 100vh;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    background: var(--side);
    color: var(--side-text);
    transition: width .26s var(--ease), transform .26s var(--ease);
    z-index: 30;
}
.sidebar__brand {
    position: relative; height: 64px; flex: none; display: flex; align-items: center; justify-content: space-between;
    padding: 0 12px 0 18px; border-bottom: 1px solid rgba(255, 255, 255, .07);
}
/* Selo sazonal da marca (Models/MarcaSazonal.cs): ícone na cor da época, linha por baixo e partículas opcionais */
.brand__tag {
    --tint: var(--side-accent);
    width: 30px; height: 30px; margin-right: 10px; flex: none; display: grid; place-items: center; border-radius: 9px;
    color: var(--tint); background: color-mix(in srgb, var(--tint) 14%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint) 32%, transparent);
}
.brand__tag svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.brand:hover .brand__tag svg { transform: rotate(-8deg) scale(1.12); }
/* nome da época: tooltip próprio (o title nativo é lento e não aparece em toque) */
.brand__tag { position: relative; }
.brand__tag::after {
    content: attr(data-nome); position: absolute; left: 0; top: calc(100% + 8px); z-index: 5; white-space: nowrap;
    padding: 5px 9px; border-radius: 6px; font-size: 12px; font-weight: 600; background: #0b1019; color: #fff;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 6px 16px rgba(0, 0, 0, .35);
    opacity: 0; transform: translateY(-3px); pointer-events: none; transition: opacity .15s, transform .15s;
}
.brand:hover .brand__tag::after, .brand:focus-visible .brand__tag::after { opacity: 1; transform: none; }
.brand__fx { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.brand__fx::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, var(--tint), transparent 70%); }
.brand__fx i { position: absolute; top: 0; width: 4px; height: 4px; border-radius: 50%; background: var(--tint); opacity: 0; animation: fx-queda 4s linear infinite; }
.fx-neve i { background: #fff; }
.fx-queda i { width: 5px; height: 5px; border-radius: 50% 0 50% 0; }
.fx-confetti i { width: 4px; height: 7px; border-radius: 1px; animation-name: fx-confete; }
.fx-confetti i:nth-child(4n+1) { background: #f2c46d; }
.fx-confetti i:nth-child(4n+2) { background: #f2a6c8; }
.fx-confetti i:nth-child(4n+3) { background: #8bb4ff; }
.fx-confetti i:nth-child(4n)   { background: #6fcf97; }
.fx-bolhas i, .fx-faiscas i { top: auto; bottom: 0; animation-name: fx-sobe; }
.fx-bolhas i { width: 6px; height: 6px; background: transparent; box-shadow: inset 0 0 0 1px var(--tint); }
.fx-faiscas i { width: 2px; height: 2px; box-shadow: 0 0 4px 1px var(--tint); }
@keyframes fx-queda { 0% { transform: translateY(-8px); opacity: 0; } 12%, 85% { opacity: .85; } 100% { transform: translateY(72px); opacity: 0; } }
@keyframes fx-confete { 0% { transform: translateY(-8px) rotate(0); opacity: 0; } 12%, 85% { opacity: .9; } 100% { transform: translateY(72px) rotate(360deg); opacity: 0; } }
@keyframes fx-sobe { 0% { transform: translateY(0); opacity: 0; } 15%, 80% { opacity: .85; } 100% { transform: translateY(-72px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .brand__fx i { display: none; } .brand__tag svg { transition: none; } .brand:hover .brand__tag svg { transform: none; } }
.brand { display: flex; align-items: center; }
.brand img { max-height: 30px; max-width: 150px; width: auto; }
/* o logótipo "dark" é pensado para fundos escuros: a sidebar é sempre escura */
.sidebar .logo-light { display: none !important; }
.sidebar .logo-dark { display: block !important; }
.sidebar__nav { flex: 1; overflow-y: auto; padding: 12px 10px 24px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.sidebar .icon-btn { color: var(--side-text); }
.sidebar .icon-btn:hover { background: var(--side-hover); }
.sidebar__collapse i { transition: transform .26s var(--ease); }

.nav-item, .nav-group__head, .nav-sub {
    position: relative; display: flex; align-items: center; gap: 12px; width: 100%;
    min-height: 40px; padding: 0 12px; border-radius: 9px; text-align: left;
    color: var(--side-text); font-weight: 500; transition: background .15s, color .15s;
}
.nav-item > i:first-child, .nav-group__head > i:first-child { width: 20px; text-align: center; flex: none; font-size: 15px; }
.nav-item:hover, .nav-group__head:hover, .nav-sub:hover { background: var(--side-hover); color: #fff; }
.nav-item.is-active { background: var(--side-active); color: #fff; }
.nav-item.is-active::before {
    content: ""; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 3px;
    border-radius: 0 3px 3px 0; background: var(--side-accent);
}
.nav-group { margin-top: 4px; }
.nav-group__head span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-group__chev { font-size: 10px; opacity: .6; transition: transform .22s var(--ease); }
.nav-group.is-open > .nav-group__head { color: #fff; }
.nav-group.is-open .nav-group__chev { transform: rotate(180deg); }
.nav-group__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .24s var(--ease); }
.nav-group.is-open .nav-group__body { grid-template-rows: 1fr; }
.nav-group__body > ul { overflow: hidden; min-height: 0; margin-left: 20px; padding-left: 10px; border-left: 1px solid rgba(255, 255, 255, .1); }
.nav-sub { min-height: 36px; font-weight: 400; font-size: 14px; gap: 10px; padding: 0 10px; }
.nav-sub i { width: 18px; text-align: center; flex: none; font-size: 13px; opacity: .75; }
.nav-sub span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-group:not(.is-open) .nav-sub { visibility: hidden; }
.nav-sub.is-active { background: var(--side-active); color: #fff; font-weight: 600; }
.nav-sub.is-active i { color: var(--side-accent); opacity: 1; }

/* recolhida (desktop): só ícones, com tooltip */
.app.is-collapsed .sidebar { width: var(--side-w-min); }
.app.is-collapsed .sidebar__brand { padding: 0; justify-content: center; }
.app.is-collapsed .brand { display: none; }
.app.is-collapsed .sidebar__collapse i { transform: rotate(180deg); }
.app.is-collapsed .nav-item span, .app.is-collapsed .nav-group__head span,
.app.is-collapsed .nav-group__chev, .app.is-collapsed .nav-group__body { display: none; }
.app.is-collapsed .nav-item, .app.is-collapsed .nav-group__head { justify-content: center; padding: 0; }
.app.is-collapsed .nav-item.is-active::before { left: -10px; }
.app.is-collapsed [data-tip]:hover::after, .app.is-collapsed [data-tip]:focus-visible::after {
    content: attr(data-tip); position: fixed; left: calc(var(--side-w-min) + 8px);
    margin-top: -2px; padding: 6px 10px; border-radius: 7px; white-space: nowrap; z-index: 60;
    background: #000; color: #fff; font-size: 13px; font-weight: 500; pointer-events: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}

/* ---------- Palco + header ---------- */
.stage { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
    position: sticky; top: 0; z-index: 35;
    height: 64px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 24px;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.icon-btn {
    width: 40px; height: 40px; flex: none; display: inline-grid; place-items: center;
    border-radius: 10px; color: var(--text-2); transition: background .15s, color .15s, transform .12s;
}
.icon-btn:hover { background: var(--surface); color: var(--text); }
.icon-btn:active { transform: scale(.94); }
.topbar__menu { display: none; }
.search {
    flex: 1; max-width: 520px; height: 40px; display: flex; align-items: center; gap: 10px; padding: 0 10px 0 14px;
    border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted);
    text-align: left; transition: border-color .15s, box-shadow .15s;
}
.search:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.bell { position: relative; }
.bell__dot { position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: #e5484d; border: 2px solid var(--bg); }
.bell__dot[hidden] { display: none; }
#dark-mode-icon.fa-sun { color: #d99a06; }

.profile { position: relative; margin-left: 6px; }
.profile__btn { display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 10px 0 4px; border-radius: 999px; transition: background .15s; }
.profile__btn:hover, .profile__btn[aria-expanded="true"] { background: var(--surface); }
.profile__btn img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--line); }
.profile__btn span { font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile__btn i { font-size: 10px; color: var(--muted); }
.profile__menu {
    position: absolute; right: 0; top: calc(100% + 8px); width: 260px; padding: 6px; z-index: 40;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 16px 40px rgba(0, 0, 0, .18);
    animation: pop .16s var(--ease);
}
.profile__menu[hidden] { display: none; }
.profile__who { padding: 8px 10px 10px; font-weight: 600; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.profile__menu a, .profile__menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 10px; border-radius: 8px; text-align: left; }
.profile__menu a:hover, .profile__menu button:hover { background: var(--surface-2); }
.profile__menu i { width: 18px; text-align: center; color: var(--muted); }
.profile__menu .is-danger, .profile__menu .is-danger i { color: #d12f35; }
.profile__versions { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px !important; padding: 8px 10px !important; align-items: flex-start !important; font-size: 12px; color: var(--muted); line-height: 1.5; }
.profile__versions b { color: var(--text-2); }
.profile__versions i { margin-top: 3px; }
.profile__tenant { display: block; padding: 6px 10px 8px; }
.profile__tenant span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.profile__tenant select { width: 100%; height: 38px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; }

/* ---------- Conteúdo ---------- */
.page { flex: 1; padding: 12px 20px 24px; color: var(--text); }
.home { max-width: 1320px; margin-inline: auto; padding: 16px 0 32px; }
.app-footer {
    margin: 8px 24px 0; padding: 16px 0 20px; border-top: 1px solid var(--line);
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 20px;
    font-size: 12.5px; color: var(--muted);
}
.app-footer__dev strong { color: var(--text-2, var(--text)); font-weight: 600; }
.app-footer__ver {
    margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
    border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted);
    font: inherit; font-weight: 600; cursor: pointer; transition: color .15s, border-color .15s;
}
.app-footer__ver:hover { color: var(--text); border-color: var(--muted); }
@media (max-width: 600px) { .app-footer { margin: 8px 16px 0; flex-direction: column; align-items: flex-start; } .app-footer__ver { margin-left: 0; } }
.env-tag { position: relative; }
.env-tag__btn {
    display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px; border-radius: 999px;
    background: color-mix(in srgb, #e5484d 12%, var(--surface)); color: #e5484d;
    border: 1px solid color-mix(in srgb, #e5484d 35%, transparent);
    font-size: 11px; font-weight: 700; letter-spacing: .08em;
}
.env-tag__dot { width: 7px; height: 7px; border-radius: 50%; background: #e5484d; animation: env-pulse 2s infinite; }
@keyframes env-pulse { 0% { box-shadow: 0 0 0 0 rgba(229, 72, 77, .5); } 70%, 100% { box-shadow: 0 0 0 7px rgba(229, 72, 77, 0); } }
@media (prefers-reduced-motion: reduce) { .env-tag__dot { animation: none; } }
.env-tag__pop {
    position: absolute; top: calc(100% + 10px); left: 0; width: 290px; padding: 14px 16px; z-index: 40;
    background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .15s, visibility 0s .15s;
}
.env-tag:hover .env-tag__pop, .env-tag:focus-within .env-tag__pop { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.env-tag__pop strong { display: block; font-size: 13.5px; margin-bottom: 4px; }
.env-tag__pop p { font-size: 12.5px; line-height: 1.5; color: var(--muted); margin-bottom: 12px; }
.env-tag__pop button {
    width: 100%; height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 12.5px; font-weight: 600;
}
.env-tag__pop button:hover { filter: brightness(1.15); }
@media (max-width: 600px) { .env-tag__pop { position: fixed; left: 16px; right: 16px; width: auto; top: 70px; } }
.welcome { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 6px 0 26px; flex-wrap: wrap; }
.welcome__date { color: var(--accent); font-weight: 600; font-size: 13px; letter-spacing: .02em; }
.welcome__title { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.5rem); line-height: 1.1; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; }
.welcome__meta { color: var(--text-2); margin-top: 8px; }
.btn-primary {
    display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 0 16px; border-radius: 10px;
    background: var(--accent); color: var(--accent-ink) !important; font-weight: 600;
    transition: transform .12s, box-shadow .15s, filter .15s;
}
.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn-primary:active { transform: scale(.98); }
.btn-primary kbd { background: rgba(255, 255, 255, .18); border-color: transparent; color: inherit; }

.board { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.board > .panel { display: flex; flex-direction: column; min-width: 0; margin: 0; } /* Bulma .panel:not(:last-child) adiciona margin-bottom */
.board > .panel > .fav-tiles, .board > .panel > .recent { flex: 1; align-content: start; }
.panel__head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.panel__head h2, .panel__head h3 { font-size: 15px; font-weight: 700; flex: 1; }
.panel__head h2 i { color: var(--accent); margin-right: 6px; }
.link-btn { color: var(--muted); font-size: 13px; padding: 4px 8px; border-radius: 6px; }
.link-btn:hover { color: var(--text); background: var(--surface-2); }
.link-btn[hidden] { display: none; }

.fav-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.fav-tile {
    position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px; min-height: 92px;
    border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2);
    transition: transform .18s var(--ease), border-color .15s, box-shadow .18s, background .15s;
}
.fav-tile:hover { transform: translateY(-2px); border-color: var(--accent); background: var(--surface); box-shadow: var(--shadow); }
.fav-tile:active { transform: translateY(0) scale(.985); }
.fav-tile__ico { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent); }
.fav-tile__name { font-weight: 600; line-height: 1.25; padding-right: 22px; }
.fav-tile__group { font-size: 12px; color: var(--muted); }
.fav-tile .star { position: absolute; top: 8px; right: 8px; }
.empty { grid-column: 1 / -1; padding: 18px 8px; color: var(--muted); text-align: center; font-size: 14px; }
.empty i { color: var(--accent); }

.recent li a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 8px; border-radius: 9px; transition: background .15s; }
.recent li a:hover { background: var(--surface-2); }
.recent i { width: 20px; text-align: center; color: var(--accent); }
.recent small { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.recent .empty { display: block; }

.section-title { margin: 34px 0 14px !important; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
/* cartões de alturas diferentes (pelo nº de itens) encaixam-se em colunas */
.areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.area__icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: 14px; }
.count { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 2px 9px; }
.row { display: flex; align-items: center; border-radius: 8px; transition: background .15s; }
.row:hover, .row:focus-within { background: var(--surface-2); }
.row__link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 8px; }
.row__link i { width: 20px; text-align: center; color: var(--muted); transition: color .15s, transform .18s var(--ease); }
.row:hover .row__link i { color: var(--accent); transform: scale(1.12); }
.row__link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.star { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 8px; color: var(--muted); opacity: 0; transition: opacity .15s, color .15s, transform .15s; }
.row:hover .star, .row:focus-within .star, .star[aria-pressed="true"], .fav-tile .star { opacity: 1; }
.star:hover { color: #d99a06; transform: scale(1.15); }
.star[aria-pressed="true"] { color: #d99a06; }
.star.pulse i { animation: pulse .35s var(--ease); }

/* ---------- Palette ---------- */
.palette { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.palette[hidden] { display: none; }
.palette__bg { position: absolute; inset: 0; background: rgba(5, 12, 11, .55); backdrop-filter: blur(3px); animation: fade .16s linear; }
.palette__box {
    position: relative; width: min(640px, 100%); max-height: 70vh; display: flex; flex-direction: column;
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .4); animation: pop .18s var(--ease);
}
.palette__input { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 56px; border-bottom: 1px solid var(--line); color: var(--muted); }
.palette__input input:focus, .palette__input input:focus-visible { outline: 0; box-shadow: none; }
.palette__input input { flex: 1; box-shadow: none; padding: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; }
.palette__list { overflow-y: auto; padding: 8px; }
.palette__label { padding: 8px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.palette__item { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 10px; border-radius: 9px; cursor: pointer; }
.palette__item i { width: 20px; text-align: center; color: var(--muted); }
.palette__item small { margin-left: auto; color: var(--muted); font-size: 12px; }
.palette__item[aria-selected="true"] { background: var(--accent-soft); }
.palette__item[aria-selected="true"] i { color: var(--accent); }
.palette__item mark { background: transparent; color: var(--accent); font-weight: 700; }
.palette__empty { padding: 28px 12px; text-align: center; color: var(--muted); }
.palette__foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.palette__foot kbd { margin-right: 4px; }

/* ---------- Convidado ---------- */
.app--guest { align-items: center; justify-content: center; text-align: center; }
.guest { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 24px; }
.guest img { max-height: 48px; width: auto; }
.guest h1 { font-size: 2rem; letter-spacing: -.02em; }
.guest p { color: var(--text-2); }
.ghost-btn { width: 40px; height: 40px; border-radius: 10px; color: var(--muted); }
.ghost-btn:hover { background: var(--surface); }

/* ---------- Movimento ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 50% { transform: scale(1.5); } }
[data-reveal] { animation: rise .4s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 45ms); }

@media (prefers-reduced-motion: reduce) {
    .app *, .app *::before, .app *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Responsivo ---------- */
.scrim { display: none; }
@media (max-width: 1100px) {
    .board { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
    .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; height: 100%; transform: translateX(-100%); width: min(86vw, 300px) !important; visibility: hidden; transition: transform .26s var(--ease), visibility 0s .26s; }
    .app.is-open .sidebar { transform: none; visibility: visible; transition-delay: 0s; box-shadow: 0 0 60px rgba(0, 0, 0, .5); }
    .scrim { position: fixed; inset: 0; z-index: 45; background: rgba(5, 12, 11, .55); }
    .app.is-open .scrim { display: block; animation: fade .2s linear; }
    .sidebar__collapse { display: none; }
    .app.is-collapsed .brand { display: flex; }
    .app.is-collapsed .nav-item span, .app.is-collapsed .nav-group__head span, .app.is-collapsed .nav-group__chev { display: revert; }
    .app.is-collapsed .nav-group__body { display: grid; }
    .app.is-collapsed .nav-item, .app.is-collapsed .nav-group__head { justify-content: flex-start; padding: 0 12px; }
    .app.is-collapsed [data-tip]:hover::after { display: none; }
    .topbar { padding: 0 12px; }
    .topbar__menu { display: inline-grid; }
    .search { flex: none; width: 40px; padding: 0; justify-content: center; }
    .search span, .search kbd, .profile__btn span, .profile__btn > i, .btn-primary kbd { display: none; }
    .page { padding: 8px 8px 24px; }
    .home { padding-inline: 8px; }
    .areas { grid-template-columns: 1fr; }
    .fav-tiles { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .btn-primary { width: 100%; justify-content: center; }
    .palette { padding-top: 6vh; }
}

/* ==========================================================================
   Autenticação (Utilizadores/Login e entrada de convidado)
   ========================================================================== */
.guest-main:not(:has(.auth)) { padding: 24px; }
.auth { min-height: 100vh; }
.auth__brand {
    flex: 0 0 44%; max-width: 640px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
    padding: 40px 48px; background: var(--side); color: var(--side-text);
}
.auth__logo { max-height: 40px; width: auto; align-self: flex-start; }
.auth__pitch h2 { font-size: clamp(1.5rem, 1rem + 1.4vw, 2.1rem); line-height: 1.2; color: #fff; font-weight: 700; letter-spacing: -.02em; }
.auth__pitch p { margin-top: 14px; max-width: 46ch; }
.auth__quote { margin: 0; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; gap: 12px; font-size: 14px; }
.auth__quote i { color: var(--side-accent); margin-top: 3px; }
.auth__quote blockquote { margin: 0; padding: 0; border: 0; background: none; color: inherit; font-size: inherit; }
.auth__panel { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 20px; background: var(--bg); min-width: 0; }
.auth__theme { position: absolute; top: 16px; right: 16px; }
#dark-mode-icon.fa-sun { color: #d99a06; }
.auth__card { width: min(420px, 100%); }
.auth__card[hidden] { display: none; }
.auth__head { margin-bottom: 24px; }
.auth__head h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; color: var(--text); }
.auth__head p { margin-top: 6px; color: var(--text-2); }
.auth__badge { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; margin-bottom: 16px; background: var(--accent-soft); color: var(--accent); font-size: 22px; }
.auth__error { margin-bottom: 16px; padding: 12px 14px; border-radius: 10px; background: color-mix(in srgb, #e5484d 12%, var(--surface)); border: 1px solid color-mix(in srgb, #e5484d 40%, var(--line)); color: var(--text); }
.auth__error.validation-summary-valid { display: none; }
.auth__error ul { margin: 0; padding-left: 18px; list-style: disc; }
.auth__field { margin-bottom: 16px; }
.auth__field label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.auth__control { position: relative; }
.auth__control > i:first-child { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.auth__control input, .auth__control select {
    width: 100%; height: 48px; padding: 0 44px 0 42px; border-radius: 10px; border: 1px solid var(--line);
    background: var(--surface); color: var(--text); font: inherit; box-shadow: none; transition: border-color .15s, box-shadow .15s;
}
.auth__control select {
    appearance: none; -webkit-appearance: none; text-indent: 0; padding: 0 40px 0 44px !important; cursor: pointer;
    text-overflow: ellipsis; white-space: nowrap;
    background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238c98ae' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 16px center;
}
.auth__control input:hover, .auth__control select:hover { border-color: var(--muted); }
.auth__control input:focus, .auth__control select:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.auth__eye { position: absolute; right: 4px; top: 4px; width: 40px; height: 40px; border-radius: 8px; color: var(--muted); display: grid; place-items: center; }
.auth__eye:hover { background: var(--surface-2); color: var(--text); }
.auth__hint { margin-top: 6px; font-size: 12px; color: #b45309; }
.auth__hint[hidden] { display: none; }
[data-theme="dark"] .auth__hint { color: #f0b429; }

.auth__btn {
    width: 100%; height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    border-radius: 10px; font-weight: 600; border: 1px solid transparent; cursor: pointer; text-decoration: none;
    transition: transform .12s, filter .15s, background .15s, box-shadow .15s;
}
.auth__btn:active { transform: scale(.985); }
.auth__btn--primary, .auth .auth__btn--primary { background: var(--accent); color: var(--accent-ink); }
.auth__btn--primary:hover { filter: brightness(1.15); color: var(--accent-ink); }
.auth__btn--ghost, .auth .auth__btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.auth__btn--ghost:hover { background: var(--surface); border-color: var(--muted); color: var(--text); }
.auth__btn--text, .auth .auth__btn--text { background: transparent; color: var(--muted); margin-top: 8px; }
.auth__btn--text:hover { color: var(--text); background: var(--surface); }
.auth .auth__btn.is-loading { color: transparent !important; pointer-events: none; }
.auth .auth__btn.is-loading::after { border-color: transparent transparent var(--accent-ink) var(--accent-ink) !important; }
.auth .auth__btn--ghost.is-loading::after { border-color: transparent transparent var(--text) var(--text) !important; }
.auth__or { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.auth__or::before, .auth__or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.auth__code { display: flex; gap: 8px; justify-content: space-between; margin-bottom: 24px; }
.auth .two-fa-input {
    width: 100%; max-width: 56px; height: 60px; padding: 0; text-align: center; font-size: 1.5rem; font-weight: 600;
    border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); box-shadow: none;
    transition: border-color .15s, box-shadow .15s;
}
.auth .two-fa-input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

@keyframes shake { 20%, 60% { transform: translateX(10px); } 40%, 80% { transform: translateX(-10px); } 0%, 100% { transform: none; } }
.login-box { animation: shake .4s; }

/* entrada de convidado (página inicial sem sessão) */
.auth--solo { display: grid; place-items: center; background: var(--bg); padding: 24px; }
.solo { width: min(380px, 100%); display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.solo img { max-height: 44px; width: auto; }
.solo h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; }
.solo p { color: var(--text-2); }

@media (max-width: 860px) {
    .auth { flex-direction: column; }
    .auth__brand { flex: none; max-width: none; padding: 20px 24px; gap: 16px; }
    .auth__pitch, .auth__quote { display: none; }
    .auth__logo { max-height: 32px; }
    .auth__panel { align-items: flex-start; padding-top: 40px; }
    .auth__code { gap: 6px; }
}

/* Leaflet cria painéis com z-index até 1000; isolar o contentor impede que o mapa passe por cima da sidebar/topbar */
.leaflet-container { z-index: 0; }

/* ==========================================================================
   Modais (Bulma): acima da sidebar (30/50) e topbar (35), visual moderno.
   O !important sobrepõe o z-index:5 de style.css.
   ========================================================================== */
.modal {
    --m-surface: #ffffff; --m-line: #dde1e8; --m-text: #121a29; --m-muted: #5d6879;
    --m-soft: #eff1f5; --m-accent: #152031; --m-accent-ink: #ffffff;
    z-index: 100 !important;
    font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
[data-theme="dark"] .modal {
    --m-surface: #131c2b; --m-line: #25314a; --m-text: #e8edf6; --m-muted: #8c98ae;
    --m-soft: #0b1019; --m-accent: #8bb4ff; --m-accent-ink: #0b1019;
}
.modal .modal-background { background: rgba(8, 14, 24, .55); backdrop-filter: blur(6px); }
.modal.is-active .modal-card, .modal.is-active .modal-content { animation: modal-in .28s cubic-bezier(.22, 1, .36, 1); }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@media (prefers-reduced-motion: reduce) { .modal.is-active .modal-card, .modal.is-active .modal-content { animation: none; } }

.modal .modal-card {
    width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
    background: var(--m-surface); color: var(--m-text);
    border: 1px solid var(--m-line); border-radius: 20px;
    box-shadow: 0 24px 70px rgba(8, 14, 24, .35); overflow: hidden;
}
.modal .modal-card-head {
    background: var(--m-surface); border: 0; border-bottom: 1px solid var(--m-line);
    padding: 18px 24px; gap: 12px; border-radius: 0;
}
.modal .modal-card-head > .icon { color: var(--m-accent); background: var(--m-soft); width: 36px; height: 36px; border-radius: 10px; }
.modal .modal-card-title { color: var(--m-text); font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.modal .modal-card-title .icon { color: var(--m-accent); background: var(--m-soft); width: 36px; height: 36px; border-radius: 10px; }
.modal .modal-card-body { background: var(--m-surface); color: var(--m-text); padding: 24px; }
.modal .modal-card-body .label { color: var(--m-muted); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.modal .modal-card-body .textarea, .modal .modal-card-body .input, .modal .modal-card-body .select select {
    background: var(--m-soft); color: var(--m-text); border: 1px solid var(--m-line); border-radius: 12px; box-shadow: none;
}
.modal .modal-card-body .textarea:focus, .modal .modal-card-body .input:focus {
    border-color: var(--m-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--m-accent) 22%, transparent);
}
.modal .modal-card-foot {
    background: var(--m-surface); border: 0; border-top: 1px solid var(--m-line);
    padding: 16px 24px; border-radius: 0; justify-content: flex-end;
}
.modal .modal-card-foot .buttons { flex-wrap: nowrap; gap: 10px; margin: 0; flex-direction: row-reverse; }
.modal .modal-card-foot .button {
    flex: 1; margin: 0; height: 44px; font-size: .95rem; font-weight: 600; border-radius: 12px;
    background: var(--m-soft); color: var(--m-text); border: 1px solid var(--m-line);
    transition: filter .15s, transform .12s;
}
.modal .modal-card-foot .button:hover { filter: brightness(.96); }
.modal .modal-card-foot .button:active { transform: scale(.98); }
.modal .modal-card-foot .button.is-success, .modal .modal-card-foot .button.is-info {
    background: var(--m-accent); color: var(--m-accent-ink); border-color: transparent;
}
.modal .modal-card-foot .button.is-success:hover, .modal .modal-card-foot .button.is-info:hover { filter: brightness(1.15); }
.modal .modal-card-foot > .button:only-child { flex: 0 1 auto; min-width: 140px; margin-left: auto; }

/* modal do 2FA */
.modal .modal-content > .box { background: var(--m-surface); color: var(--m-text); border: 1px solid var(--m-line); border-radius: 20px; box-shadow: 0 24px 70px rgba(8, 14, 24, .35); }
.modal .modal-content .title { color: var(--m-text); }
.modal .modal-content .subtitle { color: var(--m-muted); }

@media (max-width: 600px) {
    .modal .modal-card { max-height: calc(100vh - 24px); border-radius: 16px; }
    .modal .modal-card-head, .modal .modal-card-body, .modal .modal-card-foot { padding-left: 16px; padding-right: 16px; }
}

.modal .modal-info { color: var(--m-muted); font-size: .9rem; line-height: 1.5; margin-bottom: 16px; }
.modal .modal-privacy {
    display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 10px 12px; border-radius: 12px;
    background: var(--m-soft); border: 1px solid var(--m-line); color: var(--m-muted); font-size: .8rem; line-height: 1.45;
}
.modal .modal-privacy i { color: var(--m-accent); margin-top: 2px; }

/* Sugestões e Bugs: cartões de tipo e de gravidade (sempre visíveis, cada um com a sua cor) */
.modal .sug-grupo { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
#modalSugestoes:not(:has(input[name=tipoSugestao][value=bug]:checked)) #fldGravidadeSugestao { display: none; }
.modal .sug-opcoes { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.modal .sug-tipo { grid-template-columns: 1fr 1fr; }
.modal .sug-opcao {
    --c: var(--m-accent); position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px; cursor: pointer;
    border: 1.5px solid var(--m-line); border-radius: 14px; background: var(--m-soft); color: var(--m-text);
    transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.modal .sug-opcao input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.modal .sug-opcao i { color: var(--c); font-size: 1.25rem; margin-bottom: 4px; }
.modal .sug-opcao strong { font-size: .95rem; }
.modal .sug-opcao small { color: var(--m-muted); font-size: .78rem; line-height: 1.35; }
.modal .sug-opcao:hover { border-color: var(--c); }
.modal .sug-opcao:has(input:checked) {
    border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--m-surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent);
}
.modal .sug-opcao:has(input:focus-visible) { outline: 2px solid var(--c); outline-offset: 2px; }
.modal .sug-gravidade .sug-opcao { border-left: 5px solid var(--c); }
.modal .sug-bug, .modal .sug-alta { --c: #d73a4a; }
.modal .sug-media { --c: #c77700; }
.modal .sug-melhoria { --c: #1f7ae0; }
.modal .sug-baixa { --c: #2e9d5b; }
@media (max-width: 480px) { .modal .sug-gravidade { grid-template-columns: 1fr; } }

/* Sugestões e Bugs: anexos (zona de largar, botões e lista com miniaturas) */
.modal .sug-anexos { margin-top: 16px; }
.modal .sug-anexos-info { color: var(--m-muted); font-weight: 400; margin-left: 6px; }
.modal .sug-drop {
    display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px; text-align: center; color: var(--m-muted); font-size: .85rem;
    border: 1.5px dashed var(--m-line); border-radius: 14px; background: var(--m-soft); transition: border-color .15s, background-color .15s;
}
.modal .sug-drop > i { color: var(--m-accent); font-size: 1.5rem; }
.modal .sug-drop .buttons { margin: 4px 0 0; }
.modal .sug-drop.is-dragover { border-color: var(--m-accent); background: color-mix(in srgb, var(--m-accent) 10%, var(--m-surface)); }
.modal .sug-lista { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.modal .sug-anexo {
    display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border: 1px solid var(--m-line); border-radius: 12px;
    background: var(--m-surface); color: var(--m-text); font-size: .85rem;
}
.modal .sug-anexo-thumb { width: 40px; height: 40px; flex: none; border-radius: 8px; object-fit: cover; background: var(--m-soft); }
.modal i.sug-anexo-thumb { display: grid; place-items: center; color: var(--m-muted); font-size: 1.2rem; }
.modal .sug-anexo-nome { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal .sug-anexo small { color: var(--m-muted); flex: none; }

/* ==========================================================================
   Versões: splash "O que há de novo" e histórico (versoes_v1.js, <dialog id="dlgVersoes">)
   ========================================================================== */
.ver {
    --v-surface: #ffffff; --v-surface-2: #f5f6f9; --v-line: #dde1e8; --v-text: #121a29; --v-muted: #5d6879;
    --v-accent: #1f4fd8; --v-accent-ink: #ffffff; --v-accent-soft: #e8eefc;
    --v-nov: #0f7b4b; --v-nov-bg: #e3f4ec; --v-mel: #1f4fd8; --v-mel-bg: #e8eefc; --v-cor: #a35a00; --v-cor-bg: #fdf0dc;
    --v-ease: cubic-bezier(.22, 1, .36, 1); color-scheme: light;
    width: min(94vw, 680px); max-height: min(88vh, 820px); padding: 0; border: 1px solid var(--v-line); border-radius: 20px;
    background: var(--v-surface); color: var(--v-text); overflow: hidden;
    box-shadow: 0 24px 64px rgba(10, 20, 40, .28);
    font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif; font-size: 15px; line-height: 1.5;
}
[data-theme="dark"] .ver {
    color-scheme: dark;
    --v-surface: #131c2b; --v-surface-2: #1a2538; --v-line: #25314a; --v-text: #e8edf6; --v-muted: #8c98ae;
    --v-accent: #8bb4ff; --v-accent-ink: #0b1019; --v-accent-soft: rgba(139, 180, 255, .14);
    --v-nov: #5fd9a0; --v-nov-bg: rgba(95, 217, 160, .12); --v-mel: #8bb4ff; --v-mel-bg: rgba(139, 180, 255, .14); --v-cor: #f2b35c; --v-cor-bg: rgba(242, 179, 92, .13);
    box-shadow: 0 24px 64px rgba(0, 0, 0, .6);
}
.ver[open] { display: flex; flex-direction: column; animation: ver-in .45s var(--v-ease); }
.ver::backdrop { background: rgba(8, 14, 26, .55); backdrop-filter: blur(6px); }
.ver[open]::backdrop { animation: ver-fade .3s ease; }
.ver *, .ver *::before, .ver *::after { box-sizing: border-box; }
.ver h2, .ver h3, .ver p, .ver ul { margin: 0; padding: 0; }

.ver__hero {
    padding: 32px 32px 24px; flex: none;
    background: radial-gradient(120% 140% at 0% 0%, var(--v-accent-soft), transparent 70%), var(--v-surface);
    border-bottom: 1px solid var(--v-line);
}
.ver__chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px; margin-bottom: 14px;
    background: var(--v-accent); color: var(--v-accent-ink); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.ver__hero h2 { font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -.01em; }
.ver__meta { margin-top: 6px; color: var(--v-muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.ver__notas { margin-top: 14px; color: var(--v-text); opacity: .86; }
.ver__notas p + p, .ver__notas ul { margin-top: 6px; }
.ver__notas ul { padding-left: 20px; list-style: disc; }

.ver__corpo { padding: 8px 32px 16px; overflow-y: auto; flex: 1 1 auto; }
.ver__sec { padding: 16px 0 4px; }
.ver__sec h3 { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.ver__sec h3 i {
    display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; font-size: 13px;
    color: var(--c); background: var(--cb);
}
.ver__sec h3 span { margin-left: auto; min-width: 22px; padding: 0 7px; text-align: center; border-radius: 999px; background: var(--v-surface-2); color: var(--v-muted); font-size: 12px; }
.ver__sec--novidade { --c: var(--v-nov); --cb: var(--v-nov-bg); }
.ver__sec--melhoria { --c: var(--v-mel); --cb: var(--v-mel-bg); }
.ver__sec--correcao { --c: var(--v-cor); --cb: var(--v-cor-bg); }
.ver__lista { list-style: none; margin-top: 10px !important; }
.ver__lista li { position: relative; padding: 7px 0 7px 22px; border-top: 1px solid var(--v-line); }
.ver__lista li:first-child { border-top: 0; }
.ver__lista li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.ver__ambito { margin-left: 8px; color: var(--v-muted); font-size: 12px; white-space: nowrap; }
.ver__ambito::before { content: "· "; }
.ver__vazio { padding: 24px 0; color: var(--v-muted); }

.ver__pe { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 32px 20px; border-top: 1px solid var(--v-line); background: var(--v-surface); flex: none; }
.ver__btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 20px; border-radius: 12px;
    border: 1px solid var(--v-line); background: var(--v-surface-2); color: var(--v-text); font: inherit; font-weight: 600; cursor: pointer;
    transition: transform .2s var(--v-ease), border-color .2s, background .2s;
}
.ver__btn:hover { border-color: var(--v-muted); }
.ver__btn:active { transform: scale(.97); }
.ver__btn--p { background: var(--v-accent); border-color: var(--v-accent); color: var(--v-accent-ink); }
.ver__btn--p:hover { filter: brightness(1.08); }
.ver__btn:focus-visible, .ver__ver summary:focus-visible { outline: 2px solid var(--v-accent); outline-offset: 2px; }

/* histórico: linha temporal */
.ver__topo { display: flex; align-items: center; gap: 12px; padding: 22px 32px 18px; border-bottom: 1px solid var(--v-line); flex: none; }
.ver__topo h2 { font-size: 20px; font-weight: 700; flex: 1; }
.ver__x { width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: var(--v-muted); font-size: 16px; cursor: pointer; }
.ver__x:hover { background: var(--v-surface-2); color: var(--v-text); }
.ver__linha { list-style: none; position: relative; margin: 8px 0 0 !important; }
.ver__linha::before { content: ""; position: absolute; left: 6px; top: 14px; bottom: 14px; width: 2px; background: var(--v-line); }
.ver__item { position: relative; padding: 10px 0 10px 32px; }
.ver__item::before { content: ""; position: absolute; left: 0; top: 20px; width: 14px; height: 14px; border-radius: 50%; background: var(--v-surface); border: 3px solid var(--v-muted); }
.ver__item:first-child::before { border-color: var(--v-accent); background: var(--v-accent); box-shadow: 0 0 0 5px var(--v-accent-soft); }
.ver__ver > summary { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; cursor: pointer; padding: 6px 0; }
.ver__ver > summary::-webkit-details-marker { display: none; }
.ver__ver > summary::after { content: "\f078"; font-family: "Font Awesome 6 Free", "Font Awesome 5 Free"; font-weight: 900; margin-left: auto; font-size: 11px; color: var(--v-muted); transition: transform .25s var(--v-ease); }
.ver__ver[open] > summary::after { transform: rotate(180deg); }
.ver__nome { font-weight: 700; font-variant-numeric: tabular-nums; }
.ver__data { color: var(--v-muted); font-size: 13px; }
.ver__badge { padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--c); background: var(--cb); }
.ver__badge--novidade { --c: var(--v-nov); --cb: var(--v-nov-bg); }
.ver__badge--melhoria { --c: var(--v-mel); --cb: var(--v-mel-bg); }
.ver__badge--correcao { --c: var(--v-cor); --cb: var(--v-cor-bg); }
.ver__atual { padding: 0 8px; border-radius: 999px; background: var(--v-accent); color: var(--v-accent-ink); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.ver__det { padding: 4px 0 8px; }
.ver__tec { margin-top: 14px; font-size: 13px; color: var(--v-muted); }
.ver__tec summary { cursor: pointer; }
.ver__tec li { padding: 3px 0; }
.ver__tec ul { list-style: none; margin-top: 6px !important; }

.ver[open] .ver__hero > *, .ver[open] .ver__sec { animation: ver-up .5s var(--v-ease) backwards; }
.ver[open] .ver__hero > :nth-child(2) { animation-delay: .05s; }
.ver[open] .ver__hero > :nth-child(3) { animation-delay: .1s; }
.ver[open] .ver__hero > :nth-child(4) { animation-delay: .15s; }
.ver[open] .ver__sec:nth-child(1) { animation-delay: .15s; }
.ver[open] .ver__sec:nth-child(2) { animation-delay: .22s; }
.ver[open] .ver__sec:nth-child(3) { animation-delay: .29s; }
@keyframes ver-in { from { opacity: 0; transform: translateY(16px) scale(.97); } }
@keyframes ver-fade { from { opacity: 0; } }
@keyframes ver-up { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .ver[open], .ver[open]::backdrop, .ver[open] * { animation: none !important; } }

@media (max-width: 640px) {
    .ver { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 20px 20px 0 0; border-bottom: 0; }
    .ver__hero, .ver__topo { padding-left: 20px; padding-right: 20px; }
    .ver__corpo { padding-left: 20px; padding-right: 20px; }
    .ver__pe { padding: 14px 20px calc(16px + env(safe-area-inset-bottom)); }
    .ver__pe .ver__btn { flex: 1; }
    .ver__hero h2 { font-size: 24px; }
}
.ver__mais { margin-top: 4px !important; padding-left: 22px; color: var(--v-muted); font-size: 13px; }
.ver code { color: inherit; padding: 1px 6px; border-radius: 6px; background: var(--v-surface-2); font-size: .9em; }
