:root {
  --bg: #f3f0e7;
  --panel: #fffdfa;
  --panel-strong: #f8f5ec;
  --ink: #202725;
  --muted: #65706b;
  --line: #d8d0bf;
  --line-strong: #bbb09b;
  --green: #2e6f50;
  --green-soft: #dbeadf;
  --red: #a43e3e;
  --red-soft: #f2dddd;
  --amber: #b87924;
  --amber-soft: #f4e7cf;
  --blue: #2d6f9f;
  --blue-soft: #dcecf3;
  --teal: #26766e;
  --shadow: 0 18px 50px rgba(57, 48, 35, 0.13);
  --radius: 8px;
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(180deg, var(--bg), #ecefe7);
  color: var(--ink);
}

.site-login-gate {
  position: fixed;
  inset: 34px 0 0;
  z-index: 2000;
  display: none;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at 25% 18%, rgba(45, 111, 159, 0.22), transparent 38%), #0b1016;
}

.site-login-card {
  width: min(520px, 96vw);
  border: 1px solid rgba(249, 209, 42, 0.32);
  border-radius: 12px;
  background: linear-gradient(180deg, #10161f, #0d131c);
  padding: 22px;
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
  color: #f7fbff;
}

.site-login-logo {
  width: 150px;
  height: 150px;
  object-fit: contain;
}

.site-login-card h2 {
  margin: 0;
  font-size: 1.4rem;
  color: #f9d12a;
}

.site-login-form {
  width: min(420px, 100%);
  display: grid;
  gap: 10px;
}

.site-auth-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.9);
}

.site-auth-status span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.site-login-help {
  margin: 0;
  color: #d6deea;
  font-size: 0.86rem;
}

.site-login-form label {
  display: grid;
  gap: 6px;
  text-align: left;
  color: #f3f7ff;
}

.site-login-form input {
  border-color: rgba(143, 183, 228, 0.32);
  background: rgba(11, 19, 30, 0.85);
  color: #f7fbff;
}

body.site-locked .site-login-gate {
  display: grid;
}

body.site-locked .shell {
  filter: blur(2px);
  pointer-events: none;
  user-select: none;
}

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

button {
  cursor: pointer;
}

.classification-bar {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 22px;
  background: #1f2b24;
  color: #f7f1df;
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: uppercase;
}

.shell {
  display: grid;
  min-height: calc(100vh - 34px);
  grid-template-columns: 296px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 34px;
  align-self: start;
  height: calc(100vh - 34px);
  overflow: auto;
  border-right: 1px solid rgba(83, 76, 63, 0.18);
  background: rgba(255, 253, 250, 0.93);
  padding: 24px 18px;
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin-bottom: 28px;
}

.brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand h1,
.brand p,
.topbar h2,
.topbar p,
.panel h3,
.panel p,
.lane h3,
.lane p {
  margin: 0;
}

.brand h1 {
  font-size: 1.02rem;
  line-height: 1.2;
}

.brand p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.85rem;
}

.nav-list {
  display: grid;
  gap: 7px;
}

.nav-item,
.icon-button,
.role-tab,
.layer-toggle,
.mini-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
}

.nav-item {
  justify-content: flex-start;
  width: 100%;
  padding: 9px 11px;
  background: transparent;
  color: #31403b;
  font-weight: 690;
  text-align: left;
}

.nav-item span {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.2;
}

.nav-item svg,
.icon-button svg,
.layer-toggle svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.nav-item:hover,
.nav-item.active {
  border-color: var(--line);
  background: var(--panel-strong);
}

.nav-item.active {
  color: var(--green);
}

.sidebar-block {
  margin-top: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(248, 245, 236, 0.82);
}

.sidebar-block.compact {
  display: grid;
  gap: 5px;
}

.sidebar-block strong {
  font-size: 1rem;
}

.sidebar-block span {
  color: var(--muted);
  font-size: 0.85rem;
}

.block-label,
.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 820;
  text-transform: uppercase;
}

.access-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.access-grid span {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: #35413d;
  font-size: 0.78rem;
  font-weight: 720;
  text-align: center;
}

.workspace {
  min-width: 0;
  padding: 24px;
}

.workflow-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.workflow-chip {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: #2f3c37;
  font-size: 0.83rem;
  font-weight: 780;
  text-align: center;
}

.workflow-chip svg {
  width: 16px;
  height: 16px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(248, 245, 236, 0.92));
  box-shadow: 0 10px 24px rgba(24, 31, 28, 0.08);
}

.topbar h2 {
  margin-top: 4px;
  font-size: 1.65rem;
  line-height: 1.15;
}

.topbar .eyebrow {
  letter-spacing: 0.06em;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.role-switch {
  display: flex;
  min-height: 42px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 250, 0.84);
}

.role-tab {
  min-width: 100px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 780;
}

.role-tab.active {
  background: #203a31;
  color: #f6ebd0;
}

.icon-button {
  padding: 9px 13px;
  border-color: var(--line);
  background: var(--panel);
  color: #26322e;
  font-weight: 760;
  white-space: nowrap;
}

.icon-button.primary {
  border-color: #1f4f3a;
  background: #24533d;
  color: #fff7e7;
}

.icon-button.ghost {
  background: rgba(255, 253, 250, 0.6);
}

.icon-button.stretch {
  width: 100%;
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.rfi-form-tools {
  margin-top: 10px;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  min-height: 88px;
  padding: 14px;
  border: 1px solid rgba(78, 72, 61, 0.15);
  border-radius: var(--radius);
  background: rgba(255, 253, 250, 0.9);
  box-shadow: 0 8px 28px rgba(53, 46, 35, 0.08);
}

.metric p {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.metric strong {
  display: block;
  font-size: 1.65rem;
  line-height: 1;
}

.metric-icon,
.lane-icon,
.rep-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: var(--radius);
}

.metric-icon {
  width: 42px;
  height: 42px;
}

.metric-icon svg,
.lane-icon svg,
.rep-icon svg {
  width: 19px;
  height: 19px;
}

.green {
  background: var(--green-soft);
  color: var(--green);
}

.red {
  background: var(--red-soft);
  color: var(--red);
}

.amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.split-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.overview-hero,
.workspace-banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  margin-bottom: 16px;
  border: 1px solid rgba(78, 72, 61, 0.16);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 253, 250, 0.96), rgba(245, 240, 229, 0.92));
  box-shadow: var(--shadow);
}

.overview-hero-copy,
.workspace-banner > div:first-child {
  display: grid;
  gap: 6px;
}

.overview-hero-copy h3,
.workspace-banner h3 {
  margin: 0;
  font-size: 1.16rem;
  line-height: 1.25;
}

.overview-hero-copy p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.overview-hero-chips,
.workspace-banner-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.workspace-banner-tags span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--panel-strong);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.white-banner {
  background: linear-gradient(180deg, rgba(240, 248, 243, 0.96), rgba(231, 241, 234, 0.92));
}

.red-banner {
  background: linear-gradient(180deg, rgba(248, 240, 240, 0.96), rgba(241, 231, 231, 0.92));
}

.docs-banner {
  background: linear-gradient(180deg, rgba(241, 246, 248, 0.96), rgba(231, 238, 241, 0.92));
}

.overview-role-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.overview-role-card {
  min-height: 0;
}

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

.priority-tile {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-strong);
}

.priority-tile strong {
  font-size: 0.92rem;
}

.priority-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.38;
}

.lane,
.panel {
  border: 1px solid rgba(78, 72, 61, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 253, 250, 0.94);
  box-shadow: var(--shadow);
}

.lane {
  min-height: 258px;
  padding: 18px;
}

.lane-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.lane-icon {
  width: 42px;
  height: 42px;
}

.white-lane .lane-icon {
  background: var(--green-soft);
  color: var(--green);
}

.red-lane .lane-icon {
  background: var(--red-soft);
  color: var(--red);
}

.lane h3 {
  margin-top: 4px;
  font-size: 1.1rem;
  line-height: 1.25;
}

.duty-list {
  display: grid;
  gap: 11px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.duty-list li {
  position: relative;
  padding-left: 22px;
  color: #414c48;
  line-height: 1.35;
}

.duty-list li::before {
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: currentColor;
  content: "";
}

.white-lane .duty-list li::before {
  color: var(--green);
}

.red-lane .duty-list li::before {
  color: var(--red);
}

.handoff-lane {
  display: grid;
  min-height: 258px;
  grid-template-rows: 82px 1fr 82px;
  align-items: center;
  justify-items: center;
}

.handoff-node {
  display: grid;
  width: 118px;
  height: 72px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 250, 0.92);
  box-shadow: 0 9px 26px rgba(57, 48, 35, 0.09);
  color: #31403b;
  font-size: 0.8rem;
  font-weight: 820;
  text-align: center;
}

