:root {
  --bg: #030405;
  --panel: #0d0f13;
  --panel-2: #151820;
  --ink: #f7f7fb;
  --muted: #a7adbb;
  --line: #272b36;
  --accent: #2d8cff;
  --accent-2: #75c7ff;
  --approved: #3ee58f;
  --changes: #ff6b4a;
  --pending: #d8c36d;
  --soft: #171b25;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.58);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
}

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

button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  min-height: 38px;
  border-radius: 7px;
  padding: 0 12px;
  cursor: pointer;
}

button:hover,
button.active {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 1px rgba(125, 92, 255, 0.22), 0 0 18px rgba(125, 92, 255, 0.18);
}

.app-header {
  min-height: 96px;
  padding: 20px 28px 16px;
  background: #010203;
  color: white;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid #1f2230;
}

.brand-button {
  margin: 0;
  padding: 0;
  min-height: 0;
  border: 0;
  background: transparent;
  color: white;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-button img {
  width: 76px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(45, 140, 255, 0.72));
}

.brand-button:hover {
  color: white;
  border-color: transparent;
  box-shadow: none;
}

.brand-wordmark {
  position: relative;
  display: inline-block;
  color: #f8fbff;
  font-size: 34px;
  font-weight: 900;
  font-style: italic;
  line-height: 0.95;
  letter-spacing: 0;
  text-transform: none;
  transform: skewX(-6deg);
  text-shadow:
    1px 1px 0 #69c4ff,
    2px 2px 0 #176de8,
    4px 5px 14px rgba(0, 52, 176, 0.72),
    0 0 24px rgba(45, 140, 255, 0.42);
}

.brand-wordmark::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 5px;
  bottom: -7px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(45, 140, 255, 0), #2d8cff 18%, #f8fbff 54%, rgba(45, 140, 255, 0));
  box-shadow: 0 0 13px rgba(45, 140, 255, 0.68);
  transform: skewX(-22deg);
}

.app-header p {
  margin: 5px 0 0;
  color: var(--muted);
}

body:not(.review-workspace):not(.archive-workspace) .app-shell > .toolbar,
body:not(.review-workspace):not(.archive-workspace) .app-shell > .stats {
  display: none;
}

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

.header-actions button {
  background: #f6f6fb;
  color: #11131a;
  border-color: #f6f6fb;
}

.header-actions .primary-upload-action {
  min-height: 44px;
  padding: 0 18px;
  border-color: #ff3f36;
  background: linear-gradient(180deg, #ff5a50, #c91625);
  color: #ffffff;
  font-weight: 800;
  text-transform: uppercase;
  box-shadow: 0 0 0 1px rgba(255, 91, 80, 0.28), 0 12px 28px rgba(201, 22, 37, 0.28);
}

.header-actions .primary-upload-action:hover,
.header-actions .primary-upload-action:focus-visible {
  border-color: #ff8a82;
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(255, 138, 130, 0.36), 0 0 24px rgba(255, 63, 54, 0.34), 0 14px 32px rgba(201, 22, 37, 0.34);
}

.account-panel {
  min-height: 38px;
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.account-panel span {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-panel {
  width: min(720px, calc(100% - 32px));
  margin: 18px auto 0;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(260px, 1.4fr);
  gap: 18px;
  align-items: center;
  border: 1px solid rgba(125, 92, 255, 0.36);
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(13, 15, 19, 0.98), rgba(21, 24, 32, 0.95));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.signed-out {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
}

body.signed-out .app-header,
body.signed-out .app-shell,
body.signed-out .detail-drawer,
body.signed-out .lightbox,
body.signed-out .project-move-modal,
body.signed-out .intel-shortcut,
body.signed-out .toast {
  display: none !important;
}

body.signed-out .auth-panel {
  align-self: center;
  margin: 24px auto;
}

body.intel-page.signed-out .toast {
  display: block !important;
}

body:not(.upload-owner) #uploadQuickAction {
  display: none;
}

.auth-panel h2 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  text-transform: uppercase;
}

.auth-panel p {
  margin: 0;
  color: var(--muted);
}

.auth-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
}

.auth-form input {
  min-width: 0;
}

.admin-link {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 12px;
  color: #11131a;
  background: #f6f6fb;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.app-shell {
  padding: 16px 24px 28px;
}

.legal-footer {
  margin: 0 auto;
  padding: 16px 24px 22px;
  max-width: 1480px;
  display: grid;
  gap: 7px;
  color: #9aa4b6;
  font-size: 11px;
  line-height: 1.5;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.legal-footer strong {
  color: #ff5a50;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.intel-page {
  min-height: 100vh;
}

.intel-shell {
  min-height: calc(100vh - 66px);
  display: grid;
}

.intel-panel {
  min-height: calc(100vh - 66px);
  display: grid;
  grid-template-rows: auto auto auto auto 1fr;
  background: #030405;
}

.intel-header {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background: #010203;
}

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

.intel-actions a,
.intel-launch-row a {
  min-height: 38px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--accent-2);
  text-decoration: none;
  background: var(--panel);
}

