/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 17px;
  border-radius: var(--r-md);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.005em;
  white-space: nowrap;
  user-select: none;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t-fast), background-color var(--t-fast), color var(--t-fast), opacity var(--t-fast);
}
.btn .icon { width: 17px; height: 17px; }
.btn:active:not(:disabled) { transform: translateY(1px) scale(0.985); }
.btn:disabled { opacity: 0.45; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 14px; border-radius: 10px; gap: 6px; }
.btn-sm .icon { width: 15px; height: 15px; }
.btn-lg { min-height: 50px; padding: 0 24px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-icon { padding: 0; width: 42px; }
.btn-sm.btn-icon { width: 34px; }

/* brushed steel: the primary action is a piece of the chrome */
.btn-primary {
  color: #0b0c12;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 48%),
    linear-gradient(100deg, #b9bdca 0%, #eef0f5 calc(var(--lx) - 6%), #ffffff var(--lx), #d6d9e2 calc(var(--lx) + 14%), #9fa3b3 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), inset 0 -1px 0 rgba(0, 0, 0, 0.25), 0 8px 24px rgba(0, 0, 0, 0.35);
}
.btn-primary:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 0 rgba(0, 0, 0, 0.25), 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 0 4px rgba(168, 184, 224, 0.14);
}
.btn-ghost {
  color: var(--steel-100);
  border: 1px solid var(--hair-strong);
  background: rgba(255, 255, 255, 0.025);
}
.btn-ghost:not(:disabled):hover { border-color: rgba(168, 184, 224, 0.45); background: rgba(168, 184, 224, 0.07); }
.btn-quiet { color: var(--steel-300); }
.btn-quiet:not(:disabled):hover { color: var(--steel-100); background: var(--wash-strong); }
.btn-signal {
  color: var(--steel-50);
  border: 1px solid rgba(168, 184, 224, 0.45);
  background: linear-gradient(180deg, rgba(168, 184, 224, 0.26), rgba(168, 184, 224, 0.12));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 26px rgba(80, 100, 170, 0.18);
}
.btn-signal:not(:disabled):hover { background: linear-gradient(180deg, rgba(168, 184, 224, 0.34), rgba(168, 184, 224, 0.18)); transform: translateY(-1px); }
.btn-danger {
  color: #1a0d0f;
  background: linear-gradient(180deg, #f3cfcf, #e2a9a9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 8px 24px rgba(0, 0, 0, 0.35);
}
.btn-danger-quiet { color: var(--danger); }
.btn-danger-quiet:not(:disabled):hover { background: rgba(232, 180, 180, 0.08); }
.btn.is-busy { pointer-events: none; }
.btn.is-busy > :not(.spin) { opacity: 0.55; }

.spin {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1.6px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
.spin-lg { width: 26px; height: 26px; border-width: 2px; }

.icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: var(--steel-300);
  transition: background-color var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease);
  flex-shrink: 0;
}
.icon-btn:hover { background: var(--wash-strong); color: var(--steel-100); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn.is-active { color: var(--steel-50); background: rgba(168, 184, 224, 0.12); }
.icon-btn--sm { width: 30px; height: 30px; border-radius: 8px; }
.icon-btn--sm .icon { width: 15px; height: 15px; }
.icon-btn .dot {
  position: absolute;
  top: 7px;
  right: 7px;
  min-width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--signal);
  box-shadow: 0 0 0 2px var(--graphite);
}
.icon-btn .dot.is-critical { background: var(--danger); animation: pulse-ring 1.8s var(--ease) infinite; }

.link {
  color: var(--signal);
  border-radius: 4px;
  transition: color var(--t-fast);
  cursor: pointer;
}
.link:hover { color: var(--steel-50); text-decoration: underline; text-underline-offset: 3px; }

/* ── Form controls ────────────────────────────────────────────────────── */
.field { display: grid; gap: 6px; min-width: 0; }
.field-label { font-size: var(--fs-sm); color: var(--steel-300); display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.field-label .req { color: var(--signal); }
.field-hint { font-size: var(--fs-xs); color: var(--steel-400); line-height: 1.45; }
.field-hint.is-warn { color: var(--warn); }
.field-error { font-size: var(--fs-sm); color: var(--danger); }
.form { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

.input, .select, .textarea {
  width: 100%;
  min-height: 42px;
  padding: 0 13px;
  border-radius: var(--r-md);
  border: 1px solid var(--hair-strong);
  background: rgba(7, 7, 13, 0.55);
  color: var(--steel-100);
  font-size: 15px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background-color var(--t-fast);
}
.input::placeholder, .textarea::placeholder { color: var(--steel-500); }
.input:hover, .select:hover, .textarea:hover { border-color: rgba(232, 233, 237, 0.24); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: rgba(168, 184, 224, 0.75); box-shadow: 0 0 0 3px rgba(168, 184, 224, 0.16); background: rgba(7, 7, 13, 0.72); }
.input[aria-invalid='true'], .textarea[aria-invalid='true'] { border-color: rgba(232, 180, 180, 0.6); }
.input:disabled { opacity: 0.55; }
.input-sm { min-height: 34px; font-size: 14px; border-radius: 10px; padding: 0 10px; }
.select {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a0a1ae' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
}
.select option { background: #14151f; color: var(--steel-100); }
input[type='date'].input, input[type='datetime-local'].input { padding-right: 10px; }
input[type='date']::-webkit-calendar-picker-indicator, input[type='datetime-local']::-webkit-calendar-picker-indicator { filter: invert(0.75); cursor: pointer; }
.textarea { padding: 11px 13px; min-height: 92px; resize: vertical; line-height: 1.55; }

.input-group { position: relative; display: flex; align-items: center; }
.input-group > .input { padding-right: 44px; }
.input-group > .icon-btn { position: absolute; right: 3px; }
.input-icon { position: relative; display: block; }
.input-icon > .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--steel-400); pointer-events: none; width: 16px; height: 16px; }
.input-icon > .input { padding-left: 38px; }
.prefix-input { position: relative; }
.prefix-input > span { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--steel-400); pointer-events: none; }
.prefix-input > .input { padding-left: 28px; }

/* six-box verification code */
.code-input { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.code-input input {
  width: 100%;
  height: 54px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  border-radius: 12px;
  border: 1px solid var(--hair-strong);
  background: rgba(7, 7, 13, 0.6);
  color: var(--steel-50);
  caret-color: var(--signal);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast) var(--spring);
}
.code-input input:focus { outline: none; border-color: rgba(168, 184, 224, 0.8); box-shadow: 0 0 0 3px rgba(168, 184, 224, 0.18); transform: translateY(-1px); }
.code-input input.is-filled { border-color: rgba(168, 184, 224, 0.45); }

/* password strength */
.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 2px; }
.strength i { height: 3px; border-radius: 3px; background: var(--hair-strong); transition: background-color var(--t) var(--ease); }
.strength[data-score='1'] i:nth-child(-n+1) { background: var(--danger); }
.strength[data-score='2'] i:nth-child(-n+2) { background: var(--warn); }
.strength[data-score='3'] i:nth-child(-n+3) { background: var(--signal); }
.strength[data-score='4'] i { background: var(--ok); }

