﻿/* ============================================================
   Sahan EXPRESS — Global Design System
   Colors: Navy #0A1628 | Teal #00D4AA | Gold #F5A623
   Font: Inter (Google Fonts)
   ============================================================ */

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

/* ── CSS Variables ── */
:root {
  --navy-900: #040d1a;
  --navy-800: #0A1628;
  --navy-700: #0f2040;
  --navy-600: #162b55;
  --navy-500: #1d3a6e;
  --teal-400: #00D4AA;
  --teal-300: #00efc0;
  --teal-200: #7ffade;
  --gold-500: #F5A623;
  --gold-400: #ffc14a;
  --gold-300: #ffd87a;
  --white: #ffffff;
  --gray-100: #f0f4ff;
  --gray-200: #c8d6f0;
  --gray-300: #8fa3c4;
  --gray-400: #5a7299;
  --red-400: #ff5c7a;
  --red-300: #ff8fa3;
  --green-400: #2ecc71;
  --green-300: #55e695;
  --orange-400: #ff8c42;

  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.10);
  --glass-hover: rgba(255, 255, 255, 0.08);

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);
  --shadow-teal: 0 0 40px rgba(0,212,170,0.2);
  --shadow-gold: 0 0 40px rgba(245,166,35,0.2);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 999px;

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;

  --sidebar-width: 260px;
  --header-height: 72px;
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--navy-800);
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
}

input, select, textarea {
  font-family: inherit;
  outline: none;
}

/* ── Typography ── */
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.15; }
h2 { font-size: clamp(1.5rem, 3vw, 2.4rem); font-weight: 700; line-height: 1.2; }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
h5 { font-size: 0.95rem; font-weight: 600; }
p  { font-size: 1rem; color: var(--gray-200); }

.text-teal   { color: var(--teal-400); }
.text-gold   { color: var(--gold-500); }
.text-gray   { color: var(--gray-300); }
.text-red    { color: var(--red-400); }
.text-green  { color: var(--green-400); }
.text-white  { color: var(--white); }
.text-sm     { font-size: 0.85rem; }
.text-xs     { font-size: 0.75rem; }
.text-lg     { font-size: 1.125rem; }
.text-center { text-align: center; }
.font-bold   { font-weight: 700; }
.font-semi   { font-weight: 600; }

/* ── Gradient Text ── */
.gradient-text {
  background: linear-gradient(135deg, var(--teal-400) 0%, var(--gold-500) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--teal-400) 0%, #00a88a 100%);
  color: var(--navy-800);
  box-shadow: 0 4px 20px rgba(0,212,170,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,212,170,0.5);
  background: linear-gradient(135deg, var(--teal-300) 0%, var(--teal-400) 100%);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-500) 0%, #e8930a 100%);
  color: var(--navy-800);
  box-shadow: 0 4px 20px rgba(245,166,35,0.35);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(245,166,35,0.5);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--glass-border);
  color: var(--white);
}
.btn-outline:hover {
  border-color: var(--teal-400);
  color: var(--teal-400);
  background: rgba(0,212,170,0.06);
}

.btn-danger {
  background: rgba(255,92,122,0.15);
  border: 1.5px solid var(--red-400);
  color: var(--red-400);
}
.btn-danger:hover {
  background: var(--red-400);
  color: white;
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 16px 40px;
  font-size: 1.05rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ── Cards / Glass ── */
.card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition);
}

.card:hover {
  background: var(--glass-hover);
  border-color: rgba(0,212,170,0.2);
}

.card-teal {
  background: rgba(0,212,170,0.06);
  border-color: rgba(0,212,170,0.2);
}

.card-gold {
  background: rgba(245,166,35,0.06);
  border-color: rgba(245,166,35,0.2);
}

/* ── Status Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-pending    { color: var(--gold-500);  background: rgba(245,166,35,0.15); }
.badge-confirmed  { color: var(--teal-400);  background: rgba(0,212,170,0.15); }
.badge-transit    { color: #a78bfa;          background: rgba(167,139,250,0.15); }
.badge-arrived    { color: var(--orange-400);background: rgba(255,140,66,0.15); }
.badge-delivered  { color: var(--green-400); background: rgba(46,204,113,0.15); }
.badge-cancelled  { color: var(--red-400);   background: rgba(255,92,122,0.15); }
.badge-created    { color: var(--gray-300);  background: rgba(143,163,196,0.15); }
.badge-dropped    { color: var(--teal-300);  background: rgba(0,239,192,0.15); }
.badge-released   { color: var(--green-300); background: rgba(85,230,149,0.15); }

/* ── Inputs ── */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.input-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-200);
  letter-spacing: 0.3px;
}

.input-field {
  width: 100%;
  padding: 13px 18px;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--white);
  font-size: 0.95rem;
  transition: var(--transition);
}

.input-field::placeholder { color: var(--gray-400); }

.input-field:focus {
  border-color: var(--teal-400);
  background: rgba(0,212,170,0.05);
  box-shadow: 0 0 0 3px rgba(0,212,170,0.12);
}

.input-field.error {
  border-color: var(--red-400);
  background: rgba(255,92,122,0.05);
}

select.input-field option {
  background: var(--navy-700);
  color: var(--white);
}

