/* ══════════════════════════════════════════════════════════════════════
   BIGSAMS OMS — UI REDesign Preview
   Consistent palette + motion layer. Safe to delete this whole folder.
   ══════════════════════════════════════════════════════════════════════ */

:root {
  /* ── Navy shell + slate blue accent (original palette) ── */
  --ink: #0a1729;
  --ink-2: #1b2944;
  --ink-3: #2c3a55;
  --muted: #5e6a82;
  --muted-2: #8c97ad;
  --line: #e1e5ec;
  --line-2: #edeff4;
  --bg: #f3f5f8;
  --bg-2: #f9fafc;
  --surface: #ffffff;

  --accent: #1c4fcf;
  --accent-2: #2d63e0;
  --accent-3: #0e3aa8;
  --accent-soft: #eaf0fd;
  --accent-tint: #dbe5fa;
  --accent-glow: rgba(28, 79, 207, 0.18);

  --ok: #1f6a3f;
  --ok-2: #248750;
  --ok-soft: #e3efe9;
  --ok-tint: #cee2d6;

  --warn: #8a5a00;
  --warn-2: #a06d0c;
  --warn-soft: #fbf2dd;

  --danger: #8a1f2b;
  --danger-2: #a82736;
  --danger-soft: #f7e6e8;

  /* ── Shell — dark navy (not green) ───────────────────────────────── */
  --shell-bg: #0b1020;
  --shell-bg-2: #111827;
  --shell-border: rgba(255, 255, 255, 0.09);
  --shell-text: rgba(255, 255, 255, 0.76);
  --shell-text-bright: rgba(255, 255, 255, 0.92);
  --shell-text-muted: rgba(255, 255, 255, 0.38);
  --shell-accent: #7a9fd4;
  --shell-accent-soft: rgba(28, 79, 207, 0.16);
  --shell-hover: rgba(255, 255, 255, 0.07);

  --r: 8px;
  --r-sm: 6px;
  --r-lg: 12px;

  --s1: 0 1px 2px rgba(15, 23, 42, 0.04), 0 0 0 1px rgba(15, 23, 42, 0.02);
  --s2: 0 4px 16px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
  --s3: 0 16px 40px rgba(15, 23, 42, 0.12), 0 6px 12px rgba(15, 23, 42, 0.06);

  /* ── Motion tokens ───────────────────────────────────────────────── */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-snap: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 0.14s;
  --dur-base: 0.22s;
  --dur-slow: 0.38s;
}

/* ── Page background ───────────────────────────────────────────────── */
body {
  background: var(--bg) !important;
  background-image: radial-gradient(rgba(10, 23, 41, 0.025) 1px, transparent 1px) !important;
  background-size: 18px 18px !important;
}

/* ── Extended keyframes ────────────────────────────────────────────── */
@keyframes uiFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@keyframes uiFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes uiScaleIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes uiSlideRight {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: none; }
}

@keyframes uiShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes uiPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.92); }
}

@keyframes uiGlow {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
  50% { box-shadow: 0 0 0 6px transparent; }
}

@keyframes uiNavIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: none; }
}

@keyframes uiRowIn {
  from { opacity: 0; transform: translateX(-4px); }
  to { opacity: 1; transform: none; }
}

/* ── Page & content enter ──────────────────────────────────────────── */
.page {
  animation: uiFadeUp var(--dur-base) var(--ease-out) both !important;
}

.card {
  transition:
    transform var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    border-color var(--dur-fast) ease !important;
}

.card:hover {
  transform: translateY(-2px) !important;
  box-shadow: var(--s2) !important;
  border-color: color-mix(in srgb, var(--accent) 20%, var(--line)) !important;
}

.card-h {
  transition: background var(--dur-fast) ease !important;
}

.kpi {
  animation: uiScaleIn var(--dur-base) var(--ease-out) both;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out) !important;
}

.kpi:nth-child(1) { animation-delay: 0.04s; }
.kpi:nth-child(2) { animation-delay: 0.08s; }
.kpi:nth-child(3) { animation-delay: 0.12s; }
.kpi:nth-child(4) { animation-delay: 0.16s; }
.kpi:nth-child(5) { animation-delay: 0.20s; }

.kpi:hover {
  transform: translateY(-3px) scale(1.01) !important;
}

/* ── Buttons ───────────────────────────────────────────────────────── */
.btn {
  transition:
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    background var(--dur-fast) ease,
    border-color var(--dur-fast) ease !important;
}

.btn:hover {
  transform: translateY(-2px) !important;
}

