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

:root {
  /* Colors */
  --primary: #1e40af;
  --primary-light: #3b82f6;
  --primary-dark: #1e3a8a;
  --secondary: #0f172a;
  --accent: #f59e0b;
  --accent-light: #fbbf24;
  --background-light: #f8fafc;
  --text-dark: #0f172a;
  --text-light: #f8fafc;
  --text-muted: #64748b;
  --card-bg: rgba(255, 255, 255, 0.85);
  --card-border: rgba(226, 232, 240, 0.8);
  --glass-bg: rgba(15, 23, 42, 0.85);
  --glass-border: rgba(255, 255, 255, 0.08);
  
  /* Status Colors */
  --status-pending: #e2e8f0;
  --status-pending-text: #475569;
  --status-transit: #dbeafe;
  --status-transit-text: #1d4ed8;
  --status-out: #fef3c7;
  --status-out-text: #b45309;
  --status-delivered: #dcfce7;
  --status-delivered-text: #15803d;
  --status-exception: #fee2e2;
  --status-exception-text: #b91c1c;

  /* Fonts */
  --font-headings: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Shadows & Radius */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background-color: var(--background-light);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  font-weight: 700;
  color: var(--secondary);
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

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

/* Background Gradients */
.bg-gradient-mesh {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -10;
  background: radial-gradient(circle at 10% 20%, rgba(30, 64, 175, 0.05) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
              linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

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

.section-padding {
  padding: 80px 0;
}

/* Header & Navigation */
header {
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
  z-index: 100;
  transition: all 0.3s ease;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
} 

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  height: 50px;
  width: 50px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.logo-text {
  font-family: var(--font-headings);
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-weight: 500;
  font-size: 15px;
  color: var(--text-muted);
  position: relative;
  padding: 6px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-light);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--primary-light);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-btn {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--text-light);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.3);
  border: none;
  cursor: pointer;
}

.nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(37, 99, 235, 0.4);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--secondary);
  cursor: pointer;
}