.intel-hero {
  padding: 18px 24px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.intel-hero p {
  margin: 0 0 5px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.intel-hero h1 {
  margin: 0;
  font-size: 26px;
  font-style: italic;
}

.intel-frame {
  width: 100%;
  min-height: 420px;
  border: 0;
  border-radius: 7px;
  background: #010203;
}

.intel-launch-row {
  padding: 12px 24px 18px;
}

.intel-status-panel {
  width: min(720px, calc(100% - 32px));
  place-self: center;
  padding: 18px;
  border: 1px solid rgba(45, 140, 255, 0.32);
  border-radius: 7px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.intel-status-panel h1,
.intel-status-panel h2 {
  margin: 0 0 8px;
}

.intel-status-panel p {
  margin: 0 0 12px;
  color: var(--muted);
}

.intel-toolbar {
  padding: 14px 24px 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 180px)) minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.intel-kpis {
  padding: 8px 24px 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.intel-kpis div,
.intel-card {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(13, 15, 19, 0.94);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
}

.intel-kpis div {
  padding: 12px 14px;
}

.intel-kpis strong {
  display: block;
  font-size: 26px;
}

.intel-kpis span {
  color: var(--muted);
  font-size: 12px;
}

.market-command {
  min-height: 520px;
  padding: 0 24px 14px;
  display: grid;
  grid-template-columns: minmax(220px, 0.55fr) minmax(420px, 1.45fr) minmax(220px, 0.55fr);
  gap: 12px;
}

.market-command-panel,
.market-viewport {
  min-width: 0;
  border: 1px solid rgba(45, 140, 255, 0.28);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(13, 15, 19, 0.94), rgba(3, 4, 5, 0.96)),
    radial-gradient(circle at 50% 0%, rgba(45, 140, 255, 0.18), transparent 46%);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42), inset 0 0 0 1px rgba(117, 199, 255, 0.05);
}

.market-command-panel {
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.market-viewport {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  perspective: 1100px;
  transform-style: preserve-3d;
}

.market-viewport::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 5px),
    radial-gradient(circle at 50% 48%, rgba(45, 140, 255, 0.18), transparent 45%);
  mix-blend-mode: screen;
}

.viewport-topline {
  min-height: 42px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  border-bottom: 1px solid rgba(45, 140, 255, 0.18);
}

.market-stage {
  min-height: 420px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 44%, rgba(45, 140, 255, 0.18), transparent 45%),
    linear-gradient(180deg, rgba(1, 2, 3, 0.12), rgba(1, 2, 3, 0.68));
}

.market-map {
  position: relative;
  width: min(86%, 820px);
  aspect-ratio: 1.55;
  background:
    radial-gradient(ellipse at center, rgba(45, 140, 255, 0.24), rgba(3, 4, 5, 0.05) 52%, rgba(3, 4, 5, 0.86) 76%),
    linear-gradient(135deg, transparent 0 46%, rgba(117, 199, 255, 0.08) 46% 47%, transparent 47%),
    linear-gradient(45deg, transparent 0 53%, rgba(117, 199, 255, 0.06) 53% 54%, transparent 54%);
  overflow: hidden;
  border: 1px solid rgba(117, 199, 255, 0.22);
  border-radius: 50%;
  transform: rotateX(63deg) rotateZ(-9deg) translateY(10px);
  transform-style: preserve-3d;
  box-shadow:
    0 42px 90px rgba(0, 0, 0, 0.76),
    0 0 120px rgba(45, 140, 255, 0.16),
    inset 0 0 70px rgba(45, 140, 255, 0.14);
}

.map-grid {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(117, 199, 255, 0.2);
  border-radius: 50%;
  background:
    linear-gradient(rgba(117, 199, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(117, 199, 255, 0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  box-shadow:
    0 0 0 1px rgba(45, 140, 255, 0.12),
    0 0 60px rgba(45, 140, 255, 0.22),
    inset 0 0 70px rgba(45, 140, 255, 0.11);
  transform: translateZ(0);
}

.map-grid::before,
.map-grid::after {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(117, 199, 255, 0.13);
  border-radius: 50%;
}

.map-grid::after {
  inset: 28%;
}

.map-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(117, 199, 255, 0.5);
  border-radius: 50%;
  color: #e7fbff;
  background: rgba(45, 140, 255, 0.12);
  box-shadow: 0 0 36px rgba(45, 140, 255, 0.35);
  transform: translate(-50%, -50%);
  transform-style: preserve-3d;
  font-size: 12px;
  font-weight: 900;
}

.map-core::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(117, 199, 255, 0.72), rgba(6, 47, 120, 0.42));
  transform: translate(-50%, -50%) translateZ(38px);
  box-shadow: 0 0 30px rgba(45, 140, 255, 0.52);
  z-index: -1;
}

.market-node {
  position: absolute;
  min-height: 0;
  padding: 0;
  border: 1px solid rgba(248, 251, 255, 0.82);
  border-radius: 50%;
  background: var(--pending);
  color: #050507;
  transform: translate(-50%, -50%);
  transform-style: preserve-3d;
  box-shadow: 0 0 16px rgba(216, 195, 109, 0.72);
  z-index: 2;
}

.market-node::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72%;
  height: var(--node-height);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), currentColor 18%, rgba(0, 0, 0, 0.35));
  opacity: 0.72;
  transform: translate(-50%, -100%) rotateX(-63deg) translateZ(2px);
  transform-origin: 50% 100%;
  pointer-events: none;
}

