/* Utility visibility class to ensure JS can hide sections even when other rules use !important */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Montserrat:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Sen:wght@400;500;600;700;800&display=swap');

.hidden { display: none !important; }
#loginPage.hidden { display: none !important; }
#dashboard.hidden { display: none !important; }
/* Main Styles for Shipment Invoice Manager */

:root {
  /* Color Variables */
  --primary: #253877;
  --primary-light: #e71f2f;
  --primary-dark: #2d396f;
  --secondary: #64748b;
  --accent: #f59e0b;
  
  --text-dark: #1e293b;
  --text-medium: #475569;
  --text-light: #94a3b8;
  
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --bg-card: #ffffff;
  
  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;
  
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;
  
  /* Spacing Variables */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-xxl: 3rem;
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  
  /* Shadows */
  --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 -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100vh;
  overflow-x: hidden;
}


body {
  font-family: 'Sen', sans-serif!important;
  font-size: 13px;
  line-height: 1.5;
}

h1, h2, h3, h4, .heading, .card-title, .btn {
  font-family: 'Montserrat', sans-serif!important;
  font-weight: 600;
}
/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-dark);
  margin-bottom: var(--spacing-md);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: var(--spacing-md);
  color: var(--text-medium);
}

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

a:hover {
  color: var(--primary-dark);
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }
.text-info { color: var(--info); }

.bg-primary { background-color: var(--primary); }
.bg-light { background-color: var(--bg-light); }
.bg-white { background-color: var(--bg-white); }

.mb-xs { margin-bottom: var(--spacing-xs); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.mt-xs { margin-top: var(--spacing-xs); }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

.mx-auto { margin-left: auto; margin-right: auto; }

.p-xs { padding: var(--spacing-xs); }
.p-sm { padding: var(--spacing-sm); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }
.p-xl { padding: var(--spacing-xl); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.gap-xs { gap: var(--spacing-xs); }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

.w-full { width: 100%; }
.h-full { height: 100%; }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* Login Page */
#loginPage {
  height: 100vh !important;
  width: 100vw !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--bg-light) !important;
  margin: 0 !important;
  padding: 0 !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  z-index: 1000 !important;
}

.login-container {
  height: 100vh;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  margin: 0;
  padding: 0;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
}

.login-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  width: 420px;
  max-width: 90vw;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  margin: 0 auto;
  position: relative;
  z-index: 1001;
}

.login-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.company-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
  min-height: 200px;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.05), rgba(220, 38, 38, 0.05));
  border: none;
  border-radius: 16px;
  padding: 30px;
  position: relative;
}

/* Removed unwanted "Logo Container" text */

.company-logo .logo-image {
  height: 150px;
  width: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border: 3px solid #1e40af;
  border-radius: 12px;
  padding: 15px;
  background: white;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.company-logo .logo-image:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.sidebar-logo .logo-image {
  height: 40px;
  width: auto;
  object-fit: contain;
}

/* ACCEX Logo Styles */
.accex-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Arial', sans-serif;
}

.logo-symbol {
  position: relative;
  width: 40px;
  height: 40px;
}

.logo-triangle {
  width: 0;
  height: 0;
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-bottom: 35px solid #1e3a8a;
  position: absolute;
  top: 0;
  left: 0;
}

.logo-curve {
  width: 12px;
  height: 12px;
  background: #dc2626;
  border-radius: 50%;
  position: absolute;
  bottom: 8px;
  right: 8px;
  transform: translate(50%, 50%);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-main {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #1e3a8a;
}

.logo-main::before {
  content: "";
}

.logo-main::after {
  content: "";
}

.logo-acc {
  color: #1e3a8a;
}

.logo-ex {
  color: #dc2626;
}

.logo-subtitle {
  font-size: 10px;
  color: #1e3a8a;
  font-weight: normal;
  margin-top: 2px;
}

/* Invoice Logo Styles */
.invoice-header-print .accex-logo {
  margin-right: 20px;
}

.invoice-header-print .logo-symbol {
  width: 50px;
  height: 50px;
}

.invoice-header-print .logo-triangle {
  border-left: 25px solid transparent;
  border-right: 25px solid transparent;
  border-bottom: 43px solid #1e3a8a;
}

.invoice-header-print .logo-curve {
  width: 15px;
  height: 15px;
  bottom: 10px;
  right: 10px;
}

.invoice-header-print .logo-main {
  font-size: 28px;
}

.invoice-header-print .logo-subtitle {
  font-size: 12px;
}

.login-header p {
  color: var(--text-medium);
  font-size: 0.95rem;
  font-weight: 500;
}

.login-form {
  margin-bottom: var(--spacing-lg);
}

.form-group {
  margin-bottom: var(--spacing-md);
}

.form-group label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 600;
  color: var(--text-medium);
  font-size: 0.9rem;
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: all var(--transition-fast);
  background: var(--bg-white);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: #fff !important;
}

