/*
 * SIMM.Packager — visual da aplicação, a partir do manual da marca SIMM.PRO (public/docs).
 *
 * Base azul-escuro #11122E com superfícies em branco translúcido; laranja #FF6600 só na ação
 * principal, no foco e no item ativo; degradê oficial #FFE90B → #E63A17 só em detalhes
 * (barra de progresso, anel do código 2FA, filete do login); fonte Barlow.
 * Botão laranja leva texto azul-escuro: branco sobre o laranja dá 2,9:1 e não passa em contraste.
 */

/* ===== Fonte da marca (servida pelo próprio app; licença em /fonts/barlow/OFL.txt) ===== */
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/barlow/barlow-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/barlow/barlow-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/barlow/barlow-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/barlow/barlow-latin-700-normal.woff2') format('woff2'); }

/* ===== Tokens ===== */
:root {
    --navy: #11122E;
    --bg-deep: #0C0D24;
    --bg: #11122E;
    --surface: #171833;
    --surface-2: #1D1E39;
    --surface-3: #24253F;
    --line: rgba(255, 255, 255, .08);
    --line-2: rgba(255, 255, 255, .14);
    --text: #F4F5FA;
    --text-2: #B6B8CC;
    --text-3: #8A8CA6;
    --orange: #FF6600;
    --orange-hover: #FF7B24;
    --orange-text: #FF8A3D;
    --orange-soft: rgba(255, 102, 0, .12);
    --orange-line: rgba(255, 102, 0, .38);
    --grad: linear-gradient(90deg, #FFE90B 0%, #E63A17 100%);
    --amber: #F5B83D;
    --amber-soft: rgba(245, 184, 61, .13);
    --green: #3DD68C;
    --green-soft: rgba(61, 214, 140, .12);
    --red: #FF6B6B;
    --red-text: #FF8F8F;
    --red-soft: rgba(255, 107, 107, .12);
    --r-sm: 6px;
    --r: 8px;
    --r-lg: 12px;
    --r-xl: 16px;
    --font: 'Barlow', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mono: ui-monospace, 'Cascadia Code', 'SF Mono', Consolas, monospace;
    --shadow-lg: 0 24px 64px rgba(0, 0, 0, .5);
    color-scheme: dark;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; color: var(--text); }
p { margin: 0; }
b, strong { font-weight: 600; }
a { color: var(--orange-text); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
code { font-family: var(--mono); font-size: .9em; padding: 1px 5px; border-radius: 4px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); color: var(--text); }
pre { margin: 0; font-family: inherit; white-space: pre-wrap; word-break: break-word; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
[hidden] { display: none !important; }
::selection { background: rgba(255, 102, 0, .35); }

/* Ícones de traço (sprite em views/partials/icons.ejs) */
svg.i { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; display: block; }
svg.i.sm { width: 14px; height: 14px; }
svg.i.lg { width: 20px; height: 20px; }
svg.i.xl { width: 26px; height: 26px; stroke-width: 1.6; }

/* ===== Utilitários ===== */
.cap { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); font-weight: 600; }
.muted { color: var(--text-2); }
.subtle { color: var(--text-3); }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
.dot { color: var(--text-3); margin: 0 1px; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }

/* ===== Layout: barra lateral + conteúdo ===== */
.app { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
/* Fundo da coluna da barra lateral até o fim de páginas longas (a barra em si fica presa no topo) */
.app { background: linear-gradient(90deg, var(--bg-deep) 0 239px, rgba(255, 255, 255, .08) 239px 240px, transparent 240px); }
.side {
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
    display: flex; flex-direction: column; gap: 24px;
    padding: 22px 12px 14px;
    background: var(--bg-deep);
    border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 10px 4px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img { height: 21px; width: auto; display: block; }
.brand .app-name { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); font-weight: 600; border-left: 1px solid var(--line-2); padding-left: 10px; line-height: 14px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav .cap { padding: 0 10px 6px; }
.nav a {
    display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px;
    border-radius: var(--r); color: var(--text-2); font-weight: 500; position: relative; white-space: nowrap;
}
.nav a:hover { background: rgba(255, 255, 255, .04); color: var(--text); text-decoration: none; }
.nav a.on { background: rgba(255, 255, 255, .06); color: var(--text); }
.nav a.on::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--orange); }
.nav a.on svg { color: var(--orange-text); }
.nav .count { margin-left: auto; font-size: 11.5px; font-weight: 600; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--orange-soft); color: var(--orange-text); display: grid; place-items: center; }
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--r-lg); border: 1px solid var(--line); background: rgba(255, 255, 255, .025); }
.me .who { min-width: 0; flex: 1; }
.me .who b { display: block; font-size: 13px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who span { font-size: 12px; color: var(--text-3); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: #2B2D57; color: #DFE0F3; flex: none; overflow: hidden; object-fit: cover; }
.avatar.xs { width: 20px; height: 20px; font-size: 9.5px; }
.avatar.lg { width: 40px; height: 40px; font-size: 15px; }
img.avatar { display: block; }

.main { min-width: 0; padding: 32px 40px 56px; }
.page { width: 100%; max-width: 1160px; margin: 0 auto; }
.page.narrow { max-width: 880px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { font-size: 27px; font-weight: 600; line-height: 1.15; }
.page-head p { margin-top: 6px; color: var(--text-2); max-width: 680px; }
.page-head .actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.section-head { display: flex; align-items: baseline; gap: 10px; margin: 28px 0 6px; }
.section-head h2 { font-size: 17px; }
.section-desc { color: var(--text-2); font-size: 13.5px; max-width: 720px; margin-bottom: 14px; }

/* Página sem login (erro antes de entrar): só o logo e o conteúdo */
.bare { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 48px 20px; }
.bare .brand { margin-bottom: 36px; }
.bare .bare-main { width: 100%; max-width: 560px; }
.bare .page { max-width: 560px; }

/* ===== Botões ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 36px; padding: 0 15px; border-radius: var(--r);
    font-family: inherit; font-weight: 600; font-size: 13.5px; line-height: 1; letter-spacing: .01em;
    border: 1px solid transparent; cursor: pointer; white-space: nowrap; text-decoration: none;
    transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--orange); color: var(--navy); }
.btn-primary:hover { background: var(--orange-hover); }
.btn-secondary { background: rgba(255, 255, 255, .05); border-color: var(--line-2); color: var(--text); }
.btn-secondary:hover { background: rgba(255, 255, 255, .09); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.btn-danger { background: var(--red-soft); border-color: rgba(255, 107, 107, .42); color: var(--red-text); }
.btn-danger:hover { background: #D93A3A; border-color: #D93A3A; color: #fff; }
.btn-sm { height: 30px; padding: 0 11px; font-size: 12.5px; gap: 6px; }
.btn-lg { height: 42px; padding: 0 20px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn .spin { width: 14px; height: 14px; border-width: 2px; }
.btn-primary .spin { border-color: rgba(17, 18, 46, .25); border-top-color: var(--navy); }
.icon-btn { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: var(--r); color: var(--text-2); border: 1px solid transparent; background: transparent; cursor: pointer; padding: 0; flex: none; }
.icon-btn:hover { background: rgba(255, 255, 255, .06); color: var(--text); text-decoration: none; }
.icon-btn.sm { width: 28px; height: 28px; }
.icon-btn.bordered { border-color: var(--line-2); }
.icon-btn.danger:hover { background: var(--red-soft); color: var(--red); }
.icon-btn[disabled] { opacity: .4; cursor: not-allowed; }

/* ===== Campos ===== */
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.label { font-size: 13px; font-weight: 500; color: var(--text); display: flex; align-items: center; gap: 6px; }
.label .req { color: var(--orange-text); }
.label .opt { color: var(--text-3); font-weight: 400; }
.label .label-aside { margin-left: auto; }
.hint { font-size: 12.5px; color: var(--text-3); }
.input, .textarea, .select {
    width: 100%; background: var(--bg-deep); border: 1px solid var(--line-2); border-radius: var(--r);
    color: var(--text); font-family: inherit; font-size: 14px; line-height: 1.5; padding: 8px 12px; outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.input, .select { height: 38px; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); opacity: 1; }
.textarea { min-height: 112px; resize: vertical; display: block; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 102, 0, .22); }
.input.is-error, .textarea.is-error { border-color: rgba(255, 107, 107, .65); box-shadow: 0 0 0 3px rgba(255, 107, 107, .14); }
.select {
    appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 34px; color: var(--text);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A8CA6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
}
.select option { background: var(--surface-3); color: var(--text); }
.search { position: relative; flex: 1; min-width: 200px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.search .input { padding-left: 36px; }
.search .search-count { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--text-3); pointer-events: none; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }

/* Mensagem ligada a um campo (changelog encontrado, versão faltando...) */
.field-msg { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; line-height: 1.45; color: var(--text-2); }
.field-msg svg { margin-top: 1px; color: var(--text-3); }
.field-msg.ok { color: #9BE6C0; }
.field-msg.ok svg { color: var(--green); }
.field-msg.err { color: var(--red-text); }
.field-msg.err svg { color: var(--red); }
.field-msg .spin { width: 13px; height: 13px; margin-top: 2px; }

/* Caixas de seleção em forma de chip (versões do SIMM.HUB) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-check { position: relative; display: inline-flex; }
.chip-check input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.chip-check span {
    display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px 0 11px;
    border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03);
    color: var(--text-2); font-size: 13px; font-weight: 500; user-select: none; transition: background .15s, border-color .15s, color .15s;
}
.chip-check span::before { content: ''; width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid var(--text-3); flex: none; }
.chip-check:hover span { border-color: rgba(255, 255, 255, .24); color: var(--text); }
.chip-check input:checked + span { color: var(--orange-text); background: var(--orange-soft); border-color: var(--orange-line); }
.chip-check input:checked + span::before {
    border-color: var(--orange);
    background: var(--orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2311122E' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 10px no-repeat;
}
.chip-check input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }

/* Interruptor (notificações dos supervisores) */
.switch { position: relative; display: inline-block; width: 36px; height: 20px; flex: none; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 10px; background: rgba(255, 255, 255, .16); transition: background .2s; }
.switch span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:disabled { cursor: wait; }
.switch input:disabled + span { opacity: .55; }
.switch input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }

/* ===== Controle segmentado (abas e filtros) ===== */
.seg { display: inline-flex; flex-wrap: wrap; padding: 3px; border-radius: 10px; background: rgba(255, 255, 255, .035); border: 1px solid var(--line); gap: 2px; }
.seg button { height: 30px; padding: 0 12px; border-radius: 7px; border: 0; background: transparent; color: var(--text-2); font-weight: 500; font-size: 13px; display: inline-flex; align-items: center; gap: 7px; cursor: pointer; white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button.on, .seg button.active { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .35), inset 0 0 0 1px var(--line); }
.seg .n { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.seg button.on .n, .seg button.active .n { color: var(--orange-text); }
.seg.full { display: flex; width: 100%; }
.seg.full button { flex: 1; justify-content: center; height: 34px; }

/* ===== Status, versões, chips ===== */
.status { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.s-pending { color: var(--amber); background: var(--amber-soft); }
.s-ok { color: var(--green); background: var(--green-soft); }
.s-no { color: var(--red); background: var(--red-soft); }
.s-run { color: var(--orange-text); background: var(--orange-soft); }
.s-run::before { animation: pulse 1.2s ease-in-out infinite; }
.s-muted { color: var(--text-2); background: rgba(255, 255, 255, .06); }
@keyframes pulse { 50% { opacity: .25; } }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: var(--r-sm); font-family: var(--mono); font-size: 12px; font-weight: 500; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); color: var(--text); white-space: nowrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--text-2); background: rgba(255, 255, 255, .04); border: 1px solid var(--line); white-space: nowrap; }
button.chip { cursor: pointer; font-family: inherit; }
button.chip:hover { color: var(--text); }
.chip.on { color: var(--orange-text); background: var(--orange-soft); border-color: var(--orange-line); }
.chip .n { color: var(--text-3); font-variant-numeric: tabular-nums; }
.chip.on .n { color: var(--orange-text); }
.pill-count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 10px; font-size: 11.5px; font-weight: 600; background: rgba(255, 255, 255, .07); color: var(--text-2); font-variant-numeric: tabular-nums; }
.latest { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--green); white-space: nowrap; }
.latest::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