.input-icon-wrap {
  position: relative;
}

.input-icon-wrap .input-field {
  padding-left: 46px;
}

.input-icon-wrap .icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 1rem;
  pointer-events: none;
}

/* ── Layout Utilities ── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-4  { gap: 4px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }

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

.mt-8   { margin-top: 8px; }
.mt-12  { margin-top: 12px; }
.mt-16  { margin-top: 16px; }
.mt-24  { margin-top: 24px; }
.mt-32  { margin-top: 32px; }
.mt-48  { margin-top: 48px; }
.mb-8   { margin-bottom: 8px; }
.mb-16  { margin-bottom: 16px; }
.mb-24  { margin-bottom: 24px; }
.mb-32  { margin-bottom: 32px; }
.w-full { width: 100%; }

/* ── Dividers ── */
.divider {
  height: 1px;
  background: var(--glass-border);
  margin: 24px 0;
}

/* ── Section Headers ── */
.section-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--teal-400);
  margin-bottom: 12px;
}

/* ── Toast Notifications ── */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  background: var(--navy-700);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  min-width: 280px;
  max-width: 380px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-md);
  animation: slideInRight 0.3s ease forwards;
  pointer-events: all;
}

.toast.success { border-left: 4px solid var(--teal-400); }
.toast.error   { border-left: 4px solid var(--red-400); }
.toast.warning { border-left: 4px solid var(--gold-500); }
.toast.info    { border-left: 4px solid #a78bfa; }

.toast-icon { font-size: 1.2rem; flex-shrink: 0; }
.toast-text { font-size: 0.9rem; font-weight: 500; flex: 1; color: var(--white); }

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutRight {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(40px); }
}

/* ── Animated Background ── */
.animated-bg {
  background: var(--navy-900);
  position: relative;
  overflow: hidden;
}

.animated-bg::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0,212,170,0.12) 0%, transparent 70%);
  top: -200px;
  right: -100px;
  animation: pulse-bg 8s ease-in-out infinite alternate;
  pointer-events: none;
}

.animated-bg::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(245,166,35,0.10) 0%, transparent 70%);
  bottom: -100px;
  left: -100px;
  animation: pulse-bg 10s ease-in-out infinite alternate-reverse;
  pointer-events: none;
}

@keyframes pulse-bg {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(1.3) translate(40px, -30px); }
}

/* ── Spinner ── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: var(--teal-400);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ── Progress Steps ── */
.progress-steps {
  display: flex;
  align-items: center;
  gap: 0;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  position: relative;
}

.step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--glass-border);
  z-index: 0;
}

.step-item.active::after,
.step-item.done::after {
  background: var(--teal-400);
}

.step-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--navy-700);
  border: 2px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  z-index: 1;
  position: relative;
  transition: var(--transition);
}

.step-item.active .step-dot {
  background: var(--teal-400);
  border-color: var(--teal-400);
  color: var(--navy-800);
  box-shadow: 0 0 20px rgba(0,212,170,0.4);
}

.step-item.done .step-dot {
  background: rgba(0,212,170,0.2);
  border-color: var(--teal-400);
  color: var(--teal-400);
}

.step-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gray-400);
  text-align: center;
  white-space: nowrap;
}

.step-item.active .step-label { color: var(--teal-400); }
.step-item.done .step-label   { color: var(--gray-200); }

/* ── Table ── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead th {
  padding: 14px 16px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--gray-300);
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--glass-border);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: var(--transition-fast);
}

tbody tr:last-child { border-bottom: none; }

tbody tr:hover {
  background: rgba(0,212,170,0.03);
}

tbody td {
  padding: 14px 16px;
  color: var(--gray-200);
  vertical-align: middle;
}

tbody td strong {
  color: var(--white);
  font-weight: 600;
}

/* ── Empty State ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  gap: 16px;
  text-align: center;
}

.empty-state .empty-icon {
  font-size: 3.5rem;
  opacity: 0.4;
}

.empty-state h3 {
  color: var(--gray-200);
  font-size: 1.1rem;
}

.empty-state p {
  font-size: 0.9rem;
  color: var(--gray-400);
  max-width: 300px;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4,13,26,0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--navy-700);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 100%;
  max-width: 520px;
  transform: scale(0.95) translateY(20px);
  transition: var(--transition);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.open .modal {
  transform: scale(1) translateY(0);
}

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

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--gray-300);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.modal-close:hover {
  background: var(--glass-hover);
  color: var(--white);
}

/* ── Public Nav ── */
.public-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10,22,40,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 800;
}

.nav-logo .logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--teal-400), var(--gold-500));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

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

.nav-links a {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-200);
  transition: var(--transition-fast);
}

.nav-links a:hover {
  color: var(--white);
  background: var(--glass-bg);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--navy-600); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ── Animations ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

.fade-in-up { animation: fadeInUp 0.6s ease forwards; }
.fade-in    { animation: fadeIn 0.4s ease forwards; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .container { padding: 0 16px; }
  .btn-lg { padding: 14px 28px; }
  .card { padding: 18px; }
  table { font-size: 0.82rem; }
  tbody td, thead th { padding: 10px 12px; }
}

@media (max-width: 480px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
}
