/* Trestle Club - Retro-Utility Warm Paper Aesthetic */

:root {
  /* Warm Tactile Backgrounds */
  --bg-sand-light: #faf9f5;
  --bg-sand-dim: #F1ECDE;

  /* High-Contrast Charcoal Ink */
  --char-core: #2B3946;
  --char-muted: #5C6E7F;
  --char-dim: #8B9BAA;

  /* Brand Accent Highlights */
  --brand-amber: #FF8A1F;
  --brand-amber-glow: rgba(255, 138, 31, 0.08);

  /* Functional Alerts */
  --alert-red: #EF4444;
  --alert-red-glow: rgba(239, 68, 68, 0.06);

  --success-emerald: #10B981;
  --success-emerald-glow: rgba(16, 185, 129, 0.06);

  /* Legacy compat aliases (used in inline styles on index.html) */
  --indigo: #FF8A1F;
  --indigo-glow: rgba(255, 138, 31, 0.15);
  --teal: #10B981;
  --teal-glow: rgba(16, 185, 129, 0.12);
  --gold: #FF8A1F;
  --gold-glow: rgba(255, 138, 31, 0.12);
  --emerald: #10B981;
  --emerald-glow: rgba(16, 185, 129, 0.12);
  --coral: #EF4444;
  --coral-glow: rgba(239, 68, 68, 0.12);
  --blue: #3b82f6;

  /* Borders */
  --border-light: #E2DCD0;
  --border-active: var(--brand-amber);

  /* Typography */
  --text-active: var(--char-core);
  --text-primary: var(--char-core);
  --text-muted: var(--char-muted);
  --text-disabled: var(--char-dim);

  --font-heading: 'Outfit', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'Courier New', Courier, monospace;

  /* Crisp utility shadow */
  --shadow-offset: 4px 4px 0px var(--char-core);
  --shadow-offset-sm: 2px 2px 0px var(--char-core);

  /* Warm panel background */
  --bg-panel: #ffffff;
  --bg-obsidian: var(--bg-sand-light);
  --bg-card: var(--bg-sand-dim);

  /* Legacy undefined variable safety aliases */
  --primary: var(--brand-amber);
  --neon-green: #10B981;
  --neon-gold: var(--brand-amber);
  --text-highlight: var(--brand-amber);
  --border-color: #E2DCD0;
}

/* Base Overrides */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

body {
  background-color: var(--bg-sand-light);
  color: var(--char-core);
  font-family: var(--font-body);
  overflow-x: hidden;
  height: 100vh;
  background-image:
    linear-gradient(rgba(43, 57, 70, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43, 57, 70, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  background-attachment: fixed;
}

/* Master Layout */
.app-container {
  display: grid;
  grid-template-columns: 290px 1fr;
  height: 100vh;
  width: 100vw;
}

/* Sidebar Styling */
.sidebar {
  background-color: var(--bg-sand-dim);
  border-right: 2px solid var(--border-light);
  display: flex;
  flex-direction: column;
  padding: 36px 24px;
  justify-content: space-between;
  box-shadow: 4px 0 0 rgba(43, 57, 70, 0.04);
  z-index: 10;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}

.brand-logo-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-amber);
  background: var(--char-core);
  border: 2px solid var(--char-core);
  border-radius: 8px;
  box-shadow: 2px 2px 0 var(--brand-amber);
}

.brand-logo-mark svg {
  width: 26px;
  height: 26px;
  display: block;
}

.brand-logo-mark.auth {
  margin: 0 auto 12px auto;
  width: 52px;
  height: 52px;
  flex-basis: 52px;
}

.brand-logo-mark.auth svg {
  width: 31px;
  height: 31px;
}

.brand-name h1 {
  font-family: var(--font-heading);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--char-core);
}

.brand-name {
  display: flex;
  flex-direction: column;
}

/* User Card Panel */
.user-card-glass {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 32px;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  box-shadow: var(--shadow-offset);
}

.avatar {
  background: var(--brand-amber);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  color: #ffffff;
}

.user-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.user-details h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--char-core);
}

.company-name {
  font-size: 11px;
  color: var(--char-muted);
  margin-top: 2px;
}