.handoff-node svg {
  width: 19px;
  height: 19px;
  color: var(--amber);
}

.handoff-node.reverse svg {
  color: var(--blue);
}

.handoff-line {
  width: 3px;
  height: 100%;
  min-height: 70px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--amber), var(--blue));
}

.dashboard-grid,
.two-column,
.red-grid,
.map-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.two-column.lower,
.red-grid + .two-column {
  margin-top: 14px;
}

.panel {
  min-width: 0;
  padding: 16px;
}

.docs-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr);
  grid-template-areas:
    "library detail"
    "form detail";
  gap: 14px;
  align-items: start;
}

.docs-library-panel {
  grid-area: library;
}

.docs-detail-panel {
  grid-area: detail;
}

.docs-form-panel {
  grid-area: form;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel h3 {
  margin-top: 4px;
  font-size: 1.05rem;
}

.panel-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 820;
  white-space: nowrap;
}

.panel-badge.red {
  background: var(--red-soft);
  color: var(--red);
}

.rfi-list {
  display: grid;
  gap: 9px;
}

.rfi-list.tall {
  max-height: 488px;
  overflow: auto;
  padding-right: 4px;
}

.rfi-card {
  display: grid;
  gap: 8px;
  width: 100%;
  min-height: 110px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
  color: inherit;
  text-align: left;
}

.rfi-card.selected {
  border-color: var(--green);
  background: #eff7f1;
}

.rfi-topline,
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rfi-id {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 820;
}

.rfi-status {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--amber-soft);
  color: #805014;
  font-size: 0.72rem;
  font-weight: 820;
}

.rfi-status.published {
  background: var(--green-soft);
  color: var(--green);
}

.rfi-status.detail {
  background: var(--blue-soft);
  color: var(--blue);
}

.rfi-card strong {
  font-size: 0.95rem;
  line-height: 1.22;
}

.rfi-card p {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.priority-stack,
.story-stack,
.feed-list,
.brief-lanes,
.product-list,
.brief-builder,
.answered-list {
  display: grid;
  gap: 10px;
}

.priority-stack article,
.story-stack article,
.feed-item,
.brief-lane,
.product-row,
.brief-card,
.answered-row,
.answered-empty {
  display: flex;
  gap: 11px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
}

.priority-stack p,
.story-stack p,
.feed-item p,
.brief-lane p,
.product-row p,
.brief-card p,
.answered-row p,
.answered-empty p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.answered-panel {
  margin-top: 14px;
}

.answered-row,
.answered-empty {
  display: grid;
}

.answered-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.answered-header strong {
  display: block;
  margin-top: 3px;
}

.answered-row span,
.answered-empty span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.status-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  margin-top: 5px;
  border-radius: 99px;
}

.status-dot.green {
  background: var(--green);
}

.status-dot.amber {
  background: var(--amber);
}

.status-dot.blue {
  background: var(--blue);
}

.status-dot.red {
  background: var(--red);
}

.rfi-form,
.answer-form {
  display: grid;
  gap: 12px;
}

.order-form {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) minmax(130px, 0.9fr) minmax(180px, 1.5fr) auto;
  gap: 10px;
  margin-bottom: 12px;
  align-items: end;
}

.order-form .icon-button {
  min-height: 42px;
}

.area-task-modal {
  width: min(720px, 94vw);
}

.modal-form {
  display: grid;
  gap: 12px;
}

.modal-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 4px;
}

label {
  display: grid;
  gap: 6px;
  color: #3c4743;
  font-size: 0.84rem;
  font-weight: 760;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffefb;
  color: var(--ink);
  outline: 0;
}

input,
select {
  min-height: 42px;
  padding: 9px 10px;
}

input[readonly] {
  background: rgba(238, 241, 239, 0.88);
  color: var(--muted);
  cursor: default;
}

textarea {
  resize: vertical;
  min-height: 118px;
  padding: 10px;
  line-height: 1.45;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(46, 111, 80, 0.16);
}

.form-grid,
.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.assignment-table {
  display: grid;
  gap: 8px;
}

.assignment-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 2px;
}

.assignment-list {
  display: grid;
  gap: 8px;
}

.assignment-status-queued {
  --assignment-accent: #6b7b8f;
  --assignment-bg: rgba(107, 123, 143, 0.14);
  --assignment-border: rgba(107, 123, 143, 0.36);
  --assignment-text: #344559;
}

.assignment-status-drafting {
  --assignment-accent: #c17b1f;
  --assignment-bg: rgba(193, 123, 31, 0.15);
  --assignment-border: rgba(193, 123, 31, 0.38);
  --assignment-text: #69430f;
}

.assignment-status-review {
  --assignment-accent: #2d6f9f;
  --assignment-bg: rgba(45, 111, 159, 0.15);
  --assignment-border: rgba(45, 111, 159, 0.38);
  --assignment-text: #1b4f75;
}

.assignment-status-updated {
  --assignment-accent: #2e6f50;
  --assignment-bg: rgba(46, 111, 80, 0.15);
  --assignment-border: rgba(46, 111, 80, 0.38);
  --assignment-text: #1f5239;
}

.assignment-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) auto auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--assignment-border);
  border-left: 5px solid var(--assignment-accent);
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--assignment-bg), var(--panel-strong) 54%);
}

.assignment-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.assignment-main strong {
  overflow-wrap: anywhere;
}

.assignment-row span,
.product-row span,
.brief-card span,
.feed-item span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.assignment-status-pill,
.area-status-chip {
  border: 1px solid var(--assignment-border);
  background: var(--assignment-bg);
  color: var(--assignment-text);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-weight: 820;
}

.assignment-status-pill {
  min-height: 34px;
  border-radius: 999px;
  padding: 6px 11px;
  cursor: pointer;
  white-space: nowrap;
}

.assignment-status-pill:hover,
.area-status-chip:is(button):hover {
  border-color: var(--assignment-accent);
  box-shadow: 0 8px 18px rgba(24, 33, 43, 0.12);
  transform: translateY(-1px);
}

.assignment-status-pill span:last-child,
.area-status-chip {
  color: var(--assignment-text);
}

.assignment-status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--assignment-accent);
  box-shadow: 0 0 0 3px var(--assignment-bg);
}

.area-status-chip {
  border: 1px solid var(--assignment-border);
  background: var(--assignment-bg);
  color: var(--assignment-text);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.72rem;
  font-weight: 820;
}

.area-status-chip strong {
  color: var(--assignment-text);
  font-size: 0.72rem;
}

.assignment-empty {
  margin: 0;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 14px;
  color: var(--muted);
  background: rgba(255, 253, 250, 0.58);
  font-size: 0.84rem;
  font-weight: 720;
}

.assignment-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.assignment-action-button {
  width: auto;
  min-width: 0;
  height: 34px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  gap: 6px;
}

.assignment-action-button i {
  width: 16px;
  height: 16px;
}

.assignment-action-button span {
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0;
}

.docs-list,
.docs-form,
.doc-detail {
  display: grid;
  gap: 10px;
}

.doc-card {
  width: 100%;
  display: grid;
  gap: 6px;
  padding: 12px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--ink);
  cursor: pointer;
}

.doc-card:hover,
.doc-card.active {
  border-color: rgba(45, 111, 159, 0.48);
  box-shadow: 0 10px 24px rgba(23, 39, 52, 0.12);
}

.doc-card.active {
  background: linear-gradient(90deg, rgba(45, 111, 159, 0.12), var(--panel-strong));
}

.doc-card strong {
  font-size: 0.92rem;
  line-height: 1.25;
}

.doc-card small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 760;
}

.doc-type {
  width: fit-content;
  border: 1px solid rgba(45, 111, 159, 0.28);
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(45, 111, 159, 0.1);
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 860;
}

.doc-detail {
  color: var(--ink);
}

.doc-detail p,
.docs-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.doc-detail-meta,
.doc-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.doc-detail-meta span,
.doc-tag-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--panel-strong);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 780;
}

.doc-detail-actions {
  display: flex;
  justify-content: flex-end;
}

.brief-lane {
  align-items: flex-start;
}

.brief-lane .status-dot,
.brief-card .status-dot {
  margin-top: 8px;
}

.rep-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.rep-grid article {
  display: grid;
  gap: 9px;
  align-content: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
}

