/* ==========================================================================
   LiciMaster — identidade visual (carregado DEPOIS de app.css, fora das camadas,
   por isso vence o CSS legado sem !important).
   Paleta única azul. Laranja não existe mais no produto.
   ========================================================================== */

:root {
    /* Base */
    --b-navy: #0B2545;        /* marinho: textos fortes, topo, marca */
    --b-navy-2: #13315C;
    --b-blue: #1D4ED8;        /* ação principal */
    --b-blue-hover: #1E40AF;
    --b-blue-2: #3B82F6;
    --b-sky: #E7F0FF;         /* realces e seleção */
    --b-sky-2: #F2F7FF;
    --b-paper: #F5F7FA;       /* fundo do app */
    --b-white: #FFFFFF;
    --b-line: #DDE3EA;        /* bordas */
    --b-line-strong: #C3CCD8;

    /* Texto */
    --b-ink: #0F1B2D;
    --b-ink-2: #3A4A63;
    --b-muted: #5B6B82;
    --b-subtle: #5F6E85;      /* passa 4,5:1 em todos os fundos da paleta (WCAG AA) */

    /* Status de licitação (mesma cor em todo o produto) */
    --st-open: #0E9F6E;       --st-open-bg: #E6F6EF;
    --st-published: #1D4ED8;  --st-published-bg: #E7F0FF;
    --st-dispute: #6D28D9;    --st-dispute-bg: #F1EAFE;
    --st-closed: #64748B;     --st-closed-bg: #EEF1F5;
    --st-danger: #C81E1E;     --st-danger-bg: #FDECEC;
    --st-attention: #A16207;  --st-attention-bg: #FEF7D6;

    --b-radius-sm: 6px;
    --b-radius: 10px;
    --b-radius-lg: 14px;
    --b-shadow-1: 0 1px 2px rgba(11, 37, 69, 0.06);
    --b-shadow-2: 0 1px 2px rgba(11, 37, 69, 0.05), 0 8px 24px -12px rgba(11, 37, 69, 0.18);
    --b-shadow-3: 0 2px 6px rgba(11, 37, 69, 0.08), 0 24px 48px -20px rgba(11, 37, 69, 0.28);
    --b-focus: 0 0 0 3px rgba(29, 78, 216, 0.28);
    --b-font: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

    /* Remapeia os dois sistemas antigos para a paleta azul */
    --font-sans: var(--b-font);
    --font-display: var(--b-font);
    --font-serif: var(--b-font);

    --lm-accent: var(--b-blue);
    --lm-accent-hover: var(--b-blue-hover);
    --lm-accent-bright: var(--b-blue-2);
    --lm-accent-soft: rgba(29, 78, 216, 0.08);
    --lm-status-ok: var(--st-open);
    --lm-status-warn: var(--st-attention);
    --lm-status-danger: var(--st-danger);
    --lm-ink-primary: var(--b-ink);
    --lm-ink-secondary: var(--b-ink-2);
    --lm-ink-muted: var(--b-muted);
    --lm-border-light: var(--b-line);
    --lm-border-strong: var(--b-line-strong);
    --lm-canvas-mineral: var(--b-paper);

    --color-copper: var(--b-blue);
    --color-copper-hover: var(--b-blue-hover);
    --color-amber-bright: var(--b-blue-2);
    --color-amber-soft: var(--b-sky);

    --color-primary: var(--b-navy);
    --color-primary-600: var(--b-navy-2);
    --color-primary-700: var(--b-ink-2);
    --color-primary-800: var(--b-navy);
    --color-primary-50: var(--b-sky-2);
    --color-primary-100: var(--b-sky);
    --color-primary-200: #C9DAF8;

    --color-accent: var(--b-blue);
    --color-accent-600: var(--b-blue-hover);
    --color-accent-50: var(--b-sky-2);

    --color-bg: var(--b-paper);
    --color-surface: var(--b-white);
    --color-border: var(--b-line);
    --color-border-strong: var(--b-line-strong);
    --color-text: var(--b-ink);
    --color-text-muted: var(--b-muted);
    --color-text-subtle: var(--b-subtle);

    --color-warning-bg: var(--st-attention-bg);
    --color-warning: var(--st-attention);
    --color-danger: #B91C1C;
    --color-danger-bg: var(--st-danger-bg);
    --color-success: #047857;
    --color-success-bg: var(--st-open-bg);

    --shadow-sm: var(--b-shadow-1);
    --shadow-md: var(--b-shadow-2);
    --shadow-lg: var(--b-shadow-3);
}

html, body {
    font-family: var(--b-font);
    background: var(--b-paper);
    color: var(--b-ink);
    font-feature-settings: "tnum" 1;
}

h1, h2, h3, h4, h5 { font-family: var(--b-font); }

:focus-visible { outline: none; box-shadow: var(--b-focus); border-radius: 4px; }

::selection { background: #C9DAF8; color: var(--b-navy); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}

/* ============ Loading padrão (toda requisição) ============ */
.lm-busybar {
    position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 2000;
    pointer-events: none; opacity: 0; transition: opacity 200ms ease;
    background: linear-gradient(90deg, transparent 0, var(--b-blue) 35%, var(--b-blue-2) 65%, transparent 100%);
    background-size: 40% 100%; background-repeat: no-repeat;
}
.lm-busybar.is-on { opacity: 1; animation: lm-busy-slide 1.1s ease-in-out infinite; }
@keyframes lm-busy-slide { from { background-position: -40% 0; } to { background-position: 140% 0; } }

.lm-busy-chip {
    position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1900;
    display: inline-flex; align-items: center; gap: 10px;
    padding: 9px 16px 9px 12px; border-radius: 999px;
    background: var(--b-navy); color: #fff; font-size: 0.85rem; font-weight: 500;
    box-shadow: var(--b-shadow-3); animation: lm-rise 180ms ease-out;
}
.lm-busy-spinner {
    width: 14px; height: 14px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.25); border-top-color: #93C5FD;
    animation: lm-spin 700ms linear infinite;
}
@keyframes lm-spin { to { transform: rotate(360deg); } }
@keyframes lm-rise { from { opacity: 0; transform: translate(-50%, 8px); } }

.lm-busy-overlay {
    position: fixed; inset: 0; z-index: 1950; display: grid; place-items: center;
    background: rgba(245, 247, 250, 0.62); backdrop-filter: blur(2px);
    animation: lm-fade 160ms ease-out;
}
@keyframes lm-fade { from { opacity: 0; } }
.lm-busy-card {
    display: inline-flex; align-items: center; gap: 14px;
    padding: 14px 20px 14px 14px; border-radius: var(--b-radius-lg);
    background: #fff; border: 1px solid var(--b-line); box-shadow: var(--b-shadow-3);
    color: var(--b-navy); font-weight: 600;
}
.lm-busy-mark { width: 36px; height: 36px; color: var(--b-navy); }
.lm-busy-mark svg { width: 100%; height: 100%; display: block; }
.lm-busy-line { stroke-dasharray: 22; animation: lm-draw 1.2s ease-in-out infinite; }
@keyframes lm-draw { 0% { stroke-dashoffset: 22; } 60%, 100% { stroke-dashoffset: 0; } }

/* Antigos (substituídos) */
.lm-http-topbar, .lm-loader-backdrop, .lm-loader-pill, .toast-container { display: none !important; }

/* ============ Avisos (toasts) ============ */
.lm-toasts {
    position: fixed; right: 20px; bottom: 20px; z-index: 2100;
    display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px));
}
.lm-toast {
    --tone: var(--b-blue); --tone-bg: var(--b-sky);
    position: relative; overflow: hidden;
    display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: start;
    padding: 14px 12px 14px 14px; border-radius: var(--b-radius-lg);
    background: #fff; border: 1px solid var(--b-line); box-shadow: var(--b-shadow-3);
    animation: lm-toast-in 220ms cubic-bezier(.2,.9,.3,1.2);
}
@keyframes lm-toast-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.lm-toast--success { --tone: var(--st-open); --tone-bg: var(--st-open-bg); }
.lm-toast--error { --tone: var(--st-danger); --tone-bg: var(--st-danger-bg); }
.lm-toast--warning { --tone: var(--st-attention); --tone-bg: var(--st-attention-bg); }
.lm-toast__icon {
    width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
    background: var(--tone-bg); color: var(--tone);
}
.lm-toast__icon svg { width: 20px; height: 20px; }
.lm-toast__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-top: 1px; }
.lm-toast__title { font-size: 0.9rem; color: var(--b-navy); }
.lm-toast__text { font-size: 0.86rem; color: var(--b-ink-2); line-height: 1.45; overflow-wrap: anywhere; }
.lm-toast__close {
    width: 28px; height: 28px; border: 0; background: transparent; border-radius: 8px;
    color: var(--b-subtle); cursor: pointer; display: grid; place-items: center;
}
.lm-toast__close:hover { background: var(--b-paper); color: var(--b-navy); }
.lm-toast__close svg { width: 16px; height: 16px; }
.lm-toast__timer {
    position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
    background: var(--tone); opacity: .55; transform-origin: left;
    animation-name: lm-toast-timer; animation-timing-function: linear; animation-fill-mode: forwards;
}
@keyframes lm-toast-timer { to { transform: scaleX(0); } }

@media (max-width: 640px) {
    .lm-toasts { right: 16px; left: 16px; bottom: 76px; width: auto; }
}

/* ==========================================================================
   Controles básicos
   ========================================================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 40px; padding: 0 16px; border-radius: var(--b-radius);
    border: 1px solid transparent; font: 600 0.9rem/1 var(--b-font);
    text-decoration: none; cursor: pointer; white-space: nowrap;
    transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn--primary { background: var(--b-blue); color: #fff; }
.btn--primary:hover:not(:disabled) { background: var(--b-blue-hover); }
.btn--secondary { background: var(--b-sky); color: var(--b-blue-hover); }
.btn--secondary:hover:not(:disabled) { background: #D6E5FF; }
.btn--ghost { background: #fff; color: var(--b-ink-2); border-color: var(--b-line); }
.btn--ghost:hover:not(:disabled) { border-color: var(--b-line-strong); color: var(--b-navy); }
.btn--ghost-dark { background: transparent; color: #DCE7F7; border-color: rgba(255,255,255,.22); }
.btn--ghost-dark:hover { border-color: rgba(255,255,255,.5); color: #fff; }
.btn--danger { background: #fff; color: var(--st-danger); border-color: #F5C2C2; }
.btn--lg { height: 48px; padding: 0 22px; font-size: 1rem; }
.btn--block { width: 100%; }

.icon-btn {
    display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px;
    border: 1px solid transparent; background: transparent; color: var(--b-muted); cursor: pointer;
    text-decoration: none; transition: background-color 120ms ease, color 120ms ease;
}
.icon-btn:hover:not(:disabled) { background: var(--b-sky-2); color: var(--b-blue); }
.icon-btn:disabled { opacity: .45; cursor: not-allowed; }
.icon-btn--bordered { border-color: var(--b-line); background: #fff; width: 40px; height: 40px; }
.icon-btn.star.is-on { color: var(--b-blue); }
.icon-btn.star.is-on .ic { fill: currentColor; }

.link-btn {
    border: 0; background: none; padding: 0; cursor: pointer;
    font: 600 0.8rem var(--b-font); color: var(--b-blue);
}
.link-btn:hover { text-decoration: underline; }
.link { color: var(--b-blue); font-weight: 600; text-decoration: none; font-size: .88rem; }
.link:hover { text-decoration: underline; }
.muted { color: var(--b-muted); font-size: .88rem; margin: 0; }

.input {
    width: 100%; height: 40px; padding: 0 12px; border-radius: var(--b-radius);
    border: 1px solid var(--b-line); background: #fff; color: var(--b-ink);
    font: 400 .92rem var(--b-font);
}
.input:focus { outline: none; border-color: var(--b-blue); box-shadow: var(--b-focus); }
.input--sm { height: 34px; font-size: .85rem; margin-bottom: 8px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--b-ink-2); }
.field-error { color: var(--st-danger); font-size: .85rem; margin: 8px 0 0; }

.count {
    display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
    border-radius: 999px; background: var(--b-sky); color: var(--b-blue-hover);
    font-size: .72rem; font-weight: 700;
}

/* Segmentado */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: #E9EEF5; }
.seg__btn {
    display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px;
    border: 0; border-radius: 8px; background: transparent; cursor: pointer;
    font: 600 .85rem var(--b-font); color: var(--b-muted);
}
.seg__btn.is-on { background: #fff; color: var(--b-navy); box-shadow: var(--b-shadow-1); }
.seg--sm .seg__btn { height: 28px; padding: 0 10px; font-size: .8rem; }

/* Chips de filtro */
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chips--scroll { max-height: 180px; overflow: auto; padding-right: 4px; }
.chip {
    display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px;
    border-radius: 999px; border: 1px solid var(--b-line); background: #fff; cursor: pointer;
    font: 500 .82rem var(--b-font); color: var(--b-ink-2); text-transform: none; letter-spacing: 0;
    transition: border-color 120ms ease, background-color 120ms ease;
}
.chip:hover { border-color: var(--b-line-strong); }
.chip.is-on { background: var(--b-sky); border-color: #9DBDF5; color: var(--b-blue-hover); font-weight: 600; }
.chip--sm { height: 26px; font-size: .78rem; padding: 0 9px; }

.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--st-closed); flex: none; }
.dot--open { background: var(--st-open); }
.dot--published { background: var(--st-published); }
.dot--dispute { background: var(--st-dispute); }
.dot--closed { background: var(--st-closed); }
.dot--danger { background: var(--st-danger); }