.btn.p {
  background: linear-gradient(135deg, var(--accent-2), var(--accent)) !important;
  box-shadow: 0 2px 8px rgba(28, 79, 207, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.btn.p:hover {
  box-shadow: 0 6px 20px rgba(28, 79, 207, 0.38) !important;
}

/* ── Tables ────────────────────────────────────────────────────────── */
.li-tbl tbody tr {
  transition: background var(--dur-fast) ease, transform var(--dur-fast) ease !important;
}

.li-tbl tbody tr:hover {
  background: var(--accent-soft) !important;
}

/* ── Inputs focus glow ─────────────────────────────────────────────── */
.inp:focus,
.sel:focus,
.ta:focus {
  box-shadow: 0 0 0 3px var(--accent-tint), 0 0 0 1px var(--accent) !important;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-base) var(--ease-out) !important;
}

/* ── Modals & dropdowns ────────────────────────────────────────────── */
.modal-card {
  animation: uiScaleIn var(--dur-base) var(--ease-snap) both !important;
}

.modal-bd {
  animation: uiFadeIn var(--dur-fast) ease both !important;
  backdrop-filter: blur(8px) !important;
}

.cust-drop {
  animation: uiScaleIn var(--dur-base) var(--ease-out) both !important;
}

/* ── Stage nav tabs ────────────────────────────────────────────────── */
.sn-item,
.stage-nav-item {
  transition: color var(--dur-fast) ease, border-color var(--dur-base) var(--ease-out) !important;
}

.sn-item.active::after,
.stage-nav-item.active::after {
  box-shadow: 0 0 12px var(--accent-glow) !important;
}

/* ── Sidebar shell — deep teal dark ────────────────────────────────── */
aside {
  background: linear-gradient(180deg, var(--shell-bg) 0%, var(--shell-bg-2) 100%) !important;
  border-right: 1px solid var(--shell-border) !important;
  box-shadow: 4px 0 28px rgba(0, 0, 0, 0.28), inset -1px 0 0 rgba(28, 79, 207, 0.08) !important;
}

/* ── Topbar shell — matches sidebar ────────────────────────────────── */
.oms-topbar-main,
.oms-topbar-main.shrink-0,
header.oms-topbar-main,
header.oms-topbar-main.shrink-0 {
  background: linear-gradient(180deg, var(--shell-bg) 0%, rgba(20, 36, 32, 0.98) 100%) !important;
  border-bottom: 1px solid var(--shell-border) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.22) !important;
  animation: uiFadeIn var(--dur-base) ease both !important;
}

/* ── Nav items (App.tsx class hooks) ───────────────────────────────── */
.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 36px;
  width: calc(100% - 16px);
  margin: 1px 8px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  outline: none;
  border-left: 2px solid transparent;
  background: transparent;
  color: var(--shell-text);
  text-align: left;
  position: relative;
  overflow: hidden;
  transition:
    background var(--dur-fast) var(--ease-out),
    color var(--dur-fast) ease,
    transform var(--dur-fast) var(--ease-out),
    border-color var(--dur-base) ease,
    box-shadow var(--dur-base) ease;
  animation: uiNavIn var(--dur-base) var(--ease-out) both;
}

aside nav .nav-item:nth-child(1) { animation-delay: 0.02s; }
aside nav .nav-item:nth-child(2) { animation-delay: 0.04s; }
aside nav .nav-item:nth-child(3) { animation-delay: 0.06s; }
aside nav .nav-item:nth-child(4) { animation-delay: 0.08s; }
aside nav .nav-item:nth-child(5) { animation-delay: 0.10s; }
aside nav .nav-item:nth-child(6) { animation-delay: 0.12s; }
aside nav .nav-item:nth-child(7) { animation-delay: 0.14s; }
aside nav .nav-item:nth-child(8) { animation-delay: 0.16s; }
aside nav .nav-item:nth-child(n+9) { animation-delay: 0.18s; }

.nav-item:hover:not(.nav-item--active) {
  background: var(--shell-hover);
  color: var(--shell-text-bright);
  transform: translateX(4px);
  box-shadow: inset 3px 0 0 rgba(28, 79, 207, 0.35);
}

.nav-item:hover:not(.nav-item--active) .nav-item__icon {
  color: var(--shell-accent);
  transform: scale(1.12) translateX(1px);
}

.nav-item:active {
  transform: scale(0.98) translateX(2px) !important;
  transition-duration: 0.08s !important;
}

.nav-item--active {
  background: var(--shell-accent-soft) !important;
  color: var(--shell-accent) !important;
  border-left-color: var(--shell-accent) !important;
  box-shadow: inset 0 0 0 1px rgba(28, 79, 207, 0.22);
  font-weight: 600;
}

.nav-item__icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--shell-text-muted);
  transition: color var(--dur-fast) ease, transform var(--dur-fast) var(--ease-out);
}

.nav-item--active .nav-item__icon {
  color: var(--shell-accent);
}

/* ── Shell utility classes ─────────────────────────────────────────── */
.shell-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-base) ease;
}

.shell-user-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.topbar-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-sm);
  color: var(--shell-text);
  cursor: pointer;
  transition:
    background var(--dur-fast) ease,
    transform var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) ease,
    color var(--dur-fast) ease;
}

.topbar-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--shell-accent);
  border-color: rgba(28, 79, 207, 0.4);
  transform: translateY(-1px);
}