.btn-secondary {
  background-color: var(--bg-light);
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background-color: rgba(37, 99, 235, 0.05);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-success {
  background-color: var(--success);
  color: white;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
  padding-left: 1rem;
padding-top: 1rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-title {
  flex: 1;
  min-width: 0;
  max-width: 100%;
}

.page-title h2 {
  word-wrap: break-word;
  overflow-wrap: break-word;
  margin: 0 0 0.25rem 0;
}

.page-title p {
  word-wrap: break-word;
  overflow-wrap: break-word;
  margin: 0;
}

.page-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.page-actions .btn {
  white-space: nowrap;
}
.btn-success:hover {
  background-color: #0ca678;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-warning {
  background-color: var(--warning);
  color: white;
}

.btn-warning:hover {
  background-color: #d97706;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-danger {
  background-color: var(--error);
  color: white;
}

.btn-danger:hover {
  background-color: #dc2626;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-info {
  background-color: var(--info);
  color: white;
}

.btn-info:hover {
  background-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-block {
  display: block;
  width: 100%;
}

/* Dashboard Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  background: var(--bg-white);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  position: fixed;
  height: 100vh;
  z-index: 100;
}

.sidebar-header {
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.sidebar-logo img {
  height: 50px;
  width: auto;
  object-fit: contain;
}

.sidebar-toggle {
  background: transparent;
  border: none;
  color: var(--text-medium);
  cursor: pointer;
  font-size: 1.25rem;
  display: none;
}

.nav-list {
  list-style: none;
  padding: var(--spacing-md) 0;
  flex: 1;
}

.nav-item {
  margin-bottom: var(--spacing-xs);
}

.nav-link {
  display: flex;
  align-items: center;
  padding: var(--spacing-sm) var(--spacing-md);
  color: var(--text-medium);
  font-weight: 500;
  transition: all var(--transition-fast);
  border-radius: 0;
  gap: var(--spacing-sm);
}

.nav-link:hover {
  background-color: rgba(37, 99, 235, 0.05);
  color: var(--primary);
}

.nav-link i {
  width: 20px;
  text-align: center;
}

.nav-item.active .nav-link {
  background-color: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  border-right: 3px solid var(--primary);
}

.sidebar-footer {
  padding: var(--spacing-md);
  border-top: 1px solid var(--border-light);
}

.main-content {
  flex: 1;
  margin-left: 250px;
  transition: margin var(--transition-normal);
  width: calc(100% - 250px);
  max-width: calc(100% - 250px);
  box-sizing: border-box;
  overflow-x: hidden;
}

.header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  padding: var(--spacing-md) var(--spacing-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 2 rem!important;
}

.header-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.user-info {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-light);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
}

.user-name {
  font-weight: 600;
  color: var(--text-dark);
}

.content {
  padding: var(--spacing-lg);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Dashboard Cards */
.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.dashboard-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: all var(--transition-fast);
}

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

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-md);
  font-size: 1.5rem;
}

.card-icon.shipments {
  background-color: rgba(37, 99, 235, 0.1);
  color: var(--primary);
}

.card-icon.invoices {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.card-icon.revenue {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.card-icon.pending {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--error);
}

.card-title {
  font-size: 0.875rem;
  color: var(--text-medium);
  margin-bottom: var(--spacing-xs);
}

.card-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
}

/* Recent Activity */
.recent-activity {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  margin-bottom: var(--spacing-lg);
}

.activity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-md);
}

.activity-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0;
}

.activity-list {
  list-style: none;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  padding: var(--spacing-md) 0;
  border-bottom: 1px solid var(--border-light);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: var(--spacing-md);
  font-size: 1rem;
}

