/* ═════════════════════════════════════════════════════════════════════════
   XEPIC LABS — QUANTITATIVE TRADING SETTINGS DASHBOARD DESIGN SYSTEM
   ═════════════════════════════════════════════════════════════════════════ */

:root {
  color-scheme: dark;
  /* Color Palette */
  --bg-primary: #080c14;
  --bg-secondary: #0f172a;
  --bg-tertiary: #1e293b;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --bg-input: rgba(11, 17, 32, 0.9);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(6, 182, 212, 0.6);
  --border-glow: rgba(6, 182, 212, 0.3);

  /* Accents */
  --cyan: #06b6d4;
  --cyan-glow: rgba(6, 182, 212, 0.4);
  --purple: #8b5cf6;
  --purple-glow: rgba(139, 92, 246, 0.4);
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.4);
  --amber: #f59e0b;
  --amber-glow: rgba(245, 158, 11, 0.4);
  --rose: #f43f5e;
  --rose-glow: rgba(244, 63, 94, 0.4);

  /* Typography */
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Elevations & Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --shadow-glow: 0 0 25px rgba(6, 182, 212, 0.25);
  --backdrop-blur: blur(16px);
}

/* ── MODERN CSS RESET & NORMALIZATION ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  color-scheme: dark;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── SCROLLBAR NORMALIZATION ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(11, 17, 32, 0.6);
}

::-webkit-scrollbar-thumb {
  background: rgba(6, 182, 212, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(6, 182, 212, 0.6);
}

/* ── AMBIENT BACKGROUND GLOWS ── */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.25;
}

.glow-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--cyan) 0%, transparent 70%);
  top: -100px;
  right: -50px;
}

.glow-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--purple) 0%, transparent 70%);
  bottom: -150px;
  left: -100px;
}

.glow-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--emerald) 0%, transparent 70%);
  top: 40%;
  left: 35%;
  opacity: 0.15;
}

/* ── LAYOUT CONTAINER ── */
.layout-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  box-sizing: border-box;
}

/* ── STICKY HEADER ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  background: transparent;
}

/* ── APP BODY (sidebar + content) ── */
.app-body {
  display: flex;
  flex: 1;
  gap: 0;
  overflow: hidden;
}

/* ── GLASS CARD BASE ── */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px var(--cyan-glow);
}

.brand-badge .inner-core {
  width: 17px;
  height: 17px;
  border-radius: 4px;
  background: var(--bg-primary);
}

.brand-title {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: linear-gradient(90deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
}

/* ── HEADER STATUS GROUP ── */
.header-status-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-clock-display {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
  line-height: 1.2;
}

.clock-date {
  font-size: 0.85rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
}

.clock-time {
  font-family: var(--font-mono);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--emerald);
  letter-spacing: 0.04em;
  text-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
}

.header-status-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
}

.header-status-divider {
  width: 1px;
  height: 28px;
  background: var(--border-subtle);
}

/* ── SESSION PILL ── */
.header-session-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid;
  transition: all 0.3s ease;
}

.session-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* New York — emerald */
.session-newyork {
  color: #00e676;
  border-color: rgba(0, 230, 118, 0.35);
  background: rgba(0, 230, 118, 0.08);
}

.session-dot-newyork {
  background: #00e676;
  box-shadow: 0 0 8px #00e676;
  animation: dotPulse 2s ease-in-out infinite;
}

/* London — blue */
.session-london {
  color: #42a5f5;
  border-color: rgba(66, 165, 245, 0.35);
  background: rgba(66, 165, 245, 0.08);
}

.session-dot-london {
  background: #42a5f5;
  box-shadow: 0 0 8px #42a5f5;
  animation: dotPulse 2s ease-in-out infinite;
}

/* Asia — purple */
.session-asia {
  color: #b388ff;
  border-color: rgba(179, 136, 255, 0.35);
  background: rgba(179, 136, 255, 0.08);
}

.session-dot-asia {
  background: #b388ff;
  box-shadow: 0 0 8px #b388ff;
  animation: dotPulse 2s ease-in-out infinite;
}

/* Pre-Market — cyan */
.session-premarket {
  color: var(--cyan);
  border-color: rgba(6, 182, 212, 0.35);
  background: rgba(6, 182, 212, 0.08);
}

.session-dot-premarket {
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: dotPulse 2s ease-in-out infinite;
}

/* Post-Market — amber diamond */
.session-postmarket {
  color: #ffb74d;
  border-color: rgba(255, 183, 77, 0.35);
  background: rgba(255, 183, 77, 0.08);
}

.session-dot-postmarket {
  background: #ffb74d;
  box-shadow: 0 0 8px #ffb74d;
  border-radius: 2px;
  transform: rotate(45deg);
  animation: dotPulseDiamond 2s ease-in-out infinite;
}

/* Maintenance — amber/warning */
.session-maintenance {
  color: #ffd54f;
  border-color: rgba(255, 213, 79, 0.35);
  background: rgba(255, 213, 79, 0.08);
}

.session-dot-maintenance {
  background: #ffd54f;
  box-shadow: 0 0 8px #ffd54f;
  border-radius: 2px;
  transform: rotate(45deg);
  animation: dotPulseDiamond 1.4s ease-in-out infinite;
}

/* Closed — muted red */
.session-closed {
  color: #ef5350;
  border-color: rgba(239, 83, 80, 0.25);
  background: rgba(239, 83, 80, 0.06);
}

.session-dot-closed {
  background: #ef5350;
  box-shadow: 0 0 6px #ef5350;
  animation: dotPulse 2.5s ease-in-out infinite;
}

@keyframes dotPulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.85);
  }
}

@keyframes dotPulseDiamond {

  0%,
  100% {
    opacity: 1;
    transform: rotate(45deg) scale(1);
  }

  50% {
    opacity: 0.5;
    transform: rotate(45deg) scale(0.85);
  }
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
}