/* chips (toggle / filter) */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: var(--r-full);
  border: 1px solid var(--hair-strong);
  background: rgba(7, 7, 13, 0.45);
  font-size: 13.5px;
  color: var(--steel-300);
  transition: color var(--t-fast), border-color var(--t-fast), background-color var(--t-fast), transform var(--t-fast) var(--spring);
  cursor: pointer;
  user-select: none;
}
.chip:hover { color: var(--steel-100); border-color: rgba(232, 233, 237, 0.28); }
.chip:active { transform: scale(0.96); }
.chip.is-on, .chip[aria-pressed='true'] { color: var(--steel-50); border-color: rgba(168, 184, 224, 0.55); background: rgba(168, 184, 224, 0.13); }
.chip .icon { width: 14px; height: 14px; }
.chip .count { color: var(--steel-400); font-size: 12px; }
.chip.is-on .count { color: var(--signal); }
.chip-x { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: -6px; border-radius: 50%; color: var(--steel-400); }
.chip-x:hover { background: var(--wash-strong); color: var(--steel-100); }

/* tags (static labels) */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  border-radius: 7px;
  border: 1px solid var(--hair);
  background: var(--wash);
  font-size: 12px;
  color: var(--steel-300);
  white-space: nowrap;
}
.tag .icon { width: 12px; height: 12px; }

