/* BVO · Estado de Equipamentos — sem dependências externas (CSP estrita) */
:root {
  --brand: #b91c1c; --brand-600: #991b1b; --brand-50: #fef2f2;
  --bg: #f4f5f7; --surface: #ffffff; --surface-2: #f8f9fb; --border: #e3e6eb; --border-strong: #cfd4dc;
  --text: #14171c; --text-2: #4b5563; --text-3: #6b7280;
  --green: #15803d; --green-bg: #dcfce7; --amber: #b45309; --amber-bg: #fef3c7;
  --orange: #c2410c; --orange-bg: #ffedd5; --red: #b91c1c; --red-bg: #fee2e2;
  --blue: #1d4ed8; --blue-bg: #dbeafe; --grey: #4b5563; --grey-bg: #eef0f3;
  --radius: 14px; --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  --shadow-lg: 0 12px 32px rgba(16,24,40,.14);
  --sidebar-w: 264px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1116; --surface: #161a21; --surface-2: #1c212a; --border: #262c36; --border-strong: #353d4a;
    --text: #e8ebf0; --text-2: #b4bcc8; --text-3: #8b95a4; --brand-50: #2a1416;
    --green: #4ade80; --green-bg: #12301f; --amber: #fbbf24; --amber-bg: #33270d;
    --orange: #fb923c; --orange-bg: #36200f; --red: #f87171; --red-bg: #3a1618;
    --blue: #60a5fa; --blue-bg: #13274a; --grey: #aab3c0; --grey-bg: #252b35;
    --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 12px 32px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
code, .mono { font-family: var(--mono); font-size: .88em; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; letter-spacing: -.01em; }
.h1 { font-size: 1.6rem; } .h2 { font-size: 1.3rem; } .h3 { font-size: 1.05rem; } .h4 { font-size: .95rem; margin-top: 1.1rem; }
.h3, .h4 { display: flex; align-items: center; gap: .45rem; }
p { margin: 0 0 .75rem; }
.muted { color: var(--text-3); } .small { font-size: .85rem; } .nowrap { white-space: nowrap; }
.text-bad { color: var(--red); } .text-ok { color: var(--green); }
.sr-only, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: .5rem 1rem; z-index: 100; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }

.icon { width: 20px; height: 20px; flex: none; }
.icon--sm { width: 16px; height: 16px; } .icon--lg { width: 36px; height: 36px; }