.tier-tag {
  font-size: 10px;
  font-weight: 700;
  margin-top: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Credit Rollover Panel */
.credit-tracker-container {
  grid-column: 1 / span 2;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

.credit-metric {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.metric-num {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 800;
  color: var(--brand-amber);
}

.metric-label {
  font-size: 11px;
  color: var(--char-muted);
  font-weight: 500;
}

.credit-sub-label {
  font-size: 10px;
  color: var(--success-emerald);
  font-weight: 600;
  margin-bottom: 10px;
}

.progress-bar-bg {
  background-color: var(--border-light);
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  background: var(--brand-amber);
  height: 100%;
  border-radius: 3px;
}

/* Nav Menu */
.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--char-muted);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  padding: 14px 20px;
  border-radius: 10px;
  border: 1px solid transparent;
}

.nav-item:hover {
  color: var(--char-core);
  background-color: rgba(43, 57, 70, 0.04);
  border-color: var(--border-light);
  transform: translateX(4px);
}

.nav-item.active {
  color: var(--brand-amber);
  background-color: rgba(255, 138, 31, 0.06);
  border-color: rgba(255, 138, 31, 0.25);
  box-shadow: 2px 2px 0px var(--brand-amber);
}

.nav-icon {
  font-size: 16px;
}

/* Step-numbered nav items */
.nav-step {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1.5px solid var(--border-light);
  background: var(--bg-sand-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--char-muted);
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.nav-item.active .nav-step {
  background: var(--brand-amber);
  border-color: var(--char-core);
  color: #ffffff;
  box-shadow: 1px 1px 0px var(--char-core);
}

.nav-item:hover .nav-step {
  border-color: var(--char-core);
  color: var(--char-core);
}

.nav-item-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.nav-item-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--char-core);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item.active .nav-item-label {
  color: var(--brand-amber);
}

.nav-item-sub {
  font-size: 10px;
  color: var(--char-dim);
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sidebar Footer */
.sidebar-footer {
  font-size: 11px;
  color: var(--char-muted);
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.status-indicator.live {
  background-color: var(--success-emerald);
  box-shadow: 0 0 6px var(--success-emerald-glow);
}

/* Main Content Panel */
.main-content {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.top-bar {
  background-color: var(--bg-sand-light);
  border-bottom: 2px solid var(--border-light);
  height: 80px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-search {
  display: flex;
  align-items: center;
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  padding: 10px 18px;
  border-radius: 10px;
  width: 360px;
  box-shadow: var(--shadow-offset-sm);
}

.header-search input {
  background: none;
  border: none;
  color: var(--char-core);
  margin-left: 10px;
  font-size: 13px;
  width: 100%;
}

.header-search input::placeholder {
  color: var(--char-dim);
}

.header-search input:focus {
  outline: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.notification-bell {
  position: relative;
  font-size: 20px;
  cursor: pointer;
  opacity: 0.8;
}

.notification-bell:hover {
  opacity: 1;
}

.badge-dot {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 7px;
  height: 7px;
  background-color: var(--alert-red);
  border-radius: 50%;
}

.system-time {
  font-size: 12px;
  color: var(--char-muted);
  font-weight: 500;
  font-family: var(--font-mono);
}

/* Canvas Body */
.workspace-canvas {
  flex-grow: 1;
  padding: 40px;
  overflow-y: auto;
  background-color: var(--bg-sand-light);
}

.workspace-section {
  display: none;
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.workspace-section.active {
  display: block;
}

.workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 36px;
}

.workspace-header h2 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--char-core);
  letter-spacing: -0.5px;
}

.subtitle {
  color: var(--char-muted);
  font-size: 14px;
  margin-top: 6px;
}

/* Custom Badges */
.badge {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: var(--font-mono);
}

.tech-badge {
  background-color: rgba(43, 57, 70, 0.05);
  border: 1px solid var(--border-light);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--brand-amber);
  font-family: var(--font-mono);
}

.neon-gold {
  background-color: rgba(255, 138, 31, 0.08);
  color: var(--brand-amber);
  border: 1px solid rgba(255, 138, 31, 0.25);
}

.neon-green {
  background-color: rgba(16, 185, 129, 0.08);
  color: var(--success-emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.red-alert-badge {
  background-color: var(--alert-red-glow);
  color: var(--alert-red);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.premium-color {
  color: var(--brand-amber) !important;
}

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

.partial-color {
  color: var(--char-muted) !important;
}

/* Warm Paper Cards (replaces glass-card) */
.glass-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 32px;
  box-shadow: var(--shadow-offset);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  border-color: var(--brand-amber);
  transform: translateY(-2px);
  box-shadow: 6px 6px 0px var(--char-core);
}

.glass-card.flex-col {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.grid-layout > .glass-card {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.glass-card.flex-grow {
  flex-grow: 1;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.card-header h3 {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 600;
  color: var(--char-core);
  letter-spacing: -0.2px;
}

/* Grids */
.grid-layout {
  display: grid;
  gap: 32px;
}

.grid-layout.two-cols {
  grid-template-columns: 1fr 1.15fr;
  height: 560px;
}

.grid-layout.map-layout {
  grid-template-columns: 1.35fr 1fr;
  height: 560px;
}

.grid-layout.active-bids-layout {
  grid-template-columns: 380px 1fr;
  height: 580px;
}

.scrollable {
  overflow-y: auto;
  padding-right: 8px;
}

.scrollable::-webkit-scrollbar {
  width: 6px;
}

.scrollable::-webkit-scrollbar-track {
  background: transparent;
}

.scrollable::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 10px;
}

.scrollable::-webkit-scrollbar-thumb:hover {
  background: var(--char-dim);
}

.margin-top {
  margin-top: 32px;
}

/* Textareas */
.input-container {
  flex-grow: 1;
  margin-bottom: 20px;
}

textarea {
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 20px;
  color: var(--char-core);
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.7;
  resize: none;
}

textarea:focus {
  outline: none;
  border-color: var(--brand-amber);
  box-shadow: 2px 2px 0px var(--brand-amber);
}

/* Buttons */
.btn {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  letter-spacing: 0.2px;
}

.btn-primary {
  background: var(--brand-amber);
  color: #ffffff;
  box-shadow: var(--shadow-offset);
  border: none;
}

.btn-primary:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px var(--char-core);
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--char-core);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-offset-sm);
}

.btn-secondary:hover {
  background-color: var(--bg-sand-dim);
  border-color: var(--char-core);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px var(--char-core);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 12px;
  border-radius: 6px;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn-spinner.hidden {
  display: none;
}

/* Map Grid Visuals */
.visual-map-container {
  flex-grow: 1;
  background-color: var(--bg-sand-dim);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.map-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
}

.map-tile {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-offset-sm);
}

.map-tile:hover {
  transform: translate(-2px, -2px);
  border-color: var(--brand-amber);
  box-shadow: 4px 4px 0px var(--brand-amber);
}

.map-tile.active-selected {
  border-color: var(--brand-amber);
  background-color: rgba(255, 138, 31, 0.04);
  box-shadow: var(--shadow-offset);
}

.tile-zip {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--char-core);
}

.tile-name {
  font-size: 11px;
  color: var(--char-muted);
  margin-top: 6px;
  font-weight: 500;
}

.tile-status {
  font-size: 10px;
  font-weight: 700;
  margin-top: 16px;
  padding: 4px 10px;
  border-radius: 4px;
  background-color: rgba(43, 57, 70, 0.04);
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.map-tile.locked {
  border-color: rgba(255, 138, 31, 0.4);
}
.map-tile.locked .tile-status {
  background-color: rgba(255, 138, 31, 0.08);
  color: var(--brand-amber);
}

.map-tile.partial {
  border-color: rgba(91, 110, 127, 0.3);
}
.map-tile.partial .tile-status {
  background-color: rgba(43, 57, 70, 0.06);
  color: var(--char-muted);
}

.map-tile.open {
  border-color: rgba(16, 185, 129, 0.3);
}
.map-tile.open .tile-status {
  background-color: rgba(16, 185, 129, 0.08);
  color: var(--success-emerald);
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
  text-align: center;
  padding: 48px;
}

.empty-icon {
  font-size: 54px;
  margin-bottom: 20px;
  opacity: 0.4;
}

.empty-state p {
  font-size: 13.5px;
  color: var(--char-muted);
  max-width: 320px;
  line-height: 1.6;
}

/* Data Group details styling */
.parser-output-box {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.data-group {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 16px;
}

.data-group h4 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--char-muted);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.data-group p {
  font-size: 14.5px;
  color: var(--char-core);
  line-height: 1.5;
}

.badge-list {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

/* Bids List Panel */
.matches-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.match-card {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 20px;
  cursor: pointer;
  box-shadow: var(--shadow-offset-sm);
}

.match-card:hover {
  border-color: var(--brand-amber);
  background-color: rgba(255, 138, 31, 0.02);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0px var(--brand-amber);
}

.match-card.active-selected {
  border-color: var(--brand-amber);
  background-color: rgba(255, 138, 31, 0.04);
  box-shadow: var(--shadow-offset);
}

.match-card h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--char-core);
}

.match-card p {
  font-size: 12px;
  color: var(--char-muted);
  margin-top: 8px;
}

.match-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  font-size: 11px;
  font-family: var(--font-mono);
}

/* Sub-card active routing info details */
.detail-item {
  margin-bottom: 20px;
}

.detail-item h4 {
  font-size: 11px;
  color: var(--char-muted);
  text-transform: uppercase;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.detail-item p {
  font-size: 14px;
  color: var(--char-core);
}

.contact-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 24px;
}

/* Interactive Exclusivity Locker Card Layout */
.lock-card-details {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.trade-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.trade-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background-color: var(--bg-sand-dim);
  border: 1px solid var(--border-light);
  border-radius: 8px;
}

.trade-row:hover {
  border-color: var(--brand-amber);
}

.trade-label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--char-core);
}