/* status pills */
.pill {
  --c: var(--steel-400);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px 0 8px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
  white-space: nowrap;
}
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px color-mix(in srgb, var(--c) 70%, transparent); }
.pill.no-dot::before { display: none; }
.pill[data-s='identified'] { --c: var(--st-identified); }
.pill[data-s='qualifying'] { --c: var(--st-qualifying); }
.pill[data-s='drafting'] { --c: var(--st-drafting); }
.pill[data-s='submitted'] { --c: var(--st-submitted); }
.pill[data-s='won'] { --c: var(--st-won); }
.pill[data-s='lost'] { --c: var(--st-lost); }
.pill[data-s='no_bid'] { --c: var(--st-no_bid); }
.pill[data-s='ready'], .pill[data-s='met'], .pill[data-s='approved'], .pill[data-s='bid'] { --c: var(--ok); }
.pill[data-s='processing'], .pill[data-s='drafting'], .pill[data-s='review'] { --c: var(--signal); }
.pill[data-s='partial'], .pill[data-s='needs_ocr'], .pill[data-s='consider'], .pill[data-s='expiring'] { --c: var(--warn); }
.pill[data-s='gap'], .pill[data-s='failed'], .pill[data-s='expired'], .pill[data-s='no_bid_rec'] { --c: var(--danger); }
.pill[data-s='todo'], .pill[data-s='unknown'], .pill[data-s='na'] { --c: var(--steel-400); }
.pill[data-s='processing']::before { animation: pulse-ring 1.4s var(--ease) infinite; }

.badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-display);
  color: var(--steel-100);
  background: var(--wash-strong);
  border: 1px solid var(--hair);
}
.badge-signal { color: var(--void); background: var(--signal); border-color: transparent; }
.badge-ai {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--signal);
  background: rgba(168, 184, 224, 0.1);
  border-color: rgba(168, 184, 224, 0.3);
}

.kbd {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 5px;
  border: 1px solid var(--hair-strong);
  border-bottom-width: 2px;
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--steel-300);
}

/* ── Cards ────────────────────────────────────────────────────────────── */
.card {
  --mx: 50%;
  --my: 0%;
  position: relative;
  border-radius: var(--r-xl);
  border: 1px solid var(--hair);
  background:
    radial-gradient(600px circle at var(--mx) var(--my), rgba(168, 184, 224, 0.045), transparent 40%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.008)),
    var(--panel);
  backdrop-filter: blur(22px) saturate(1.15);
  -webkit-backdrop-filter: blur(22px) saturate(1.15);
  box-shadow: var(--shadow-1);
}
.card-pad { padding: 20px; }
.card-pad-lg { padding: 26px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; min-height: 30px; }
.card-head h2, .card-head h3 { font-size: 16px; font-weight: 500; }
.card-head .sub { color: var(--steel-400); font-size: var(--fs-sm); }
.card-interactive { cursor: pointer; transition: transform var(--t) var(--ease), border-color var(--t-fast), box-shadow var(--t) var(--ease); }
.card-interactive:hover { transform: translateY(-2px); border-color: var(--hair-strong); box-shadow: var(--shadow-2); }
.card-interactive:active { transform: translateY(0) scale(0.995); }
.card-section + .card-section { border-top: 1px solid var(--hair); }

.divider { height: 1px; background: var(--hair); border: 0; margin: 16px 0; }

/* ── Tabs & segmented ─────────────────────────────────────────────────── */
.tabs { position: relative; display: flex; gap: 2px; padding: 4px; border-radius: 14px; border: 1px solid var(--hair-strong); background: rgba(7, 7, 13, 0.5); width: fit-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 14.5px;
  color: var(--steel-400);
  transition: color var(--t-fast);
}
.tab .icon { width: 15px; height: 15px; }
.tab:hover { color: var(--steel-100); }
.tab[aria-selected='true'] { color: var(--steel-50); }
.tab .badge { height: 18px; min-width: 18px; font-size: 10.5px; }
.tabs .glider {
  position: absolute;
  z-index: 0;
  top: 4px;
  left: 0;
  height: calc(100% - 8px);
  border-radius: 10px;
  background: rgba(168, 184, 224, 0.14);
  box-shadow: inset 0 0 0 1px rgba(168, 184, 224, 0.34);
  transition: transform var(--t) var(--ease), width var(--t) var(--ease);
  pointer-events: none;
}
.tabs-line { display: flex; gap: 22px; border-bottom: 1px solid var(--hair); overflow-x: auto; scrollbar-width: none; }
.tabs-line .tab { padding: 0; border-radius: 0; min-height: 44px; }
.tabs-line .tab[aria-selected='true'] { box-shadow: inset 0 -2px 0 var(--signal); }

