@import url('https://fonts.googleapis.com/css2?family=Sora:wght@500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --navy: #0F172A;
  --navy-2: #1E3A8A;
  --navy-3: #172554;
  --azure: #0284C7;
  --cyan: #06B6D4;
  --cyan-soft: #7DD3FC;
  --ink: #0F172A;
  --muted: #64748B;
  --line: #E2E8F0;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --surface-2: #F1F5F9;
  --ok: #10B981;
  --warn: #F59E0B;
  --bad: #EF4444;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-hover: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius: 12px;
}

[data-theme="dark"]{
  --navy: #020617; --navy-2: #0F172A; --navy-3: #1E293B;
  --ink: #F8FAFC; --muted: #94A3B8; --line: #1E293B;
  --bg: #020617; --surface: #0F172A; --surface-2: #1E293B;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-hover: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "IBM Plex Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.num { font-family: "IBM Plex Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
h1, h2, h3 { font-family: "Sora", sans-serif; font-weight: 600; margin: 0; }
a { color: var(--azure); text-decoration: none; }

/* ---------- topbar ---------- */
.topbar {
  background: linear-gradient(180deg, var(--navy), var(--navy-2));
  color: #fff;
  border-bottom: 3px solid var(--cyan);
  position: sticky; top: 0; z-index: 40;
}
.topbar-inner { max-width: 1480px; margin: 0 auto; padding: 14px 22px; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.logo-slot { display: flex; align-items: center; padding: 0; }
.logo-slot img { height: 42px; width: auto; display: block; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2)); }
.wordmark { font-family: "Sora"; font-weight: 700; letter-spacing: .5px; font-size: 24px; color: var(--navy); line-height: 1; }
.wordmark small { display: block; font-family: "IBM Plex Sans"; font-weight: 400; font-size: 10px; letter-spacing: 2.5px; color: var(--azure); margin-top: 3px; }
.title-block { border-left: 1px solid rgba(255,255,255,.22); padding-left: 18px; }
.title-block h1 { font-size: 17px; color: #fff; font-weight: 600; }
.title-block p { margin: 2px 0 0; font-size: 12px; color: #bcd6ea; }
.topbar-spacer { flex: 1; }
.topbar-tools { display: flex; align-items: center; gap: 12px; font-size: 13px; }

/* Avatar / User info */
.avatar-stack { display: flex; align-items: center; }
.avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--navy);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 11px;
    border: 2px solid white;
    margin-left: -8px;
}
.avatar:first-child { margin-left: 0; }