/* ---------- Estrutura */
.shell { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; z-index: 40; transition: transform .2s ease; }
.area-admin .sidebar { background: #111827; border-color: #111827; color: #e5e7eb; --text-3: #9ca3af; }
.brand { display: flex; align-items: center; gap: .7rem; padding: 1.1rem 1.1rem 1rem; }
.brand strong { display: block; font-size: .95rem; } .brand small { display: block; color: var(--text-3); font-size: .78rem; }
.nav { flex: 1; overflow-y: auto; padding: .25rem .7rem; display: flex; flex-direction: column; gap: 2px; }
.nav__link { display: flex; align-items: center; gap: .7rem; padding: .6rem .75rem; border-radius: 10px; color: inherit; font-weight: 500; }
.nav__link:hover { background: var(--surface-2); text-decoration: none; }
.area-admin .nav__link:hover { background: #1f2937; }
.nav__link.is-active { background: var(--brand-50); color: var(--brand); }
.area-admin .nav__link.is-active { background: #b91c1c; color: #fff; }
.nav__link .icon { opacity: .85; }
.nav__count { margin-left: auto; background: var(--brand); color: #fff; font-size: .72rem; font-weight: 700; border-radius: 99px; padding: .05rem .45rem; }
.area-admin .nav__link.is-active .nav__count { background: #fff; color: var(--brand); }
.nav__title { margin: 1rem .75rem .3rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); font-weight: 700; }
.nav__sep { height: 1px; background: var(--border); margin: .6rem .5rem; }
.area-admin .nav__sep { background: #374151; }
.sidebar__foot { display: flex; align-items: center; gap: .5rem; padding: .8rem; border-top: 1px solid var(--border); }
.area-admin .sidebar__foot { border-color: #374151; }
.me { display: flex; align-items: center; gap: .6rem; flex: 1; min-width: 0; color: inherit; }
.me:hover { text-decoration: none; }
.me strong, .me small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me small { color: var(--text-3); font-size: .78rem; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none; }
.avatar--sm { width: 30px; height: 30px; font-size: .75rem; }
.main-wrap { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: .75rem; padding: .8rem 1.5rem;
  background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.topbar__title { font-size: 1.15rem; margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .topbar__menu { display: none; }
.topbar__actions { display: flex; align-items: center; gap: .5rem; }
.content { padding: 1.5rem; max-width: 1280px; width: 100%; display: flex; flex-direction: column; gap: 1.1rem; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: inherit; cursor: pointer; position: relative; }
.icon-btn:hover { background: var(--surface-2); }
.area-admin .sidebar .icon-btn:hover { background: #1f2937; }
.bell__dot { position: absolute; top: 4px; right: 3px; background: var(--brand); color: #fff; font-size: .65rem; font-weight: 700; min-width: 17px; height: 17px; border-radius: 99px; display: grid; place-items: center; padding: 0 3px; border: 2px solid var(--bg); }
.scrim { display: none; }
.tabbar { display: none; }

/* ---------- Componentes */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); min-width: 0; }
.card--flush { padding: 0; overflow: hidden; }
.card--accent { border-top: 4px solid var(--brand); }
.card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: .8rem; }
.card__head--pad { padding: 1rem 1.25rem 0; }
.card__head a { font-size: .88rem; white-space: nowrap; }
.eyebrow { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 600; margin-bottom: .25rem; }
.chips { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: flex-end; align-items: center; }
.badge { display: inline-flex; align-items: center; font-size: .74rem; font-weight: 600; padding: .15rem .55rem; border-radius: 99px; white-space: nowrap; }
.badge--green { color: var(--green); background: var(--green-bg); } .badge--amber { color: var(--amber); background: var(--amber-bg); }
.badge--orange { color: var(--orange); background: var(--orange-bg); } .badge--red { color: var(--red); background: var(--red-bg); }
.badge--blue { color: var(--blue); background: var(--blue-bg); } .badge--grey { color: var(--grey); background: var(--grey-bg); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .62rem 1.05rem; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none !important; line-height: 1.2; transition: background .15s, border-color .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: #fff; } .btn--primary:hover { background: var(--brand-600); }
.btn--secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); } .btn--secondary:hover { background: var(--surface-2); }
.btn--ghost { background: transparent; color: var(--text-2); } .btn--ghost:hover { background: var(--surface-2); color: var(--text); }
.btn--danger { background: var(--red-bg); color: var(--red); } .btn--danger:hover { background: var(--red); color: #fff; }
.btn--sm { padding: .38rem .7rem; font-size: .85rem; } .btn--lg { padding: .85rem 1.4rem; font-size: 1.02rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

.alert { padding: .8rem 1rem; border-radius: var(--radius-sm); border: 1px solid; font-size: .93rem; }
.alert--success { background: var(--green-bg); color: var(--green); border-color: color-mix(in srgb, var(--green) 25%, transparent); }
.alert--error { background: var(--red-bg); color: var(--red); border-color: color-mix(in srgb, var(--red) 25%, transparent); }
.alert--warning { background: var(--amber-bg); color: var(--amber); border-color: color-mix(in srgb, var(--amber) 25%, transparent); }
.alert--info { background: var(--blue-bg); color: var(--blue); border-color: color-mix(in srgb, var(--blue) 25%, transparent); }
.alert + .alert { margin-top: -.5rem; }

/* ---------- Formulários */
.form { display: flex; flex-direction: column; gap: .9rem; }
.form--narrow { max-width: 560px; }
.form--wide { max-width: 860px; }
.form--inline-top { margin-top: 1rem; border-top: 1px solid var(--border); padding-top: 1rem; }
.form fieldset { border: 0; padding: 0; margin: 0 0 .4rem; display: flex; flex-direction: column; gap: .8rem; }
.form legend { font-weight: 700; font-size: 1.02rem; margin-bottom: .7rem; padding: 0; }
.field { display: flex; flex-direction: column; gap: .35rem; margin: 0; }
.field > span { font-weight: 600; font-size: .88rem; color: var(--text-2); }
.field em { font-weight: 400; color: var(--text-3); font-style: normal; }
.hint { color: var(--text-3); font-size: .8rem; }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: .6rem .75rem; width: 100%; min-height: 44px; transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; min-height: 88px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
input:disabled { background: var(--surface-2); color: var(--text-3); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; min-height: 0; accent-color: var(--brand); flex: none; margin: .15rem 0 0; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; cursor: pointer; }
.grid-2, .grid-3 { display: grid; gap: .9rem; grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.field--narrow { max-width: 280px; }
.form__actions { display: flex; justify-content: flex-end; gap: .6rem; padding-top: .5rem; border-top: 1px solid var(--border); margin-top: .4rem; padding-top: 1rem; }
.otp { font-family: var(--mono); font-size: 1.5rem; letter-spacing: .35em; text-align: center; }
.strength { height: 4px; border-radius: 4px; background: var(--border); overflow: hidden; }
.strength span { display: block; height: 100%; width: 0; background: var(--red); transition: width .2s, background .2s; }
.strength.s1 span { width: 25%; } .strength.s2 span { width: 50%; background: var(--amber); } .strength.s3 span { width: 75%; background: var(--green); } .strength.s4 span { width: 100%; background: var(--green); }
.segmented { display: flex; flex-wrap: wrap; gap: .4rem; }
.segmented__opt { position: relative; cursor: pointer; }
.segmented__opt input { position: absolute; opacity: 0; pointer-events: none; }
.segmented__opt span { display: inline-block; padding: .55rem 1rem; border: 1px solid var(--border-strong); border-radius: 99px; font-weight: 600; font-size: .9rem; background: var(--surface); }
.segmented__opt input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); }
.segmented__opt--green input:checked + span { background: var(--green-bg); color: var(--green); border-color: var(--green); }
.segmented__opt--amber input:checked + span { background: var(--amber-bg); color: var(--amber); border-color: var(--amber); }
.segmented__opt--orange input:checked + span { background: var(--orange-bg); color: var(--orange); border-color: var(--orange); }
.segmented__opt--red input:checked + span { background: var(--red-bg); color: var(--red); border-color: var(--red); }
.segmented__opt--grey input:checked + span { background: var(--grey-bg); color: var(--text); border-color: var(--grey); }
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; gap: .3rem; text-align: center; padding: 1.6rem 1rem;
  border: 2px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2); cursor: pointer; color: var(--text-2); }
.dropzone:hover, .dropzone.is-over { border-color: var(--brand); background: var(--brand-50); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; min-height: 0; }
.previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .5rem; }
.previews img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.filters input, .filters select { width: auto; flex: 1 1 170px; }
.filters .btn { flex: none; }
.filters.card { padding: .9rem; }
.field--search { position: relative; flex: 2 1 240px; }
.field--search .icon { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.field--search input { padding-left: 2.3rem; }
.inline { display: inline-flex; align-items: center; gap: .4rem; font-size: .88rem; color: var(--text-2); }
.inline input { width: auto; }
.search-inline input { min-width: 240px; }

/* ---------- Layouts de conteúdo */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; align-items: start; }
.cols--main { grid-template-columns: minmax(0, 1fr) 340px; }
.cols > div, .cols > aside { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: .55rem; }
.row { display: flex; flex-wrap: wrap; gap: .6rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between; align-items: center; }
.tabs { display: flex; flex-wrap: wrap; gap: .25rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .25rem; }
.tab { padding: .45rem .85rem; border-radius: 9px; color: var(--text-2); font-weight: 600; font-size: .88rem; }
.tab:hover { text-decoration: none; background: var(--surface-2); }
.tab.is-active { background: var(--brand); color: #fff; }
.tab__n { opacity: .7; font-weight: 500; margin-left: .2rem; }
.back { display: inline-flex; align-items: center; gap: .35rem; color: var(--text-2); font-size: .9rem; font-weight: 500; }
.back + * { margin-top: 0; }
p:has(> .back) { margin: -.4rem 0 -.3rem; }

.hero { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.6rem; border-radius: var(--radius);
  background: linear-gradient(135deg, #b91c1c, #7f1d1d); color: #fff; box-shadow: var(--shadow-lg); }
.hero .eyebrow, .hero .muted { color: rgba(255,255,255,.8); }
.hero .h1 { margin-bottom: .35rem; }
.hero .btn--primary { background: #fff; color: #991b1b; flex: none; }
.hero .btn--primary:hover { background: #fef2f2; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .2rem; color: var(--text); box-shadow: var(--shadow); border-left: 4px solid var(--border-strong); }
.stat:hover { text-decoration: none; border-color: var(--border-strong); }
.stat__label { color: var(--text-3); font-size: .82rem; font-weight: 600; }
.stat__value { font-size: 1.9rem; font-weight: 750; letter-spacing: -.02em; line-height: 1.1; }
.stat__value small { font-size: 1rem; color: var(--text-3); font-weight: 500; }
.stat--ok { border-left-color: var(--green); } .stat--bad { border-left-color: var(--red); } .stat--warn { border-left-color: var(--amber); }
.stat--bad .stat__value { color: var(--red); }

.list { list-style: none; margin: 0; padding: 0; }
.list > li + li { border-top: 1px solid var(--border); }
.list__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem .1rem; color: var(--text); }
.card--flush .list__row { padding: .85rem 1.25rem; }
a.list__row:hover { text-decoration: none; background: var(--surface-2); }
.list__row > span:first-child { min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.list__row small { display: block; overflow: hidden; text-overflow: ellipsis; }
.list__row.is-unread { font-weight: 600; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); flex: none; }
.empty { color: var(--text-3); text-align: center; padding: 1.5rem 1rem; margin: 0; }

.meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .8rem 1.2rem; margin: .8rem 0 1rem; }
.meta--stack { grid-template-columns: 1fr; gap: .55rem; }
.meta dt { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); font-weight: 600; }
.meta dd { margin: .1rem 0 0; }
.prose { white-space: normal; overflow-wrap: anywhere; color: var(--text); }

.timeline { list-style: none; margin: 0; padding: 0 0 0 1.2rem; border-left: 2px solid var(--border); display: flex; flex-direction: column; gap: 1rem; }
.timeline__item { position: relative; }
.timeline__item::before { content: ""; position: absolute; left: calc(-1.2rem - 7px); top: .35rem; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border-strong); }
.timeline__item--status::before, .timeline__item--encaminhado::before, .timeline__item--atribuido::before { border-color: var(--blue); background: var(--blue-bg); }
.timeline__item--tratado::before, .timeline__item--concluido::before { border-color: var(--green); background: var(--green-bg); }
.timeline__item--criado::before { border-color: var(--brand); background: var(--brand); }
.timeline__item--cancelado::before { border-color: var(--grey); background: var(--grey-bg); }
.timeline__head { font-size: .92rem; display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.timeline__head time { margin-left: auto; font-size: .8rem; }
.timeline .prose { margin-top: .35rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .6rem .8rem; font-size: .93rem; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .6rem; }
.gallery__item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); transition: transform .15s; }
.gallery__item:hover img { transform: scale(1.02); }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); border-top: 4px solid var(--green); display: flex; flex-direction: column; gap: .3rem; }
.tile--limitado { border-top-color: var(--amber); } .tile--inoperacional { border-top-color: var(--red); } .tile--manutencao { border-top-color: var(--blue); }
.tile__top { display: flex; justify-content: space-between; align-items: center; }
.tile__code { font-family: var(--mono); font-weight: 700; font-size: 1.05rem; }
.tile__name { font-size: .98rem; margin: 0; }
.tile__foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: .5rem; border-top: 1px solid var(--border); }

.people { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .7rem; }
.people li { display: flex; align-items: center; gap: .6rem; }
.people li > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
details.action { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: .55rem; }
details.action > summary { padding: .7rem .85rem; cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: .45rem; list-style: none; }
details.action > summary::-webkit-details-marker { display: none; }
details.action[open] > summary { border-bottom: 1px solid var(--border); }
details.action > .form, details.action > p { padding: .8rem .85rem; margin: 0; }
.checklist { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .45rem; max-height: 220px; overflow-y: auto; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); font-weight: 700; padding: .7rem 1rem; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: .7rem 1rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tr[data-href] { cursor: pointer; }
.table tbody tr:hover { background: var(--surface-2); }
.table--compact td, .table--compact th { padding: .45rem .8rem; }
.table tr.is-muted td { opacity: .55; }
.table tr.is-selected { background: var(--brand-50); }
.table tr.is-alert td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.json { margin: .4rem 0 0; font-family: var(--mono); font-size: .78rem; background: var(--surface-2); padding: .5rem; border-radius: 6px; max-width: 420px; overflow-x: auto; white-space: pre-wrap; }
.pager { display: flex; justify-content: center; align-items: center; gap: 1rem; font-size: .9rem; }

.bars { display: flex; flex-direction: column; gap: .6rem; }
.bars__row { display: grid; grid-template-columns: 130px 1fr 32px; gap: .7rem; align-items: center; color: var(--text); font-size: .9rem; }
a.bars__row:hover { text-decoration: none; }
.bars__track { height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--border); }
.bars__fill { display: block; height: 100%; border-radius: 99px; }
.bars__fill--green { background: var(--green); } .bars__fill--amber { background: var(--amber); } .bars__fill--orange { background: var(--orange); }
.bars__fill--red { background: var(--red); } .bars__fill--blue { background: var(--blue); } .bars__fill--grey { background: var(--grey); }
.bars__row strong { text-align: right; }
.w-0 { width: 0%; }
.w-5 { width: 5%; }
.w-10 { width: 10%; }
.w-15 { width: 15%; }
.w-20 { width: 20%; }
.w-25 { width: 25%; }
.w-30 { width: 30%; }
.w-35 { width: 35%; }
.w-40 { width: 40%; }
.w-45 { width: 45%; }
.w-50 { width: 50%; }
.w-55 { width: 55%; }
.w-60 { width: 60%; }
.w-65 { width: 65%; }
.w-70 { width: 70%; }
.w-75 { width: 75%; }
.w-80 { width: 80%; }
.w-85 { width: 85%; }
.w-90 { width: 90%; }
.w-95 { width: 95%; }
.w-100 { width: 100%; }