.rep-icon {
  width: 38px;
  height: 38px;
  background: var(--blue-soft);
  color: var(--blue);
}

.rep-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.mini-action {
  min-height: 34px;
  border-color: var(--line);
  background: var(--panel);
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 820;
}

.red-login-wrap {
  display: grid;
  min-height: 650px;
  place-items: center;
  padding: 28px 0;
}

.red-login-card {
  display: grid;
  width: min(960px, 100%);
  grid-template-columns: minmax(300px, 1fr) minmax(300px, 1fr);
  grid-template-rows: auto auto;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(249, 209, 42, 0.35);
  border-radius: 12px;
  background: #10161f;
  box-shadow: 0 24px 80px rgba(7, 10, 16, 0.45);
  color: #fff8e8;
}

.login-visual {
  grid-column: 1;
  grid-row: 1 / span 2;
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border-right: 1px solid rgba(249, 209, 42, 0.2);
  background:
    radial-gradient(circle at 32% 24%, rgba(249, 209, 42, 0.14), transparent 34%),
    linear-gradient(160deg, rgba(27, 87, 149, 0.33), rgba(12, 17, 26, 0.9) 58%, rgba(9, 13, 20, 0.96));
}

.scan-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  opacity: 0.24;
}

.scan-grid span {
  border-right: 1px solid rgba(249, 209, 42, 0.12);
}

.scan-grid::before,
.scan-grid::after {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(249, 209, 42, 0.18);
  content: "";
}

.scan-grid::before {
  top: 34%;
}

.scan-grid::after {
  top: 68%;
}

.access-globe {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(320px, 76%);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
}

.red-login-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.48));
  z-index: 2;
}

#red-earth-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 24px 32px rgba(3, 8, 8, 0.35));
}

.globe-fallback {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.28);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 248, 232, 0.18), transparent 20%),
    linear-gradient(135deg, rgba(45, 111, 159, 0.5), rgba(38, 118, 110, 0.38) 48%, rgba(164, 62, 62, 0.22));
  box-shadow:
    inset -28px -32px 56px rgba(10, 15, 14, 0.58),
    inset 14px 12px 28px rgba(255, 248, 232, 0.1),
    0 22px 60px rgba(4, 7, 7, 0.32);
}

.earth-ready .globe-fallback {
  opacity: 0;
}

.globe-fallback::before {
  position: absolute;
  inset: 10%;
  border: 1px solid rgba(255, 248, 232, 0.12);
  border-radius: 50%;
  content: "";
}

.globe-line {
  position: absolute;
  border: 1px solid rgba(255, 248, 232, 0.26);
  pointer-events: none;
}

.globe-line.lat {
  left: 10%;
  right: 10%;
  height: 22%;
  border-right: 0;
  border-left: 0;
  border-radius: 50%;
}

.lat-one {
  top: 24%;
}

.lat-two {
  bottom: 24%;
}

.globe-line.lon {
  top: 7%;
  bottom: 7%;
  width: 36%;
  border-top: 0;
  border-bottom: 0;
  border-radius: 50%;
}

.lon-one {
  left: 22%;
}

.lon-two {
  right: 22%;
}

.globe-line.equator {
  left: 7%;
  right: 7%;
  top: 50%;
  height: 1px;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
}

.globe-continent {
  position: absolute;
  display: block;
  border-radius: 45% 55% 50% 40%;
  background: rgba(188, 211, 167, 0.72);
  filter: drop-shadow(0 5px 7px rgba(8, 11, 10, 0.22));
}

.continent-one {
  left: 23%;
  top: 28%;
  width: 28%;
  height: 18%;
  transform: rotate(-19deg);
}

.continent-two {
  left: 50%;
  top: 36%;
  width: 22%;
  height: 25%;
  border-radius: 52% 38% 48% 55%;
  transform: rotate(18deg);
}

.continent-three {
  left: 36%;
  top: 58%;
  width: 18%;
  height: 22%;
  border-radius: 45% 55% 60% 42%;
  transform: rotate(24deg);
}

.login-lock {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border: 1px solid rgba(249, 209, 42, 0.28);
  border-radius: var(--radius);
  background: rgba(9, 14, 21, 0.8);
  color: #f9d12a;
  transform: translate(-50%, -50%);
  z-index: 3;
}

.login-lock svg {
  width: 36px;
  height: 36px;
}

.login-copy,
.red-login-form {
  grid-column: 2;
  padding: 24px 28px;
  background: linear-gradient(180deg, #10161f, #0d131c);
  text-align: center;
}

.login-copy {
  display: grid;
  align-content: end;
  justify-items: center;
  gap: 9px;
  min-height: 0;
  padding-bottom: 10px;
}

.login-copy h3 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.12;
  color: #f9d12a;
}

.login-copy p:not(.eyebrow) {
  margin: 0;
  color: #d6deea;
  line-height: 1.45;
  max-width: 48ch;
}

.login-copy .eyebrow {
  color: #8fb7e4;
}

.red-login-form {
  display: grid;
  align-content: start;
  gap: 10px;
  padding-top: 8px;
  justify-items: center;
}

.red-login-form label {
  color: #f3f7ff;
  width: min(430px, 100%);
  text-align: left;
}

.red-login-form input {
  border-color: rgba(143, 183, 228, 0.32);
  background: rgba(11, 19, 30, 0.85);
  color: #f7fbff;
}

.red-login-form input::placeholder {
  color: rgba(214, 222, 234, 0.58);
}

.red-login-form input:focus {
  border-color: #f9d12a;
  box-shadow: 0 0 0 3px rgba(249, 209, 42, 0.2);
}

.login-error {
  min-height: 20px;
  margin: 0;
  color: #f3b8b8;
  font-size: 0.84rem;
  font-weight: 760;
}

.red-login-form.shake {
  animation: shake 180ms ease-in-out 2;
}

@keyframes shake {
  25% {
    transform: translateX(-5px);
  }

  75% {
    transform: translateX(5px);
  }
}

.red-grid {
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
}

.rfi-detail {
  display: grid;
  gap: 10px;
  min-height: 190px;
  margin-bottom: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
}

.rfi-detail .empty-state {
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.product-row {
  align-items: center;
  justify-content: space-between;
}

.archive-list {
  display: grid;
  gap: 9px;
}

.targeting-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.targeting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  border: 1px solid #2a3542;
  border-radius: var(--radius);
  background: #161d25;
  box-shadow: none;
}

.targeting-row.targeting-centcom {
  background:
    linear-gradient(90deg, rgba(69, 122, 255, 0.22) 0%, rgba(69, 122, 255, 0.02) 62%),
    var(--panel-strong);
}

.targeting-row.targeting-africom {
  background:
    linear-gradient(90deg, rgba(214, 72, 72, 0.22) 0%, rgba(214, 72, 72, 0.02) 62%),
    var(--panel-strong);
}

.targeting-row.targeting-southcom {
  background:
    linear-gradient(90deg, rgba(61, 168, 102, 0.22) 0%, rgba(61, 168, 102, 0.02) 62%),
    var(--panel-strong);
}

.targeting-row.targeting-indopacom {
  background:
    linear-gradient(90deg, rgba(173, 108, 227, 0.22) 0%, rgba(173, 108, 227, 0.02) 62%),
    var(--panel-strong);
}

.targeting-row.selected {
  border-color: #2a3542;
  box-shadow: none;
}

.targeting-main {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 0;
  padding: 0;
  width: 100%;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.targeting-text {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.targeting-main p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.targeting-main span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.targeting-modal {
  width: min(1400px, 98vw);
  min-height: 94vh;
  max-height: 96vh;
  overflow: auto;
  border-radius: 10px;
  padding: 18px 20px;
}

.targeting-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.targeting-stages {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.stage-chip {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 760;
  padding: 0 10px;
}

.stage-chip.active {
  border-color: #5c7cf6;
  background: #2f3f75;
  color: #e9eeff;
}

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

.targeting-detail-form > label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.targeting-subtitle {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.86rem;
}

.targeting-meta-edit {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.01);
}

.targeting-meta-edit summary {
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 700;
}

.targeting-meta-edit[open] {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.targeting-meta-edit[open] summary {
  grid-column: 1 / -1;
}

.targeting-meta-edit[open] label {
  display: grid;
  gap: 6px;
}

.supporting-briefs-label {
  grid-column: 1 / -1;
}

.supporting-briefs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.supporting-brief-option {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  font-size: 0.84rem;
  color: var(--text);
}

.supporting-brief-option input {
  margin: 0;
}

.brief-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
}

.brief-linkage-layout {
  grid-column: 1 / -1;
  display: block;
}

.brief-linkage-controls {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.supporting-brief-links {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
}

.supporting-links-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.supporting-links-toolbar span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 760;
}

.supporting-brief-link-row {
  display: grid !important;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.015);
}

.supporting-brief-link-row > span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.link-open-button,
.brief-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 760;
  text-decoration: none;
  white-space: nowrap;
}