.activity-icon.created {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.activity-icon.updated {
  background-color: rgba(37, 99, 235, 0.1);
  color: var(--primary);
}

.activity-icon.finalized {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.activity-content {
  flex: 1;
}

.activity-text {
  margin-bottom: var(--spacing-xs);
  color: var(--text-dark);
}

.activity-time {
  font-size: 0.875rem;
  color: var(--text-light);
}

/* Forms */
.form-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  margin-bottom: var(--spacing-lg);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.form-header {
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--border-light);
}

.form-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: var(--spacing-xs);
}

.form-subtitle {
  color: var(--text-medium);
  font-size: 0.875rem;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -0.5rem var(--spacing-md);
}

.form-col {
  flex: 1;
  padding: 0 0.5rem;
  min-width: 200px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border-light);
}

/* Select Styles */
select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: all var(--transition-fast);
  background: var(--bg-white);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
}

select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* GSTIN Search Styles */
.search-container {
  position: relative;
}

.dropdown-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  display: none;
}

.dropdown-results.show {
  display: block;
}

.search-result-item {
  padding: var(--spacing-sm) var(--spacing-md);
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition-fast);
}

.search-result-item:hover {
  background: rgba(37, 99, 235, 0.05);
}

.search-result-item:last-child {
  border-bottom: none;
}

.company-name {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.company-gstin {
  font-size: 0.85rem;
  color: var(--text-medium);
}

/* Invoice List */
.invoices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--spacing-md);
}

.invoice-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: all var(--transition-fast);
}

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

.invoice-header {
  padding: var(--spacing-md);
  background: rgba(37, 99, 235, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
}

.invoice-number {
  font-weight: 600;
  color: var(--primary);
}

.invoice-date {
  font-size: 0.875rem;
  color: var(--text-medium);
}

.invoice-body {
  padding: var(--spacing-md);
}

.invoice-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.invoice-detail {
  margin-bottom: var(--spacing-xs);
}

.invoice-detail label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-light);
  margin-bottom: 2px;
}

.invoice-detail span {
  font-weight: 500;
  color: var(--text-dark);
}

.invoice-amount {
  text-align: right;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--border-light);
}

.amount-label {
  font-size: 0.875rem;
  color: var(--text-medium);
  margin-bottom: var(--spacing-xs);
}

.amount-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
}

.invoice-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-sm);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  overflow-y: auto;
  padding: var(--spacing-md);
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.modal-header {
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--bg-white);
  z-index: 10;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-medium);
  font-size: 1.25rem;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--error);
}

.modal-body {
  padding: var(--spacing-md);
}

/* Loading Spinner */
.loading-spinner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(37, 99, 235, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s linear infinite;
  margin-bottom: var(--spacing-md);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1500;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.toast {
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  background: var(--bg-white);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  min-width: 300px;
  max-width: 400px;
  animation: slideIn 0.3s ease, fadeOut 0.5s ease 2.5s forwards;
  border-left: 4px solid;
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--error); }
.toast.warning { border-left-color: var(--warning); }
.toast.info { border-left-color: var(--info); }

.toast-icon {
  font-size: 1.25rem;
}

.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--error); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.info .toast-icon { color: var(--info); }

.toast-content {
  flex: 1;
}

.toast-message {
  color: var(--text-dark);
  font-weight: 500;
  margin: 0;
}

.toast-close {
  background: transparent;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  transition: color var(--transition-fast);
}