.trade-status {
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
}

/* Console Box - warm paper terminal */
.console-box {
  background-color: var(--bg-sand-dim);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  font-family: 'Fira Code', 'Courier New', Courier, monospace;
  font-size: 11.5px;
  color: var(--char-core);
  padding: 24px 20px;
  flex-grow: 1;
  overflow-y: auto;
  line-height: 1.7;
  margin-bottom: 20px;
  box-shadow: var(--shadow-offset);
  position: relative;
}

/* Visual Terminal Header Dots */
.console-box::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 14px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--alert-red);
  box-shadow: 10px 0 0 var(--brand-amber), 20px 0 0 var(--success-emerald);
}

.console-placeholder {
  color: var(--char-muted);
  font-style: italic;
  margin-top: 10px;
}

.console-actions {
  display: flex;
  gap: 16px;
}

/* Financial Auditor form styling */
.auditor-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 28px;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-group label {
  font-size: 12.5px;
  color: var(--char-muted);
  font-weight: 500;
}

.form-group input {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--char-core);
  font-family: var(--font-body);
  font-size: 13.5px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-offset-sm);
}

.form-group input:focus {
  outline: none;
  border-color: var(--brand-amber);
  box-shadow: 2px 2px 0px var(--brand-amber);
}

.auditor-results {
  background-color: var(--bg-sand-dim);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 24px;
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-offset);
}