.market-node::after {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  border: 1px solid currentColor;
  opacity: 0.28;
  transform: translateZ(-1px);
}

.market-node.low {
  background: var(--approved);
  box-shadow: 0 0 16px rgba(62, 229, 143, 0.72);
}

.market-node.high {
  background: var(--changes);
  box-shadow: 0 0 16px rgba(255, 107, 74, 0.78);
}

.market-node span {
  display: none;
}

.market-ticker {
  min-height: 58px;
  padding: 10px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  border-top: 1px solid rgba(45, 140, 255, 0.18);
}

.market-ticker button {
  min-width: max-content;
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.market-ticker b {
  color: var(--accent-2);
}

.layer-list,
.command-signals {
  display: grid;
  gap: 8px;
}

.layer-row,
.command-signal {
  min-height: 48px;
  padding: 9px;
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(9, 11, 16, 0.82);
}

.layer-row {
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

.layer-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(45, 140, 255, 0.65);
}

.layer-1 {
  background: var(--approved);
}

.layer-2 {
  background: var(--pending);
}

.layer-3,
.layer-4 {
  background: var(--changes);
}

.command-signal span,
.command-signal small {
  color: var(--muted);
  font-size: 12px;
}

.command-signal.low {
  border-color: rgba(62, 229, 143, 0.34);
}

.command-signal.high {
  border-color: rgba(255, 107, 74, 0.4);
}

.intel-grid {
  padding: 0 24px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 12px;
  align-items: start;
}

.intel-card {
  min-width: 0;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.intel-wide {
  grid-column: span 1;
}

.intel-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.intel-card h2 {
  margin: 0;
  font-size: 15px;
  text-transform: uppercase;
}

.intel-card-head span,
.intel-help,
.signal-row span,
.signal-row small,
.radar-row small,
.intel-table td span {
  color: var(--muted);
  font-size: 12px;
}

.intel-radar,
.intel-signals,
.deal-output {
  display: grid;
  gap: 8px;
}

.radar-row {
  min-height: 58px;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 120px 38px;
  gap: 10px;
  align-items: center;
  text-align: left;
}

.radar-row span:first-child,
.intel-table td:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.score-meter {
  height: 8px;
  border-radius: 999px;
  background: #080a0f;
  overflow: hidden;
}

.score-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff6b4a, #d8c36d 45%, #3ee58f);
}

.risk-pill {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 9px;
  background: rgba(216, 195, 109, 0.13);
  color: var(--pending);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.risk-pill.low {
  background: rgba(62, 229, 143, 0.14);
  color: var(--approved);
}

.risk-pill.high {
  background: rgba(255, 107, 74, 0.14);
  color: var(--changes);
}

.deal-form,
.asset-form {
  display: grid;
  gap: 8px;
}

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

.asset-form {
  grid-template-columns: minmax(180px, 1.4fr) repeat(5, minmax(90px, 1fr)) auto;
}

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

.deal-output div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #090b10;
}

.deal-output span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.deal-output strong {
  font-size: 18px;
}

.signal-row {
  padding: 10px;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #090b10;
}

.intel-table-wrap {
  overflow-x: auto;
}

.intel-table {
  width: 100%;
  border-collapse: collapse;
}

.intel-table th,
.intel-table td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.intel-table th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.intel-table td {
  font-size: 13px;
}

.intel-actions-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.intel-mini-grid,
.live-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

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

.live-stat-grid div {
  min-height: 76px;
  padding: 10px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #090b10;
}

.live-stat-grid span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.live-stat-grid strong {
  font-size: 16px;
}

.intel-empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 7px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(5, minmax(132px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #090b10;
  color: var(--ink);
  border-radius: 7px;
  min-height: 38px;
  padding: 8px 10px;
}

textarea {
  resize: vertical;
}

.toggle-row {
  display: flex;
  min-width: 420px;
}

.toggle-row button {
  border-radius: 0;
  flex: 1;
}

.toggle-row button:first-child {
  border-radius: 7px 0 0 7px;
}

.toggle-row button:last-child {
  border-radius: 0 7px 7px 0;
}

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

.stats div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px 14px;
}

.stats strong {
  display: block;
  font-size: 20px;
}

.stats span {
  color: var(--muted);
  font-size: 12px;
}

.panel {
  background: rgba(13, 15, 19, 0.9);
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.hidden {
  display: none !important;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  padding: 12px;
}

.gallery.bucket-gallery {
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}

.gallery.folder-gallery {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.gallery-context {
  min-height: 58px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(21, 24, 32, 0.96), rgba(10, 12, 17, 0.96));
  display: flex;
  align-items: center;
  gap: 12px;
}

.gallery-context-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.gallery-context .back-nav,
.gallery-context .rename-project-nav {
  min-width: 142px;
  min-height: 42px;
  font-weight: 800;
}

.gallery-context .back-nav {
  border-color: rgba(45, 140, 255, 0.62);
  background: rgba(45, 140, 255, 0.14);
  color: #dceeff;
}

.gallery-context .rename-project-nav {
  border-color: rgba(62, 229, 143, 0.48);
  background: rgba(62, 229, 143, 0.12);
  color: #dfffea;
}

.gallery-context-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.gallery-context strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}

.gallery-context span {
  color: var(--muted);
  font-size: 12px;
}

.render-card {
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: var(--panel);
  cursor: pointer;
  position: relative;
  display: grid;
  grid-template-rows: 210px auto auto auto auto;
  min-width: 0;
}

.render-card.bucket-card {
  grid-template-rows: 300px auto auto auto;
}

.render-card.status-approved {
  border-color: rgba(62, 229, 143, 0.48);
}

.render-card.status-denied,
.render-card.status-flagged {
  border-color: rgba(255, 107, 74, 0.58);
}

.render-card.status-archived {
  border-color: rgba(125, 92, 255, 0.5);
}

.thumb {
  background: #010203;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.thumb img,
.thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: white;
  background: #11131a;
  font-size: 22px;
  font-weight: 650;
}

.thumb-fallback.pdf {
  background: #25151f;
}

.card-bar,
.card-meta,
.card-title,
.comment-preview,
.card-actions {
  margin: 0 11px;
}

.card-bar {
  padding-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.card-title {
  padding-top: 7px;
  font-weight: 650;
  line-height: 1.25;
  min-height: 42px;
  overflow-wrap: anywhere;
}

.card-meta {
  color: var(--muted);
  font-size: 12px;
  padding-top: 5px;
}

.comment-preview {
  margin-top: 8px;
  padding: 8px;
  background: #1c1414;
  color: #ffb29d;
  border-radius: 7px;
  font-size: 12px;
  min-height: 32px;
  overflow-wrap: anywhere;
}

.card-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 11px 0 12px;
}

.card-menu-button {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 38px;
  padding: 0;
  background: rgba(8, 9, 13, 0.92);
  color: var(--ink);
  font-weight: 700;
}

.card-menu {
  display: none;
  position: absolute;
  top: 52px;
  right: 10px;
  width: 190px;
  background: #0b0d12;
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 2;
}

.menu-open .card-menu {
  display: grid;
  gap: 6px;
}

.card-menu button {
  text-align: left;
  justify-content: start;
  width: 100%;
}

.card-menu-divider {
  display: block;
  height: 1px;
  background: var(--line);
  margin: 3px 0;
}

.card-menu .danger-menu-action {
  color: #ff8a82;
}

.card-menu .danger-menu-action:hover,
.card-menu .danger-menu-action:focus-visible {
  border-color: #ff5a50;
  color: #ffffff;
  background: rgba(255, 63, 54, 0.18);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  background: var(--soft);
  color: var(--pending);
  font-weight: 650;
}

.status-pill.approved {
  color: var(--approved);
  background: rgba(62, 229, 143, 0.13);
}

.status-pill.denied,
.status-pill.flagged {
  color: var(--changes);
  background: rgba(255, 107, 74, 0.13);
}

.status-pill.archived {
  color: var(--accent-2);
  background: rgba(125, 92, 255, 0.14);
}

.swipe-panel {
  display: grid;
  gap: 12px;
}

.swipe-card {
  min-height: calc(100vh - 290px);
  background: #010203;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  display: grid;
  grid-template-rows: 1fr auto;
}

.swipe-media {
  min-height: 420px;
  display: grid;
  place-items: center;
  background: #010203;
  cursor: zoom-in;
}

.swipe-media img,
.swipe-media video,
.swipe-media iframe {
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 340px);
  object-fit: contain;
  border: 0;
  background: #010203;
}