.segmented { display: inline-flex; padding: 3px; border-radius: 12px; border: 1px solid var(--hair-strong); background: rgba(7, 7, 13, 0.5); }
.seg { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 9px; font-size: 13.5px; color: var(--steel-400); transition: color var(--t-fast), background-color var(--t-fast); }
.seg .icon { width: 15px; height: 15px; }
.seg:hover { color: var(--steel-100); }
.seg.is-on, .seg[aria-pressed='true'] { color: var(--steel-50); background: rgba(168, 184, 224, 0.14); box-shadow: inset 0 0 0 1px rgba(168, 184, 224, 0.34); }

/* ── Switch & checks ──────────────────────────────────────────────────── */
.switch { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; position: relative; }
.switch input { position: absolute; opacity: 0; width: 44px; height: 26px; cursor: pointer; margin: 0; }
.switch-track { flex-shrink: 0; width: 44px; height: 26px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); border: 1px solid var(--hair-strong); position: relative; transition: background-color var(--t), border-color var(--t); }
.switch-thumb { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(180deg, #f4f5f8, #b9bdca); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); transition: transform var(--t) var(--spring); }
.switch input:checked + .switch-track { background: rgba(168, 184, 224, 0.38); border-color: rgba(168, 184, 224, 0.6); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--signal); outline-offset: 2px; }
.switch-text { display: grid; gap: 2px; font-size: 14.5px; color: var(--steel-100); }
.switch-text small { font-size: 13px; color: var(--steel-400); }

.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: var(--steel-200); }
.check input { appearance: none; width: 18px; height: 18px; border-radius: 5px; border: 1px solid var(--hair-bright); background: rgba(7, 7, 13, 0.6); display: grid; place-items: center; transition: background-color var(--t-fast), border-color var(--t-fast); flex-shrink: 0; cursor: pointer; margin: 0; }
.check input::after { content: ''; width: 9px; height: 5px; border: 2px solid var(--void); border-top: 0; border-right: 0; transform: rotate(-45deg) scale(0); margin-top: -2px; transition: transform var(--t-fast) var(--spring); }
.check input:checked { background: var(--signal); border-color: var(--signal); }
.check input:checked::after { transform: rotate(-45deg) scale(1); }
.check input:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }

/* ── Progress ─────────────────────────────────────────────────────────── */
.bar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--signal-deep), var(--signal)); transition: width 0.9s var(--ease); }
.bar.is-ok > i { background: linear-gradient(90deg, var(--ok-deep), var(--ok)); }
.bar.is-warn > i { background: linear-gradient(90deg, var(--warn-deep), var(--warn)); }
.bar.is-danger > i { background: linear-gradient(90deg, var(--danger-deep), var(--danger)); }
.bar-sm { height: 4px; }

.ring { position: relative; display: inline-grid !important; place-items: center; flex-shrink: 0; }
.ring svg { transform: rotate(-90deg); }
.ring .track { stroke: rgba(255, 255, 255, 0.07); }
.ring .value { stroke: var(--signal); stroke-linecap: round; transition: stroke-dashoffset 1.1s var(--ease); }
.ring.is-ok .value { stroke: var(--ok); }
.ring.is-warn .value { stroke: var(--warn); }
.ring.is-danger .value { stroke: var(--danger); }
.ring > span { position: absolute !important; display: block !important; margin: 0 !important; font-family: var(--font-display); font-variant-numeric: tabular-nums; color: var(--steel-100); font-size: 13px; line-height: 1; text-align: center; }
.ring > span small { display: block; font-size: 9.5px; color: var(--steel-400); margin-top: 2px; letter-spacing: 0.04em; }

