/* Jiedax Command — Brand Overrides */
:root {
  --jdx-teal-600: #1A5C78;
  --jdx-teal-700: #164D65;
  --jdx-teal-800: #123E52;
  --jdx-teal-900: #0D2F3F;
  --jdx-teal-950: #081E29;
  --jdx-teal: #1A5C78;
  --jdx-teal-light: #2478A0;
  --jdx-teal-dark: #133E54;
  --jdx-red: #E63946;
  --jdx-tier-seedling: #22C55E;
  --jdx-tier-grove: #3B82F6;
  --jdx-tier-canopy: #8B5CF6;
  --jdx-tier-rainforest: #F59E0B;
}

/* Sidebar */
.jdx-sidebar {
  background: linear-gradient(180deg, var(--jdx-teal-950) 0%, var(--jdx-teal-900) 100%);
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  transition: width 200ms ease;
  flex-shrink: 0;
  overflow: hidden;
}
.jdx-sidebar.collapsed { width: 64px; }
.jdx-sidebar:not(.collapsed) { width: 240px; }

.jdx-sidebar-logo {
  padding: 20px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.jdx-favicon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--jdx-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  flex-shrink: 0;
  font-weight: 700;
  letter-spacing: -1px;
}
.jdx-sidebar-brand { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.jdx-sidebar-brand-name { font-size: 13px; font-weight: 700; letter-spacing: 1.5px; color: white; white-space: nowrap; }
.jdx-sidebar-brand-sub { font-size: 10px; color: rgba(255,255,255,0.45); letter-spacing: 0.5px; white-space: nowrap; }

.jdx-nav { flex: 1; padding: 12px 8px; overflow-y: auto; }
.jdx-nav-section { font-size: 10px; text-transform: uppercase; letter-spacing: 1.2px; color: rgba(255,255,255,0.3); padding: 16px 12px 6px; font-weight: 600; }
.jdx-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  cursor: pointer;
  transition: all 150ms ease;
  white-space: nowrap;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.jdx-nav-item:hover {
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.06);
}
.jdx-nav-item.active {
  color: white;
  background: rgba(99, 102, 241, 0.25);
  font-weight: 500;
}
.jdx-nav-item.active .jdx-nav-icon { color: var(--jdx-teal-light); }
.jdx-nav-icon { flex-shrink: 0; }

.jdx-sidebar-footer {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 8px;
  flex-shrink: 0;
}
.jdx-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  cursor: pointer;
  transition: all 150ms ease;
  border: none;
  background: none;
  width: 100%;
}
.jdx-collapse-btn:hover { color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.04); }

/* Header */
.jdx-header {
  height: 56px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
}