.live-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--r-sm);
  background: rgba(28, 79, 207, 0.14);
  border: 1px solid rgba(28, 79, 207, 0.28);
  color: var(--shell-accent);
  font-size: 11px;
  font-weight: 600;
}

.live-pill__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok-2);
  animation: uiPulse 2s ease infinite;
}

/* ── Login page ────────────────────────────────────────────────────── */
.sign-in-panel,
[class*="sign-in"] {
  animation: uiFadeUp var(--dur-slow) var(--ease-out) both;
}

/* ── Toast notifications ───────────────────────────────────────────── */
.fixed.top-4.right-4 > div {
  animation: uiSlideRight var(--dur-base) var(--ease-snap) both !important;
}

/* ── Pills & badges accent remap ───────────────────────────────────── */
.pill.accent {
  background: var(--accent-soft) !important;
  color: var(--accent) !important;
  border-color: var(--accent-tint) !important;
}

.pg-icon {
  background: linear-gradient(135deg, var(--accent-2), var(--accent-3)) !important;
  box-shadow: 0 8px 24px var(--accent-glow) !important;
  animation: uiScaleIn var(--dur-base) var(--ease-out) both;
}

.ab {
  background: linear-gradient(180deg, var(--accent-2), var(--accent)) !important;
}

/* ── Emerald → accent remap (keep success green) ───────────────────── */
.bg-emerald-600:not(aside *):not(header *):not(.live-dot):not([class*="status"]) {
  background: linear-gradient(135deg, var(--accent-2), var(--accent)) !important;
}

.text-emerald-600:not(aside *):not(header *),
.text-emerald-500:not(aside *):not(header *) {
  color: var(--accent) !important;
}

/* ── Reduced motion ────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Shell layout utilities (App.tsx) ──────────────────────────────── */
.shell-header-row {
  height: 54px;
  padding: 0 20px;
  border-bottom: 1px solid var(--shell-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  flex-shrink: 0;
}

.shell-logo-box {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(28, 79, 207, 0.12);
  border: 1px solid rgba(28, 79, 207, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.shell-brand-text {
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.02em;
  color: var(--shell-text-bright);
}

.shell-brand-dim {
  color: var(--shell-text-muted);
  font-weight: 400;
  margin-left: 6px;
}

.shell-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--shell-text-muted);
  padding: 18px 20px 6px;
  user-select: none;
}

.shell-section-label--compact {
  padding-top: 14px;
}

.shell-icon-btn {
  color: var(--shell-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.14s ease, background 0.14s ease;
}

.shell-icon-btn:hover {
  color: var(--shell-accent);
  background: var(--shell-hover);
}

.shell-user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--shell-text-bright);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0;
}

.shell-footer-version {
  padding: 0 10px 6px;
  font-size: 10px;
  color: var(--shell-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.shell-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.35);
  backdrop-filter: blur(4px);
  z-index: 40;
  animation: uiFadeIn var(--dur-base) ease both;
}

.shell-logout-btn {
  color: var(--shell-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.14s ease, background 0.14s ease;
}

.shell-logout-btn:hover {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.12);
}

.shell-logout-btn:active {
  transform: scale(0.92);
}

/* ── Hover / hand-feel micro-interactions ──────────────────────────── */
@keyframes uiIconPop {
  0% { transform: scale(1); }
  55% { transform: scale(1.14) translateX(1px); }
  100% { transform: scale(1.08) translateX(1px); }
}

.btn:active {
  transform: translateY(0) scale(0.97) !important;
  transition-duration: 0.08s !important;
}

.topbar-btn:active,
.shell-icon-btn:active,
.oms-topbar-menu:active {
  transform: scale(0.92) !important;
  transition-duration: 0.08s !important;
}

.sn-item,
.stage-nav-item {
  transition:
    color var(--dur-fast) ease,
    border-color var(--dur-base) var(--ease-out),
    transform var(--dur-fast) var(--ease-out) !important;
}

.sn-item:hover:not(.active),
.stage-nav-item:hover:not(.active) {
  transform: translateY(-1px);
  color: var(--ink-2);
}

.sn-item:active,
.stage-nav-item:active {
  transform: translateY(0) scale(0.98);
}

.back:hover {
  transform: translateX(-3px);
}

.back {
  transition: color var(--dur-fast) ease, transform var(--dur-fast) var(--ease-out) !important;
}

.li-tbl tbody tr:hover {
  transform: translateX(2px);
}

.pipeline-page .mission-card {
  transition:
    transform var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    border-color var(--dur-fast) ease !important;
}

.pipeline-page .mission-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--s2);
  border-color: color-mix(in srgb, var(--accent) 22%, var(--line));
}

.shell-user-avatar:active {
  transform: scale(0.94);
}

/* Interactive cursor hint */
.nav-item,
.btn,
.topbar-btn,
.shell-icon-btn,
.sn-item,
.stage-nav-item,
.mission-card,
.back {
  cursor: pointer;
}