/* ===== Cartões ===== */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.card-pad { padding: 22px 24px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.card-head h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.card-head .aside { font-size: 12.5px; color: var(--text-3); }
.card-foot { display: flex; align-items: flex-start; gap: 9px; padding: 12px 20px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--text-3); }
.card-foot svg { margin-top: 1px; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.kpi { padding: 16px 18px; }
.kpi-num { font-size: 30px; font-weight: 700; line-height: 1.1; margin: 6px 0 6px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi-sub { font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; min-height: 19px; }
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .select { width: auto; min-width: 170px; }
.refresh { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-3); }

/* ===== Tabelas ===== */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); font-weight: 600; padding: 11px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(255, 255, 255, .02); }
.table .r { text-align: right; }
.table .empty-row { text-align: center; color: var(--text-3); padding: 28px 16px; }
.user-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.user-cell > div > b { display: block; font-size: 14px; font-weight: 600; }
.user-cell > div > span { display: block; font-size: 12.5px; color: var(--text-3); }

/* ===== Estados: vazio, alerta ===== */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 46px 20px; color: var(--text-2); }
.empty .empty-ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); color: var(--text-3); margin-bottom: 6px; }
.empty b { color: var(--text); font-size: 15px; }
.empty p { max-width: 420px; font-size: 13.5px; }
.empty .btn { margin-top: 10px; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-lg); border: 1px solid var(--line-2); background: var(--surface-2); font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.alert .alert-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; background: rgba(255, 255, 255, .06); color: var(--text-2); }
.alert .alert-body { flex: 1; min-width: 0; word-break: break-word; }
.alert .alert-body > b { display: block; color: var(--text); font-size: 14px; margin-bottom: 2px; }
.alert .alert-body p + p, .alert .alert-body p + ul, .alert .alert-body ul + p { margin-top: 6px; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.alert a { color: var(--orange-text); font-weight: 600; }
.alert .alert-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.alert-success { border-color: rgba(61, 214, 140, .3); background: rgba(61, 214, 140, .07); }
.alert-success .alert-ic { background: var(--green-soft); color: var(--green); }
.alert-error { border-color: rgba(255, 107, 107, .32); background: rgba(255, 107, 107, .07); }
.alert-error .alert-ic { background: var(--red-soft); color: var(--red); }
.alert-warning { border-color: rgba(245, 184, 61, .32); background: rgba(245, 184, 61, .07); }
.alert-warning .alert-ic { background: var(--amber-soft); color: var(--amber); }

/* ===== Progresso ===== */
.bar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: inherit; transition: width .25s ease; }
.bar.indet > i { width: 35% !important; animation: indet 1.6s ease-in-out infinite; }
@keyframes indet { 0% { transform: translateX(-110%); } 100% { transform: translateX(300%); } }
.spin { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 138, 61, .25); border-top-color: var(--orange-text); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Etapas do processamento do build (eventos do servidor por SSE) */
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; position: relative; padding-bottom: 15px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before { content: ''; position: absolute; left: 10.5px; top: 24px; bottom: 2px; width: 1px; background: var(--line-2); }
.steps li:last-child::before { display: none; }
.steps li.done::before { background: rgba(61, 214, 140, .45); }
.steps .mk { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line-2); background: var(--bg-deep); color: transparent; }
.steps .mk .spin { display: none; width: 12px; height: 12px; border-width: 1.5px; }
.steps li.done .mk { background: var(--green-soft); border-color: rgba(61, 214, 140, .55); color: var(--green); }
.steps li.now .mk { border-color: rgba(255, 138, 61, .5); background: var(--orange-soft); }
.steps li.now .mk .spin { display: block; }
.steps li.now .mk svg { display: none; }
.steps li.fail .mk { background: var(--red-soft); border-color: rgba(255, 107, 107, .6); color: var(--red); }
.steps .st-t { display: block; font-size: 13.5px; font-weight: 600; line-height: 22px; }
.steps li:not(.done):not(.now):not(.fail) .st-t { color: var(--text-3); font-weight: 500; }
.steps .st-d { display: block; font-size: 12.5px; color: var(--text-3); line-height: 1.4; word-break: break-word; }
.steps li.fail .st-d { color: var(--red-text); }
.steps .bar { margin-top: 9px; }