.financial-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.financial-table th, .financial-table td {
  padding: 10px 14px;
  text-align: left;
  font-size: 12px;
}

.financial-table th {
  border-bottom: 2px solid var(--border-light);
  color: var(--char-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.financial-table td {
  border-bottom: 1px solid var(--border-light);
  color: var(--char-core);
  font-family: var(--font-mono);
}

.financial-sum-row td {
  font-weight: 700;
  color: var(--brand-amber);
  border-top: 2px solid var(--border-light);
  font-size: 13px;
}

.devpost-copy-box {
  background-color: var(--bg-sand-dim);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 24px;
  max-height: 250px;
  overflow-y: auto;
  box-shadow: var(--shadow-offset-sm);
}

.copy-body h4 {
  font-family: var(--font-heading);
  font-size: 15px;
  color: var(--brand-amber);
  margin-bottom: 8px;
  font-weight: 600;
}

.copy-body p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--char-muted);
  margin-bottom: 20px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* Premium Property Card */
.property-visual-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  height: 200px;
  border: 1px solid var(--border-light);
  margin-bottom: 20px;
  box-shadow: var(--shadow-offset);
}

.property-visual-card:hover .property-img {
  transform: scale(1.05);
}

.property-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.zillow-est-tag {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: rgba(250, 249, 245, 0.95);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 10px 16px;
  box-shadow: var(--shadow-offset-sm);
  z-index: 2;
}

.zillow-est-tag span {
  font-size: 9px;
  color: var(--char-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.8px;
  display: block;
}

.zillow-est-tag p {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: #3b82f6 !important;
  margin-top: 2px;
}

.zillow-badge-top {
  position: absolute;
  top: 16px;
  right: 16px;
  background: linear-gradient(135deg, #006aff, #004bbf);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 4px 10px;
  font-size: 9px;
  font-weight: 800;
  border-radius: 4px;
  letter-spacing: 0.5px;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.25);
  z-index: 2;
  text-transform: uppercase;
}

/* Zillow Intelligence Panels */
.zillow-intelligence-panel {
  background: var(--bg-sand-dim);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-offset-sm);
}

.zillow-intelligence-panel h4 {
  font-size: 11px;
  color: var(--char-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
}

.zillow-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  text-align: center;
  margin-bottom: 16px;
}

.zillow-grid-item {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 8px;
}

.zillow-grid-item span {
  font-size: 9px;
  color: var(--char-muted);
  display: block;
}

.zillow-grid-item p {
  font-size: 13px;
  font-weight: 600;
  margin-top: 4px;
  color: var(--char-core);
  font-family: var(--font-mono);
}

.zillow-stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
  font-size: 12px;
}

.zillow-stats-row span {
  color: var(--char-muted);
}

.zillow-stats-row strong {
  color: var(--char-core);
  font-family: var(--font-mono);
}

/* SVG Valuation Sparklines */
.sparkline-container {
  background: var(--bg-sand-dim);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 16px;
  margin-top: 12px;
  box-shadow: var(--shadow-offset-sm);
}

.sparkline-header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--char-muted);
  margin-bottom: 8px;
  font-family: var(--font-mono);
}

.sparkline-path {
  stroke: #3b82f6;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  filter: drop-shadow(0px 2px 4px rgba(59, 130, 246, 0.3));
}

.sparkline-dots circle {
  fill: #3b82f6;
  stroke: var(--bg-sand-light);
  stroke-width: 1.5;
}

.sparkline-area {
  fill: url(#sparkline-gradient);
  opacity: 0.12;
}

/* ─── Leaflet Map — Warm Paper Theme ─────────────────────── */
#leaflet-map {
  background-color: var(--bg-sand-dim) !important;
}

.leaflet-container {
  font-family: var(--font-body) !important;
}

/* Warm Zoom Controls */
.leaflet-bar {
  border: 1px solid var(--border-light) !important;
  box-shadow: var(--shadow-offset) !important;
  border-radius: 8px !important;
  overflow: hidden;
}

.leaflet-bar a {
  background-color: #ffffff !important;
  border-bottom: 1px solid var(--border-light) !important;
  color: var(--char-core) !important;
  transition: all 0.2s ease !important;
}

.leaflet-bar a:hover {
  background-color: var(--bg-sand-dim) !important;
  color: var(--brand-amber) !important;
}