.toast-close:hover {
  color: var(--text-dark);
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

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

/* Invoice Preview */
/* .invoice-container {
  background: var(--bg-white);
  padding: var(--spacing-lg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--spacing-lg);
} */

.invoice-print {
  padding: var(--spacing-lg);
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.invoice-header-print {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #333;
}

.header-left {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex: 1;
}

.header-right {
  flex: 0 0 auto;
}

.company-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.company-name {
  font-size: 18px;
  font-weight: bold;
  color: #333;
  line-height: 1.2;
}

.company-subtitle {
  font-size: 14px;
  color: #666;
  font-weight: normal;
}

.company-address {
  font-size: 12px;
  color: #666;
  line-height: 1.3;
}

.company-website {
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

.company-details-table {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
}

.details-row {
  display: flex;
  gap: 10px;
}

.details-label {
  font-weight: bold;
  color: #333;
  min-width: 80px;
}

.details-value {
  color: #666;
}

.invoice-title {
  text-align: center;
  font-size: 24px;
  font-weight: bold;
  margin: 20px 0;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.invoice-details-table {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 20px;
  font-size: 12px;
}

.customer-details-section {
  margin-bottom: 20px;
}

.customer-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.section-title {
  font-weight: bold;
  color: #333;
  font-size: 14px;
  margin-bottom: 5px;
}

.customer-name {
  font-size: 14px;
  font-weight: bold;
  color: #333;
  line-height: 1.3;
}

.customer-address {
  font-size: 12px;
  color: #666;
  line-height: 1.3;
}

.customer-gstin {
  font-size: 12px;
  color: #666;
}

.customer-ref {
  font-size: 12px;
  color: #666;
}

.service-details-section {
  margin-bottom: 20px;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  margin-bottom: 15px;
}

.invoice-table th {
  background: #f5f5f5;
  padding: 8px 5px;
  text-align: left;
  font-weight: bold;
  color: #333;
  border: 1px solid #ddd;
}

.invoice-table td {
  padding: 6px 5px;
  border: 1px solid #ddd;
  color: #666;
  vertical-align: top;
}

.invoice-table .sub-header {
  background: #f9f9f9;
  font-weight: bold;
  color: #333;
}

.invoice-table .tax-row {
  background: #f5f5f5;
  font-weight: bold;
  color: #333;
}

.packing-details {
  margin: 15px 0;
  padding: 10px;
  background: #f9f9f9;
  border-radius: 4px;
}

.packing-title {
  font-weight: bold;
  color: #333;
  font-size: 12px;
  margin-bottom: 5px;
}

/* Header Layout */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-text {
    flex: 1;
}

.header-actions {
    margin-left: 20px;
}

.header-actions .btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
}

.packing-item {
  font-size: 11px;
  color: #666;
  margin-bottom: 2px;
}

.packing-total {
  font-weight: bold;
  color: #333;
  font-size: 12px;
  margin-top: 5px;
}

.fx-note {
  font-size: 10px;
  color: #666;
  font-style: italic;
  margin-top: 10px;
}

.summary-section {
  margin-bottom: 20px;
}

.total-bill {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding: 10px;
  background: #f5f5f5;
  border-radius: 4px;
}

.total-label {
  font-weight: bold;
  color: #333;
  font-size: 14px;
}

.total-value {
  font-weight: bold;
  color: #333;
  font-size: 16px;
}

.summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.summary-table th {
  background: #f5f5f5;
  padding: 8px 5px;
  text-align: left;
  font-weight: bold;
  color: #333;
  border: 1px solid #ddd;
}

.summary-table td {
  padding: 6px 5px;
  border: 1px solid #ddd;
  color: #666;
}

.summary-table .total-row {
  background: #f0f0f0;
  font-weight: bold;
  color: #333;
}

.footer-section {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #ddd;
}

.declaration {
  font-size: 11px;
  color: #666;
  line-height: 1.4;
  margin-bottom: 20px;
  padding: 10px;
  background: #f9f9f9;
  border-radius: 4px;
}

.bank-details {
  margin-bottom: 20px;
}

.bank-title {
  font-weight: bold;
  color: #333;
  font-size: 14px;
  margin-bottom: 5px;
}

.bank-subtitle {
  font-size: 12px;
  color: #666;
  margin-bottom: 10px;
}

.bank-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 15px;
}

.bank-row {
  display: flex;
  gap: 10px;
  font-size: 11px;
}

.bank-label {
  font-weight: bold;
  color: #333;
  min-width: 60px;
}

.bank-value {
  color: #666;
}

.signatory {
  font-weight: bold;
  color: #333;
  font-size: 12px;
  margin-top: 20px;
  text-align: right;
}

.company-footer {
  margin-top: 20px;
}

.registered-office {
  font-size: 11px;
  color: #666;
  line-height: 1.3;
  margin-bottom: 10px;
}

.startup-recognition {
  font-size: 10px;
  color: #666;
  line-height: 1.3;
  font-style: italic;
}

.company-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: var(--spacing-xs);
}

.company-address {
  color: var(--text-medium);
  font-size: 0.875rem;
  margin-bottom: var(--spacing-xs);
}

.invoice-title {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin: var(--spacing-md) 0;
  color: var(--primary);
  text-transform: uppercase;
  border-bottom: 2px solid var(--primary);
  padding-bottom: var(--spacing-sm);
}

.invoice-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--spacing-md);
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.invoice-info-group {
  flex: 1;
  min-width: 200px;
}

.invoice-info-title {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: var(--spacing-xs);
  font-size: 0.875rem;
}