/* ===== Área de soltar arquivo ===== */
.dropzone { position: relative; display: block; border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); background: rgba(255, 255, 255, .02); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover { border-color: rgba(255, 255, 255, .26); background: rgba(255, 255, 255, .035); }
.dropzone.dragover { border-color: var(--orange); background: var(--orange-soft); }
.dropzone.has-file { border-style: solid; border-color: rgba(61, 214, 140, .35); background: rgba(61, 214, 140, .06); }
.dz-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 30px 20px; text-align: center; color: var(--text-2); }
.dz-empty .dz-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); color: var(--text-2); margin-bottom: 8px; }
.dz-empty b { color: var(--text); font-weight: 600; }
.dz-empty small { color: var(--text-3); font-size: 12.5px; }
.dz-file { display: flex; align-items: center; gap: 14px; padding: 14px 14px 14px 16px; }
.dz-file .file-ic { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); color: var(--text); flex: none; }
.dz-file .meta { flex: 1; min-width: 0; }
.dz-file .meta b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dz-file .meta .sub { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); margin-top: 3px; }
.dz-file .meta .sub .ok { color: var(--green); }
.dz-file .meta .sub .warn { color: var(--amber); }
.dropzone.compact .dz-empty { flex-direction: row; gap: 12px; padding: 16px 18px; }
.dropzone.compact .dz-empty .dz-ic { margin-bottom: 0; width: 38px; height: 38px; }