.steps { padding-left: 1.2rem; display: flex; flex-direction: column; gap: .7rem; }
.secret { display: inline-block; margin: .4rem 0; padding: .55rem .8rem; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px dashed var(--border-strong);
  font-size: 1.05rem; letter-spacing: .08em; user-select: all; cursor: copy; word-break: break-all; }
.secret.is-copied { border-color: var(--green); }
.verify { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem; border-radius: var(--radius); margin-bottom: 1rem; }
.verify--ok { background: var(--green-bg); color: var(--green); } .verify--bad { background: var(--red-bg); color: var(--red); }
.verify p { color: var(--text); }
.checks { list-style: none; padding: 0; margin: 0 0 1.2rem; display: flex; flex-direction: column; gap: .4rem; font-size: .92rem; }
.checks li { display: flex; gap: .5rem; align-items: flex-start; }
.checks li span { display: flex; flex-direction: column; }
.checks .ok { color: var(--green); } .checks .fail { color: var(--red); }
.checks small { color: var(--text-3); word-break: break-all; }

/* ---------- Páginas de autenticação */
body.auth { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem 1rem;
  background: radial-gradient(1200px 500px at 50% -10%, color-mix(in srgb, var(--brand) 22%, transparent), transparent), var(--bg); }
.auth__wrap { width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 1.2rem; }
.auth__brand { display: flex; align-items: center; gap: .8rem; justify-content: center; }
.auth__brand strong { display: block; font-size: 1.05rem; } .auth__brand small { color: var(--text-3); }
.auth__card { padding: 1.75rem; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 1rem; }
.auth__title { font-size: 1.4rem; margin: 0; }
.auth__alt { text-align: center; margin: 0; font-size: .92rem; }
.auth__hint { text-align: center; margin: 0; font-size: .82rem; color: var(--text-3); }
.auth__foot { display: flex; gap: .4rem; align-items: center; justify-content: center; color: var(--text-3); font-size: .8rem; margin: 0; }
.error-page { text-align: center; display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.error-page__code { font-size: 3.5rem; font-weight: 800; color: var(--brand); margin: 0; line-height: 1; }

/* ---------- Responsivo */
@media (max-width: 1100px) {
  .cols--main { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 35; }
  .main-wrap { margin-left: 0; }
  .topbar { padding: .6rem 1rem; }
  .topbar .topbar__menu { display: inline-grid; }
  .content { padding: 1rem; gap: .9rem; }
  .cols { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hero { flex-direction: column; align-items: stretch; padding: 1.25rem; }
  .hero .h1 { font-size: 1.3rem; }
  .card__head { flex-direction: column; gap: .5rem; }
  .chips { justify-content: flex-start; }
  .list__row { flex-direction: column; align-items: flex-start; gap: .4rem; }
  .hide-sm { display: none; }
  .area-front .content { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--border);
    padding: .35rem .4rem calc(.35rem + env(safe-area-inset-bottom)); justify-content: space-around; align-items: center; }
  .tabbar .nav__link { flex-direction: column; gap: .1rem; font-size: .7rem; padding: .35rem .5rem; position: relative; background: none !important; color: var(--text-3); }
  .tabbar .nav__link.is-active { color: var(--brand); }
  .tabbar .nav__count { position: absolute; top: 0; right: 4px; font-size: .62rem; padding: 0 .35rem; }
  .tabbar__fab { width: 54px; height: 54px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; margin-top: -26px; box-shadow: 0 6px 18px rgba(185,28,28,.45); }
  .tabbar__fab .icon { width: 26px; height: 26px; }
  .form__actions { flex-direction: column-reverse; }
  .form__actions .btn { width: 100%; }
  .bars__row { grid-template-columns: 100px 1fr 28px; }
  .search-inline, .search-inline input { min-width: 0; width: 100%; }
}
@media (max-width: 480px) {
  .stats { gap: .6rem; }
  .stat { padding: .8rem; }
  .stat__value { font-size: 1.5rem; }
  .auth__card { padding: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print { .sidebar, .topbar, .tabbar, form, details.action { display: none !important; } .main-wrap { margin: 0; } }

/* Faixa de ambiente (staging/desenvolvimento) */
.env-banner { position: sticky; top: 0; z-index: 60; background: repeating-linear-gradient(45deg, #facc15, #facc15 12px, #fde047 12px, #fde047 24px);
  color: #422006; text-align: center; font-weight: 800; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; padding: .25rem; }
body.auth .env-banner { position: fixed; left: 0; right: 0; }