.invoice-info-value {
  color: var(--text-medium);
  font-size: 0.875rem;
  margin-bottom: var(--spacing-xs);
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--spacing-md);
}

.invoice-table th {
  background: rgba(37, 99, 235, 0.05);
  padding: var(--spacing-sm);
  text-align: left;
  font-weight: 600;
  color: var(--text-dark);
  border-bottom: 2px solid var(--border-light);
}

.invoice-table td {
  padding: var(--spacing-sm);
  border-bottom: 1px solid var(--border-light);
  color: var(--text-medium);
}

.invoice-table tr:last-child td {
  border-bottom: none;
}

.invoice-totals {
  width: 100%;
  max-width: 400px;
  margin-left: auto;
  margin-bottom: var(--spacing-md);
}

.invoice-total-row {
  display: flex;
  justify-content: space-between;
  padding: var(--spacing-xs) 0;
}

.invoice-total-label {
  font-weight: 500;
  color: var(--text-medium);
}

.invoice-total-value {
  font-weight: 600;
  color: var(--text-dark);
  text-align: right;
}

.invoice-total-row.final {
  border-top: 2px solid var(--border-light);
  padding-top: var(--spacing-sm);
  margin-top: var(--spacing-xs);
}

.invoice-total-row.final .invoice-total-label,
.invoice-total-row.final .invoice-total-value {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--primary);
}

.amount-in-words {
  margin-bottom: var(--spacing-md);
  padding: var(--spacing-sm);
  background: rgba(37, 99, 235, 0.05);
  border-radius: var(--radius-sm);
  font-style: italic;
  color: var(--text-medium);
}

.invoice-footer {
  display: flex;
  justify-content: space-between;
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border-light);
}

.bank-details {
  flex: 1;
}

.bank-details-title {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: var(--spacing-xs);
  font-size: 0.875rem;
}

.bank-details-info {
  color: var(--text-medium);
  font-size: 0.875rem;
  margin-bottom: var(--spacing-xs);
}

.signature {
  text-align: right;
  flex: 1;
}

.signature-title {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: var(--spacing-md);
  font-size: 0.875rem;
}

.signature-name {
  font-weight: 600;
  color: var(--text-dark);
  margin-top: var(--spacing-md);
}

.invoice-actions-print {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

/* No Data State */
.no-data {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl);
  color: var(--text-light);
  text-align: center;
}

.no-data i {
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
  opacity: 0.5;
}

.no-data p {
  font-size: 1.125rem;
  font-weight: 500;
  margin-bottom: var(--spacing-sm);
}