/* ── Avatars ──────────────────────────────────────────────────────────── */
.avatar {
  --hue: 225;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #0b0c12;
  background: linear-gradient(140deg, hsl(var(--hue) 30% 88%), hsl(var(--hue) 22% 62%));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 2px 8px rgba(0, 0, 0, 0.35);
}
.avatar-sm { width: 24px; height: 24px; font-size: 10px; }
.avatar-lg { width: 44px; height: 44px; font-size: 15px; }
.avatars { display: flex; }
.avatars .avatar { box-shadow: 0 0 0 2px var(--graphite); }
.avatars .avatar + .avatar { margin-left: -8px; }

/* ── Notices & banners ────────────────────────────────────────────────── */
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 12px; border: 1px solid rgba(168, 184, 224, 0.28); background: rgba(168, 184, 224, 0.07); color: var(--steel-200); font-size: 14px; line-height: 1.5; }
.notice .icon { margin-top: 2px; color: var(--signal); }
.notice--warn { border-color: rgba(227, 207, 159, 0.32); background: rgba(227, 207, 159, 0.07); }
.notice--warn .icon { color: var(--warn); }
.notice--error { border-color: rgba(232, 180, 180, 0.35); background: rgba(232, 180, 180, 0.07); color: var(--danger); }
.notice--error .icon { color: var(--danger); }
.notice--ok { border-color: rgba(169, 203, 185, 0.32); background: rgba(169, 203, 185, 0.07); }
.notice--ok .icon { color: var(--ok); }

/* ── Empty states & skeletons ─────────────────────────────────────────── */
.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 44px 20px; color: var(--steel-400); }
.empty-art { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 20px; border: 1px solid var(--hair-strong); background: radial-gradient(circle at 30% 20%, rgba(168, 184, 224, 0.18), rgba(255, 255, 255, 0.02) 70%); color: var(--steel-200); box-shadow: var(--shadow-1); margin-bottom: 6px; }
.empty-art .icon { width: 28px; height: 28px; }
.empty h3 { color: var(--steel-100); font-size: 17px; }
.empty p { max-width: 42ch; font-size: 14px; }
.empty .row-wrap { justify-content: center; margin-top: 6px; }

.skeleton {
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.035) 25%, rgba(255, 255, 255, 0.08) 37%, rgba(255, 255, 255, 0.035) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}
.sk-line { height: 12px; margin: 8px 0; }
.sk-line.w-60 { width: 60%; } .sk-line.w-40 { width: 40%; } .sk-line.w-80 { width: 80%; }
.sk-block { height: 120px; }

/* ── Overlays: dialog, sheet, menu, tooltip, toast ────────────────────── */
.scrim {
  position: fixed;
  inset: 0;
  z-index: var(--z-sheet);
  background: rgba(4, 4, 8, 0.56);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity var(--t) var(--ease);
}
.scrim.is-open { opacity: 1; }

.dialog {
  position: fixed;
  z-index: calc(var(--z-sheet) + 1);
  left: 50%;
  top: 50%;
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  overflow: auto;
  transform: translate(-50%, -46%) scale(0.97);
  opacity: 0;
  border-radius: var(--r-xl);
  border: 1px solid var(--hair-strong);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01)), var(--panel-solid);
  box-shadow: var(--shadow-3);
  padding: 24px;
  transition: transform var(--t) var(--ease), opacity var(--t) var(--ease);
}
.dialog.is-open { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.dialog h2 { font-size: 19px; margin-bottom: 8px; }
.dialog p { color: var(--steel-300); font-size: 14.5px; }
.dialog .form-actions { margin-top: 22px; }
.dialog-wide { width: min(720px, calc(100vw - 32px)); }

.sheet {
  position: fixed;
  z-index: calc(var(--z-sheet) + 1);
  top: var(--inset);
  right: var(--inset);
  bottom: var(--inset);
  width: min(560px, calc(100vw - 2 * var(--inset)));
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-frame);
  border: 1px solid var(--hair-strong);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)), var(--panel-solid);
  box-shadow: var(--shadow-3);
  transform: translateX(calc(100% + 24px));
  transition: transform var(--t-slow) var(--ease);
  overflow: hidden;
}
.sheet.is-open { transform: none; }
.sheet-wide { width: min(860px, calc(100vw - 2 * var(--inset))); }
.sheet-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid var(--hair); }
.sheet-head h2 { font-size: 19px; }
.sheet-head .sub { color: var(--steel-400); font-size: 13.5px; margin-top: 3px; }
.sheet-body { flex: 1; overflow: auto; padding: 20px 22px; overscroll-behavior: contain; }
.sheet-foot { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding: 14px 22px; border-top: 1px solid var(--hair); background: rgba(7, 7, 13, 0.35); }
.sheet-grip { display: none; }