.brief-preview-pane {
  position: fixed;
  top: 5vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(1320px, 92vw);
  aspect-ratio: 16 / 9;
  height: auto;
  max-height: 90vh;
  z-index: 1300;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.015);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  display: none;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}

.brief-preview-pane.active {
  display: grid;
}

.targeting-meta-edit {
  overflow: visible;
}

.brief-preview-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 1.02rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.brief-preview-empty {
  padding: 14px;
  color: var(--muted);
  font-size: 0.92rem;
  align-self: start;
}

#targeting-brief-preview {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  display: none;
}

.targeting-detail-form .targeting-section,
.targeting-detail-form .button-row {
  grid-column: 1 / -1;
}

.targeting-section {
  border: 0;
  border-radius: 12px;
  background: transparent;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  align-items: start;
  box-shadow: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.targeting-section summary {
  grid-column: 1 / -1;
  cursor: pointer;
  font-weight: 800;
  color: var(--text-strong);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border: 0 !important;
  border-radius: 10px;
  background: #1a2530;
  position: relative;
  user-select: none;
}

.targeting-section summary::-webkit-details-marker {
  display: none;
}

.targeting-section summary::before {
  content: "▶";
  font-size: 0.72rem;
  color: #c9d7e6;
  transition: transform 0.14s ease;
}

.targeting-section summary::after {
  content: none;
}

.targeting-section[open] summary {
  margin-bottom: 10px;
  box-shadow: none;
}

.targeting-section[open] {
  border: 1px solid #2a3542;
  background: linear-gradient(180deg, #161d25, #11161c);
  padding: 13px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.24);
}

.targeting-section[open] summary::before {
  transform: rotate(90deg);
}

.targeting-section summary:hover {
  background: #223142;
  color: #f1f5fb;
}
.targeting-section.dragover-summary {
  border-color: #6e89ad;
  box-shadow: 0 0 0 1px rgba(110, 137, 173, 0.35) inset, 0 10px 24px rgba(10, 17, 28, 0.35);
  background: linear-gradient(180deg, rgba(29, 44, 61, 0.85), rgba(17, 25, 34, 0.9));
}

.targeting-section label {
  display: grid;
  gap: 6px;
  margin-bottom: 0;
  min-width: 0;
}

.targeting-section label:last-of-type {
  grid-column: 1 / -1;
}
.f3ead-imagery-dropzone {
  grid-column: 1 / -1;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: rgba(13, 19, 26, 0.7);
  padding: 9px;
  margin-bottom: 8px;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.f3ead-assignment-board .f3ead-board-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.f3ead-assignment-board .f3ead-imagery-dropzone {
  margin-bottom: 0;
  min-height: 74px;
}
.f3ead-imagery-dropzone p {
  margin: 0 0 6px;
  font-size: 0.72rem;
  color: var(--text-strong);
  font-weight: 700;
  text-transform: uppercase;
}
.f3ead-imagery-dropzone.dragover {
  border-color: #6e89ad;
  background: #243245;
}
.f3ead-imagery-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.f3ead-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(37, 49, 66, 0.96), rgba(24, 33, 45, 0.96));
  color: var(--text);
  font-size: 0.72rem;
  padding: 4px 10px;
  cursor: pointer;
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}
.f3ead-chip[draggable="true"] {
  cursor: grab;
}
.f3ead-chip:hover {
  border-color: #5b7088;
  transform: translateY(-1px);
  box-shadow: 0 7px 14px rgba(0, 0, 0, 0.22);
}
.f3ead-empty {
  color: var(--muted);
  font-size: 0.72rem;
}

.imagery-note {
  color: var(--muted);
  font-size: 0.84rem;
}

.target-imagery-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}
.target-imagery-block {
  border: 0;
  border-radius: 12px;
  background: transparent;
  padding: 4px 0 2px;
  display: grid;
  gap: 10px;
}
.imagery-floating-label {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.linked-imagery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}
.linked-imagery-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(16, 23, 32, 0.95), rgba(10, 15, 21, 0.95));
  padding: 8px;
  display: grid;
  gap: 6px;
  transition: transform 0.17s ease, border-color 0.17s ease, box-shadow 0.17s ease;
  cursor: pointer;
}
.linked-imagery-card[draggable="true"] {
  cursor: grab;
}
.linked-imagery-card:hover {
  border-color: #4f6276;
  transform: translateY(-2px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.28);
}
.linked-imagery-card.just-added {
  border-color: #8fb4e2;
  box-shadow: 0 0 0 2px rgba(143, 180, 226, 0.32), 0 16px 26px rgba(0, 0, 0, 0.3);
}
.linked-imagery-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.linked-imagery-card strong {
  font-size: 0.76rem;
}
.linked-imagery-meta {
  display: grid;
  gap: 3px;
}
.linked-imagery-card p,
.linked-imagery-card span {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}
.linked-imagery-preview {
  justify-self: start;
}

.imagery-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: linear-gradient(180deg, rgba(17, 24, 32, 0.95), rgba(12, 18, 25, 0.95));
}
.imagery-row.compact .imagery-fields {
  grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
  align-items: stretch;
}
.target-intake-fields {
  display: grid;
  gap: 8px;
}
.target-image-dropzone {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 120px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: rgba(15, 22, 30, 0.75);
  padding: 8px;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.target-image-dropzone p {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 700;
}
.target-image-dropzone span {
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--muted);
}
.target-image-dropzone.dragover {
  border-color: #6e89ad;
  background: #243245;
  box-shadow: 0 0 0 1px rgba(110, 137, 173, 0.35) inset;
}
.target-image-dropzone.has-preview .target-image-empty p {
  display: none;
}
.target-image-empty[hidden],
.target-image-preview[hidden] {
  display: none;
}
.target-image-preview {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.imagery-fields {
  display: grid;
  gap: 8px;
}

.imagery-actions {
  display: flex;
  align-items: start;
  gap: 8px;
  flex-direction: column;
}

.imagery-preview {
  grid-column: 1 / -1;
}

.imagery-preview img {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.targeting-detail-form input,
.targeting-detail-form textarea,
.targeting-section input,
.targeting-section textarea {
  width: 100%;
  min-width: 0;
}

@media (max-width: 980px) {
  .targeting-detail-form {
    grid-template-columns: 1fr;
  }

  .brief-preview-pane {
    width: 96vw;
    max-height: 88vh;
  }

  .brief-link-row {
    grid-template-columns: 1fr;
  }

  .targeting-meta-edit[open] {
    grid-template-columns: 1fr;
  }

  .supporting-briefs {
    grid-template-columns: 1fr;
  }

  .targeting-section {
    grid-template-columns: 1fr;
  }

  .imagery-row {
    grid-template-columns: 1fr;
  }

  .f3ead-assignment-board .f3ead-board-grid {
    grid-template-columns: 1fr 1fr;
  }

  .brief-directory-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .f3ead-assignment-board .f3ead-board-grid {
    grid-template-columns: 1fr;
  }
}

.archive-row,
.archive-empty {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
}

.archive-empty {
  display: grid;
  justify-items: start;
}

.archive-row p,
.archive-empty p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.red-only-panel {
  margin-top: 14px;
}

.product-main {
  display: grid;
  gap: 2px;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.product-main strong {
  color: var(--text-strong);
}

.product-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
}

.edit-button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 760;
}

.status-button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: #3c4743;
  font-size: 0.76rem;
  font-weight: 820;
}

.status-button.status-draft {
  border-color: #9b8f75;
  background: #efe7d6;
  color: #5d4f33;
}

.status-button.status-needs-review {
  border-color: #c9933b;
  background: #f5e3bf;
  color: #805014;
}

.status-button.status-in-progress {
  border-color: #4c8ab7;
  background: #dcecf8;
  color: #245f8a;
}

.status-button.status-released {
  border-color: #3f8864;
  background: #dceee4;
  color: #2e6f50;
}