/* Responsive Styles */
@media (max-width: 992px) {
  .sidebar {
    width: 200px;
  }
  
  .main-content {
    margin-left: 200px;
    width: calc(100% - 200px);
    max-width: calc(100% - 200px);
  }
  
  .page-header {
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
  }
  
  .page-title h2 {
    font-size: 1.25rem;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 250px;
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
  }
  
  .sidebar-toggle {
    display: block;
  }
  
  .header {
    padding: var(--spacing-sm) var(--spacing-md);
  }
  
  .content {
    padding: var(--spacing-md);
  }
  
  .page-header {
    flex-direction: column;
    align-items: stretch;
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
  }
  
  .page-title {
    width: 100%;
    margin-bottom: var(--spacing-sm);
  }
  
  .page-actions {
    width: 100%;
    justify-content: flex-start;
  }
  
  .page-actions .btn {
    flex: 1;
    max-width: 200px;
  }
  
  .dashboard-cards {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  
  .form-row {
    flex-direction: column;
  }
  
  .form-card {
    padding: var(--spacing-md);
    margin-left: -1rem;
    margin-right: -1rem;
    width: calc(100% + 2rem);
    border-radius: 0;
  }
  
  .form-col {
    width: 100%;
    margin-bottom: var(--spacing-sm);
  }
  
  .invoice-info {
    flex-direction: column;
  }
  
  .invoice-info-group {
    margin-bottom: var(--spacing-md);
  }
  
  .invoice-footer {
    flex-direction: column;
  }
  
  .bank-details {
    margin-bottom: var(--spacing-md);
  }
  
  .signature {
    text-align: left;
  }
}

@media (max-width: 576px) {
  .login-card {
    padding: var(--spacing-md);
  }
  
  .dashboard-cards {
    grid-template-columns: 1fr;
  }
  
  .invoices-grid {
    grid-template-columns: 1fr;
  }
  
  .modal-content {
    max-width: 100%;
    margin: 0 var(--spacing-sm);
  }
  
  .invoice-actions {
    flex-direction: column;
  }
  
  .invoice-actions-print {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
}

/* Print Styles */
@media print {
  body {
    background: white;
  }
  
  .app-container, .sidebar, .header, .content {
    display: none;
  }
  
  .invoice-print {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    border: none;
    padding: 0;
    margin: 0;
    box-shadow: none;
  }
  
  .invoice-actions-print {
    display: none;
  }
}

/* View Invoice Button Styling */
.btn-view-invoice {
  background: #1e40af !important;
  color: white !important;
  font-weight: 600 !important;
  padding: 0.75rem 1.5rem !important;
  border-radius: 8px !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 2px 4px rgba(30, 64, 175, 0.2) !important;
  border: none !important;
  cursor: pointer !important;
  font-size: 0.9rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

.btn-view-invoice:hover {
  background: #1d4ed8 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 8px rgba(30, 64, 175, 0.3) !important;
}

.btn-view-invoice:active {
  transform: translateY(0) !important;
  box-shadow: 0 2px 4px rgba(30, 64, 175, 0.2) !important;
}

/* Shipment Setup Form Styles */
.form-section {
  margin-bottom: var(--spacing-xl);
  padding: var(--spacing-xl);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  background: var(--bg-white);
}

.form-section .section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--primary);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.form-section .section-title i {
  color: var(--primary);
}

.cascading-selects {
  background: var(--bg-light);
  padding: var(--spacing-lg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-medium);
}

.cascading-selects .form-row {
  margin-bottom: var(--spacing-md);
}

.cascading-selects .form-row:last-child {
  margin-bottom: 0;
}

.cascading-selects .form-group {
  margin-bottom: 0;
}

.form-row {
  display: flex;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.form-col {
  flex: 1;
  min-width: 0;
}

.form-row:last-child {
  margin-bottom: 0;
}

/* HAZ Status Styling */
#hazStatus option[value="haz"] {
  color: #dc3545;
  font-weight: bold;
}

#hazStatus option[value="nonhaz"] {
  color: #28a745;
  font-weight: bold;
}

#hazStatus {
  transition: all 0.3s ease;
}

#hazStatus[data-status="haz"] {
  color: #dc3545;
  font-weight: bold;
  border-color: #dc3545;
  background-color: #fff5f5;
}

#hazStatus[data-status="nonhaz"] {
  color: #28a745;
  font-weight: bold;
  border-color: #28a745;
  background-color: #f0fff4;
}

/* Radio Button Styles */
.radio-group {
  display: flex;
  gap: 20px;
  margin-top: 8px;
}

.radio-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: normal;
  margin-bottom: 0;
}

.radio-label input[type="radio"] {
  margin-right: 8px;
  width: auto;
  padding: 0;
}

.radio-label span {
  font-size: 0.95rem;
  color: #34495e;
}

/* Additional Services Grid Styles */
.additional-services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.service-item {
  padding: var(--spacing-lg);
  background-color: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  transition: all var(--transition-fast);
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.service-item:hover {
  background-color: #eeeeee;
  border-color: #d0d0d0;
}

.service-item > label {
  display: block;
  font-weight: 600;
  font-size: 1rem;
  color: #212121;
  margin-bottom: var(--spacing-md);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.service-item .radio-group {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 0;
}

.service-item .radio-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: normal;
  margin-bottom: 0;
  padding: 0;
  position: relative;
}

.service-item .radio-label:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 20px;
  background-color: #2196f3;
}

.service-item .radio-label input[type="radio"] {
  margin-right: 8px;
  width: auto;
  padding: 0;
  cursor: pointer;
}

.service-item .radio-label span {
  font-size: 0.95rem;
  color: #424242;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.service-item .radio-label input[type="radio"]:checked + span {
  color: #212121;
  font-weight: 600;
}

.service-item .radio-label:has(input[type="radio"]:checked) span {
  color: #212121;
  font-weight: 600;
}

/* Info Box Styles */
.info-box {
  background-color: #e3f2fd;
  border: 1px solid #90caf9;
  border-left: 4px solid #2196f3;
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: #1565c0;
  font-size: 0.9rem;
}

.info-box i {
  color: #2196f3;
  font-size: 1.1rem;
}

/* Summary Row Styles */
.summary-row {
  background-color: #f8f9fa;
  font-weight: 600;
}

