:root {
    --bg: #070b14;
    --bg-soft: #0b1120;
    --sidebar: #080d19;
    --surface: #101827;
    --surface-2: #151f31;
    --surface-3: #1a263a;
    --line: #243148;
    --line-soft: rgba(148, 163, 184, .12);
    --text: #f7f9fc;
    --muted: #8f9bb0;
    --muted-2: #64748b;
    --navy: #20255f;
    --blue: #31b7f3;
    --blue-soft: rgba(49, 183, 243, .13);
    --orange: #ff8a1c;
    --orange-soft: rgba(255, 138, 28, .14);
    --green: #36d399;
    --green-soft: rgba(54, 211, 153, .13);
    --yellow: #f7c948;
    --yellow-soft: rgba(247, 201, 72, .13);
    --red: #fb7185;
    --red-soft: rgba(251, 113, 133, .13);
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 24px 70px rgba(0, 0, 0, .24);
    --sidebar-width: 270px;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; color: var(--text); background: var(--bg); font-family: Inter, "Segoe UI", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; display: flex; flex-direction: column; width: var(--sidebar-width); background: linear-gradient(180deg, #0a1020 0%, #080d18 100%); border-right: 1px solid var(--line); }
.sidebar__brand { display: flex; align-items: center; justify-content: space-between; min-height: 86px; padding: 18px 20px; border-bottom: 1px solid var(--line-soft); }
.brand-mark { display: flex; align-items: center; gap: 13px; min-width: 0; }
.brand-mark img { width: 48px; height: 48px; object-fit: contain; border-radius: 50%; box-shadow: 0 8px 22px rgba(0,0,0,.3), 0 0 0 1px rgba(49,183,243,.18); }
.brand-mark span { display: flex; flex-direction: column; gap: 3px; }
.brand-mark strong { font-size: 13px; letter-spacing: .08em; }
.brand-mark small { color: var(--muted); font-size: 10px; letter-spacing: .04em; }
.sidebar__nav { flex: 1; overflow-y: auto; padding: 18px 13px; scrollbar-width: thin; }
.nav-section { display: block; margin: 20px 12px 8px; color: #526078; font-size: 9px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.nav-section:first-child { margin-top: 3px; }
.nav-link { position: relative; display: flex; align-items: center; gap: 12px; min-height: 46px; margin: 3px 0; padding: 8px 12px; color: #98a5ba; border: 1px solid transparent; border-radius: 11px; font-size: 13px; font-weight: 600; transition: .18s ease; }
.nav-link:hover { color: var(--text); background: rgba(255,255,255,.035); }
.nav-link.is-active { color: var(--text); background: linear-gradient(90deg, rgba(49,183,243,.13), rgba(49,183,243,.04)); border-color: rgba(49,183,243,.18); }
.nav-link.is-active::before { content: ""; position: absolute; left: -14px; width: 3px; height: 24px; background: var(--blue); border-radius: 0 5px 5px 0; box-shadow: 0 0 18px rgba(49,183,243,.65); }
.nav-icon { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; color: #a9b7ca; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); border-radius: 8px; font-size: 9px; font-weight: 900; letter-spacing: -.02em; }
.nav-link.is-active .nav-icon { color: var(--blue); background: var(--blue-soft); border-color: rgba(49,183,243,.2); }
.sidebar__footer { padding: 15px; border-top: 1px solid var(--line-soft); }
.user-card { display: flex; align-items: center; gap: 11px; padding: 10px; background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.05); border-radius: 12px; }
.user-avatar { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; color: #07111a; background: linear-gradient(135deg, var(--blue), #7dd3fc); border-radius: 10px; font-size: 12px; font-weight: 900; }
.user-meta { display: flex; flex-direction: column; min-width: 0; }
.user-meta strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.user-meta small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.user-actions { display: flex; justify-content: space-between; gap: 10px; padding: 10px 5px 0; }
.user-actions form { margin: 0; }
.text-link { color: var(--blue); font-size: 12px; font-weight: 700; }
.text-link:hover { color: #86d9ff; }
.text-link--button { padding: 0; background: none; border: 0; cursor: pointer; }

.workspace { min-height: 100vh; margin-left: var(--sidebar-width); background: linear-gradient(rgba(7,11,20,.91), rgba(7,11,20,.96)), url("../img/brand/brand-background.png") center / cover fixed no-repeat; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; min-height: 72px; padding: 12px clamp(22px, 3vw, 42px); background: rgba(7, 11, 20, .82); border-bottom: 1px solid var(--line-soft); backdrop-filter: blur(18px); }
.topbar__context { display: flex; flex-direction: column; gap: 3px; }
.topbar__context span { color: var(--muted-2); font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.topbar__context strong { font-size: 14px; }
.topbar__right { display: flex; align-items: center; gap: 20px; color: var(--muted); font-size: 11px; }
.live-indicator { display: inline-flex; align-items: center; gap: 7px; }
.live-indicator i { width: 7px; height: 7px; background: var(--green); border-radius: 99px; box-shadow: 0 0 0 5px var(--green-soft); }
.live-indicator.is-offline { color: var(--red); }
.live-indicator.is-offline i { background: var(--red); box-shadow: 0 0 0 5px var(--red-soft); }
.icon-button { display: grid; place-items: center; width: 38px; height: 38px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.menu-button, .sidebar__close { display: none; }
.content { width: min(1540px, 100%); margin: 0 auto; padding: 36px clamp(20px, 3vw, 44px) 70px; }

.eyebrow { display: block; color: var(--blue); font-size: 9px; font-weight: 900; letter-spacing: .17em; text-transform: uppercase; }
.page-hero, .page-header, .detail-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-hero { min-height: 190px; padding: 34px 38px; overflow: hidden; background: radial-gradient(circle at 86% 10%, rgba(49,183,243,.14), transparent 30%), linear-gradient(135deg, #111a2d, #0c1423); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.page-hero h1, .page-header h1, .detail-hero h1 { margin: 8px 0 7px; font-size: clamp(30px, 4vw, 48px); line-height: 1.05; letter-spacing: -.04em; }
.page-hero p, .page-header p, .detail-hero p { max-width: 670px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.page-header { align-items: center; margin-bottom: 26px; }
.page-header h1 { font-size: clamp(28px, 3vw, 40px); }
.page-header--form { align-items: flex-start; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.back-link { display: inline-flex; margin-bottom: 12px; color: var(--muted); font-size: 12px; font-weight: 700; }
.back-link:hover { color: var(--blue); }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 43px; padding: 10px 16px; border: 1px solid transparent; border-radius: 10px; font-size: 12px; font-weight: 800; cursor: pointer; transition: transform .16s ease, border-color .16s ease, background .16s ease; }
.button:hover { transform: translateY(-1px); }
.button--primary { color: #07111a; background: linear-gradient(135deg, var(--orange), #ffb057); box-shadow: 0 10px 28px rgba(255,138,28,.16); }
.button--primary:hover { background: linear-gradient(135deg, #ff9a3d, #ffc077); }
.button--secondary { color: var(--text); background: var(--surface-2); border-color: var(--line); }
.button--secondary:hover { border-color: #40506b; background: var(--surface-3); }
.button--ghost { color: var(--muted); background: transparent; border-color: var(--line); }
.button--small { min-height: 35px; padding: 7px 12px; font-size: 11px; }
.button--wide { width: 100%; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric-grid--compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-card { position: relative; min-height: 125px; padding: 21px; overflow: hidden; background: linear-gradient(145deg, var(--surface), #0e1726); border: 1px solid var(--line); border-radius: var(--radius); }
.metric-card span { display: block; color: var(--muted); font-size: 11px; font-weight: 700; }
.metric-card strong { display: block; margin-top: 16px; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.04em; }
.metric-card i { position: absolute; right: -20px; bottom: -30px; width: 95px; height: 95px; border: 22px solid currentColor; border-radius: 99px; opacity: .06; }
.metric-card--blue { color: var(--blue); }
.metric-card--blue strong, .metric-card--orange strong, .metric-card--yellow strong, .metric-card--green strong { color: var(--text); }
.metric-card--orange { color: var(--orange); }
.metric-card--yellow { color: var(--yellow); }
.metric-card--green { color: var(--green); }

.dashboard-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(290px, .75fr); gap: 18px; margin-top: 18px; }
.dashboard-layout > *, .panel { min-width: 0; }
.dashboard-layout--bottom { align-items: start; }
.panel { padding: 22px; background: linear-gradient(155deg, rgba(16,24,39,.96), rgba(12,19,32,.96)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 34px rgba(0,0,0,.11); }
.panel__header { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 19px; }
.panel h2, .panel__header h2 { margin: 5px 0 0; font-size: 18px; letter-spacing: -.02em; }
.status-distribution { display: grid; gap: 16px; }
.status-row > div:first-child { display: flex; justify-content: space-between; margin-bottom: 7px; color: #c7d0df; font-size: 12px; }
.progress { height: 7px; overflow: hidden; background: #202b3d; border-radius: 99px; }
.progress i { display: block; min-width: 7px; height: 100%; background: var(--blue); border-radius: inherit; }
.progress .progress--warning { background: var(--yellow); }
.progress .progress--success { background: var(--green); }
.progress .progress--danger { background: var(--red); }
.compact-list, .card-list { display: grid; gap: 9px; }
.compact-item, .stock-item, .entity-card { display: flex; align-items: center; gap: 12px; padding: 12px; background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.055); border-radius: 11px; transition: .16s ease; }
.compact-item:hover, .stock-item:hover, .entity-card:hover { background: rgba(255,255,255,.05); border-color: rgba(49,183,243,.25); transform: translateX(2px); }
.compact-item__date { display: grid; place-items: center; width: 40px; height: 42px; flex: 0 0 40px; color: var(--orange); background: var(--orange-soft); border-radius: 9px; font-size: 15px; font-weight: 900; line-height: 1; }
.compact-item__date small { color: #d69a63; font-size: 8px; text-transform: uppercase; }
.compact-item > span:last-child, .stock-item > span, .entity-card > span:nth-child(2) { display: flex; flex: 1; flex-direction: column; gap: 4px; min-width: 0; }
.compact-item strong, .stock-item strong, .entity-card strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.compact-item small, .stock-item small, .entity-card small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.stock-item { justify-content: space-between; }
.stock-item b { display: grid; place-items: center; min-width: 31px; height: 31px; color: var(--orange); background: var(--orange-soft); border-radius: 8px; font-size: 11px; }
.entity-card__icon { display: grid !important; place-items: center; width: 40px; height: 40px; flex: 0 0 40px !important; color: var(--blue); background: var(--blue-soft); border-radius: 10px; font-size: 10px; font-weight: 900; }

.list-panel { padding: 0; overflow: hidden; }
.filter-bar { display: flex; align-items: flex-end; gap: 12px; padding: 17px 18px; border-bottom: 1px solid var(--line-soft); }
.search-box { position: relative; display: flex; align-items: center; flex: 1; min-width: 220px; }
.search-box > span { position: absolute; left: 13px; color: var(--muted); font-size: 18px; }
.search-box input { width: 100%; height: 42px; padding: 0 14px 0 40px; color: var(--text); background: #0c1422; border: 1px solid var(--line); border-radius: 10px; outline: none; }
.search-box input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.select-filter { display: flex; flex-direction: column; gap: 5px; }
.select-filter > span { color: var(--muted-2); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.select-filter select { min-width: 160px; height: 42px; padding: 0 34px 0 12px; color: var(--text); background: #0c1422; border: 1px solid var(--line); border-radius: 10px; outline: none; }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th { padding: 12px 15px; color: var(--muted-2); background: rgba(255,255,255,.015); border-bottom: 1px solid var(--line); font-size: 9px; font-weight: 900; letter-spacing: .08em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 14px 15px; color: #cdd5e2; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr[data-href] { cursor: pointer; transition: background .14s ease; }
.data-table tbody tr[data-href]:hover { background: rgba(49,183,243,.035); }
.data-table td strong, .cell-main { color: var(--text); font-size: 12px; font-weight: 750; }
.data-table td small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.data-table tfoot td { color: var(--text); background: rgba(255,255,255,.025); font-size: 14px; font-weight: 800; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; color: #bdc8d8; background: rgba(148,163,184,.11); border: 1px solid rgba(148,163,184,.15); border-radius: 99px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.badge::before { content: ""; width: 5px; height: 5px; background: currentColor; border-radius: 99px; }
.badge--success, .badge--aprovada, .badge--pronta, .badge--entregue, .badge--concluido, .badge--confirmado, .badge--aprovado, .badge--aprovado_parcial { color: var(--green); background: var(--green-soft); border-color: rgba(54,211,153,.18); }
.badge--warning, .badge--aguardando_aprovacao, .badge--aguardando_peca, .badge--pendente, .badge--rascunho, .badge--enviado { color: var(--yellow); background: var(--yellow-soft); border-color: rgba(247,201,72,.18); }
.badge--info, .badge--em_diagnostico, .badge--em_servico, .badge--em_testes, .badge--em_andamento, .badge--recebida { color: var(--blue); background: var(--blue-soft); border-color: rgba(49,183,243,.18); }
.badge--danger, .badge--cancelada, .badge--nao_aprovada, .badge--estornado, .badge--recusado, .badge--cancelado { color: var(--red); background: var(--red-soft); border-color: rgba(251,113,133,.18); }
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; color: var(--muted); border-top: 1px solid var(--line-soft); font-size: 11px; }
.pagination div { display: flex; gap: 8px; }
.pagination a { padding: 7px 10px; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; }
.empty-state { display: grid; justify-items: center; padding: 45px 20px; color: var(--muted); text-align: center; }
.empty-state > span { margin-bottom: 10px; color: #4b5a72; font-size: 28px; }
.empty-state strong { color: var(--text); }
.empty-state p { margin: 6px 0 0; font-size: 11px; }
.empty-state.compact { padding: 21px 12px; }

.form-panel { max-width: 1060px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.form-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.form-field--wide { grid-column: 1 / -1; }
.form-field > label { color: #b7c1d1; font-size: 10px; font-weight: 800; letter-spacing: .03em; }
.form-field > label b { color: var(--orange); }
.form-control { width: 100%; min-height: 43px; padding: 10px 12px; color: var(--text); background: #0b1321; border: 1px solid var(--line); border-radius: 9px; outline: none; transition: .15s ease; }
.form-control:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
textarea.form-control { min-height: 92px; resize: vertical; line-height: 1.5; }
select.form-control { padding-right: 35px; }
.form-field--checkbox { flex-direction: row; align-items: center; gap: 10px; min-height: 43px; padding: 10px 12px; background: rgba(255,255,255,.025); border: 1px solid var(--line-soft); border-radius: 9px; }
.form-field--checkbox label { order: 2; }
.form-check-input { width: 17px; height: 17px; accent-color: var(--orange); }
.form-field ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.form-field li label { display: flex; align-items: center; gap: 8px; color: #c7d0df; font-size: 11px; }
.field-help { color: var(--muted-2); font-size: 9px; line-height: 1.4; }
.field-error { color: #ff91a1; font-size: 10px; }
.form-alert { margin-bottom: 16px; padding: 12px 14px; color: #ffc2cb; background: var(--red-soft); border: 1px solid rgba(251,113,133,.2); border-radius: 10px; font-size: 11px; }
.form-alert p { margin: 0; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.formset-section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.section-title { margin-bottom: 15px; }
.section-title h2 { margin: 6px 0 0; }
.formset-list { display: grid; gap: 12px; }
.formset-card { padding: 15px; background: rgba(255,255,255,.02); border: 1px solid var(--line-soft); border-radius: 12px; }
.formset-card__title { display: flex; justify-content: space-between; margin-bottom: 13px; font-size: 11px; }
.delete-check { display: flex; align-items: center; gap: 6px; color: var(--red); }
.form-grid--item { grid-template-columns: 90px 120px repeat(2, minmax(120px, 1fr)); }

.detail-hero { align-items: center; padding: 10px 0 3px; }
.detail-identity { display: flex; align-items: center; gap: 18px; }
.identity-avatar { display: grid; place-items: center; width: 68px; height: 68px; flex: 0 0 68px; color: #07111a; background: linear-gradient(135deg, var(--blue), #90e2ff); border-radius: 20px; font-size: 20px; font-weight: 900; box-shadow: 0 16px 40px rgba(49,183,243,.13); }
.detail-hero h1 { margin: 2px 0 6px; font-size: clamp(28px, 4vw, 42px); }
.order-title { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; }
.order-title > span:first-child { color: var(--orange); font-size: 11px; font-weight: 900; letter-spacing: .08em; }
.order-title h1 { margin: 2px 0; }
.summary-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.summary-strip > div { min-width: 0; padding: 17px 19px; border-right: 1px solid var(--line-soft); }
.summary-strip > div:last-child { border-right: 0; }
.summary-strip span { display: block; margin-bottom: 7px; color: var(--muted-2); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.summary-strip strong { display: block; overflow: hidden; color: #dce3ed; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.accent-money { color: var(--green) !important; }
.status-text--success { color: var(--green) !important; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.detail-main { display: grid; gap: 18px; min-width: 0; }
.detail-aside { display: grid; gap: 18px; position: sticky; top: 90px; }
.aside-title { margin: 6px 0 16px !important; }
.tracking-code { display: block; padding: 14px; color: var(--blue); background: rgba(49,183,243,.08); border: 1px solid rgba(49,183,243,.28); border-radius: 10px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 20px; letter-spacing: .12em; text-align: center; user-select: all; }
.tracking-code__help { margin: 12px 0 0; color: var(--muted-2); font-size: 11px; line-height: 1.6; }
.narrative-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.narrative-grid article { min-height: 125px; padding: 15px; background: rgba(255,255,255,.025); border: 1px solid var(--line-soft); border-radius: 11px; }
.narrative-grid span { color: var(--muted-2); font-size: 9px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.narrative-grid p { margin: 10px 0 0; color: #c5cfdd; font-size: 11px; line-height: 1.65; }
.info-list { margin: 13px 0 0; }
.info-list > div { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.info-list > div:last-child { border-bottom: 0; }
.info-list dt { color: var(--muted); font-size: 10px; }
.info-list dd { margin: 0; color: #d5dce7; font-size: 10px; font-weight: 700; text-align: right; }
.budget-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px; background: rgba(255,255,255,.025); border: 1px solid var(--line-soft); border-radius: 11px; }
.budget-card > div { display: flex; flex-direction: column; gap: 5px; }
.budget-card > div .badge { align-self: flex-start; }
.budget-card strong { font-size: 12px; }
.budget-card small { color: var(--muted); font-size: 10px; }
.budget-card > b { color: var(--green); font-size: 15px; white-space: nowrap; }
.timeline { position: relative; display: grid; gap: 0; }
.timeline article { display: grid; grid-template-columns: 17px 1fr; gap: 12px; padding-bottom: 18px; }
.timeline article > i { position: relative; width: 9px; height: 9px; margin-top: 5px; background: var(--blue); border: 2px solid #0e1726; border-radius: 50%; box-shadow: 0 0 0 3px var(--blue-soft); }
.timeline article > i::after { content: ""; position: absolute; top: 10px; left: 2px; width: 1px; height: calc(100% + 17px); background: var(--line); }
.timeline article:last-child > i::after { display: none; }
.timeline article > div { display: flex; flex-direction: column; gap: 4px; }
.timeline span, .timeline small { color: var(--muted-2); font-size: 9px; }
.timeline strong { font-size: 11px; }
.timeline p { margin: 0; color: var(--muted); font-size: 10px; }
.stack-form { display: grid; gap: 13px; }
.document-list { display: grid; gap: 2px; margin-top: 12px; }
.document-list a { display: flex; align-items: center; justify-content: space-between; padding: 9px 2px; color: #bfc9d8; border-bottom: 1px solid var(--line-soft); font-size: 10px; font-weight: 700; }
.document-list a:hover { color: var(--blue); }
.document-list b { font-size: 11px; }

.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.admin-card { display: grid; grid-template-columns: auto 1fr; gap: 17px; align-items: start; }
.admin-card > .button { grid-column: 1 / -1; justify-self: start; }
.admin-card__icon { display: grid; place-items: center; width: 48px; height: 48px; color: var(--blue); background: var(--blue-soft); border: 1px solid rgba(49,183,243,.18); border-radius: 13px; font-size: 11px; font-weight: 900; }
.admin-card__icon--orange { color: var(--orange); background: var(--orange-soft); border-color: rgba(255,138,28,.18); }
.admin-card h2 { margin-top: 6px; }
.admin-card p { margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }

.messages { display: grid; gap: 8px; margin-bottom: 17px; }
.message { padding: 12px 14px; color: #bcead9; background: var(--green-soft); border: 1px solid rgba(54,211,153,.18); border-radius: 10px; font-size: 11px; }
.message--error { color: #ffc1cb; background: var(--red-soft); border-color: rgba(251,113,133,.18); }

.login-page { position: relative; display: grid; place-items: center; min-height: 100vh; padding: 30px; overflow: hidden; background: linear-gradient(90deg, rgba(7,11,20,.94), rgba(7,11,20,.74)), url("../img/brand/brand-background.png") center / cover no-repeat fixed; }
.login-ambient { position: fixed; width: 360px; height: 360px; opacity: .22; filter: blur(70px); border-radius: 50%; pointer-events: none; }
.login-ambient--one { top: -150px; right: 10%; background: var(--orange); }
.login-ambient--two { bottom: -190px; left: 12%; background: var(--blue); }
.login-shell { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, .62fr); width: min(1050px, 100%); min-height: 610px; overflow: hidden; background: rgba(10,16,30,.82); border: 1px solid rgba(148,163,184,.16); border-radius: 26px; box-shadow: 0 40px 110px rgba(0,0,0,.48); backdrop-filter: blur(20px); }
.login-story { display: flex; flex-direction: column; justify-content: center; padding: clamp(42px, 7vw, 80px); background: linear-gradient(150deg, rgba(32,37,95,.35), transparent 70%); border-right: 1px solid var(--line-soft); }
.login-logo { width: 132px; height: 132px; margin-bottom: 38px; object-fit: contain; border-radius: 50%; filter: drop-shadow(0 18px 28px rgba(0,0,0,.35)); }
.login-story h1 { margin: 14px 0 20px; font-size: clamp(38px, 5vw, 62px); line-height: .98; letter-spacing: -.055em; }
.login-story h1 em { color: var(--orange); font-style: normal; }
.login-story > p { max-width: 520px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.login-features { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 35px; }
.login-features span { padding: 7px 10px; color: #afbacb; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.07); border-radius: 99px; font-size: 9px; font-weight: 700; }
.login-card { display: flex; flex-direction: column; justify-content: center; padding: clamp(35px, 5vw, 58px); background: rgba(7,11,20,.48); }
.login-card__header { display: flex; align-items: center; gap: 13px; margin-bottom: 30px; }
.mini-mark { display: grid; place-items: center; width: 43px; height: 43px; color: #07111a; background: var(--orange); border-radius: 12px; font-size: 11px; font-weight: 900; }
.mini-logo { width: 48px; height: 48px; object-fit: contain; border-radius: 50%; box-shadow: 0 8px 22px rgba(0,0,0,.28), 0 0 0 1px rgba(49,183,243,.18); }
.login-card__header > div { display: flex; flex-direction: column; gap: 4px; }
.login-card__header strong { font-size: 18px; }
.login-card__header small { color: var(--muted); font-size: 10px; }
.login-form { display: grid; gap: 17px; }
.login-help { margin: 23px 0 0; color: var(--muted-2); font-size: 9px; line-height: 1.5; text-align: center; }
.login-back { display: inline-flex; margin: -5px 0 18px; color: var(--blue); font-size: 11px; font-weight: 700; }
.login-back:hover { color: #86d9ff; }

/* Portal público */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.public-page { overflow-x: hidden; background: linear-gradient(rgba(7,11,20,.94), rgba(7,11,20,.97)), url("../img/brand/brand-background.png") center / cover fixed no-repeat; }
.public-container { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.public-header { position: sticky; top: 0; z-index: 30; min-height: 76px; background: rgba(7,11,20,.86); border-bottom: 1px solid var(--line-soft); backdrop-filter: blur(18px); }
.public-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 24px; }
.public-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.public-brand img { width: 49px; height: 49px; object-fit: contain; border-radius: 50%; box-shadow: 0 8px 22px rgba(0,0,0,.3), 0 0 0 1px rgba(49,183,243,.18); }
.public-brand span { display: flex; flex-direction: column; }
.public-brand strong { font-size: 13px; letter-spacing: .1em; }
.public-brand small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.public-header__actions, .public-health { display: flex; align-items: center; gap: 10px; }
.public-health { padding-right: 8px; }
.health-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; color: var(--muted); background: rgba(255,255,255,.025); border: 1px solid var(--line-soft); border-radius: 99px; font-size: 10px; white-space: nowrap; }
.health-pill i { width: 6px; height: 6px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 4px var(--green-soft); }
.health-pill.is-offline { color: var(--red); }
.health-pill.is-offline i { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.public-hero { position: relative; display: grid; place-items: center; min-height: 620px; overflow: hidden; background: url("../img/brand/brand-background.png") center / cover no-repeat; border-bottom: 1px solid var(--line-soft); }
.public-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,11,20,.98) 0%, rgba(7,11,20,.89) 42%, rgba(7,11,20,.42) 76%, rgba(7,11,20,.55) 100%), linear-gradient(180deg, rgba(7,11,20,.08), #070b14 100%); }
.public-glow { position: absolute; width: 280px; height: 280px; filter: blur(90px); opacity: .14; border-radius: 50%; }
.public-glow--blue { top: 15%; left: 8%; background: var(--blue); }
.public-glow--orange { right: 7%; bottom: 5%; background: var(--orange); }
.public-hero__content { position: relative; z-index: 2; padding: 84px 0 92px; text-align: left; }
.public-hero__logo { display: block; width: 112px; height: 112px; margin: 0 0 25px; object-fit: contain; border-radius: 50%; filter: drop-shadow(0 18px 32px rgba(0,0,0,.38)); }
.public-kicker { display: inline-flex; align-items: center; gap: 9px; color: var(--blue); font-size: 10px; font-weight: 900; letter-spacing: .18em; }
.public-kicker i { width: 7px; height: 7px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 5px var(--green-soft); }
.public-hero h1 { max-width: 760px; margin: 25px 0 18px; font-size: clamp(42px, 6.5vw, 76px); line-height: .98; letter-spacing: -.055em; }
.public-hero h1 em { color: var(--orange); font-style: normal; }
.public-hero__content > p { max-width: 620px; margin: 0; color: #aab5c7; font-size: 16px; line-height: 1.7; }
.public-hero__actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: min(760px, 100%); margin-top: 27px; }
.social-action { display: flex; align-items: center; min-width: 0; min-height: 64px; gap: 11px; padding: 10px 12px; background: rgba(16,24,39,.9); border: 1px solid #30405b; border-radius: 13px; box-shadow: 0 14px 32px rgba(0,0,0,.18); transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.social-action:hover { transform: translateY(-2px); background: rgba(21,31,49,.97); box-shadow: 0 19px 38px rgba(0,0,0,.28); }
.social-action__icon { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; }
.social-action__icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.social-action__icon .social-action__icon-dot { fill: currentColor; stroke: none; }
.social-action__text { display: flex; flex: 1; flex-direction: column; min-width: 0; gap: 3px; }
.social-action__text strong, .social-action__text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.social-action__text strong { font-size: 11px; }
.social-action__text small { color: var(--muted); font-size: 8px; letter-spacing: .04em; }
.social-action__arrow { color: var(--muted-2); font-size: 13px; transition: color .18s ease, transform .18s ease; }
.social-action:hover .social-action__arrow { color: var(--text); transform: translate(1px, -1px); }
.social-action--whatsapp:hover { border-color: rgba(54,211,153,.55); }
.social-action--whatsapp .social-action__icon { color: var(--green); background: var(--green-soft); }
.social-action--instagram:hover { border-color: rgba(255,138,28,.55); }
.social-action--instagram .social-action__icon { color: #fff; background: linear-gradient(135deg, #7c3aed, #e1306c 52%, #ff9b3d); }
.social-action--google:hover { border-color: rgba(49,183,243,.55); }
.social-action--google .social-action__icon { color: var(--yellow); background: var(--yellow-soft); }
.social-action--google .social-action__icon svg { fill: currentColor; stroke: none; }
.public-search { position: relative; display: grid; grid-template-columns: 1fr auto; width: min(760px, 100%); margin: 39px 0 0; padding: 7px; background: rgba(16,24,39,.94); border: 1px solid #30405b; border-radius: 15px; box-shadow: 0 24px 70px rgba(0,0,0,.38), 0 0 0 5px rgba(49,183,243,.035); }
.public-search__icon { position: absolute; left: 22px; top: 50%; color: var(--blue); font-size: 22px; transform: translateY(-50%); }
.public-search input { min-width: 0; min-height: 52px; padding: 0 18px 0 50px; color: var(--text); background: transparent; border: 0; outline: 0; font-size: 14px; }
.public-search input::placeholder { color: #69778d; }
.public-search .button { min-height: 52px; padding-inline: 22px; }
.public-search__help { display: block; margin-top: 14px; color: var(--muted-2); font-size: 10px; }
.public-results { padding: 64px 0 72px; background: #080d17; border-bottom: 1px solid var(--line-soft); }
.public-section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.public-section-title h2 { margin: 7px 0 0; font-size: clamp(27px, 3.2vw, 38px); letter-spacing: -.035em; }
.public-section-title p { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.public-section-title--center { justify-content: center; text-align: center; }
.public-notice { display: flex; align-items: center; gap: 13px; padding: 18px; color: #cbd5e1; background: rgba(49,183,243,.07); border: 1px solid rgba(49,183,243,.18); border-radius: 13px; }
.public-notice span { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; color: var(--blue); background: var(--blue-soft); border-radius: 8px; font-weight: 900; }
.public-notice p { margin: 0; font-size: 12px; }
.public-order-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.public-order-card { min-width: 0; padding: 24px; background: linear-gradient(145deg, #111a2b, #0c1422); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 18px 48px rgba(0,0,0,.15); }
.public-order-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.public-order-card__top h3 { margin: 6px 0 0; font-size: 26px; letter-spacing: -.035em; }
.public-order-card__identity { display: flex; align-items: center; gap: 13px; margin: 24px 0 19px; }
.public-order-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; color: var(--blue); background: var(--blue-soft); border: 1px solid rgba(49,183,243,.14); border-radius: 12px; font-size: 10px; font-weight: 900; }
.public-order-card__identity div { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.public-order-card__identity strong { font-size: 14px; }
.public-order-card__identity small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.public-progress { height: 7px; overflow: hidden; background: #202b3d; border-radius: 99px; }
.public-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--green)); border-radius: inherit; box-shadow: 0 0 18px rgba(54,211,153,.24); }
.public-order-dates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 20px; background: rgba(255,255,255,.018); border: 1px solid var(--line-soft); border-radius: 11px; }
.public-order-dates div { min-width: 0; padding: 13px; border-right: 1px solid var(--line-soft); }
.public-order-dates div:last-child { border: 0; }
.public-order-dates span, .public-order-dates strong { display: block; }
.public-order-dates span { color: var(--muted-2); font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.public-order-dates strong { margin-top: 5px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.public-order-card__privacy { margin: 16px 0 0; color: var(--muted-2); font-size: 9px; line-height: 1.5; }
.public-services { padding: 82px 0 92px; background: rgba(8,13,23,.94); border-bottom: 1px solid var(--line-soft); }
.rating-badge { width: min(255px, 100%); height: auto; object-fit: contain; border-radius: 10px; }
.rating-badge--large { width: min(360px, 100%); margin-top: 28px; box-shadow: 0 14px 36px rgba(0,0,0,.25); }
.service-showcase { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.service-showcase__card { min-width: 0; overflow: hidden; background: linear-gradient(155deg, rgba(17,26,43,.98), rgba(10,17,30,.98)); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 48px rgba(0,0,0,.18); }
.service-showcase__card > a { display: block; overflow: hidden; background: #060b17; }
.service-showcase__card img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; transition: transform .35s ease, filter .35s ease; }
.service-showcase__card:hover img { transform: scale(1.025); filter: saturate(1.08); }
.service-showcase__card > div { display: flex; flex-direction: column; gap: 5px; padding: 17px 18px 19px; }
.service-showcase__card span { color: var(--blue); font-size: 8px; font-weight: 900; letter-spacing: .13em; }
.service-showcase__card strong { font-size: 13px; }
.public-reputation { padding: 90px 0; background: linear-gradient(135deg, rgba(10,17,30,.97), rgba(15,14,43,.94)); border-bottom: 1px solid var(--line-soft); }
.reputation-layout { display: grid; grid-template-columns: minmax(0, .78fr) minmax(390px, 1.05fr); gap: clamp(35px, 7vw, 86px); align-items: center; }
.reputation-copy h2 { margin: 13px 0 20px; font-size: clamp(34px, 4.5vw, 58px); line-height: 1.02; letter-spacing: -.05em; }
.reputation-copy p { max-width: 520px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.75; }
.review-art { margin: 0; overflow: hidden; background: #090e1b; border: 1px solid #30405b; border-radius: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.36); }
.review-art img { display: block; width: 100%; height: auto; }
.public-brand-banner { padding: 82px 0; background: rgba(6,10,18,.96); border-bottom: 1px solid var(--line-soft); }
.public-brand-banner img { display: block; width: 100%; height: auto; border: 1px solid #30405b; border-radius: 20px; box-shadow: 0 28px 80px rgba(0,0,0,.32); }
.public-journey { padding: 80px 0 92px; background: linear-gradient(180deg, #070b14, #090f1c); }
.journey-grid { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 38px; }
.journey-grid::before { content: ""; position: absolute; top: 22px; left: 11%; right: 11%; height: 1px; background: linear-gradient(90deg, var(--blue), var(--orange)); opacity: .32; }
.journey-grid article { position: relative; z-index: 2; padding: 24px 20px; text-align: center; background: rgba(16,24,39,.7); border: 1px solid var(--line-soft); border-radius: 15px; }
.journey-grid article > span { display: grid; place-items: center; width: 44px; height: 44px; margin: -3px auto 17px; color: #07111a; background: linear-gradient(135deg, var(--blue), #8be1ff); border: 5px solid #0b1220; border-radius: 50%; font-size: 9px; font-weight: 900; }
.journey-grid article:nth-child(3) > span, .journey-grid article:nth-child(4) > span { background: linear-gradient(135deg, var(--orange), #ffc477); }
.journey-grid strong { font-size: 14px; }
.journey-grid p { margin: 9px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.public-footer { padding: 24px 0; color: var(--muted-2); background: #060a12; border-top: 1px solid var(--line-soft); font-size: 10px; }
.public-footer .public-container { display: flex; justify-content: space-between; gap: 20px; }

@media (max-width: 1180px) {
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-grid--item { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
    .sidebar { transform: translateX(-100%); transition: transform .22s ease; }
    body.sidebar-open .sidebar { transform: translateX(0); box-shadow: 24px 0 70px rgba(0,0,0,.45); }
    .workspace { margin-left: 0; }
    .menu-button, .sidebar__close { display: grid; }
    .sidebar-overlay { position: fixed; inset: 0; z-index: 40; display: none; background: rgba(0,0,0,.58); backdrop-filter: blur(3px); }
    body.sidebar-open .sidebar-overlay { display: block; }
    .topbar { justify-content: flex-start; gap: 13px; }
    .topbar__right { margin-left: auto; }
    .dashboard-layout, .detail-layout { grid-template-columns: minmax(0, 1fr); }
    .detail-aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .login-shell { grid-template-columns: 1fr 390px; }
    .login-story { padding: 45px; }
    .public-health .health-pill:first-child { display: none; }
    .public-order-grid { grid-template-columns: 1fr; }
    .service-showcase { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .reputation-layout { grid-template-columns: minmax(0, 1fr); }
    .reputation-copy { text-align: center; }
    .reputation-copy p { margin-inline: auto; }
}

@media (max-width: 760px) {
    .content { padding: 25px 16px 55px; }
    .page-hero, .page-header, .detail-hero { align-items: flex-start; flex-direction: column; }
    .page-hero { min-height: 0; padding: 27px 23px; }
    .page-actions, .page-actions .button { width: 100%; }
    .metric-grid, .metric-grid--compact, .summary-strip, .admin-grid, .narrative-grid, .detail-aside { grid-template-columns: 1fr; }
    .summary-strip > div { border-right: 0; border-bottom: 1px solid var(--line-soft); }
    .summary-strip > div:last-child { border-bottom: 0; }
    .filter-bar { align-items: stretch; flex-direction: column; }
    .select-filter select { width: 100%; }
    .form-grid, .form-grid--item { grid-template-columns: 1fr; }
    .form-field--wide { grid-column: auto; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .button { width: 100%; }
    .login-page { padding: 15px; }
    .login-shell { grid-template-columns: 1fr; min-height: 0; }
    .login-story { display: none; }
    .login-card { min-height: 560px; padding: 32px; }
    .identity-avatar { width: 55px; height: 55px; flex-basis: 55px; border-radius: 16px; }
    .topbar__date { display: none; }
    .live-indicator { font-size: 0; }
    .public-container { width: min(100% - 30px, 1160px); }
    .public-header__inner { min-height: 68px; }
    .public-header__actions { gap: 7px; }
    .public-health { padding: 0; }
    .health-pill { padding: 7px; font-size: 0; }
    .public-brand img { width: 43px; height: 43px; }
    .public-brand small { display: none; }
    .public-header .button { min-height: 38px; padding: 7px 11px; font-size: 10px; }
    .public-hero { min-height: 590px; background-position: 64% center; }
    .public-hero::before { background: linear-gradient(180deg, rgba(7,11,20,.78), rgba(7,11,20,.93)); }
    .public-hero__content { padding: 67px 0 73px; text-align: center; }
    .public-hero__logo { width: 96px; height: 96px; margin: 0 auto 23px; }
    .public-hero h1 { font-size: clamp(39px, 12vw, 56px); }
    .public-hero__content > p { margin-inline: auto; font-size: 14px; }
    .public-hero__actions { grid-template-columns: 1fr; margin: 25px auto 0; }
    .social-action { min-height: 58px; text-align: left; }
    .social-action__text strong { font-size: 12px; }
    .public-search { grid-template-columns: 1fr; gap: 6px; padding: 7px; }
    .public-search { margin-inline: auto; }
    .public-search__icon { top: 34px; }
    .public-search .button { width: 100%; }
    .public-results { padding: 48px 0 55px; }
    .public-section-title { align-items: flex-start; flex-direction: column; }
    .rating-badge { width: min(280px, 100%); }
    .public-services, .public-reputation, .public-brand-banner { padding: 55px 0; }
    .public-order-card { padding: 20px; }
    .public-order-dates { grid-template-columns: 1fr; }
    .public-order-dates div { border-right: 0; border-bottom: 1px solid var(--line-soft); }
    .public-order-dates div:last-child { border-bottom: 0; }
    .journey-grid { grid-template-columns: 1fr 1fr; }
    .journey-grid::before { display: none; }
    .public-footer .public-container { align-items: center; flex-direction: column; text-align: center; }
}

@media (max-width: 430px) {
    .topbar__context span { display: none; }
    .metric-grid { grid-template-columns: 1fr; }
    .metric-card { min-height: 105px; }
    .detail-identity { align-items: flex-start; }
    .order-title { align-items: flex-start; flex-direction: column; }
    .public-brand strong { font-size: 11px; }
    .public-header .button span { display: none; }
    .public-order-card__top { align-items: flex-start; flex-direction: column; }
    .service-showcase { grid-template-columns: 1fr; }
    .service-showcase__card > div { padding: 15px 16px 17px; }
    .journey-grid { grid-template-columns: 1fr; }
}
