:root {
  color-scheme: dark;
  --bg: #081018;
  --bg-elevated: #0d1621;
  --surface: #101b28;
  --surface-2: #142130;
  --surface-3: #192636;
  --line: rgba(226, 232, 240, 0.09);
  --line-strong: rgba(226, 232, 240, 0.16);
  --text: #edf4fb;
  --muted: #90a3b8;
  --muted-2: #6e7f93;
  --accent: #7dd3fc;
  --accent-strong: #4fc3f7;
  --success: #5ee6a8;
  --warning: #f8d57e;
  --danger: #fb7185;
  --info: #8ab4ff;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
  --radius: 20px;
  --radius-sm: 14px;
  --max-width: 1560px;
  --gutter: clamp(20px, 3vw, 40px);
  --font-sans: "Geist", "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "SFMono-Regular", "JetBrains Mono", "Menlo", monospace;
  --page-color-scheme: dark;
  --page-background-html:
    radial-gradient(circle at top left, rgba(125, 211, 252, 0.08), transparent 28%),
    radial-gradient(circle at top right, rgba(94, 230, 168, 0.05), transparent 24%),
    linear-gradient(180deg, #0a1119 0%, #081018 45%, #071017 100%);
  --page-background-body:
    radial-gradient(circle at 10% 0%, rgba(125, 211, 252, 0.09), transparent 24%),
    radial-gradient(circle at 90% 4%, rgba(94, 230, 168, 0.07), transparent 25%),
    linear-gradient(180deg, #090f16 0%, #081018 100%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  color-scheme: var(--page-color-scheme);
  background: var(--page-background-html);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--page-background-body);
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  padding-top: 18px;
}

.app-shell__main {
  padding: 24px 0 40px;
}

.app-shell__inner {
  width: min(calc(100vw - 2 * var(--gutter)), var(--max-width));
  margin: 0 auto;
}

.shell-breadcrumbs {
  margin-top: 18px;
}

.shell-breadcrumbs .app-shell__inner {
  padding: 0 4px 10px;
  border-bottom: 1px solid var(--line);
}

.flash-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.form-grid__section {
  grid-column: 1 / -1;
  padding-top: 8px;
  margin-top: 6px;
  border-top: 1px solid var(--line);
}

.form-grid__section-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.form-grid__section-description {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.flash {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.flash--success {
  border-color: rgba(94, 230, 168, 0.28);
  background: rgba(94, 230, 168, 0.08);
}

.flash--warning,
.flash--error {
  border-color: rgba(251, 113, 133, 0.3);
  background: rgba(251, 113, 133, 0.08);
}

.topbar {
  width: min(calc(100vw - 2 * var(--gutter)), var(--max-width));
  margin: 20px auto 0;
  padding: 18px 22px;
  position: sticky;
  top: 12px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(13, 22, 33, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand__mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(125, 211, 252, 0.92), rgba(79, 195, 247, 0.68));
  color: #06111b;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand__copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand__tag {
  font-size: 0.8rem;
  color: var(--muted);
}

.topbar__context {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.topbar__label,
.panel__meta,
.eyebrow,
.breadcrumbs,
.metric-card__label,
.field__label,
.field__hint,
.timeline__meta {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.topbar__value {
  font-size: 0.95rem;
  font-weight: 600;
}

.org-switcher {
  display: block;
}

.org-switcher__select {
  min-width: 220px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(7, 15, 22, 0.86);
  color: var(--text);
}

.topbar__nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  overflow-x: auto;
  padding: 6px 0;
  scrollbar-width: none;
}

.topbar__nav::-webkit-scrollbar {
  display: none;
}

.topbar__nav--public {
  min-height: 1px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line);
}

.nav-link.is-active {
  color: var(--text);
  border-color: rgba(125, 211, 252, 0.35);
  background: rgba(125, 211, 252, 0.1);
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-dropdown {
  position: relative;
}

.menu-dropdown summary {
  list-style: none;
  cursor: pointer;
}

.menu-dropdown summary::-webkit-details-marker {
  display: none;
}

.menu-dropdown__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 300px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(20, 33, 48, 0.98), rgba(13, 22, 33, 0.98));
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  z-index: 20;
}

.menu-dropdown__section {
  display: grid;
  gap: 8px;
}

.menu-dropdown__eyebrow {
  color: var(--muted-2);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.menu-dropdown__hint {
  color: var(--muted);
  font-size: 0.95rem;
}

.menu-dropdown__link {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

.menu-dropdown__link:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.menu-dropdown__link--danger {
  color: #fca5a5;
}

.chip,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 600;
  border: 1px solid var(--line);
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.chip {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
}

.chip--ghost {
  background: rgba(125, 211, 252, 0.08);
  border-color: rgba(125, 211, 252, 0.18);
}

.btn {
  cursor: pointer;
  gap: 8px;
}

.btn:hover,
.chip:hover {
  transform: translateY(-1px);
}

.btn--primary {
  border-color: rgba(125, 211, 252, 0.35);
  background: linear-gradient(180deg, rgba(125, 211, 252, 0.95), rgba(79, 195, 247, 0.72));
  color: #06111b;
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.btn--full {
  width: 100%;
}

.section-header,
.hero,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(20, 33, 48, 0.92), rgba(13, 22, 33, 0.92));
  box-shadow: var(--shadow);
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  margin-bottom: 20px;
}

.section-header__copy {
  max-width: 960px;
}

.section-header__title,
.hero__title,
.empty-state__title {
  margin: 8px 0 0;
  font-size: clamp(2rem, 2.8vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.section-header__subtitle,
.hero__subtitle,
.panel__text,
.empty-state__text,
.form-group__description {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.section-header__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.metrics-grid--compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 0;
}

.metric-card {
  padding: 20px 20px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.metric-card__value {
  margin: 6px 0 0;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.metric-card__hint {
  margin: 8px 0 0;
  color: var(--muted-2);
  font-size: 0.92rem;
}

.hero {
  padding: 28px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.hero__copy {
  max-width: 900px;
}

.hero__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.panel--full {
  grid-column: 1 / -1;
}

.funnel-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.funnel-card {
  padding: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.funnel-card--info {
  background: rgba(125, 211, 252, 0.08);
}

.funnel-card--warning {
  background: rgba(251, 191, 36, 0.08);
}

.funnel-card--success {
  background: rgba(74, 222, 128, 0.08);
}

.funnel-card--muted {
  background: rgba(148, 163, 184, 0.08);
}

.funnel-card__label {
  margin: 0;
  color: var(--muted-2);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.funnel-card__amount {
  margin: 10px 0 0;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.funnel-card__meta {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

.dashboard-calendar-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(360px, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.panel--calendar {
  overflow: hidden;
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.calendar-board {
  display: grid;
  gap: 12px;
}

.calendar-board__weekdays,
.calendar-board__weeks {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.calendar-board__weekday {
  padding: 0 6px;
  color: var(--muted-2);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.calendar-day {
  min-height: 138px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  display: grid;
  gap: 10px;
}

.calendar-day.is-outside {
  opacity: 0.34;
}

.calendar-day.is-today {
  border-color: rgba(125, 211, 252, 0.34);
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.18);
}

.calendar-day__head {
  display: flex;
  justify-content: flex-end;
}

.calendar-day__number {
  font-size: 0.92rem;
  font-weight: 700;
}

.calendar-day__events {
  display: grid;
  gap: 8px;
  align-content: start;
}

.calendar-event {
  display: grid;
  gap: 2px;
  padding: 8px 9px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
}

.calendar-event:hover {
  border-color: var(--line);
}

.calendar-event--warning {
  background: rgba(251, 191, 36, 0.09);
}

.calendar-event--info {
  background: rgba(125, 211, 252, 0.09);
}

.calendar-event--success {
  background: rgba(74, 222, 128, 0.09);
}

.calendar-event--muted {
  background: rgba(148, 163, 184, 0.08);
}

.calendar-event__time {
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 700;
}

.calendar-event__label {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.3;
}

.calendar-day__more {
  color: var(--muted-2);
  font-size: 0.78rem;
  font-weight: 600;
}

.table-shell--compact {
  margin-top: 4px;
}

.dashboard-layout-list {
  display: grid;
  gap: 16px;
}

.dashboard-layout-item {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.dashboard-layout-item__controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.panel {
  padding: 20px;
}

.panel--subtle {
  background: rgba(255, 255, 255, 0.02);
}

.panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stack-list {
  display: grid;
  gap: 12px;
}

.stack-list--nested {
  gap: 0;
  margin-left: 24px;
}

.stack-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.stack-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.stack-row--nested {
  padding: 10px 0 0;
  border-top: 0;
}

.stack-row__title {
  font-weight: 600;
}

.stack-row__title--link {
  color: var(--text);
}

.stack-row__title--link:hover {
  color: var(--accent);
}

.stack-row__text {
  color: var(--muted);
}

.stage-pills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.stage-pill {
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.stage-pill__label {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.stage-pill__value {
  display: block;
  margin-top: 8px;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.kanban-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 1fr);
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.kanban-column {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.kanban-column__header > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.kanban-column__title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
}

.kanban-column__cards {
  display: grid;
  gap: 10px;
}

.kanban-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(7, 15, 22, 0.72);
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.kanban-card:hover {
  border-color: rgba(125, 211, 252, 0.28);
  background: rgba(11, 23, 34, 0.92);
  transform: translateY(-1px);
}

.kanban-card--empty {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}

.kanban-card__ref {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.kanban-card__title {
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.35;
}

.kanban-card__meta {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.split-layout,
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.9fr);
  gap: 16px;
}

.tender-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.9fr);
  gap: 16px;
}

.tender-detail__main {
  display: grid;
  gap: 16px;
  align-content: start;
}

.detail-layout--full {
  grid-template-columns: 1fr;
}

.detail-layout__main {
  display: grid;
  gap: 16px;
  align-content: start;
  min-width: 0;
}

.tender-detail__header,
.tender-detail__line-items {
  background: rgba(255, 255, 255, 0.03);
}

.panel--main {
  min-width: 0;
}

.aside-stack {
  display: grid;
  gap: 16px;
  align-content: start;
  align-self: start;
  position: sticky;
  top: 158px;
}

.table-shell {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
  background: rgba(255, 255, 255, 0.015);
}

.table__th,
.table__td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.table__th {
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}

.table__row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.table__stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.table__primary {
  font-weight: 700;
}

.table__meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.row-actions {
  display: flex;
  gap: 10px;
}

.row-actions a {
  color: var(--accent);
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 700;
}

.badge--success {
  color: var(--success);
  border-color: rgba(94, 230, 168, 0.24);
  background: rgba(94, 230, 168, 0.08);
}

.badge--warning {
  color: var(--warning);
  border-color: rgba(248, 213, 126, 0.24);
  background: rgba(248, 213, 126, 0.08);
}

.badge--danger {
  color: var(--danger);
  border-color: rgba(251, 113, 133, 0.24);
  background: rgba(251, 113, 133, 0.08);
}

.badge--info {
  color: var(--info);
  border-color: rgba(138, 180, 255, 0.24);
  background: rgba(138, 180, 255, 0.08);
}

.badge--accent {
  color: var(--accent);
  border-color: rgba(125, 211, 252, 0.24);
  background: rgba(125, 211, 252, 0.08);
}

.badge--muted {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
}

.fact {
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.fact__label {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.fact__value {
  margin: 8px 0 0;
  font-size: 1rem;
  font-weight: 600;
}

.detail-panels {
  margin-top: 16px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-panels > .panel--subtle {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.detail-panels--single-column {
  grid-template-columns: minmax(0, 1fr);
}

.timeline {
  padding: 20px;
}

.timeline__list {
  display: grid;
  gap: 14px;
}

.timeline__list--compact {
  gap: 10px;
}

.timeline__item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.timeline__item:first-child {
  padding-top: 0;
  border-top: 0;
}

.timeline__title {
  margin: 0;
  font-size: 0.98rem;
}

.timeline__text {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.form-stack {
  display: grid;
  gap: 20px;
}

.url-import-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.url-import-field {
  flex: 1;
}

.url-import-btn {
  flex-shrink: 0;
  align-self: flex-end;
  margin-bottom: 0;
}

.url-import-status {
  margin-top: 16px;
}

.import-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 12px;
  color: var(--text-3);
  font-size: 0.8rem;
}
.import-divider::before,
.import-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.file-import-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-import-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.file-import-item .field__input {
  flex: 1;
  padding: 6px 10px;
}

.file-import-remove {
  flex-shrink: 0;
}

.file-import-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.import-thinking-panel {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm, 8px);
  background: rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.import-thinking-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text-2);
  user-select: none;
  list-style: none;
}

.import-thinking-summary::-webkit-details-marker { display: none; }

.import-thinking-badge {
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--accent, #0057ff22);
  color: var(--accent, #0057ff);
  font-variant-numeric: tabular-nums;
}

.import-thinking-content {
  max-height: 260px;
  overflow-y: auto;
  padding: 8px 12px 12px;
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
  border-top: 1px solid var(--line);
}

.import-refine-block {
  margin-top: 4px;
}

.import-chat-history {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 10px;
  padding: 4px 0;
}

.chat-bubble {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

.chat-bubble--user {
  align-self: flex-end;
  background: var(--accent, #0057ff);
  color: #fff;
  border-bottom-right-radius: 3px;
}

.chat-bubble--agent {
  align-self: flex-start;
  background: var(--surface-2, rgba(255,255,255,0.06));
  border: 1px solid var(--line);
  border-bottom-left-radius: 3px;
}

.import-refine-block textarea.field__input {
  resize: vertical;
  min-height: 38px;
}

.form-context-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.form-group {
  padding: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.form-group__header {
  margin-bottom: 16px;
}

.form-group__title {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.pricing-breakdown__top-summary {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin: 2px 0 2px;
}

.pricing-breakdown {
  display: grid;
  gap: 18px;
  padding: 0;
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
  overflow: hidden;
}

.pricing-breakdown__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.95), rgba(219, 234, 254, 0.95));
}

.pricing-breakdown__summary::-webkit-details-marker {
  display: none;
}

.pricing-breakdown__summary .form-group__description {
  margin: 6px 0 0;
}

.pricing-breakdown__toggle {
  flex-shrink: 0;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pricing-breakdown[open] .pricing-breakdown__toggle::before {
  content: "Ocultar";
}

.pricing-breakdown:not([open]) .pricing-breakdown__toggle::before {
  content: "Mostrar";
}

.pricing-breakdown__body {
  display: grid;
  gap: 18px;
  padding: 0 20px 20px;
}

.pricing-breakdown__snapshot,
.pricing-breakdown__facts {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.pricing-breakdown__products,
.pricing-breakdown__sections {
  display: grid;
  gap: 16px;
}

.pricing-card,
.pricing-breakdown__section {
  padding: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(226, 232, 240, 1);
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.pricing-card--line-total,
.pricing-breakdown__section--summary {
  border-color: rgba(147, 197, 253, 0.9);
  background: linear-gradient(180deg, rgba(239, 246, 255, 1), rgba(224, 242, 254, 0.95));
}

.pricing-card__header {
  margin-bottom: 14px;
}

.pricing-card__title {
  margin: 6px 0 0;
  font-size: 1.04rem;
  letter-spacing: -0.02em;
}

.pricing-equations {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.pricing-equation {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, 1);
  background: rgba(248, 250, 252, 1);
}

.pricing-equation__label,
.pricing-fact__label {
  margin: 0;
  color: #64748b;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.pricing-equation__logic {
  margin: 6px 0 0;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 600;
}

.pricing-equation__numbers,
.pricing-fact__value {
  margin: 8px 0 0;
  color: #0f172a;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  line-height: 1.5;
}

.pricing-fact {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, 1);
  background: rgba(248, 250, 252, 1);
}

.pricing-fact--summary {
  background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(248, 250, 252, 1));
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inline-formset-list {
  display: grid;
  gap: 16px;
}

.inline-formset-item {
  padding: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.inline-formset-item__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.inline-formset-item__title {
  margin: 6px 0 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.inline-formset-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field--inline-toggle .field__control {
  justify-content: flex-start;
  min-height: auto;
  padding: 10px 14px;
  background: transparent;
  border-style: dashed;
}

.field--inline-toggle .field__control input {
  width: auto;
  min-height: auto;
}

.field--span-2 {
  grid-column: span 2;
}

.field--span-3 {
  grid-column: 1 / -1;
}

.inline-formset-item textarea {
  min-height: 88px;
  resize: vertical;
}

.field {
  display: grid;
  gap: 8px;
}

.field__control,
.field__static {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(7, 15, 22, 0.86);
  color: var(--text);
}

.field__control--with-action {
  gap: 10px;
}

.field__control--with-action :is(input, select, textarea) {
  flex: 1;
}

.field__control :is(input, select, textarea) {
  width: 100%;
  min-height: 46px;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
}

.btn--inline {
  white-space: nowrap;
  padding-inline: 12px;
}

.field__hint {
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
}

.field__error {
  display: grid;
  gap: 4px;
  color: var(--danger);
  font-size: 0.9rem;
}

.field__error--panel {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(251, 113, 133, 0.28);
  background: rgba(251, 113, 133, 0.08);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.form-actions--start {
  justify-content: flex-start;
}

.list-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.field__input,
.field__select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(7, 15, 22, 0.86);
  color: var(--text);
}

.field__input[type="date"],
.field__input[type="datetime-local"] {
  color-scheme: var(--page-color-scheme, dark);
}

.field__input[type="date"]::-webkit-calendar-picker-indicator,
.field__input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.75;
  filter: brightness(0) invert(1);
}

.theme--clean .field__input[type="date"]::-webkit-calendar-picker-indicator,
.theme--clean .field__input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: none;
  opacity: 0.5;
}

.field__checkbox {
  width: 18px;
  height: 18px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.breadcrumbs__link,
.breadcrumbs__current,
.breadcrumbs__sep {
  color: var(--muted);
}

.breadcrumbs__current {
  color: var(--text);
  font-weight: 600;
}

.empty-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 24px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--line-strong);
  background: rgba(255, 255, 255, 0.02);
}

.empty-state__copy {
  max-width: 620px;
}

.empty-state__text {
  margin-top: 8px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.choice-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.choice-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.choice-card input {
  margin: 3px 0 0;
  accent-color: var(--accent);
}

.choice-card__body {
  display: grid;
  gap: 6px;
}

.choice-card__title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.choice-card__text {
  color: var(--muted);
  line-height: 1.55;
}

.choice-card.is-selected {
  border-color: rgba(125, 211, 252, 0.32);
  background: rgba(125, 211, 252, 0.08);
}

.mono {
  font-family: var(--font-mono);
}

.theme--clean {
  --bg: #eff3f7;
  --bg-elevated: rgba(255, 255, 255, 0.82);
  --surface: rgba(255, 255, 255, 0.9);
  --surface-2: #f8fafc;
  --surface-3: #eef2f6;
  --line: rgba(38, 46, 56, 0.08);
  --line-strong: rgba(38, 46, 56, 0.16);
  --text: #1f2430;
  --muted: rgba(31, 36, 48, 0.68);
  --muted-2: rgba(31, 36, 48, 0.48);
  --accent: #0071e3;
  --accent-strong: #2997ff;
  --success: #1e9b59;
  --warning: #a86a11;
  --danger: #b9382f;
  --info: #0066cc;
  --shadow: 0 24px 80px rgba(111, 137, 168, 0.12);
  --radius: 32px;
  --radius-sm: 20px;
  --font-sans: "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --page-color-scheme: light;
  --page-background-html:
    radial-gradient(circle at 10% 14%, rgba(202, 232, 255, 0.9), transparent 28%),
    radial-gradient(circle at 88% 10%, rgba(213, 244, 230, 0.75), transparent 26%),
    linear-gradient(180deg, #f8fbfd 0%, #eef3f8 100%);
  --page-background-body:
    radial-gradient(circle at 0% 40%, rgba(188, 223, 255, 0.6), transparent 24%),
    radial-gradient(circle at 100% 10%, rgba(212, 240, 255, 0.64), transparent 22%),
    radial-gradient(circle at 88% 90%, rgba(214, 245, 231, 0.58), transparent 22%),
    linear-gradient(180deg, #f9fbfd 0%, #eff3f7 100%);
}

.theme--clean .app-shell__main {
  padding-top: 28px;
}

.theme--clean .app-shell {
  padding-top: 18px;
}

.theme--clean .flash {
  background: rgba(255, 255, 255, 0.9);
}

.theme--clean .topbar {
  margin-top: 0;
  padding: 14px 18px;
  border-color: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 40px rgba(120, 143, 168, 0.14);
  backdrop-filter: saturate(180%) blur(24px);
}

.theme--clean .brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(38, 46, 56, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 249, 0.92));
  color: #1f2430;
  font-size: 0.95rem;
  font-weight: 700;
}

.theme--clean .brand__name,
.theme--clean .topbar__value,
.theme--clean .nav-link,
.theme--clean .chip,
.theme--clean .menu-dropdown summary {
  color: var(--text);
}

.theme--clean .brand__tag,
.theme--clean .topbar__label,
.theme--clean .menu-dropdown__eyebrow {
  color: var(--muted-2);
}

.theme--clean .topbar__context {
  border-left-color: rgba(38, 46, 56, 0.08);
}

.theme--clean .nav-link {
  padding: 9px 12px;
  font-size: 0.78rem;
  letter-spacing: -0.01em;
}

.theme--clean .nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(38, 46, 56, 0.08);
}

.theme--clean .nav-link.is-active {
  color: var(--text);
  border-color: rgba(38, 46, 56, 0.08);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 20px rgba(120, 143, 168, 0.08);
}

.theme--clean .menu-dropdown__panel {
  border-radius: 26px;
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 24px 60px rgba(111, 137, 168, 0.18);
  backdrop-filter: blur(22px);
}

.theme--clean .menu-dropdown__link {
  background: rgba(248, 250, 252, 0.96);
}

.theme--clean .menu-dropdown__link:hover {
  background: rgba(241, 245, 249, 0.96);
}

.theme--clean .chip,
.theme--clean .btn {
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.theme--clean .chip {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(38, 46, 56, 0.08);
}

.theme--clean .chip--ghost,
.theme--clean .btn--ghost {
  background: rgba(255, 255, 255, 0.84);
  border-color: rgba(38, 46, 56, 0.08);
  color: var(--text);
}

.theme--clean .btn--primary {
  background: #23251f;
  border-color: #23251f;
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(35, 37, 31, 0.18);
}

.theme--clean .btn--primary:hover {
  background: #2d3029;
  border-color: #2d3029;
}

.theme--clean .section-header,
.theme--clean .panel {
  border-color: rgba(255, 255, 255, 0.74);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.theme--clean .hero {
  border-color: rgba(255, 255, 255, 0.78);
  background:
    radial-gradient(circle at top right, rgba(208, 235, 255, 0.88), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 250, 252, 0.9));
  box-shadow: 0 24px 80px rgba(111, 137, 168, 0.14);
}

.theme--clean .hero__title,
.theme--clean .hero .panel__title,
.theme--clean .hero .section-header__title {
  color: var(--text);
}

.theme--clean .hero__subtitle,
.theme--clean .hero .eyebrow {
  color: var(--muted);
}

.theme--clean .section-header__title,
.theme--clean .hero__title,
.theme--clean .empty-state__title {
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.theme--clean .section-header__title {
  font-size: clamp(2.2rem, 3vw, 3.5rem);
}

.theme--clean .panel__title {
  font-size: 1.08rem;
}

.theme--clean .metric-card,
.theme--clean .funnel-card,
.theme--clean .stage-pill,
.theme--clean .kanban-column,
.theme--clean .dashboard-layout-item,
.theme--clean .fact,
.theme--clean .form-group,
.theme--clean .choice-card {
  border-color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 40px rgba(128, 146, 169, 0.1);
}

.theme--clean .metric-card__label,
.theme--clean .funnel-card__label,
.theme--clean .fact__label,
.theme--clean .stage-pill__label {
  color: var(--muted-2);
}

.theme--clean .metric-card__value,
.theme--clean .funnel-card__amount,
.theme--clean .stage-pill__value {
  font-weight: 600;
  letter-spacing: -0.03em;
}

.theme--clean .funnel-card--info,
.theme--clean .badge--info,
.theme--clean .calendar-event--info,
.theme--clean .choice-card.is-selected {
  background: rgba(62, 155, 255, 0.1);
}

.theme--clean .funnel-card--warning,
.theme--clean .badge--warning,
.theme--clean .calendar-event--warning {
  background: rgba(255, 159, 10, 0.1);
}

.theme--clean .funnel-card--success,
.theme--clean .badge--success,
.theme--clean .calendar-event--success {
  background: rgba(52, 199, 89, 0.1);
}

.theme--clean .funnel-card--muted,
.theme--clean .badge--muted,
.theme--clean .calendar-event--muted {
  background: rgba(120, 120, 128, 0.08);
}

.theme--clean .calendar-day,
.theme--clean .kanban-card,
.theme--clean .field__control,
.theme--clean .field__static,
.theme--clean .field__input,
.theme--clean .field__select,
.theme--clean .table,
.theme--clean .empty-state {
  border-color: rgba(38, 46, 56, 0.07);
  background: rgba(255, 255, 255, 0.94);
}

.theme--clean .calendar-day.is-today,
.theme--clean .choice-card.is-selected {
  border-color: rgba(0, 113, 227, 0.34);
  box-shadow: inset 0 0 0 1px rgba(0, 113, 227, 0.12);
}

.theme--clean .calendar-event {
  border-radius: 14px;
}

.theme--clean .calendar-event__time,
.theme--clean .kanban-card__ref,
.theme--clean .stack-row__title--link:hover,
.theme--clean .row-actions a,
.theme--clean .table__primary,
.theme--clean a:hover {
  color: #0066cc;
}

.theme--clean .kanban-card {
  box-shadow: none;
}

.theme--clean .kanban-card:hover {
  border-color: rgba(0, 113, 227, 0.28);
  background: rgba(250, 252, 255, 0.96);
}

.theme--clean .table-shell {
  border-color: rgba(38, 46, 56, 0.07);
  background: rgba(255, 255, 255, 0.94);
}

.theme--clean .table__th {
  background: rgba(248, 250, 252, 0.92);
  color: var(--muted-2);
}

.theme--clean .table__row:hover {
  background: rgba(247, 250, 252, 0.94);
}

.theme--clean .field__control,
.theme--clean .field__static,
.theme--clean .field__input,
.theme--clean .field__select {
  min-height: 50px;
  border-radius: 16px;
}

.theme--clean .field__control :is(input, select, textarea) {
  color: var(--text);
}

.theme--clean .empty-state {
  border-style: solid;
}

.theme--clean .badge {
  border-color: transparent;
  font-weight: 600;
}

.theme--clean .metric-card,
.theme--clean .panel,
.theme--clean .section-header,
.theme--clean .hero,
.theme--clean .table-shell,
.theme--clean .empty-state {
  border-radius: 28px;
}

.auth-shell {
  min-height: min(620px, calc(100vh - 240px));
  display: grid;
  place-items: start center;
  padding-top: 8px;
}

.auth-card {
  width: min(100%, 560px);
  padding: 28px;
}

.panel__title--auth {
  font-size: 1.5rem;
}

@media (max-width: 1280px) {
  .topbar {
    flex-wrap: wrap;
  }

  .topbar__nav {
    order: 3;
    width: 100%;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .funnel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid,
  .dashboard-calendar-grid,
  .split-layout,
  .detail-layout,
  .tender-detail {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .section-header,
  .hero,
  .empty-state,
  .topbar {
    padding-left: 18px;
    padding-right: 18px;
  }

  .section-header,
  .hero,
  .empty-state {
    flex-direction: column;
    align-items: flex-start;
  }

  .calendar-toolbar {
    width: 100%;
  }

  .metrics-grid,
  .metrics-grid--compact,
  .funnel-grid,
  .choice-grid,
  .calendar-board__weekdays,
  .calendar-board__weeks,
  .stage-pills,
  .facts-grid,
  .detail-panels,
  .form-grid,
  .inline-formset-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-layout-item,
  .dashboard-layout-item__controls {
    flex-direction: column;
    align-items: stretch;
  }

  .calendar-day {
    min-height: auto;
  }

  .table {
    min-width: 760px;
  }

  .timeline__item {
    grid-template-columns: 1fr;
  }
}