/* ===== Modais da página ===== */
.overlay { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(6, 7, 22, .68); backdrop-filter: blur(3px); }
.overlay.show, .overlay.active { display: flex; }
.modal { position: relative; width: 100%; max-width: 460px; max-height: calc(100vh - 40px); overflow: auto; background: var(--surface-3); border: 1px solid var(--line-2); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); }
.modal.wide { max-width: 540px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 14px; }
.modal-head h3 { font-size: 17px; }
.modal-head .sub { margin-top: 3px; color: var(--text-2); font-size: 13px; }
.modal-head .who { display: flex; gap: 12px; align-items: center; min-width: 0; }
.modal-head .who > div > b { display: block; font-size: 15.5px; word-break: break-all; }
.modal-head .who > div > span { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 1px; }
.modal-body { padding: 0 22px 20px; display: flex; flex-direction: column; gap: 14px; }
.modal-body p { color: var(--text-2); font-size: 13.5px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); background: rgba(0, 0, 0, .14); }
.modal-note { display: flex; align-items: center; gap: 9px; padding: 13px 22px; border-top: 1px solid var(--line); background: rgba(0, 0, 0, .14); font-size: 12.5px; color: var(--text-3); }

/* Credenciais (Acessos e Cofre de acessos) */
.cval { display: flex; align-items: center; gap: 4px; height: 40px; padding: 0 4px 0 12px; border-radius: var(--r); background: var(--bg-deep); border: 1px solid var(--line-2); }
.cval .t { flex: 1; min-width: 0; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cval .t.masked { letter-spacing: .16em; color: var(--text-2); }
.cval .icon-btn { width: 30px; height: 30px; }
.otp { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--bg-deep); border: 1px solid var(--line-2); cursor: pointer; transition: border-color .15s; }
.otp:hover { border-color: rgba(255, 255, 255, .26); }
.otp .code { flex: 1; font-family: var(--mono); font-size: 30px; font-weight: 600; letter-spacing: .08em; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.ring { position: relative; width: 46px; height: 46px; flex: none; }
.ring svg { width: 46px; height: 46px; transform: rotate(-90deg); display: block; }
.ring .ring-arc { transition: stroke-dashoffset .9s linear; }
.ring .secs { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12.5px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.ring.warn .secs { color: var(--red-text); }
.ring.warn .ring-arc { stroke: var(--red); }
.otp-hint { display: flex; justify-content: space-between; gap: 10px; margin-top: 7px; font-size: 12px; color: var(--text-3); }

/* ===== Fila de builds (Aprovações e Serviços) ===== */
.queue { overflow: hidden; }
.q-row { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; column-gap: 14px; row-gap: 14px; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.q-row:last-child { border-bottom: 0; }
.q-row.expandable { cursor: pointer; }
.q-row.expandable:hover { background: rgba(255, 255, 255, .018); }
.q-row.open { background: rgba(255, 255, 255, .028); }
.tile { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); font-weight: 700; font-size: 12.5px; color: var(--text-2); letter-spacing: .03em; }
.q-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.q-title b { font-size: 15px; }
.q-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 5px; color: var(--text-3); font-size: 13px; }
.q-meta .who { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.q-meta .hub { display: inline-flex; align-items: center; gap: 5px; }
.q-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.q-row .chev { transition: transform .2s; }
.q-row.open .chev { transform: rotate(180deg); }
.q-detail { grid-column: 2 / -1; display: none; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 30px; padding: 2px 0 4px; cursor: default; }
.q-row.open .q-detail { display: grid; }
.q-detail.single { grid-template-columns: minmax(0, 1fr); }
.q-note { grid-column: 2 / -1; display: flex; gap: 9px; align-items: flex-start; font-size: 13px; color: var(--text-2); margin-top: -4px; }
.q-note svg { margin-top: 2px; color: var(--text-3); }
.q-note.no { color: var(--red-text); }
.q-note.no svg { color: var(--red); }
.changelog { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 7px; }
/* Changelog de build com rolagem própria (há changelogs de 250 mil caracteres em produção) */
.q-detail .changelog { max-height: 300px; overflow-y: auto; padding-right: 10px; align-content: start; overscroll-behavior: contain; }
.changelog li { display: flex; gap: 10px; color: var(--text-2); word-break: break-word; }
.changelog li::before { content: ''; width: 6px; height: 6px; margin-top: 8px; border-radius: 1px; transform: rotate(45deg); background: var(--orange-text); flex: none; }
.files-list { display: grid; gap: 8px; margin-top: 10px; }
.file-row { display: flex; align-items: center; gap: 11px; padding: 9px 10px 9px 12px; border: 1px solid var(--line); border-radius: var(--r); background: rgba(0, 0, 0, .14); color: var(--text); }
.file-row:hover { text-decoration: none; border-color: var(--line-2); }
.file-row .meta { flex: 1; min-width: 0; }
.file-row .meta b { display: block; font-size: 13px; }
.file-row .meta span { font-size: 12px; color: var(--text-3); }
.file-row > svg { color: var(--text-3); }
.dest { display: flex; align-items: flex-start; gap: 9px; color: var(--text-2); font-size: 13px; margin-top: 9px; }
.dest svg { color: var(--text-3); margin-top: 2px; }
.dest .path { font-family: var(--mono); font-size: 12px; color: var(--text); word-break: break-word; }
.q-row > .bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 0; }

/* ===== Novo build ===== */
.build-grid { display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.prot { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-2); }
.prot svg { color: var(--green); }
.how { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.how li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; }
.how .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); color: var(--text-2); }
.how b { display: block; font-size: 13.5px; }
.how span { display: block; font-size: 12.5px; color: var(--text-3); }
.mine .r { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.mine .r:last-child { border-bottom: 0; }
.mine .r .t { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mine .r .t b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mine .r .s { grid-column: 1 / -1; font-size: 12.5px; color: var(--text-3); word-break: break-word; }
.mine .r .s.no { color: var(--red-text); }
.mine .none { padding: 18px 20px; font-size: 13px; color: var(--text-3); }
/* Versões do SIMM.HUB compatíveis: uma grade compacta só com o nome; a descrição aparece embaixo, nas marcadas */
.hub-links { display: flex; gap: 14px; }
.hub-links[hidden] { display: none; }
.hub-links button { padding: 0; border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--orange-text); cursor: pointer; }
.hub-links button:hover { text-decoration: underline; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.hub-grid .skel { height: 42px; border-radius: var(--r); }
.hub-grid .search { grid-column: 1 / -1; max-width: none; }
.hub-tile { position: relative; display: flex; align-items: center; gap: 9px; min-width: 0; height: 42px; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--line-2); background: rgba(255, 255, 255, .025); cursor: pointer; transition: background .15s, border-color .15s; }
.hub-tile:hover { border-color: rgba(255, 255, 255, .24); }
.hub-tile[hidden] { display: none; }
.hub-tile input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.hub-tile .box { width: 15px; height: 15px; flex: none; display: grid; place-items: center; border-radius: 4px; border: 1.5px solid var(--text-3); transition: background .15s, border-color .15s; }
.hub-tile input:focus-visible ~ .box { outline: 2px solid var(--orange); outline-offset: 2px; }
.hub-tile .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 600; color: var(--text); }
.hub-tile .cur, .hub-chosen .cur { flex: none; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--green); }
.hub-tile .cur { margin-left: auto; }
.hub-tile .xp { flex: none; display: grid; place-items: center; margin-left: auto; color: var(--text-3); }
.hub-tile .xp ~ .cur { margin-left: 0; }
.hub-tile.on .xp { color: var(--orange-text); }
.hub-chosen li .badge { flex: none; }
.hub-tile.on { background: var(--orange-soft); border-color: var(--orange-line); }
.hub-tile.on .box { background: var(--orange); border-color: var(--orange); }
.hub-tile.on .box::after { content: ''; width: 7px; height: 3px; margin-top: -2px; border: 2px solid var(--navy); border-top: 0; border-right: 0; transform: rotate(-45deg); }
.hub-tile.on .nm { color: var(--orange-text); }
.hub-tile.old { border-style: dashed; }
.hub-tile.old .nm { font-weight: 500; color: var(--text-2); }
.hub-old-tiles { display: contents; }
.hub-old-tiles[hidden] { display: none; }
.hub-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 42px; padding: 0 12px; border-radius: var(--r); border: 1px dashed var(--line-2); background: transparent; font: inherit; font-size: 13px; color: var(--text-2); cursor: pointer; }
.hub-toggle:hover { color: var(--text); border-color: rgba(255, 255, 255, .24); }
.hub-empty { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding: 10px 0; font-size: 13px; color: var(--text-3); }
.hub-chosen { margin-top: 10px; font-size: 13px; line-height: 1.5; color: var(--text-3); }
.hub-chosen-head { display: flex; align-items: flex-start; gap: 8px; }
.hub-chosen-head .i { flex: none; margin-top: 2px; }
.hub-chosen.ok { padding: 10px 12px; border-radius: var(--r); border: 1px solid var(--line); background: rgba(255, 255, 255, .02); color: var(--text-2); }
.hub-chosen.ok .hub-chosen-head .i { color: var(--green); }
.hub-chosen b { color: var(--text); font-weight: 600; }
.hub-chosen ul { display: grid; gap: 3px; margin: 6px 0 0; padding: 0 0 0 24px; list-style: none; }
.hub-chosen li { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.hub-chosen li b { flex: none; }
.hub-chosen li .warn { flex: none; font-size: 12px; color: var(--amber); }
.hub-chosen li .ds { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-3); }