.swipe-info {
  min-height: 64px;
  padding: 12px 14px;
  background: var(--panel);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.swipe-info strong {
  font-size: 16px;
}

.swipe-info span:last-child {
  color: var(--muted);
}

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

.swipe-actions button {
  min-height: 52px;
  font-weight: 650;
}

.approve-action {
  border-color: rgba(62, 229, 143, 0.45);
  color: var(--approved);
}

.deny-action,
.flag-action {
  border-color: rgba(185, 80, 45, 0.45);
  color: var(--changes);
}

.empty-state {
  min-height: 280px;
  display: grid;
  place-items: center;
  color: white;
}

.pager {
  min-height: 52px;
  padding: 8px 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  background: rgba(13, 15, 19, 0.9);
  border-top: 1px solid var(--line);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  padding: 12px;
}

.project-item {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0;
  background: var(--panel);
  display: grid;
  text-align: left;
  overflow: hidden;
  position: relative;
  min-height: 310px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
}

.project-item:hover {
  transform: translateY(-1px);
}

.project-thumb {
  height: 190px;
  background: #010203;
  overflow: hidden;
}

.project-thumb .thumb {
  width: 100%;
  height: 100%;
}

.project-thumb img,
.project-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 32px;
  height: 28px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #ff334f;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.58), 0 0 18px rgba(255, 51, 79, 0.46);
  z-index: 1;
}

.project-badge.is-clear {
  background: rgba(62, 229, 143, 0.9);
  color: #04120b;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.5);
}

.bucket-folder-badge {
  background: #2d8cff;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.58), 0 0 18px rgba(45, 140, 255, 0.44);
}