.delete-button {
  min-height: 32px;
  border: 1px solid #d7b4ad;
  border-radius: 999px;
  background: #f7e7e3;
  color: #8a3f33;
  font-size: 0.76rem;
  font-weight: 820;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 8px;
  background: rgba(19, 25, 23, 0.6);
  backdrop-filter: blur(2px);
}

.modal-backdrop[hidden] {
  display: none !important;
}

.order-modal {
  width: min(840px, 100%);
  max-height: min(90vh, 880px);
  overflow: auto;
  border: 1px solid rgba(78, 72, 61, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 253, 250, 0.98);
  box-shadow: 0 24px 80px rgba(32, 26, 19, 0.32);
  padding: 16px;
}

.targeting-modal .panel-heading {
  position: sticky;
  top: 0;
  z-index: 2;
  background: inherit;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.order-modal-form {
  display: grid;
  gap: 10px;
}

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

.map-panel {
  min-height: calc(100vh - 140px);
}

.layer-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.layer-toggle {
  min-height: 34px;
  padding: 6px 10px;
  border-color: var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 820;
}

.layer-toggle.active {
  background: #203a31;
  color: #f6ebd0;
}

#map {
  position: relative;
  min-height: 588px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(36, 83, 61, 0.2), rgba(45, 111, 159, 0.18)),
    #e8eee7;
}

.fallback-map::before {
  position: absolute;
  inset: 0;
  background: url("assets/world-map.svg") center / cover no-repeat;
  content: "";
  opacity: 0.95;
}

.leaflet-container {
  font: inherit;
}

.marker-chip {
  display: inline-flex;
  min-width: 96px;
  align-items: center;
  justify-content: center;
  padding: 5px 8px;
  border: 1px solid rgba(32, 39, 37, 0.18);
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.96);
  color: #27322e;
  font-size: 0.75rem;
  font-weight: 850;
  box-shadow: 0 8px 22px rgba(34, 32, 27, 0.18);
}

.marker-chip.ao {
  border-color: rgba(46, 111, 80, 0.4);
  color: var(--green);
}

.marker-chip.news {
  border-color: rgba(45, 111, 159, 0.42);
  color: var(--blue);
}

.marker-chip.friendly {
  border-color: rgba(184, 121, 36, 0.46);
  color: var(--amber);
}

.fallback-map {
  background:
    radial-gradient(circle at 28% 40%, rgba(46, 111, 80, 0.24), transparent 16%),
    radial-gradient(circle at 61% 44%, rgba(45, 111, 159, 0.24), transparent 18%),
    radial-gradient(circle at 73% 62%, rgba(184, 121, 36, 0.22), transparent 14%),
    linear-gradient(135deg, #dbe8df, #d7e5ec);
}

.fallback-marker {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
}

.feed-item {
  align-items: flex-start;
}

.feed-item strong {
  display: block;
  margin-bottom: 3px;
}

.friend-map-wrap {
  width: 100%;
  min-height: 720px;
  height: calc(100vh - 170px);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #0a0c10;
}

.friend-map-wrap:fullscreen {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  border-radius: 0;
  border: 0;
}

.friend-map-wrap:fullscreen #friend-map-embed {
  width: 100%;
  height: 100%;
}

#friend-map-embed {
  width: 100%;
  height: 100%;
  border: 0;
}

.brief-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.brief-card {
  align-items: flex-start;
}

.theater-brief-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(0, 1.2fr);
  gap: 12px;
}

.theater-brief-create-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) minmax(240px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.theater-brief-form {
  display: grid;
  gap: 12px;
}

.theater-brief-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.theater-brief-preview {
  display: grid;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(17, 24, 33, 0.96), rgba(11, 17, 24, 0.98));
}

.theater-brief-header h4 {
  margin: 0 0 10px;
  font-size: 1.18rem;
}

.theater-brief-meta {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.theater-brief-section {
  display: grid;
  gap: 8px;
}

.theater-brief-section h5 {
  margin: 0;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
}

.theater-brief-section p,
.theater-brief-section li {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.theater-brief-section ul {
  margin: 0;
  padding-left: 18px;
}

.theater-brief-subheading {
  margin-top: 14px;
}

.theater-brief-list {
  margin-top: 8px;
}

.theater-brief-card {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.theater-brief-card.selected {
  border-color: #4a5d42;
  background: linear-gradient(180deg, rgba(28, 37, 30, 0.95), rgba(18, 25, 20, 0.95));
}

.theater-brief-placeholder {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 1080px) {
  .theater-brief-layout {
    grid-template-columns: 1fr;
  }

  .theater-brief-create-form,
  .theater-brief-grid {
    grid-template-columns: 1fr;
  }
}

/* O&I Directory */
.brief-directory-form {
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: minmax(240px, 0.95fr) minmax(360px, 1.4fr) auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(18, 25, 34, 0.92), rgba(13, 19, 27, 0.96));
}

.brief-directory-form label {
  display: grid;
  gap: 6px;
}

.brief-directory-list {
  gap: 10px;
}

.brief-directory-card {
  display: grid;
  gap: 8px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 24, 33, 0.95), rgba(13, 18, 25, 0.95));
  padding: 12px 14px;
}

.brief-directory-empty {
  min-height: 96px;
  align-content: center;
}

.brief-directory-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brief-directory-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.brief-directory-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.brief-directory-card strong {
  font-size: 0.98rem;
  line-height: 1.2;
}

.brief-directory-card p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  word-break: break-word;
  line-height: 1.35;
}

.brief-directory-card .mini-action,
.brief-directory-card .delete-button {
  min-height: 32px;
  padding: 0 12px;
  font-size: 0.76rem;
}

.brief-title-edit {
  min-height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(7, 11, 16, 0.92);
  color: var(--text);
  padding: 4px 8px;
  font-size: 0.9rem;
  width: min(360px, 100%);
}

.brief-stage {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 850;
}

@media (max-width: 900px) {
  .brief-directory-form {
    grid-template-columns: 1fr;
  }

  .brief-directory-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .brief-directory-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .overview-hero,
  .workspace-banner {
    flex-direction: column;
  }

  .overview-role-grid,
  .priority-grid {
    grid-template-columns: 1fr;
  }
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 14px;
  border: 1px solid rgba(31, 79, 58, 0.26);
  border-radius: var(--radius);
  background: #203a31;
  color: #fff8e8;
  box-shadow: var(--shadow);
  font-weight: 750;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .workflow-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .metric-strip,
  .split-board,
  .dashboard-grid,
  .two-column,
  .red-grid,
  .map-grid,
  .docs-grid {
    grid-template-columns: 1fr;
  }

  .docs-grid {
    grid-template-areas:
      "library"
      "detail"
      "form";
  }

  .handoff-lane {
    min-height: 118px;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto;
  }

  .handoff-line {
    width: 100%;
    height: 3px;
    min-height: 0;
    background: linear-gradient(90deg, var(--amber), var(--blue));
  }

  .map-panel {
    min-height: 620px;
  }
}

@media (max-width: 860px) {
  .classification-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
    padding: 8px 14px;
  }

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

  .sidebar {
    position: static;
    top: auto;
    height: auto;
    overflow: visible;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid rgba(83, 76, 63, 0.18);
  }

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

  .sidebar-block {
    display: none;
  }

  .workspace {
    padding: 16px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions,
  .icon-button.primary {
    width: 100%;
  }

  .role-tab {
    flex: 1 1 0;
    min-width: 0;
  }

  .metric-strip,
  .workflow-bar,
  .rep-grid,
  .form-grid,
  .button-row {
    grid-template-columns: 1fr;
  }

  .order-form {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .red-login-wrap {
    min-height: 560px;
    padding: 8px 0;
  }

  .red-login-card {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 260px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 248, 232, 0.12);
  }

  .login-copy,
  .red-login-form {
    grid-column: 1;
    padding-right: 20px;
    padding-left: 20px;
  }

  .login-copy {
    min-height: 0;
    padding-top: 22px;
  }

  .assignment-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: center;
  }

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

  .assignment-status-pill {
    width: fit-content;
  }

  .assignment-actions {
    justify-content: flex-end;
    gap: 6px;
  }

  .assignment-action-button {
    width: 30px;
    min-width: 30px;
    height: 30px;
    min-height: 30px;
  }

  .modal-form-actions {
    justify-content: stretch;
  }

  .modal-form-actions .icon-button {
    width: 100%;
    justify-content: center;
  }

  .panel-heading,
  .rfi-topline,
  .row-between {
    align-items: flex-start;
    flex-direction: column;
  }

  .layer-controls {
    justify-content: flex-start;
  }

  #map {
    min-height: 440px;
  }
}