/* ===== Arquivos ===== */
.files-table td { padding-top: 12px; padding-bottom: 12px; }
.files-table tr.frow { cursor: pointer; }
.fname { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ft { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); color: var(--text-2); flex: none; }
.fname b { display: block; font-size: 14px; font-weight: 600; word-break: break-word; }
.fname span { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 1px; }
.nover { font-size: 12.5px; color: var(--text-2); }
.acts { white-space: nowrap; text-align: right; width: 92px; }
.files-table tr.open td { background: rgba(255, 255, 255, .025); border-bottom-color: transparent; }
.files-table tr.vrow td { padding: 0 16px 14px 62px; background: rgba(255, 255, 255, .025); }
.files-table tbody tr.vrow:hover td { background: rgba(255, 255, 255, .025); }
.vers { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--bg-deep); }
.vers .v { display: grid; grid-template-columns: minmax(130px, 200px) 1fr 90px 72px; align-items: center; gap: 12px; padding: 8px 10px 8px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.vers .v:last-child { border-bottom: 0; }
.vers .v .when, .vers .v .sz { color: var(--text-2); }
.vers .v .sz { text-align: right; }
.vers .v .a { text-align: right; white-space: nowrap; }
.upload-panel { margin-bottom: 18px; }
.upload-panel .form-grid { grid-template-columns: minmax(0, 1fr) 240px; align-items: start; }
.upload-panel .progress-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; }