.project-copy {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.project-item h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.project-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.project-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-status-row span {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 8px;
  background: var(--soft);
  color: var(--muted);
  font-size: 11px;
}

.project-empty {
  grid-column: 1 / -1;
  min-height: 240px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--muted);
  background: #07090d;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.project-empty strong {
  color: var(--ink);
  font-size: 20px;
}

.home-panel {
  padding: 14px;
  background:
    radial-gradient(circle at 14% 8%, rgba(45, 140, 255, 0.14), transparent 32%),
    rgba(13, 15, 19, 0.9);
}

.home-app-grid {
  min-height: min(620px, calc(100vh - 270px));
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.home-app-card {
  min-height: 280px;
  padding: 22px;
  display: grid;
  grid-template-rows: auto 1fr auto auto auto;
  align-content: stretch;
  justify-items: start;
  gap: 10px;
  text-align: left;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(45, 140, 255, 0.28);
  border-radius: 7px;
  background:
    linear-gradient(145deg, rgba(13, 15, 19, 0.94), rgba(4, 6, 10, 0.98)),
    radial-gradient(circle at 20% 12%, rgba(117, 199, 255, 0.2), transparent 34%);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.home-app-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 6px),
    linear-gradient(120deg, transparent, rgba(117, 199, 255, 0.08), transparent);
}

.home-app-card:hover,
.home-app-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(117, 199, 255, 0.74);
  color: var(--ink);
  box-shadow: 0 28px 86px rgba(0, 0, 0, 0.42), 0 0 30px rgba(45, 140, 255, 0.18);
}

.home-app-card.primary-review {
  border-color: rgba(255, 63, 54, 0.4);
  background:
    linear-gradient(145deg, rgba(15, 13, 16, 0.96), rgba(4, 6, 10, 0.98)),
    radial-gradient(circle at 20% 12%, rgba(255, 63, 54, 0.18), transparent 34%);
}

.home-app-kicker,
.home-app-icon,
.home-app-card strong,
.home-app-card p,
.home-app-badge {
  position: relative;
  z-index: 1;
}

.home-app-icon {
  width: 132px;
  height: 132px;
  display: block;
  border-radius: 26px;
  border: 1px solid rgba(117, 199, 255, 0.32);
  background: linear-gradient(145deg, rgba(45, 140, 255, 0.22), rgba(3, 4, 5, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 34px rgba(45, 140, 255, 0.2);
}

.review-icon {
  background:
    linear-gradient(90deg, transparent 31%, rgba(255, 255, 255, 0.16) 31% 34%, transparent 34% 65%, rgba(255, 255, 255, 0.16) 65% 68%, transparent 68%),
    linear-gradient(0deg, transparent 31%, rgba(255, 255, 255, 0.16) 31% 34%, transparent 34% 65%, rgba(255, 255, 255, 0.16) 65% 68%, transparent 68%),
    linear-gradient(145deg, rgba(255, 63, 54, 0.46), rgba(4, 6, 10, 0.78));
}

.review-icon::after {
  content: "";
  position: absolute;
  left: 41px;
  top: 53px;
  width: 50px;
  height: 27px;
  border-left: 10px solid #fff;
  border-bottom: 10px solid #fff;
  transform: rotate(-45deg);
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.32));
}

.tools-icon {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(45, 140, 255, 0.34), rgba(4, 6, 10, 0.78));
}

.tools-icon::before,
.tools-icon::after,
.archive-icon::after {
  content: none;
}

.home-app-icon svg {
  width: 86%;
  height: 86%;
  overflow: visible;
  filter: drop-shadow(0 0 16px rgba(117, 199, 255, 0.34));
}

.tools-icon svg path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tools-icon .tool-handle,
.tools-icon .driver-handle {
  stroke: #dff3ff;
  stroke-width: 12;
}

.tools-icon .tool-head {
  fill: #2d8cff;
  stroke: #f8fbff;
  stroke-width: 4;
}

.tools-icon .driver-shaft {
  stroke: #83c7ff;
  stroke-width: 9;
}

.tools-icon .driver-tip {
  stroke: #f8fbff;
  stroke-width: 10;
}

.archive-icon {
  display: grid;
  place-items: center;
  background:
    linear-gradient(145deg, rgba(45, 140, 255, 0.28), rgba(4, 6, 10, 0.78));
}

.archive-icon .shelf-frame {
  fill: rgba(4, 6, 10, 0.34);
  stroke: #f8fbff;
  stroke-width: 5;
}

.archive-icon .shelf-line {
  fill: none;
  stroke: #f8fbff;
  stroke-width: 5;
  stroke-linecap: round;
}

.archive-icon .book {
  stroke: rgba(248, 251, 255, 0.78);
  stroke-width: 2;
}

.archive-icon .book-a {
  fill: #2d8cff;
}

.archive-icon .book-b {
  fill: #75c7ff;
}

.archive-icon .book-c {
  fill: #ff5a50;
}

.home-app-kicker {
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.home-app-card strong {
  font-size: clamp(28px, 3vw, 44px);
  font-style: italic;
  line-height: 0.95;
  text-shadow: 0 0 20px rgba(45, 140, 255, 0.28);
}

.home-app-card p {
  margin: 0;
  max-width: 28rem;
  color: var(--muted);
  line-height: 1.45;
}

.home-app-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  min-width: 34px;
  height: 30px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #ff334f;
  color: #fff;
  font-weight: 900;
  font-size: 13px;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.58), 0 0 18px rgba(255, 51, 79, 0.48);
}

