/* ==========================================================================
   极通陆联 JETON LOGISTICS - Modern Clean B2B Logistics Stylesheet
   Clean, structured, crisp typography, 60-30-10 color discipline
   ========================================================================== */

:root {
  --primary-navy: #0b192c;
  --secondary-navy: #1e3e62;
  --accent-blue: #0284c7;
  --accent-orange: #ea580c;
  --accent-emerald: #059669;
  --accent-amber: #d97706;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-subtle: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-hover: 0 4px 12px rgba(15, 23, 42, 0.08);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.tabular-nums {
  font-family: "JetBrains Mono", "SF Mono", Consolas, Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

/* ================= Top Bar & Navigation ================= */
.top-notice-bar {
  background-color: #081220;
  color: #94a3b8;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.top-notice-bar a {
  color: #cbd5e1;
  text-decoration: none;
}
.top-notice-bar a:hover {
  color: #ffffff;
}

.site-navbar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.brand-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-icon-box {
  width: 36px;
  height: 36px;
  background: var(--primary-navy);
  color: #fff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.5px;
}
.brand-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-navy);
  letter-spacing: -0.5px;
  line-height: 1.1;
}
.brand-tag {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 600;
}

.nav-link-custom {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.5rem 0.85rem !important;
  text-decoration: none;
  transition: color 0.15s ease;
  white-space: nowrap;
}
.nav-link-custom:hover,
.nav-link-custom.active {
  color: var(--primary-navy);
  font-weight: 600;
}

.btn-publish-quick {
  background-color: var(--accent-orange);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-sm);
  padding: 0.45rem 1.1rem;
  border: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-publish-quick:hover {
  background-color: #c2410c;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.25);
}

/* ================= Hero & Search Widget ================= */
.hero-logistics {
  background: linear-gradient(180deg, #0b192c 0%, #152942 100%);
  color: #ffffff;
  padding: 2.75rem 0 2.25rem 0;
  position: relative;
}

.hero-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.25;
}

.hero-subtitle {
  color: #cbd5e1;
  font-size: 15px;
  margin-top: 0.5rem;
}

.search-dispatch-panel {
  background: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  padding: 1.5rem;
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.search-tab-nav {
  display: flex;
  gap: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
}
.search-tab-item {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  text-decoration: none;
  padding-bottom: 0.5rem;
}
.search-tab-item.active {
  color: var(--primary-navy);
}
.search-tab-item.active::after {
  content: "";
  position: absolute;
  bottom: -0.75rem;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-blue);
}

.input-route-group {
  position: relative;
}
.input-route-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
  display: block;
}

.form-control-route {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  background-color: #ffffff;
}
.form-control-route:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
  outline: none;
}

.btn-route-swap {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: 22px;
}
.btn-route-swap:hover {
  background: #f1f5f9;
  color: var(--primary-navy);
  transform: rotate(180deg);
}

.hot-routes-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1rem;
  font-size: 13px;
}
.hot-route-pill {
  color: var(--text-muted);
  background: #f1f5f9;
  padding: 2px 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 12px;
  transition: all 0.15s ease;
}
.hot-route-pill:hover {
  background: #e2e8f0;
  color: var(--primary-navy);
}

/* ================= Freight Card (Refreshed Clean Logistics Style) ================= */
.freight-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  margin-bottom: 1rem;
  position: relative;
}
.freight-card:hover {
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-hover);
}
.freight-card.urgent {
  border-top: 3px solid var(--accent-orange);
}

.route-header-wrap {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.route-point {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-navy);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.route-arrow-connector {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 0 8px;
  color: var(--text-muted);
  font-size: 12px;
  position: relative;
}
.route-arrow-line {
  width: 50px;
  height: 1px;
  background: var(--border-strong);
  position: relative;
  margin-top: 2px;
}
.route-arrow-line::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -3px;
  width: 7px;
  height: 7px;
  border-top: 1px solid var(--border-strong);
  border-right: 1px solid var(--border-strong);
  transform: rotate(45deg);
}