/* ── APP NAV ── */
.app-nav {
  width: 72px;
  min-width: 72px;
  height: calc(100vh - 70px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 0;
  gap: 0.25rem;
  background: transparent;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.65rem 0;
  width: 56px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(6, 182, 212, 0.1);
  color: var(--cyan);
}

.nav-label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── NAV GROUPS & LEADERS ── */
.nav-group-divider {
  width: 36px;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0.45rem 0;
}

.nav-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 62px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 5px 3px 4px 3px;
  gap: 3px;
  position: relative;
}

.nav-group.group-trading {
  border-color: rgba(139, 92, 246, 0.25);
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.08) 0%, rgba(15, 23, 42, 0.4) 100%);
  box-shadow: inset 0 1px 0 rgba(139, 92, 246, 0.2);
}

.nav-group.group-trucking,
.nav-group.group-finance {
  border-color: rgba(16, 185, 129, 0.25);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, rgba(15, 23, 42, 0.4) 100%);
  box-shadow: inset 0 1px 0 rgba(16, 185, 129, 0.2);
}

.nav-group-leader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
  padding: 3px 0 4px 0;
  cursor: default;
  user-select: none;
  pointer-events: none;

}

.group-trading .nav-group-leader {
  color: #a78bfa;
  border-bottom-color: rgba(139, 92, 246, 0.2);
}

.group-trucking .nav-group-leader,
.group-finance .nav-group-leader {
  color: #34d399;
  border-bottom-color: rgba(16, 185, 129, 0.2);
}

.nav-group-leader svg {
  opacity: 0.95;
}

.nav-group-label {
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.group-trading .nav-group-label {
  color: #c4b5fd;
}

.group-trucking .nav-group-label,
.group-finance .nav-group-label {
  color: #6ee7b7;
}

.nav-group .nav-item {
  width: 54px;
  padding: 0.45rem 0;
  margin-top: 1px;
}

.nav-group .nav-item.active {
  background: transparent;
}

/* ── PAGE CONTENT ── */
.page-content {
  flex: 1;
  overflow-y: auto;
  height: calc(100vh - 70px);
  padding: 0.75rem 0 1rem 0;
}

.home-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-secondary);
  gap: 0.5rem;
}

/* ── MAIN CONTENT ── */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 0;
}

/* ── TOOLBAR ── */
.settings-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 260px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-box svg {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 0.65rem 3rem 0.65rem 2.75rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  transition: all 0.2s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 15px var(--border-glow);
}

.search-shortcut {
  position: absolute;
  right: 0.85rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  pointer-events: none;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}



/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.78rem;
}

.btn-primary {
  background: linear-gradient(135deg, #0891b2, #06b6d4);
  color: #ffffff;
  box-shadow: 0 4px 15px var(--cyan-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #06b6d4, #22d3ee);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
}

.btn-secondary {
  background: rgba(30, 41, 59, 0.7);
  color: var(--text-secondary);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  background: rgba(51, 65, 85, 0.8);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-icon {
  padding: 0.6rem;
  border-radius: var(--radius-md);
}

/* ── DROPDOWN WRAP ── */
.dropdown-wrap {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  padding: 0.4rem;
  min-width: 210px;
  z-index: 50;
  display: none;
  flex-direction: column;
  gap: 0.2rem;
  backdrop-filter: var(--backdrop-blur);
}

.dropdown-menu.show {
  display: flex;
  animation: fadeIn 0.15s ease-out;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.85rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 0.3rem 0;
}

.text-danger {
  color: var(--rose) !important;
}

.text-danger:hover {
  background: rgba(244, 63, 94, 0.15) !important;
}

/* ── CATEGORY TABS CONTAINER ── */
.tabs-container {
  padding: 0.5rem 0;
  overflow-x: auto;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  backdrop-filter: none;
}

.settings-tabs-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: max-content;
}

.category-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.category-tab-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.category-tab-btn.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(139, 92, 246, 0.2));
  color: #ffffff;
  border-color: rgba(6, 182, 212, 0.45);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.25);
}

.tab-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.12rem 0.4rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.category-tab-btn.active .tab-badge {
  background: rgba(6, 182, 212, 0.3);
  color: var(--cyan);
}

/* ── TAB CONTENT PANEL ── */
.tab-content-panel {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  animation: fadeIn 0.2s ease-out;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}


.tab-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tab-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tab-heading {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tab-count-tag {
  font-size: 0.75rem;
  color: var(--cyan);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
}

/* ── CONFIGURABLE FIELDS GRID ── */
.fields-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 420px));
  gap: 1.15rem;
}

.group-section-header {
  grid-column: 1 / -1;
  padding: 0.75rem 0 0.25rem 0;
  margin-top: 0.5rem;
}

.group-section-header:first-child {
  margin-top: 0;
  padding-top: 0;
}

.group-title-line {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.group-tag-pill {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cyan);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.group-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.3) 0%, rgba(255, 255, 255, 0.05) 100%);
}

/* ── SIDE-BY-SIDE GROUP ROW ── */
.groups-side-by-side-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  width: 100%;
}

.group-column {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.group-column .group-section-header {
  grid-column: auto;
  margin-top: 0;
  padding: 0.25rem 0 0.75rem 0;
}

.group-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  flex: 1;
}

.group-cards-stack .field-card {
  width: 100%;
  flex: 1;
}

@media (max-width: 900px) {
  .groups-side-by-side-row {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

.field-card {
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.95rem;
  transition: all 0.2s ease;
}

.field-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.85);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.field-card.dirty {
  border-color: var(--amber);
  box-shadow: 0 0 15px var(--amber-glow);
}

.field-meta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field-top-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
}

.field-key-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 5px;
  border: 1px solid rgba(6, 182, 212, 0.22);
}

.field-key-badge.main-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--cyan);
  background: rgba(6, 182, 212, 0.12);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  border: 1px solid rgba(6, 182, 212, 0.28);
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
}