.home-app-badge.neutral {
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.58), 0 0 18px rgba(45, 140, 255, 0.44);
}

.home-app-badge.is-clear {
  background: rgba(62, 229, 143, 0.92);
  color: #04120b;
}

.tools-panel {
  padding: 14px;
}

.tool-queue-strip {
  margin-bottom: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(117, 199, 255, 0.24);
  border-radius: 7px;
  background: #080a0f;
}

.tool-queue-strip div {
  display: grid;
  gap: 3px;
}

.tool-queue-strip span {
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.tool-queue-strip strong {
  font-size: 16px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.tool-card {
  min-height: 210px;
  padding: 18px;
  display: grid;
  align-content: end;
  gap: 8px;
  border: 1px solid rgba(45, 140, 255, 0.24);
  border-radius: 7px;
  color: var(--ink);
  text-decoration: none;
  background:
    linear-gradient(145deg, rgba(13, 15, 19, 0.94), rgba(5, 8, 13, 0.98)),
    radial-gradient(circle at 18% 12%, rgba(117, 199, 255, 0.22), transparent 34%);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
  position: relative;
}

.tool-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(117, 199, 255, 0.1), transparent),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 5px);
  opacity: 0.58;
}

.tool-card::after {
  content: none;
}

.tool-card:hover,
.tool-card:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(117, 199, 255, 0.68);
  color: var(--ink);
  box-shadow: 0 22px 62px rgba(0, 0, 0, 0.36), 0 0 28px rgba(45, 140, 255, 0.18);
  outline: 0;
}

.tool-card span,
.tool-logo,
.tool-card strong,
.tool-card p {
  position: relative;
  z-index: 1;
}

.tool-card > span:not(.tool-logo) {
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.tool-logo {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(117, 199, 255, 0.48);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(45, 140, 255, 0.74), rgba(3, 4, 5, 0.2));
  color: #fff;
  font-size: 15px;
  font-weight: 950;
  font-style: italic;
  letter-spacing: 0;
  box-shadow: 0 0 28px rgba(45, 140, 255, 0.22);
}

.plancheck-logo {
  border-color: rgba(255, 63, 54, 0.5);
  background: linear-gradient(135deg, rgba(255, 63, 54, 0.86), rgba(20, 8, 10, 0.32));
}

.refiner-logo::before {
  content: "";
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background:
    linear-gradient(90deg, transparent 45%, rgba(255, 255, 255, 0.55) 45% 55%, transparent 55%),
    linear-gradient(0deg, transparent 45%, rgba(255, 255, 255, 0.55) 45% 55%, transparent 55%),
    linear-gradient(135deg, #68e6ff, #2d8cff);
}

.morpher-logo::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 20px solid #fff;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.42));
}

.atlas-logo {
  border-color: rgba(179, 255, 77, 0.56);
  background:
    linear-gradient(90deg, transparent 48%, rgba(179, 255, 77, 0.32) 48% 52%, transparent 52%),
    linear-gradient(0deg, transparent 48%, rgba(179, 255, 77, 0.24) 48% 52%, transparent 52%),
    radial-gradient(circle at 50% 50%, rgba(179, 255, 77, 0.9) 0 4px, transparent 5px),
    linear-gradient(135deg, rgba(15, 118, 110, 0.82), rgba(3, 4, 5, 0.2));
  color: #eaffc5;
  text-shadow: 0 0 14px rgba(179, 255, 77, 0.72);
}

.market-logo {
  background:
    radial-gradient(circle at 50% 50%, rgba(131, 255, 233, 0.9) 0 3px, transparent 4px),
    linear-gradient(90deg, transparent 47%, rgba(131, 255, 233, 0.45) 47% 53%, transparent 53%),
    linear-gradient(0deg, transparent 47%, rgba(131, 255, 233, 0.45) 47% 53%, transparent 53%),
    linear-gradient(135deg, rgba(45, 140, 255, 0.74), rgba(3, 4, 5, 0.2));
}

.cooper-logo {
  color: #fff;
  font-size: 28px;
  background: linear-gradient(135deg, #7658ff, #1a41ff);
}

.tool-card strong {
  font-size: 24px;
  font-style: italic;
  line-height: 1;
  text-shadow: 0 0 18px rgba(45, 140, 255, 0.22);
}

.tool-card p {
  margin: 0;
  max-width: 34rem;
  color: var(--muted);
  line-height: 1.45;
}

.tool-card-primary {
  border-color: rgba(255, 63, 54, 0.36);
  background:
    linear-gradient(145deg, rgba(15, 13, 16, 0.96), rgba(5, 8, 13, 0.98)),
    radial-gradient(circle at 18% 12%, rgba(255, 63, 54, 0.2), transparent 34%);
}

.upload-panel {
  padding: 0;
}

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

.upload-form > div:first-child,
.upload-file-field,
.upload-status {
  grid-column: 1 / -1;
}

.upload-form h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.upload-form p {
  margin: 0;
  color: var(--muted);
}

.upload-file-field input {
  min-height: 96px;
  padding: 28px 14px;
  border-style: dashed;
  background: #06080c;
}

.upload-form button {
  justify-self: start;
  min-width: 140px;
  background: #f6f6fb;
  color: #11131a;
  border-color: #f6f6fb;
}

.upload-status {
  font-size: 12px;
}

.admin-rows {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.admin-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
}

.admin-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.admin-row p {
  margin: 8px 0 0;
}

.detail-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(560px, 100vw);
  height: 100vh;
  background: var(--panel);
  box-shadow: var(--shadow);
  border-left: 1px solid var(--line);
  transform: translateX(105%);
  transition: transform 160ms ease;
  z-index: 10;
  padding: 18px;
  display: grid;
  grid-template-rows: auto auto minmax(120px, 1fr) auto auto auto;
  gap: 14px;
}