@media (max-width: 720px) {
  .sheet {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: calc(100dvh - 40px - var(--safe-t));
    border-radius: 22px 22px 0 0;
    border-bottom: 0;
    transform: translateY(100%);
    padding-bottom: var(--safe-b);
  }
  .sheet.is-open { transform: none; }
  .sheet.is-dragging { transition: none; }
  .sheet-grip { display: block; width: 40px; height: 5px; border-radius: 5px; background: var(--hair-bright); margin: 8px auto 0; flex-shrink: 0; }
  .dialog { padding: 20px; }
}

.menu {
  position: fixed;
  z-index: calc(var(--z-sheet) + 5);
  min-width: 200px;
  max-width: min(320px, calc(100vw - 24px));
  max-height: min(420px, 70dvh);
  overflow: auto;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--hair-strong);
  background: rgba(16, 17, 26, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--shadow-3);
  transform-origin: var(--origin, top left);
  animation: pop var(--t) var(--ease) both;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  padding: 0 11px;
  border-radius: 9px;
  font-size: 14px;
  color: var(--steel-200);
  text-align: left;
}
.menu-item .icon { width: 16px; height: 16px; color: var(--steel-400); }
.menu-item:hover, .menu-item.is-active, .menu-item:focus-visible { background: var(--wash-strong); color: var(--steel-50); outline: none; }
.menu-item:hover .icon { color: var(--steel-100); }
.menu-item.is-danger { color: var(--danger); }
.menu-item.is-danger .icon { color: var(--danger); }
.menu-item .kbd { margin-left: auto; }
.menu-item .check-mark { margin-left: auto; color: var(--signal); }
.menu-sep { height: 1px; background: var(--hair); margin: 5px 4px; }
.menu-label { padding: 8px 11px 4px; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--steel-500); }

.tooltip {
  position: fixed;
  z-index: var(--z-tooltip);
  max-width: 320px;
  padding: 8px 11px;
  border-radius: 10px;
  border: 1px solid var(--hair-strong);
  background: rgba(16, 17, 26, 0.98);
  box-shadow: var(--shadow-3);
  font-size: 13px;
  color: var(--steel-200);
  pointer-events: none;
  animation: fade 140ms var(--ease) both;
}

.toasts {
  position: fixed;
  z-index: var(--z-toast);
  right: calc(var(--inset) + 18px);
  bottom: calc(var(--inset) + 18px);
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid var(--hair-strong);
  background: rgba(16, 17, 26, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-3);
  animation: toast-in 0.5s var(--spring) both;
}
.toast.is-leaving { animation: toast-out 0.28s var(--ease) both; }
.toast .t-icon { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; background: rgba(168, 184, 224, 0.13); color: var(--signal); }
.toast.is-ok .t-icon { background: rgba(169, 203, 185, 0.14); color: var(--ok); }
.toast.is-error .t-icon { background: rgba(232, 180, 180, 0.14); color: var(--danger); }
.toast.is-warn .t-icon { background: rgba(227, 207, 159, 0.14); color: var(--warn); }
.toast .t-body { flex: 1; min-width: 0; padding-top: 3px; }
.toast .t-title { color: var(--steel-50); font-weight: 500; font-size: 14.5px; }
.toast .t-text { color: var(--steel-300); font-size: 13.5px; margin-top: 2px; }
.toast .t-action { margin-top: 8px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px); } }
@media (max-width: 720px) {
  .toasts { left: 50%; right: auto; transform: translateX(-50%); top: calc(var(--safe-t) + 14px); bottom: auto; }
  @keyframes toast-in { from { opacity: 0; transform: translateY(-16px) scale(0.96); } to { opacity: 1; transform: none; } }
}