.field-description {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.field-control-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* ── INPUT TYPES STYLING & NORMALIZATION ── */
.input-text,
.input-select,
.input-number {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.86rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.input-text:focus,
.input-select:focus,
.input-number:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 12px var(--border-glow);
}

.input-uppercase {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Custom Dropdown Select Reset */
.input-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2306b6d4' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 14px;
  padding-right: 2.5rem;
  cursor: pointer;
}

.input-select option {
  background-color: #0f172a;
  color: #f8fafc;
  padding: 0.65rem;
}

/* Number Inputs Reset - Globally strip browser spin buttons */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button,
.modal-input::-webkit-inner-spin-button,
.modal-input::-webkit-outer-spin-button,
.input-number::-webkit-inner-spin-button,
.input-number::-webkit-outer-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

input[type="number"],
.modal-input[type="number"],
.input-number {
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}

/* ── LOCKABLE INPUT ENTRY STYLES ── */
.lockable-input-wrap {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
}

.lockable-input-wrap .field-input {
  padding-right: 2.8rem;
}

.lockable-input-wrap .field-input.secret-input {
  letter-spacing: 0.1em;
}

.lockable-input-wrap .field-input.secret-input.input-unlocked {
  letter-spacing: normal !important;
  font-family: var(--font-mono, monospace) !important;
  font-size: 0.82rem !important;
}

.input-locked {
  background-color: rgba(11, 17, 32, 0.45) !important;
  color: var(--text-secondary) !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
  cursor: not-allowed;
  user-select: none;
}

.input-unlocked {
  background-color: var(--bg-input) !important;
  color: var(--text-primary) !important;
  border-color: var(--cyan) !important;
  box-shadow: 0 0 14px var(--cyan-glow) !important;
  cursor: text;
}

.input-actions-cluster {
  position: absolute;
  right: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.btn-lock-toggle {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.32rem 0.45rem;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-lock-toggle:hover {
  color: var(--amber);
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 8px var(--amber-glow);
}

.btn-lock-toggle.unlocked {
  background: rgba(6, 182, 212, 0.16);
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 10px var(--cyan-glow);
  pointer-events: none;
  cursor: default;
}

.btn-secret-action {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.3rem;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-secret-action:hover {
  color: var(--cyan);
  background: rgba(255, 255, 255, 0.08);
}

/* ── BOOLEAN TOGGLE IN CARD ── */
.boolean-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.2rem;
}

.bool-label {
  font-size: 0.82rem;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-secondary);
}

.bool-label.playbook-active {
  color: #00e676;
  text-shadow: 0 0 8px rgba(0, 230, 118, 0.4);
}

.bool-label.playbook-inactive {
  color: #ff5252;
  opacity: 0.7;
}

.session-badge {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
}

input:checked+.slider {
  background-color: var(--emerald);
  box-shadow: 0 0 12px var(--emerald-glow);
  border-color: var(--emerald);
}

input:checked+.slider:before {
  transform: translateX(20px);
}

/* ── LOADING STATE ── */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  gap: 1rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  grid-column: 1 / -1;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(6, 182, 212, 0.2);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── TOAST NOTIFICATIONS WITH TIMER PROGRESS BAR ── */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 100;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0.85rem 1.15rem 1rem 1.15rem;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  backdrop-filter: var(--backdrop-blur);
  color: var(--text-primary);
  font-size: 0.85rem;
  animation: slideToast 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 320px;
  max-width: 440px;
}

.toast-body {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.toast-icon-wrap {
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.toast-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.toast-title {
  font-size: 0.76rem;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.toast-desc {
  font-size: 0.84rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.toast-desc strong {
  color: #ffffff;
}

.toast-success {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(16, 185, 129, 0.15);
}

.toast-success .toast-title {
  color: var(--emerald);
}

.toast-success svg {
  color: var(--emerald);
}

.toast-error {
  border-color: rgba(244, 63, 94, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(244, 63, 94, 0.15);
}

.toast-error .toast-title {
  color: var(--rose);
}

.toast-error svg {
  color: var(--rose);
}

/* Green Progress / Countdown Timer Bar */
.toast-timer-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
}

.toast-timer-progress {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--emerald), var(--cyan));
  box-shadow: 0 0 8px var(--emerald-glow);
  transform-origin: left center;
  animation: toastCountdown 3s linear forwards;
}

.toast-error .toast-timer-progress {
  background: linear-gradient(90deg, var(--rose), var(--amber));
  box-shadow: 0 0 8px var(--rose-glow);
}

@keyframes toastCountdown {
  from {
    width: 100%;
  }

  to {
    width: 0%;
  }
}

@keyframes slideToast {
  from {
    opacity: 0;
    transform: translateX(50px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── FOOTER ── */
.site-footer {
  margin-top: auto;
  padding: 1.25rem 0 0.5rem 0;
  border-top: 1px solid var(--border-subtle);
}

.footer-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.separator {
  opacity: 0.4;
}

/* ── UTILITY CLASSES ── */
.font-mono {
  font-family: var(--font-mono);
}

.text-cyan {
  color: var(--cyan);
}

.text-emerald {
  color: var(--emerald);
}

.text-purple {
  color: var(--purple);
}

.text-amber {
  color: var(--amber);
}

/* ── RESPONSIVE ADAPTATIONS ── */
@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
    align-items: stretch;
  }

  .header-status-group {
    justify-content: center;
  }

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

/* ═════════════════════════════════════════════════════════════════════════
   PROP FIRM ACCOUNT LEDGER
   ═════════════════════════════════════════════════════════════════════════ */

.propfirm-page {
  width: 92%;
  max-width: 1800px;
  margin: 0 auto;
  padding: 1.25rem 0 3rem 0;
  box-sizing: border-box;
}

.propfirm-card {
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  margin-bottom: 1.5rem;
  width: 100%;
}

.propfirm-card-header {
  padding: 0.85rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.015);
}

.propfirm-card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: 0.01em;
  text-align: center;
}

.ledger-table-wrap {
  overflow-x: auto;
  width: 100%;
}

.ledger-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  table-layout: fixed;
}

.ledger-table thead th {
  padding: 0.75rem 0.95rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.70rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.25);
  user-select: none;
}

.ledger-table tbody td {
  padding: 0.75rem 0.95rem;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  white-space: nowrap;
  vertical-align: middle;
}

/* Explicit Even Proportional Column Widths and Alignments */
.col-account {
  width: 25%;
  text-align: left !important;
}

.col-balance {
  width: 10%;
  text-align: left !important;
}

.col-target {
  width: 13%;
  text-align: left !important;
  padding-right: 1rem !important;
}

.col-pnl {
  width: 9%;
  text-align: left !important;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  font-weight: 700;
}

.col-unrealized {
  width: 10%;
  text-align: left !important;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  font-weight: 700;
}

.col-dd {
  width: 15%;
  text-align: left !important;
  padding-right: 1rem !important;
}

.col-status {
  width: 8%;
  text-align: center !important;
}

.col-actions {
  width: 10%;
  min-width: 125px;
  text-align: center !important;
  padding-right: 1rem !important;
}

/* Unrealized value states */
.unrealized-value {
  transition: color 0.2s ease;
}

.unrealized-idle {
  color: var(--text-muted);
  font-weight: 400;
}

.unrealized-live {
  animation: unrealized-pulse 2s ease-in-out infinite;
}

@keyframes unrealized-pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

.ledger-row {
  transition: background 0.15s ease;
}

.ledger-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.ledger-row.expanded {
  background: rgba(6, 182, 212, 0.04);
}

.ledger-row.row-is-leader {
  background: rgba(245, 158, 11, 0.025);
}

.ledger-row-add {
  cursor: pointer;
  transition: all 0.25s ease;
  background: rgba(6, 182, 212, 0.02);
}

.ledger-row-add td {
  padding: 0.75rem 0.95rem !important;
  text-align: center !important;
  border-bottom: 1px dashed rgba(6, 182, 212, 0.25) !important;
}

.ledger-row-add:hover {
  background: rgba(6, 182, 212, 0.08);
}

.ledger-row-add:hover td {
  border-bottom-color: var(--cyan) !important;
}

.ledger-add-btn-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--cyan);
  transition: all 0.2s ease;
}