.detail-drawer.open {
  transform: translateX(0);
}

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

.drawer-header p {
  margin: 0 0 5px;
  color: var(--accent-2);
  font-size: 12px;
  text-transform: uppercase;
}

.drawer-header h2 {
  margin: 0;
  font-size: 19px;
  overflow-wrap: anywhere;
}

.detail-preview {
  display: none;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: #010203;
  min-height: 80px;
  cursor: zoom-in;
}

.detail-preview.has-media {
  display: block;
}

.detail-preview img,
.detail-preview video,
.detail-preview iframe {
  display: block;
  width: 100%;
  max-height: 360px;
  border: 0;
  object-fit: contain;
  background: #111716;
}

.detail-preview .file-card {
  padding: 12px;
  display: grid;
  gap: 4px;
}

dl {
  margin: 0;
  overflow: auto;
}

dt {
  color: var(--muted);
  font-size: 12px;
  margin-top: 10px;
}

dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}

.review-controls {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.rating-control {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.rating-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rating-buttons {
  display: flex;
  gap: 6px;
}

.rating-buttons button {
  min-width: 38px;
  padding: 0;
  font-size: 20px;
  color: var(--pending);
}

.rating-buttons button.active {
  border-color: var(--pending);
  background: rgba(216, 195, 109, 0.16);
}

#confirmRating {
  min-height: 38px;
}

#confirmRating.pending-confirm {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(125, 92, 255, 0.14);
}

#markApproved.active {
  border-color: var(--approved);
  color: var(--approved);
}

#markChanges.active {
  border-color: var(--changes);
  color: var(--changes);
}

#markDenied.active {
  border-color: var(--changes);
  color: var(--changes);
}

#markArchived.active {
  border-color: var(--accent);
  color: var(--accent);
}

#markPending.active {
  border-color: var(--pending);
  color: var(--pending);
}

.note-field {
  font-size: 13px;
}

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

.drawer-actions button,
.drawer-actions a {
  min-height: 38px;
}

.drawer-actions a {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 12px;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.drawer-actions button:first-child {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translate(-50%, 90px);
  background: #17211f;
  color: white;
  border-radius: 7px;
  padding: 10px 14px;
  transition: transform 160ms ease;
  z-index: 20;
}

.toast.show {
  transform: translate(-50%, 0);
}

.intel-shortcut {
  position: fixed;
  right: 14px;
  bottom: 14px;
  width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border: 1px solid rgba(45, 140, 255, 0.18);
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(248, 251, 255, 0.95) 0 18%, rgba(45, 140, 255, 0.92) 46%, rgba(6, 47, 120, 0.92) 100%);
  box-shadow: 0 0 12px rgba(45, 140, 255, 0.18);
  opacity: 0.42;
  z-index: 12;
}

.intel-shortcut:hover,
.intel-shortcut:focus-visible {
  opacity: 0.85;
  border-color: rgba(117, 199, 255, 0.7);
  box-shadow: 0 0 18px rgba(45, 140, 255, 0.42);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(10, 14, 13, 0.94);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
  padding: 14px;
}

.lightbox button {
  justify-self: end;
  background: #f6f6fb;
  color: #11131a;
}

.lightbox-media {
  min-height: 0;
  display: grid;
  place-items: center;
}

.lightbox-media img,
.lightbox-media video,
.lightbox-media iframe {
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 78px);
  object-fit: contain;
  border: 0;
}

.project-move-modal {
  position: fixed;
  inset: 0;
  z-index: 36;
  padding: 18px;
  background: rgba(3, 4, 5, 0.82);
  display: grid;
  place-items: center;
}

.project-move-card {
  width: min(520px, 100%);
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(45, 140, 255, 0.46);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(21, 24, 32, 0.98), rgba(8, 10, 14, 0.98));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.project-move-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.project-move-header div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.project-move-header span,
.project-move-hint {
  color: var(--muted);
  font-size: 12px;
}

.project-move-header strong {
  overflow-wrap: anywhere;
  font-size: 18px;
}

.project-picker-row {
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 8px;
}

.plus-project-button {
  padding: 0;
  min-width: 48px;
  font-size: 20px;
  font-weight: 900;
  border-color: rgba(62, 229, 143, 0.48);
  background: rgba(62, 229, 143, 0.12);
  color: #dfffea;
}

