/* Shipping Wish LLC - Enterprise TMS & Public Site Design System */

:root {
  --bg-main: #0c0f14;
  --bg-card: #141820;
  --bg-card-hover: #1c222e;
  --bg-panel: rgba(20, 24, 32, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-active: rgba(245, 158, 11, 0.4);
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;

  --amber-primary: #f59e0b;
  --amber-hover: #d97706;
  --amber-glow: rgba(245, 158, 11, 0.25);

  --accent-blue: #3b82f6;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --accent-purple: #8b5cf6;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-main: 0 10px 30px rgba(0, 0, 0, 0.5);
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

/* Layout Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 15, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #fff;
}

.brand .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--amber-primary);
  box-shadow: 0 0 10px var(--amber-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-links a:hover,
.nav-links a.current {
  color: #fff;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-phone {
  font-size: 14px;
  font-weight: 600;
  color: var(--amber-primary);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-fast);
}

.btn-amber {
  background: var(--amber-primary);
  color: #000;
}

.btn-amber:hover {
  background: var(--amber-hover);
  box-shadow: 0 0 15px var(--amber-glow);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--amber-primary);
  color: var(--amber-primary);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--accent-red);
  color: var(--accent-red);
}

.btn-danger:hover {
  background: var(--accent-red);
  color: #fff;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

/* Hero Section */
.hero {
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--amber-primary);
  background: rgba(245, 158, 11, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero h1 span {
  color: var(--amber-primary);
}

.lead {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 36px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.chip {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  margin-right: 6px;
}

/* Live Dispatch Board Mockup */
.dispatch-board {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-main);
}

.board-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
  animation: pulse-anim 2s infinite;
}

@keyframes pulse-anim {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.kpi-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.kpi {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
}

.kpi-label {
  font-size: 12px;
  color: var(--text-muted);
}

.odometer {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin-top: 4px;
  display: inline-block;
}

.suffix {
  font-size: 18px;
  color: var(--amber-primary);
  margin-left: 2px;
}

/* Sections & Grids */
.section {
  padding: 80px 0;
}

.section-alt {
  background: rgba(255, 255, 255, 0.015);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.section-head h2 {
  font-size: 32px;
  margin-bottom: 12px;
}

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

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

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: var(--transition-fast);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
  transform: translateY(-2px);
}

.card .icon {
  font-size: 32px;
  margin-bottom: 16px;
}

.card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.card p {
  font-size: 14px;
  color: var(--text-muted);
}

/* TMS Shell / Dashboard Layout */
.tms-shell {
  padding: 32px 0;
  flex: 1;
}

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

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.stat-card .val {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin-top: 4px;
}

.stat-card .sub {
  font-size: 12px;
  color: var(--amber-primary);
  margin-top: 4px;
}

.tms-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
}

.table-scroll {
  overflow-x: auto;
}

.tms-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.tms-table th {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
}

.tms-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
}

.tms-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Status Badges */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.badge-new { background: rgba(59, 130, 246, 0.2); color: var(--accent-blue); }
.badge-booked { background: rgba(245, 158, 11, 0.2); color: var(--amber-primary); }
.badge-dispatched { background: rgba(139, 92, 246, 0.2); color: var(--accent-purple); }
.badge-at_pickup, .badge-loaded, .badge-in_transit, .badge-at_delivery { background: rgba(59, 130, 246, 0.2); color: var(--accent-blue); }
.badge-delivered, .badge-pod_uploaded { background: rgba(16, 185, 129, 0.2); color: var(--accent-green); }
.badge-invoiced { background: rgba(245, 158, 11, 0.2); color: var(--amber-primary); }
.badge-paid { background: rgba(16, 185, 129, 0.25); color: var(--accent-green); }
.badge-unpaid { background: rgba(239, 68, 68, 0.2); color: var(--accent-red); }

/* Tabs */
.tms-tabs {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
}

.tab-btn {
  padding: 10px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.tab-btn.active {
  color: var(--amber-primary);
  border-bottom-color: var(--amber-primary);
}

/* Form Styles */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 14px;
  background: #0f1217;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 14px;
  outline: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--amber-primary);
}

.form-msg {
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

.form-msg.error {
  background: rgba(239, 68, 68, 0.2);
  color: var(--accent-red);
  display: block;
}

.form-msg.success {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-green);
  display: block;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  position: relative;
  box-shadow: var(--shadow-main);
}

.modal-close {
  position: absolute;
  top: 20px; right: 20px;
  background: none; border: none;
  color: var(--text-muted);
  font-size: 24px; cursor: pointer;
}

/* Footer */
.site-footer {
  background: #090b0e;
  border-top: 1px solid var(--border-color);
  padding: 60px 0 30px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-grid h4 {
  font-size: 16px;
  margin-bottom: 16px;
  color: #fff;
}

.footer-grid a {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.footer-grid a:hover {
  color: var(--amber-primary);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-dim);
}

/* Auth Page Card Styles */
.auth-page {
  padding: 60px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  box-shadow: var(--shadow-main);
}

.auth-links {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

.auth-links a {
  color: var(--amber-primary);
  font-weight: 600;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid, .grid-3, .grid-4, .footer-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
  .nav-toggle {
    display: block;
  }
}