.ledger-row-add:hover .ledger-add-btn-content {
  color: #22d3ee;
  transform: scale(1.01);
}

.ledger-row-add.empty-add {
  background: rgba(255, 255, 255, 0.015);
}

.ledger-row-add.empty-add td {
  padding: 1.85rem 1rem !important;
}

.ledger-nickname {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.88rem;
  font-weight: 600;
  color: #f1f5f9;
  letter-spacing: -0.01em;
}

.ledger-balance {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.88rem;
  color: #ffffff;
}

/* ── PHASE CELL & COMPOSITE BADGE ── */
.phase-cell-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.phase-composite-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.52rem;
  border-radius: 6px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
}

.phase-composite-pill .firm-tag {
  display: inline-block;
  font-weight: 800;
  font-size: 0.78rem;
  line-height: 1;
}

.phase-composite-pill .size-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  font-weight: 700;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  padding: 0.08rem 0.38rem;
  border-radius: 4px;
  text-align: center;
  line-height: 1.1;
}

.phase-composite-pill .phase-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.08rem 0.45rem;
  border-radius: 4px;
  text-align: center;
  line-height: 1.1;
}

.phase-composite-pill .acct-num-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.08);
  padding: 0.08rem 0.38rem;
  border-radius: 4px;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

/* TPT Firm Accent */
.phase-composite-pill.firm-tpt {
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.35);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.15);
}

.phase-composite-pill.firm-tpt .firm-tag {
  color: #c4b5fd;
  font-weight: 800;
}

/* Topstep Firm Accent */
.phase-composite-pill.firm-topstep {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.15);
}

.phase-composite-pill.firm-topstep .firm-tag {
  color: #fcd34d;
  font-weight: 800;
}

/* Evaluation / Combine / Test — Cyan */
.phase-composite-pill .phase-tag.phase-eval,
.phase-composite-pill .phase-tag.phase-test {
  background: rgba(6, 182, 212, 0.2);
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.4);
}

/* Funded / PRO / Express / XFA — Emerald */
.phase-composite-pill .phase-tag.phase-funded,
.phase-composite-pill .phase-tag.phase-pro,
.phase-composite-pill .phase-tag.phase-express {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

/* PRO+ / Live — Purple */
.phase-composite-pill .phase-tag.phase-funded-plus,
.phase-composite-pill .phase-tag.phase-live {
  background: rgba(168, 85, 247, 0.2);
  color: #e9d5ff;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.phase-composite-pill.is-leader {
  border-color: rgba(245, 158, 11, 0.6) !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25) !important;
}

.leader-crown-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(234, 179, 8, 0.15));
  border: 1px solid rgba(245, 158, 11, 0.6);
  color: #fbbf24;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
  animation: crownGlow 2.2s ease-in-out infinite alternate;
  flex-shrink: 0;
  cursor: default;
}

@keyframes crownGlow {
  0% {
    box-shadow: 0 0 4px rgba(245, 158, 11, 0.3);
    transform: scale(0.96);
  }

  100% {
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.7);
    transform: scale(1.05);
  }
}

/* ── TARGET & DD BARS AND METRICS ── */
.target-combined-cell,
.dd-combined-cell {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  width: 100%;
  max-width: 150px;
}