@media (max-width: 520px) {
  .nav-list {
    grid-template-columns: 1fr;
  }

  .topbar h2 {
    font-size: 1.35rem;
  }

  .metric {
    min-height: 78px;
  }

  .lane,
  .panel {
    padding: 13px;
  }

  .handoff-lane {
    grid-template-columns: 1fr;
    grid-template-rows: 72px 46px 72px;
  }

  .handoff-line {
    width: 3px;
    height: 46px;
    background: linear-gradient(180deg, var(--amber), var(--blue));
  }
}

body.dark-mode {
  --bg: #111213;
  --panel: #181a1c;
  --panel-strong: #1c1f22;
  --ink: #eceef0;
  --muted: #c2c8ce;
  --line: #3a3f45;
  --line-strong: #4a5057;
  background: linear-gradient(180deg, #0b0c0d, #121416);
  color: var(--ink);
}

body.dark-mode .classification-bar {
  background: #08090a;
  color: #dce0e4;
}

body.dark-mode .topbar {
  background: linear-gradient(180deg, rgba(24, 28, 33, 0.96), rgba(20, 24, 29, 0.96));
  border-color: #3b424b;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
}

body.dark-mode .sidebar {
  background: rgba(18, 20, 22, 0.94);
  border-right-color: rgba(116, 124, 134, 0.24);
}

body.dark-mode .nav-item {
  color: #d8dde2;
}

body.dark-mode .nav-item:hover,
body.dark-mode .nav-item.active {
  background: #23272b;
  border-color: #43494f;
}

body.dark-mode .panel,
body.dark-mode .lane,
body.dark-mode .metric,
body.dark-mode .overview-hero,
body.dark-mode .workspace-banner,
body.dark-mode .priority-tile,
body.dark-mode .sidebar-block,
body.dark-mode .role-switch,
body.dark-mode .rfi-card,
body.dark-mode .priority-stack article,
body.dark-mode .story-stack article,
body.dark-mode .feed-item,
body.dark-mode .brief-lane,
body.dark-mode .product-row,
body.dark-mode .brief-card,
body.dark-mode .answered-row,
body.dark-mode .answered-empty,
body.dark-mode .archive-row,
body.dark-mode .archive-empty,
body.dark-mode .targeting-row,
body.dark-mode .targeting-section,
body.dark-mode .assignment-row,
body.dark-mode .doc-card,
body.dark-mode .rep-grid article,
body.dark-mode .rfi-detail,
body.dark-mode .order-modal {
  background: var(--panel);
  border-color: var(--line);
  color: var(--ink);
}

body.dark-mode .assignment-status-queued {
  --assignment-bg: rgba(126, 147, 170, 0.18);
  --assignment-border: rgba(126, 147, 170, 0.34);
  --assignment-text: #dce7f4;
}

body.dark-mode .assignment-status-drafting {
  --assignment-bg: rgba(224, 154, 61, 0.18);
  --assignment-border: rgba(224, 154, 61, 0.36);
  --assignment-text: #f4d19c;
}

body.dark-mode .assignment-status-review {
  --assignment-bg: rgba(67, 143, 196, 0.18);
  --assignment-border: rgba(67, 143, 196, 0.36);
  --assignment-text: #bdddf3;
}

body.dark-mode .assignment-status-updated {
  --assignment-bg: rgba(79, 154, 110, 0.18);
  --assignment-border: rgba(79, 154, 110, 0.36);
  --assignment-text: #c5ebd3;
}

body.dark-mode .assignment-row {
  border-color: var(--assignment-border);
  border-left-color: var(--assignment-accent);
  background: linear-gradient(90deg, var(--assignment-bg), var(--panel) 48%);
}

body.dark-mode .assignment-status-pill,
body.dark-mode .area-status-chip {
  color: var(--assignment-text);
}

body.dark-mode .assignment-summary .area-status-chip,
body.dark-mode .assignment-empty {
  background: #0f151d;
  border-color: var(--line);
}

body.dark-mode .doc-card.active {
  background: linear-gradient(90deg, rgba(67, 143, 196, 0.16), var(--panel));
  border-color: rgba(67, 143, 196, 0.42);
}

body.dark-mode .doc-type {
  background: rgba(67, 143, 196, 0.14);
  border-color: rgba(67, 143, 196, 0.34);
  color: #bdddf3;
}

body.dark-mode .doc-detail-meta span,
body.dark-mode .doc-tag-row span {
  background: #0f151d;
  border-color: var(--line);
  color: var(--muted);
}

body.dark-mode .block-label,
body.dark-mode .eyebrow,
body.dark-mode .brand p,
body.dark-mode .overview-hero-copy p:last-child,
body.dark-mode .priority-tile p,
body.dark-mode .metric p,
body.dark-mode .rfi-card p,
body.dark-mode .priority-stack p,
body.dark-mode .story-stack p,
body.dark-mode .feed-item p,
body.dark-mode .brief-lane p,
body.dark-mode .product-row p,
body.dark-mode .brief-card p,
body.dark-mode .answered-row p,
body.dark-mode .answered-empty p,
body.dark-mode .archive-row p,
body.dark-mode .archive-empty p,
body.dark-mode .targeting-main p,
body.dark-mode .assignment-row span,
body.dark-mode .product-row span,
body.dark-mode .targeting-main span,
body.dark-mode .brief-card span,
body.dark-mode .feed-item span,
body.dark-mode .answered-row span,
body.dark-mode .answered-empty span,
body.dark-mode .sidebar-block span {
  color: var(--muted);
}

body.dark-mode .targeting-section summary {
  color: #f2f5fa;
}

body.dark-mode .imagery-row {
  background: rgba(255, 255, 255, 0.02);
  border-color: #3f4754;
}

body.dark-mode .targeting-row.targeting-centcom {
  background:
    linear-gradient(90deg, rgba(85, 136, 255, 0.26) 0%, rgba(85, 136, 255, 0.03) 62%),
    #191d22;
}

body.dark-mode .targeting-row.targeting-africom {
  background:
    linear-gradient(90deg, rgba(219, 84, 84, 0.26) 0%, rgba(219, 84, 84, 0.03) 62%),
    #191d22;
}

body.dark-mode .targeting-row.targeting-southcom {
  background:
    linear-gradient(90deg, rgba(72, 179, 114, 0.26) 0%, rgba(72, 179, 114, 0.03) 62%),
    #191d22;
}

body.dark-mode .targeting-row.targeting-indopacom {
  background:
    linear-gradient(90deg, rgba(183, 126, 236, 0.24) 0%, rgba(183, 126, 236, 0.03) 62%),
    #191d22;
}

body.dark-mode .targeting-subtitle {
  color: #a7b1bf;
}

body.dark-mode .targeting-meta-edit {
  border-color: #3f4754;
  background: rgba(255, 255, 255, 0.02);
}

body.dark-mode .targeting-meta-edit summary {
  color: #9ca7b7;
}

body.dark-mode .supporting-briefs {
  background: rgba(255, 255, 255, 0.03);
  border-color: #3f4754;
}

body.dark-mode .supporting-brief-option {
  color: #d8dee8;
}

body.dark-mode .supporting-brief-link-row > span {
  color: #aab4c2;
}

body.dark-mode .supporting-links-toolbar span {
  color: #aeb8c6;
}

body.dark-mode .supporting-brief-link-row {
  background: rgba(255, 255, 255, 0.02);
  border-color: #3f4754;
}

body.dark-mode .link-open-button,
body.dark-mode .brief-action {
  background: #252a2f;
  border-color: #454c53;
  color: #e5eaee;
}

body.dark-mode .brief-preview-pane {
  background: rgba(255, 255, 255, 0.02);
  border-color: #3f4754;
}

body.dark-mode .icon-button,
body.dark-mode .mini-action,
body.dark-mode .edit-button,
body.dark-mode .status-button,
body.dark-mode .stage-chip,
body.dark-mode .delete-button,
body.dark-mode .layer-toggle,
body.dark-mode .role-tab {
  background: #252a2f;
  border-color: #454c53;
  color: #e5eaee;
}

body.dark-mode .workflow-chip {
  background: #252a2f;
  border-color: #454c53;
  color: #e5eaee;
}

body.dark-mode .workflow-chip:hover {
  background: #2e343a;
}

body.dark-mode .stage-chip.active {
  border-color: #6f8cff;
  background: #31457d;
  color: #f1f5ff;
}

body.dark-mode .panel-badge {
  background: #2b3a33;
  border-color: #496057;
  color: #dff0e7;
}

body.dark-mode .panel-badge.red {
  background: #3b2d2d;
  border-color: #684747;
  color: #f2d8d8;
}

body.dark-mode .site-auth-status {
  background: #20252b;
  border-color: #454c53;
}

body.dark-mode .workspace-banner-tags span {
  background: #20252b;
  border-color: #454c53;
  color: #cfd6de;
}

body.dark-mode .icon-button.primary,
body.dark-mode .role-tab.active,
body.dark-mode .layer-toggle.active {
  background: #343a40;
  border-color: #4a525a;
  color: #f0f3f6;
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
  background: #101214;
  border-color: #3f454b;
  color: #e8edf1;
}

body.dark-mode input[readonly] {
  background: #171b1f;
  color: #c9d1d8;
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
  color: #b6bec6;
  opacity: 1;
}

body.dark-mode input:focus,
body.dark-mode select:focus,
body.dark-mode textarea:focus {
  border-color: #6f7b88;
  box-shadow: 0 0 0 3px rgba(119, 134, 150, 0.28);
}

body.dark-mode .modal-backdrop {
  background: rgba(6, 10, 9, 0.76);
}

body.dark-mode .marker-chip {
  background: rgba(30, 34, 38, 0.94);
  border-color: #50575f;
  color: #dce2e7;
}

body.dark-mode #map {
  border-color: #3d4349;
}