/* ─── Sand Card Map Popups with Crisp Offset Shadow ───────── */
.leaflet-popup-content-wrapper {
  background: var(--bg-sand-light) !important;
  border: 2px solid var(--brand-amber) !important;
  border-radius: 8px !important;
  color: var(--char-core) !important;
  box-shadow: 4px 4px 0px var(--char-core) !important;
  padding: 6px;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.leaflet-popup-tip {
  background: var(--bg-sand-light) !important;
  border: 1px solid var(--brand-amber) !important;
}

.leaflet-popup-content h3 {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--char-core);
}

.leaflet-popup-content p {
  font-size: 11px !important;
  color: var(--char-muted) !important;
  margin: 4px 0 !important;
}

.leaflet-popup-close-button {
  color: var(--char-muted) !important;
  padding: 6px 10px 0 0 !important;
}

.leaflet-popup-close-button:hover {
  color: var(--brand-amber) !important;
}

.map-popup-btn {
  background: var(--char-core);
  color: var(--bg-sand-light);
  border: none;
  font-size: 10px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 4px;
  margin-top: 10px;
  width: 100%;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  font-family: var(--font-mono);
  transition: all 0.2s ease;
}

.map-popup-btn:hover {
  background: var(--brand-amber);
  transform: translate(-2px, -2px);
  box-shadow: 2px 2px 0px var(--char-core);
}

/* ==========================================
   PHASE 2 WORKSPACE UPGRADES
   ========================================== */

/* ─── Uploader Dropzone — Amber Hover States ─────────────── */
.uploader-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 220px;
  background-color: var(--bg-sand-dim);
  border: 2px dashed rgba(255, 138, 31, 0.3);
  border-radius: 12px;
  padding: 30px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.uploader-area:hover {
  border-color: var(--brand-amber);
  background-color: var(--brand-amber-glow);
  box-shadow: 0 0 0 1px var(--brand-amber);
}

.uploader-area.dragover {
  border: 2px dashed var(--brand-amber);
  background: var(--brand-amber-glow);
  box-shadow: var(--shadow-offset);
  animation: amberPulseBorder 1.2s ease-in-out infinite;
}

.uploader-area.dragover .upload-icon {
  transform: scale(1.1);
}

@keyframes amberPulseBorder {
  0%, 100% { box-shadow: 2px 2px 0px var(--brand-amber), 0 0 0 0 rgba(255, 138, 31, 0.2); }
  50% { box-shadow: 2px 2px 0px var(--brand-amber), 0 0 0 6px rgba(255, 138, 31, 0); }
}

/* Scanned doc wrapper */
.scanned-doc-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-sand-dim);
  border: 1px solid rgba(255, 138, 31, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

/* Scan laser */
.scan-laser {
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--brand-amber), var(--char-core), var(--brand-amber), transparent);
  box-shadow: 0 0 12px rgba(255, 138, 31, 0.6);
  position: absolute;
  left: 0;
  right: 0;
  z-index: 12;
  animation: laserSweep 2.2s ease-in-out infinite;
}

@keyframes laserSweep {
  0% { top: 0%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* OCR Overlay */
.ocr-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 11;
}

.ocr-box {
  border: 1.5px solid var(--success-emerald);
  background-color: var(--success-emerald-glow);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.3);
  position: absolute;
  border-radius: 4px;
  opacity: 0;
  animation: ocrBoxFlash 1.5s ease-in-out forwards;
}

@keyframes ocrBoxFlash {
  0% { opacity: 0; transform: scale(0.9); }
  20% { opacity: 0.85; transform: scale(1.02); }
  35% { opacity: 0.7; transform: scale(1); }
  85% { opacity: 0.7; }
  100% { opacity: 0; }
}

/* Blueprint Preview */
.blueprint-preview-container {
  background: repeating-linear-gradient(
    0deg,
    rgba(43, 57, 70, 0.04) 0px, rgba(43, 57, 70, 0.04) 1px,
    transparent 1px, transparent 16px
  ), repeating-linear-gradient(
    90deg,
    rgba(43, 57, 70, 0.04) 0px, rgba(43, 57, 70, 0.04) 1px,
    transparent 1px, transparent 16px
  );
  width: 90%;
  height: 85%;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 1px dashed rgba(255, 138, 31, 0.25);
}

.blueprint-lines {
  width: 80%;
  height: 70%;
  opacity: 0.15;
  background: repeating-linear-gradient(0deg, var(--brand-amber) 0px, var(--brand-amber) 1px, transparent 1px, transparent 24px),
              repeating-linear-gradient(90deg, var(--brand-amber) 0px, var(--brand-amber) 1px, transparent 1px, transparent 24px);
  border: 1px solid var(--brand-amber);
}

.blueprint-badge {
  position: absolute;
  bottom: 12px;
  background: rgba(250, 249, 245, 0.9);
  border: 1px solid rgba(255, 138, 31, 0.3);
  color: var(--brand-amber);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.8px;
  box-shadow: var(--shadow-offset-sm);
  text-transform: uppercase;
}

/* RAG Results */
.rag-results-container {
  background: var(--bg-sand-dim);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 16px;
  margin-top: 14px;
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-offset-sm);
}

