/* aOKtion by YENTXA — estilos (base do Portal YENTXA)
   Cores da marca YENTXA: noite #13254A · turquesa #12A39B / #3CCFC5 · azul #4A7FC1 / #6FA3D8 · acento leilão #F5A524 */

:root {
  --night: #13254A;
  --night-2: #1B3160;
  --night-3: #0D1A36;
  --teal: #12A39B;
  --teal-dark: #0E857F;
  --teal-light: #3CCFC5;
  --blue: #4A7FC1;
  --blue-light: #6FA3D8;
  --grad: linear-gradient(90deg, #12A39B, #4A7FC1);
  --grad-light: linear-gradient(90deg, #3CCFC5, #6FA3D8);

  --ink: #14223D;
  --ink-2: #44546E;
  --ink-3: #6B7A91;
  --line: #DFE5EE;
  --line-2: #EDF1F6;
  --bg: #F4F6FA;
  --surface: #FFFFFF;

  --ok: #0E857F;
  --ok-bg: #E3F6F4;
  --warn: #9A6400;
  --warn-bg: #FFF4DC;
  --danger: #B42335;
  --danger-bg: #FDECEE;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(19, 37, 74, .06), 0 4px 16px rgba(19, 37, 74, .06);
  --focus: 0 0 0 3px rgba(18, 163, 155, .35);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--ink); background: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-dark); text-underline-offset: 2px; }