/* ── Drop zone ────────────────────────────────────────────────────────── */
.dropzone {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 30px 20px;
  border-radius: var(--r-xl);
  border: 1.5px dashed rgba(168, 184, 224, 0.32);
  background: radial-gradient(ellipse at 50% 0%, rgba(168, 184, 224, 0.08), transparent 70%), rgba(7, 7, 13, 0.35);
  text-align: center;
  transition: border-color var(--t-fast), background-color var(--t-fast), transform var(--t) var(--spring);
  cursor: pointer;
}
.dropzone:hover { border-color: rgba(168, 184, 224, 0.6); }
.dropzone.is-over { border-color: var(--signal); background-color: rgba(168, 184, 224, 0.08); transform: scale(1.01); }
.dropzone .dz-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(168, 184, 224, 0.12); color: var(--signal); }
.dropzone h3 { font-size: 16px; }
.dropzone p { font-size: 13.5px; color: var(--steel-400); }

/* ── AI orb (agent status / thinking) ─────────────────────────────────── */
.orb {
  --size: 28px;
  position: relative;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  flex-shrink: 0;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 32%),
    conic-gradient(from var(--a, 0deg), #6b7088, #e9ecf5, #8fa0cc, #f6f7fb, #5b5f75, #c9d2ee, #6b7088);
  box-shadow: inset 0 -3px 8px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.12), 0 4px 16px rgba(0, 0, 0, 0.4);
}
.orb.is-thinking { animation: orb-spin 2.4s linear infinite, orb-glow 1.6s ease-in-out infinite; }
@property --a { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes orb-spin { to { --a: 360deg; } }
@keyframes orb-glow { 50% { box-shadow: inset 0 -3px 8px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.2), 0 0 26px rgba(168, 184, 224, 0.55); } }
.orb-sm { --size: 18px; }
.orb-lg { --size: 54px; }