.rag-score-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--success-emerald);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.rag-citation-box {
  background: #ffffff;
  border-left: 3px solid var(--brand-amber);
  padding: 10px 14px;
  border-radius: 0 6px 6px 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--char-muted);
  line-height: 1.6;
  margin-top: 10px;
  border-top: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.rag-adjustment-card {
  background: rgba(255, 138, 31, 0.04);
  border: 1px dashed rgba(255, 138, 31, 0.3);
  border-radius: 6px;
  padding: 10px 12px;
  margin-top: 12px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--char-core);
}

.input-tabs .btn {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  color: var(--char-muted);
}

.input-tabs .btn:hover {
  color: var(--char-core);
  background-color: var(--bg-sand-dim);
  border-color: var(--char-core);
}

.input-tabs .btn.active {
  background-color: rgba(255, 138, 31, 0.06);
  border-color: rgba(255, 138, 31, 0.4);
  color: var(--brand-amber);
  box-shadow: var(--shadow-offset-sm);
}

/* ─── Next-Step Flow Callout ─────────────────────────────── */
.next-step-callout {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding: 14px 20px;
  background: rgba(255, 138, 31, 0.05);
  border: 1px solid rgba(255, 138, 31, 0.25);
  border-left: 3px solid var(--brand-amber);
  border-radius: 8px;
  font-size: 13px;
  color: var(--char-muted);
  flex-wrap: wrap;
}

.next-step-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--brand-amber);
  background: rgba(255, 138, 31, 0.1);
  border: 1px solid rgba(255, 138, 31, 0.3);
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.next-step-link {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-amber);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.next-step-link:hover {
  text-decoration: underline;
}

.hidden {
  display: none !important;
}

/* ==========================================
   AI SITE-WALK ROUTE OPTIMIZER PANEL
   ========================================== */
.route-optimizer-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.route-optimizer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.route-optimizer-header h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--char-core);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.route-optimizer-header h4::before {
  content: "🗺️";
  font-size: 16px;
}

.route-helper {
  font-size: 12px;
  color: var(--char-muted);
  margin: 0;
  font-style: italic;
}

.route-lead-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.route-lead-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  box-shadow: var(--shadow-offset-sm);
}

.route-lead-option:hover {
  border-color: var(--brand-amber);
  background: rgba(255, 138, 31, 0.04);
}

.route-lead-option input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--brand-amber);
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  cursor: pointer;
}

.route-lead-option span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.route-lead-option strong {
  font-size: 12px;
  font-weight: 600;
  color: var(--char-core);
}

.route-lead-option small {
  font-size: 11px;
  color: var(--char-muted);
  font-family: var(--font-mono);
}

.route-summary {
  font-size: 12px;
  color: var(--char-muted);
  padding: 10px 12px;
  background: rgba(255, 138, 31, 0.04);
  border-radius: 6px;
  border: 1px solid rgba(255, 138, 31, 0.2);
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-offset-sm);
}

.route-summary strong {
  color: var(--brand-amber);
  font-size: 11px;
  letter-spacing: 0.5px;
  word-break: break-all;
  font-family: var(--font-mono);
}

.route-summary span {
  color: var(--success-emerald);
  font-weight: 600;
  font-family: var(--font-mono);
}

.optimized-route-line {
  animation: routePulse 2s ease-in-out infinite;
}

@keyframes routePulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 0.5; }
}

/* ==========================================
   STRIPE SECURE CHECKOUT PORTAL MODAL
   ========================================== */
.stripe-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(43, 57, 70, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.stripe-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.stripe-modal-box {
  background: var(--bg-sand-light);
  border: 2px solid var(--border-light);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  padding: 32px;
  box-shadow: 6px 6px 0px var(--char-core);
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
}

.stripe-modal-overlay.active .stripe-modal-box {
  transform: translateY(0) scale(1);
}

.stripe-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 18px;
  margin-bottom: 24px;
}

.stripe-logo-area {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stripe-logo {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: #635bff;
  letter-spacing: -0.5px;
}

.stripe-badge-sec {
  background: rgba(99, 91, 255, 0.08);
  color: #635bff;
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  border: 1px solid rgba(99, 91, 255, 0.2);
  font-family: var(--font-mono);
}

.close-stripe-modal {
  font-size: 20px;
  color: var(--char-muted);
  cursor: pointer;
  background: none;
  border: none;
}

.close-stripe-modal:hover {
  color: var(--char-core);
}

.stripe-tier-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.stripe-tier-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-offset-sm);
}

.stripe-tier-card:hover, .stripe-tier-card.selected {
  border-color: #635bff;
  background: rgba(99, 91, 255, 0.03);
}

.stripe-tier-card.selected {
  box-shadow: 2px 2px 0px #635bff;
}

.stripe-tier-card h4 {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--char-core);
}

.stripe-tier-card p {
  font-size: 11px;
  color: var(--char-muted);
  margin-top: 2px;
}

.stripe-price-tag {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  color: #635bff;
}