.target-bar-container,
.dd-bar-container {
  width: 100%;
  max-width: 150px;
  height: 5.5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.target-bar,
.dd-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

.dd-bar-ok {
  background: var(--emerald);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
}

.dd-bar-warn {
  background: var(--amber);
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
}

.dd-bar-danger {
  background: var(--rose);
  box-shadow: 0 0 6px rgba(244, 63, 94, 0.4);
}

.target-bar-prog {
  background: linear-gradient(90deg, #06b6d4, #3b82f6);
  box-shadow: 0 0 6px rgba(6, 182, 212, 0.4);
}

.target-bar-near {
  background: linear-gradient(90deg, #3b82f6, #10b981);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.target-bar-hit {
  background: var(--emerald);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.7);
}

.target-info-row,
.dd-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 150px;
}

.target-dist-val,
.dd-dist-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
}

.target-pct-tag,
.dd-pct-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.dd-pct-tag.text-ok {
  color: var(--emerald);
}

.dd-pct-tag.text-warn {
  color: var(--amber);
}

.dd-pct-tag.text-danger {
  color: var(--rose);
}

.target-pct-tag.text-target-hit {
  color: var(--emerald);
}

.target-pct-tag.text-target-near {
  color: #67e8f9;
}

.target-funded-pill {
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.18rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
}

.status-badge {
  font-family: 'Outfit', sans-serif;
  font-size: 0.70rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.55rem;
  border-radius: 5px;
  display: inline-block;
}

.status-active {
  background: rgba(16, 185, 129, 0.12);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-warning {
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-breached {
  background: rgba(244, 63, 94, 0.12);
  color: var(--rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.status-passed {
  background: rgba(6, 182, 212, 0.12);
  color: var(--cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.text-profit {
  color: var(--emerald) !important;
  font-weight: 600;
}

.text-loss {
  color: var(--rose) !important;
  font-weight: 600;
}

.text-warn {
  color: var(--amber) !important;
}

.text-danger {
  color: var(--rose) !important;
}

.actions-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.actions-group button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 29px;
  min-width: 29px;
  height: 29px;
  min-height: 29px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  box-sizing: border-box;
}

.ledger-btn-sheet {
  background: rgba(99, 102, 241, 0.1) !important;
  border: 1px solid rgba(99, 102, 241, 0.3) !important;
  color: #a5b4fc !important;
}

.ledger-btn-sheet:hover {
  background: rgba(99, 102, 241, 0.25) !important;
  border-color: rgba(129, 140, 248, 0.6) !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

.ledger-btn-detention {
  background: rgba(245, 158, 11, 0.1) !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  color: #fbbf24 !important;
}

.ledger-btn-detention:hover {
  background: rgba(245, 158, 11, 0.25) !important;
  border-color: rgba(251, 191, 36, 0.6) !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
  transform: translateY(-1px);
}

.ledger-btn-edit {
  background: rgba(6, 182, 212, 0.1) !important;
  border: 1px solid rgba(6, 182, 212, 0.3) !important;
  color: #22d3ee !important;
}

.ledger-btn-edit:hover {
  background: rgba(6, 182, 212, 0.25) !important;
  border-color: rgba(34, 211, 238, 0.6) !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
  transform: translateY(-1px);
}

.ledger-btn-delete {
  background: rgba(239, 68, 68, 0.1) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  color: #f87171 !important;
}

.ledger-btn-delete:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: rgba(248, 113, 113, 0.6) !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
  transform: translateY(-1px);
}

.ledger-btn-reconcile:hover {
  color: var(--cyan) !important;
  border-color: rgba(6, 182, 212, 0.4) !important;
  background: rgba(6, 182, 212, 0.08) !important;
}

.ledger-btn-promote {
  color: #f59e0b !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
  animation: promoteGlow 2s ease-in-out infinite alternate;
}

.ledger-btn-promote:hover {
  color: #fbbf24 !important;
  border-color: rgba(251, 191, 36, 0.6) !important;
  background: rgba(245, 158, 11, 0.15) !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

@keyframes promoteGlow {
  0% {
    box-shadow: 0 0 2px rgba(245, 158, 11, 0.1);
  }

  100% {
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.25);
  }
}

.ledger-detail-row td {
  padding: 0 !important;
  border-bottom: 2px solid var(--cyan) !important;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 1.2rem 1rem;
  background: rgba(6, 182, 212, 0.02);
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }

  to {
    opacity: 1;
    max-height: 500px;
  }
}

.detail-section h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan);
  margin: 0 0 0.6rem 0;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0;
  font-size: 0.78rem;
}

.detail-item span:first-child {
  color: var(--text-secondary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
}

.detail-item span:last-child {
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
}

/* ═════════════════════════════════════════════════════════════════════════
   MODAL — Add Account Wizard
   ═════════════════════════════════════════════════════════════════════════ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-content {
  width: 480px;
  max-width: 92vw;
  max-height: 85vh;
  border-radius: 18px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  animation: modalSlideUp 0.25s ease;
}

@keyframes modalSlideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.4rem;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 1.4rem;
}

.modal-label {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.modal-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.modal-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 12px var(--cyan-glow);
}

.modal-firm-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
}

.modal-firm-btn {
  padding: 1.2rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
}

.modal-firm-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.modal-firm-btn.selected {
  border-color: var(--cyan);
  background: rgba(6, 182, 212, 0.1);
  box-shadow: 0 0 15px var(--cyan-glow);
}

.modal-firm-name {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-size-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.6rem;
}

.modal-size-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 1rem 0.6rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.modal-size-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.modal-size-btn.selected {
  border-color: var(--cyan);
  background: rgba(6, 182, 212, 0.1);
  box-shadow: 0 0 12px var(--cyan-glow);
}

.modal-size-label {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-size-contracts {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.modal-phase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.6rem;
}

.modal-phase-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 1rem 0.6rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.modal-phase-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.modal-phase-btn.selected {
  border-color: var(--cyan);
  background: rgba(6, 182, 212, 0.1);
  box-shadow: 0 0 12px var(--cyan-glow);
}

.modal-phase-name {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-phase-dd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--rose);
  font-weight: 500;
}

.modal-phase-trail {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 1rem 1.4rem;
  border-top: 1px solid var(--border-subtle);
}

.modal-btn-next {
  padding: 0.6rem 1.5rem;
  background: var(--cyan);
  border: none;
  border-radius: 8px;
  color: var(--bg-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.modal-btn-next:hover {
  background: #0ecfe6;
  box-shadow: 0 0 15px var(--cyan-glow);
}

.modal-btn-back {
  padding: 0.6rem 1.2rem;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-secondary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-btn-back:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

/* ═════════════════════════════════════════════════════════════════════════
   TRIPS DISPATCH & LOGISTICS TABLE
   ═════════════════════════════════════════════════════════════════════════ */

.trips-page {
  width: 92%;
  max-width: 1800px;
  margin: 0 auto;
  padding: 1.25rem 0 3rem 0;
  box-sizing: border-box;
}

.trips-card {
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  margin-bottom: 1.5rem;
  width: 100%;
}

.trips-card-header {
  padding: 0.85rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.015);
}

.trips-card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: 0.01em;
  text-align: center;
}

.trips-table-wrap {
  overflow-x: auto;
  width: 100%;
}

.trips-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  table-layout: fixed;
}

