/* ==========================================================================
   AwardTape Terminal — Institutional Pro Analytics Workspace (terminal.css)
   High-Contrast Daylight Institutional Theme
   ========================================================================== */

body.term {
  --bg: #FAF8F5;
  --bg2: #FFFFFF;
  --bg-hover: #F5F2EB;
  --ink: #111827 !important;
  --paper: #FAF8F5 !important;
  --panel: #FFFFFF !important;
  --line: #E2DDD5 !important;
  --rule: #D5CFC4 !important;
  --muted: #4B5563 !important;
  --tape: #0F2942 !important;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #FAF8F5 !important;
  color: #111827 !important;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: var(--ui);
  font-size: 15.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.term section#app, .tmain > section {
  padding: 0 !important;
  border-top: 0 !important;
  margin: 0 !important;
}
#msg:empty { display: none; }

/* Top Workspace Bar */
.tbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #FFFFFF;
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.tbar .in, .tbar-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  flex-wrap: wrap;
}
.tbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  flex-wrap: wrap;
}
.tbar-brand, .tbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.tbar .brand img { display: block; height: 28px; width: auto; }
.tbar .prod {
  font: 700 12.5px/1 var(--ui);
  color: #0F2942;
  padding: 5px 10px;
  border: 1px solid #BFDBFE;
  border-radius: 5px;
  background: #EFF6FF;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.tbar-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 13px/1 var(--ui);
  color: var(--muted);
}
.tbar-live i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0D6832;
  display: inline-block;
}

