@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Outfit:wght@500;600;700;800&display=swap');


/* =============================================================================
   LOOPS LOGISTICS - COMPLETE DESIGN SYSTEM & STYLES (v3.3)
   ============================================================================= */

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: #0f172a;
  color: #f8fafc;
  height: 100vh;
  overflow: hidden;
}

/* APP SHELL */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* TOP NAVBAR */
.app-header {
  height: 56px;
  background-color: #1e293b;
  border-bottom: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1000;
  flex-shrink: 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.brand-icon {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  border-radius: 6px;
  display: inline-block;
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: #0f172a;
  padding: 4px;
  border-radius: 8px;
  border: 1px solid #334155;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-tab:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.05);
}

.nav-tab.active {
  background: #38bdf8;
  color: #0f172a;
  font-weight: 700;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.simulator-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid #38bdf8;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.simulator-btn:hover {
  background: #38bdf8;
  color: #0f172a;
}

/* PAGE CONTENT CONTAINER */
.page-content {
  flex: 1;
  height: calc(100vh - 56px);
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
}

/* DATABASE PAGE STYLES */
.database-container {
  padding: 16px 24px;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #0f172a;
  overflow: hidden;
}

.database-sub-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #334155;
  padding-bottom: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.db-sub-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.db-sub-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #1e293b;
  padding: 4px;
  border-radius: 8px;
  border: 1px solid #334155;
}

.db-sub-tab, .db-subtab {
  background: transparent;
  color: #94a3b8;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  outline: none;
}

.db-sub-tab:hover, .db-subtab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.db-sub-tab.active, .db-subtab.active {
  background: #38bdf8;
  color: #0f172a;
  font-weight: 700;
}

.database-view-body {
  flex: 1;
  overflow-y: auto;
}

.db-actions-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.precision-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #1e293b;
  padding: 4px;
  border-radius: 6px;
  border: 1px solid #334155;
}

.filter-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.filter-btn.active {
  background: #334155;
  color: #ffffff;
}

.db-search {
  flex: 1;
  max-width: 320px;
  background: #1e293b;
  border: 1px solid #334155;
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
}

.db-search:focus {
  outline: none;
  border-color: #38bdf8;
}

.btn-primary {
  background: #38bdf8;
  color: #0f172a;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary:hover {
  background: #0284c7;
  color: #ffffff;
}

/* EXPEDITION DASHBOARD SPLIT LAYOUT */
.expedition-container {
  display: flex;
  width: 100vw;
  height: calc(100vh - 56px);
  overflow: hidden;
  position: relative;
  background-color: #0f172a;
}

.expedition-left-panel {
  height: 100%;
  background: #182030;
  border-right: 1px solid #334155;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  z-index: 10;
  position: relative;
  transition: width 0.2s ease;
}

.expedition-right-map {
  flex: 1;
  height: 100%;
  position: relative;
}

.expedition-right-map .map-canvas {
  width: 100%;
  height: 100%;
}

.overlay-card {
  background: #1e293b;
  border-bottom: 1px solid #334155;
  padding: 10px 12px;
}

.date-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.date-badge {
  background: #0f172a;
  border: 1px solid #334155;
  color: #f8fafc;
  padding: 4px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.8rem;
}

.icon-btn-header {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  border: 1px solid #334155;
  color: #38bdf8;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.icon-btn-header:hover {
  background: #38bdf8;
  color: #0f172a;
}

.search-input {
  width: 100%;
  background: #0f172a;
  border: 1px solid #334155;
  color: #f8fafc;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
}

.search-input:focus {
  outline: none;
  border-color: #38bdf8;
}

.missions-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mission-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mission-card:hover {
  border-color: #38bdf8;
  background: #242e42;
}

.mission-card.selected {
  border-color: #38bdf8;
  background: #242e42;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
}

.btn-new-job-dashed {
  width: 100%;
  background: rgba(30, 41, 59, 0.6);
  border: 2px dashed #475569;
  color: #94a3b8;
  border-radius: 8px;
  padding: 8px;
  font-weight: 600;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-new-job-dashed:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: #38bdf8;
  color: #38bdf8;
}

.left-detail-pane {
  flex: 1;
  height: 100%;
  background: #182030;
  border-left: 1px solid #334155;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dispatcher-overlay-right {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 280px;
  z-index: 500;
  pointer-events: none;
}

.notifications-box {
  pointer-events: auto;
  background: rgba(30, 41, 59, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 10px;
  max-height: 220px;
  overflow-y: auto;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.78rem;
}

.notification-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 4px;
  flex-shrink: 0;
}

.notification-dot.delivered { background-color: #22c55e; }
.notification-dot.failed { background-color: #ef4444; }

/* DATA TABLES */
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.82rem;
}

.data-table th {
  background-color: #0f172a;
  color: #94a3b8;
  font-weight: 600;
  padding: 8px 10px;
  border-bottom: 1px solid #334155;
}

.data-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #f8fafc;
}

.data-table tr:hover {
  background-color: #242e42;
  cursor: pointer;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid #334155;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-action:hover {
  background: #334155;
  border-color: #94a3b8;
}

.table-input {
  background: #0f172a;
  border: 1px solid #334155;
  color: #f8fafc;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* MODAL OVERLAY & CONTENT */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

.hover-underline {
  transition: all 0.12s ease;
}

.hover-underline:hover {
  text-decoration: underline !important;
  color: #38bdf8 !important;
}