.trips-table thead th {
  padding: 0.75rem 0.95rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.70rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.25);
  user-select: none;
}

.trips-table tbody td {
  padding: 0.75rem 0.95rem;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  white-space: nowrap;
  vertical-align: middle;
}

/* Trips Table Column Widths and Alignments */
.col-trip-num {
  width: 9%;
  text-align: left !important;
}

.col-trip-dest {
  width: 12%;
  text-align: left !important;
  font-weight: 500;
  color: var(--text-primary);
}

.col-trip-date {
  width: 15%;
  text-align: left !important;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.80rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.col-trip-miles {
  width: 17%;
  text-align: center !important;
}

.trips-table thead th.col-trip-miles {
  text-align: center !important;
}

.trips-table tbody td.col-trip-miles {
  text-align: center !important;
}

.miles-breakdown-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem;
  white-space: nowrap;
  cursor: default !important;
  user-select: none;
}

.m-segment {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.16rem 0.42rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  cursor: default !important;
  user-select: none;
}

.m-segment .m-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.m-segment .m-val {
  font-weight: 700;
  color: #e2e8f0;
}

.m-segment.m-total {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.32);
}

.m-segment.m-total .m-label {
  color: var(--cyan);
}

.m-segment.m-total .m-val {
  color: #22d3ee;
  font-weight: 800;
}

.col-trip-cpm {
  width: 7%;
  text-align: left !important;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 0.88rem;
  color: #38bdf8;
}

.col-trip-dsp {
  width: 9%;
  text-align: left !important;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 0.88rem;
  color: #10b981;
}

.col-trip-fuel {
  width: 7%;
  text-align: left !important;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 0.88rem;
  color: #38bdf8;
}

.col-trip-misc {
  width: 19%;
  text-align: center !important;
}

.trips-table thead th.col-trip-misc {
  text-align: center !important;
}

.trips-table tbody td.col-trip-misc {
  text-align: center !important;
}

.misc-breakdown-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  white-space: nowrap;
  cursor: default !important;
  user-select: none;
}

.misc-segment {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.16rem 0.38rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  cursor: default !important;
  user-select: none;
}

.misc-segment .misc-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.misc-segment .misc-val {
  font-weight: 700;
  color: #e2e8f0;
}

.misc-segment.misc-lumper {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.32);
}

.misc-segment.misc-lumper .misc-label {
  color: #f59e0b;
}

.misc-segment.misc-lumper .misc-val {
  color: #fbbf24;
}

.misc-segment.misc-mkt {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.32);
}

.misc-segment.misc-mkt .misc-label {
  color: #c084fc;
}

.misc-segment.misc-mkt .misc-val {
  color: #e9d5ff;
}

.misc-segment.misc-maint {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.32);
}

.misc-segment.misc-maint .misc-label {
  color: #fb7185;
}

.misc-segment.misc-maint .misc-val {
  color: #fda4af;
}

.col-trip-actions {
  width: 150px;
  min-width: 150px;
  text-align: center !important;
}

.trip-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  font-weight: 700;
  color: #22d3ee;
  letter-spacing: 0.02em;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.15);
}

.trip-dsp-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fbbf24;
}

.trips-row {
  transition: background 0.15s ease;
}

.trips-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.trips-row-add {
  cursor: pointer;
  transition: all 0.25s ease;
  background: rgba(6, 182, 212, 0.02);
}

.trips-row-add td {
  padding: 0.75rem 0.95rem !important;
  text-align: center !important;
  border-bottom: 1px dashed rgba(6, 182, 212, 0.25) !important;
}

.trips-row-add:hover {
  background: rgba(6, 182, 212, 0.08);
}

.trips-row-add:hover td {
  border-bottom-color: var(--cyan) !important;
}

.trips-add-btn-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--cyan);
  transition: all 0.2s ease;
}

.trips-row-add:hover .trips-add-btn-content {
  color: #22d3ee;
  transform: scale(1.01);
}

.trips-row-add.empty-add {
  background: rgba(255, 255, 255, 0.015);
}

.trips-row-add.empty-add td {
  padding: 1.85rem 1rem !important;
}

/* ═════════════════════════════════════════════════════════════════════════
   TABBED NEW TRIP MODAL
   ═════════════════════════════════════════════════════════════════════════ */