/* Hero Section */
.hero {
  position: relative;
  padding: 100px 0 120px 0;
  text-align: center;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
  color: var(--text-light);
  border-bottom-left-radius: 40px;
  border-bottom-right-radius: 40px;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.hero::before {           
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
                    radial-gradient(circle at 80% 70%, rgba(245, 158, 11, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-tagline {
  color: var(--accent);
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 16px;
  display: inline-block;
  background: rgba(245, 158, 11, 0.1);
  padding: 6px 16px;
  border-radius: 50px;
}

.hero-title {
  font-size: 54px;
  line-height: 1.15;
  color: var(--text-light);
  max-width: 800px;
  margin: 0 auto 24px auto;
  font-weight: 800;
}

.hero-desc {
  font-size: 18px;
  color: rgba(248, 250, 252, 0.7);
  max-width: 600px;
  margin: 0 auto 40px auto;
}

/* Tracking Tool */
.tracker-container {
  max-width: 650px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.08);
  padding: 8px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  display: flex;
  box-shadow: var(--shadow-lg);
}

.tracker-input {
  flex-grow: 1;
  background: transparent;
  border: none;
  padding: 16px 20px;
  color: var(--text-light);
  font-size: 16px;
  outline: none;
}

.tracker-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.tracker-btn {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  color: var(--secondary);
  border: none;
  padding: 14px 28px;
  font-weight: 700;
  font-size: 15px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tracker-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

/* Tracking Result Modal/Card */
.tracking-result-card {
  max-width: 650px;
  margin: 24px auto 0 auto;
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  padding: 24px;
  text-align: left;
  color: var(--text-dark);
  box-shadow: var(--shadow-xl);
  display: none;
  animation: slideUp 0.4s ease;
}

.tracking-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 14px;
  margin-bottom: 16px;
}

.tracking-result-header h3 {
  font-size: 18px;
  font-weight: 700;
}

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

.tracking-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.tracking-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.tracking-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

/* Badge Status Styles */
.badge-dlvd { background-color: var(--status-delivered); color: var(--status-delivered-text); }
.badge-transit { background-color: var(--status-transit); color: var(--status-transit-text); }
.badge-in_transit { background-color: var(--status-transit); color: var(--status-transit-text); }
.badge-out { background-color: var(--status-out); color: var(--status-out-text); }
.badge-pending { background-color: var(--status-pending); color: var(--status-pending-text); }
.badge-failed { background-color: var(--status-exception); color: var(--status-exception-text); }

/* Section Headers */
.section-title-wrapper {
  text-align: center;
  margin-bottom: 50px;
}

.section-subtitle {
  color: var(--primary-light);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
  display: block;
}

.section-title {
  font-size: 36px;
  font-weight: 800;
  color: var(--secondary);
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 4.5fr 7.5fr;
  gap: 48px;
  align-items: center;
}

.about-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  transition: transform 0.3s ease;
}

.about-card:hover {
  transform: translateY(-5px);
}

.about-portrait-wrapper {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto 24px auto;
}

.about-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: var(--shadow-md);
}

.about-portrait-wrapper::after {
  content: '';
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border-radius: 50%;
  border: 2px dashed var(--primary-light);
  animation: rotate 20s linear infinite;
}

.about-name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.about-title {
  color: var(--primary-light);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 20px;
}

.about-contact-list {
  list-style: none;
  text-align: left;
  border-top: 1px solid var(--card-border);
  padding-top: 20px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.about-contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.about-contact-icon {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-contact-text {
  font-weight: 500;
}

.gst-badge {
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 13px;
  text-align: center;
}

.gst-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  display: block;
}

.gst-value {
  font-family: monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-dark);
}

.about-text-content h3 {
  font-size: 28px;
  margin-bottom: 20px;
}

.about-text-content p {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 16px;
}

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

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

.feature-icon {
  color: var(--accent);
  font-size: 24px;
}

.feature-title {
  font-size: 16px;
  font-weight: 700;
}

.feature-desc {
  font-size: 13px;
  color: var(--text-muted);
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
}

.partner-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.partner-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.partner-logo-wrapper {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.partner-logo {
  max-width: 120px;
  max-height: 60px;
  object-fit: contain;
  filter: grayscale(20%);
  transition: filter 0.3s ease;
}

.partner-card:hover .partner-logo {
  filter: grayscale(0%);
}

.partner-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--secondary);
}

/* Contact Section */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px;
}

.contact-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.contact-card h3 {
  font-size: 24px;
  margin-bottom: 24px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

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

.form-control {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.5);
  outline: none;
  transition: border 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-light);
  background: #fff;
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.submit-btn {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--text-light);
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 28px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.submit-btn:hover {
  box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.3);
}

/* Quick Messaging Cards */
.quick-connect-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.channel-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.channel-card:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-md);
}