.tbtn { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.16); border-radius: 9px; padding: 7px 11px; cursor: pointer; font-size: 12px; font-family: inherit; display: flex; align-items: center; gap: 6px; transition: all .2s ease; }
.tbtn:hover { background: rgba(255,255,255,.2); transform: translateY(-1px); box-shadow: 0 2px 4px rgba(0,0,0,.1); }
.logout-btn { background: none; border: none; color: #fff; cursor: pointer; font-family: inherit; font-size: 13px; display: flex; align-items: center; gap: 4px; transition: all .2s ease;}
.logout-btn:hover { color: var(--warn); transform: translateY(-1px); }

/* ---------- tabs ---------- */
.tabs { max-width: 1480px; margin: 0 auto; padding: 0 22px; display: flex; gap: 4px; }
.tab { background: none; border: none; color: #bcd6ea; padding: 11px 18px; cursor: pointer; font-family: "Sora"; font-weight: 500; font-size: 14px; border-bottom: 3px solid transparent; margin-bottom: -3px; }
.tab:hover { color: #fff; }
.tab.active { color: #fff; border-bottom-color: var(--cyan); }

/* ---------- layout geral ---------- */
.tabs { flex-wrap: wrap; overflow: visible; }
.tabs .tab, .tabs .dropdown { flex: 0 0 auto; }

.wrap { max-width: 1480px; margin: 0 auto; padding: 20px 22px 60px; }
.layout { display: grid; grid-template-columns: 260px minmax(0,1fr); gap: 20px; align-items: start; }
.content { min-width: 0; }

/* ---------- filtros ---------- */
.filters {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 15px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 12px; align-items: stretch;
  position: sticky; top: 78px; max-height: calc(100vh - 96px); overflow-y: auto;
}
.filters-title { font-family: "Sora"; font-weight: 600; font-size: 13px; color: var(--ink); display: flex; align-items: center; gap: 7px; margin: 0 0 2px; }
.fld { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fld label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.fld select, .fld input {
  font-family: inherit; font-size: 13px; padding: 8px 10px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink); border-radius: 9px; width: 100%;
}
.fld input::placeholder { color: var(--muted); }
.fld select:focus, .fld input:focus { outline: 2px solid var(--azure); outline-offset: -1px; border-color: var(--azure); }

/* ---------- table ---------- */
.tablecard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 16px 8px; margin-bottom: 16px; }
.table-tools { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.tbl-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
thead th { background: var(--surface-2); color: var(--muted); font-family: "Sora"; font-weight: 600; text-align: left; padding: 10px 14px; position: sticky; top: 0; white-space: nowrap; font-size: 12px; border-bottom: 2px solid var(--line); }
tbody td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; transition: background-color 0.15s ease; }
tbody tr { transition: all 0.15s ease; }
tbody tr:hover { background: var(--surface-2); box-shadow: inset 2px 0 0 var(--azure); }
tbody tr:last-child td { border-bottom: none; }

/* Badges / Chips */
.badge {
  display: inline-block; padding: 6px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; text-align: center; color: #fff; min-width: 90px;
}
.badge-normal { background-color: #2E9E6B; }
.badge-moderado { background-color: #FACC15; color: #854D0E; }
.badge-alta { background-color: #F97316; }
.badge-urgente { background-color: #EF4444; }

.badge-iniciar { background-color: #3B82F6; }
.badge-andamento { background-color: #7C6BD6; }
.badge-monitoramento { background-color: #E2952B; }
.badge-finalizado { background-color: #10B981; }

/* ---------- collapsible groups (monday style) ---------- */
.monday-group { margin-bottom: 20px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--line); }
.monday-group summary { padding: 12px 18px; font-family: "Sora", sans-serif; font-size: 15px; font-weight: 600; color: var(--surface); cursor: pointer; display: flex; align-items: center; list-style: none; user-select: none; }
.monday-group summary::-webkit-details-marker { display: none; }
.monday-group summary::before { content: "›"; display: inline-block; margin-right: 12px; font-size: 20px; transition: transform 0.2s; }
.monday-group[open] summary::before { transform: rotate(90deg); }
.group-count { margin-left: 10px; font-size: 12px; opacity: 0.8; font-family: "IBM Plex Sans", sans-serif; font-weight: 400; }

.group-iniciar summary { background-color: var(--azure); }
.group-iniciar .row-border { border-left: 4px solid var(--azure); }
.group-execucao summary { background-color: #7C6BD6; }
.group-execucao .row-border { border-left: 4px solid #7C6BD6; }
.group-monitoramento summary { background-color: var(--warn); }
.group-monitoramento .row-border { border-left: 4px solid var(--warn); }
.group-finalizado summary { background-color: var(--ok); }
.group-finalizado .row-border { border-left: 4px solid var(--ok); }

.btn-acao {
  background: var(--azure); color: white; border: none; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 11px; font-weight: bold; text-decoration: none; display: inline-block;
}
.btn-acao:hover { opacity: 0.9; }

.priority-select { appearance: none; border: none; outline: none; cursor: pointer; font-family: inherit; }
.priority-select option { background: white; color: black; }

/* Custom Modal */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1000; align-items: center; justify-content: center; }
.modal.open { display: flex; }
.modal-content { background: var(--surface); padding: 20px; border-radius: 12px; width: 100%; max-width: 500px; box-shadow: 0 10px 25px rgba(0,0,0,0.2); }
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px;}
.toast { background: var(--ok); color: #fff; padding: 1rem 1.5rem; border-radius: 8px; box-shadow: var(--shadow); font-weight: 600; }

/* ---------- Dropdown ---------- */
.dropdown { position: relative; display: inline-block; }
.dropdown-toggle { background: transparent; display: flex; align-items: center; }
.dropdown-menu {
  display: none; position: absolute; top: 100%; right: 0;
  background: var(--surface); box-shadow: var(--shadow);
  min-width: 220px; border-radius: 8px; overflow: hidden; z-index: 100;
  border: 1px solid var(--line);
}
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu { display: flex; flex-direction: column; }
.dropdown-item { padding: 12px 16px; color: var(--ink); font-size: 13px; text-decoration: none; border-bottom: 1px solid var(--line); font-weight: 500; }
.dropdown-item:last-child { border-bottom: none; }
.dropdown-item:hover { background: var(--bg); color: var(--azure); }

/* ---------- DB Control Page ---------- */
.page-header { margin-bottom: 24px; }
.page-header p { color: var(--muted); margin-top: 4px; }
.db-actions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.db-card { background: var(--surface); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: flex-start; }
.db-card h3 { margin-bottom: 8px; color: var(--ink); }
.db-card p { color: var(--muted); font-size: 13px; margin-bottom: 16px; line-height: 1.4; flex: 1; }
.danger-zone { border-color: var(--bad); background: rgba(213, 86, 78, 0.05); }
.danger-zone h3 { color: var(--bad); }
.btn-danger { background: var(--bad); }
.file-input { margin-bottom: 12px; font-family: inherit; font-size: 13px; width: 100%; }
.mt-20 { margin-top: 20px; }

/* ---------- Grid de pedidos ---------- */
.grid-pedidos-header { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:18px; }
.grid-pedidos-header h2 { color:var(--navy); font-size:22px; }
.grid-pedidos-header p { color:var(--muted); margin-top:4px; }
.grid-sync-button { padding:9px 15px; }
.grid-sync-button:disabled { opacity:.5; cursor:not-allowed; }
.grid-pedidos-summary { display:grid; grid-template-columns:repeat(4,minmax(120px,1fr)); gap:12px; margin-bottom:14px; }
.grid-pedidos-summary > div { background:var(--surface); border:1px solid var(--line); border-radius:11px; padding:12px 15px; box-shadow:var(--shadow); }
.grid-pedidos-summary strong { display:block; color:var(--navy); font:600 21px "Sora"; }
.grid-pedidos-summary span { color:var(--muted); font-size:12px; }
.grid-pedidos-filters { display:grid; grid-template-columns:minmax(260px,2fr) repeat(3,minmax(150px,1fr)) auto auto; gap:10px; align-items:end; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:14px; margin-bottom:14px; box-shadow:var(--shadow); }
.grid-pedidos-filters .btn-acao { height:36px; }
.grid-clear { height:36px; display:flex; align-items:center; padding:0 8px; font-weight:600; }
.grid-pedidos-card { padding:0; overflow:hidden; }
.grid-pedidos-table { min-width:1500px; }
.grid-pedidos-table thead th { top:0; z-index:2; }
.grid-object { min-width:260px; max-width:420px; }
.source-chip { display:inline-flex; padding:5px 8px; border-radius:999px; font-weight:600; font-size:11px; white-space:nowrap; }
.source-system { color:#155e75; background:#cffafe; }
.source-monday { color:#5b21b6; background:#ede9fe; }
.source-integrated { color:#166534; background:#dcfce7; }
.grid-user-login { display:block; color:var(--muted); margin-top:2px; }
.grid-external-only { color:var(--muted); font-size:11px; white-space:nowrap; }
.grid-details-row td { padding:0 14px 8px; background:var(--surface-2); }
.grid-details-row:hover { background:transparent; }
.grid-details-row summary { color:var(--azure); cursor:pointer; font-size:11px; padding:6px 0; }
.grid-details-row pre { max-height:360px; overflow:auto; background:#071320; color:#d8e8f7; border-radius:9px; padding:14px; font:11px/1.5 "IBM Plex Mono",monospace; white-space:pre-wrap; }
.grid-empty { padding:36px!important; text-align:center; color:var(--muted); }
.grid-pagination { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:14px; color:var(--muted); font-size:13px; }
.grid-pagination > div { display:flex; align-items:center; gap:10px; }
.grid-pagination strong { color:var(--ink); font-weight:600; }
@media (max-width:1100px) {
  .grid-pedidos-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .grid-pedidos-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:600px) {
  .grid-pagination { align-items:flex-start; flex-direction:column; }
}

/* ---------- Gestão de números de processos ---------- */
.process-number-header { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:14px; }
.process-number-header h2 { color:var(--navy); font-size:22px; }
.process-number-header p { color:var(--muted); margin-top:4px; }
.process-number-summary { display:flex; align-items:baseline; gap:8px; background:var(--surface); border:1px solid var(--line); border-radius:11px; padding:12px 15px; margin-bottom:14px; box-shadow:var(--shadow); width:max-content; }
.process-number-summary strong { color:var(--navy); font:600 21px "Sora"; }
.process-number-summary span { color:var(--muted); font-size:12px; }
.process-number-filters { display:grid; grid-template-columns:minmax(260px,2fr) repeat(3,minmax(160px,1fr)) auto auto; gap:10px; align-items:end; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:14px; margin-bottom:14px; box-shadow:var(--shadow); }
.process-number-card { padding:0; overflow:hidden; }
.process-number-table { min-width:1780px; }
.process-number-table thead th { top:0; z-index:2; }
.relation-chip { display:inline-flex; padding:5px 8px; border-radius:999px; font-size:11px; font-weight:600; white-space:nowrap; }
.relation-confirmado { color:#166534; background:#dcfce7; }
.relation-relacionado,.relation-somente_modalidade { color:#155e75; background:#cffafe; }
.relation-modalidade_divergente { color:#9a3412; background:#ffedd5; }
.relation-sem_correspondencia { color:#64748b; background:#e2e8f0; }
.process-number-details { display:grid; grid-template-columns:minmax(260px,1fr) repeat(2,minmax(360px,1fr)); gap:12px; padding-bottom:8px; }
.process-number-details p { margin-top:6px; color:var(--ink); }
.process-number-details pre { max-height:320px; }
@media (max-width:1100px) { .process-number-filters { grid-template-columns:repeat(2,minmax(0,1fr)); } .process-number-details { grid-template-columns:1fr; } }
@media (max-width:600px) { .process-number-header { align-items:flex-start; flex-direction:column; } }

/* ---------- Grid de pedidos: fluxo operacional ---------- */
.orders-page { max-width:1600px; margin:0 auto; }
.orders-heading { display:flex; align-items:center; justify-content:space-between; gap:24px; margin-bottom:18px; }
.orders-heading h2 { margin:0; color:var(--navy); font-size:25px; letter-spacing:-.025em; }
.orders-heading p { margin:4px 0 0; color:var(--muted); font-size:13px; }
.orders-sync { align-self:flex-start; display:inline-flex; align-items:center; gap:6px; border:1px solid #b8d8ec; background:#edf7fd; color:#176a9c; border-radius:7px; padding:6px 10px; font:600 11px/1 inherit; cursor:pointer; box-shadow:none; }
.orders-sync:hover { background:#dff1fb; border-color:#86c4e6; }
.orders-sync:disabled { opacity:.45; cursor:not-allowed; }
.orders-sync span { font-size:15px; line-height:10px; }
.orders-kpis { display:grid; grid-template-columns:repeat(3,minmax(170px,220px)); gap:10px; margin-bottom:14px; }
.orders-kpi { position:relative; overflow:hidden; min-height:86px; background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:13px 16px; box-shadow:0 4px 14px rgba(14,27,42,.05); }
.orders-kpi::before { content:""; position:absolute; inset:0 auto 0 0; width:4px; background:var(--azure); }
.orders-kpi-entry::before { background:#7c6ee6; }
.orders-kpi-exit::before { background:var(--ok); }
.orders-kpi span,.orders-kpi small { display:block; color:var(--muted); font-size:11px; }
.orders-kpi span { font-weight:700; text-transform:uppercase; letter-spacing:.06em; }
.orders-kpi strong { display:block; color:var(--navy); font:700 28px/1.15 "Sora",sans-serif; margin:3px 0 1px; }
.orders-filters { display:flex; align-items:flex-end; gap:8px; background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:9px 10px; margin-bottom:12px; box-shadow:0 3px 12px rgba(14,27,42,.04); }
.orders-filters label { display:flex; flex-direction:column; gap:4px; min-width:190px; }
.orders-filters label > span { color:var(--muted); font-size:9px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; }
.orders-filters input,.orders-filters select { height:34px; border:1px solid var(--line); border-radius:7px; background:#f8fbfe; color:var(--ink); padding:0 10px; font:12px inherit; outline:none; }
.orders-filters input:focus,.orders-filters select:focus { border-color:var(--azure); box-shadow:0 0 0 2px rgba(31,143,214,.1); }
.orders-search { flex:1; }
.orders-filter-button { height:34px; border:0; border-radius:7px; padding:0 16px; background:var(--navy); color:white; font:600 11px inherit; cursor:pointer; }
.orders-clear { height:34px; display:flex; align-items:center; padding:0 7px; color:var(--muted); font-size:11px; text-decoration:none; }
.orders-board { overflow:hidden; background:var(--surface); border:1px solid var(--line); border-radius:13px; box-shadow:0 7px 24px rgba(14,27,42,.06); }
.orders-board-head,.order-row { display:grid; grid-template-columns:minmax(250px,1.25fr) minmax(80px,.3fr) minmax(105px,.35fr) minmax(110px,.38fr) minmax(430px,1.65fr) 18px; column-gap:16px; align-items:center; }
.orders-board-head { min-height:38px; padding:0 16px; background:#f4f8fc; border-bottom:1px solid var(--line); color:#64778a; font-size:10px; font-weight:700; letter-spacing:.055em; text-transform:uppercase; }
.orders-board-head span:last-child { grid-column:5; }
.grid-modality { display:inline-flex; width:max-content; max-width:100%; padding:4px 8px; border-radius:999px; background:#eef5fa; color:#31556f; font-size:11px; font-weight:700; line-height:1.15; }
.grid-modality.is-compra-direta { background:#e3f3fb; color:#0875ae; }
.grid-modality.is-selecao-publica { background:#efe9fb; color:#6845bc; }
.grid-modality.is-pregao { background:#e9f7f1; color:#157a56; }
.grid-modality.is-inexigibilidade { background:#fff1df; color:#9c5b06; }
.orders-workspace-link { display:inline-flex; margin-top:14px; padding:8px 11px; border:1px solid #c8dce9; border-radius:6px; color:#0a6fa8; font-size:12px; font-weight:700; text-decoration:none; }
.order-item + .order-item { border-top:1px solid #e6edf4; }
.order-row { width:100%; min-height:70px; padding:9px 16px; border:0; background:white; color:var(--ink); text-align:left; cursor:pointer; transition:background .15s ease; font:inherit; }
.order-row:hover,.order-row[aria-expanded="true"] { background:#f8fbfe; }
.order-number { min-width:0; }
.order-number strong { display:block; color:var(--navy); font:700 14px "IBM Plex Mono",monospace; }
.order-number small { display:block; overflow:hidden; margin-top:4px; color:var(--muted); font-size:11px; line-height:1.3; text-overflow:ellipsis; white-space:nowrap; }
.order-project { color:var(--ink); font-weight:650; font-size:13px; }
.order-row time { color:var(--ink); font-size:12px; font-weight:600; }
.order-row time small { display:block; color:var(--muted); font-size:10px; font-weight:400; margin-top:2px; }
.order-chevron { color:#7890a5; font-size:18px; transition:transform .15s ease; }
.order-row[aria-expanded="true"] .order-chevron { transform:rotate(180deg); }
.order-progress { display:grid; grid-template-columns:repeat(5,minmax(72px,1fr)); position:relative; }
.order-step { position:relative; display:flex; flex-direction:column; align-items:center; gap:5px; color:#9aaaba; font-size:9px; text-align:center; }
.order-step::before { content:""; position:absolute; height:2px; background:#dce6ee; top:6px; left:-50%; width:100%; }
.order-step:first-child::before { display:none; }
.order-step i { position:relative; z-index:1; width:13px; height:13px; border:2px solid #cbd8e3; border-radius:50%; background:white; }
.order-step b { font-weight:600; white-space:nowrap; }
.order-step.is-done::before,.order-step.is-current::before { background:#3aa979; }
.order-step.is-done i { border-color:#3aa979; background:#3aa979; box-shadow:inset 0 0 0 3px white; }
.order-step.is-current { color:var(--navy); }
.order-step.is-current i { border-color:#1789cc; background:#1789cc; box-shadow:0 0 0 4px rgba(23,137,204,.13); }
.order-detail-wrap { border-top:1px solid #dce8f1; background:#f7fafc; padding:16px; }
.order-detail-loading { padding:20px; text-align:center; color:var(--muted); font-size:12px; }
.order-details { display:flex; flex-direction:column; gap:14px; }
.order-milestones { display:grid; grid-template-columns:repeat(5,minmax(130px,1fr)); gap:8px; }
.order-milestone { border:1px solid var(--line); border-radius:9px; background:white; padding:9px 11px; }
.order-milestone span { display:block; color:var(--muted); font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; }
.order-milestone strong { display:block; color:#9aaaba; font-size:11px; margin-top:4px; }
.order-milestone.is-complete { border-color:#bce1cd; background:#f3fbf7; }
.order-milestone.is-complete strong { color:#267551; }
.order-milestone.is-current { border-color:#a8d6ef; background:#f1f9fd; }
.order-detail-section { background:white; border:1px solid var(--line); border-radius:10px; padding:12px; }
.order-detail-section h4 { margin:0 0 10px; color:var(--navy); font-size:12px; }
.order-detail-section dl { display:grid; grid-template-columns:repeat(4,minmax(150px,1fr)); gap:1px; margin:0; background:var(--line); border:1px solid var(--line); border-radius:7px; overflow:hidden; }
.order-detail-section dl div { min-width:0; background:white; padding:8px 10px; }
.order-detail-section dt { color:var(--muted); font-size:9px; font-weight:700; text-transform:uppercase; }
.order-detail-section dd { margin:3px 0 0; color:var(--ink); font-size:11px; overflow-wrap:anywhere; }
.orders-empty { padding:32px; color:var(--muted); text-align:center; font-size:12px; }
@media (max-width:1150px) { .orders-board-head,.order-row { grid-template-columns:minmax(220px,1fr) 75px 100px 95px minmax(360px,1.4fr) 16px; } .order-detail-section dl { grid-template-columns:repeat(2,minmax(150px,1fr)); } }
@media (max-width:760px) { .orders-heading { align-items:flex-start; } .orders-kpis { grid-template-columns:repeat(3,1fr); } .orders-filters { align-items:stretch; flex-wrap:wrap; } .orders-search { flex-basis:100%; } .orders-board { overflow-x:auto; } .orders-board-head,.order-row { min-width:920px; } .order-milestones { grid-template-columns:1fr; } }
/* ---------- Fluxo de pedidos ---------- */
.fluxo-progress-cell { display:flex; flex-direction:column; gap:6px; min-width:0; }
.fluxo-etapa { overflow:hidden; color:var(--muted); font-size:10px; text-align:center; text-overflow:ellipsis; white-space:nowrap; }
.fluxo-timeline { display:flex; flex-direction:column; margin:0; padding:0; list-style:none; }
.fluxo-timeline li { display:grid; grid-template-columns:118px 1fr; column-gap:14px; }
.fluxo-timeline time { padding-top:1px; color:var(--ink); font:600 11px "IBM Plex Mono",monospace; }
.fluxo-timeline li > div { position:relative; padding:0 0 14px 16px; border-left:2px solid #dce6ee; }
.fluxo-timeline li:last-child > div { padding-bottom:0; }
.fluxo-timeline li > div::before { content:""; position:absolute; left:-6px; top:2px; width:10px; height:10px; border-radius:50%; background:#1789cc; box-shadow:0 0 0 3px #f1f9fd; }
.fluxo-timeline li + li > div::before { background:#9fb6c8; }
.fluxo-timeline strong { color:var(--navy); font-size:12px; }
.fluxo-timeline small { display:block; margin-top:3px; color:var(--muted); font-size:11px; }
.fluxo-fase-chip { display:inline-flex; margin-left:7px; padding:2px 7px; border-radius:999px; background:#eef5fa; color:#31556f; font-size:10px; font-weight:700; vertical-align:1px; }
@media (max-width:760px) { .fluxo-timeline li { grid-template-columns:1fr; row-gap:3px; } }
/* ---------- Dashboard de Gestão ---------- */
.dashboard-page { display:flex; flex-direction:column; gap:18px; }
.dashboard-heading { display:flex; justify-content:space-between; align-items:flex-end; gap:20px; }
.dashboard-heading h2 { color:var(--navy); font-size:26px; }
.dashboard-heading p { color:var(--muted); margin:5px 0 0; }
.dashboard-eyebrow { color:var(--azure); display:block; font-size:10px; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
.dashboard-updated { color:var(--muted); font-size:11px; white-space:nowrap; }
.dashboard-filters { display:grid; grid-template-columns:repeat(5,minmax(130px,1fr)) auto auto; gap:10px; align-items:end; padding:14px; background:var(--surface); border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow); }
.dashboard-filters label span { display:block; margin-bottom:5px; color:var(--muted); font-size:9px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; }
.dashboard-filters select { width:100%; height:38px; padding:0 10px; border:1px solid var(--line); border-radius:8px; background:var(--surface-2); color:var(--ink); font:inherit; }
.dashboard-filters button,.dashboard-mini-pagination button { height:38px; border:0; border-radius:8px; padding:0 14px; background:var(--azure); color:#fff; font:600 11px "Sora",sans-serif; cursor:pointer; }
.dashboard-filters button.is-secondary { background:var(--surface-2); border:1px solid var(--line); color:var(--muted); }
.dashboard-kpis { display:grid; grid-template-columns:repeat(6,minmax(125px,1fr)); gap:10px; }
.dashboard-kpi { position:relative; overflow:hidden; min-height:112px; padding:16px; border:1px solid var(--line); border-radius:12px; background:var(--surface); box-shadow:var(--shadow); }
.dashboard-kpi::before { content:""; position:absolute; inset:0 auto 0 0; width:4px; background:var(--kpi-color,#3b82f6); }
.dashboard-kpi span { color:var(--muted); font-size:10px; font-weight:700; text-transform:uppercase; }
.dashboard-kpi strong { display:block; margin:9px 0 3px; color:var(--navy); font:700 27px "Sora",sans-serif; letter-spacing:-.04em; overflow-wrap:anywhere; }
.dashboard-kpi small { color:var(--muted); font-size:9px; }
.dashboard-kpi.is-blue { --kpi-color:#3b82f6; }.dashboard-kpi.is-cyan { --kpi-color:#06b6d4; }
.dashboard-kpi.is-green { --kpi-color:#10b981; }.dashboard-kpi.is-red { --kpi-color:#ef4444; }
.dashboard-kpi.is-purple { --kpi-color:#8b5cf6; }.dashboard-kpi.is-gold { --kpi-color:#f59e0b; }
.dashboard-error { padding:12px 15px; border:1px solid #fecaca; border-radius:9px; background:#fef2f2; color:#991b1b; }
.dashboard-charts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.dashboard-chart-card { min-width:0; border:1px solid var(--line); border-radius:12px; background:var(--surface); box-shadow:var(--shadow); overflow:hidden; }
.dashboard-chart-card.is-wide { grid-column:1/-1; }
.dashboard-chart-card > header { display:flex; justify-content:space-between; align-items:center; min-height:48px; padding:0 15px; border-bottom:1px solid var(--line); }
.dashboard-chart-card h3 { color:var(--navy); font-size:13px; }
.dashboard-chart-card header span { color:var(--muted); font-size:9px; }
.dashboard-chart { width:100%; height:315px; }
.dashboard-chart-card.is-wide .dashboard-chart { height:345px; }
.dashboard-drilldown { scroll-margin-top:145px; border:1px solid var(--line); border-radius:12px; background:var(--surface); box-shadow:var(--shadow); overflow:hidden; }
.dashboard-drilldown-empty { padding:35px; text-align:center; color:var(--muted); }
.dashboard-drilldown-empty strong { display:block; color:var(--navy); margin-bottom:5px; }
.dashboard-drilldown-empty p { margin:0; }
.dashboard-drilldown-head { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; padding:16px 18px; border-bottom:1px solid var(--line); }
.dashboard-drilldown-head span { color:var(--azure); font-size:9px; font-weight:800; text-transform:uppercase; }
.dashboard-drilldown-head h3 { color:var(--navy); font-size:16px; margin-top:2px; }
.dashboard-drilldown-head p { color:var(--muted); font-size:10px; margin:3px 0 0; }
.dashboard-drilldown-head button { border:1px solid var(--line); border-radius:7px; background:var(--surface-2); color:var(--muted); padding:7px 11px; cursor:pointer; }
.dashboard-mini-grid { overflow:auto; }
.dashboard-mini-grid table { width:100%; min-width:1120px; border-collapse:collapse; }
.dashboard-mini-grid th { padding:9px 10px; background:var(--surface-2); color:var(--muted); font-size:8px; letter-spacing:.04em; text-align:left; text-transform:uppercase; }
.dashboard-mini-grid td { padding:10px; border-top:1px solid var(--line); color:var(--ink); font-size:10px; vertical-align:top; }
.dashboard-mini-grid td:nth-child(2) { max-width:290px; }
.dashboard-priority { display:inline-block; padding:3px 7px; border-radius:999px; background:#eef2f7; font-weight:700; }
.dashboard-priority.is-normal { background:#dcfce7; color:#166534; }.dashboard-priority.is-moderado { background:#fef9c3; color:#854d0e; }
.dashboard-priority.is-alta { background:#ffedd5; color:#9a3412; }.dashboard-priority.is-urgente { background:#ffe4e6; color:#9f1239; }
.dashboard-mini-pagination { display:flex; justify-content:space-between; align-items:center; padding:12px 16px; border-top:1px solid var(--line); color:var(--muted); font-size:10px; }
.dashboard-mini-pagination div { display:flex; gap:7px; }
.dashboard-mini-pagination button { height:32px; }
@media (max-width:1250px) { .dashboard-filters { grid-template-columns:repeat(3,1fr); }.dashboard-kpis { grid-template-columns:repeat(3,1fr); } }
@media (max-width:780px) { .dashboard-heading { align-items:flex-start; flex-direction:column; }.dashboard-filters { grid-template-columns:1fr 1fr; }.dashboard-kpis { grid-template-columns:1fr 1fr; }.dashboard-charts { grid-template-columns:1fr; }.dashboard-chart-card.is-wide { grid-column:auto; }.dashboard-chart { height:290px; } }
@media (max-width:480px) { .dashboard-filters,.dashboard-kpis { grid-template-columns:1fr; } }

/* ---------- Drawer / Modal Lateral ---------- */
.dashboard-drawer-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.4); backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease;
}
.dashboard-drawer-overlay.is-open { opacity: 1; visibility: visible; }

.dashboard-drawer-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 1001;
  width: 50%; min-width: 400px; max-width: 800px;
  background: var(--surface); box-shadow: -4px 0 24px rgba(0,0,0,0.1);
  transform: translateX(100%); transition: transform 0.3s ease;
  display: flex; flex-direction: column; overflow: hidden;
}
.dashboard-drawer-overlay.is-open .dashboard-drawer-panel { transform: translateX(0); }

.dashboard-drawer-header {
  padding: 20px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface-2);
}
.dashboard-drawer-header h3 { margin: 0; color: var(--navy); font-size: 18px; }
.dashboard-drawer-close {
  background: transparent; border: none; color: var(--muted); cursor: pointer;
  font-size: 20px; padding: 4px; line-height: 1;
}
.dashboard-drawer-close:hover { color: var(--ink); }

.dashboard-drawer-filters {
  padding: 12px 20px; border-bottom: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 8px; background: white;
}
.dashboard-filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--line); padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600; color: var(--ink);
}
.dashboard-filter-chip button {
  background: none; border: none; padding: 0; color: var(--muted);
  cursor: pointer; font-size: 12px; line-height: 1; margin-left: 2px;
}
.dashboard-filter-chip button:hover { color: var(--ink); }

.dashboard-drawer-body { flex: 1; overflow-y: auto; background: white; }

.dashboard-drawer-footer {
  padding: 16px 20px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 12px; background: var(--surface-2);
}

@media (max-width: 768px) {
  .dashboard-drawer-panel { width: 100%; min-width: 0; max-width: none; }
}

.dashboard-active-filters {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 12px 14px; background: #e0f2fe; border: 1px solid #bae6fd;
  border-radius: 10px; margin-bottom: -4px;
}
.dashboard-filter-clear {
  background: transparent; border: 1px solid #7dd3fc; border-radius: 6px;
  color: #0369a1; padding: 4px 10px; font-size: 11px; font-weight: 600;
  cursor: pointer; transition: all 0.2s; margin-left: auto;
}
.dashboard-filter-clear:hover { background: #bae6fd; color: #0c4a6e; }

.skeleton-pulse {
  animation: skeletonPulse 1.5s ease-in-out infinite;
  background-color: var(--line);
}
@keyframes skeletonPulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

.kpi-variance {
  font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px;
  white-space: nowrap; display: inline-flex; align-items: center; gap: 3px;
}
.kpi-variance.is-positive { background: #dcfce7; color: #166534; }
.kpi-variance.is-negative { background: #fee2e2; color: #991b1b; }
.kpi-variance.is-neutral { background: #f1f5f9; color: #475569; }

.dashboard-alerts {
  display: flex; flex-direction: column; gap: 8px;
  background: #fffbeb; border: 1px solid #fde68a;
  border-radius: 12px; padding: 12px 16px;
}
.dashboard-alert-item {
  display: flex; align-items: center; gap: 8px; color: #b45309;
  font-size: 12px; font-weight: 600; cursor: pointer; padding: 4px; border-radius: 6px;
  transition: background 0.2s;
}
.dashboard-alert-item:hover { background: #fef3c7; }
.dashboard-alert-item::before { content: "⚠️"; }

.dashboard-chart-card { transition: all 0.2s ease; }
.dashboard-chart-card:hover {
  box-shadow: 0 8px 16px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}


/* ---------- Licitação cockpit ---------- */
.lic-cockpit-title { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; }
.lic-cockpit-title p { margin-top:4px; color:var(--muted); }
.lic-live-header { background:var(--surface); border:1px solid var(--line); border-radius:8px; padding:14px; box-shadow:var(--shadow); margin-bottom:14px; }
.lic-alert-panel { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:8px; margin-bottom:14px; }
.lic-alert { border:1px solid var(--line); border-radius:8px; padding:10px; background:#fff; box-shadow:inset 3px 0 0 var(--cyan); }
.lic-alert.is-warn { box-shadow:inset 3px 0 0 var(--warn); background:#fffbeb; border-color:#fde68a; }
.lic-alert.is-danger { box-shadow:inset 3px 0 0 var(--bad); background:#fef2f2; border-color:#fecaca; }
.lic-alert strong { display:block; color:var(--ink); font-size:12px; margin-bottom:3px; }
.lic-alert span { color:var(--muted); font-size:11px; line-height:1.35; }
.lic-live-headline { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; color:var(--navy); }
.lic-live-headline > div { display:flex; align-items:center; gap:8px; }
.lic-live-dot { width:9px; height:9px; border-radius:50%; background:var(--cyan); box-shadow:0 0 0 4px rgba(6,182,212,.14); display:inline-block; }
.lic-live-header.has-external-update { border-color:#fde68a; box-shadow:inset 3px 0 0 var(--warn), var(--shadow); }
.lic-live-header.has-external-update .lic-live-dot { background:var(--warn); box-shadow:0 0 0 4px rgba(245,158,11,.16); }
.lic-live-notice { margin:-4px 0 10px; border:1px solid #fde68a; border-radius:8px; background:#fffbeb; color:#92400e; padding:8px 10px; font-size:12px; font-weight:700; }
.lic-header-grid { display:flex; flex-wrap:wrap; align-items:flex-start; gap:8px; }
.lic-header-card { position:relative; display:flex; flex-direction:column; align-items:flex-start; gap:6px; min-height:72px; box-sizing:border-box; padding:10px 38px 10px 10px; background:var(--surface-2); border:1px solid var(--line); border-radius:8px; color:var(--ink); cursor:pointer; transition:border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.lic-header-card:hover, .lic-header-card:focus-within, .lic-header-card:focus { border-color:var(--cyan); background:#fff; box-shadow:inset 3px 0 0 var(--cyan); outline:0; }
.lic-header-card--compact { flex:0 1 auto; width:fit-content; min-width:140px; max-width:min(100%,340px); }
.lic-header-card--expansivel { flex:1 1 380px; min-width:min(100%,280px); max-width:720px; }
.lic-header-label { color:var(--muted); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.4px; }
.lic-header-value { display:block; width:100%; font:600 13px "IBM Plex Mono",ui-monospace,monospace; color:var(--navy); overflow-wrap:anywhere; line-height:1.4; }
.lic-header-value.is-clamped { display:-webkit-box; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:3; }
.lic-header-source { margin-top:auto; color:var(--muted); font-size:11px; }
.lic-header-copy { position:absolute; top:7px; right:7px; z-index:3; width:25px; height:25px; padding:0; border:1px solid transparent; border-radius:5px; background:transparent; color:var(--muted); cursor:pointer; opacity:.72; transition:opacity .18s ease, color .18s ease, background .18s ease, border-color .18s ease; }
.lic-header-card:hover .lic-header-copy, .lic-header-card:focus-within .lic-header-copy, .lic-header-copy:focus-visible { opacity:1; }
.lic-header-copy:hover, .lic-header-copy:focus-visible { border-color:var(--cyan); background:#ecfeff; color:var(--navy); outline:0; }
.lic-copy-icon::before { content:"\29C9"; font:700 17px/1 sans-serif; }
.lic-header-copy.is-copied { opacity:1; color:var(--ok); border-color:var(--ok); background:#ecfdf5; }
.lic-header-copy.is-copied .lic-copy-icon::before { content:"\2713"; }
.lic-header-popover { position:absolute; z-index:2; top:-1px; left:-1px; min-width:100%; width:max-content; max-width:min(680px,calc(100vw - 48px)); box-sizing:border-box; padding:10px 38px 10px 10px; border:1px solid var(--cyan); border-radius:8px; background:#fff; box-shadow:0 10px 24px rgba(15,34,67,.18), inset 3px 0 0 var(--cyan); color:var(--navy); font:600 13px/1.4 "IBM Plex Mono",ui-monospace,monospace; overflow-wrap:anywhere; opacity:0; pointer-events:none; transform:scale(.985); transform-origin:top left; transition:opacity .18s ease, transform .18s ease; }
.lic-header-card--expansivel:hover .lic-header-popover, .lic-header-card--expansivel:focus .lic-header-popover, .lic-header-card--expansivel:focus-within .lic-header-popover { opacity:1; transform:scale(1); }
.lic-copy-toast { position:fixed; z-index:100; right:18px; bottom:18px; padding:9px 12px; border-radius:7px; background:var(--navy); color:#fff; font-size:12px; font-weight:700; box-shadow:0 8px 20px rgba(15,34,67,.2); opacity:0; pointer-events:none; transform:translateY(6px); transition:opacity .18s ease, transform .18s ease; }
.lic-copy-toast.is-visible { opacity:1; transform:translateY(0); }
.lic-copy-field { min-height:32px; text-align:left; background:var(--surface-2); border:1px solid var(--line); border-radius:8px; padding:6px 8px; cursor:pointer; display:flex; flex-direction:column; justify-content:space-between; gap:6px; color:var(--ink); transition:border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.lic-copy-field:hover, .lic-copy-field.copied { border-color:var(--cyan); background:#fff; box-shadow:inset 3px 0 0 var(--cyan); }
.lic-copy-field span { color:var(--muted); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.4px; }
.lic-copy-field strong { font:600 13px "IBM Plex Mono",ui-monospace,monospace; color:var(--navy); overflow-wrap:anywhere; line-height:1.4; }
.lic-copy-field small { color:var(--muted); font-size:11px; }
.lic-cockpit-layout { display:grid; grid-template-columns:280px minmax(0,1fr) 320px; gap:14px; align-items:start; }
.lic-stepper { position:sticky; top:96px; max-height:calc(100vh - 116px); overflow:auto; padding:12px; border:1px solid var(--line); border-radius:8px; background:var(--surface); box-shadow:var(--shadow); }
.lic-phase-label { margin:14px 0 7px; color:var(--navy); font:700 12px "Sora", sans-serif; }
.lic-sei-panel { position:sticky; top:96px; max-height:calc(100vh - 116px); overflow:auto; padding:12px; border:1px solid var(--line); border-radius:8px; background:var(--surface); box-shadow:var(--shadow); }
.lic-phase-label:first-child { margin-top:0; }
.lic-step { display:grid; grid-template-columns:34px minmax(0,1fr); gap:9px; align-items:center; padding:8px; border:1px solid transparent; border-radius:8px; }
.lic-step + .lic-step { margin-top:4px; }
.lic-step-number { width:28px; height:28px; border-radius:50%; background:var(--surface-2); color:var(--muted); display:flex; align-items:center; justify-content:center; font:700 11px "IBM Plex Mono", ui-monospace, monospace; }
.lic-step strong { display:block; font-size:12px; color:var(--ink); line-height:1.25; }
.lic-step small { color:var(--muted); font-size:11px; }
.lic-step.is-em_andamento { border-color:var(--cyan); background:rgba(6,182,212,.08); }
.lic-step.is-em_andamento .lic-step-number { background:var(--cyan); color:#fff; }
.lic-step.is-concluida .lic-step-number { background:var(--ok); color:#fff; }
.lic-work-panel { min-width:0; }
.lic-section-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:14px; }
.lic-section-head h3 { color:var(--navy); font-size:16px; }
.lic-section-head p { color:var(--muted); margin-top:3px; font-size:12px; }
.lic-primary-action { background:var(--azure); color:#fff; border-color:var(--azure); }
.lic-dark-action { background:var(--navy); color:#fff; justify-content:center; }
.lic-object-form { display:grid; gap:12px; }
.lic-object-form textarea { width:100%; resize:vertical; }
.lic-upload-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; align-items:end; background:var(--surface-2); border:1px dashed var(--line); border-radius:8px; padding:12px; }
.lic-items-panel { margin:0 0 12px; border:1px solid var(--line); border-radius:8px; background:#fff; overflow:hidden; }
.lic-items-panel summary { display:flex; align-items:center; justify-content:space-between; gap:12px; cursor:pointer; padding:12px 14px; color:var(--navy); font-weight:700; list-style:none; }
.lic-items-panel summary::-webkit-details-marker { display:none; }
.lic-items-panel summary::before { content:'›'; color:var(--azure); font-size:20px; transform:rotate(0deg); transition:transform .15s ease; }
.lic-items-panel[open] summary::before { transform:rotate(90deg); }
.lic-items-panel summary span { margin-right:auto; }
.lic-items-panel summary small { color:var(--muted); font-size:12px; font-weight:600; }
.lic-items-table-wrap { overflow:auto; border-top:1px solid var(--line); }
.lic-items-table { width:100%; min-width:680px; border-collapse:collapse; }
.lic-items-table th { background:var(--surface-2); color:var(--muted); font-size:11px; font-weight:700; text-align:left; text-transform:uppercase; letter-spacing:.4px; }
.lic-items-table th, .lic-items-table td { padding:10px 12px; border-bottom:1px solid var(--line); vertical-align:top; }
.lic-items-table tbody tr:last-child td { border-bottom:0; }
.lic-items-table td { color:var(--ink); font-size:13px; line-height:1.45; }
.lic-items-table td:first-child, .lic-items-table td:nth-child(3), .lic-items-table td:nth-child(4) { white-space:nowrap; }
.lic-pedido-inicial-card { margin-bottom:12px; border-color:#9bd6ef; }
.lic-pedido-inicial-form { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; align-items:end; padding:14px; background:#f4fbfe; border:1px dashed #8fcde8; border-radius:6px; }
.lic-pedido-anexado { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; padding:12px; background:#edf8f4; border:1px solid #a8d9c3; border-radius:6px; }
.lic-pedido-anexado > div:first-child { flex:1 1 280px; min-width:0; }
.lic-pedido-anexado strong, .lic-pedido-anexado span { display:block; }
.lic-pedido-anexado span { color:var(--muted); font-size:12px; margin-top:3px; }
.lic-pdf-read, .lic-anexo-delete { flex:0 0 auto; }
.lic-pedido-anexado .lic-pdf-status { color:#fff; margin-top:0; }
.lic-pedido-anexado .lic-pdf-status-pending { color:var(--muted); margin-top:0; font-weight:700; }
.lic-pdf-read-result { margin-top:8px; }
.lic-inline-error { color:#9f1d1d; background:#fff1f1; border:1px solid #efb4b4; border-radius:6px; padding:9px 11px; font-size:12px; }
.lic-object-stage-card, .lic-processo-compra-card, .lic-market-stage-card { margin-bottom:12px; }
.lic-inline-sei-form { display:grid; grid-template-columns:minmax(0,1fr) minmax(230px,.7fr); gap:12px; align-items:end; margin-top:10px; padding:10px; border:1px solid #b9dcec; border-radius:7px; background:#f4fbfe; }
.lic-inline-sei-form label { display:block; color:var(--ink); font-size:12px; font-weight:700; }
.lic-inline-sei-form label small, .lic-inline-sei-form span { color:var(--muted); font-size:10px; font-weight:500; }
.lic-inline-sei-form span { display:block; margin-top:3px; }
.lic-inline-sei-form > div:last-child { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px; }
.lic-inline-sei-form input { min-width:0; height:34px; border:1px solid var(--line); border-radius:6px; padding:6px 8px; background:#fff; }
.lic-inline-sei-form button { border:1px solid var(--azure); border-radius:6px; background:var(--azure); color:#fff; padding:0 10px; font-weight:700; cursor:pointer; }
.lic-empty-stage { display:grid; gap:4px; padding:14px; border:1px dashed var(--line); border-radius:8px; background:var(--surface-2); }
.lic-empty-stage strong { color:var(--ink); }
.lic-empty-stage span { color:var(--muted); font-size:12px; }
.lic-textos-sei-card { margin-top:12px; }
.lic-textos-list { display:grid; gap:10px; }
.lic-texto-sei { border:1px solid var(--line); border-radius:8px; background:#fff; padding:10px; }
.lic-texto-sei-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin-bottom:8px; }
.lic-texto-sei-head strong { display:block; color:var(--ink); font-size:13px; }
.lic-texto-sei-head small { color:var(--muted); font-size:11px; }
.lic-texto-sei textarea { width:100%; min-height:160px; resize:vertical; border:1px solid var(--line); border-radius:8px; padding:10px; color:var(--ink); background:var(--surface-2); font:12px "IBM Plex Mono", monospace; line-height:1.5; }
.lic-manual-header-card { margin-top:12px; }
.lic-manual-header-form { display:grid; grid-template-columns:minmax(170px,.8fr) minmax(180px,1fr) auto; gap:8px; align-items:center; }
.lic-manual-header-form input, .lic-manual-header-form select { min-width:0; }
.lic-copy-text { border:1px solid var(--azure); border-radius:7px; background:#fff; color:var(--azure); padding:7px 10px; font-size:11px; font-weight:700; cursor:pointer; }
.lic-copy-text:hover { background:var(--azure); color:#fff; }
.lic-conveniar-card { margin-top:12px; }
.lic-conveniar-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:10px; }
.lic-conveniar-form { display:grid; gap:6px; border:1px solid var(--line); border-radius:8px; padding:10px; background:#fff; }
.lic-conveniar-form label { color:var(--muted); font-size:11px; font-weight:700; text-transform:uppercase; }
.lic-conveniar-form input { border:1px solid var(--line); border-radius:8px; padding:8px 9px; color:var(--ink); min-width:0; }
.lic-conveniar-form button { border:0; border-radius:8px; background:var(--navy); color:#fff; padding:8px 10px; font-weight:700; cursor:pointer; }
.lic-conveniar-form button:hover { background:var(--azure); }
.lic-conveniar-guide-card { margin-top:12px; }
.lic-guide-list { display:grid; gap:10px; }
.lic-guide-group { border:1px solid var(--line); border-radius:8px; background:#fff; padding:10px; }
.lic-guide-head { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; margin-bottom:8px; }
.lic-guide-head strong { color:var(--ink); font-size:13px; }
.lic-guide-head small { color:var(--muted); font-size:11px; text-align:right; overflow-wrap:anywhere; }
.lic-guide-fields { display:grid; gap:6px; }
.lic-guide-field { display:grid; grid-template-columns:minmax(130px,1fr) minmax(120px,1.25fr); gap:8px; align-items:center; border-top:1px solid var(--line); padding-top:6px; min-height:34px; }
.lic-guide-field:first-child { border-top:0; padding-top:0; }
.lic-guide-field span { display:block; color:var(--ink); font-size:12px; font-weight:700; }
.lic-guide-field small { display:block; color:var(--muted); font-size:11px; margin-top:2px; }
.lic-guide-field em { color:var(--muted); font-size:11px; font-style:normal; text-align:right; }
.lic-guide-copy { width:100%; min-height:32px; padding:6px 8px; justify-content:center; }
.lic-guide-copy strong { font-size:12px; }

.lic-market-box { display:flex; align-items:center; justify-content:space-between; gap:12px; border:1px solid var(--line); border-radius:8px; padding:10px; background:var(--surface-2); margin-bottom:12px; }
.lic-market-box strong { display:block; color:var(--ink); }
.lic-market-box span { color:var(--muted); font-size:12px; }
.lic-solicitacao-result { margin-bottom:12px; }
.lic-generated-document, .lic-inline-success { display:flex; align-items:center; justify-content:space-between; gap:12px; border:1px solid #9ed8bf; border-radius:8px; padding:10px 12px; background:#effaf5; color:#176344; }
.lic-generated-document strong, .lic-inline-success strong { display:block; color:#176344; }
.lic-generated-document span { display:block; color:#4f6f62; font-size:12px; margin-top:2px; }
.lic-inline-success .tbtn, .lic-generated-document .tbtn { flex:0 0 auto; text-decoration:none; }
.lic-section-head .btn-acao:disabled { cursor:not-allowed; opacity:.5; }
@media (max-width: 560px) { .lic-market-box { flex-direction:column; align-items:flex-start; } }
@media (max-width: 560px) { .lic-generated-document, .lic-inline-success { flex-direction:column; align-items:flex-start; } }

.lic-gestao-filter { display:flex; gap:8px; align-items:center; flex-wrap:wrap; justify-content:flex-end; }
.lic-gestao-filter input, .lic-gestao-filter select { min-width:140px; }
.lic-gestao-kpis { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; margin-bottom:14px; }
.lic-gestao-kpi { border:1px solid var(--line); border-radius:8px; background:#fff; padding:12px; box-shadow:var(--shadow); }
.lic-gestao-kpi span { color:var(--muted); font-size:11px; font-weight:700; text-transform:uppercase; }
.lic-gestao-kpi strong { display:block; color:var(--navy); font-size:24px; margin-top:4px; }
.lic-gestao-kpi small { display:block; color:var(--muted); font-size:11px; margin-top:2px; }
.lic-gestao-kpi.is-gold { box-shadow:inset 3px 0 0 var(--warn), var(--shadow); }
.lic-gestao-kpi.is-red { box-shadow:inset 3px 0 0 var(--bad), var(--shadow); }
.lic-gestao-kpi.is-green { box-shadow:inset 3px 0 0 var(--ok), var(--shadow); }
.lic-gestao-kpi.is-cyan { box-shadow:inset 3px 0 0 var(--cyan), var(--shadow); }
.lic-gestao-kpi.is-purple { box-shadow:inset 3px 0 0 #8b5cf6, var(--shadow); }
.lic-gestao-kpi.is-blue { box-shadow:inset 3px 0 0 var(--azure), var(--shadow); }
.lic-gestao-table td:first-child strong { display:block; color:var(--navy); }
.lic-gestao-table td:first-child small, .lic-gestao-table td:nth-child(2) small { display:block; color:var(--muted); font-size:11px; margin-top:3px; max-width:320px; overflow:hidden; text-overflow:ellipsis; }
.lic-phase-chip { display:inline-flex; border:1px solid var(--line); border-radius:999px; padding:3px 8px; background:var(--surface-2); color:var(--navy); font-size:11px; font-weight:700; }
.lic-gestao-alerts { display:flex; flex-wrap:wrap; gap:4px; min-width:120px; }
.lic-gestao-alerts span { border:1px solid #fde68a; border-radius:999px; background:#fffbeb; color:#92400e; padding:2px 7px; font-size:11px; font-weight:700; }
.lic-gestao-alerts em { color:var(--muted); font-size:11px; font-style:normal; }
@media (max-width: 820px) { .lic-cockpit-title, .lic-live-headline, .lic-section-head { align-items:stretch; flex-direction:column; } .lic-header-card--compact { min-width:0; max-width:100%; } .lic-header-card--expansivel { flex-basis:100%; min-width:0; max-width:none; } .lic-header-copy { opacity:1; } .lic-cockpit-layout { grid-template-columns:1fr; } .lic-stepper { position:static; max-height:none; } .lic-upload-row, .lic-pedido-inicial-form { grid-template-columns:1fr; } }
.lic-sei-panel { display:flex; flex-direction:column; gap:8px; }
.lic-sei-item { display:flex; justify-content:space-between; gap:10px; border:1px solid var(--line); border-radius:8px; padding:9px; background:var(--surface-2); box-shadow:inset 3px 0 0 var(--bad); }
.lic-sei-item.is-texto_digitado { box-shadow:inset 3px 0 0 var(--azure); }
.lic-sei-item strong { display:block; font-size:12px; color:var(--ink); }
.lic-sei-item small { color:var(--muted); font-size:11px; }
.lic-sei-item .num { color:var(--muted); font-size:11px; white-space:nowrap; }

.lic-step-done { margin-top:6px; border:1px solid var(--cyan); background:#fff; color:var(--navy); border-radius:6px; padding:4px 8px; font-size:11px; font-weight:700; cursor:pointer; }
.lic-step-done:hover { background:var(--cyan); color:#fff; }
.lic-sei-form { display:grid; grid-template-columns:minmax(72px,1fr) minmax(72px,1fr) auto; gap:5px; align-items:center; min-width:178px; }
.lic-sei-form input { min-width:0; height:28px; border:1px solid var(--line); border-radius:6px; padding:4px 6px; background:#fff; color:var(--ink); font-size:11px; }
.lic-sei-form input:focus { outline:2px solid var(--cyan); outline-offset:-1px; border-color:var(--cyan); }
.lic-sei-form button { height:28px; border:1px solid var(--azure); border-radius:6px; background:var(--azure); color:#fff; padding:0 7px; font-size:11px; font-weight:700; cursor:pointer; }
.lic-sei-form button:hover { background:var(--navy); border-color:var(--navy); }
@media (max-width: 820px) { .lic-cockpit-title, .lic-live-headline, .lic-section-head { align-items:stretch; flex-direction:column; } .lic-cockpit-layout { grid-template-columns:1fr; } .lic-stepper { position:static; max-height:none; } .lic-upload-row, .lic-pedido-inicial-form { grid-template-columns:1fr; } }
.lic-sei-dismiss button { border:1px solid var(--line); border-radius:6px; background:#fff; color:var(--muted); padding:6px 9px; font-size:11px; font-weight:700; cursor:pointer; }
.lic-sei-dismiss button:hover { color:var(--warn); border-color:var(--warn); }
.lic-anexo-delete button { border:1px solid #fecaca; border-radius:6px; background:#fff; color:#b91c1c; padding:6px 9px; font-size:11px; font-weight:700; cursor:pointer; }
.lic-anexo-delete button:hover { background:#fef2f2; border-color:#ef4444; }
@media (max-width: 420px) { .lic-sei-item { flex-direction:column; } .lic-sei-form { grid-template-columns:1fr; } }
@media (max-width: 1180px) { .lic-cockpit-layout { grid-template-columns:240px minmax(0,1fr); } .lic-sei-panel { grid-column:1 / -1; position:static; max-height:none; } }
@media (max-width: 820px) { .lic-cockpit-title, .lic-live-headline, .lic-section-head { align-items:stretch; flex-direction:column; } .lic-cockpit-layout { grid-template-columns:1fr; } .lic-stepper { position:static; max-height:none; } .lic-upload-row { grid-template-columns:1fr; } }


.lic-textos-step { display:grid; gap:8px; }
.lic-texto-sei-step { color:var(--azure); font:700 11px "Sora", sans-serif; letter-spacing:0; text-transform:uppercase; margin-bottom:8px; }
.lic-word-editor { min-height:480px; overflow:auto; resize:vertical; border:1px solid var(--line); border-radius:0 0 6px 6px; background:#fff; color:#1a1a1a; padding:54px min(7vw,82px); font-family:Georgia,"Times New Roman",serif; font-size:16px; line-height:1.7; box-shadow:inset 0 0 0 1px rgba(15,48,96,.02); }
.lic-word-editor:focus { outline:2px solid var(--cyan); outline-offset:1px; border-color:var(--cyan); }
.lic-word-editor p { margin:0 0 1em; }
.lic-word-editor .Texto_Alinhado_Direita { text-align:right; }
.lic-word-editor .Tabela_Texto_Centralizado { text-align:center; }
.lic-editor-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:4px; padding:7px 9px; border:1px solid var(--line); border-bottom:0; border-radius:6px 6px 0 0; background:#f6f9fc; }
.lic-editor-toolbar button { min-width:31px; height:30px; border:1px solid transparent; border-radius:4px; background:transparent; color:var(--ink); padding:0 7px; font:700 12px inherit; cursor:pointer; }
.lic-editor-toolbar button:hover, .lic-editor-toolbar button:focus-visible { border-color:#b9d2e2; background:#fff; outline:0; }
@media (max-width: 820px) { .lic-word-editor { min-height:360px; padding:30px 20px; font-size:15px; } .lic-texto-sei-head { flex-direction:column; } .lic-editor-toolbar { gap:3px; } .lic-editor-toolbar button { padding:0 6px; } }
.lic-copy-source { border:1px solid var(--line); border-radius:6px; background:#fff; color:var(--muted); padding:6px 9px; font-size:12px; font-weight:700; cursor:pointer; }
.lic-copy-editor { border:1px solid var(--azure); border-radius:6px; background:var(--azure); color:#fff; padding:6px 9px; font-size:12px; font-weight:700; cursor:pointer; }
.lic-copy-editor:hover { background:var(--navy); border-color:var(--navy); }
@media (max-width: 820px) { .lic-word-editor { min-height:220px; padding:28px 20px; font-size:14px; } .lic-texto-sei-head { flex-direction:column; } }
.wrap:has(.lic-cockpit-layout) { max-width:none; width:100%; padding-left:clamp(16px,2vw,36px); padding-right:clamp(16px,2vw,36px); }
.lic-cockpit-layout { grid-template-columns:minmax(230px,260px) minmax(0,1fr) clamp(360px,23vw,440px); gap:clamp(12px,1.2vw,20px); }
.lic-step-feedback { margin-top:10px; padding:9px; border:1px solid #fecaca; border-radius:6px; background:#fef2f2; color:#991b1b; font-size:11px; font-weight:700; line-height:1.4; }
.lic-step-feedback[hidden] { display:none; }
.lic-operation-panel { width:100%; box-sizing:border-box; }
.lic-operation-section h3 small { color:var(--muted); font-size:10px; font-weight:600; }
.lic-operation-help { margin:-3px 0 2px; color:var(--muted); font-size:10px; line-height:1.35; }
.lic-operation-value.is-pending, .lic-operation-sei-form.is-pending { background:transparent; }
.lic-operation-sei-form { grid-template-columns:minmax(120px,1fr); gap:5px; }
.lic-operation-sei-form > div { display:grid; grid-template-columns:minmax(0,1fr) auto; }
@media (max-width:1280px) { .lic-cockpit-layout { grid-template-columns:240px minmax(0,1fr); } .lic-sei-panel { grid-column:1 / -1; position:static; max-height:none; } }
@media (max-width:820px) { .wrap:has(.lic-cockpit-layout) { padding-left:14px; padding-right:14px; } .lic-cockpit-layout { grid-template-columns:1fr; } }

/* ---------- Pesquisa de Mercado 6.1 ---------- */
.pm-shell { display:grid; grid-template-columns:280px minmax(0,1fr); gap:14px; align-items:start; }
.pm-summary { background:var(--surface); border:1px solid var(--line); border-radius:8px; box-shadow:var(--shadow); padding:14px; position:sticky; top:96px; }
.pm-summary dl { display:grid; gap:8px; margin:10px 0 14px; }
.pm-summary dt { color:var(--muted); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.4px; }
.pm-summary dd { color:var(--ink); font-weight:600; overflow-wrap:anywhere; }
.pm-start-form { display:grid; gap:8px; }
.pm-start-form label { color:var(--muted); font-size:11px; font-weight:700; text-transform:uppercase; }
.pm-start-form input, .pm-start-form select, .pm-sample-form input, .pm-sample-form select { min-width:0; border:1px solid var(--line); border-radius:8px; padding:8px 9px; background:#fff; color:var(--ink); font:13px "IBM Plex Sans", sans-serif; }
.pm-start-form button:disabled { opacity:.45; cursor:not-allowed; }
.pm-work { min-width:0; }
.pm-sample-form { display:grid; grid-template-columns:150px repeat(3,minmax(120px,1fr)) auto; gap:8px; align-items:center; background:var(--surface-2); border:1px dashed var(--line); border-radius:8px; padding:10px; margin-bottom:12px; }
.pm-sample-form input[name="link_fonte"], .pm-sample-form input[name="descricao"] { grid-column:span 2; }
.pm-samples { display:grid; gap:8px; }
.pm-sample { display:flex; align-items:center; justify-content:space-between; gap:12px; border:1px solid var(--line); border-radius:8px; padding:10px; background:#fff; }
.pm-sample strong { display:block; color:var(--ink); }
.pm-sample span { color:var(--muted); font-size:12px; }
.pm-evidence-form { display:flex; align-items:center; gap:6px; min-width:220px; }
.pm-evidence-form input { max-width:160px; font-size:11px; color:var(--muted); }
.pm-evidence-form button { border:1px solid var(--line); background:#fff; color:var(--navy); border-radius:7px; padding:7px 9px; font-size:11px; font-weight:700; cursor:pointer; }
.pm-evidence-form button:hover { border-color:var(--azure); color:var(--azure); }
.pm-empty { border:1px dashed var(--line); border-radius:8px; padding:18px; text-align:center; color:var(--muted); background:var(--surface-2); }

.pm-output { display:grid; gap:6px; margin-bottom:12px; }
.pm-output label { color:var(--muted); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.4px; }
.pm-output textarea { width:100%; border:1px solid var(--line); border-radius:8px; padding:10px; background:#fff; color:var(--ink); font:12px "IBM Plex Mono", ui-monospace, monospace; resize:vertical; }
.pm-map-preview { overflow:auto; border:1px solid var(--line); border-radius:8px; }
.pm-map { min-width:640px; width:100%; border-collapse:collapse; background:#fff; }
.pm-map th { background:var(--surface-2); color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.4px; }
.pm-map td, .pm-map th { border-bottom:1px solid var(--line); padding:9px 10px; text-align:left; }
.pm-map tr:last-child td { border-bottom:none; }

@media (max-width: 980px) { .pm-shell { grid-template-columns:1fr; } .pm-summary { position:static; } .pm-sample-form { grid-template-columns:1fr 1fr; } }
@media (max-width: 560px) { .pm-sample-form, .pm-shell { grid-template-columns:1fr; } .pm-sample { flex-direction:column; align-items:flex-start; } .pm-evidence-form { width:100%; flex-wrap:wrap; } }

/* Fila de Compras Diretas */
.wrap:has(.lic-grid-page) { max-width: none; width: 100%; padding: 24px clamp(18px, 3vw, 48px) 60px; }
.lic-grid-page { width: 100%; }
.lic-grid-header { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:20px; }
.lic-grid-header h2 { margin:0; color:var(--navy); font:700 24px "Sora", sans-serif; }
.lic-grid-header p { margin:5px 0 0; color:var(--muted); font-size:14px; }
.lic-grid-triage-link, .lic-grid-open { display:inline-flex; align-items:center; justify-content:center; min-height:38px; padding:0 14px; border-radius:7px; background:var(--azure); color:#fff; border:1px solid var(--azure); font-weight:700; font-size:13px; text-decoration:none; white-space:nowrap; }
.lic-grid-triage-link:hover, .lic-grid-open:hover { background:#126fa8; border-color:#126fa8; color:#fff; }
.lic-grid-summary { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; margin-bottom:14px; }
.lic-summary-item { border:0; border-radius:7px; min-height:74px; padding:12px 14px; cursor:pointer; display:flex; align-items:center; gap:10px; color:#fff; text-align:left; font-family:inherit; box-shadow:0 2px 7px rgba(15,34,67,.12); }
.lic-summary-item strong { font:700 25px "Sora", sans-serif; }
.lic-summary-item span { font-size:12px; font-weight:700; }
.lic-summary-item.is-start { background:#1789cc; }.lic-summary-item.is-quote { background:#6f61d8; }.lic-summary-item.is-execution { background:#8a5ad5; }.lic-summary-item.is-monitoring { background:#e49511; }.lic-summary-item.is-done { background:#209f75; }
.lic-grid-filters { display:grid; grid-template-columns:minmax(280px,2fr) minmax(190px,1fr) auto; gap:10px; align-items:end; padding:14px; margin-bottom:16px; background:var(--surface); border:1px solid var(--line); border-radius:8px; box-shadow:var(--shadow); }
.lic-grid-filters label { display:grid; gap:5px; color:var(--muted); font-size:12px; font-weight:700; }
.lic-grid-filters input, .lic-grid-filters select { box-sizing:border-box; width:100%; height:38px; padding:0 10px; border:1px solid var(--line); border-radius:6px; background:#fff; color:var(--ink); font:14px inherit; }
.lic-grid-filters input:focus, .lic-grid-filters select:focus { outline:0; border-color:var(--azure); box-shadow:0 0 0 3px rgba(23,137,204,.12); }
.lic-filter-clear { height:38px; padding:0 11px; border:1px solid var(--line); border-radius:6px; background:var(--surface-2); color:var(--navy); font:700 12px inherit; cursor:pointer; }
.lic-phase-list { display:grid; gap:12px; }
.lic-phase-group { overflow:hidden; border:1px solid var(--line); border-radius:8px; background:var(--surface); box-shadow:var(--shadow); }
.lic-phase-group > summary { list-style:none; display:flex; align-items:center; gap:10px; min-height:52px; padding:0 16px; cursor:pointer; color:#fff; }
.lic-phase-group > summary::-webkit-details-marker { display:none; }
.lic-phase-chevron { font-size:26px; font-weight:400; line-height:1; transform:rotate(0deg); transition:transform .15s ease; }.lic-phase-group[open] .lic-phase-chevron { transform:rotate(90deg); }
.lic-phase-group summary strong { font-size:15px; }.lic-phase-group summary [data-lic-count] { margin-left:auto; font-size:12px; font-weight:600; opacity:.92; }
.lic-phase-group.is-start > summary { background:#1789cc; }.lic-phase-group.is-quote > summary { background:#6f61d8; }.lic-phase-group.is-execution > summary { background:#8a5ad5; }.lic-phase-group.is-monitoring > summary { background:#e49511; }.lic-phase-group.is-done > summary { background:#209f75; }
.lic-phase-cards { display:grid; gap:1px; background:var(--line); }.lic-phase-empty { margin:0; padding:18px; background:var(--surface); color:var(--muted); font-size:13px; }
.lic-process-card { display:grid; grid-template-columns:minmax(360px,1.4fr) minmax(380px,1fr) 126px; align-items:center; gap:24px; min-height:104px; padding:16px; background:var(--surface); }
.lic-process-card:hover { background:#f8fbfd; }.lic-process-main { display:grid; grid-template-columns:minmax(260px, auto) minmax(0,1fr); gap:14px; align-items:start; }.lic-process-number { color:var(--navy); font:700 12px "IBM Plex Mono",monospace; padding-top:3px; } .lic-process-project { display:block; color:var(--azure); font-size:11px; font-weight:800; margin-bottom:3px; text-transform:uppercase; letter-spacing:.3px; } .lic-process-origin { display:block; color:var(--muted); font-size:11px; margin-top:4px; }.lic-process-main h3 { margin:0; color:var(--ink); font-size:14px; line-height:1.35; }.lic-process-main p { margin:4px 0 0; color:var(--muted); font-size:12px; }.lic-process-analyst { display:block; margin-top:6px; color:#39749b; font-size:12px; }.lic-process-stage { min-width:0; }.lic-process-action { display:flex; justify-content:flex-end; }.lic-process-action > span { color:var(--muted); font-size:12px; }
@media (max-width: 1050px) { .lic-grid-summary { grid-template-columns:repeat(3,minmax(0,1fr)); }.lic-grid-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }.lic-filter-clear { width:100%; }.lic-process-card { grid-template-columns:minmax(250px,1fr) minmax(310px,1fr) 120px; gap:16px; } }
@media (max-width: 720px) { .wrap:has(.lic-grid-page) { padding:18px 14px 40px; }.lic-grid-header { align-items:flex-start; flex-direction:column; }.lic-grid-triage-link { width:100%; }.lic-grid-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }.lic-grid-summary > :last-child { grid-column:span 2; }.lic-grid-filters { grid-template-columns:1fr; }.lic-process-card { grid-template-columns:1fr; gap:14px; padding:14px; }.lic-process-main { grid-template-columns:1fr; gap:8px; }.lic-process-number { padding:0; }.lic-process-action { justify-content:stretch; }.lic-grid-open { width:100%; }.order-progress { grid-template-columns:repeat(5,minmax(52px,1fr)); overflow-x:auto; padding-bottom:2px; }.order-step { font-size:8px; }.lic-phase-group > summary { padding:0 12px; }.lic-phase-group summary [data-lic-count] { font-size:11px; } }

.lic-budget-shortcut { display:flex; align-items:center; justify-content:center; min-height:34px; margin-top:10px; border:1px solid var(--azure); border-radius:6px; background:#f0f9ff; color:var(--azure); font-size:12px; font-weight:700; text-decoration:none; }
.lic-budget-shortcut:hover { background:var(--azure); color:#fff; }
.lic-orcamentacao-card { scroll-margin-top:106px; }
.lic-alert[data-scroll-target] { width:100%; text-align:left; cursor:pointer; font-family:inherit; }
.lic-operation-panel { gap:12px; padding:12px; }
.lic-operation-section { display:grid; gap:8px; padding-bottom:12px; border-bottom:1px solid var(--line); }
.lic-operation-section:last-child { padding-bottom:0; border-bottom:0; }
.lic-operation-section h3 { margin:0; color:var(--navy); font-size:12px; }
.lic-operation-value { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 8px; align-items:center; padding:7px 0; border-top:1px solid var(--line); }
.lic-operation-value:first-of-type { border-top:0; }
.lic-operation-value > span, .lic-master-sei-form label, .lic-operation-marco label, .lic-operation-sei-form label { color:var(--ink); font-size:11px; font-weight:700; }
.lic-operation-value > div { display:flex; align-items:center; justify-content:flex-end; gap:5px; min-width:0; }
.lic-operation-value strong { min-width:0; color:var(--navy); font:600 11px "IBM Plex Mono",ui-monospace,monospace; overflow-wrap:anywhere; text-align:right; }
.lic-operation-value small { grid-column:1 / -1; color:var(--muted); font-size:10px; }
.lic-operation-value em { color:var(--muted); font-size:11px; font-style:normal; }
.lic-operation-value.is-pending, .lic-operation-sei-form.is-pending { background:#fffbeb; }
.lic-panel-copy { border:0; border-radius:4px; background:#e6f7fd; color:var(--azure); padding:3px 5px; font-size:10px; font-weight:700; cursor:pointer; }
.lic-panel-copy:hover, .lic-panel-copy.copied { background:var(--azure); color:#fff; }
.lic-master-sei-form, .lic-operation-marco, .lic-operation-sei-form { display:grid; gap:5px; padding:8px; border:1px solid var(--line); border-radius:6px; background:var(--surface-2); }
.lic-master-sei-form > div, .lic-operation-marco > div, .lic-operation-sei-form > div { display:flex; gap:5px; }
.lic-master-sei-form input, .lic-operation-marco input, .lic-operation-sei-form input { min-width:0; flex:1; height:30px; box-sizing:border-box; border:1px solid var(--line); border-radius:5px; padding:5px 6px; background:#fff; color:var(--ink); font-size:11px; }
.lic-master-sei-form button, .lic-operation-marco button, .lic-operation-sei-form button { border:1px solid var(--azure); border-radius:5px; background:var(--azure); color:#fff; padding:0 7px; font-size:11px; font-weight:700; cursor:pointer; }
.lic-operation-sei-form small { color:var(--muted); font-size:10px; }
.lic-operation-sei-form .lic-panel-copy { justify-self:start; }
.lic-operation-upload .lic-upload-row { grid-template-columns:1fr; padding:0; border:0; background:transparent; }
@media (max-width: 720px) { .lic-inline-sei-form { grid-template-columns:1fr; } }
@media (max-width: 420px) { .lic-master-sei-form > div, .lic-operation-marco > div, .lic-operation-sei-form > div { flex-wrap:wrap; } .lic-master-sei-form button, .lic-operation-marco button, .lic-operation-sei-form button { min-height:30px; } }

/* Cockpit: campos SEI opcionais e coluna operacional legível. */
.lic-operation-value.is-pending, .lic-operation-sei-form.is-pending { background:transparent; }
.lic-operation-sei-form { grid-template-columns:minmax(120px,1fr); gap:5px; }
.lic-operation-sei-form > div { display:grid; grid-template-columns:minmax(0,1fr) auto; }

/* Navegação manual entre etapas. */
.lic-step-actions { display:flex; align-items:flex-start; gap:6px; flex-wrap:wrap; margin-top:6px; }
.lic-step-actions form { display:flex; align-items:center; gap:5px; flex-wrap:wrap; }
.lic-step-actions .lic-step-done { margin-top:0; }
.lic-step-done:disabled { border-color:var(--line); background:var(--surface-2); color:var(--muted); cursor:not-allowed; opacity:.75; }
.lic-step-requirement { flex-basis:100%; color:var(--muted); font-size:10px; line-height:1.3; }
.lic-step-actions .lic-step-feedback { flex-basis:100%; width:100%; box-sizing:border-box; }
.lic-previous-step-action .lic-step-feedback { width:100%; box-sizing:border-box; }
.lic-object-help { display:block; margin:4px 0 7px; color:var(--muted); font-size:11px; line-height:1.4; }


/* Pesquisa de Preços v2 */
.pr2-header { display:flex; justify-content:space-between; gap:18px; align-items:flex-start; margin-bottom:14px; }
.pr2-header h2 { margin:4px 0; color:var(--navy); }
.pr2-header p { margin:0; color:var(--muted); }
.pr2-context { display:grid; grid-template-columns:2fr 1fr .6fr .4fr .7fr; gap:1px; overflow:hidden; margin-bottom:14px; border:1px solid var(--line); border-radius:9px; background:var(--line); }
.pr2-context > div, .pr2-metrics > div { display:grid; gap:3px; padding:11px; background:var(--surface-2); }
.pr2-context span, .pr2-metrics span { color:var(--muted); font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; }
.pr2-context strong, .pr2-metrics strong { color:var(--navy); font-size:12px; overflow-wrap:anywhere; }
.pr2-tabs { position:sticky; top:0; z-index:8; display:flex; gap:6px; overflow-x:auto; margin:0 0 14px; padding:8px; border:1px solid var(--line); border-radius:9px; background:rgba(255,255,255,.97); }
.pr2-tabs a { flex:0 0 auto; border-radius:6px; padding:7px 9px; color:var(--navy); background:var(--surface-2); font-size:11px; font-weight:700; text-decoration:none; }
.pr2-tabs a:hover { color:#fff; background:var(--azure); }
.pr2-section { scroll-margin-top:70px; margin-bottom:14px; padding:18px; }
.pr2-empty { max-width:900px; margin:24px auto; padding:24px; }
.pr2-form { display:grid; grid-template-columns:repeat(3,minmax(150px,1fr)); gap:10px; margin-top:14px; }
.pr2-form label, .pr2-inline-form label { display:grid; gap:5px; color:var(--ink); font-size:11px; font-weight:700; }
.pr2-form input, .pr2-form select, .pr2-inline-form input { min-width:0; height:34px; box-sizing:border-box; border:1px solid var(--line); border-radius:6px; padding:6px 8px; background:#fff; color:var(--ink); }
.pr2-form button { align-self:end; min-height:34px; }
.pr2-check { display:flex !important; flex-direction:row; align-items:center; align-self:end; min-height:34px; }
.pr2-check input { width:auto; height:auto; }
.pr2-metrics { display:grid; grid-template-columns:repeat(4,1fr); gap:1px; overflow:hidden; margin:10px 0; border:1px solid var(--line); border-radius:7px; background:var(--line); }
.pr2-status-action { display:inline-flex; margin:4px 7px 4px 0; }
.pr2-inline-form { display:flex; gap:8px; align-items:end; margin-top:10px; }
.pr2-definition { display:grid; grid-template-columns:max-content 1fr; gap:5px 12px; padding:12px; background:var(--surface-2); }
.pr2-definition dt { color:var(--muted); font-size:11px; font-weight:700; }
.pr2-definition dd { margin:0; color:var(--ink); }
.pr2-items { display:grid; gap:10px; }
.pr2-item { overflow:hidden; border:1px solid var(--line); border-radius:8px; background:#fff; }
.pr2-item summary { display:grid; grid-template-columns:70px minmax(220px,2fr) 1fr 1fr 1fr; gap:10px; align-items:center; padding:12px; cursor:pointer; color:var(--ink); font-size:11px; font-weight:700; background:var(--surface-2); }
.pr2-item-body { padding:14px; }
/* Sete colunas: fonte, descrição, valor, unidade, vigência, situação e ações.
   Unidade e vigência entraram com as críticas — sem elas não há como conferir
   medidas de fornecimento desiguais nem amostra vencida. */
.pr2-sample-grid { display:grid; grid-template-columns:minmax(130px,1fr) minmax(200px,2fr) minmax(110px,1fr) minmax(110px,1fr) minmax(120px,1fr) minmax(130px,1fr) minmax(120px,1fr); gap:1px; overflow:auto; border:1px solid var(--line); background:var(--line); }

/* Amostra expurgada continua visível e marcada: sumir da leitura é o que
   impede conferir se o descarte foi criterioso. */
.pr2-sample-expurgado { background:#fef2f2 !important; }

.pr2-metodo { margin:12px 0; padding:12px 14px; border:1px solid var(--line); border-radius:9px; background:var(--surface-2); }
.pr2-metodo h5 { margin:0 0 10px; color:var(--navy); font-size:11px; text-transform:uppercase; letter-spacing:.04em; }
.pr2-metodo-opcoes { display:flex; flex-wrap:wrap; gap:10px; }
.pr2-metodo-opcao { flex:1 1 140px; padding:9px 12px; border:1px solid var(--line); border-radius:8px; background:#fff; }
.pr2-metodo-opcao span { display:block; font-size:10px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); }
.pr2-metodo-opcao strong { font-size:15px; color:var(--ink); font-weight:600; }
/* O método efetivo fica em negrito e destacado, como no Cesta de Preços. */
.pr2-metodo-opcao.selecionado { border-color:var(--azure); background:#f0f9ff; }
.pr2-metodo-opcao.selecionado strong { color:var(--navy); font-weight:800; }
.pr2-metodo p { margin:8px 0 0; font-size:11px; }

.pr2-critica { margin:12px 0; padding:12px 14px; border:1px solid #fcd34d; border-radius:9px; background:#fffbeb; }
.pr2-critica h5 { margin:0 0 8px; color:#92400e; font-size:11px; text-transform:uppercase; letter-spacing:.04em; }
.pr2-critica ul { margin:0; padding-left:18px; }
.pr2-critica li { font-size:12px; color:#78350f; margin:4px 0; }
.pr2-critica li.bloqueante { color:#991b1b; font-weight:600; }

.pr2-metodo-form { margin-top:10px; }
.pr2-metodo-form summary { display:inline-block; cursor:pointer; }
.pr2-metodo-form .pr2-form { margin-top:10px; }

/* Confirmação de conclusão com crítica pendente. Não é um "OK" que some: a
   resposta é registrada com ator e data, e a tela diz isso. */
.pr2-confirmacao { margin:0 0 14px; padding:14px 16px; border:1px solid #f59e0b; border-radius:10px; background:#fffbeb; }
.pr2-confirmacao h4 { margin:0 0 6px; color:#92400e; font-size:15px; }
.pr2-confirmacao p { margin:4px 0; font-size:12px; color:#78350f; }
.pr2-confirmacao ul { margin:8px 0; padding-left:18px; }
.pr2-confirmacao li { font-size:12px; color:#78350f; margin:3px 0; }
.pr2-confirmacao-acoes { display:flex; gap:10px; align-items:center; margin-top:10px; }
.pr2-confirmacao-acoes form { margin:0; }

/* Indicador de cobertura por propostas. É informação, não bloqueio: quem
   bloqueia é o regime, na finalização. */
.pr2-cobertura { flex:1 1 260px; }
.pr2-cobertura small { display:block; margin-top:2px; font-size:10px; color:var(--muted); line-height:1.35; }
.pr2-cobertura-ok { color:var(--good, #15803d); }

/* Texto da pesquisa para o SEI — o entregável.
   O conteúdo é renderizado com as classes do editor do SEI, que não existem
   aqui; a caixa dá o mínimo de legibilidade sem alterar o que será copiado. */
.pr2-texto-sei-bloco { margin:0 0 18px; padding:14px 16px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); }
.pr2-texto-sei-bloco h4 { margin:0; color:var(--navy); font-size:15px; }
.pr2-texto-sei-bloco p { margin:4px 0 0; font-size:12px; color:var(--muted); }
.pr2-texto-sei { margin-top:14px; }
.pr2-texto-sei-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; flex-wrap:wrap; margin-bottom:10px; }
.pr2-texto-sei-head h4 { margin:0; color:var(--navy); font-size:14px; }
.pr2-texto-sei-head small { display:block; margin-top:2px; font-size:11px; color:var(--muted); }
.pr2-texto-sei-acoes { display:flex; gap:8px; }
.pr2-texto-sei-conteudo { max-height:460px; overflow:auto; padding:18px 22px; border:1px solid var(--line); border-radius:8px; background:#fff; font-size:13px; line-height:1.5; }
.pr2-texto-sei-conteudo p { margin:0 0 2px; }
.pr2-texto-sei-conteudo table { width:100%; border-collapse:collapse; margin:8px 0; font-size:12px; }
.pr2-texto-sei-conteudo th, .pr2-texto-sei-conteudo td { border:1px solid var(--line); padding:6px 8px; text-align:left; vertical-align:top; }
.pr2-texto-sei-conteudo th { background:var(--surface-2); font-weight:700; }
.pr2-texto-sei-conteudo .Texto_Centralizado { text-align:center; }
.pr2-texto-sei-conteudo .Texto_Alinhado_Direita_Espacamento_Simples { text-align:right; }
.pr2-copy-toast { position:fixed; right:20px; bottom:20px; z-index:60; padding:10px 14px; border-radius:8px; background:var(--navy); color:#fff; font-size:12px; opacity:0; pointer-events:none; transition:opacity .15s; }
.pr2-copy-toast.is-visible { opacity:1; }
.pr2-sample-grid > * { min-width:120px; padding:8px; background:#fff; font-size:11px; }
.pr2-sample-grid > strong { background:var(--surface-2); color:var(--navy); }
.pr2-sample-grid small { display:block; margin-top:3px; color:var(--muted); }
.pr2-sample-form { grid-template-columns:repeat(4,minmax(140px,1fr)); border-top:1px solid var(--line); padding-top:12px; }
.pr2-preview-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.pr2-preview-grid > div { padding:12px; border:1px solid var(--line); border-radius:7px; background:var(--surface-2); }
.pr2-preview-grid h4 { margin:0 0 8px; color:var(--navy); }
.pr2-preview-grid ul { display:grid; gap:5px; margin:0; padding-left:18px; }
@media (max-width: 900px) {
  .pr2-context { grid-template-columns:1fr 1fr; }
  .pr2-context > div:first-child { grid-column:1 / -1; }
  .pr2-form, .pr2-sample-form { grid-template-columns:1fr 1fr; }
  .pr2-item summary { grid-template-columns:70px 1fr; }
  .pr2-preview-grid { grid-template-columns:1fr; }
}
@media (max-width: 560px) {
  .pr2-header { display:grid; }
  .pr2-context, .pr2-metrics, .pr2-form, .pr2-sample-form { grid-template-columns:1fr; }
  .pr2-context > div:first-child { grid-column:auto; }
  .pr2-inline-form { display:grid; }
}

/* ── Pesquisa de Preços v2 — estilos adicionais ── */
.pr2-header-actions { display:flex; gap:8px; align-items:flex-start; flex-shrink:0; }
.btn-outline { display:inline-flex; align-items:center; gap:6px; padding:7px 14px; border:1px solid var(--azure); border-radius:8px; color:var(--azure); background:transparent; font-family:inherit; font-size:12px; font-weight:600; cursor:pointer; text-decoration:none; transition:all .18s; }
.btn-outline:hover { background:var(--azure); color:#fff; }
.btn-sm { padding:5px 10px; font-size:11px; }
.pr2-status-chip { display:inline-block; padding:3px 10px; border-radius:12px; font-size:11px; font-weight:700; }
.pr2-status-finalized { background:#dcfce7; color:#166534; }
.pr2-status-review { background:#fef9c3; color:#713f12; }
.pr2-status-in-research { background:#dbeafe; color:#1e40af; }
.pr2-coverage-badge { display:inline-block; padding:2px 8px; border-radius:10px; font-size:10px; font-weight:700; }
.pr2-coverage-ok { background:#dcfce7; color:#166534; }
.pr2-coverage-partial { background:#fef9c3; color:#713f12; }
.pr2-coverage-empty { background:#fee2e2; color:#7f1d1d; }
.pr2-item-num { font-weight:700; color:var(--navy); white-space:nowrap; }
.pr2-item-label { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pr2-item-qty { white-space:nowrap; }
.pr2-item-avg { white-space:nowrap; font-weight:600; }
.pr2-item-avg small { display:block; color:var(--muted); font-weight:400; }
.pr2-item-desc { margin-bottom:12px; font-size:12px; color:var(--muted); }
.pr2-item summary { grid-template-columns:80px minmax(200px,2fr) 100px 130px 200px; }
.pr2-sample-actions { display:flex; flex-direction:column; gap:5px; }
.pr2-exclusion-form summary { list-style:none; }
.pr2-exclusion-form summary::-webkit-details-marker { display:none; }
.pr2-exclusion-form[open] summary { margin-bottom:6px; }
.pr2-add-sample-toggle { margin-top:12px; }
.pr2-add-sample-toggle > summary { list-style:none; display:inline-flex; cursor:pointer; }
.pr2-add-sample-toggle > summary::-webkit-details-marker { display:none; }
.pr2-add-sample-toggle[open] > summary { margin-bottom:10px; }
.pr2-warn { color:var(--warn); font-size:10px; }
.pr2-error { color:var(--bad); font-size:11px; }
.pr2-muted { color:var(--muted); }
.pr2-global-value { font-size:16px; color:var(--navy); }
.pr2-map-table { width:100%; border-collapse:collapse; font-size:12px; }
.pr2-map-table th { padding:10px; text-align:left; background:var(--surface-2); font-size:11px; font-weight:700; color:var(--navy); border-bottom:2px solid var(--line); white-space:nowrap; }
.pr2-map-table td { padding:10px; border-bottom:1px solid var(--line); }
.pr2-map-table td small { display:block; color:var(--muted); margin-top:2px; }
.pr2-map-table tfoot td { background:var(--surface-2); font-weight:700; }
.pr2-row-empty td { background:#fff5f5; }
.pr2-row-partial td { background:#fffbeb; }
.pr2-map-total-label { text-align:right; color:var(--muted); font-size:11px; font-weight:700; text-transform:uppercase; }
.pr2-map-total { font-size:14px; color:var(--navy); }
.pr2-section-placeholder { display:grid; grid-template-columns:repeat(auto-fit, minmax(240px, 1fr)); gap:14px; margin-top:14px; }
.pr2-placeholder-card { border:1px solid var(--line); border-radius:10px; padding:18px; background:var(--surface-2); display:grid; gap:8px; }
.pr2-placeholder-icon { font-size:28px; }
.pr2-placeholder-card h4 { margin:0; color:var(--navy); }
.pr2-placeholder-card p { font-size:12px; color:var(--muted); margin:0; }
.pr2-doc-actions { margin-top:16px; display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.pr2-finep-checklist { margin-top:14px; padding:14px; border:1px solid var(--line); border-radius:8px; background:var(--surface-2); }
.pr2-finep-checklist h4 { margin:0 0 8px; color:var(--navy); }
.breadcrumbs { font-size:12px; color:var(--muted); display:flex; gap:6px; align-items:center; margin-bottom:6px; }
.breadcrumbs a { color:var(--azure); }
.breadcrumbs span { color:var(--line); }
@media (max-width: 900px) {
  .pr2-item summary { grid-template-columns:70px 1fr; }
  .pr2-item summary > span:nth-child(n+3) { display:none; }
  .pr2-section-placeholder { grid-template-columns:1fr; }
}

/* ── Fornecedores (PRP-05) ── */
.pr2-suppliers { display:flex; flex-direction:column; gap:12px; }
.pr2-supplier-card { border:1px solid var(--line); border-radius:10px; padding:14px; background:#fff; box-shadow:0 1px 2px rgba(0,0,0,0.03); }
.pr2-supplier-head { display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin-bottom:10px; }
.pr2-supplier-head strong { font-size:14px; color:var(--navy); }
.pr2-supplier-head span { font-size:12px; color:var(--muted); }
.pr2-supplier-events ul { list-style:none; padding:0; margin:0 0 10px 0; font-size:12px; color:var(--text); border-left:2px solid var(--line); padding-left:12px; }
.pr2-supplier-events li { margin-bottom:6px; }
.pr2-supplier-events li:last-child { margin-bottom:0; }
.pr2-supplier-events strong { color:var(--navy); }
.pr2-inline-form { display:flex; gap:10px; flex-wrap:wrap; align-items:flex-end; padding:10px; background:var(--surface-2); border-radius:8px; margin-top:8px; }
.pr2-inline-form label { display:flex; flex-direction:column; gap:4px; font-size:11px; font-weight:700; color:var(--muted); }
.pr2-inline-form input, .pr2-inline-form select { border:1px solid var(--line); border-radius:6px; padding:6px 10px; font-size:12px; background:#fff; }
.pr2-form { display:grid; gap:12px; grid-template-columns:repeat(auto-fit, minmax(200px, 1fr)); padding:14px; background:var(--surface-2); border-radius:8px; margin-top:10px; }
.pr2-form label { display:flex; flex-direction:column; gap:4px; font-size:12px; font-weight:700; color:var(--muted); }
.pr2-form input, .pr2-form select { border:1px solid var(--line); border-radius:6px; padding:8px 12px; font-size:13px; background:#fff; }


/* Central de Cotação por item */
.pr2-item-actions { display:flex; align-items:flex-start; gap:8px; flex-wrap:wrap; margin:12px 0; }
.pr2-quote-dialog { width:min(1180px,calc(100vw - 40px)); max-height:calc(100vh - 40px); box-sizing:border-box; overflow:auto; margin:auto; padding:0; border:1px solid var(--line); border-radius:14px; background:#fff; color:var(--ink); box-shadow:0 24px 70px rgba(15,36,56,.25); }
.pr2-quote-dialog::backdrop { background:rgba(15,36,56,.58); backdrop-filter:blur(2px); }
.pr2-quote-header { position:sticky; top:0; z-index:2; display:flex; align-items:center; justify-content:space-between; gap:18px; padding:16px 20px; border-bottom:1px solid var(--line); background:rgba(255,255,255,.97); }
.pr2-quote-header h4 { margin:0 !important; color:var(--navy); font-size:18px; }
.pr2-quote-dialog > p { margin:18px 20px 0; padding:12px 14px; border:1px solid #bae6fd; border-radius:9px; background:#f0f9ff; color:var(--navy); font-size:12px; }
.pr2-quote-dialog > hr { display:none; }
.pr2-quote-providers { display:grid; grid-template-columns:1fr 1fr; gap:18px; padding:18px 20px 22px; }
.pr2-quote-provider { min-width:0; padding:16px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); }
.pr2-quote-provider h5 { margin:0 0 12px; color:var(--navy); font-size:15px; }
.pr2-quote-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.pr2-quote-form label { display:grid; gap:4px; color:var(--ink); font-size:11px; font-weight:700; }
.pr2-quote-form input { min-width:0; height:35px; box-sizing:border-box; border:1px solid var(--line); border-radius:6px; padding:7px 9px; background:#fff; color:var(--ink); }
.pr2-quote-form button { align-self:end; min-height:35px; }
.pr2-quote-results, .pr2-quote-provider > div[id$="-results"] { margin-top:14px; overflow:auto; }
.pr2-integration-result { min-width:0; padding-top:4px; }
.pr2-integration-result h5, .pr2-integration-result h6 { margin:8px 0; color:var(--navy); }
.pr2-integration-result > p { margin:4px 0; font-size:11px; }

/* Central de cotação unificada: lista única, barra estatística e refino.
   O layout segue o modal do Cesta de Preços que o cliente usa como referência. */
.pr2-quote-item-desc { margin:18px 20px 0; padding:12px 14px; border:1px solid var(--line); border-radius:9px; background:var(--surface-2); }
.pr2-quote-item-desc h5 { margin:0 0 6px; color:var(--navy); font-size:11px; text-transform:uppercase; letter-spacing:.04em; }
.pr2-quote-item-desc p { margin:2px 0; font-size:12px; }
.pr2-quote-tabs { padding:16px 20px 0; display:grid; gap:10px; }
.pr2-quote-tabs > details { border:1px solid var(--line); border-radius:10px; background:var(--surface-2); }
.pr2-quote-tabs > details > summary { padding:12px 14px; cursor:pointer; font-weight:700; color:var(--navy); font-size:13px; }
.pr2-quote-tabs > details[open] > summary { border-bottom:1px solid var(--line); }
.pr2-quote-tabs .pr2-quote-form { padding:14px; }
.pr2-quote-tabs > details > p { margin:12px 14px 0; }
.pr2-quote-radio { grid-column:1 / -1; display:flex; gap:18px; border:0; padding:0; margin:0; }
.pr2-quote-radio label { flex-direction:row; align-items:center; gap:6px; display:flex; font-weight:600; }

.pr2-cotacao { padding:16px 20px 22px; }
.pr2-cotacao-catalogo { margin-bottom:14px; padding:12px 14px; border:1px solid #bae6fd; border-radius:9px; background:#f0f9ff; }
.pr2-cotacao-catalogo strong { display:block; color:var(--navy); font-size:12px; }
.pr2-cotacao-catalogo span { font-size:13px; }
.pr2-cotacao-stats { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:14px; }
.pr2-cotacao-stats > div { flex:1 1 130px; padding:10px 12px; border:1px solid var(--line); border-radius:9px; background:var(--surface-2); }
.pr2-cotacao-stats span { display:block; font-size:10px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); }
.pr2-cotacao-stats strong { font-size:15px; color:var(--navy); }
/* Coeficiente de variação alto significa que o termo casou coisas diferentes.
   É sinal para revisão humana, não bloqueio — daí o destaque, e não um erro. */
.pr2-cv-alto { border-color:#f59e0b; background:#fffbeb; }
.pr2-cv-alto strong { color:#b45309; }
.pr2-cotacao-avisos { display:grid; gap:6px; margin-bottom:12px; }
.pr2-warning { padding:9px 12px; border:1px solid #fcd34d; border-radius:8px; background:#fffbeb; color:#92400e; font-size:12px; }
.pr2-cotacao-corpo { display:grid; grid-template-columns:250px minmax(0,1fr); gap:18px; align-items:start; }
.pr2-cotacao-refino { padding:14px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); }
.pr2-cotacao-refino h5 { margin:0 0 10px; color:var(--navy); font-size:13px; }
.pr2-cotacao-refino fieldset { border:0; border-top:1px solid var(--line); padding:10px 0 0; margin:10px 0 0; }
.pr2-cotacao-refino legend { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); }
.pr2-cotacao-refino label { display:block; font-size:12px; margin:5px 0; }
.pr2-cotacao-refino input[type=text], .pr2-cotacao-refino select { width:100%; box-sizing:border-box; height:31px; border:1px solid var(--line); border-radius:6px; padding:5px 8px; background:#fff; }
.pr2-faceta { display:flex; align-items:center; gap:6px; }
.pr2-faceta span { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pr2-faceta em { font-style:normal; font-size:11px; color:var(--muted); }
.pr2-cotacao-lista { min-width:0; overflow:auto; }
.pr2-badge-origem { display:inline-block; margin-bottom:3px; padding:2px 6px; border-radius:4px; background:var(--surface-2); border:1px solid var(--line); font-size:10px; font-weight:700; color:var(--navy); }
.pr2-badge-alerta { display:inline-block; margin-top:3px; padding:2px 6px; border-radius:4px; background:#fffbeb; border:1px solid #fcd34d; font-size:10px; font-weight:700; color:#92400e; }
.pr2-linha-vencida { background:#fef2f2; }
.pr2-cotacao-acoes { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-top:14px; }
.pr2-detalhe-fonte { display:grid; grid-template-columns:auto minmax(0,1fr); gap:4px 14px; margin:8px 0 14px; font-size:12px; }
.pr2-detalhe-fonte dt { font-weight:700; color:var(--muted); }
.pr2-detalhe-fonte dd { margin:0; }
@media (max-width:820px) {
  .pr2-cotacao-corpo { grid-template-columns:1fr; }
}
@media (max-width:820px) {
  .pr2-quote-dialog { width:calc(100vw - 20px); max-height:calc(100vh - 20px); }
  .pr2-quote-providers { grid-template-columns:1fr; padding:12px; }
  .pr2-quote-header { padding:14px; }
  .pr2-quote-dialog > p { margin:12px 12px 0; }
}
@media (max-width:520px) {
  .pr2-quote-form { grid-template-columns:1fr; }
  .pr2-quote-header h4 { font-size:15px; }
}

/* Troca de regime normativo (PPV-41). O bloco é discreto até ser aberto: a
   troca é destrutiva e não deve competir por atenção com o trabalho normal. */
.pr2-regime-atual { margin:0 0 2px; font-size:13px; }
.pr2-regime-trocar { margin-top:10px; }
.pr2-regime-trocar > summary { list-style:none; display:inline-flex; cursor:pointer; font-size:12px; color:var(--muted); text-decoration:underline; }
.pr2-regime-trocar > summary::-webkit-details-marker { display:none; }
.pr2-regime-trocar[open] > summary { margin-bottom:10px; }
.pr2-alerta { font-size:12px; background:#fef2f2; border:1px solid #fecaca; box-shadow:inset 3px 0 0 var(--bad); border-radius:6px; padding:10px 12px; margin:0 0 10px; }
.pr2-regime-confirmacao { margin-top:12px; border-top:1px solid var(--line); padding-top:12px; }
.pr2-regime-perdas { margin:6px 0 10px; padding-left:20px; font-size:13px; }
.pr2-regime-perdas li { margin-bottom:2px; }
.btn-perigo { background:var(--bad); color:#fff; border:none; border-radius:6px; padding:9px 14px; font-weight:600; cursor:pointer; }
.btn-perigo:hover { opacity:0.9; }

/* Pesquisa de Preços em três colunas, com as duas laterais FIXAS.

   A página usava um contêiner central estreito e desperdiçava as margens dos
   dois lados, enquanto os parâmetros da pesquisa e o contexto do processo
   ficavam no topo e sumiam ao primeiro rolar. As laterais ocupam essas margens
   e acompanham o analista pelas abas.

   Abaixo de 1280px a lateral direita entra no fluxo; abaixo de 1040px as duas
   entram, e a esquerda vem primeiro — é a que tem controle, não só leitura. */
.wrap:has(.pr2-page) { max-width:none; width:100%; padding-left:clamp(14px,1.6vw,28px); padding-right:clamp(14px,1.6vw,28px); }
.pr2-page { display:grid; grid-template-columns:264px minmax(0,1fr) 268px; gap:18px; align-items:start; }
.pr2-fluxo { min-width:0; display:flex; flex-direction:column; gap:18px; }
.pr2-rail { min-width:0; position:sticky; top:14px; max-height:calc(100vh - 28px); overflow-y:auto; display:flex; flex-direction:column; gap:12px; }
.pr2-rail-bloco { background:#fff; border:1px solid var(--line); border-radius:10px; padding:12px 14px; }
.pr2-rail-bloco h4 { margin:0 0 8px; font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.4px; color:var(--navy); }
.pr2-rail-sub { margin:2px 0 0; font-size:11px; color:var(--muted); line-height:1.4; }
.pr2-rail-destaque { margin:0; font-size:13px; font-weight:700; color:var(--ink); }
.pr2-rail-form { margin:0 0 10px; }
.pr2-rail-form button, .pr2-rail-bloco .pr2-inline-form button { margin-top:6px; width:100%; }
.pr2-rail-form label, .pr2-rail-bloco .pr2-inline-form label { display:flex; flex-direction:column; gap:4px; font-size:11px; color:var(--muted); }
.pr2-rail-form select, .pr2-rail-bloco select { width:100%; box-sizing:border-box; }
.pr2-rail-bloco .pr2-inline-form { display:block; margin:0; }
.pr2-rail-bloco .pr2-form-container { border:none; padding:0; margin:0; background:none; }
.pr2-rail-bloco .pr2-regime-trocar { margin-top:8px; }
.pr2-rail-dl { display:grid; grid-template-columns:auto auto; gap:5px 10px; margin:0; align-items:baseline; }
.pr2-rail-dl dt { font-size:11px; color:var(--muted); }
.pr2-rail-dl dd { margin:0; font-size:12px; font-weight:600; text-align:right; }
@media (max-width:1280px) {
  .pr2-page { grid-template-columns:264px minmax(0,1fr); }
  .pr2-rail-dir { grid-column:1 / -1; position:static; max-height:none; flex-direction:row; flex-wrap:wrap; }
  .pr2-rail-dir .pr2-rail-bloco { flex:1 1 240px; }
}
@media (max-width:1040px) {
  .pr2-page { grid-template-columns:1fr; }
  .pr2-rail { position:static; max-height:none; }
  .pr2-rail-esq { order:-1; }
}

/* Modal de amostra: mesmo formulário para incluir e corrigir. Três colunas em
   tela larga, uma no telefone — o problema relatado era editar por um canto
   estreito, então o campo de descrição precisa de largura de verdade. */
.pr2-modal { border:none; border-radius:10px; padding:22px 24px; width:min(980px, 94vw); max-height:90vh; overflow:auto; box-shadow:0 18px 50px rgba(0,0,0,.28); }
.pr2-modal::backdrop { background:rgba(15,23,42,.45); }
.pr2-modal h3 { margin:0 0 2px; }
.pr2-modal > .pr2-muted { margin:0 0 14px; font-size:12px; }
.pr2-modal-fechar { position:absolute; top:10px; right:12px; }
.pr2-modal-fechar button { background:none; border:none; font-size:22px; line-height:1; cursor:pointer; color:var(--muted); }
.pr2-modal-grid { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:16px; }
.pr2-modal-grid fieldset { border:1px solid var(--line); border-radius:8px; padding:10px 12px 12px; min-width:0; display:flex; flex-direction:column; gap:8px; }
.pr2-modal-grid legend { font-size:11px; font-weight:700; color:var(--navy); padding:0 4px; }
.pr2-modal-grid label { display:flex; flex-direction:column; gap:3px; font-size:12px; }
.pr2-modal-grid input, .pr2-modal-grid select, .pr2-modal-grid textarea { width:100%; box-sizing:border-box; }
.pr2-modal-grid label.pr2-check { flex-direction:row; align-items:center; gap:6px; }
.pr2-modal-acoes { display:flex; justify-content:flex-end; gap:10px; margin-top:16px; }
@media (max-width:820px) { .pr2-modal-grid { grid-template-columns:1fr; } }

/* Divergência entre a razão social da pesquisa e a do cadastro global, e os
   dados da proposta no card do fornecedor. */
.pr2-supplier-divergencia { margin:6px 0 0; font-size:12px; background:#fffbeb; border:1px solid #fde68a; border-radius:6px; padding:6px 10px; }
.pr2-supplier-proposta { display:flex; flex-wrap:wrap; gap:2px 14px; margin:6px 0 0; font-size:12px; }
.pr2-supplier-proposta dt { color:var(--muted); }
.pr2-supplier-proposta dd { margin:0 12px 0 0; font-weight:600; }

/* Lançamento de proposta: grade de valores e conferência linha a linha. */
.pr2-modal-proposta { width:min(1100px, 96vw); }
.pr2-proposta-cabecalho { display:flex; flex-wrap:wrap; gap:12px 18px; align-items:flex-end; margin:0 0 12px; }
.pr2-proposta-cabecalho label { display:flex; flex-direction:column; gap:3px; font-size:12px; }
.pr2-proposta-cabecalho label.pr2-check { flex-direction:row; align-items:center; gap:6px; }
.pr2-proposta-grade input { width:130px; text-align:right; box-sizing:border-box; }
.pr2-proposta-nao-cotado td { color:var(--muted); }

/* Trechos editáveis do texto da pesquisa (aba Justificativas). */
.pr2-blocos { margin-top:18px; display:flex; flex-direction:column; gap:12px; }
.pr2-blocos > h4 { margin:0; }
.pr2-bloco { border:1px solid var(--line); border-radius:8px; padding:10px 12px; background:#fff; display:flex; flex-direction:column; gap:6px; }
.pr2-bloco-cabecalho { display:flex; flex-wrap:wrap; gap:6px 10px; align-items:center; }
.pr2-bloco-dica { margin:0; font-size:12px; }
.pr2-bloco textarea { width:100%; box-sizing:border-box; font:inherit; font-size:13px; line-height:1.45; }
.pr2-bloco-acoes { display:flex; gap:8px; justify-content:flex-end; }

/* Anexos gerais da pesquisa (aba 2): contagem por tipo e a frase que o texto
   vai citar, à vista antes de gerar. */
.pr2-anexos { margin-top:18px; border:1px solid var(--line); border-radius:8px; padding:12px 14px; background:#fff; display:flex; flex-direction:column; gap:8px; }
.pr2-anexos h4 { margin:0; }
.pr2-anexos-frase { margin:0; font-size:13px; background:var(--surface-2); border-radius:6px; padding:8px 10px; }
.pr2-anexos-contagem { margin:0; padding:0; list-style:none; display:grid; grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)); gap:4px 16px; font-size:12px; }
.pr2-anexo-vazio { color:var(--muted); }
.pr2-anexos-form { display:flex; flex-wrap:wrap; gap:10px; align-items:flex-end; }
.pr2-anexos-form label { display:flex; flex-direction:column; gap:3px; font-size:12px; }

/* Habilitação (Decreto): a escolha de empresa e certidão só aparece quando a
   resposta é "sim" — sem JavaScript, pelo :has. */
.pr2-habilitacao { margin-top:18px; border:1px solid var(--line); border-radius:8px; padding:12px 14px; background:#fff; display:flex; flex-direction:column; gap:8px; }
.pr2-habilitacao h4 { margin:0; }
.pr2-habilitacao-form fieldset { border:none; padding:0; margin:0; display:flex; flex-wrap:wrap; gap:8px 16px; align-items:flex-end; }
.pr2-habilitacao-form legend { font-size:12px; font-weight:700; margin-bottom:4px; width:100%; }
.pr2-habilitacao-detalhe { display:flex; flex-wrap:wrap; gap:10px; width:100%; }
.pr2-habilitacao-detalhe label { display:flex; flex-direction:column; gap:3px; font-size:12px; }
.pr2-habilitacao-form:has(input[value="nao"]:checked) .pr2-habilitacao-detalhe { display:none; }

/* Busca de amostras públicas por item: lista de itens clicáveis e janela com
   resultado que se enche aos poucos. */
.pr2-busca-itens { margin:0 0 16px; border:1px solid var(--line); border-radius:8px; padding:12px 14px; background:#fff; }
.pr2-busca-itens h4 { margin:0 0 2px; }
.pr2-busca-itens-lista { display:flex; flex-direction:column; gap:4px; margin-top:8px; }
.pr2-busca-item { display:grid; grid-template-columns:70px minmax(0,1fr) 130px 120px; gap:10px; align-items:center; text-align:left; background:var(--surface-2); border:1px solid var(--line); border-radius:6px; padding:8px 10px; cursor:pointer; font:inherit; font-size:13px; }
.pr2-busca-item:hover { border-color:var(--azure); background:#fff; }
.pr2-busca-item-num { font-weight:700; color:var(--navy); }
.pr2-busca-modal { width:min(1180px, 96vw); }
.pr2-busca-barra { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:8px 0 12px; }
.pr2-busca-barra input[type=search] { flex:1 1 320px; font-size:14px; padding:8px 10px; }
.pr2-busca-refino { flex-basis:100%; font-size:12px; }
.pr2-busca-refino[open] { display:flex; flex-wrap:wrap; gap:10px; align-items:flex-end; }
.pr2-busca-refino label { display:flex; flex-direction:column; gap:3px; }
.pr2-busca-refino label.pr2-check { flex-direction:row; align-items:center; gap:6px; }
.pr2-busca-status { font-size:13px; margin-bottom:8px; }
.pr2-busca-girando { display:inline-block; width:10px; height:10px; border:2px solid var(--line); border-top-color:var(--azure); border-radius:50%; animation:pr2-gira .8s linear infinite; vertical-align:middle; margin-right:4px; }
@keyframes pr2-gira { to { transform:rotate(360deg); } }
.pr2-busca-cabecalho, .pr2-busca-linha { display:grid; grid-template-columns:28px minmax(0,2.4fr) minmax(0,1.6fr) 90px 70px 110px 110px; gap:8px; align-items:start; padding:6px 8px; font-size:12px; }
.pr2-busca-cabecalho { font-weight:700; color:var(--navy); background:var(--surface-2); border-bottom:2px solid var(--line); }
.pr2-busca-linhas { max-height:52vh; overflow-y:auto; }
.pr2-busca-linha { border-bottom:1px solid var(--line); cursor:pointer; }
.pr2-busca-linha:hover { background:var(--surface-2); }
.pr2-busca-linha:has(input:checked) { background:#eef6ff; }
.pr2-busca-linha small { display:block; }
@media (max-width:820px) {
  .pr2-busca-item { grid-template-columns:60px minmax(0,1fr); }
  .pr2-busca-cabecalho { display:none; }
  .pr2-busca-linha { grid-template-columns:28px minmax(0,1fr); }
}