body.dark-mode .rfi-status {
  background: #4c4029;
  color: #f0ddbb;
}

body.dark-mode .rfi-status.published {
  background: #31453a;
  color: #dbefdf;
}

body.dark-mode .rfi-status.detail {
  background: #2e3e4b;
  color: #d7e7f6;
}

body.dark-mode .status-button.status-draft {
  background: #303336;
  border-color: #4a4f54;
  color: #dfe3e7;
}

body.dark-mode .status-button.status-needs-review {
  background: #3a352a;
  border-color: #5a5342;
  color: #e7dcc1;
}

body.dark-mode .status-button.status-in-progress {
  background: #2b3640;
  border-color: #435462;
  color: #d6e6f3;
}

body.dark-mode .status-button.status-released {
  background: #2e3a33;
  border-color: #49584f;
  color: #d7eadf;
}

/* Imagery DB */
[data-view-panel="intel-db"] .panel-heading { display: none; }
.intel-db-layout { display: grid; grid-template-columns: minmax(0, 1fr); }
.intel-db-content { width: 100%; max-width: none; margin: 0; }
.db-page { display: none; }
.db-page.active { display: block; }
.imagery-db-shell {
  --db-bg: #0b0f13;
  --db-panel: #11161c;
  --db-panel-2: #161d25;
  --db-border: #2a3542;
  --db-text: #e5e7eb;
  --db-muted: #8b98a8;
  --db-accent: #9aa66a;
  --db-amber: #c6a15b;
  --db-danger: #9c3f3f;
  display: grid;
  gap: 14px;
  padding: 10px 0 12px;
  color: var(--db-text);
}
.db-panel {
  border: 1px solid var(--db-border);
  background: linear-gradient(180deg, var(--db-panel-2), var(--db-panel));
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.db-panel:hover {
  border-color: #334150;
  box-shadow: 0 13px 24px rgba(0, 0, 0, 0.28);
}
.imagery-db-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--db-border);
  background: linear-gradient(180deg, #121922, #0f141a);
  border-radius: 12px;
  padding: 14px 16px;
}
.db-kicker,
.db-section-label {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--db-muted);
  text-transform: uppercase;
  font-weight: 700;
}
.imagery-db-header h4 {
  margin: 3px 0 0;
  font-size: 1.28rem;
  color: var(--db-text);
}
.db-status-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.db-chip {
  padding: 4px 9px;
  border: 1px solid var(--db-border);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--db-muted);
  background: #141a22;
}
.db-chip:nth-child(1) { color: #b7c68b; border-color: #455438; }
.db-chip:nth-child(2) { color: #dcc48f; border-color: #5c5036; }
.db-chip:nth-child(3) { color: #c6d3e6; border-color: #4a5668; }
.db-form {
  display: grid;
  grid-template-columns: 1.05fr 1fr 1fr;
  gap: 12px;
  align-items: start;
}
.upload-col { display: grid; gap: 10px; min-width: 0; }
.db-form label {
  display: grid;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--db-muted);
}
.db-form input,
.db-form select {
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid var(--db-border);
  background: #0d1218;
  color: var(--db-text);
  padding: 9px 11px;
}
.db-form input:focus-visible,
.db-form select:focus-visible,
.db-toolbar input:focus-visible,
.db-toolbar select:focus-visible,
.db-segmented button:focus-visible {
  outline: 2px solid #617849;
  outline-offset: 1px;
}
.image-dropzone {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 188px;
  border: 1px dashed #4a5968;
  border-radius: 12px;
  background: #0d1218;
  text-align: center;
  padding: 14px;
  cursor: pointer;
}
.drop-plus { margin: 0; font-size: 1.5rem; line-height: 1; color: var(--db-accent); }
.image-dropzone p { margin: 0; font-weight: 700; color: var(--db-text); }
.image-dropzone span { margin-top: 6px; color: var(--db-muted); font-size: 0.76rem; }
.image-dropzone.dragover { border-color: #79925a; background: #121a14; }
.db-drop-preview {
  width: 100%;
  height: 100%;
  max-height: 158px;
  object-fit: cover;
  border-radius: 9px;
  border: 1px solid #314153;
  margin-bottom: 6px;
}
.db-drop-file-preview {
  width: 100%;
  min-height: 118px;
  border-radius: 9px;
  border: 1px solid #314153;
  margin-bottom: 6px;
  background: linear-gradient(180deg, #121922, #0d1218);
  display: grid;
  place-items: center;
  text-align: center;
  gap: 6px;
  padding: 14px;
}
.db-drop-file-preview strong {
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  color: var(--db-text);
}
.db-drop-file-preview span {
  margin: 0;
  font-size: 0.76rem;
  color: var(--db-muted);
}
.image-dropzone.has-preview .drop-plus,
.image-dropzone.has-preview p {
  display: none;
}
.image-dropzone.has-preview span {
  margin-top: 2px;
}
.db-add-image {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 42px;
  border-radius: 10px;
  border-color: #556641;
  background: linear-gradient(180deg, #51613f, #3d4a30);
}
.db-tag-reference summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: var(--db-text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.76rem;
}
.db-tag-reference summary::-webkit-details-marker { display: none; }
.db-tag-reference summary::before {
  content: "▾";
  margin-right: 6px;
  color: var(--db-muted);
}
.db-tag-reference:not([open]) summary::before { content: "▸"; }
.db-tag-table {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 90px 160px 1fr 1fr;
  gap: 8px;
}
.db-tag-table > div {
  border: 1px solid var(--db-border);
  border-radius: 8px;
  background: #0d1218;
  padding: 7px 9px;
  font-size: 0.76rem;
  color: var(--db-muted);
}
.db-tag-table > div strong { color: var(--db-text); }
.db-tag-table > div:nth-child(4n + 1) { color: #d6e0a8; font-weight: 700; }
.db-toolbar {
  display: grid;
  grid-template-columns: minmax(320px, 1.45fr) minmax(180px, 0.7fr) minmax(210px, 0.9fr) auto auto;
  gap: 10px;
  align-items: center;
}
.db-toolbar input,
.db-toolbar select {
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid var(--db-border);
  background: #0d1218;
  color: var(--db-text);
  padding: 9px 11px;
}
.db-segmented {
  display: inline-flex;
  border: 1px solid var(--db-border);
  border-radius: 10px;
  overflow: hidden;
}
.db-segmented .mini-action {
  border-radius: 0;
  border: 0;
  border-right: 1px solid var(--db-border);
  min-height: 40px;
  padding: 0 12px;
  background: #171f28;
}
.db-segmented .mini-action:last-child { border-right: 0; }
#db-view-toggle { min-height: 40px; padding: 0 14px; }
#db-imagery-list { margin-top: 8px; }
.db-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}
.db-image-card {
  border: 1px solid var(--db-border);
  border-radius: 12px;
  background: #121922;
  padding: 9px;
  display: grid;
  gap: 8px;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  cursor: pointer;
}
.db-image-card:hover {
  transform: translateY(-2px);
  border-color: #5f748a;
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.36);
}
.db-image-card img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  border-radius: 9px;
  border: 1px solid #2f3c4c;
}
.db-file-card-visual {
  width: 100%;
  aspect-ratio: 16 / 11;
  border-radius: 9px;
  border: 1px solid #2f3c4c;
  background: linear-gradient(180deg, #17212c, #101720);
  display: grid;
  place-items: center;
  text-align: center;
  gap: 6px;
  padding: 12px;
}
.db-file-card-visual span {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--db-text);
}
.db-file-card-visual small {
  font-size: 0.72rem;
  color: var(--db-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.db-file-card-visual.pdf {
  background: linear-gradient(180deg, #2a1818, #171015);
  border-color: #4d2d2d;
}
.db-image-card strong {
  margin: 0;
  font-size: 0.8rem;
  color: #c8d3e0;
}
.db-image-title {
  margin: 0;
  font-size: 0.89rem;
  color: var(--db-text);
  font-weight: 700;
}
.db-image-desc {
  margin: 0;
  font-size: 0.74rem;
  color: var(--db-muted);
  min-height: 30px;
}
.db-badge-row { display: flex; flex-wrap: wrap; gap: 6px; }
.db-badge {
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.68rem;
  border: 1px solid var(--db-border);
  color: #ccd6e4;
  background: #1a2530;
}
.db-badge.status { background: #1e1a15; color: #e6c990; border-color: #5c4d37; }
.db-badge.cycle { background: #151f19; color: #bed4af; border-color: #4a5d42; }
.db-table {
  display: grid;
  grid-template-columns: 96px 1.4fr 0.9fr 1fr 120px;
  gap: 8px;
  font-size: 0.8rem;
}
.db-table > div {
  padding: 8px 10px;
  border: 1px solid var(--db-border);
  border-radius: 8px;
  background: #0f151d;
  color: var(--db-muted);
}
.db-table > div strong { color: var(--db-text); }
.db-image-preview-modal { width: min(980px, 95vw); }
.db-image-preview-body {
  display: grid;
  gap: 10px;
}
.db-image-preview-body img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border: 1px solid var(--db-border);
  border-radius: 10px;
  background: #0b1015;
}
.db-image-preview-body iframe {
  width: 100%;
  min-height: 72vh;
  border: 1px solid var(--db-border);
  border-radius: 10px;
  background: #0b1015;
}
.db-file-preview-panel {
  border: 1px solid var(--db-border);
  border-radius: 10px;
  background: #0f151d;
  min-height: 280px;
  display: grid;
  place-items: center;
  gap: 10px;
  text-align: center;
  padding: 24px;
}
.db-file-preview-panel[hidden] {
  display: none;
}
.db-file-preview-icon {
  min-width: 96px;
  min-height: 96px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  border: 1px solid #314153;
  background: #161f2a;
  color: var(--db-text);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.db-file-preview-panel p {
  margin: 0;
  color: var(--db-muted);
  font-size: 0.84rem;
}
.db-image-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.db-image-preview-meta p {
  margin: 0;
  border: 1px solid var(--db-border);
  background: #121922;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.72rem;
  color: var(--db-muted);
}
.db-image-preview-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.db-image-preview-edit {
  border: 1px solid var(--db-border);
  border-radius: 10px;
  background: #101720;
  padding: 10px;
  display: grid;
  gap: 8px;
}
.db-image-preview-edit[hidden] {
  display: none !important;
}
.db-image-preview-edit label {
  display: grid;
  gap: 6px;
  font-size: 0.74rem;
  color: var(--db-muted);
  text-transform: uppercase;
  font-weight: 700;
}
.db-image-preview-edit input,
.db-image-preview-edit select {
  min-height: 38px;
  border-radius: 9px;
  border: 1px solid var(--db-border);
  background: #0d1218;
  color: var(--db-text);
  padding: 8px 10px;
}

.brief-slides-modal {
  width: min(1360px, 95vw);
  min-height: 88vh;
  max-height: 92vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.brief-slides-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brief-slides-body {
  min-height: 0;
  display: grid;
  gap: 10px;
}

.brief-slides-empty {
  color: var(--muted);
  font-size: 0.9rem;
}

#brief-slides-frame {
  width: 100%;
  min-height: 72vh;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0b1015;
  display: none;
}

@media (max-width: 1180px) {
  .db-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .upload-col:first-child { grid-column: 1 / -1; }
  .db-toolbar { grid-template-columns: 1fr 1fr; }
  .db-segmented { grid-column: 1 / 2; }
  #db-view-toggle { grid-column: 2 / 3; }
}

@media (max-width: 800px) {
  .intel-db-content { width: 100%; }
  .imagery-db-header { flex-direction: column; align-items: flex-start; }
  .db-form,
  .db-toolbar,
  .db-tag-table,
  .db-table { grid-template-columns: 1fr; }
  .db-segmented { width: 100%; }
  .db-segmented .mini-action { flex: 1; }
  .imagery-row.compact .imagery-fields { grid-template-columns: 1fr; }
}

/* UI polish pass */
.workspace {
  padding: 16px;
}

.panel,
.lane {
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
}

.panel-heading {
  margin-bottom: 12px;
}

.panel h3,
.lane h3 {
  letter-spacing: 0.01em;
}

.icon-button,
.mini-action,
.status-button,
.delete-button,
.edit-button {
  border-radius: 10px;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.icon-button:hover,
.mini-action:hover,
.status-button:hover,
.delete-button:hover,
.edit-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.rfi-card,
.product-row,
.brief-directory-card,
.targeting-row {
  border-radius: 10px;
}

.topbar {
  margin-bottom: 14px;
}

.split-board,
.dashboard-grid,
.two-column,
.red-grid,
.map-grid,
.brief-board {
  gap: 12px;
}

.targeting-list {
  gap: 8px;
}

.targeting-row {
  padding: 11px;
}

.targeting-section {
  border-radius: 12px;
}

.f3ead-imagery-dropzone {
  border-radius: 10px;
}

.friend-map-wrap {
  border-radius: 12px;
}

body.dark-mode .panel,
body.dark-mode .lane {
  background: linear-gradient(180deg, #1a1d21, #15181b);
}

body.dark-mode .icon-button,
body.dark-mode .mini-action {
  border-color: #4a525c;
  background: #20252b;
}

/* Targeting + Imagery visual unification */
body.dark-mode .targeting-row {
  border-color: #2a3542;
  background: linear-gradient(180deg, #161d25, #11161c);
}

body.dark-mode .targeting-row.selected {
  border-color: #2a3542;
  box-shadow: none;
}

body.dark-mode .targeting-main:focus,
body.dark-mode .targeting-main:focus-visible {
  outline: none;
}

body.dark-mode .targeting-main p,
body.dark-mode .targeting-main span {
  color: #8b98a8;
}


body.dark-mode .stage-chip {
  border-color: #2a3542;
  background: #171f28;
  color: #ccd6e4;
}

body.dark-mode .stage-chip.active {
  border-color: #4a5d42;
  background: #151f19;
  color: #bed4af;
}

body.dark-mode .targeting-subtitle {
  color: #8b98a8;
}

body.dark-mode .targeting-meta-edit {
  border-color: #2a3542;
  background: linear-gradient(180deg, #161d25, #11161c);
}

body.dark-mode .targeting-meta-edit summary {
  color: #ccd6e4;
}

body.dark-mode .targeting-section {
  border-color: #2a3542;
  background: linear-gradient(180deg, #161d25, #11161c);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.24);
}

body.dark-mode .targeting-section summary {
  color: #e5e7eb;
  background: #1a2530;
}

body.dark-mode .targeting-section summary:hover {
  background: #223142;
}

body.dark-mode .targeting-section.dragover-summary {
  border-color: #5f748a;
  background: linear-gradient(180deg, #1b2a38, #15212d);
}

body.dark-mode .f3ead-imagery-dropzone {
  border-color: #2a3542;
  background: #0f151d;
}

body.dark-mode .f3ead-imagery-dropzone.dragover {
  border-color: #5f748a;
  background: #182331;
}

body.dark-mode .f3ead-chip {
  border-color: #2a3542;
  background: #1a2530;
  color: #ccd6e4;
}

body.dark-mode .target-imagery-block,
body.dark-mode .imagery-row {
  border-color: #2a3542;
  background: linear-gradient(180deg, #161d25, #11161c);
}

body.dark-mode .target-imagery-block {
  background: transparent;
}

body.dark-mode .target-image-dropzone {
  border-color: #334150;
  background: #0d1218;
}

body.dark-mode .target-image-dropzone.dragover {
  border-color: #5f748a;
  background: #182331;
}