a:hover { color: var(--night); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; color: var(--night); letter-spacing: -.01em; }
h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.1rem; font-weight: 650; }
p { margin: 0 0 1em; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -40px; background: var(--night); color: #fff; padding: 8px 14px; border-radius: var(--radius-sm); z-index: 100; }
.skip-link:focus { top: 12px; color: #fff; }
.muted { color: var(--ink-3); }
.nowrap { white-space: nowrap; }
.lead { font-size: 1.02rem; color: var(--ink-2); margin-bottom: 1.5rem; }
.lead-sm { color: var(--ink-2); margin: 0; }
.eyebrow { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-dark); margin: 0 0 .5rem; }

/* ---------- Botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .68rem 1.15rem; border-radius: var(--radius-sm); border: 1px solid transparent; font: inherit; font-weight: 600; font-size: .95rem; line-height: 1.2; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); color: #fff; }
.btn-secondary { background: #fff; color: var(--night); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--night); color: var(--night); }
.btn-danger { background: #fff; color: var(--danger); border-color: #F0C2C8; }
.btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-ghost-light { background: transparent; color: #DCE6F5; border-color: rgba(255, 255, 255, .22); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.btn-sm { padding: .42rem .8rem; font-size: .86rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }

/* ---------- Formulários ---------- */
.form { display: flex; flex-direction: column; gap: 1.05rem; }
.form > .btn:not(.btn-block) { align-self: flex-start; }
.field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.field label, .label-row label { font-weight: 600; font-size: .9rem; color: var(--ink); }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.small-link { font-size: .85rem; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=url], input[type=search], input[type=number], input[type=date], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid #CBD4E1; border-radius: var(--radius-sm); padding: .62rem .75rem; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 80px; }
input:hover, select:hover, textarea:hover { border-color: #9FB0C8; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: var(--focus); }
input:disabled { background: var(--line-2); color: var(--ink-3); }
[aria-invalid=true] { border-color: var(--danger) !important; }
.field-error { color: var(--danger); font-size: .84rem; margin: 0; }
.hint { color: var(--ink-3); font-size: .82rem; margin: 0; }
.req { color: var(--danger); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.form-section legend { font-size: .76rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; color: var(--ink-3); padding: 0; margin-bottom: .85rem; width: 100%; border-bottom: 1px solid var(--line); padding-bottom: .5rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.span-2 { grid-column: span 2; }
.check { display: flex; align-items: flex-start; gap: .6rem; font-size: .9rem; color: var(--ink-2); cursor: pointer; }
.check input { margin-top: .22rem; width: 17px; height: 17px; accent-color: var(--teal); flex: none; }
.checks { display: flex; flex-direction: column; gap: .7rem; }
.form-alt { text-align: center; margin: 1.5rem 0 0; color: var(--ink-2); font-size: .92rem; }

.type-picker legend { font-weight: 600; font-size: .9rem; margin-bottom: .5rem; }
.type-picker { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.type-picker legend { grid-column: span 2; }
.type-option { position: relative; cursor: pointer; }
.type-option input { position: absolute; opacity: 0; inset: 0; }
.type-card { display: flex; flex-direction: column; gap: .15rem; padding: .85rem 1rem .85rem 2.6rem; border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; position: relative; transition: border-color .15s, background .15s; }
.type-card::before { content: ""; position: absolute; left: 1rem; top: 1.05rem; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #9FB0C8; background: #fff; }
.type-card strong { color: var(--night); }
.type-card small { color: var(--ink-3); }
.type-option input:checked + .type-card { border-color: var(--teal); background: #F1FBFA; }
.type-option input:checked + .type-card::before { border: 5px solid var(--teal); }
.type-option input:focus-visible + .type-card { box-shadow: var(--focus); }

/* ---------- Alertas ---------- */
.alert { display: flex; gap: .65rem; align-items: flex-start; padding: .8rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1.25rem; font-size: .92rem; border: 1px solid; }
.alert-icon { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 800; color: #fff; margin-top: 1px; }
.alert-success { background: var(--ok-bg); border-color: #BCE7E2; color: #0A5F5A; }
.alert-success .alert-icon { background: var(--ok); }
.alert-error { background: var(--danger-bg); border-color: #F5C6CC; color: #8C1A29; }
.alert-error .alert-icon { background: var(--danger); }

/* ---------- Língua ---------- */
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: #fff; }
.lang-switch a { padding: .2rem .62rem; font-size: .76rem; font-weight: 700; letter-spacing: .05em; color: var(--ink-3); text-decoration: none; border-radius: 999px; }
.lang-switch a.active { background: var(--night); color: #fff; }
.lang-switch a:not(.active):hover { color: var(--night); }

/* ---------- Ecrãs de login / registo ---------- */
.auth-body { background: #fff; }
.auth-shell { display: grid; grid-template-columns: minmax(320px, 40%) 1fr; min-height: 100vh; }
.auth-brand { position: sticky; top: 0; height: 100vh; overflow: hidden; background: var(--night); color: #C9D5E8; padding: 48px 52px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.auth-brand::before { content: ""; position: absolute; width: 640px; height: 640px; right: -300px; bottom: -260px; border-radius: 50%; border: 56px solid rgba(60, 207, 197, .07); }
.auth-brand::after { content: ""; position: absolute; width: 360px; height: 360px; right: -120px; bottom: -80px; border-radius: 50%; border: 2px solid rgba(111, 163, 216, .18); }
.auth-brand > * { position: relative; z-index: 1; }
.auth-logo img { width: 190px; }
.auth-brand-copy { max-width: 400px; }
.auth-brand .eyebrow { color: var(--teal-light); }
.auth-brand h2 { color: #fff; font-size: 1.9rem; font-weight: 700; margin-bottom: .75rem; }
.auth-brand p { color: #B3C2DA; }
.check-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-direction: column; gap: .7rem; }
.check-list li { position: relative; padding-left: 1.9rem; color: #DCE5F3; }
.check-list li::before { content: ""; position: absolute; left: 0; top: .2em; width: 18px; height: 18px; border-radius: 50%; background: var(--grad-light); }
.check-list li::after { content: ""; position: absolute; left: 6px; top: calc(.2em + 4px); width: 5px; height: 8px; border: solid var(--night); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.auth-brand-foot { font-size: .8rem; color: #7F93B5 !important; margin: 0; }
.auth-main { display: flex; flex-direction: column; padding: 24px 32px; min-width: 0; }
.auth-top { display: flex; justify-content: flex-end; }
.auth-card { width: 100%; max-width: 420px; margin: auto; padding: 32px 0; }
.auth-card-wide { max-width: 640px; }
.auth-foot { display: flex; justify-content: center; gap: .6rem; font-size: .82rem; color: var(--ink-3); }
.auth-foot a { color: var(--ink-3); }

.done { text-align: center; padding: 1rem 0; }
.done .lead { max-width: 420px; margin-left: auto; margin-right: auto; }
.done-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 1.25rem; background: var(--grad); color: #fff; font-size: 1.8rem; font-weight: 700; }
.error-code { font-size: 4rem; font-weight: 800; margin: 0; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }

/* ---------- Páginas simples (privacidade sem login) ---------- */
.plain-header { background: var(--night); padding: 14px 24px; display: flex; justify-content: space-between; align-items: center; }
.plain-logo img { width: 104px; }
.plain-main { max-width: 760px; margin: 0 auto; padding: 40px 20px 64px; }
.plain-header .lang-switch { background: transparent; border-color: rgba(255, 255, 255, .2); }
.plain-header .lang-switch a { color: #B3C2DA; }
.plain-header .lang-switch a.active { background: #fff; color: var(--night); }

.prose { background: #fff; padding: 36px 40px; border-radius: var(--radius); box-shadow: var(--shadow); }
.prose h2 { margin-top: 1.8rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }

/* ---------- Área autenticada ---------- */
.topbar { background: var(--night); position: sticky; top: 0; z-index: 20; border-bottom: 3px solid; border-image: var(--grad) 1; }
.topbar-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; gap: 2rem; }
.topbar-logo img { width: 96px; }
.main-nav { display: flex; align-items: center; gap: .25rem; flex: 1; }
.main-nav > a { color: #B9C7DD; text-decoration: none; font-weight: 600; font-size: .92rem; padding: .5rem .8rem; border-radius: var(--radius-sm); }
.main-nav > a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.main-nav > a.active { color: #fff; background: rgba(60, 207, 197, .14); }
.nav-end { margin-left: auto; display: flex; align-items: center; gap: 1rem; }
.topbar .lang-switch { background: transparent; border-color: rgba(255, 255, 255, .2); }
.topbar .lang-switch a { color: #B3C2DA; }
.topbar .lang-switch a.active { background: #fff; color: var(--night); }
.user-chip { display: flex; align-items: center; gap: .55rem; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--grad-light); color: var(--night); font-weight: 800; font-size: .8rem; flex: none; }
.user-chip-text { display: flex; flex-direction: column; line-height: 1.2; max-width: 180px; }
.user-chip-text strong { color: #fff; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip-text small { color: #8FA2C2; font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logout-form { margin: 0; }
.nav-toggle { display: none; margin-left: auto; background: transparent; border: 1px solid rgba(255, 255, 255, .25); border-radius: var(--radius-sm); width: 42px; height: 38px; cursor: pointer; }
.burger, .burger::before, .burger::after { display: block; width: 18px; height: 2px; background: #fff; margin: 0 auto; position: relative; transition: transform .2s; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -6px; }
.burger::after { top: 6px; }

.app-main { min-height: calc(100vh - 64px - 60px); }
.container { max-width: 1200px; margin: 0 auto; padding: 32px 24px 48px; }
.app-footer { border-top: 1px solid var(--line); background: #fff; }
.app-footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; font-size: .82rem; color: var(--ink-3); }
.app-footer a { color: var(--ink-3); }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
.page-head h1 { margin-bottom: .3rem; }
.page-head .lead { margin-bottom: 0; }
.breadcrumb { margin: 0 0 .75rem; font-size: .88rem; }
.breadcrumb a { text-decoration: none; color: var(--ink-3); }
.breadcrumb a:hover { color: var(--night); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); min-width: 0; }
.panel-flush { padding: 0; overflow: hidden; }
.panel-pad { padding: 22px 24px; margin: 0; }
.panel-title { font-size: 1rem; margin-bottom: 1rem; }
.panel-accent { background: var(--night); border-color: var(--night); color: #C9D5E8; }
.panel-accent .panel-title { color: #fff; }
.panel-accent .strong-link { color: var(--teal-light); font-weight: 700; }
.panel-highlight { border-top: 3px solid var(--teal); }
.panel-foot { margin: 1rem 0 0; }
.stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.split { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-top: 20px; align-items: start; }
.split-wide { grid-template-columns: 3fr 2fr; margin-top: 24px; }
.split-detail { grid-template-columns: 1.15fr 1fr; margin-top: 0; }
.split-even { grid-template-columns: 1fr 1fr; margin-top: 0; }

.module-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.module-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .35rem; position: relative; }
.module-card h2 { font-size: 1rem; margin: .5rem 0 0; }
.module-card p { color: var(--ink-3); font-size: .88rem; margin: 0 0 .75rem; flex: 1; }
.module-icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; color: var(--teal-dark); background: #E7F7F6; }
.module-card.is-soon .module-icon { color: var(--blue); background: #EBF2FB; }

.badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 700; letter-spacing: .04em; padding: .18rem .55rem; border-radius: 999px; text-transform: uppercase; width: fit-content; white-space: nowrap; }
.badge-soon { background: var(--line-2); color: var(--ink-3); }
.badge-client { background: #EBF2FB; color: #2F5E9B; }
.badge-supplier { background: #E7F7F6; color: var(--teal-dark); }
.badge-muted { background: var(--line-2); color: var(--ink-3); text-transform: none; letter-spacing: 0; font-weight: 600; }

.status { display: inline-flex; align-items: center; gap: .4rem; font-size: .86rem; font-weight: 600; white-space: nowrap; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-pending { color: var(--warn); }
.status-approved { color: var(--ok); }
.status-rejected { color: var(--ink-3); }
.status-suspended { color: var(--danger); }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; text-decoration: none; display: flex; flex-direction: column; gap: .2rem; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.stat:hover { border-color: var(--teal); transform: translateY(-1px); }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--night); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--ink-3); font-size: .88rem; font-weight: 600; }
.stat-warn { border-top: 3px solid #F2B33D; }
.stat-warn .stat-value { color: var(--warn); }
.stat-muted .stat-value { color: var(--ink-3); }

.list { list-style: none; margin: 0; padding: 0; }
.list-row { display: flex; align-items: center; gap: 1rem; padding: .85rem 0; border-top: 1px solid var(--line-2); }
.list-row:first-child { border-top: 0; padding-top: 0; }
.list-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.list-main .muted { font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline-item { display: grid; grid-template-columns: 14px 1fr; gap: .8rem; position: relative; padding-bottom: 1rem; }
.timeline-item:not(:last-child)::before { content: ""; position: absolute; left: 6px; top: 14px; bottom: 0; width: 2px; background: var(--line); }
.timeline-dot { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--teal); margin-top: 4px; position: relative; z-index: 1; }
.timeline-item.is-internal .timeline-dot { border-color: #A9B6C9; }
.timeline-text { margin: 0; font-size: .92rem; }
.timeline-note { margin: .2rem 0 0; font-size: .86rem; color: var(--ink-2); background: var(--bg); padding: .35rem .6rem; border-radius: var(--radius-sm); }
.timeline-meta { margin: .1rem 0 0; font-size: .78rem; color: var(--ink-3); }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 16px; }
.tabs { display: flex; gap: .25rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 4px; overflow-x: auto; }
.tabs a { padding: .42rem .85rem; border-radius: var(--radius-sm); text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .88rem; white-space: nowrap; display: inline-flex; align-items: center; gap: .4rem; }
.tabs a:hover { color: var(--night); background: var(--bg); }
.tabs a.active { background: var(--night); color: #fff; }
.tab-count { background: rgba(127, 147, 181, .2); border-radius: 999px; padding: 0 .45rem; font-size: .75rem; }
.tabs a.active .tab-count { background: rgba(255, 255, 255, .2); }
.filters { display: flex; gap: .5rem; align-items: center; }
.filters select { width: auto; }
.filters input[type=search] { width: 260px; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; padding: .8rem 1rem; background: #F8FAFC; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: .85rem 1rem; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #FAFBFD; }
.cell-sub { display: block; color: var(--ink-3); font-size: .82rem; }
.cell-action { text-align: right; }

.dl { margin: 0; }
.dl-row { display: grid; grid-template-columns: 38% 1fr; gap: 1rem; padding: .55rem 0; border-top: 1px solid var(--line-2); }
.dl-row:first-child { border-top: 0; padding-top: 0; }
.dl dt { color: var(--ink-3); font-size: .86rem; }
.dl dd { margin: 0; font-size: .92rem; overflow-wrap: anywhere; }

/* ---------- Responsivo ---------- */
@media (max-width: 1080px) {
  .module-grid, .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .split, .split-wide, .split-detail { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { position: relative; height: auto; padding: 22px 20px; gap: 0; flex-direction: row; align-items: center; }
  .auth-brand-copy, .auth-brand-foot { display: none; }
  .auth-logo img { width: 112px; }
  .auth-main { padding: 16px; }
  .auth-card { padding: 16px 0 32px; }

  .nav-toggle { display: block; }
  .topbar-inner { gap: 1rem; padding: 0 16px; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 64px; background: var(--night-3); flex-direction: column; align-items: stretch; padding: 12px 16px 18px; gap: .2rem; box-shadow: 0 12px 24px rgba(0, 0, 0, .25); }
  .main-nav.open { display: flex; }
  .nav-end { margin: .75rem 0 0; padding-top: .9rem; border-top: 1px solid rgba(255, 255, 255, .1); flex-wrap: wrap; justify-content: space-between; }
  .split-even { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  h1 { font-size: 1.45rem; }
  .container { padding: 22px 16px 36px; }
  .grid-2, .type-picker { grid-template-columns: 1fr; }
  .span-2, .type-picker legend { grid-column: auto; }
  .module-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; }
  .stat-value { font-size: 1.6rem; }
  .panel { padding: 18px 16px; }
  .prose { padding: 24px 18px; }
  .filters { width: 100%; flex-wrap: wrap; }
  .filters select { flex: 1 1 100%; width: 100%; }
  .filters input[type=search] { flex: 1; width: auto; min-width: 0; }
  .list-row { flex-wrap: wrap; gap: .5rem .75rem; }
  .list-main { flex-basis: 100%; }
  .dl-row { grid-template-columns: 1fr; gap: .1rem; }

  /* Tabela em cartões */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: .75rem 1rem; border-bottom: 1px solid var(--line); }
  .table td { border: 0; padding: .3rem 0; display: grid; grid-template-columns: 84px 1fr; gap: .75rem; align-items: baseline; }
  .table td::before { content: attr(data-label); color: var(--ink-3); font-size: .78rem; font-weight: 600; }
  .table td .cell { min-width: 0; overflow-wrap: anywhere; }
  .table td.nowrap { white-space: normal; }
  .table td.cell-action { display: flex; justify-content: flex-end; padding-top: .5rem; }
  .table td.cell-action::before { content: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- Sourcing: processos, cotações, encomendas ---------- */
.user-chip { text-decoration: none; border-radius: var(--radius-sm); padding: 2px 4px; }
.user-chip:hover .user-chip-text strong { text-decoration: underline; }
.small-link { font-weight: 600; text-decoration: none; }
.sub-title { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 1.25rem 0 .5rem; }
.pre { white-space: pre-wrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.ref { font-size: .78rem; font-weight: 700; letter-spacing: .04em; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.bullets { margin: 0 0 1rem; padding-left: 1.2rem; }
.bullets li { margin-bottom: .3rem; }
.bullets.numbered { list-style: decimal; }
code { font-size: .86em; background: var(--line-2); padding: .05rem .35rem; border-radius: 4px; }
.box { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .8rem 1rem; background: #FAFBFD; margin: 1rem 0 0; }
.box > summary { cursor: pointer; font-weight: 600; color: var(--night); }
.box[open] > summary { margin-bottom: .75rem; }
.empty-state { text-align: center; padding: 40px 24px; }
.empty-state p { color: var(--ink-2); max-width: 460px; margin: 0 auto 1rem; }
.panel-title-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1rem; }
.panel-title-row .panel-title { margin: 0; }
.panel-pad-sm { padding: 14px 16px; }
.alert-attn { border-left: 4px solid #F2B33D; background: #FFFCF3; }
.stage-explain { color: var(--ink-2); margin: .75rem 0 0; font-size: .92rem; }
.stage-action { margin-top: 1rem; }

.stat-grid-2 { grid-template-columns: repeat(2, 1fr); }
.stat-grid-3 { grid-template-columns: repeat(3, 1fr); }
.stat-grid + .panel, .stat-grid + .split, .stat-grid + .pipeline, .tabs-inline + .panel, .tabs-inline + .stat-grid, .alert-attn + .stat-grid { margin-top: 20px; }
.stat-static:hover { transform: none; border-color: var(--line); }
.stat-money .stat-value { font-size: 1.45rem; }
.stat-danger { border-top: 3px solid var(--danger); }
.stat-danger .stat-value { color: var(--danger); }
.tabs-inline { display: inline-flex; max-width: 100%; margin-bottom: 0; }
.filters-bar { margin: 16px 0; flex-wrap: wrap; }

.badge-attn { background: var(--warn-bg); color: var(--warn); text-transform: none; letter-spacing: 0; }

/* Etapas */
.stage-badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; white-space: nowrap; background: var(--line-2); color: var(--ink-2); }
.stage-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sb-request { background: #FFF4DC; color: var(--warn); }
.sb-sourcing { background: #EBF2FB; color: #2F5E9B; }
.sb-quoted { background: #EEEAFB; color: #5B3FB0; }
.sb-accepted, .sb-ordered { background: #E7F7F6; color: var(--teal-dark); }
.sb-production, .sb-inspection, .sb-shipping { background: #E4EEFA; color: #22508F; }
.sb-delivered { background: var(--ok-bg); color: var(--ok); }
.sb-lost, .sb-cancelled { background: var(--line-2); color: var(--ink-3); }

.stepper-panel { padding-bottom: 18px; }
.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(9, 1fr); counter-reset: s; }
.stepper-6 { grid-template-columns: repeat(6, 1fr); }
.step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .4rem; min-width: 0; }
.step:not(:first-child)::before { content: ""; position: absolute; top: 14px; right: 50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.step-done:not(:first-child)::before, .step-current:not(:first-child)::before { background: var(--teal); }
.step-dot { position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 700; background: #fff; border: 2px solid var(--line); color: var(--ink-3); }
.step-done .step-dot { background: var(--teal); border-color: var(--teal); color: #fff; }
.step-current .step-dot { border-color: var(--teal); color: var(--teal-dark); box-shadow: 0 0 0 4px rgba(18, 163, 155, .15); }
.step-label { font-size: .76rem; font-weight: 600; color: var(--ink-3); line-height: 1.25; overflow-wrap: anywhere; }
.step-current .step-label { color: var(--night); }
.stepper.is-ended { opacity: .45; }
.stage-ended { padding: .6rem .9rem; border-radius: var(--radius-sm); background: var(--line-2); color: var(--ink-2); margin-bottom: 1rem; font-size: .92rem; }
.stage-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.stage-form select { width: auto; }

/* Pipeline (contagem por etapa) */
.pipeline { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-top: 4px; }
.pipeline-dash { margin-top: 20px; }
.pipe { flex: 1 0 auto; min-width: 92px; display: flex; flex-direction: column; gap: .1rem; padding: .6rem .8rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; color: var(--ink-3); font-size: .78rem; font-weight: 600; white-space: nowrap; }
.pipe:hover { border-color: var(--teal); color: var(--night); }
.pipe.active { background: var(--night); border-color: var(--night); color: #C6D3E8; }
.pipe-n { font-size: 1.25rem; font-weight: 800; color: var(--night); font-variant-numeric: tabular-nums; }
.pipe.active .pipe-n { color: #fff; }
.pipe-request .pipe-n { color: var(--warn); }

/* Lista de processos (cliente) */
.project-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 16px; }
.project-card { display: flex; flex-direction: column; gap: .6rem; padding: 18px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.project-card:hover { border-color: var(--teal); transform: translateY(-1px); color: var(--ink); }
.project-card h2, .project-card h3 { font-size: 1rem; margin: 0; }
.project-card-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.project-card-meta { display: flex; justify-content: space-between; gap: .5rem; font-size: .82rem; color: var(--ink-3); }
.progress { height: 6px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.progress-bar { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 999px; }
.pb-lost, .pb-cancelled { background: #A9B6C9; }

/* Navegação dentro do processo */
.jump { display: flex; gap: .4rem; flex-wrap: wrap; margin: 0 0 20px; }
.jump a { padding: .35rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; text-decoration: none; color: var(--ink-2); font-size: .85rem; font-weight: 600; display: inline-flex; gap: .4rem; align-items: center; }
.jump a:hover { border-color: var(--night); color: var(--night); }
section[id], article[id] { scroll-margin-top: 84px; }

/* Cotações */
.quote-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; background: #fff; margin-top: 14px; }
.quote-card:first-of-type { margin-top: 0; }
.qs-sent { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(18, 163, 155, .08); }
.qs-accepted { border-left: 4px solid var(--ok); }
.qs-rejected, .qs-superseded, .qs-withdrawn { opacity: .75; }
.qs-draft { border-style: dashed; }
.quote-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.quote-head h3 { margin: 0; font-size: 1rem; }
.quote-amount, .quote-total { font-size: 1.35rem; font-weight: 800; color: var(--night); font-variant-numeric: tabular-nums; white-space: nowrap; }
.quote-terms { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; font-size: .86rem; color: var(--ink-2); margin: .75rem 0 0; padding: 0; list-style: none; }
.quote-notes { background: var(--bg); border-radius: var(--radius-sm); padding: .6rem .8rem; font-size: .9rem; color: var(--ink-2); margin: .75rem 0 0; }
.quote-response { margin-top: .75rem; font-size: .9rem; color: var(--ink-2); }
.quote-decision { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line-2); }
.quote-decision .btn-row { margin-top: .5rem; }
.qstatus, .rstatus { display: inline-flex; align-items: center; font-size: .76rem; font-weight: 700; padding: .18rem .55rem; border-radius: 999px; white-space: nowrap; background: var(--line-2); color: var(--ink-2); }
.qst-sent, .qst-submitted, .rs-sent { background: #EBF2FB; color: #2F5E9B; }
.qst-accepted, .qst-selected, .rs-selected, .rs-answered { background: var(--ok-bg); color: var(--ok); }
.qst-draft { background: var(--warn-bg); color: var(--warn); }
.qst-rejected, .qst-not_selected, .rs-declined { background: var(--danger-bg); color: var(--danger); }
.po-sent { background: #EBF2FB; color: #2F5E9B; }
.po-confirmed, .po-production, .po-ready { background: #E7F7F6; color: var(--teal-dark); }
.po-shipped { background: #E4EEFA; color: #22508F; }
.po-closed { background: var(--ok-bg); color: var(--ok); }
.po-cancelled { background: var(--line-2); color: var(--ink-3); }

/* Pedidos a fornecedores */
.rfq-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: #fff; margin-top: 14px; }
.rfq-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; flex-wrap: wrap; margin-bottom: .6rem; }
.rfq-head h3 { margin: 0; font-size: .98rem; }
.rfq-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.compare tr.best td { background: var(--ok-bg); }
.compare tr.best td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
details.decline { margin-top: 1rem; }
details.decline > summary { cursor: pointer; color: var(--danger); font-weight: 600; font-size: .9rem; }

/* Pagamentos */
.pay { display: inline-flex; font-size: .76rem; font-weight: 700; padding: .18rem .55rem; border-radius: 999px; white-space: nowrap; }
.pay-pending { background: var(--warn-bg); color: var(--warn); }
.pay-partial { background: #EBF2FB; color: #2F5E9B; }
.pay-paid { background: var(--ok-bg); color: var(--ok); }
.pay-overdue { background: var(--danger-bg); color: var(--danger); }

/* Tabelas compactas e documentos */
.table-compact { font-size: .88rem; }
.table-compact th { padding: .6rem .75rem; }
.table-compact td { padding: .6rem .75rem; }
.table tfoot td { font-weight: 700; border-top: 2px solid var(--line); background: #F8FAFC; }
.table th.num { text-align: right; }
.panel > .table-wrap { margin: 0 -24px; }
.doc-link { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.doc-link.no-file { color: var(--ink); }
.doc-icon { flex: none; width: 14px; height: 17px; border: 2px solid currentColor; border-radius: 2px 6px 2px 2px; opacity: .8; }
.doc-edit { display: inline-block; text-align: left; }
.doc-edit > summary { list-style: none; }
.doc-edit > summary::-webkit-details-marker { display: none; }
.doc-edit[open] { display: block; margin-top: .5rem; }
.doc-edit[open] > form { margin-top: .75rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #FAFBFD; min-width: min(560px, 80vw); }
.dl-tight .dl-row { padding: .35rem 0; }
.dl-tight { margin-top: .75rem; }

/* Mensagens */
.thread { display: flex; flex-direction: column; gap: .75rem; max-height: 520px; overflow-y: auto; padding-right: 4px; margin-bottom: 1rem; }
.msg { max-width: 88%; padding: .6rem .85rem; border-radius: 12px 12px 12px 4px; background: var(--bg); border: 1px solid var(--line-2); align-self: flex-start; }
.msg-mine { align-self: flex-end; background: #E7F7F6; border-color: #C9ECE9; border-radius: 12px 12px 4px 12px; }
.msg-internal { background: #FFF8E6; border-color: #F5DFA6; border-style: dashed; }
.msg-meta { font-size: .76rem; color: var(--ink-3); margin-bottom: .2rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.msg-body { font-size: .92rem; overflow-wrap: anywhere; }
.msg-form textarea { min-height: 70px; }

/* Formulários */
.form-wide { max-width: none; }
.form-tight { gap: .7rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .5rem 1rem; }
.check-sm { font-size: .85rem; }
.input-xs { width: 80px !important; }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.inline-form select { width: auto; max-width: 100%; }
.field-inline { flex-direction: row; align-items: center; gap: .6rem; }
.field-inline select { width: auto; }
.field-narrow { max-width: 240px; }
.upload-inline { gap: .7rem; margin-top: 1rem; }
.finance-fields { margin-top: .25rem; }

/* Editor de linhas */
.lines { display: flex; flex-direction: column; gap: .5rem; }
.lines-body { display: flex; flex-direction: column; gap: .6rem; }
.line-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 34px; gap: .6rem; align-items: end; padding: .75rem; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: #FAFBFD; }
.line-desc { grid-column: 1 / 4; grid-row: 1; }
.line-row > .line-remove { grid-column: 4; grid-row: 1; }
.line-specs { grid-column: 1 / -1; }
.line-remove { width: 34px; height: 40px; border: 1px solid var(--line); background: #fff; border-radius: var(--radius-sm); color: var(--ink-3); font-size: 1.2rem; cursor: pointer; }
.line-remove:hover { color: var(--danger); border-color: #F0C2C8; }
.lines-body .line-row:only-child .line-remove { visibility: hidden; }
.lines-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.lines-total { font-size: .95rem; color: var(--ink-2); }
.lines-total strong { color: var(--night); font-size: 1.1rem; font-variant-numeric: tabular-nums; }

@media (max-width: 1180px) {
  .main-nav > a { padding-left: .55rem; padding-right: .55rem; }
  .user-chip-text { display: none; }
}
@media (max-width: 1080px) {
  .stat-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .stepper { grid-template-columns: repeat(9, minmax(64px, 1fr)); overflow-x: auto; padding-bottom: 6px; }
}
@media (max-width: 900px) {
  .user-chip-text { display: flex; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .grid-3, .stat-grid-2, .stat-grid-3 { grid-template-columns: 1fr; }
  .stepper { display: flex; gap: 0; }
  .stepper .step { flex: 0 0 72px; }
  .stepper-6 .step { flex: 1 1 0; }
  .line-row { grid-template-columns: 1fr 1fr 34px; }
  .line-desc { grid-column: 1 / 3; grid-row: 1; }
  .line-row > .line-remove { grid-column: 3; grid-row: 1; }
  .line-price { grid-column: 1 / 3; }
  .panel > .table-wrap { margin: 0 -16px; }
  .msg { max-width: 96%; }
  .project-list { grid-template-columns: 1fr; }
  .field-inline { flex-direction: column; align-items: stretch; }
  .doc-edit[open] > form { min-width: 0; }
  .table td.cell-action { flex-wrap: wrap; }
  .quote-head { flex-direction: column; }
}
.quote-terms > div { display: flex; gap: .35rem; }
.quote-terms dt { color: var(--ink-3); }
.quote-terms dt::after { content: ":"; }
.quote-terms dd { margin: 0; font-weight: 600; color: var(--ink); }
.alert-attn.alert { background: var(--warn-bg); border-color: #F2DDA6; color: #6B4700; }
.alert-attn .alert-icon { background: #E0A21B; }
.lines-table td.num .cell, .lines-table td.num strong { white-space: nowrap; }
.stepper-panel + .alert, .stepper-panel + .alert-attn { margin-top: 16px; }
@media (max-width: 640px) { .lines-table td.num .cell { white-space: normal; } }
.stepper { position: relative; scroll-behavior: auto; }
.container > .panel + .panel, .container > .panel + .split, .container > .split + .panel { margin-top: 20px; }
.input-sm { width: 120px !important; }

/* =================================================================== aOKtion */
:root { --amber: #F5A524; --amber-dark: #B87100; --amber-bg: #FFF4DE; }

/* Logótipo provisório (texto): a·OK·tion — by YENTXA */
.wordmark { display: inline-flex; align-items: baseline; gap: .45em; text-decoration: none; line-height: 1; white-space: nowrap; }
.wm { font-weight: 800; letter-spacing: -.02em; font-size: 1.55rem; color: #fff; }
.wm b { font-weight: 900; background: var(--grad-light); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: 0; }
.wm-by { font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #8FA3C4; }
.wordmark-dark .wm { color: var(--night); }
.wordmark-dark .wm b { background: var(--grad); -webkit-background-clip: text; background-clip: text; }
.wordmark-dark .wm-by { color: var(--ink-3); }
.wordmark-lg .wm { font-size: 2.4rem; }
.wordmark-lg .wm-by { font-size: .8rem; }
.topbar-logo { text-decoration: none; }

/* Página pública */
.public-body { background: #fff; }
.public-header { background: var(--night); border-bottom: 3px solid; border-image: var(--grad) 1; }
.public-header-inner { max-width: 1160px; margin: 0 auto; padding: 16px 24px; display: flex; align-items: center; gap: 20px; }
.public-header .lang-switch { margin-left: auto; }
.public-header .btn-row { margin: 0; }
.hero { background: var(--night); color: #C9D5E8; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; width: 720px; height: 720px; right: -260px; top: -200px; border-radius: 50%; border: 64px solid rgba(60, 207, 197, .07); }
.hero-inner { max-width: 1160px; margin: 0 auto; padding: 72px 24px 84px; position: relative; z-index: 1; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3.1rem); max-width: 760px; margin-bottom: .4em; }
.hero h1 em { font-style: normal; background: var(--grad-light); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 1.12rem; max-width: 640px; color: #B3C2DA; }
.hero .eyebrow { color: var(--teal-light); }
.hero .btn-row { margin-top: 1.8rem; }
.btn-light { background: #fff; color: var(--night); }
.btn-light:hover { background: #E8EEF7; color: var(--night); }
.section { max-width: 1160px; margin: 0 auto; padding: 64px 24px; }
.section h2.section-title { font-size: 1.6rem; margin-bottom: .4em; }
.section-lead { color: var(--ink-2); max-width: 680px; margin-bottom: 2rem; }
.paths { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.path-card { border: 1px solid var(--line); border-radius: 14px; padding: 28px; background: #fff; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .6rem; }
.path-card h3 { margin: 0; font-size: 1.25rem; color: var(--night); }
.path-card p { margin: 0; color: var(--ink-2); }
.path-card ul { margin: .4rem 0 0; padding-left: 1.1rem; color: var(--ink-2); }
.path-card .path-tag { align-self: flex-start; font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: .3rem .6rem; border-radius: 99px; }
.path-up .path-tag { background: var(--amber-bg); color: var(--amber-dark); }
.path-down .path-tag { background: #E7F7F6; color: var(--teal-dark); }
.path-arrow { font-size: 2rem; line-height: 1; font-weight: 800; }
.path-up .path-arrow { color: var(--amber); }
.path-down .path-arrow { color: var(--teal); }
.band { background: var(--bg); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; counter-increment: step; }
.steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--night); color: #fff; font-weight: 800; margin-bottom: .7rem; }
.steps strong { display: block; color: var(--night); margin-bottom: .25rem; }
.steps span { color: var(--ink-2); font-size: .93rem; }
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.trust div { padding: 4px 0; }
.trust strong { display: block; color: var(--night); margin-bottom: .2rem; }
.trust p { color: var(--ink-2); margin: 0; font-size: .95rem; }
.public-footer { background: var(--night-3); color: #8FA3C4; font-size: .88rem; }
.public-footer-inner { max-width: 1160px; margin: 0 auto; padding: 26px 24px; display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.public-footer a { color: #C9D5E8; }

/* Lista de verificação */
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.checklist li { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: start; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.checklist li:last-child { border-bottom: 0; }
.checklist strong { display: block; font-size: .93rem; color: var(--ink); }
.checklist small { color: var(--ink-3); font-size: .84rem; }
.ck { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .8rem; font-weight: 900; }
.ck-ok { background: var(--ok-bg); color: var(--ok); }
.ck-pending { background: var(--warn-bg); color: var(--warn); }
.ck-fail { background: var(--danger-bg); color: var(--danger); }
.checklist .btn { white-space: nowrap; }
.progress-steps { display: flex; gap: 6px; margin: .2rem 0 1rem; }
.progress-steps span { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.progress-steps span.on { background: var(--teal); }

/* Selos de verificação */
.pill { display: inline-flex; align-items: center; gap: .35rem; padding: .18rem .55rem; border-radius: 99px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.pill-ok { background: var(--ok-bg); color: var(--ok); }
.pill-warn { background: var(--warn-bg); color: var(--warn); }
.pill-danger { background: var(--danger-bg); color: var(--danger); }
.pill-muted { background: var(--line-2); color: var(--ink-3); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.badge-buyer { background: var(--amber-bg); color: var(--amber-dark); }
.badge-both { background: #EEEAFB; color: #5B45A8; }

/* Beneficiários efetivos (editor de linhas) */
.owners { display: flex; flex-direction: column; gap: 10px; }
.owner-row { display: grid; grid-template-columns: 2.2fr 1.4fr .8fr 1.4fr auto; gap: 10px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.owner-row .field label { font-size: .8rem; }
.owner-remove { margin-top: 1.55rem; }
.owners-add { align-self: flex-start; }
.owners-table td, .owners-table th { white-space: normal; }

/* Ficheiros */
input[type=file] { font: inherit; font-size: .9rem; padding: .55rem; border: 1px dashed #B9C6D8; border-radius: var(--radius-sm); background: #FAFBFD; width: 100%; }
input[type=file]:hover { border-color: var(--teal); }
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-list > li { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.doc-list > li:last-child { border-bottom: 0; }
.doc-main { flex: 1 1 260px; min-width: 0; }
.doc-main a { font-weight: 600; word-break: break-word; }
.doc-main small { display: block; color: var(--ink-3); }
.doc-note { flex-basis: 100%; margin: 0; font-size: .86rem; color: var(--danger); }
.doc-review { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex-basis: 100%; }
.doc-review input[type=text] { flex: 1 1 200px; padding: .42rem .6rem; font-size: .86rem; }

/* Correspondências na lista de sanções */
.match { border: 1px solid #F0C2C8; background: #FFF8F9; border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 10px; }
.match-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; justify-content: space-between; }
.match-head strong { color: var(--danger); }
.match small { color: var(--ink-3); }
.match form { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.match form input[type=text] { flex: 1 1 220px; padding: .42rem .6rem; font-size: .86rem; }
.kv { font-size: .86rem; color: var(--ink-3); }
.kv strong { color: var(--ink); font-weight: 600; }
.stat-grid-5 { grid-template-columns: repeat(5, 1fr); }
details.more summary { cursor: pointer; color: var(--teal-dark); font-weight: 600; font-size: .9rem; }
details.more[open] summary { margin-bottom: .6rem; }
.compare-vies { font-size: .88rem; background: var(--bg); border-radius: var(--radius-sm); padding: 10px 12px; margin-top: .6rem; }

@media (max-width: 1080px) {
  .stat-grid-5 { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .paths, .trust, .steps { grid-template-columns: 1fr; }
  .owner-row { grid-template-columns: 1fr 1fr; }
  .owner-row .field:first-child { grid-column: 1 / -1; }
  .owner-remove { margin-top: 0; }
  .hero-inner { padding: 48px 20px 56px; }
  .section { padding: 44px 20px; }
  .public-header-inner { padding: 12px 16px; flex-wrap: wrap; }
  .public-header .btn-row { width: 100%; }
  .stat-grid-5 { grid-template-columns: 1fr 1fr; }
}
.auth-logo, .plain-logo { text-decoration: none; display: inline-block; }
.plain-header .wm { color: #fff; }
@media (max-width: 900px) { .auth-brand .wordmark-lg .wm { font-size: 1.6rem; } .auth-brand .wordmark-lg .wm-by { font-size: .68rem; } }
@media (max-width: 640px) { .topbar .wm-by { display: none; } }
.type-picker-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .type-picker-3 { grid-template-columns: 1fr; } }
.hint-warn { color: var(--warn); font-weight: 600; }
.type-picker-3 legend { grid-column: 1 / -1; }
.type-picker-3 .field-error { grid-column: 1 / -1; }
.path-card .btn-row { margin-top: auto; padding-top: .8rem; }
.owner-row .owner-remove { justify-self: start; }

/* ---------------------------------------------------------------- Leilões */
.pill-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.head-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.head-side .btn-row { margin: 0; }
.countdown { background: var(--night); color: #fff; border-radius: var(--radius); padding: 10px 16px; display: flex; flex-direction: column; align-items: flex-end; min-width: 180px; }
.countdown-label { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--teal-light); }
.countdown-value { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; }
.countdown-scheduled .countdown-label { color: var(--amber); }
.countdown-urgent { color: #FFB4BD; }
.position-panel { display: grid; grid-template-columns: auto 1fr; gap: 6px 28px; align-items: center; border-top: 3px solid var(--teal); }
.position-panel .hint { grid-column: 1 / -1; margin: 0; }
.position-main { display: flex; flex-direction: column; }
.position-label { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.position-value { font-size: 3rem; font-weight: 900; color: var(--night); line-height: 1; font-variant-numeric: tabular-nums; }
.position-sub { color: var(--ink-2); font-size: .9rem; }
.position-dl { margin: 0; }
.bid-table input { width: 100%; max-width: 160px; text-align: right; font-variant-numeric: tabular-nums; }
.bid-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px; background: var(--bg); border-radius: var(--radius-sm); font-weight: 600; }
.bid-total strong { font-size: 1.5rem; color: var(--night); font-variant-numeric: tabular-nums; }
.bid-warning { color: var(--danger); font-weight: 600; }
.rules-text { white-space: pre-wrap; font-size: .9rem; line-height: 1.55; }
.rules-box { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; background: var(--bg); margin-bottom: 1rem; }
.pre { white-space: pre-wrap; }
.items-editor { display: flex; flex-direction: column; gap: 10px; }
.items-editor > .btn { align-self: flex-start; }
.items-body { display: flex; flex-direction: column; gap: 10px; }
.item-row { display: grid; grid-template-columns: 24px 1fr 110px 80px auto; gap: 8px 10px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.item-n { font-weight: 800; color: var(--ink-3); padding-top: 1.75rem; }
.item-specs { grid-column: 2 / -1; }
.item-remove { margin-top: 1.55rem; }
.item-row .field label { font-size: .8rem; }
.auction-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.auction-card { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: inherit; transition: border-color .15s; }
.auction-card:hover { border-color: var(--teal); color: inherit; }
.auction-card-live { border-top: 3px solid var(--teal); }
.auction-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.auction-card-title { color: var(--night); font-size: 1.08rem; }
.auction-card .pill { align-self: flex-start; }
.rank-badge { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--line-2); color: var(--ink-2); font-weight: 800; font-size: .85rem; }
.rank-1 { background: var(--teal); color: #fff; }
.row-best td { background: #F1FBFA; }
.radio-list { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 760px) {
  .head-side { align-items: stretch; width: 100%; }
  .countdown { align-items: flex-start; }
  .item-row { grid-template-columns: 1fr 1fr; }
  .item-n { display: none; }
  .item-desc, .item-specs { grid-column: 1 / -1; }
  .item-remove { margin-top: 0; justify-self: start; }
  .position-panel { grid-template-columns: 1fr; }
  .bid-table input { max-width: none; }
}
.panel + .split, .alert + .split, .panel + .panel-highlight, .panel-highlight + .split, .panel + .alert { margin-top: 20px; }

/* ---------------------------------------------------------------- Leilão de venda */
.gallery { display: flex; flex-direction: column; }
.gallery-main { margin: 0; background: var(--night-3); border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; display: grid; place-items: center; aspect-ratio: 16 / 10; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; }
.gallery-thumb { flex: 0 0 72px; height: 54px; padding: 0; border: 2px solid transparent; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg); cursor: pointer; }
.gallery-thumb.active { border-color: var(--teal); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-bottom: 1rem; }
.thumb-item { position: relative; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg); aspect-ratio: 4 / 3; }
.thumb-item img { width: 100%; height: 100%; object-fit: cover; }
.thumb-item form { position: absolute; top: 4px; right: 4px; }
.thumb-item .btn { padding: .15rem .45rem; }
.lot-card { padding-top: 0; overflow: hidden; }
.lot-cover { display: block; margin: 0 -20px 6px; width: calc(100% + 40px); max-width: none; aspect-ratio: 16 / 9; object-fit: cover; background: var(--night); }
.lot-cover-empty { display: grid; place-items: center; color: var(--amber); font-size: 2.4rem; font-weight: 900; }
.amount-row { display: flex; align-items: center; gap: 10px; }
.amount-input { font-size: 1.5rem !important; font-weight: 700; text-align: right; max-width: 260px; font-variant-numeric: tabular-nums; }
.amount-cur { font-weight: 700; color: var(--ink-2); }