/* Mode Switcher Tabs */
.tnav-modes, .tbar-modes {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.tnav-modes a, .tbar-modes a {
  font: 500 14.5px/1.3 var(--ui);
  color: var(--muted);
  text-decoration: none;
  padding: 8px 13px;
  border-radius: 6px;
  transition: color 0.12s, background 0.12s;
  white-space: nowrap;
}
.tnav-modes a:hover, .tbar-modes a:hover {
  color: var(--ink);
  background: #F3EFEA;
}
.tnav-modes a.on, .tbar-modes a.on {
  color: #0F2942;
  background: #EAE4D8;
  font-weight: 600;
}

/* Right Utility Links */
.tbar-util {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tbar-util a {
  font: 500 14px/1.2 var(--ui);
  color: var(--muted);
  padding: 7px 11px;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
}
.tbar-util a:hover, .tbar-util a.on {
  color: #0F2942;
  background: #F3EFEA;
}

/* Main Workspace Container */
.tmain {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 24px 48px;
  box-sizing: border-box;
}

/* Starter Strip */
.starter-strip {
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-left: 4px solid #0F2942;
  border-radius: 8px;
  padding: 12px 16px;
  margin: 0 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 14.5px;
  color: var(--muted);
}
.starter-strip b { color: var(--ink); font-weight: 700; }
.starter-strip code { font-family: var(--mono); font-size: 13.5px; color: #0F2942; background: #F3EFEA; padding: 2px 6px; border-radius: 4px; }
.starter-strip a { color: #0F3D75; text-decoration: none; font-weight: 600; }
.starter-strip a:hover { text-decoration: underline; }

/* Omni Search & Filter Bar */
.omni {
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.omni-form { margin: 0; }
.omni-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.omni-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 400px;
  min-width: 0;
  position: relative;
}
.omni-input-wrap input[type="search"] {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 8px 14px;
  background: #FAF8F5;
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 6px;
  font: 400 15.5px/1.3 var(--ui);
}
.omni-input-wrap input[type="search"]:focus {
  outline: 2px solid #1D4ED8;
  border-color: #1D4ED8;
  background: #FFFFFF;
}
.omni-btn, .omni-clear {
  height: 42px;
  padding: 0 16px;
  white-space: nowrap;
  cursor: pointer;
  font-size: 14.5px;
}
#omni-clear { display: none; }
#omni-clear.vis { display: inline-flex; }

/* Filter Pills */
.omni-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.ochip {
  appearance: none;
  border: 1px solid var(--rule);
  background: #FAF8F5;
  color: var(--muted);
  font: 600 13.5px/1.3 var(--ui);
  padding: 8px 13px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s;
}
.ochip:hover { color: #0F2942; border-color: #9CA3AF; background: #FFFFFF; }
.ochip.on {
  background: #0F2942;
  color: #FFFFFF;
  border-color: #0F2942;
  font-weight: 600;
}

.omni-snap, .omni-pulse-compact {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  font-size: 14px;
  color: var(--muted);
}
.omni-snap:empty, .omni-pulse-compact:empty { display: none; }
.omni-snap b, .omni-pulse-compact b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.omni-snap a, .omni-pulse-compact a {
  color: #0F3D75;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}
.omni-snap a:hover, .omni-pulse-compact a:hover { text-decoration: underline; }

/* View Header */
.desk-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0 16px;
}
.desk-head h1 {
  font: 700 22px/1.3 var(--ui);
  margin: 0;
  letter-spacing: -0.015em;
  color: #0F172A;
}
.desk-sub {
  font: 400 15px/1.5 var(--ui);
  color: var(--muted);
  margin: 4px 0 0;
}
.desk-meta {
  font: 500 14px/1.4 var(--ui);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.desk-meta b { color: var(--ink); }

/* Sub-section filter tabs */
.subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.subtab {
  appearance: none;
  border: 1px solid var(--rule);
  background: #FFFFFF;
  color: var(--muted);
  font: 600 14px/1.3 var(--ui);
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
}
.subtab:hover { color: #0F2942; }
.subtab.on {
  border-color: #0F2942;
  color: #FFFFFF;
  background: #0F2942;
}

/* Status Tags */
.t-trig {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 5px;
  font: 600 12.5px/1.3 var(--ui);
  white-space: nowrap;
}
.t-trig.subcontract { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.t-trig.sole_source { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }
.t-trig.recompete { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }
.t-trig.idiq { background: #F5F3FF; color: #5B21B6; border: 1px solid #DDD6FE; }
.t-trig.buyer_signal { background: #F3EFEA; color: #374151; border: 1px solid #D5CFC4; }

.t-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.t-tag {
  display: inline-block;
  font: 500 12.5px/1.3 var(--mono);
  padding: 2px 7px;
  border-radius: 4px;
  background: #F3EFEA;
  border: 1px solid var(--line);
  color: var(--muted);
}
.t-tag.spec { color: #1E40AF; border-color: #BFDBFE; background: #EFF6FF; }

.clamp1, .clamp2 {
  line-height: 1.5;
  color: #1F2937;
}

/* Institutional Data Tables */
body.term .tablewrap {
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
body.term table.ent {
  min-width: 0 !important;
  width: 100% !important;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
body.term table.ent th {
  background: #F4F1EA;
  padding: 12px 14px;
  font: 600 13.5px/1.3 var(--ui);
  color: #374151;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  white-space: nowrap;
}
body.term table.ent th.num, body.term table.ent td.num { text-align: right; }
body.term table.ent td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  font-size: 14.5px;
  color: #111827 !important;
}
body.term table.ent tr:last-child td { border-bottom: 0; }
body.term table.ent tbody tr.opp-row {
  cursor: pointer;
  transition: background 0.1s;
}
body.term table.ent tbody tr:hover {
  background: #FAF7F0;
}
body.term table.ent td b, body.term table.ent td strong { color: #0F172A !important; font-weight: 700; }
body.term table.ent td a:not(.ract) { color: #0F3D75 !important; text-decoration: none; font-weight: 600; }
body.term table.ent td a:not(.ract):hover { text-decoration: underline; }

.ract {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 5px;
  font: 600 13px/1.3 var(--ui);
  background: #FAF8F5 !important;
  border: 1px solid var(--rule) !important;
  color: #0F2942 !important;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.ract:hover { border-color: #0F2942 !important; background: #EAE4D8 !important; }
.ract.hi {
  background: #EFF6FF !important;
  border-color: #BFDBFE !important;
  color: #1E40AF !important;
}

/* Preview Upgrade Bar */
.tp-upgrade-bar {
  margin-top: 18px;
  padding: 18px 22px;
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-left: 4px solid #0F2942;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 15px;
}

/* Right-Hand Detail Drawer */
.t-drawer[hidden] { display: none !important; }
.t-drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  justify-content: flex-end;
}
.t-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(2px);
}
.t-drawer-panel {
  position: relative;
  z-index: 1;
  width: min(600px, 100vw);
  height: 100%;
  background: #FFFFFF;
  border-left: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: -8px 0 32px rgba(15, 23, 42, 0.15);
}
.t-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: #FAF8F5;
}
.t-drawer-close {
  appearance: none;
  border: 1px solid var(--rule);
  background: #FFFFFF;
  color: var(--ink);
  font: 600 13.5px/1 var(--ui);
  padding: 7px 12px;
  border-radius: 5px;
  cursor: pointer;
}
.t-drawer-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.t-drawer-body h2 {
  font: 700 19px/1.35 var(--ui);
  margin: 0;
  color: #0F172A;
}
.td-kv {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  background: #FAF8F5;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 14px;
}
.td-kv div span {
  display: block;
  font: 600 12.5px/1.3 var(--ui);
  color: var(--muted);
}
.td-kv div b {
  display: block;
  font: 600 14.5px/1.4 var(--mono);
  color: var(--ink);
  margin-top: 2px;
  word-break: break-word;
}
.td-full {
  font-size: 15px;
  line-height: 1.65;
  color: #1F2937;
  background: #FAF8F5;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  max-height: 300px;
  overflow-y: auto;
}
.td-play {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 14.5px;
  line-height: 1.55;
  color: #1E3A8A;
}
.td-play b {
  color: #0F2942;
  display: block;
  margin-bottom: 4px;
  font: 700 13.5px/1.3 var(--ui);
}
.td-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Auth & Account Boxes */
.authbox, .narrow {
  max-width: 480px;
  margin: 36px auto;
  padding: 28px;
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}
.authbox h1, .narrow h1 { font-size: 24px; margin: 0 0 10px; color: #0F172A; }
.tform { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.tform input[type="email"] {
  background: #FAF8F5;
  color: var(--ink);
  border: 1px solid var(--rule);
  padding: 12px 14px;
  font: 16px/1.3 var(--ui);
  border-radius: 6px;
}
.note { font-size: 14.5px; color: var(--muted); margin-top: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.field label { font: 600 13.5px/1.3 var(--ui); color: var(--muted); }
.field input { background: #FAF8F5; color: var(--ink); border: 1px solid var(--rule); padding: 11px 14px; font: 15.5px/1.3 var(--ui); border-radius: 6px; }
.banner { padding: 12px 16px; border: 1px solid var(--rule); background: #FFFFFF; margin: 0 0 14px; font-size: 14.5px; border-radius: 6px; }
.banner.warn { border-color: #F59E0B; background: #FFFBEB; color: #92400E; }
.banner.bad { border-color: #EF4444; background: #FEF2F2; color: #991B1B; }

.tfoot {
  border-top: 1px solid var(--rule);
  background: #F1EDE4;
  padding: 20px 24px;
  font: 13.5px/1.55 var(--ui);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: space-between;
  width: 100%;
  margin-top: auto;
  box-sizing: border-box;
}
.tfoot a { color: #374151; text-decoration: none; font-weight: 500; }
.tfoot a:hover { color: #0F2942; text-decoration: underline; }

.at-beta {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  margin-left: 4px;
  border-radius: 4px;
  font: 700 10.5px/1.2 var(--mono);
  color: #1E40AF;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  vertical-align: middle;
}