.freight-price-val {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-orange);
  line-height: 1;
}
.freight-price-unit {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: normal;
  margin-left: 2px;
}

.meta-unboxed {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.meta-unboxed .sep {
  color: #cbd5e1;
}
.meta-highlight {
  color: var(--text-main);
  font-weight: 600;
}

.shipper-strip {
  border-top: 1px dashed var(--border-subtle);
  padding-top: 0.75rem;
  margin-top: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}
.shipper-name {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.badge-verify {
  font-size: 11px;
  color: var(--accent-emerald);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

/* ================= Filter Sidebar / Controls ================= */
.filter-box {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}
.filter-row {
  display: flex;
  align-items: flex-start;
  padding: 0.65rem 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
}
.filter-row:last-child {
  border-bottom: none;
}
.filter-title {
  width: 80px;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
  padding-top: 3px;
}
.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.filter-btn {
  background: transparent;
  border: none;
  padding: 3px 10px;
  font-size: 13px;
  color: var(--text-main);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}
.filter-btn:hover {
  background: #f1f5f9;
  color: var(--primary-navy);
}
.filter-btn.active {
  background: var(--primary-navy);
  color: #ffffff;
  font-weight: 600;
}

/* ================= Stat Banner ================= */
.stat-item {
  border-right: 1px solid var(--border-subtle);
  padding: 0.5rem 1rem;
}
.stat-item:last-child {
  border-right: none;
}
.stat-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-navy);
  line-height: 1.1;
}
.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ================= Freight Table View ================= */
.freight-table {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.freight-table th {
  background: #f8fafc;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 1rem;
  white-space: nowrap;
}
.freight-table td {
  padding: 0.85rem 1rem;
  font-size: 14px;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
}
.freight-table tr:hover td {
  background-color: #f8fafc;
}

/* ================= Detail Page Specifics ================= */
.detail-main-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}
.route-big-display {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}
.route-node {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-navy);
}
.route-node-sub {
  font-size: 13px;
  color: var(--text-muted);
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}
.spec-box {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
}
.spec-box-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.spec-box-val {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

/* ================= Forms & Inputs (Publish / Auth) ================= */
.form-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-navy);
  border-left: 3px solid var(--accent-blue);
  padding-left: 8px;
  margin-bottom: 1rem;
  margin-top: 1.5rem;
}
.form-section-title:first-child {
  margin-top: 0;
}

.form-label-custom {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 4px;
}
.form-control-custom,
.form-select-custom {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.85rem;
  font-size: 14px;
}
.form-control-custom:focus,
.form-select-custom:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
  outline: none;
}

/* ================= Member / User Center ================= */
.user-sidebar {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 0;
}
.user-profile-summary {
  padding: 0 1.25rem 1.25rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  text-align: center;
}
.user-avatar-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #e2e8f0;
  margin: 0 auto 0.75rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-navy);
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.user-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.75rem 1.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s ease;
  border-left: 3px solid transparent;
}
.user-nav-link:hover {
  background: #f8fafc;
  color: var(--primary-navy);
}
.user-nav-link.active {
  background: #f1f5f9;
  color: var(--primary-navy);
  font-weight: 600;
  border-left-color: var(--accent-blue);
}

/* ================= Authentication Cards ================= */
.auth-wrapper {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  padding: 2rem;
}
.role-segmented-tab {
  display: flex;
  background: #f1f5f9;
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 1.5rem;
}
.role-tab-btn {
  flex: 1;
  text-align: center;
  padding: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}
.role-tab-btn.active {
  background: #ffffff;
  color: var(--primary-navy);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ================= Toast Notification ================= */
.custom-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1080;
  background: #0f172a;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideUpToast 0.25s ease-out;
}
@keyframes slideUpToast {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-title {
    font-size: 24px;
  }
  .search-dispatch-panel {
    padding: 1rem;
  }
  .stat-item {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.5rem 0;
  }
}

/* Keep conditional content out of layout until real data is available. */
[hidden] { display: none !important; }