/* Situação e etiquetas */
.pill {
    display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px;
    font-size: .74rem; font-weight: 700; background: var(--st-closed-bg); color: var(--st-closed);
}
.pill--open { background: var(--st-open-bg); color: #047857; }
.pill--published { background: var(--st-published-bg); color: var(--st-published); }
.pill--dispute { background: var(--st-dispute-bg); color: var(--st-dispute); }
.pill--danger { background: var(--st-danger-bg); color: #B91C1C; }
.tag {
    display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px;
    font-size: .74rem; font-weight: 600; background: #EEF2F7; color: var(--b-ink-2);
}
.tag--match { background: var(--b-sky); color: var(--b-blue-hover); }
.tag--danger { background: var(--st-danger-bg); color: var(--st-danger); }
.tag--warn { background: var(--st-attention-bg); color: #6B4A06; }
.facts dd.is-danger { color: var(--st-danger); font-weight: 600; }
.facts dd small { color: var(--b-subtle); font-weight: 400; }

/* Avisos dentro da página */
.note {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 10px 14px; border-radius: var(--b-radius); font-size: .88rem; margin-bottom: 16px;
}
.note--info { background: var(--b-sky-2); border: 1px solid #CFE0FB; color: var(--b-navy); }
.note a { color: var(--b-blue); font-weight: 600; margin-left: auto; }

/* Estado vazio */
.empty {
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
    padding: 56px 24px; background: #fff; border: 1px dashed var(--b-line-strong); border-radius: var(--b-radius-lg);
}
.empty strong { color: var(--b-navy); font-size: 1.02rem; }
.empty p { margin: 0 0 10px; color: var(--b-muted); font-size: .9rem; }
.empty__icon {
    width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
    background: var(--b-sky); color: var(--b-blue); margin-bottom: 6px;
}
.empty__icon--danger { background: var(--st-danger-bg); color: var(--st-danger); }
.empty--page { max-width: 560px; margin: 48px auto; }
.empty__actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.site .empty--page { margin: 64px auto; }

/* Esqueleto de carregamento */
.sk { height: 12px; border-radius: 6px; background: linear-gradient(90deg, #EDF1F6 0, #F6F8FB 50%, #EDF1F6 100%); background-size: 200% 100%; animation: sk 1.2s linear infinite; }
.sk--short { width: 55%; }
.sk--meter { width: 64px; height: 56px; border-radius: 10px; flex: none; }
.sk-lines { display: flex; flex-direction: column; gap: 10px; flex: 1; padding-top: 6px; }
.skeleton-text { display: inline-block; width: 120px; height: 14px; border-radius: 6px; background: #E9EEF5; }
@keyframes sk { to { background-position: -200% 0; } }

/* ==========================================================================
   Shell do app (logado)
   ========================================================================== */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.app-bar { position: sticky; top: 0; z-index: 100; background: var(--b-navy); }
.app-bar__inner {
    max-width: 1320px; margin: 0 auto; height: 60px; padding: 0 24px;
    display: flex; align-items: center; gap: 28px;
}
.app-nav { display: flex; align-items: center; gap: 4px; height: 100%; }
.app-nav__link {
    position: relative; display: inline-flex; align-items: center; gap: 8px; height: 100%; padding: 0 14px;
    color: #B9C8DD; text-decoration: none; font-weight: 600; font-size: .92rem;
}
.app-nav__link:hover { color: #fff; }
.app-nav__link.is-active { color: #fff; }
.app-nav__link.is-active::after {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px;
    border-radius: 3px 3px 0 0; background: #60A5FA;
}
.app-bar__right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.app-user { position: relative; }
.app-user__btn {
    display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 4px;
    border-radius: 999px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04);
    color: #DCE7F7; cursor: pointer; font: 600 .85rem var(--b-font);
}
.app-user__btn:hover { background: rgba(255,255,255,.1); }
.app-user__avatar {
    width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
    background: #2B5BB8; color: #fff; font-weight: 700; font-size: .85rem;
}
.app-menu-backdrop { position: fixed; inset: 0; z-index: 110; }
.app-menu {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 120; min-width: 240px; padding: 6px;
    background: #fff; border: 1px solid var(--b-line); border-radius: var(--b-radius-lg); box-shadow: var(--b-shadow-3);
}
.app-menu__who { padding: 10px 12px 8px; font-size: .8rem; color: var(--b-muted); border-bottom: 1px solid var(--b-line); margin-bottom: 4px; overflow-wrap: anywhere; }
.app-menu__item {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 8px;
    background: none; text-align: left; cursor: pointer; text-decoration: none;
    font: 500 .9rem var(--b-font); color: var(--b-ink);
}
.app-menu__item:hover { background: var(--b-paper); }
.app-menu__item--danger { color: #B91C1C; }
.app-main { flex: 1; width: 100%; max-width: 1320px; margin: 0 auto; padding: 28px 24px 64px; }
.app-tabbar { display: none; }

/* Sino */
.notif-bell {
    width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; position: relative;
    background: transparent; border: 1px solid rgba(255,255,255,.14); color: #DCE7F7; cursor: pointer; padding: 0;
}
.notif-bell:hover, .notif-bell--active { background: rgba(255,255,255,.1); color: #fff; }
.notif-badge {
    position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 999px; background: #EF4444; color: #fff; font-size: .68rem; font-weight: 700;
    display: grid; place-items: center; border: 2px solid var(--b-navy);
}
.notif-dropdown { border-radius: var(--b-radius-lg) !important; border: 1px solid var(--b-line) !important; box-shadow: var(--b-shadow-3) !important; }
.notif-item--unread { background: var(--b-sky-2) !important; }
.notif-item-dot { background: var(--b-blue) !important; }

@media (max-width: 860px) {
    .app-bar__inner { padding: 0 16px; gap: 12px; height: 56px; }
    .app-nav { display: none; }
    .app-user__name { display: none; }
    .app-user__btn .ic { display: none; }
    .app-user__btn { padding: 0; border: 0; background: none; }
    .app-main { padding: 20px 16px 96px; }
    .app-tabbar {
        display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
        background: #fff; border-top: 1px solid var(--b-line); padding-bottom: env(safe-area-inset-bottom);
    }
    .app-tabbar__link {
        display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 0 8px;
        color: var(--b-subtle); text-decoration: none; font-size: .7rem; font-weight: 600;
    }
    .app-tabbar__link.is-active { color: var(--b-blue); }
}

/* Cabeçalho público */
.site-bar { position: sticky; top: 0; z-index: 100; background: var(--b-navy); }
.site-bar__inner { max-width: 1200px; margin: 0 auto; height: 64px; padding: 0 24px; display: flex; align-items: center; gap: 32px; }
.site-nav { display: flex; gap: 24px; }
.site-nav a { color: #B9C8DD; text-decoration: none; font-weight: 600; font-size: .9rem; }
.site-nav a:hover { color: #fff; }
.site-bar__actions { margin-left: auto; display: flex; gap: 10px; }
@media (max-width: 860px) {
    .site-nav { display: none; }
    .site-bar__inner { padding: 0 16px; gap: 12px; }
    .site-bar__actions .btn { height: 36px; padding: 0 12px; }
}

/* Página de título comum */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { margin: 0; font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
.page-head p { margin: 4px 0 0; color: var(--b-muted); font-size: .95rem; }

/* ==========================================================================
   Busca (/search) — a alma do produto
   ========================================================================== */
.main:has(.sr), .app-main:has(.sr) { max-width: 1320px; }

.sr-top { margin-bottom: 18px; }
.sr-query {
    display: flex; align-items: center; gap: 8px; height: 60px; padding: 0 8px 0 18px;
    background: #fff; border: 1px solid var(--b-line); border-radius: 16px; box-shadow: var(--b-shadow-2);
}
.sr-query:focus-within { border-color: var(--b-blue); box-shadow: var(--b-focus), var(--b-shadow-2); }
.sr-query__icon { color: var(--b-subtle); flex: none; }
.sr-query__input {
    flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent;
    font: 500 1.05rem var(--b-font); color: var(--b-ink);
}
.sr-query__input::placeholder { color: var(--b-subtle); font-weight: 400; }
.sr-query__clear { border: 0; background: none; color: var(--b-subtle); cursor: pointer; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; }
.sr-query__clear:hover { background: var(--b-paper); color: var(--b-navy); }
.sr-query__go { height: 44px; padding: 0 22px; border-radius: 11px; }
.sr-top__row { display: flex; align-items: center; gap: 14px; margin-top: 12px; flex-wrap: wrap; }
.sr-top__hint { color: var(--b-subtle); font-size: .82rem; }

.sr-grid { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 24px; align-items: start; }

.sr-filters {
    position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow: auto;
    background: #fff; border: 1px solid var(--b-line); border-radius: var(--b-radius-lg); padding: 6px 16px 16px;
}
.sr-filters__head { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--b-line); }
.sr-filters__head strong { color: var(--b-navy); }
.sr-filters__close, .sr-filters__apply { display: none !important; }
.fsec { padding: 14px 0 4px; }
.fsec + .fsec { border-top: 1px solid #EDF1F5; }
.fsec__title {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;
    font-size: .82rem; font-weight: 700; color: var(--b-navy);
}
.fsec__sub { font-size: .78rem; font-weight: 600; color: var(--b-muted); margin: 12px 0 8px; }
.fsec__hint { margin: 0; font-size: .82rem; color: var(--b-muted); }
.fsec--more summary { cursor: pointer; list-style: none; margin-bottom: 0; }
.fsec--more summary::-webkit-details-marker { display: none; }
.fsec--more[open] summary .ic { transform: rotate(180deg); }
.uf-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.uf {
    height: 30px; border: 1px solid var(--b-line); border-radius: 7px; background: #fff; cursor: pointer;
    font: 600 .76rem var(--b-font); color: var(--b-ink-2);
}
.uf:hover { border-color: var(--b-line-strong); }
.uf.is-on { background: var(--b-blue); border-color: var(--b-blue); color: #fff; }

.sr-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.sr-bar__filters { display: none; }
.sr-bar__count { font-size: .95rem; color: var(--b-muted); }
.sr-bar__count strong { color: var(--b-navy); font-size: 1.15rem; font-weight: 800; }
.sr-sort { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; font-size: .82rem; color: var(--b-muted); }
.sr-sort select {
    height: 40px; padding: 0 34px 0 12px; border-radius: var(--b-radius); border: 1px solid var(--b-line);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%235B6B82' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
    -webkit-appearance: none; appearance: none; font: 600 .86rem var(--b-font); color: var(--b-navy); cursor: pointer;
}
.sr-bar__actions { display: flex; gap: 8px; }

.active-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.active-chip {
    display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px 0 11px; border-radius: 999px;
    border: 1px solid #9DBDF5; background: var(--b-sky); color: var(--b-blue-hover);
    font: 600 .8rem var(--b-font); cursor: pointer;
}
.active-chip:hover { background: #D6E5FF; }

.pop {
    background: #fff; border: 1px solid var(--b-line); border-radius: var(--b-radius-lg); box-shadow: var(--b-shadow-3);
    padding: 18px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 14px; animation: lm-fade 140ms ease-out;
}
.pop__head { display: flex; gap: 12px; align-items: flex-start; }
.pop__head strong { color: var(--b-navy); }
.pop__head p { margin: 2px 0 0; color: var(--b-muted); font-size: .86rem; }
.pop__icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--b-sky); color: var(--b-blue); flex: none; }
.pop__actions { display: flex; justify-content: flex-end; gap: 8px; }

/* Cartão de resultado */
.rc-list { display: flex; flex-direction: column; gap: 10px; }
.rc {
    background: #fff; border: 1px solid var(--b-line); border-radius: var(--b-radius-lg);
    transition: border-color 120ms ease, box-shadow 120ms ease;
}
.rc:hover { border-color: #B8CBE6; box-shadow: var(--b-shadow-2); }
.rc.is-open { border-color: #9DBDF5; box-shadow: var(--b-shadow-2); }
.rc--skeleton { display: flex; gap: 16px; padding: 16px; margin-bottom: 10px; }
.rc__main { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 18px; padding: 16px 16px 16px 14px; cursor: pointer; }
.rc__body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.rc__tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rc__title {
    margin: 0; font-size: .98rem; font-weight: 600; line-height: 1.4; color: var(--b-ink);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rc.is-open .rc__title { -webkit-line-clamp: unset; }
.rc__toggle {
    display: inline; padding: 0; border: 0; background: none; cursor: pointer;
    font: inherit; color: inherit; text-align: left; line-height: inherit;
}
.rc__toggle:hover { color: var(--b-blue-hover); }
.rc__toggle:focus-visible { outline: 2px solid var(--b-blue); outline-offset: 2px; box-shadow: none; }
.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;
}
.rc__title mark { background: #FFF1A8; color: inherit; border-radius: 3px; padding: 0 1px; }
.rc__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .84rem; color: var(--b-muted); }
.rc__meta span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.rc__meta .ic { color: var(--b-subtle); flex: none; }
.rc__side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 128px; }
.rc__value { font-size: 1.05rem; font-weight: 800; color: var(--b-navy); white-space: nowrap; }
.rc__value--none { font-size: .8rem; font-weight: 500; color: var(--b-subtle); }
/* Valor "a confirmar": provável erro de digitação do órgão no PNCP */
.is-suspect { color: var(--b-muted) !important; text-decoration: line-through; text-decoration-color: rgba(161, 98, 7, .6); }
.value-warn { display: inline-flex; align-items: center; gap: 4px; color: var(--st-attention); font-weight: 700; cursor: help; }
.value-note { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 0; padding: 10px 12px; border-radius: var(--b-radius); background: var(--st-attention-bg); color: #6B4A06; font-size: .8rem; line-height: 1.45; }
.value-note .ic { flex: none; margin-top: 1px; color: var(--st-attention); }
.value-note strong { font-size: .8rem; color: inherit; letter-spacing: 0; }
/* Credenciamento prévio lido no edital (spec 0016). */
.reg-note { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 4px; padding: 10px 12px; border-radius: var(--b-radius); background: var(--st-attention-bg); color: #6B4A06; font-size: .82rem; line-height: 1.45; }
.reg-note .ic { flex: none; margin-top: 1px; color: var(--st-attention); }
.reg-note--closed { background: var(--st-danger-bg); color: #8A1414; }
.reg-note--closed .ic { color: var(--st-danger); }
.rc__value-label { font-size: .72rem; color: var(--b-subtle); }
.rc__actions { display: flex; gap: 2px; margin-top: auto; padding-top: 8px; }
/* Licitação ocultada (some da busca, da agenda e dos alertas da pessoa). */
.rc-hidden { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border: 1px dashed var(--b-line-strong); border-radius: var(--b-radius-lg); background: var(--b-paper); color: var(--b-muted); font-size: .85rem; }
.rc-hidden .ic { flex: none; color: var(--b-subtle); }
.rc-hidden span { flex: 1; min-width: 0; }
.rc--hidden { opacity: .72; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--b-ink-2); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--b-blue); }
.det-hide { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: .8rem; color: var(--b-subtle); }
.det-hide:hover { color: var(--b-ink-2); }
.rc__details { border-top: 1px solid #EDF1F5; padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 16px; animation: lm-fade 140ms ease-out; }
.rc__cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; }
.rc__foot { display: flex; gap: 8px; flex-wrap: wrap; }

.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px 20px; margin: 0; }
.facts div { min-width: 0; }
.facts dt { font-size: .74rem; color: var(--b-subtle); font-weight: 600; margin-bottom: 2px; }
.facts dd { margin: 0; font-size: .88rem; color: var(--b-ink); font-weight: 500; overflow-wrap: anywhere; }
.mini-title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: .86rem; font-weight: 700; color: var(--b-navy); }
.mini-title .ic { color: var(--b-blue); }
.item-list, .doc-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; }
.item-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; padding: 8px 0; border-bottom: 1px solid #EDF1F5; font-size: .84rem; align-items: baseline; }
.item-list__desc { color: var(--b-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-list__qty { color: var(--b-muted); white-space: nowrap; }
.item-list__val { color: var(--b-navy); font-weight: 600; white-space: nowrap; }
.doc-list li a { display: flex; align-items: center; gap: 8px; padding: 7px 0; color: var(--b-blue); text-decoration: none; font-size: .85rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-list li a:hover { text-decoration: underline; }

.sr-more { width: 100%; margin-top: 12px; height: 46px; }
.sr-end { text-align: center; color: var(--b-subtle); font-size: .85rem; margin: 18px 0 0; }

/* Medidor de prazo */
.dl { display: flex; flex-direction: column; gap: 5px; padding: 8px 8px 7px; border-radius: 10px; background: var(--b-sky-2); border: 1px solid #DCE8FA; --tone: var(--b-blue); align-self: start; }
.dl__value { display: flex; align-items: baseline; gap: 3px; color: var(--tone); line-height: 1; min-height: 22px; }
.dl__num { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.02em; }
.dl__num--text { font-size: .88rem; font-weight: 800; letter-spacing: 0; padding-top: 4px; }
.dl__unit { font-size: .72rem; font-weight: 700; }
.dl__bar { height: 4px; border-radius: 4px; background: rgba(11, 37, 69, 0.08); overflow: hidden; }
.dl__bar span { display: block; height: 100%; border-radius: 4px; background: var(--tone); }
.dl__date { font-size: .7rem; color: var(--b-muted); font-weight: 600; white-space: nowrap; }
.dl--far { --tone: var(--b-blue); }
.dl--soon { --tone: var(--b-navy); background: #EEF3FA; border-color: #D9E3F0; }
.dl--urgent { --tone: var(--st-danger); background: #FFF4F4; border-color: #F8D4D4; }
.dl--past, .dl--none { --tone: var(--st-closed); background: #F4F6F9; border-color: #E4E9EF; }
.dl--compact { padding: 6px 7px; }
.dl--compact .dl__num { font-size: 1.15rem; }

.sheet-backdrop { display: none; }

@media (max-width: 980px) {
    .sr-grid { grid-template-columns: 1fr; }
    .sr-filters {
        position: fixed; inset: auto 0 0 0; top: auto; z-index: 300; max-height: 86vh; border-radius: 18px 18px 0 0;
        transform: translateY(105%); transition: transform 220ms ease; padding-bottom: 88px;
    }
    .sr-filters.is-open { transform: none; }
    .sr-filters__close { display: inline-grid !important; }
    .sr-filters__apply { display: flex !important; position: sticky; bottom: -72px; width: 100%; margin-top: 16px; }
    .sheet-backdrop { display: block; position: fixed; inset: 0; z-index: 290; background: rgba(11, 37, 69, .4); }
    .sr-bar__filters { display: inline-flex; }
    .sr-sort span { display: none; }
}
@media (max-width: 640px) {
    .sr-query { height: 52px; padding-left: 14px; }
    .sr-query__go { display: none; }
    .sr-top__hint { display: none; }
    .rc__main { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 14px 12px; }
    .rc__side { grid-column: 1 / -1; flex-direction: row; align-items: center; min-width: 0; gap: 8px; }
    .rc__value-label { display: none; }
    .rc__actions { margin: 0 0 0 auto; padding: 0; }
    .rc__cols { grid-template-columns: 1fr; }
    .sr-bar__actions .btn { padding: 0 12px; }
}

/* ==========================================================================
   Painéis e listas compartilhadas
   ========================================================================== */
.panel { background: #fff; border: 1px solid var(--b-line); border-radius: var(--b-radius-lg); padding: 18px 20px; }
.panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel__head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.02rem; font-weight: 700; color: var(--b-navy); letter-spacing: -0.01em; }
.panel__head h2 .ic { color: var(--b-blue); }
.panel__head p { margin: 3px 0 0; font-size: .84rem; color: var(--b-muted); }
.panel__head .link { white-space: nowrap; padding-top: 2px; }

.rows { list-style: none; margin: 0; padding: 0; }
.rows li + li { border-top: 1px solid #EDF1F5; }
.row-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 6px; margin: 0 -6px; border-radius: 10px; text-decoration: none; color: inherit; }
a.row-item:hover { background: var(--b-sky-2); }
.row-item--sk { display: flex; padding: 12px 0; }
.row-item__body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.row-item__title { font-weight: 600; font-size: .92rem; color: var(--b-ink); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-item__meta { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: .8rem; color: var(--b-muted); }
.row-item__meta span { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.row-item__meta .ic { color: var(--b-subtle); flex: none; }
.row-item__value { font-weight: 800; font-size: .92rem; color: var(--b-navy); white-space: nowrap; }

.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li + li { border-top: 1px solid #EDF1F5; }
.mini-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 6px; margin: 0 -6px; border-radius: 8px; text-decoration: none; }
.mini-list a:hover { background: var(--b-sky-2); }
.mini-list__name { font-size: .88rem; font-weight: 600; color: var(--b-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mini-list__muted { font-size: .78rem; color: var(--b-subtle); white-space: nowrap; }
.badge-new { flex: none; font-size: .74rem; font-weight: 700; color: #047857; background: var(--st-open-bg); padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.mini-empty p { margin: 0 0 12px; font-size: .86rem; color: var(--b-muted); line-height: 1.5; }
.empty--flat { border: 0; padding: 32px 16px; }

/* ==========================================================================
   Início (/home)
   ========================================================================== */
.hm { display: flex; flex-direction: column; gap: 20px; }
.hm-hero {
    position: relative; overflow: hidden; border-radius: 20px; padding: 32px 32px 26px;
    background: var(--b-navy);
    background-image: radial-gradient(1200px 300px at 85% -40%, rgba(59,130,246,.35), transparent 60%);
    color: #fff;
}
.hm-hero__text h1 { margin: 0; color: #fff; font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 800; letter-spacing: -0.02em; }
.hm-hero__text p { margin: 6px 0 20px; color: #B9C8DD; font-size: 1rem; }
.hm-hero__count { color: #fff; font-weight: 700; text-decoration: underline; text-decoration-color: rgba(147,197,253,.6); text-underline-offset: 4px; }
.hm-hero__search { max-width: 760px; border-color: transparent; }
.hm-quick { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; font-size: .82rem; color: #B9C8DD; }
.hm-quick .chip { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: #E6EEF9; text-decoration: none; }
.hm-quick .chip:hover { background: rgba(255,255,255,.16); }
.hm-market__grid { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 28px; align-items: end; }
.kpis { display: flex; flex-direction: column; gap: 14px; }
.kpi { display: flex; flex-direction: column; }
.kpi__value { font-size: 1.7rem; font-weight: 800; color: var(--b-navy); letter-spacing: -0.02em; line-height: 1.1; }
.kpi__label { font-size: .82rem; color: var(--b-muted); }
.spark__title { font-size: .78rem; font-weight: 600; color: var(--b-muted); margin-bottom: 10px; }
.spark__bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; height: 140px; align-items: end; }
.spark__col { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.spark__col span { width: 100%; border-radius: 4px 4px 2px 2px; background: #9DBDF5; min-height: 3px; }
.spark__col:last-child span { background: var(--b-blue); }
.spark__col:hover span { background: var(--b-blue); }
.spark__col em { font-style: normal; font-size: .66rem; color: var(--b-subtle); }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bars__row { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; text-decoration: none; }
.bars__key { font-weight: 700; font-size: .8rem; color: var(--b-navy); }
.bars__track { height: 8px; border-radius: 4px; background: #EEF2F7; overflow: hidden; }
.bars__track span { display: block; height: 100%; background: var(--b-blue); border-radius: 4px; }
.bars__num { font-size: .78rem; color: var(--b-muted); font-weight: 600; min-width: 44px; text-align: right; }

/* Saudação compacta: a busca mora no menu Licitações. */
.hm-hero--slim { padding: 26px 30px; }
.hm-hero--slim .hm-hero__text p { margin-bottom: 0; }
.hm-hero--slim .hm-hero__count { color: #fff; }

/* Mesa de trabalho: minhas licitações e o trio à esquerda, agenda à direita ocupando as duas linhas. */
.hm-desk { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: stretch; }
.hm-left { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.hm-trio { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; align-items: start; }

.hm-mine__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.hm-tile { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; row-gap: 1px; align-items: center; padding: 14px; border: 1px solid var(--b-line); border-radius: 12px; background: #fff; text-decoration: none; color: inherit; transition: border-color .12s ease, background-color .12s ease; }
.hm-tile:hover { border-color: #BFD3F7; background: var(--b-sky-2); }
.hm-tile:focus-visible { outline: none; box-shadow: var(--b-focus); }
.hm-tile__icon { grid-row: 1 / span 3; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--b-sky); color: var(--b-blue); }
.hm-tile__label { font-size: .8rem; color: var(--b-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-tile__num { font-size: 1.45rem; font-weight: 800; line-height: 1.1; color: var(--b-navy); font-variant-numeric: tabular-nums; }
.hm-tile__go { font-size: .78rem; font-weight: 600; color: var(--b-blue); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-tile--review .hm-tile__icon { background: var(--st-closed-bg); color: #475569; }
.hm-tile--go .hm-tile__icon { background: var(--st-published-bg); color: var(--st-published); }
.hm-tile--sent .hm-tile__icon { background: var(--st-dispute-bg); color: var(--st-dispute); }
.hm-tile--won .hm-tile__icon { background: var(--st-open-bg); color: #047857; }
.hm-tile--sk { min-height: 86px; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.hm-mine__hint { margin: 12px 0 0; font-size: .84rem; color: var(--b-muted); }
.hm-next { display: flex; align-items: center; gap: 10px; min-width: 0; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--b-paper); text-decoration: none; color: var(--b-ink); font-size: .85rem; }
.hm-next:hover { background: var(--b-sky-2); }
.hm-next .ic { flex: none; color: var(--b-blue); }
.hm-next__when { flex: none; font-weight: 700; color: var(--b-navy); }
.hm-next__obj { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--b-ink-2); }

/* Agenda: um dia por vez, setas pulam para o dia anterior/seguinte que tem sessão. */
/* A agenda não dita a altura: o conteúdo fica num bloco absoluto e o cartão acompanha a coluna da esquerda. */
.hm-cal { position: relative; padding: 0; overflow: hidden; min-height: 520px; }
.hm-cal__inner { position: absolute; inset: 0; display: flex; flex-direction: column; }
.hm-cal__inner > .sk-lines { padding: 18px; }
.hm-cal__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 16px 18px 14px; border-bottom: 1px solid var(--b-line); }
.hm-cal__head > h2 { grid-column: 1 / -1; margin: 0; font-size: 1.02rem; font-weight: 800; color: var(--b-navy); }
.hm-cal__nav { display: flex; gap: 2px; }
.hm-cal__nav .icon-btn:disabled { opacity: .35; cursor: default; }
.hm-cal__title h2 { margin: 0; font-size: 1.02rem; font-weight: 800; color: var(--b-navy); }
.hm-cal__title p { margin: 2px 0 0; font-size: .8rem; color: var(--b-muted); }
.hm-cal__rel { margin-left: 4px; font-weight: 700; color: var(--b-blue); }
.hm-cal__count { font-size: .76rem; font-weight: 600; color: var(--b-ink-2); background: var(--b-paper); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.hm-cal__list { list-style: none; margin: 0; padding: 4px 0; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.hm-cal__list li + li { border-top: 1px solid #EDF1F5; }
.hm-cal__foot { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--b-line); }
.hm-cal__more { font-size: .78rem; color: var(--b-subtle); }
.hm-cal__list.is-loading { opacity: .45; transition: opacity .15s ease; }
.hm-cal__empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 20px; text-align: center; color: var(--b-muted); }
.hm-cal__empty p { margin: 0; }
.cal-item { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; padding: 11px 18px; text-decoration: none; color: inherit; }
.cal-item:hover { background: var(--b-sky-2); }
.cal-item:focus-visible { outline: none; box-shadow: inset var(--b-focus); }
.cal-item__time { padding-top: 1px; font-size: .8rem; font-weight: 700; color: var(--b-ink-2); font-variant-numeric: tabular-nums; }
.cal-item__body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cal-item__title { font-size: .86rem; font-weight: 600; line-height: 1.38; color: var(--b-ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cal-item:hover .cal-item__title { color: var(--b-blue); }
.cal-item__fav { color: #B7791F; margin-right: 3px; vertical-align: -1px; }
.cal-item__meta { display: flex; gap: 8px; min-width: 0; font-size: .75rem; color: var(--b-muted); }
.cal-item__agency { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-item__place { flex: none; white-space: nowrap; }
.cal-item__value { padding-top: 1px; font-size: .84rem; font-weight: 800; color: var(--b-navy); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cal-item__value.is-suspect { color: var(--st-attention); }

@media (max-width: 1180px) {
    .hm-desk { grid-template-columns: minmax(0, 1fr) 340px; }
    .hm-mine__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
    .hm-market__grid { grid-template-columns: 1fr; }
    .kpis { flex-direction: row; flex-wrap: wrap; gap: 20px 32px; }
    .hm-desk { grid-template-columns: minmax(0, 1fr); }
    .hm-cal { min-height: 0; height: 560px; }
    /* No celular a agenda vem logo depois de Minhas licitações. */
    .hm-left { display: contents; }
    .hm-mine { order: 1; } .hm-cal { order: 2; } .hm-trio { order: 3; }
}
@media (max-width: 640px) {
    .hm-hero { padding: 22px 18px; border-radius: 16px; }
    .row-item { grid-template-columns: 56px minmax(0, 1fr); }
    .row-item__value { display: none; }
    .hm-tile { padding: 12px; column-gap: 10px; }
    .hm-tile__icon { width: 34px; height: 34px; }
    .cal-item { grid-template-columns: 38px minmax(0, 1fr); padding: 11px 14px; }
    .cal-item__value { grid-column: 2; }
    .cal-item__value:empty { display: none; }
}

/* ==========================================================================
   Licitação (/biddings/{id})
   ========================================================================== */
.ic.flip { transform: rotate(180deg); }
.ic--fill { fill: currentColor; }
.det-back {
    display: inline-flex; align-items: center; gap: 4px; margin-bottom: 14px; padding: 6px 10px 6px 4px;
    border: 0; background: none; border-radius: 8px; cursor: pointer; font: 600 .88rem var(--b-font); color: var(--b-muted);
}
.det-back:hover { background: #fff; color: var(--b-navy); }
.det-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.det-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.det-head { padding: 24px; }
.det-title { margin: 12px 0 10px; font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.35; font-weight: 700; color: var(--b-navy); letter-spacing: -0.01em; }
.det-agency { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--b-ink-2); font-size: .92rem; font-weight: 500; margin-bottom: 20px; }
.det-agency span { display: inline-flex; align-items: center; gap: 7px; }
.det-agency .ic { color: var(--b-blue); }
.det-facts { padding-top: 18px; border-top: 1px solid #EDF1F5; }
.facts__wide { grid-column: 1 / -1; }
.det-original { margin-top: 16px; font-size: .85rem; }
.det-original summary { cursor: pointer; color: var(--b-blue); font-weight: 600; }
.det-original p { margin: 8px 0 0; color: var(--b-ink-2); line-height: 1.55; }
.det-sum { font-size: .88rem; font-weight: 700; color: var(--b-navy); }
.det-updated { margin: 14px 0 0; font-size: .78rem; color: var(--b-subtle); }
.tag--alert { background: var(--b-sky); color: var(--b-blue-hover); }

.det-side { display: flex; flex-direction: column; gap: 16px; align-self: start; }
@media (min-width: 961px) and (min-height: 980px) { .det-side { position: sticky; top: 76px; } }
.det-deadline { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.det-deadline__label { font-size: .8rem; font-weight: 700; color: var(--b-muted); }
.det-deadline .dl { padding: 14px 14px 12px; align-self: stretch; }
.det-deadline .dl__num { font-size: 2.4rem; }
.det-deadline .dl__unit { font-size: .9rem; }
.det-deadline .dl__num--text { font-size: 1.3rem; }
.det-deadline .dl__bar { height: 6px; }
.det-deadline .dl__date { display: none; }
.det-dates { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.det-dates div { display: flex; justify-content: space-between; gap: 12px; font-size: .86rem; }
.det-dates dt { color: var(--b-muted); }
.det-dates dd { margin: 0; font-weight: 600; color: var(--b-ink); text-align: right; }
.det-value { display: flex; flex-direction: column; gap: 2px; padding: 14px 0; border-top: 1px solid #EDF1F5; border-bottom: 1px solid #EDF1F5; }
.det-value span { font-size: .8rem; color: var(--b-muted); font-weight: 600; }
.det-value strong { font-size: 1.5rem; font-weight: 800; color: var(--b-navy); letter-spacing: -0.02em; }
.det-value em { font-style: normal; color: var(--b-subtle); font-size: .92rem; }
.det-actions { display: flex; flex-direction: column; gap: 8px; }
.det-hint { margin: 0; font-size: .78rem; color: var(--b-subtle); line-height: 1.5; }

.table-wrap { overflow-x: auto; margin: 0 -4px; }
.table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.table th { text-align: left; font-size: .76rem; font-weight: 700; color: var(--b-muted); padding: 8px 10px; border-bottom: 1px solid var(--b-line); white-space: nowrap; text-transform: none; letter-spacing: 0; background: none; }
.table td { padding: 10px; border-bottom: 1px solid #EDF1F5; color: var(--b-ink); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }
.table .strong { font-weight: 700; color: var(--b-navy); }
.table__n { color: var(--b-subtle); width: 48px; }
.muted-inline { color: var(--b-subtle); font-size: .78rem; }

.docs { display: flex; flex-direction: column; gap: 8px; }
.doc { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--b-line); border-radius: var(--b-radius); text-decoration: none; transition: border-color 120ms ease, background-color 120ms ease; }
.doc:hover { border-color: #9DBDF5; background: var(--b-sky-2); }
.doc__icon { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--b-sky); color: var(--b-blue); flex: none; }
.doc__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.doc__title { font-weight: 600; font-size: .88rem; color: var(--b-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc__meta { display: flex; gap: 12px; font-size: .76rem; color: var(--b-muted); }
.doc__go { color: var(--b-subtle); flex: none; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid #E3EAF4; display: flex; flex-direction: column; gap: 14px; }
.timeline li { position: relative; padding-left: 12px; }
.timeline li::before { content: ""; position: absolute; left: -21px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--b-blue); }
.timeline__head { display: flex; justify-content: space-between; gap: 12px; font-size: .86rem; }
.timeline__head strong { color: var(--b-navy); }
.timeline__head time { color: var(--b-subtle); font-size: .78rem; }
.timeline__change { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; font-size: .86rem; }
.timeline__change s { color: var(--b-subtle); }
.timeline__change span { color: var(--b-ink); font-weight: 600; }
.timeline__change .ic { color: var(--b-subtle); }

@media (max-width: 980px) {
    .det-grid { grid-template-columns: 1fr; }
    .det-side { position: static; order: -1; }
    .det-head { padding: 18px; }
}

/* ==========================================================================
   Alertas e favoritos
   ========================================================================== */
.page-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.watch-list { display: flex; flex-direction: column; gap: 12px; }
.watch.is-paused { background: #FAFBFD; }
.watch.is-paused .watch__title h2 { color: var(--b-muted); }
.watch__top { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.watch__icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--b-sky); color: var(--b-blue); flex: none; }
.watch.is-paused .watch__icon { background: #EEF1F5; color: var(--b-subtle); }
.watch__title { flex: 1; min-width: 200px; }
.watch__title h2 { margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--b-navy); }
.watch__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 4px; font-size: .82rem; color: var(--b-muted); }
.watch__actions { display: flex; gap: 6px; align-items: center; }
.watch__chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0 54px; }
.tag--kw { background: #fff; border: 1px solid var(--b-line); color: var(--b-navy); }
.watch__prefs { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 14px 0 0 54px; padding-top: 14px; border-top: 1px solid #EDF1F5; }
.icon-btn--danger:hover:not(:disabled) { background: var(--st-danger-bg); color: var(--st-danger); }
.confirm { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding: 12px 14px; border-radius: var(--b-radius); background: var(--st-danger-bg); font-size: .88rem; color: var(--b-ink); }
.confirm span { flex: 1; min-width: 200px; }
.watch-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 18px 0 0; font-size: .84rem; color: var(--b-muted); }

.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: .86rem; font-weight: 500; color: var(--b-ink-2); user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track { width: 34px; height: 20px; border-radius: 999px; background: #CBD5E1; position: relative; transition: background-color 150ms ease; flex: none; }
.switch__track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform 150ms ease; }
.switch input:checked + .switch__track { background: var(--b-blue); }
.switch input:checked + .switch__track::after { transform: translateX(14px); }
.switch input:focus-visible + .switch__track { box-shadow: var(--b-focus); }
.switch input:disabled + .switch__track { opacity: .6; }
.switch .ic { color: var(--b-subtle); }

.fav-tabs { margin-bottom: 14px; }
.fav-tabs .count { margin-left: 2px; }
.rc__main--link { text-decoration: none; color: inherit; }

@media (max-width: 640px) {
    .watch__chips, .watch__prefs { margin-left: 0; }
    .watch__actions { width: 100%; }
    .watch__actions .btn { flex: 1; }
}

/* Tela de abertura (antes do Blazor carregar) no marinho da marca */
.lm-boot-screen { background: var(--b-navy); }
.lm-boot-emblem rect { fill: #13315C; stroke: #1E3F70; }

/* Login, cadastro e verificação: painel da marca no marinho */
.auth-split__brand { background: var(--b-navy); }
.auth-split__brand-headline { color: #fff; }
.auth-split__brand-metrics, .auth-split__brand-footer { color: #A9BBD6; }
.auth-split__form { background: var(--b-paper); }

/* ==========================================================================
   Formulários, janelas e páginas de conta (Empresa, Equipe, Cadastro)
   ========================================================================== */
.switch { position: relative; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid__wide { grid-column: 1 / -1; }
.form-stack { display: flex; flex-direction: column; gap: 14px; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.form-actions .field-error { margin: 0 auto 0 0; }
.field .validation-message, .validation-message { color: var(--st-danger); font-size: .8rem; font-weight: 500; }
.input-wrap { position: relative; display: block; }
.input-wrap .input { padding-right: 44px; }
.input-wrap__btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 34px; height: 32px; border: 0; background: none; border-radius: 8px; color: var(--b-subtle); cursor: pointer; display: grid; place-items: center; }
.input-wrap__btn:hover { background: var(--b-paper); color: var(--b-navy); }

.prof-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.prof-main, .prof-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.prof-side { position: sticky; top: 76px; }
.prof-facts { margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid #EDF1F5; }
.prof-hint { margin-top: 14px; font-size: .8rem; }
.prof-pass-btn { margin-top: 14px; }

/* Seletor de CNAE */
.cnae-pick__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; font-size: .86rem; color: var(--b-muted); }
.cnae-pick__head strong { color: var(--b-navy); }
.cnae-pick__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cnae-row { display: flex; align-items: flex-start; gap: 14px; padding: 12px 14px; border: 1px solid var(--b-line); border-radius: var(--b-radius); background: #fff; cursor: pointer; transition: border-color 120ms ease, background-color 120ms ease; }
.cnae-row:hover { border-color: var(--b-line-strong); }
.cnae-row.is-on { border-color: #9DBDF5; background: var(--b-sky-2); }
.cnae-row .switch { margin-top: 1px; }
.cnae-row__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cnae-row__desc { font-size: .9rem; font-weight: 600; color: var(--b-ink); line-height: 1.35; }
.cnae-row:not(.is-on) .cnae-row__desc { color: var(--b-muted); font-weight: 500; }
.cnae-row__meta { display: flex; align-items: center; gap: 8px; }
.cnae-row__code { font-size: .78rem; color: var(--b-subtle); font-weight: 600; }

/* Resumo do plano */
.plan-sum { display: flex; flex-direction: column; gap: 12px; }
.plan-sum .panel__head { margin-bottom: 0; align-items: center; }
.plan-sum__name { font-size: 1.4rem; font-weight: 800; color: var(--b-navy); letter-spacing: -0.02em; display: flex; align-items: baseline; gap: 8px; }
.plan-sum__cycle { font-size: .82rem; font-weight: 600; color: var(--b-muted); letter-spacing: 0; }
.dlg__total small { font-size: .78rem; font-weight: 600; color: var(--b-muted); margin-left: 4px; }
.plan-sum__note { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .86rem; color: var(--b-ink-2); }
.plan-sum__note .ic { color: var(--b-blue); }
.plan-sum__note.is-urgent { color: #B91C1C; font-weight: 600; }
.plan-sum__note.is-urgent .ic { color: var(--st-danger); }
.plan-sum__seats { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-top: 1px solid #EDF1F5; }
.plan-sum__seats-row { display: flex; justify-content: space-between; font-size: .86rem; color: var(--b-muted); }
.plan-sum__seats-row strong { color: var(--b-navy); }

/* Escolha de plano (janela de upgrade e cadastro) */
.plan-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.plan-pick__opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px; border: 1px solid var(--b-line); border-radius: var(--b-radius); background: #fff; cursor: pointer; text-align: left; font-family: var(--b-font); }
.plan-pick__opt:hover { border-color: var(--b-line-strong); }
.plan-pick__opt.is-on { border: 2px solid var(--b-blue); padding: 13px; background: var(--b-sky-2); }
.plan-pick__name { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--b-navy); font-size: .92rem; }
.plan-pick__price { font-weight: 800; color: var(--b-navy); font-size: 1.15rem; margin-top: 6px; }
.plan-pick__per, .plan-pick__users { font-size: .76rem; color: var(--b-muted); }

/* Janela modal */
.dlg-backdrop { position: fixed; inset: 0; z-index: 1500; background: rgba(11, 37, 69, .45); animation: lm-fade 140ms ease-out; }
.dlg {
    position: fixed; z-index: 1510; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto;
    background: #fff; border-radius: 18px; box-shadow: var(--b-shadow-3); animation: lm-fade 160ms ease-out;
}
.dlg--sm { width: min(460px, calc(100vw - 32px)); }
.dlg__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 6px; }
.dlg__head h2 { margin: 0; font-size: 1.15rem; font-weight: 800; color: var(--b-navy); }
.dlg__body { padding: 10px 20px 4px; display: flex; flex-direction: column; gap: 16px; }
.dlg__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dlg__row .fsec__title { margin-bottom: 2px; }
.dlg__total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px; border-radius: var(--b-radius); background: var(--b-paper); color: var(--b-muted); font-size: .9rem; }
.dlg__total strong { font-size: 1.3rem; color: var(--b-navy); font-weight: 800; }
.dlg__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 20px 20px; }
.stepper { display: inline-flex; align-items: center; gap: 10px; }
.stepper .icon-btn { font-size: 1.1rem; font-weight: 700; color: var(--b-navy); }
.stepper__value { min-width: 28px; text-align: center; font-weight: 800; font-size: 1.1rem; color: var(--b-navy); }
.code-box { padding: 14px; border-radius: var(--b-radius); background: var(--b-sky-2); border: 1px dashed #9DBDF5; font: 700 1.2rem/1 ui-monospace, Menlo, monospace; letter-spacing: .06em; text-align: center; color: var(--b-navy); user-select: all; }

/* Equipe */
.pending { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; border-color: #9DBDF5; background: var(--b-sky-2); }
.pending__icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: #fff; color: var(--b-blue); flex: none; }
.pending__body { flex: 1; min-width: 220px; }
.pending__body strong { color: var(--b-navy); }
.pending__body p { margin: 2px 0 0; font-size: .86rem; color: var(--b-ink-2); }
.members { list-style: none; margin: 0; padding: 0; }
.member { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; }
.member + .member { border-top: 1px solid #EDF1F5; }
.member__avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--b-navy); color: #fff; font-weight: 700; }
.member__avatar.is-pending { background: #EEF1F5; color: var(--b-subtle); border: 1px dashed var(--b-line-strong); }
.member__body { min-width: 0; }
.member__name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; color: var(--b-ink); }
.member__meta { display: flex; flex-wrap: wrap; gap: 2px 16px; margin-top: 3px; font-size: .8rem; color: var(--b-muted); }
.member__meta span { display: inline-flex; align-items: center; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.member__actions { display: flex; gap: 2px; }
.member__confirm { grid-column: 1 / -1; margin-top: 4px; }
.roles p { margin: 0 0 8px; font-size: .86rem; color: var(--b-ink-2); line-height: 1.5; }
.roles p:last-child { margin-bottom: 0; }

/* Cadastro em passos */
.steps { list-style: none; margin: 0 0 22px; padding: 0; display: flex; gap: 8px; }
.steps__item { flex: 1; display: flex; align-items: center; gap: 8px; padding-top: 10px; border-top: 3px solid var(--b-line); font-size: .82rem; font-weight: 600; color: var(--b-subtle); }
.steps__item.is-current { border-top-color: var(--b-blue); color: var(--b-navy); }
.steps__item.is-done { border-top-color: var(--st-open); color: var(--b-ink-2); }
.steps__dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #EEF1F5; font-size: .74rem; font-weight: 800; flex: none; }
.steps__item.is-current .steps__dot { background: var(--b-blue); color: #fff; }
.steps__item.is-done .steps__dot { background: var(--st-open); color: #fff; }
.reg { display: flex; flex-direction: column; gap: 16px; }
.reg-cnpj { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 16px; background: #fff; border: 1px solid var(--b-line); border-radius: 14px; }
.reg-cnpj:focus-within { border-color: var(--b-blue); box-shadow: var(--b-focus); }
.reg-cnpj .ic { color: var(--b-subtle); flex: none; }
.reg-cnpj__input { flex: 1; min-width: 0; border: 0 !important; outline: none; box-shadow: none !important; background: transparent !important; font: 600 1.15rem var(--b-font); letter-spacing: .02em; color: var(--b-navy); padding: 0 !important; height: 100%; }
.reg-cnpj__spin { border-color: rgba(29,78,216,.2); border-top-color: var(--b-blue); }
.reg-found { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--b-radius); background: var(--st-open-bg); border: 1px solid #BFE6D3; }
.reg-found__icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--st-open); color: #fff; flex: none; }
.reg-found div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.reg-found strong { color: var(--b-navy); font-size: .95rem; }
.reg-found span { font-size: .8rem; color: var(--b-ink-2); }
.reg-plan { display: flex; flex-direction: column; gap: 12px; padding-top: 16px; border-top: 1px solid #EDF1F5; }
.reg-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 6px; }

@media (max-width: 980px) {
    .prof-grid { grid-template-columns: 1fr; }
    .prof-side { position: static; }
}
@media (max-width: 640px) {
    .form-grid, .plan-pick { grid-template-columns: 1fr; }
    .member { grid-template-columns: 40px minmax(0, 1fr); }
    .member__actions { grid-column: 2; }
    .steps__label { display: none; }
    .reg-nav .btn { flex: 1; }
}

/* ==========================================================================
   Avisos (sino e /notifications)
   ========================================================================== */
.ntf-pop {
    position: absolute; right: 0; top: calc(100% + 10px); z-index: 200; width: min(400px, calc(100vw - 24px));
    background: #fff; border: 1px solid var(--b-line); border-radius: var(--b-radius-lg); box-shadow: var(--b-shadow-3);
    display: flex; flex-direction: column; overflow: hidden; animation: lm-fade 140ms ease-out;
}
.ntf-pop__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; border-bottom: 1px solid #EDF1F5; }
.ntf-pop__head strong { color: var(--b-navy); }
.ntf-pop__list { max-height: min(460px, 60vh); overflow: auto; padding: 4px; }
.ntf-pop__sk { padding: 12px; }
.ntf-pop__empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 28px 20px; }
.ntf-pop__empty p { margin: 0; font-size: .86rem; color: var(--b-muted); }
.ntf-pop__all { display: block; padding: 12px; text-align: center; border-top: 1px solid #EDF1F5; font-size: .86rem; font-weight: 600; color: var(--b-blue); text-decoration: none; }
.ntf-pop__all:hover { background: var(--b-sky-2); }

.ntf {
    position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr) 10px; gap: 12px; align-items: start;
    width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; text-align: left; cursor: pointer;
    font-family: var(--b-font);
}
.ntf:hover { background: var(--b-paper); }
.ntf.is-unread { background: var(--b-sky-2); }
.ntf.is-unread:hover { background: #E3EDFC; }
.ntf__icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #EEF1F5; color: var(--b-muted); }
.ntf__icon--new { background: var(--b-sky); color: var(--b-blue); }
.ntf__icon--date { background: #FFF4F4; color: var(--st-danger); }
.ntf__icon--status { background: var(--st-dispute-bg); color: var(--st-dispute); }
.ntf__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ntf__msg { font-size: .86rem; font-weight: 600; color: var(--b-ink); line-height: 1.35; }
.ntf__sub { font-size: .8rem; color: var(--b-ink-2); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ntf__time { font-size: .74rem; color: var(--b-subtle); margin-top: 2px; }
.ntf__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--b-blue); margin-top: 6px; }
.notif-dropdown { display: none !important; }

.ntf-tabs { margin-bottom: 14px; flex-wrap: wrap; }
.ntf-list { padding: 6px; }
.ntf-day { padding: 12px 12px 6px; font-size: .78rem; font-weight: 700; color: var(--b-muted); }
.ntf-day:first-letter { text-transform: uppercase; }

@media (max-width: 640px) {
    .ntf-pop { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; }
}

/* ── Pipeline de propostas (spec 0013) ─────────────────────────────────────── */
.stage--review { --stage: var(--st-published); --stage-bg: var(--st-published-bg); }
.stage--go     { --stage: var(--st-dispute);   --stage-bg: var(--st-dispute-bg); }
.stage--sent   { --stage: var(--st-attention); --stage-bg: var(--st-attention-bg); }
.stage--won    { --stage: #047857;             --stage-bg: var(--st-open-bg); }
.stage--lost   { --stage: var(--st-danger);    --stage-bg: var(--st-danger-bg); }
.stage--quit   { --stage: var(--st-closed);    --stage-bg: var(--st-closed-bg); }

.part-panel { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; }
.part-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.part-panel__head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .95rem; font-weight: 700; color: var(--b-navy); }
.part-panel__link { font-size: .82rem; font-weight: 600; color: var(--b-blue); text-decoration: none; }
.part-panel__link:hover { text-decoration: underline; }
.part-panel .det-hint { margin: 0; }
.part-field { display: flex; flex-direction: column; gap: 5px; font-size: .8rem; font-weight: 600; color: var(--b-muted); }
.part-field textarea.input { height: auto; padding: 9px 12px; resize: vertical; line-height: 1.45; }
.part-field select[class*="stage--"] { border-left: 4px solid var(--stage); font-weight: 600; color: var(--b-ink); }

.pl-owner { display: flex; flex-direction: column; gap: 5px; min-width: 220px; font-size: .8rem; font-weight: 600; color: var(--b-muted); }

.pl-summary { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 16px; padding: 0; }
.pl-summary li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--b-line); font-size: .84rem; color: var(--b-ink-2); }
.pl-summary li strong { color: var(--b-navy); }
.pl-summary__dot, .pl-col__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--stage); flex: none; }
.pl-summary__value { color: var(--b-subtle); font-size: .8rem; }

.pl-board {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(262px, 1fr); gap: 12px;
    overflow-x: auto; padding-bottom: 12px; align-items: start; scroll-snap-type: x proximity;
}
.pl-col {
    min-height: 220px; padding: 12px; border-radius: var(--b-radius-lg); background: #EDF1F6;
    border: 2px dashed transparent; display: flex; flex-direction: column; gap: 10px; scroll-snap-align: start;
    transition: border-color .15s, background-color .15s;
}
.pl-col.is-over { border-color: var(--stage); background: var(--stage-bg); }
.pl-col__head { display: flex; align-items: center; gap: 8px; padding: 2px 4px; }
.pl-col__head h2 { margin: 0; font-size: .9rem; font-weight: 700; color: var(--b-navy); flex: 1; }
.pl-col__empty { margin: 0; padding: 18px 8px; text-align: center; font-size: .82rem; color: var(--b-subtle); }

.pl-card {
    display: flex; flex-direction: column; gap: 9px; padding: 12px; border-radius: var(--b-radius);
    background: #fff; border: 1px solid var(--b-line); border-top: 3px solid var(--stage, var(--b-line));
    box-shadow: var(--b-shadow-1); cursor: grab;
}
.pl-col .pl-card { border-top-color: var(--stage); }
.pl-card:hover { box-shadow: var(--b-shadow-2); }
.pl-card.is-dragging { opacity: .45; cursor: grabbing; }
.pl-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pl-card__top .dl { min-width: 74px; }
.pl-card__title {
    color: var(--b-ink); font-size: .88rem; font-weight: 600; line-height: 1.35; text-decoration: none;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.pl-card__title:hover { color: var(--b-blue); text-decoration: underline; }
.pl-card__meta { display: flex; flex-direction: column; gap: 3px; font-size: .78rem; color: var(--b-muted); }
.pl-card__meta span { display: flex; align-items: center; gap: 5px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-card__meta .ic { flex: none; }
.pl-card__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.pl-card__value { display: flex; flex-direction: column; font-size: .92rem; font-weight: 800; color: var(--b-navy); }
.pl-card__value small { font-size: .7rem; font-weight: 600; color: var(--b-subtle); }
.pl-card__owner { display: inline-flex; align-items: center; gap: 4px; max-width: 55%; padding: 3px 8px; border-radius: 999px; background: var(--b-paper); font-size: .74rem; font-weight: 600; color: var(--b-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-card__notes { margin: 0; padding: 7px 9px; border-radius: var(--b-radius-sm); background: var(--st-attention-bg); color: #6B4A06; font-size: .78rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pl-card__move .input--sm { margin: 0; height: 32px; font-size: .8rem; color: var(--b-ink-2); }

@media (max-width: 640px) {
    .pl-owner { min-width: 0; width: 100%; }
    .pl-summary { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 16px; padding: 0 16px 4px; }
    .pl-summary li { flex: none; }
    .pl-board { grid-auto-columns: 84%; margin: 0 -16px; padding: 0 16px 12px; }
}

/* ── Documentos da empresa (spec 0015) ─────────────────────────────────────── */
.btn--sm { height: 34px; padding: 0 12px; font-size: .84rem; gap: 6px; }
.doc-upload { position: relative; }
.doc-upload:focus-within { box-shadow: var(--b-focus); }

.doc-st--ok      { --doc: #047857;             --doc-bg: var(--st-open-bg); }
.doc-st--soon    { --doc: var(--st-attention); --doc-bg: var(--st-attention-bg); }
.doc-st--late    { --doc: var(--st-danger);    --doc-bg: var(--st-danger-bg); }
.doc-st--missing { --doc: var(--b-subtle);     --doc-bg: var(--st-closed-bg); }

.doc-summary { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 16px; padding: 0; }
.doc-summary li { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--doc-bg); color: var(--doc); font-size: .85rem; font-weight: 600; }
.doc-summary li strong { font-weight: 800; }

.doc-drop {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
    padding: 26px 20px; margin-bottom: 18px; border: 2px dashed var(--b-line-strong); border-radius: var(--b-radius-lg);
    background: #fff; color: var(--b-muted); font-size: .85rem; transition: border-color .15s, background-color .15s;
}
.doc-drop strong { color: var(--b-navy); font-size: .98rem; }
.doc-drop:hover, .doc-drop.is-over { border-color: var(--b-blue); background: var(--b-sky-2); }
.doc-drop:focus-within { border-color: var(--b-blue); box-shadow: var(--b-focus); }
.doc-drop.is-busy { opacity: .7; }
.doc-drop__input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.doc-drop__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--b-sky); color: var(--b-blue); }
.doc-drop__icon .ic { transform: rotate(180deg); }

.doc-result { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; border-left: 4px solid var(--b-blue); }
.doc-result.is-done { border-left-color: #047857; }
.doc-result.is-pending { border-left-color: var(--st-attention); }
.doc-result__head { display: flex; align-items: flex-start; gap: 12px; }
.doc-result__head > div { flex: 1; min-width: 0; }
.doc-result__head h2 { margin: 0; font-size: 1rem; font-weight: 700; color: var(--b-navy); }
.doc-result__head p { margin: 3px 0 0; font-size: .85rem; color: var(--b-muted); }
.doc-result__icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--b-sky); color: var(--b-blue); flex: none; }
.doc-result.is-done .doc-result__icon { background: var(--st-open-bg); color: #047857; }
.doc-result.is-pending .doc-result__icon { background: var(--st-attention-bg); color: var(--st-attention); }
.doc-result .value-note { margin: 0; }

.doc-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.doc-form .part-field { flex: 1 1 200px; }
.doc-form--edit { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--b-line); }
.doc-form__actions { display: flex; gap: 8px; }

.doc-list { display: flex; flex-direction: column; gap: 10px; }
.doc-row {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start;
    padding: 14px 16px; background: #fff; border: 1px solid var(--b-line); border-left: 4px solid var(--doc, var(--b-line)); border-radius: var(--b-radius-lg);
}
.doc-row__mark { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--doc-bg, var(--b-paper)); color: var(--doc, var(--b-muted)); }
.doc-row__body h2 { margin: 0; font-size: .96rem; font-weight: 700; color: var(--b-navy); }
.doc-row__state { margin: 2px 0 0; font-size: .86rem; font-weight: 600; color: var(--doc, var(--b-ink-2)); }
.doc-st--missing .doc-row__state { color: var(--b-ink-2); }
.doc-row__file, .doc-row__hint { margin: 4px 0 0; font-size: .8rem; color: var(--b-subtle); }
.doc-row__file { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.doc-row__file span:first-child { color: var(--b-ink-2); max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-row__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.doc-row__icons { display: flex; gap: 2px; }

.doc-others { margin-top: 28px; }
.doc-others__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.doc-others__head h2 { margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--b-navy); }

@media (max-width: 640px) {
    .doc-row { grid-template-columns: auto minmax(0, 1fr); }
    .doc-row__actions { grid-column: 1 / -1; justify-content: flex-start; }
}
.hm-docs__ok { display: flex; align-items: center; gap: 6px; margin: 0; font-size: .88rem; font-weight: 600; color: #047857; }
.hm-docs__state { font-size: .78rem; font-weight: 700; white-space: nowrap; color: var(--b-subtle); }
.hm-docs__state--Expired { color: var(--st-danger); }
.hm-docs__state--ExpiringSoon, .hm-docs__state--MissingDate { color: var(--st-attention); }

/* ==========================================================================
   Itens e preços (planilha da proposta) na página da licitação
   ========================================================================== */
.pi .panel__head p strong.pi__total { color: var(--b-navy); }
.pi__hint { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 12px; padding: 10px 12px; border-radius: var(--b-radius); background: var(--b-sky-2); color: var(--b-ink-2); font-size: .82rem; line-height: 1.45; }
.pi__hint .ic { flex: none; margin-top: 2px; color: var(--b-blue); }
.pi__table td { vertical-align: top; }
.pi__desc { min-width: 220px; max-width: 420px; }
.pi__desc span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }
.pi__table.is-editing .pi__desc span { -webkit-line-clamp: 2; }
.pi__ref { white-space: nowrap; }
.pi__ref strong { display: block; font-weight: 700; color: var(--b-navy); }
.pi__ref small, .pi__unit { display: block; font-size: .72rem; font-weight: 500; color: var(--b-subtle); }
.pi__use { font-size: .74rem; margin-top: 2px; }
.pi__in { width: 112px; text-align: right; font-variant-numeric: tabular-nums; }
.pi__table.is-editing td:last-child .input { min-width: 150px; }
.pi__more { margin-top: 10px; }
.pi__foot { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    margin: 12px -20px -18px; padding: 12px 20px; border-top: 1px solid var(--b-line); background: #fff; border-radius: 0 0 var(--b-radius-lg) var(--b-radius-lg); }
.pi__foot strong { color: var(--b-navy); font-size: 1.02rem; font-variant-numeric: tabular-nums; }
.pi__foot-actions { display: flex; gap: 8px; }
.sk--tiny { display: inline-block; width: 70px; height: 12px; }
@media (max-width: 640px) {
    .pi__foot { position: static; margin: 12px 0 0; padding: 12px 0 0; }
    .pi__desc { min-width: 180px; }
}

/* Resumo do edital (spec 0017) */
.es__empty { margin: 0; color: var(--b-muted); font-size: .88rem; line-height: 1.5; }
.es__empty .btn { margin-top: 10px; }
.es__note { margin: 10px 0 0; font-size: .76rem; color: var(--b-subtle); }
.es__group + .es__group { margin-top: 14px; }
.es__group h3 { margin: 0 0 6px; font-size: .78rem; font-weight: 700; color: var(--b-muted); }
.es__list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--b-line); border-radius: 10px; }
.es__list li + li { border-top: 1px solid #EDF1F5; }
.es__fact summary { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 10px 12px; cursor: pointer; list-style: none; }
.es__fact summary::-webkit-details-marker { display: none; }
.es__fact summary:hover { background: var(--b-sky-2); }
.es__fact summary:focus-visible { outline: none; box-shadow: inset var(--b-focus); }
.es__label { font-size: .84rem; color: var(--b-muted); }
.es__value { font-size: .9rem; font-weight: 600; color: var(--b-ink); }
.es__fact.is-attention .es__value { color: #8A5A00; }
.es__fact.is-attention .es__value::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--st-attention); vertical-align: 1px; }
.es__more { font-size: .74rem; color: var(--b-blue); white-space: nowrap; }
.es__fact details[open] .es__more { color: var(--b-subtle); }
.es__quote { margin: 0 12px 12px; padding: 10px 12px; border-left: 3px solid var(--b-line-strong); background: var(--b-paper); border-radius: 0 8px 8px 0; font-size: .82rem; line-height: 1.5; color: var(--b-ink-2); }
@media (max-width: 640px) {
    .es__fact summary { grid-template-columns: minmax(0, 1fr) auto; }
    .es__value { grid-column: 1 / -1; grid-row: 2; }
}

/* Score do órgão (spec 0018) */
.sc__body { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 20px; align-items: start; }
.sc__badge { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 112px; height: 112px; color: var(--b-navy); }
.sc__ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.sc__track { fill: none; stroke: #EEF2F7; stroke-width: 6; }
.sc__arc { fill: none; stroke-width: 6; stroke-linecap: round; stroke: var(--b-blue); }
.sc__badge--boa .sc__arc { stroke: var(--st-open); }
.sc__badge--media .sc__arc { stroke: var(--st-attention); }
.sc__badge--fraca .sc__arc { stroke: var(--st-danger); }
.sc__badge strong { position: relative; font-size: 2rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.sc__badge span { position: relative; margin-top: 4px; font-size: .74rem; font-weight: 600; color: var(--b-muted); }
.sc__none { color: var(--b-subtle); }
.sc__badge--none { border: 2px dashed var(--b-line); border-radius: 50%; }
.sc__facts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sc__fact { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 10px; font-size: .88rem; line-height: 1.45; color: var(--b-ink); }
.sc__fact small { display: block; margin-top: 2px; font-size: .74rem; color: var(--b-subtle); }
.sc__dot { width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--b-line-strong); }
.sc__fact--good .sc__dot { background: var(--st-open); }
.sc__fact--attention .sc__dot { background: var(--st-attention); }
.sc__fact--risk .sc__dot { background: var(--st-danger); }
.sc__fact--info .sc__dot { background: var(--b-blue-2); }
.sc__sources { margin: 14px 0 0; padding-top: 10px; border-top: 1px solid #EDF1F5; font-size: .74rem; color: var(--b-subtle); line-height: 1.5; }
@media (max-width: 640px) {
    .sc__body { grid-template-columns: minmax(0, 1fr); }
    .sc__badge { margin: 0 auto; }
}

/* Etiqueta do score do órgão no cartão da busca (spec 0018) */
.score-chip { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 999px; background: var(--b-paper); border: 1px solid var(--b-line); font-size: .74rem; font-weight: 600; color: var(--b-ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.score-chip__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--b-line-strong); }
.score-chip--boa .score-chip__dot { background: var(--st-open); }
.score-chip--media .score-chip__dot { background: var(--st-attention); }
.score-chip--fraca .score-chip__dot { background: var(--st-danger); }

/* ==========================================================================
   Cartão completo da busca (.lc): tudo à vista, sem expandir para decidir
   ========================================================================== */
.rc-list { gap: 14px; }
.lc { background: #fff; border: 1px solid var(--b-line); border-radius: 14px; padding: 16px 18px 14px; box-shadow: var(--b-shadow-1); transition: border-color .15s ease, box-shadow .15s ease; }
.lc:hover { border-color: #C7D6EE; box-shadow: var(--b-shadow-2); }
.lc:focus-within { border-color: #B6CBEF; }
.lc--hidden { opacity: .72; }
.lc__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.lc__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.lc__tools { display: flex; gap: 2px; flex: none; margin: -6px -6px -6px 0; }
.lc__main { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 16px; align-items: start; }
.lc__main > .dl { width: 92px; }
.lc__title { margin: 0 0 8px; font-size: 1.02rem; font-weight: 700; line-height: 1.42; letter-spacing: -0.005em; }
.lc__title a { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; color: var(--b-ink); text-decoration: none; }
.lc__title a:hover { color: var(--b-blue); }
.lc__title a:focus-visible { outline: none; border-radius: 4px; box-shadow: var(--b-focus); }
.lc__org { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: .84rem; color: var(--b-muted); }
.lc__org > span { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.lc__org .ic { flex: none; color: var(--b-subtle); }
.lc__agency { color: var(--b-ink-2); font-weight: 600; }

/* Órgão no cartão: logo + nome + score num selo tingido pela saúde fiscal (AgencyBadge). */
.lc__org > .ag { display: inline-flex; }
.ag { --ag-bg: var(--b-paper); --ag-line: var(--b-line); --ag-ink: var(--b-ink-2); --ag-dot: var(--b-line-strong);
      align-items: center; gap: 7px; max-width: 100%; padding: 3px 4px 3px 3px; border-radius: 999px;
      background: var(--ag-bg); border: 1px solid var(--ag-line); color: var(--ag-ink); font-size: .82rem; font-weight: 600; line-height: 1.2; }
.ag--boa { --ag-bg: var(--st-open-bg); --ag-line: #BFE8D4; --ag-ink: #065F46; --ag-dot: var(--st-open); }
.ag--media { --ag-bg: var(--st-attention-bg); --ag-line: #F3DE9A; --ag-ink: #6B4A06; --ag-dot: var(--st-attention); }
.ag--fraca { --ag-bg: var(--st-danger-bg); --ag-line: #F5C6C6; --ag-ink: #9B1C1C; --ag-dot: var(--st-danger); }
.ag__logo { position: relative; flex: none; width: 24px; height: 24px; border-radius: 50%; overflow: hidden; background: var(--b-white); box-shadow: 0 0 0 1px rgba(11,37,69,.08); display: grid; place-items: center; }
.ag__logo img { position: absolute; inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); object-fit: contain; background: var(--b-white); }
.ag__initials { font-size: .62rem; font-weight: 800; letter-spacing: .02em; color: var(--b-navy); }
.ag__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 340px; }
.ag__score { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; background: var(--b-white); font-size: .74rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.ag:not(:has(.ag__score)) { padding-right: 10px; }
.ag__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ag-dot); }
.lc__place { color: var(--b-muted); }
@media (max-width: 640px) { .ag__name { max-width: 190px; } }
.lc__value { min-width: 120px; text-align: right; }
.lc__value strong { display: block; font-size: 1.28rem; font-weight: 800; letter-spacing: -0.02em; color: var(--b-navy); white-space: nowrap; font-variant-numeric: tabular-nums; }
.lc__value strong.is-suspect { color: var(--st-attention); }
.lc__value .lc__novalue { font-size: 1rem; font-weight: 700; color: var(--b-subtle); }
.lc__value > span { display: block; margin-top: 2px; font-size: .74rem; color: var(--b-subtle); }
.lc__value .value-warn { display: inline-flex; align-items: center; gap: 4px; }
.lc__facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 18px; margin: 14px 0 0 108px; padding: 12px 14px; border-radius: 10px; background: var(--b-paper); }
.lc__facts > div { min-width: 0; }
.lc__facts dt { margin-bottom: 2px; font-size: .72rem; color: var(--b-subtle); }
.lc__facts dd { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .85rem; font-weight: 600; color: var(--b-ink); font-variant-numeric: tabular-nums; }
.lc__facts dd.is-danger { color: var(--st-danger); }
.lc__facts dd.is-warn { color: #8A5A00; }
.lc__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 0 108px; }
.lc__more { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; padding: 6px 8px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: .84rem; font-weight: 600; color: var(--b-blue); cursor: pointer; }
.lc__more:hover { background: var(--b-sky-2); }
.lc__more:focus-visible { outline: none; box-shadow: var(--b-focus); }
.lc__more .ic { transition: transform .15s ease; }
.lc__details { margin: 12px 0 0 108px; padding-top: 12px; border-top: 1px solid #EDF1F5; }
@media (max-width: 1100px) {
    .lc__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .lc { padding: 14px; }
    .lc__main { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; }
    .lc__main > .dl { width: 72px; }
    .lc__value { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 8px; text-align: left; }
    .lc__value > span { margin: 0; }
    .lc__facts, .lc__foot, .lc__details { margin-left: 0; }
    .lc__more { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .lc, .lc__more .ic { transition: none; }
}

/* Quadro de propostas em lista: abas por etapa + cartão completo */
.pl-tabs { display: flex; gap: 4px; margin: 0 0 16px; overflow-x: auto; border-bottom: 1px solid var(--b-line); scrollbar-width: thin; }
.pl-tab { display: inline-flex; align-items: center; gap: 7px; padding: 10px 12px; border: 0; border-bottom: 2px solid transparent; background: none; font: inherit; font-size: .88rem; font-weight: 600; color: var(--b-muted); white-space: nowrap; cursor: pointer; margin-bottom: -1px; }
.pl-tab:hover { color: var(--b-ink); }
.pl-tab.is-on { color: var(--b-navy); border-bottom-color: var(--b-blue); }
.pl-tab:focus-visible { outline: none; box-shadow: var(--b-focus); border-radius: 6px 6px 0 0; }
.pl-tab .count { font-size: .74rem; }
.pl-stage-tag { display: inline-flex; align-items: center; gap: 6px; }
.pl-move .input { min-width: 190px; }
.pl-note { display: flex; gap: 6px; align-items: flex-start; margin: -6px 0 4px 18px; font-size: .8rem; color: var(--b-muted); }
.pl-note .ic { flex: none; margin-top: 2px; color: var(--b-subtle); }
.page-head .seg { align-self: center; }
.seg__btn .ic { margin-right: 4px; vertical-align: -2px; }

/* Atalhos da página da licitação: barra presa no topo, seção ativa marcada */
.det-nav {
    position: sticky; top: 60px; z-index: 50;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    margin: 0 0 16px; padding: 6px; border: 1px solid var(--b-line); border-radius: 12px;
    background: rgba(245, 247, 250, .9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    box-shadow: var(--b-shadow-1);
}
.det-nav__items { display: flex; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.det-nav__items::-webkit-scrollbar { display: none; }
.det-nav__item { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: .86rem; font-weight: 600; color: var(--b-muted); white-space: nowrap; cursor: pointer; transition: background-color .12s ease, color .12s ease; }
.det-nav__item:hover { color: var(--b-ink); background: rgba(255, 255, 255, .8); }
.det-nav__item.is-on { color: var(--b-blue); background: #fff; box-shadow: 0 1px 2px rgba(11, 37, 69, .1); }
.det-nav__item:focus-visible { outline: none; box-shadow: var(--b-focus); }
.det-nav__item .count { font-size: .72rem; }
.det-nav__ctx { display: flex; flex: none; align-items: center; gap: 12px; padding-right: 8px; font-size: .82rem; color: var(--b-ink-2); font-variant-numeric: tabular-nums; }
.det-nav__ctx span { display: inline-flex; align-items: center; gap: 5px; }
.det-nav__ctx .ic { color: var(--b-subtle); }
.det-nav__ctx strong { font-weight: 800; color: var(--b-navy); }
.det-anchor, #sec-resumo, #sec-documentos, #sec-historico { scroll-margin-top: 128px; }
@media (min-width: 961px) and (min-height: 980px) { .det-side { top: 128px; } }
@media (max-width: 960px) {
    .det-nav__ctx { display: none; }
}
@media (max-width: 640px) {
    .det-nav { top: 56px; margin: 0 -16px 12px; padding: 4px 8px; border-left: 0; border-right: 0; border-radius: 0; }
    .det-anchor, #sec-resumo, #sec-documentos, #sec-historico { scroll-margin-top: 112px; }
}
@media (prefers-reduced-motion: reduce) { .det-nav__item { transition: none; } }

/* ==========================================================================
   Disputa ao vivo (spec 0019): melhor lance da sala × o nosso, por item
   ========================================================================== */
.dp .panel__head { align-items: flex-start; }
.dp__live { display: inline-flex; align-items: center; gap: 7px; color: var(--st-open); font-weight: 600; }
.dp__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--st-open); box-shadow: 0 0 0 0 rgba(14,159,110,.5); animation: dp-pulse 1.6s ease-out infinite; }
@keyframes dp-pulse { to { box-shadow: 0 0 0 8px rgba(14,159,110,0); } }
.dp__sum { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.dp__sum li { padding: 4px 10px; border-radius: 999px; background: var(--b-paper); border: 1px solid var(--b-line); font-size: .82rem; color: var(--b-ink-2); }
.dp__sum li.is-good { background: var(--st-open-bg); border-color: transparent; color: var(--st-open); }
.dp__sum li.is-bad { background: var(--st-danger-bg); border-color: transparent; color: var(--st-danger); }
.dp__table { border: 1px solid var(--b-line); border-radius: var(--b-radius); overflow: hidden; }
.dp__row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.2fr) repeat(3, minmax(0, 1fr)) 108px; gap: 12px; align-items: center; width: 100%; padding: 10px 14px; border: 0; border-top: 1px solid var(--b-line); background: var(--b-white); font: inherit; font-size: .88rem; color: var(--b-ink); text-align: left; cursor: pointer; }
.dp__row:hover { background: var(--b-sky-2); }
.dp__row.is-open { background: var(--b-sky-2); }
.dp__row:focus-visible { outline: none; box-shadow: inset var(--b-focus); }
.dp__row--head { border-top: 0; background: var(--b-paper); font-size: .74rem; font-weight: 600; color: var(--b-subtle); cursor: default; }
.dp__row--head:hover { background: var(--b-paper); }
.dp__row .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dp__item { display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.dp__item strong { flex: none; min-width: 22px; color: var(--b-navy); }
.dp__item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--b-ink-2); font-size: .84rem; }
.dp__phase { display: inline-block; font-size: .8rem; color: var(--b-muted); }
.dp__phase.is-open { color: var(--b-blue); font-weight: 700; }
.dp__phase.is-closed { color: var(--b-subtle); }
.dp__clock { display: block; font-size: .76rem; font-weight: 700; color: var(--st-danger); font-variant-numeric: tabular-nums; }
.dp__pill--tie { background: var(--st-attention-bg); color: var(--st-attention); }
.dp__pill--lose { background: var(--st-danger-bg); color: var(--st-danger); }
.dp__detail { padding: 14px 16px 16px; border-top: 1px solid var(--b-line); background: var(--b-white); display: grid; gap: 14px; }
.dp__chart { margin: 0; }
.dp__chart figcaption { display: flex; gap: 16px; margin-bottom: 6px; font-size: .78rem; color: var(--b-muted); }
.dp__key::before { content: ""; display: inline-block; width: 14px; height: 3px; margin-right: 6px; vertical-align: middle; border-radius: 2px; }
.dp__key--best::before { background: var(--b-blue); }
.dp__key--ours::before { background: var(--b-navy); }
.dp__chart svg { width: 100%; height: 120px; display: block; background: var(--b-paper); border-radius: var(--b-radius-sm); }
.dp__line { fill: none; stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.dp__line--best { stroke: var(--b-blue); }
.dp__line--ours { stroke: var(--b-navy); stroke-dasharray: 6 4; }
.dp__facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; }
.dp__facts dt { font-size: .74rem; color: var(--b-subtle); }
.dp__facts dd { margin: 0; font-size: .88rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.dp__h3 { margin: 0; font-size: .92rem; font-weight: 700; color: var(--b-navy); }
.dp__bids { width: 100%; border-collapse: collapse; font-size: .86rem; }
.dp__bids th { text-align: left; font-size: .74rem; font-weight: 600; color: var(--b-subtle); padding: 0 8px 6px; }
.dp__bids td { padding: 7px 8px; border-top: 1px solid var(--b-line); }
.dp__bids .num { text-align: right; font-variant-numeric: tabular-nums; }
.dp__bids tr.is-mine td { background: var(--b-sky-2); font-weight: 600; }
.dp__bids tr.is-excluded td { color: var(--b-subtle); }
.dp__bids tr.is-excluded td:nth-child(3) { text-decoration: line-through; }
.dp__bids-wrap { overflow-x: auto; }
.dp__pct { display: block; font-size: .74rem; color: var(--b-muted); }
.dp__who { display: block; font-weight: 600; color: var(--b-ink); }
.dp__bids small { font-size: .74rem; color: var(--b-subtle); font-variant-numeric: tabular-nums; }
.dp__start { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; padding: 16px 18px; border-radius: var(--b-radius); background: var(--b-sky-2); border: 1px solid #DCE8FA; }
.dp__start-text { flex: 1 1 320px; }
.dp__start-text strong { display: inline-flex; align-items: center; gap: 6px; color: var(--b-navy); font-size: .98rem; }
.dp__start-text p { margin: 4px 0 0; font-size: .88rem; color: var(--b-ink-2); }
.dp__start .sk-lines { flex: 1; }
.dp__ok { color: var(--st-open) !important; }
.dp__steps { margin: 0; padding-left: 22px; display: grid; gap: 14px; color: var(--b-ink-2); }
.dp__steps li::marker { font-weight: 800; color: var(--b-navy); }
.dp__steps strong { color: var(--b-navy); }
.dp__steps > li > div, .dp__code { margin-top: 8px; }
.dp__code { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dp__code code { padding: 8px 10px; border-radius: var(--b-radius-sm); background: var(--b-paper); border: 1px solid var(--b-line); font-size: .86rem; word-break: break-all; user-select: all; }
.dp__hint { margin: 6px 0 0; font-size: .82rem; color: var(--b-muted); }
.dp__how { margin-top: 6px; font-size: .84rem; }
.dp__how summary { cursor: pointer; color: var(--b-blue); }
.dp__how p { margin: 6px 0 0; }
.dp__note { margin: 12px 0 0; font-size: .8rem; color: var(--b-muted); }
@media (max-width: 760px) {
    /* Celular: item e melhor lance em cima; fase e seu lance; situação e diferença. */
    .dp__row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "item best" "phase ours" "sit gap"; gap: 4px 12px; }
    .dp__row--head { display: none; }
    .dp__row > span:nth-child(1) { grid-area: item; }
    .dp__row > span:nth-child(2) { grid-area: phase; }
    .dp__row > span:nth-child(3) { grid-area: best; }
    .dp__row > span:nth-child(4) { grid-area: ours; }
    .dp__row > span:nth-child(5) { grid-area: gap; font-size: .8rem; color: var(--b-muted); }
    .dp__row > span:nth-child(6) { grid-area: sit; }
    .dp__row > span:nth-child(4)::before { content: "seu: "; color: var(--b-subtle); font-size: .78rem; }
}
@media (prefers-reduced-motion: reduce) { .dp__dot { animation: none; } }