/* ── Citations ────────────────────────────────────────────────────────── */
.cite {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 18px;
  padding: 0 5px;
  margin: 0 1px;
  border-radius: 6px;
  vertical-align: 1px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  color: var(--signal);
  background: rgba(168, 184, 224, 0.13);
  border: 1px solid rgba(168, 184, 224, 0.3);
  cursor: pointer;
  transition: background-color var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--spring);
  animation: pop 0.4s var(--ease) both;
}
.cite:hover, .cite.is-active { background: var(--signal); color: var(--void); transform: translateY(-1px); }
.cite-pop { width: min(380px, calc(100vw - 24px)); padding: 14px 15px; }
.cite-pop .doc { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.cite-pop .doc strong { color: var(--steel-50); font-weight: 500; font-size: 14px; }
.cite-pop blockquote { margin: 0; padding: 9px 12px; border-left: 2px solid var(--signal); background: rgba(168, 184, 224, 0.06); border-radius: 0 9px 9px 0; color: var(--steel-200); font-size: 13.5px; line-height: 1.55; }
.source-list { display: grid; gap: 8px; }
.source-item { display: flex; gap: 10px; align-items: center; padding: 9px 11px; border-radius: 11px; border: 1px solid var(--hair); background: var(--wash); font-size: 13.5px; text-align: left; width: 100%; transition: border-color var(--t-fast), background-color var(--t-fast); }
.source-item:hover { border-color: rgba(168, 184, 224, 0.4); background: rgba(168, 184, 224, 0.06); }
.source-item .n { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-family: var(--font-display); font-size: 11.5px; font-weight: 600; color: var(--signal); background: rgba(168, 184, 224, 0.12); flex-shrink: 0; }

/* ── Rich text (AI answers, bid text) ─────────────────────────────────── */
.prose { color: var(--steel-200); font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.prose > * + * { margin-top: 0.75em; }
.prose h3, .prose h4, .prose h5, .prose h6 { color: var(--steel-50); font-size: 15.5px; margin-top: 1.1em; }
.prose strong { color: var(--steel-50); font-weight: 600; }
.prose em { color: var(--steel-100); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.3em; }
.prose li::marker { color: var(--steel-500); }
.prose blockquote { border-left: 2px solid var(--hair-bright); padding-left: 12px; color: var(--steel-300); }
.prose code { font-family: var(--font-mono); font-size: 0.88em; padding: 1px 5px; border-radius: 5px; background: var(--wash-strong); }
.prose pre { padding: 12px; border-radius: 10px; background: rgba(0, 0, 0, 0.35); overflow: auto; }
.prose pre code { background: none; padding: 0; }
.prose a { color: var(--signal); text-decoration: underline; text-underline-offset: 2px; }
.prose .md-table { overflow-x: auto; }
.prose table { width: 100%; font-size: 13.5px; border: 1px solid var(--hair); border-radius: 10px; }
.prose th, .prose td { padding: 7px 10px; border-bottom: 1px solid var(--hair); text-align: left; vertical-align: top; }
.prose th { color: var(--steel-100); font-weight: 500; background: var(--wash); }
.prose mark.needed { background: rgba(227, 207, 159, 0.16); color: var(--warn); border: 1px dashed rgba(227, 207, 159, 0.5); border-radius: 6px; padding: 0 5px; font-size: 0.95em; }
.prose p:empty { display: none; }

/* ── Tables ───────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--r-lg); }
.table { width: 100%; font-size: 14px; }
.table th { position: sticky; top: 0; text-align: left; font-weight: 500; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--steel-400); padding: 10px 12px; border-bottom: 1px solid var(--hair); background: rgba(13, 14, 22, 0.9); white-space: nowrap; }
.table th button { display: inline-flex; gap: 4px; align-items: center; text-transform: inherit; letter-spacing: inherit; color: inherit; }
.table th button:hover { color: var(--steel-100); }
.table td { padding: 12px; border-bottom: 1px solid var(--hair); vertical-align: middle; }
.table tbody tr { transition: background-color var(--t-fast); }
.table tbody tr:hover { background: var(--wash); }
.table tbody tr.is-link { cursor: pointer; }

/* ── Misc ─────────────────────────────────────────────────────────────── */
.kv { display: grid; grid-template-columns: minmax(110px, 34%) 1fr; gap: 9px 14px; font-size: 14px; }
.kv dt { color: var(--steel-400); }
.kv dd { color: var(--steel-100); min-width: 0; overflow-wrap: anywhere; }
.stat-big { font-family: var(--font-display); font-size: 30px; font-weight: 500; color: var(--steel-50); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.file-ic { position: relative; width: 38px; height: 46px; flex-shrink: 0; border-radius: 6px 12px 6px 6px; background: linear-gradient(160deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03)); border: 1px solid var(--hair-strong); display: grid; place-items: end center; padding-bottom: 6px; font-family: var(--font-display); font-size: 9.5px; font-weight: 700; letter-spacing: 0.05em; color: var(--steel-200); }
.file-ic::before { content: ''; position: absolute; top: -1px; right: -1px; width: 12px; height: 12px; border-radius: 0 11px 0 6px; background: rgba(255, 255, 255, 0.14); border-left: 1px solid var(--hair-strong); border-bottom: 1px solid var(--hair-strong); }
.file-ic[data-kind='pdf'] { color: #f0b6b6; }
.file-ic[data-kind='docx'] { color: #a8c4f0; }
.file-ic[data-kind='xlsx'], .file-ic[data-kind='csv'] { color: #a9d4b6; }
.file-ic.is-scanning::after { content: ''; position: absolute; left: 0; right: 0; height: 30%; top: 0; border-radius: 6px; background: linear-gradient(180deg, transparent, rgba(168, 184, 224, 0.55), transparent); animation: scan 1.2s var(--ease-io) infinite; }
@keyframes scan { 0% { transform: translateY(-40%); } 100% { transform: translateY(260%); } }

.sparks { position: fixed; inset: 0; pointer-events: none; z-index: var(--z-toast); }
.pill[data-s='mandatory'] { --c: #e8b4b4; }
.pill[data-s='scored'] { --c: var(--signal); }
.pill[data-s='desirable'] { --c: var(--steel-300); }
.pill[data-s='info'], .pill[data-s='draft'] { --c: var(--steel-400); }
.pill[data-s='final'] { --c: var(--ok); }
.badge-warn { color: var(--warn); background: rgba(227, 207, 159, 0.12); border-color: rgba(227, 207, 159, 0.3); }
.pill-btn { display: inline-flex; align-items: center; gap: 4px; border-radius: 99px; padding-right: 4px; transition: background-color var(--t-fast); }
.pill-btn:hover { background: var(--wash-strong); }
.pill-btn > .icon { color: var(--steel-500); }