.modal-trip-content {
  width: 820px;
  max-width: 95vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.modal-header-title-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.modal-badge-tag {
  background: rgba(6, 182, 212, 0.12);
  color: var(--cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
  font-size: 0.72rem;
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-tabs-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.4rem;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--border-subtle);
}

.modal-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0.45rem 0.85rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.modal-tab-btn.active {
  background: rgba(6, 182, 212, 0.12);
  color: var(--cyan);
  border-color: rgba(6, 182, 212, 0.3);
}

.modal-tab-btn.tab-disabled {
  opacity: 0.38;
  cursor: not-allowed !important;
  pointer-events: none !important;
  filter: grayscale(0.6);
  background: rgba(0, 0, 0, 0.15) !important;
  border-color: transparent !important;
}

.modal-tab-lock {
  font-size: 0.70rem;
  opacity: 0.8;
  margin-left: 0.2rem;
}

.label-req {
  font-size: 0.72rem;
  color: var(--cyan);
  text-transform: none;
  font-weight: 500;
  letter-spacing: normal;
}

.label-hint {
  font-size: 0.70rem;
  color: var(--text-muted);
  text-transform: none;
  font-weight: 400;
  letter-spacing: normal;
}

.modal-tab-count {
  background: rgba(6, 182, 212, 0.25);
  color: #22d3ee;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.05rem 0.4rem;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
}

.trip-modal-body {
  padding: 1.25rem 1.4rem;
  overflow-y: auto;
  flex: 1;
}

.trip-tab-panel {
  animation: fadeIn 0.2s ease;
}

.trip-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.trip-form-grid .form-group.full-width {
  grid-column: span 2;
}

.trip-form-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.trip-form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.85rem;
}

.trip-form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.input-locked-calc {
  background: rgba(6, 182, 212, 0.05) !important;
  border-color: rgba(6, 182, 212, 0.22) !important;
  color: var(--cyan) !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-weight: 600 !important;
  cursor: default !important;
  user-select: none !important;
}

.stops-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.stops-panel-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.btn-add-stop {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: var(--cyan);
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.stops-container {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 344px;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  padding-right: 0px;
  padding-bottom: 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.stops-container::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.stop-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  transition: border-color 0.2s ease;
  scroll-snap-align: start;
  scroll-snap-stop: normal;
  flex-shrink: 0;
  box-sizing: border-box;
}

.stop-card:hover {
  border-color: rgba(6, 182, 212, 0.3);
}

.stop-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.stop-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--cyan);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.stop-badge.badge-repower {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.35);
}

.stop-badge.badge-invalid {
  color: #f87171;
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  font-size: 0.68rem;
}

.stop-card.stop-card-terminated {
  opacity: 0.4;
  border-color: rgba(239, 68, 68, 0.25) !important;
  background: rgba(239, 68, 68, 0.03) !important;
  filter: grayscale(0.4);
}

.stop-card.stop-card-terminated input,
.stop-card.stop-card-terminated select {
  pointer-events: none !important;
  opacity: 0.6;
}

.btn-remove-stop {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 0.78rem;
  cursor: pointer;
  opacity: 0.75;
  transition: all 0.2s;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.btn-remove-stop:hover {
  opacity: 1;
  background: rgba(239, 68, 68, 0.12);
}

.stop-fields-grid {
  display: grid;
  grid-template-columns: 0.95fr 0.9fr 1.35fr 1.35fr;
  gap: 0.65rem;
  align-items: flex-end;
}

.detention-fields-grid {
  display: grid;
  grid-template-columns: 1.15fr 1.15fr 1.15fr 0.65fr;
  gap: 0.55rem;
  align-items: flex-end;
}

.detention-seal-input {
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.stop-field-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stop-appt-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 38px;
}

.stop-appt-input {
  padding-left: 0.55rem !important;
  padding-right: 2.55rem !important;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.77rem !important;
  letter-spacing: -0.02em;
  text-overflow: clip;
  white-space: nowrap;
}

.appt-icons-wrap {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.appt-clear-btn {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  transition: all 0.2s;
}

.appt-clear-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #f87171;
  color: #ffffff;
  transform: scale(1.1);
}

.appt-picker-icon-btn {
  background: transparent;
  border: none;
  color: var(--cyan);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 14px;
  height: 14px;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.appt-picker-icon-btn:hover {
  opacity: 1;
}

.custom-dt-popup {
  position: fixed;
  z-index: 10005;
  background: rgba(13, 21, 39, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 25px rgba(6, 182, 212, 0.18);
  width: 380px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: fadeInPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Outfit', sans-serif;
  user-select: none;
}

.custom-dt-popup.dt-date-only {
  width: 275px;
}

.custom-dt-popup.dt-date-only .dt-body {
  grid-template-columns: 1fr;
}

@keyframes fadeInPop {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-4px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.dt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border-subtle);
}

.dt-month-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.dt-nav-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dt-nav-btn:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--cyan);
  color: var(--cyan);
}

.dt-nav-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dt-nav-btn:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--cyan);
  color: var(--cyan);
}

.dt-body {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  padding: 0.8rem;
  gap: 0.8rem;
}

.dt-calendar-section {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dt-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--cyan);
  text-transform: uppercase;
}

.dt-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.dt-day-btn {
  height: 28px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.dt-day-btn:hover {
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
}

.dt-day-btn.other-month {
  opacity: 0.25;
}

.dt-day-btn.today {
  border-color: rgba(6, 182, 212, 0.4);
  color: var(--cyan);
}

.dt-day-btn.selected {
  background: var(--cyan) !important;
  color: #030712 !important;
  font-weight: 700 !important;
  box-shadow: 0 0 10px var(--cyan-glow);
}

.dt-time-section {
  border-left: 1px solid var(--border-subtle);
  padding-left: 0.8rem;
  display: flex;
  flex-direction: column;
}

.dt-time-header {
  font-size: 0.70rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  text-align: center;
}

.dt-time-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  height: 175px;
}

.dt-time-col {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  gap: 2px;
  padding-right: 0px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.dt-time-col::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.dt-time-cell {
  padding: 0.35rem 0.2rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.dt-time-cell:hover {
  background: rgba(6, 182, 212, 0.12);
  color: var(--cyan);
}

.dt-time-cell.selected {
  background: rgba(6, 182, 212, 0.25) !important;
  border-color: var(--cyan) !important;
  color: #22d3ee !important;
  font-weight: 700;
}

.dt-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.8rem;
  background: rgba(0, 0, 0, 0.35);
  border-top: 1px solid var(--border-subtle);
}

.dt-btn-secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.dt-btn-secondary:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.3);
}