.channel-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.channel-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.channel-whatsapp .channel-icon {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.channel-email .channel-icon {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.channel-text-title {
  font-weight: 700;
  font-size: 16px;
}

.channel-text-desc {
  font-size: 13px;
  color: var(--text-muted);
}

.channel-btn {
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
}

.channel-whatsapp .channel-btn {
  background: #22c55e;
  color: white;
}

.channel-whatsapp .channel-btn:hover {
  box-shadow: 0 4px 10px rgba(34, 197, 94, 0.3);
}

.channel-email .channel-btn {
  background: #3b82f6;
  color: white;
}

.channel-email .channel-btn:hover {
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

/* Footer */
footer {
  background: var(--secondary);
  color: rgba(248, 250, 252, 0.6);
  padding: 40px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-logo {
  color: var(--text-light);
  font-family: var(--font-headings);
  font-weight: 800;
  font-size: 20px;
}

.footer-text {
  font-size: 14px;
}

/* ========================================================
   ADMIN & DASHBOARD STYLING
   ======================================================== */

/* Login Modal / Container */
.login-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-title {
  font-size: 26px;
  margin-bottom: 8px;
}

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

/* Dashboard Layout */
.dashboard-wrapper {
  padding: 40px 0;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.dashboard-actions {
  display: flex;
  gap: 12px;
}

.dashboard-btn {
  border: none;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-secondary {
  background: white;
  color: var(--text-dark);
  border: 1px solid var(--card-border);
}

.btn-secondary:hover {
  background: #f1f5f9;
}

.btn-danger {
  background: #ef4444;
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
}

/* Metrics Panel */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.metric-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 20px;
}

.metric-icon-box {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.metric-shipments .metric-icon-box { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.metric-active .metric-icon-box { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.metric-sales .metric-icon-box { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.metric-profit .metric-icon-box { background: rgba(99, 102, 241, 0.1); color: #6366f1; }

.metric-details {
  display: flex;
  flex-direction: column;
}

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

.metric-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--secondary);
}

/* Content Grid (Form + Table) */
.dashboard-grid {
  display: grid;
  grid-template-columns: 8fr 4fr;
  gap: 32px;
  align-items: start;
}

/* Table Filters & Box */
.table-container-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.table-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-search {
  flex-grow: 1;
  min-width: 200px;
}

.filter-select {
  min-width: 130px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  outline: none;
  background: white;
}

.table-wrapper {
  overflow-x: auto;
  margin-bottom: 20px;
}

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

table.shipment-table th {
  background: #f1f5f9;
  padding: 14px 16px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--card-border);
}

table.shipment-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--card-border);
  vertical-align: middle;
}

table.shipment-table tr:hover {
  background: rgba(241, 245, 249, 0.4);
}

.action-icon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.action-icon-btn:hover {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.08);
}

.action-icon-btn.btn-delete:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

/* Pagination */
.pagination-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pagination-info {
  font-size: 13px;
  color: var(--text-muted);
}

.pagination-controls {
  display: flex;
  gap: 8px;
}

.pagination-btn {
  background: white;
  border: 1px solid var(--card-border);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
}

.pagination-btn:hover:not(:disabled) {
  background: #f1f5f9;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Shipment Registry Form Card */
.form-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 100px;
}

/* Expanded/Modal form card styling */
.form-card.expanded {
  position: fixed !important;
  top: 5vh !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 90% !important;
  max-width: 800px !important;
  height: 90vh !important;
  z-index: 2000 !important;
  overflow-y: auto !important;
  background: #ffffff !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 
              0 10px 10px -5px rgba(0, 0, 0, 0.04), 
              0 0 0 100vmax rgba(15, 23, 42, 0.6) !important;
  border: 1px solid var(--card-border) !important;
  animation: slideUp 0.3s ease;
}

body.form-expanded-open {
  overflow: hidden !important;
}

.form-card-title {
  font-size: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 10px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.form-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

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

.modal-content-card {
  background: white;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

.modal-header {
  padding: 16px 24px;
  background: #f8fafc;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 18px;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex-grow: 1;
}

.modal-footer {
  padding: 16px 24px;
  background: #f8fafc;
  border-top: 1px solid var(--card-border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ========================================================
   BILL / INVOICE PRINT STYLE
   ======================================================== */

.invoice-box {
  max-width: 800px;
  margin: auto;
  padding: 30px;
  border: 1px solid #eee;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
  font-size: 15px;
  line-height: 26px;
  font-family: 'Inter', sans-serif;
  color: #555;
  background: #fff;
}

.invoice-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 40px;
}

.invoice-logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.invoice-logo {
  height: 60px;
  width: 60px;
  object-fit: cover;
  border-radius: 50%;
}

.invoice-biz-name {
  font-size: 24px;
  font-weight: 800;
  color: #1e3a8a;
  line-height: 1.2;
}

.invoice-biz-tag {
  font-size: 12px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.invoice-meta {
  text-align: right;
}

.invoice-title-text {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
}

.invoice-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f1f5f9;
}

.invoice-party-title {
  font-size: 12px;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.invoice-party-name {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}

.invoice-party-details {
  font-size: 14px;
  line-height: 1.5;
  color: #475569;
}

.invoice-items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 40px;
}

.invoice-items-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  padding: 10px 14px;
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  border-bottom: 2px solid #e2e8f0;
}

.invoice-items-table td {
  padding: 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  font-size: 14px;
}

.invoice-items-table tr.total-row td {
  border-top: 2px solid #e2e8f0;
  border-bottom: none;
  font-weight: 800;
  font-size: 18px;
  color: #1e3a8a;
}

.invoice-notes {
  border-top: 1px solid #e2e8f0;
  padding-top: 20px;
  margin-top: 20px;
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.5;
}

.invoice-signature-section {
  display: flex;
  justify-content: flex-end;
  margin-top: 60px;
  text-align: center;
}

.invoice-signature-box {
  width: 200px;
  border-top: 1px solid #cbd5e1;
  padding-top: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #475569;
}

/* ========================================================
   KEYFRAME ANIMATIONS
   ======================================================== */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ========================================================
   RESPONSIVE MEDIA QUERIES
   ======================================================== */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .form-card {
    position: static;
  }
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .partners-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-bottom: 1px solid var(--card-border);
    padding: 24px;
    gap: 16px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
  }
  .nav-links li {
    width: 100%;
    text-align: center;
  }
  .nav-links a {
    display: block;
    padding: 10px 0;
    font-size: 16px;
  }
  .nav-btn {
    width: 100%;
    justify-content: center;
    padding: 12px;
  }
  .menu-toggle {
    display: block;
  }
  .hero-title {
    font-size: 32px;
  }
  .hero-desc {
    font-size: 15px;
  }
  .tracker-container {
    flex-direction: column;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
  }
  .tracker-btn {
    width: 100%;
    justify-content: center;
    padding: 14px;
  }
  .tracking-info-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .partners-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .metric-card {
    padding: 14px;
  }
  .metric-icon-box {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  .metric-label {
    font-size: 11px;
  }
  .metric-value {
    font-size: 20px;
  }
  .shipment-table th, .shipment-table td {
    padding: 10px 8px;
    font-size: 12px;
  }
  .action-icon-btn {
    padding: 4px 6px;
    font-size: 12px;
  }
}

@media (max-width: 600px) {
  .dashboard-header {
    margin-bottom: 24px;
  }
  .dashboard-header h1 {
    font-size: 20px !important;
  }
  .dashboard-actions {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }
  .dashboard-actions .dashboard-btn {
    flex: 1;
    padding: 8px 6px;
    font-size: 10px;
    justify-content: center;
    gap: 4px;
  }
  .table-container-card {
    padding: 12px;
  }
  .table-filters {
    gap: 8px;
  }
  .filter-search {
    width: 100%;
  }
  .filter-select {
    flex-grow: 1;
  }
  .modal-overlay {
    padding: 10px;
  }
  .modal-body {
    padding: 12px;
  }
  .modal-footer {
    padding: 12px 16px;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }
  .modal-footer button {
    flex: 1;
    min-width: 120px;
  }
  .invoice-details-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .invoice-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .invoice-meta {
    text-align: left;
  }
  .invoice-box {
    padding: 15px;
  }
}

/* ========================================================
   PRINT STYLES (EXPLICIT FOR BILLING / INVOICING)
   ======================================================== */
@media print {
  /* Hide all elements except the invoice box and its contents */
  body * {
    visibility: hidden;
  }
  
  #invoice-print-area, #invoice-print-area * {
    visibility: visible;
  }
  
  #invoice-print-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    box-shadow: none;
    border: none;
  }
  
  /* Reset margins for printing */
  @page {
    size: A4;
    margin: 15mm;
  }
  
  .non-printable {
    display: none !important;
  }
}

/* Editable inputs in Invoice */
.invoice-box .editable-input {
  border: 1px dashed transparent;
  background: transparent;
  width: 100%;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  padding: 2px 4px;
  outline: none;
  transition: all 0.2s ease;
}
.invoice-box .editable-input:hover, 
.invoice-box .editable-input:focus {
  border-color: var(--primary-light);
  background: rgba(37, 99, 235, 0.05);
}
.invoice-box select.editable-input {
  cursor: pointer;
}

@media print {
  .invoice-box .editable-input {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
  }
  .non-printable {
    display: none !important;   
  }
}
     