.summary-row.total-row {
  background-color: #e9ecef;
  font-weight: 700;
  border-top: 2px solid #495057;
}

.summary-row td {
  padding: 10px 8px;
  text-align: center;
}

.calc-label {
  text-align: left !important;
  font-weight: 600;
  color: #2c3e50;
  padding-left: 12px !important;
}

.calc-input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.85rem;
  text-align: center;
  background-color: white;
}

.calc-input:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Conditional Field Styles */
.conditional-field {
  display: none;
}

.conditional-field.show {
  display: block;
}

/* Validation Message Styles */
.validation-message {
  font-size: 0.85rem;
  margin-top: 5px;
  padding: 5px 8px;
  border-radius: 4px;
  display: none;
}

.validation-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  display: block;
}

.validation-message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  display: block;
}

.validation-message.hidden {
  display: none;
}

/* Company Details Styles */
.company-details {
  margin-top: 10px;
  padding: 12px;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  border-left: 4px solid #3498db;
}

.company-details.hidden {
  display: none;
}

.company-name {
  font-weight: 600;
  font-size: 1rem;
  color: #2c3e50;
  margin-bottom: 4px;
}

.company-address {
  font-size: 0.9rem;
  color: #6c757d;
  line-height: 1.4;
}

/* ODC Table Styles */
.odc-table-container {
  margin-top: 0px;
  padding: 1px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

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

.table-header h5 {
  margin: 0;
  color: #2c3e50;
  font-size: 1.1rem;
}

.table-actions {
  display: flex;
  gap: 10px;
}

.odc-table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.odc-table th {
  background-color: #34495e;
  color: white;
  padding: 12px 8px;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
}

.odc-table th:first-child {
  width: 50px;
  min-width: 50px;
}

.odc-table td {
  padding: 10px 8px;
  text-align: center;
  border-bottom: 1px solid #e9ecef;
}

.odc-table td.row-number {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #495057;
  width: 50px;
  min-width: 50px;
}

.odc-table tbody tr:hover {
  background-color: #f8f9fa;
}

.odc-table input[type="text"],
.odc-table input[type="number"],
.odc-table select {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.85rem;
  text-align: center;
}

.odc-table input[type="text"]:focus,
.odc-table input[type="number"]:focus,
.odc-table select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.delete-row-btn {
  background-color: #e74c3c;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: background-color 0.2s;
}

.delete-row-btn:hover {
  background-color: #c0392b;
}

/* Calculation Summary Styles */
.calculation-summary {
  margin-top: 20px;
  background-color: white;
  border-radius: 6px;
  padding: 15px;
  border: 1px solid #e9ecef;
}

.calc-table {
  width: 100%;
  border-collapse: collapse;
}

.calc-table td {
  padding: 8px 8px;
  text-align: center;
  border-bottom: 1px solid #f1f2f6;
}

.calc-table td:first-child {
  text-align: left;
  font-weight: 600;
  color: #2c3e50;
}

.calc-table tr:last-child td {
  border-bottom: none;
}

.calc-table td:not(:first-child) {
  font-weight: 500;
  color: #34495e;
}

/* Table Responsive */
.table-responsive {
  overflow-x: auto;
  margin-bottom: 15px;
}

@media (max-width: 768px) {
  .odc-table {
    font-size: 0.8rem;
  }
  
  .odc-table th,
  .odc-table td {
    padding: 8px 4px;
  }
  
  .calc-row {
    grid-template-columns: 120px 60px 60px 60px;
    font-size: 0.9rem;
  }
}

/* ODC Conditional Display */
.odc-required {
  color: #dc3545;
}

.odc-required::after {
  content: " *";
  color: #dc3545;
}

.rate-info {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  margin-top: var(--spacing-md);
  color: #856404;
}

.rate-info i {
  color: #f39c12;
  margin-right: var(--spacing-sm);
}

.required-field::after {
  content: " *";
  color: var(--error);
  font-weight: bold;
}

/* Customer Search Results */
.dropdown-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
}

.customer-result {
  padding: var(--spacing-sm) var(--spacing-md);
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  transition: background-color var(--transition-fast);
}

.customer-result:hover {
  background-color: var(--bg-light);
}

.customer-result:last-child {
  border-bottom: none;
}

.customer-result strong {
  color: var(--text-dark);
  font-size: 0.9rem;
}

.customer-result small {
  color: var(--text-medium);
  font-size: 0.8rem;
}