.dt-btn-apply {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  border: none;
  color: #030712;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.35rem 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
  transition: all 0.2s;
}

.dt-btn-apply:hover {
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.6);
  transform: translateY(-1px);
}

.stop-field-col label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  height: 14px;
  line-height: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stop-field-col input,
.stop-field-col select,
.stop-field-col .stop-select,
.stop-field-col .stop-cust-input,
.stop-field-col .stop-city-input,
.stop-field-col .stop-appt-input,
.stop-field-col .detention-appt-input,
.stop-field-col .detention-arr-input,
.stop-field-col .detention-dept-input,
.stop-field-col .detention-seal-input {
  width: 100%;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  box-sizing: border-box !important;
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0 0.75rem;
  line-height: 36px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.stop-field-col select,
.stop-field-col .stop-select,
.stop-field-col .misc-type-select {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  padding-right: 2rem !important;
  cursor: pointer;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2306b6d4' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.7rem center !important;
  background-size: 13px !important;
}

.stop-field-col select::-ms-expand,
.stop-field-col .stop-select::-ms-expand,
.stop-field-col .misc-type-select::-ms-expand {
  display: none !important;
}

.stop-field-col select option,
.stop-field-col .stop-select option,
.stop-field-col .misc-type-select option {
  background-color: #0d1527 !important;
  color: #f8fafc !important;
  padding: 0.65rem !important;
}

.stop-field-col input:focus,
.stop-field-col select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 12px var(--cyan-glow);
}

.stop-field-col .stop-cust-input {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stop-field-col .stop-appt-input,
.stop-field-col .detention-arr-input,
.stop-field-col .detention-dept-input {
  padding-right: 2rem !important;
  cursor: pointer;
  letter-spacing: 0.02em;
}

.input-locked-city {
  background: rgba(6, 182, 212, 0.06) !important;
  border-color: rgba(6, 182, 212, 0.25) !important;
  color: var(--text-primary) !important;
  cursor: not-allowed !important;
  opacity: 0.9 !important;
}

input::-webkit-calendar-picker-indicator {
  display: none !important;
  -webkit-appearance: none !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  pointer-events: none !important;
}

.fuel-panel-top-bar,
.stops-panel-top-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 0.75rem;
  min-height: 32px;
}

.loaded-trailer-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.loaded-trailer-group .modal-label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
  white-space: nowrap;
}

.loaded-trailer-input {
  width: 160px !important;
  height: 32px !important;
  font-size: 0.82rem !important;
  padding: 0.35rem 0.65rem !important;
  text-align: center;
  letter-spacing: 0.5px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

.btn-add-fuel {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: 6px;
  color: var(--cyan);
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-add-fuel:hover {
  background: rgba(6, 182, 212, 0.25);
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.3);
  transform: translateY(-1px);
}

.fuel-fields-grid {
  display: grid;
  grid-template-columns: 1.5fr 1.5fr auto;
  gap: 0.75rem;
  align-items: flex-end;
}

.btn-remove-fuel-row {
  background: none;
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #ef4444;
  height: 38px;
  width: 38px;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0.85;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.btn-remove-fuel-row:hover {
  opacity: 1;
  background: rgba(239, 68, 68, 0.18);
  border-color: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

#trip-stops-container,
#trip-detention-container {
  max-height: 338px;
}

#trip-fuel-container,
#trip-misc-container {
  max-height: 254px;
}

.fuel-row-card,
.misc-row-card {
  height: 78px;
  max-height: 78px;
  min-height: 78px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.misc-fields-grid {
  display: grid;
  grid-template-columns: 1.15fr 1.15fr 1.15fr auto;
  gap: 0.75rem;
  align-items: flex-end;
}

.fuel-empty-msg {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* Live Map City Autocomplete Dropdown */
.city-autocomplete-dropdown {
  position: fixed;
  z-index: 100050;
  background: #0d1527;
  border: 1px solid rgba(6, 182, 212, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(6, 182, 212, 0.15);
  border-radius: 8px;
  max-height: 250px;
  overflow-y: auto;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  padding: 4px;
}

.city-autocomplete-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  user-select: none;
}

.city-autocomplete-item:hover,
.city-autocomplete-item.active {
  background: rgba(6, 182, 212, 0.20);
  color: #fff;
}

.city-autocomplete-item .city-pin-icon {
  color: var(--cyan);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.city-autocomplete-item .city-name-wrap {
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
}

.city-autocomplete-item .city-main-text {
  font-weight: 600;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.city-autocomplete-item .city-main-text span.match-highlight {
  color: var(--cyan);
  font-weight: 700;
}

.city-autocomplete-item .city-sub-text {
  font-size: 0.70rem;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.city-autocomplete-loading,
.city-autocomplete-empty {
  padding: 0.65rem 0.8rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-family: 'Outfit', sans-serif;
  text-align: center;
}

.trip-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.4rem;
  border-top: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.15);
}

.modal-btn-cancel {
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-secondary);
  padding: 0.6rem 1.2rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.modal-btn-save {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, #0891b2, #06b6d4);
  border: 1px solid rgba(6, 182, 212, 0.4);
  border-radius: 8px;
  color: #ffffff;
  padding: 0.6rem 1.4rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.3);
  transition: all 0.2s ease;
}

.modal-btn-save:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.45);
  background: linear-gradient(135deg, #06b6d4, #22d3ee);
}

@media (max-width: 768px) {
  .propfirm-header {
    flex-direction: column;
  }

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

  .modal-firm-selector {
    grid-template-columns: 1fr;
  }

  .stop-fields-grid {
    grid-template-columns: 1fr;
  }

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

  .trip-form-grid .form-group.full-width {
    grid-column: span 1;
  }
}