.stripe-card-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stripe-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stripe-input-group label {
  font-size: 10.5px;
  color: var(--char-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stripe-input-group input {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--char-core);
  font-family: var(--font-body);
  font-size: 13px;
  box-shadow: var(--shadow-offset-sm);
}

.stripe-input-group input:focus {
  outline: none;
  border-color: #635bff;
  box-shadow: 2px 2px 0px #635bff;
}

.stripe-card-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
}

.btn-stripe-pay {
  background: #635bff;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 14px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-offset);
  margin-top: 10px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-stripe-pay:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px var(--char-core);
  background: #7a73ff;
}

.btn-stripe-pay:disabled {
  background: var(--char-dim);
  box-shadow: none;
  cursor: not-allowed;
}

.stripe-footer {
  text-align: center;
  font-size: 10px;
  color: var(--char-muted);
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: var(--font-mono);
}

/* Hot Lead Pulse */
@keyframes pulse-orange {
  0% { transform: scale(0.98); opacity: 0.8; }
  50% { transform: scale(1.02); opacity: 1; filter: drop-shadow(0 0 4px rgba(255, 138, 31, 0.4)); }
  100% { transform: scale(0.98); opacity: 0.8; }
}

.hot-lead-pulse {
  animation: pulse-orange 1.8s infinite ease-in-out;
}

/* ==========================================
   VERIFIED GUILD DIRECTORY STYLES
   ========================================== */
.directory-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-offset);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.directory-card:hover {
  border-color: var(--brand-amber);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px var(--char-core);
}

.directory-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-amber), var(--char-core));
}

.directory-card.premium::before {
  background: linear-gradient(90deg, var(--brand-amber), #fbbf24);
}

.directory-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.directory-avatar {
  background: var(--brand-amber);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  color: #ffffff;
}

.directory-card.premium .directory-avatar {
  background: linear-gradient(135deg, var(--brand-amber), #fbbf24);
}

.directory-info h3 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--char-core);
}

.directory-info .trade-pill {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--brand-amber);
  text-transform: uppercase;
  margin-top: 4px;
  display: inline-block;
  letter-spacing: 0.5px;
  font-family: var(--font-mono);
}

.directory-card.premium .trade-pill {
  color: var(--brand-amber);
}

.directory-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: var(--bg-sand-dim);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 12px;
  margin: 16px 0;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-label {
  font-size: 9.5px;
  color: var(--char-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.stat-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--char-core);
  font-family: var(--font-mono);
}

.directory-contact-btn {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--char-core);
  cursor: pointer;
  background: var(--brand-amber);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.3s ease;
  margin-top: auto;
  box-shadow: var(--shadow-offset-sm);
}

.directory-card.premium .directory-contact-btn {
  background: linear-gradient(135deg, var(--brand-amber), #fbbf24);
}

.directory-contact-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0px var(--char-core);
}

/* ==========================================
   B2B NEGOTIATION CHAT DRAWER
   ========================================== */
.bid-chat-drawer {
  position: relative;
  z-index: 100;
}

/* Floating Toggle Button */
.bid-chat-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--brand-amber);
  color: #ffffff;
  border: 2px solid var(--char-core);
  border-radius: 30px;
  padding: 12px 24px;
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-offset);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 999;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.bid-chat-toggle:hover {
  transform: translate(-4px, -4px) scale(1.03);
  box-shadow: 8px 8px 0px var(--char-core);
}

.bid-chat-toggle strong {
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
}

/* ─── Sliding Chat Panel — Warm Paper ────────────────────── */
.bid-chat-panel {
  position: fixed;
  top: 80px;
  right: -420px;
  width: 400px;
  height: calc(100vh - 80px);
  background: var(--bg-sand-dim);
  border-left: 2px solid var(--brand-amber);
  box-shadow: -4px 0 0 rgba(43, 57, 70, 0.08);
  display: flex;
  flex-direction: column;
  z-index: 998;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.bid-chat-drawer.active .bid-chat-panel {
  right: 0;
}

/* Chat Header */
.chat-panel-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: #ffffff;
}

.chat-panel-header span {
  font-size: 10px;
  color: var(--success-emerald);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: var(--font-mono);
}

.chat-panel-header h4 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--char-core);
  margin-top: 4px;
  margin-bottom: 0;
}

.chat-panel-header p {
  font-size: 12px;
  color: var(--char-muted);
  margin-top: 2px;
  margin-bottom: 0;
}

.chat-panel-close {
  background: none;
  border: none;
  color: var(--char-muted);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}

.chat-panel-close:hover {
  color: var(--char-core);
}

/* Status Bar */
.chat-status-row {
  padding: 8px 24px;
  background: rgba(255, 138, 31, 0.04);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--char-muted);
  font-family: var(--font-mono);
}

.chat-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--success-emerald);
  animation: chatPulse 1.5s infinite;
}

@keyframes chatPulse {
  0% { transform: scale(0.9); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.5; }
}

/* Message Thread Zone */
.chat-messages {
  flex-grow: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--char-muted);
  font-size: 13px;
  font-style: italic;
  text-align: center;
}