/* Stat cards with left border accent */
.jdx-stat-card {
  border-radius: 12px;
  padding: 16px 20px;
  border-left: 4px solid transparent;
  position: relative;
}
.jdx-stat-card.teal { border-left-color: var(--jdx-teal); }
.jdx-stat-card.teal { border-left-color: var(--jdx-teal-600); }
.jdx-stat-card.green { border-left-color: #10B981; }
.jdx-stat-card.amber { border-left-color: #F59E0B; }
.jdx-stat-card.red { border-left-color: var(--jdx-red); }

/* Tier badges */
.jdx-tier-seedling { background: #DCFCE7; color: #166534; }
.jdx-tier-grove { background: #DBEAFE; color: #1E40AF; }
.jdx-tier-canopy { background: #EDE9FE; color: #5B21B6; }
.jdx-tier-rainforest { background: #FEF3C7; color: #92400E; }

/* Stage colors */
.jdx-stage-lead { background: #F3F4F6; color: #374151; }
.jdx-stage-qualified { background: #DBEAFE; color: #1E40AF; }
.jdx-stage-demo { background: #FEF3C7; color: #92400E; }
.jdx-stage-trial { background: #E0E7FF; color: #3730A3; }
.jdx-stage-subscriber { background: #D1FAE5; color: #065F46; }
.jdx-stage-lost { background: #FEE2E2; color: #991B1B; }

/* Pipeline Kanban column */
.jdx-kanban-col {
  flex-shrink: 0;
  width: 280px;
  min-height: 200px;
}
.jdx-kanban-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px;
  margin-bottom: 8px;
}

/* Scrollbar styling */
.jdx-nav::-webkit-scrollbar { width: 4px; }
.jdx-nav::-webkit-scrollbar-track { background: transparent; }
.jdx-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

/* Source badge */
.jdx-source-lias { background: #FEF3C7; color: #92400E; }
.jdx-source-website { background: #DBEAFE; color: #1E40AF; }
.jdx-source-referral { background: #D1FAE5; color: #065F46; }
.jdx-source-linkedin { background: #DBEAFE; color: #1E40AF; }

/* Smooth transitions */
.jdx-card-hover { transition: box-shadow 150ms ease, transform 150ms ease; }
.jdx-card-hover:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); transform: translateY(-1px); }

/* Indigo button */
.jdx-btn-teal {
  background: var(--jdx-teal);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 150ms ease;
}
.jdx-btn-teal:hover { background: var(--jdx-teal-dark); }

/* ============ LOGIN PAGE ============ */
.login-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Left Panel */
.login-left {
  width: 50%;
  background: linear-gradient(135deg, #081E29 0%, #0D2F3F 50%, #1A5C78 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px;
  position: relative;
  overflow: hidden;
  color: white;
}

.login-left-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2;
}
.login-left-logo img {
  height: 32px;
}
.login-left-logo-text {
  display: flex;
  flex-direction: column;
}
.login-left-logo-text .brand {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  color: white;
}
.login-left-logo-text .sub {
  font-size: 10px;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
}

/* Watermarks */
.login-watermark {
  position: absolute;
  color: white;
  opacity: 0.05;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.login-watermark.top {
  font-size: 280px;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
}
.login-watermark.bottom {
  font-size: 200px;
  bottom: 60px;
  right: -20px;
}

.login-left-content {
  z-index: 2;
  max-width: 380px;
}
.login-tagline {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
}
.login-tagline .accent {
  color: #dc2626;
}
.login-description {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
  margin-bottom: 32px;
}

.login-stats {
  display: flex;
  gap: 32px;
  margin-bottom: 0;
}
.login-stat-item .stat-value {
  font-size: 24px;
  font-weight: 700;
}
.login-stat-item .stat-label {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  margin-top: 2px;
}

.login-left-footer {
  z-index: 2;
}
.login-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.login-badge {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
}
.login-copyright {
  font-size: 11px;
  color: rgba(255,255,255,0.25);
}

/* Right Panel */
.login-right {
  width: 50%;
  background: #f5f6f8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
}
.login-form-wrapper {
  width: 100%;
  max-width: 400px;
}
.login-form-title {
  font-size: 22px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
}
.login-form-subtitle {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 32px;
}

.login-field {
  margin-bottom: 20px;
}
.login-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
}
.login-field input[type="email"],
.login-field input[type="password"] {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 13px;
  background: white;
  color: #1e293b;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  box-sizing: border-box;
}
.login-field input:focus {
  border-color: #1A5C78;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.login-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
  cursor: pointer;
}
.login-checkbox input[type="checkbox"] {
  accent-color: #1A5C78;
}
.login-forgot {
  font-size: 12px;
  color: #1A5C78;
  text-decoration: none;
  cursor: pointer;
}
.login-forgot:hover {
  text-decoration: underline;
}

.login-btn-primary {
  width: 100%;
  padding: 12px;
  background: #1A5C78;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms ease, transform 80ms ease;
  margin-bottom: 20px;
}
.login-btn-primary:hover {
  background: #133E54;
}
.login-btn-primary:active {
  transform: scale(0.99);
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}
.login-divider span {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
}

.login-social-btns {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}
.login-btn-social {
  flex: 1;
  padding: 10px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 150ms ease, border-color 150ms ease;
}
.login-btn-social:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.login-trial-link {
  text-align: center;
  font-size: 13px;
  color: #64748b;
}
.login-trial-link a {
  color: #1A5C78;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.login-trial-link a:hover {
  text-decoration: underline;
}

.login-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
  color: #DC2626;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-staging-banner {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.15);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 11px;
  color: #1A5C78;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .login-container { flex-direction: column; }
  .login-left { width: 100%; min-height: 40vh; padding: 24px; }
  .login-right { width: 100%; min-height: 60vh; padding: 24px; }
  .login-watermark.top { font-size: 140px; }
  .login-watermark.bottom { font-size: 100px; }
}