.plus-project-button.active {
  font-size: 13px;
}

.project-move-hint {
  margin: 0;
  min-height: 18px;
}

.project-move-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.project-move-actions button[type="submit"] {
  border-color: #2d8cff;
  background: #2d8cff;
  color: white;
  font-weight: 800;
}

.intel-page .market-stage {
  min-height: 520px;
  padding: 12px;
  display: block;
  background:
    radial-gradient(circle at 50% 44%, rgba(45, 140, 255, 0.18), transparent 45%),
    linear-gradient(180deg, rgba(1, 2, 3, 0.22), rgba(1, 2, 3, 0.72));
}

.intel-page .market-map {
  width: 100%;
  height: 100%;
  min-height: 496px;
  aspect-ratio: auto;
  border-radius: 7px;
  border: 1px solid rgba(117, 199, 255, 0.25);
  background: #06101c;
  overflow: hidden;
  transform: none;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.68),
    0 0 90px rgba(45, 140, 255, 0.16),
    inset 0 0 0 1px rgba(117, 199, 255, 0.07);
}

.intel-page .leaflet-container {
  background: #06101c;
  color: #06101c;
  font: inherit;
}

.intel-page .leaflet-control-zoom a,
.intel-page .leaflet-control-attribution {
  background: rgba(3, 4, 5, 0.84);
  color: #dceeff;
  border-color: rgba(117, 199, 255, 0.24);
}

.intel-page .leaflet-control-attribution a {
  color: var(--accent-2);
}

.intel-page .leaflet-popup-content-wrapper,
.intel-page .leaflet-popup-tip {
  background: #07101b;
  color: #f7f7fb;
  border: 1px solid rgba(117, 199, 255, 0.22);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.58);
}

.intel-map-marker {
  display: grid !important;
  place-items: center;
  border-radius: 50%;
  border: 2px solid rgba(248, 251, 255, 0.94);
  color: #030405;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 0 20px rgba(45, 140, 255, 0.62);
}

.intel-map-marker.low {
  background: var(--approved);
}

.intel-map-marker.medium {
  background: var(--pending);
}

.intel-map-marker.high {
  background: var(--changes);
}

.map-action-row {
  min-height: 46px;
  padding: 8px 12px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid rgba(45, 140, 255, 0.16);
}

.map-action-row button {
  min-height: 32px;
}

.map-action-row span {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

@media (max-width: 1180px) {
  .toolbar {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .toggle-row {
    min-width: 100%;
    flex-wrap: wrap;
  }

  .toggle-row button {
    min-width: 33.333%;
  }
}

@media (max-width: 980px) {
  .intel-toolbar,
  .intel-kpis,
  .market-command,
  .intel-grid,
  .asset-form {
    grid-template-columns: 1fr 1fr;
  }

  .intel-card,
  .intel-wide,
  .market-viewport {
    grid-column: span 2;
  }
}

@media (max-width: 720px) {
  .app-header {
    align-items: stretch;
    padding: 18px;
    flex-direction: column;
  }

  .header-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .account-panel {
    justify-content: stretch;
  }

  .account-panel button {
    width: 100%;
  }

  .auth-panel,
  .auth-form {
    grid-template-columns: 1fr;
  }

  .app-shell {
    padding: 10px;
  }

  .toolbar,
  .stats,
  .intel-toolbar,
  .intel-kpis,
  .market-command,
  .intel-grid,
  .asset-form,
  .intel-mini-grid,
  .live-stat-grid,
  .deal-form,
  .deal-output {
    grid-template-columns: 1fr;
  }

  .intel-card,
  .intel-wide,
  .market-viewport {
    grid-column: span 1;
  }

  .market-map {
    min-height: 340px;
  }

  .intel-header,
  .intel-actions {
    align-items: stretch;
    flex-direction: column;
  }

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

  .gallery {
    grid-template-columns: 1fr;
    padding: 8px;
  }

  .gallery-context {
    align-items: stretch;
    flex-direction: column;
  }

  .gallery-context-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .gallery-context .back-nav,
  .gallery-context .rename-project-nav {
    width: 100%;
  }

  .project-move-header,
  .project-move-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .project-move-actions button {
    width: 100%;
  }

  .home-app-grid {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .home-app-card {
    min-height: 190px;
  }

  .home-app-icon {
    width: 92px;
    height: 92px;
    border-radius: 20px;
  }

  .review-icon::after {
    left: 28px;
    top: 36px;
    width: 34px;
    height: 18px;
    border-left-width: 7px;
    border-bottom-width: 7px;
  }

  .home-app-icon svg {
    width: 84%;
    height: 84%;
  }

  .gallery.bucket-gallery {
    grid-template-columns: 1fr;
  }

  .render-card {
    grid-template-rows: 260px auto auto auto auto;
  }

  .render-card.bucket-card {
    grid-template-rows: 340px auto auto auto;
  }

  .review-controls {
    grid-template-columns: 1fr;
  }

  .rating-control {
    grid-template-columns: 1fr;
  }

  .swipe-card {
    min-height: 58vh;
  }

  .swipe-media {
    min-height: 360px;
  }

  .swipe-actions {
    grid-template-columns: 1fr;
  }
}