/* ─── Chat Bubbles — Warm Paper Theme ─────────────────────── */
.chat-bubble-row {
  display: flex;
  width: 100%;
}

.chat-bubble-row.from-sub {
  justify-content: flex-end;
}

.chat-bubble-row.from-gc {
  justify-content: flex-start;
}

.chat-bubble {
  max-width: 85%;
  padding: 14px 18px;
  font-size: 13px;
  line-height: 1.5;
  position: relative;
  text-align: left;
}

/* Carlos's (Subcontractor) Bubbles — Solid Amber, White Text */
.chat-bubble-row.from-sub .chat-bubble {
  background: var(--brand-amber);
  color: #ffffff;
  font-weight: 600;
  border-radius: 12px 12px 0px 12px;
  box-shadow: var(--shadow-offset-sm);
}

/* GC Bubbles — Clean White with Sand Border */
.chat-bubble-row.from-gc .chat-bubble {
  background: #ffffff;
  border: 1px solid #E2DCD0;
  color: var(--char-core);
  border-radius: 12px 12px 12px 0px;
  box-shadow: var(--shadow-offset-sm);
}

.chat-bubble-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 9.5px;
  margin-bottom: 6px;
  opacity: 0.7;
  font-family: var(--font-mono);
}

.chat-bubble-row.from-sub .chat-bubble-meta {
  color: rgba(255, 255, 255, 0.85);
}

.chat-bubble-row.from-gc .chat-bubble-meta {
  color: var(--char-muted);
}

/* Pulsing Typing Indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid #E2DCD0;
  border-radius: 12px 12px 12px 0px;
  width: fit-content;
  box-shadow: var(--shadow-offset-sm);
}

.typing-dot {
  width: 6px;
  height: 6px;
  background-color: var(--char-muted);
  border-radius: 50%;
  animation: typingPulse 1.2s infinite ease-in-out;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingPulse {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(-4px); opacity: 1; }
}

/* Chat Compose Form */
.chat-compose {
  padding: 24px;
  border-top: 2px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #ffffff;
}

.chat-compose textarea {
  width: 100%;
  background: var(--bg-sand-dim);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 12px;
  color: var(--char-core);
  font-family: var(--font-body);
  font-size: 12.5px;
  resize: none;
  height: 60px;
  box-shadow: inset 1px 1px 0px rgba(43,57,70,0.04);
}

.chat-compose textarea:focus {
  outline: none;
  border-color: var(--brand-amber);
  box-shadow: 2px 2px 0px var(--brand-amber);
}

.chat-compose button {
  align-self: flex-end;
  padding: 8px 20px;
  font-size: 12px;
  border-radius: 6px;
  background: var(--brand-amber);
  color: #ffffff;
  border: 1px solid var(--char-core);
  font-family: var(--font-heading);
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-offset-sm);
  transition: all 0.2s ease;
}

.chat-compose button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0px var(--char-core);
}

/* ==========================================
   MOBILE & RESPONSIVE DESIGN COMMANDS
   ========================================== */
@media (max-width: 900px) {
  .app-container {
    grid-template-columns: 1fr !important;
    height: auto !important;
    width: 100vw !important;
    overflow-x: hidden !important;
  }
  
  .sidebar {
    height: auto !important;
    border-right: none !important;
    border-bottom: 2px solid var(--border-light) !important;
    padding: 24px !important;
    width: 100% !important;
  }
  
  .main-content {
    height: auto !important;
    width: 100% !important;
    overflow-x: hidden !important;
  }
  
  .top-bar {
    padding: 16px 20px !important;
    flex-direction: column !important;
    gap: 12px !important;
    height: auto !important;
    align-items: stretch !important;
  }
  
  .header-search {
    width: 100% !important;
  }
  
  .header-actions {
    justify-content: space-between !important;
    width: 100% !important;
    margin-top: 4px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  
  .grid-layout {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  
  .grid-layout.two-cols {
    grid-template-columns: 1fr !important;
  }
  
  .grid-layout.map-layout {
    grid-template-columns: 1fr !important;
  }
  
  .grid-layout.active-bids-layout {
    grid-template-columns: 1fr !important;
  }
  
  .visual-map-container {
    height: 320px !important;
  }
  
  .workspace-canvas {
    padding: 16px !important;
  }
  
  .stripe-modal-box {
    margin: 16px !important;
    padding: 20px !important;
    max-width: calc(100% - 32px) !important;
  }
  
  .crm-pipeline-board {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
}

/* ─── B2B Secure Login Gate — Mobile-First Responsive Styles ─── */
.b2b-login-gate-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #2B3946;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  font-family: 'Inter', sans-serif;
  -webkit-overflow-scrolling: touch;
}

.b2b-login-gate-card {
  background: #ffffff;
  width: 100%;
  max-width: 440px;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  padding: 24px;
  border: 2px solid var(--brand-amber, #FF8A1F);
  text-align: left;
  margin: auto;
  box-sizing: border-box;
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@media (min-width: 480px) {
  .b2b-login-gate-card {
    padding: 36px;
  }
}