/* ===== Acessos ===== */
.accts .a { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); cursor: pointer; }
.accts .a:last-child { border-bottom: 0; }
.accts .a:hover { background: rgba(255, 255, 255, .03); }
.accts .a .avatar { width: 36px; height: 36px; font-size: 13px; }
.accts .a b { display: block; font-size: 14px; font-weight: 600; word-break: break-all; }
.accts .a span.d { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 1px; }
.accts .a > svg { color: var(--text-3); }
.foot-note { display: flex; align-items: center; gap: 9px; margin-top: 14px; font-size: 12.5px; color: var(--text-3); }
.link-view { background: none; border: 0; padding: 0; color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; text-align: left; word-break: break-all; }
.link-view:hover { color: var(--orange-text); }

/* ===== Versões do SIMM.HUB (supervisor) ===== */
.page-head .synced { font-size: 12.5px; color: var(--text-3); margin-right: 4px; }
.hv-setup { position: relative; display: flex; gap: 16px; align-items: flex-start; padding: 22px 22px 20px; margin-bottom: 18px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line-2); overflow: hidden; }
.hv-setup .hair { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--grad); }
.hv-setup .ic { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--orange-soft); color: var(--orange-text); }
.hv-setup b { display: block; font-size: 15.5px; color: var(--text); margin-bottom: 3px; }
.hv-setup p { max-width: 700px; font-size: 13.5px; color: var(--text-2); }
.hv-setup .sug { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.hv-setup .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.hv-alert { margin-bottom: 16px; }
.hv-toolbar { margin-bottom: 14px; }
.hv-table tbody tr[data-id] { cursor: pointer; }
.hv-table tbody tr[data-id] td { transition: background .15s; }
.hv-table tbody tr[data-id]:hover td { background: rgba(255, 255, 255, .025); }
.hv-table tr.is-new td { background: rgba(245, 184, 61, .045); }
.hv-table tr.is-new:hover td { background: rgba(245, 184, 61, .075); }
.hv-table tr.is-off td { color: var(--text-3); }
.hv-table tr.flash td { animation: hv-flash 1.8s ease-out; }
@keyframes hv-flash { 0%, 25% { background: var(--orange-soft); } 100% { background: transparent; } }
.hv-folder { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text); }
.hv-folder .i { color: var(--text-3); flex: none; }
.is-off .hv-folder { color: var(--text-2); font-weight: 500; }
.hv-label { min-width: 0; }
.hv-label .nm { display: flex; align-items: center; gap: 7px; color: var(--text); }
.hv-label small { display: block; max-width: 280px; margin-top: 2px; font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hv-hint { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); }
.hv-hint .i { color: var(--amber); }
.hv-acts { text-align: right; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .02em; color: var(--text-2); border: 1px solid var(--line-2); white-space: nowrap; }
.badge .i { width: 12px; height: 12px; }
.badge.cur { color: var(--green); border-color: rgba(61, 214, 140, .36); background: var(--green-soft); }
/* A chave do .xpro da versão, no editor (o id e a variável; nunca o valor) */
.hv-key { display: flex; align-items: flex-start; gap: 7px; margin-top: 8px; font-size: 12.5px; line-height: 1.45; color: var(--text-2); }
.hv-key:empty { display: none; }
.hv-key .i { flex: none; margin-top: 2px; color: var(--green); }
.hv-key.off .i { color: var(--amber); }
.skel { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, rgba(255, 255, 255, .05) 25%, rgba(255, 255, 255, .1) 50%, rgba(255, 255, 255, .05) 75%); background-size: 200% 100%; animation: skel 1.4s ease-in-out infinite; }
.skel.s1 { width: 120px; } .skel.s2 { width: 190px; } .skel.s3 { width: 84px; } .skel.s4 { width: 56px; }
@keyframes skel { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
/* Classificar ou editar uma pasta */
.hv-modal .who .avatar { color: var(--text-2); }
.hv-suggest { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: var(--r); background: var(--amber-soft); color: var(--amber); font-size: 13px; line-height: 1.45; }
.hv-suggest .i { flex: none; }
.hv-fields { display: grid; gap: 14px; }
.hv-fields[hidden] { display: none; }
.hv-fields .divider { margin: 2px 0; }
.hv-desc { min-height: 70px; }
.hv-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.hv-row .label { margin: 0; }
.hv-count { display: flex; justify-content: space-between; gap: 12px; }
.hv-count .n { flex: none; font-variant-numeric: tabular-nums; }
.hv-count .n.near { color: var(--amber); }
.hv-drive { flex-wrap: wrap; }
.hv-drive .dot { color: var(--text-3); }
.hv-drive a { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; color: var(--orange-text); font-weight: 600; }

/* ===== Login ===== */
.login { position: relative; min-height: 100vh; overflow: hidden; display: grid; place-items: center; padding: 40px 20px 70px; background: radial-gradient(1200px 600px at 75% 115%, rgba(255, 102, 0, .10), transparent 60%), var(--bg); }
.login .d { position: absolute; transform: rotate(45deg); border-radius: 12%; pointer-events: none; }
.login .d.fill { background: rgba(255, 255, 255, .05); }
.login .d.line { border: 1px solid rgba(255, 255, 255, .16); }
.login .d.or { background: #C9551C; opacity: .55; border-radius: 10%; }
.login .d.or2 { background: var(--orange); opacity: .85; }
.login .d.gray { background: rgba(255, 255, 255, .42); }
.login-card { position: relative; z-index: 1; width: 100%; max-width: 404px; padding: 34px 34px 26px; border-radius: 18px; background: rgba(23, 24, 51, .86); border: 1px solid var(--line-2); box-shadow: 0 30px 80px rgba(0, 0, 0, .45); backdrop-filter: blur(6px); text-align: center; overflow: hidden; }
.login-card .hair { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--grad); }
.login-card .logo { height: 30px; width: auto; margin: 4px auto 18px; display: block; }
.login-card .app-title { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); font-weight: 600; margin-bottom: 6px; }
.login-card h1 { font-size: 22px; font-weight: 600; margin-bottom: 22px; line-height: 1.3; }
.login-card .role-desc { font-size: 13px; color: var(--text-2); margin: 12px 0 18px; min-height: 20px; }
.login-card .alert { text-align: left; margin-bottom: 14px; padding: 10px 12px; font-size: 13px; }
.login-card .alert .alert-ic { width: 24px; height: 24px; }
.btn-google { width: 100%; height: 42px; background: #fff; color: var(--navy); font-size: 14px; font-weight: 600; border-radius: 10px; }
.btn-google:hover { background: #ECEDF5; }
.btn-google svg { width: 18px; height: 18px; }
.login-foot { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 20px; font-size: 12.5px; color: var(--text-3); }
.login .tagline { position: absolute; left: 0; right: 0; bottom: 22px; text-align: center; font-size: 12.5px; color: var(--text-3); letter-spacing: .02em; }

/* ===== Telas menores: a barra lateral vira barra no topo ===== */
@media (max-width: 1100px) {
    .build-grid { grid-template-columns: minmax(0, 1fr); }
    .q-detail { grid-template-columns: minmax(0, 1fr); gap: 18px; }
}
@media (max-width: 960px) {
    .app { grid-template-columns: minmax(0, 1fr); background: none; }
    .side { position: sticky; top: 0; z-index: 50; height: auto; flex-direction: row; align-items: center; gap: 14px; padding: 10px 14px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
    .side > * { flex-shrink: 0; }
    .brand { padding: 0 4px; }
    .brand img { max-width: none; }
    .brand .app-name { display: none; }
    .nav { flex-direction: row; }
    .nav .cap { display: none; }
    .nav a.on::before { display: none; }
    .me { margin: 0 0 0 auto; padding: 4px; border: 0; background: none; }
    .me .who { display: none; }
    .main { padding: 24px 18px 44px; }
    .form-grid, .upload-panel .form-grid { grid-template-columns: minmax(0, 1fr); }
    .q-row { grid-template-columns: 40px minmax(0, 1fr); }
    .q-actions { grid-column: 1 / -1; justify-content: flex-start; }
    .vers .v { grid-template-columns: minmax(0, 1fr) auto; }
    .vers .v .when, .vers .v .sz { display: none; }
    .hv-table .col-fmt, .hv-table .col-pub { display: none; }
    .hv-label small { max-width: 220px; }
}
@media (max-width: 640px) {
    .kpis { grid-template-columns: minmax(0, 1fr); }
    .page-head h1 { font-size: 23px; }
    .main { padding: 20px 14px 40px; }
    .hv-setup { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
