/* Cargo Management Platform - CSS Styles */

/* Navigation Styles */
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.main-nav {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.nav-link {
  color: #fff;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 14px;
  border: 1px solid transparent;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 768px) {
  .header-top {
    flex-direction: column;
    text-align: center;
  }
  
  .main-nav {
    justify-content: center;
    width: 100%;
  }
  
  .nav-link {
    font-size: 12px;
    padding: 6px 12px;
  }
}

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

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

/* Disclaimer styles */
.disclaimer {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  border: 1px solid #ffc107;
  border-radius: 8px;
  margin: 10px 20px;
  padding: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  animation: fadeInUp 1.2s ease-out;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.disclaimer::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 4s infinite;
}

.disclaimer:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255,234,167,0.4);
}

.disclaimer-content {
  padding: 12px 16px;
}

.disclaimer p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: #856404;
  text-align: center;
}

.disclaimer strong {
  color: #664d03;
}

.disclaimer a {
  color: #0066cc;
  text-decoration: none;
  font-weight: 500;
}

.disclaimer a:hover {
  color: #004499;
  text-decoration: underline;
}

.disclaimer-contact {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(102, 77, 3, 0.2);
}

/* Base styles and reset */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background: #f5f5f5;
  color: #333;
  line-height: 1.4;
}

/* Header styles */
header {
  background: linear-gradient(135deg, #2c3e50, #34495e);
  color: white;
  padding: 20px 0;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  animation: fadeInUp 1s ease-out;
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  animation: shimmer 3s infinite;
}

header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 300;
}

header .subtitle {
  margin: 5px 0 0 0;
  font-size: 14px;
  opacity: 0.8;
}

.header-buttons {
  display: flex;
  gap: 15px;
  margin-top: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.demo-btn {
  padding: 12px 24px;
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.demo-btn:hover {
  background: linear-gradient(135deg, #f7931e, #ff6b35);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.load-json-btn {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
  transition: all 0.3s ease;
}

.load-json-btn:hover {
  background: linear-gradient(135deg, #0056b3, #004085);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.demo-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(255, 107, 53, 0.3);
}

/* Main container */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background: white;
  min-height: calc(100vh - 120px);
  box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* Export section styles */
.export-section {
  margin: 20px 0;
  padding: 15px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  text-align: center;
}

.export-section .btn {
  margin: 0 5px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
  text-decoration: none;
}

.export-section .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}



#exportJsonBtn {
  background: linear-gradient(135deg, #28a745, #1e7e34);
  color: white;
}

#exportJsonBtn:hover {
  background: linear-gradient(135deg, #1e7e34, #155724);
}

#exportXmlBtn {
  background: linear-gradient(135deg, #ffc107, #e0a800);
  color: #212529;
}

#exportXmlBtn:hover {
  background: linear-gradient(135deg, #e0a800, #d39e00);
}

#generatePptBtn {
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
  margin: 10px 5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#generatePptBtn:hover {
  background: linear-gradient(135deg, #f7931e, #e8890b);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

#generatePptBtn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(255, 107, 53, 0.3);
}

/* Trash button styles */
.hs-trash {
  background: #ff4444;
  border: 1px solid #cc0000;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  color: white;
  font-size: 16px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.hs-trash:hover {
  background: #ff6666;
  border-color: #ff0000;
}

/* Review Table Styles */
.review-table, .data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.review-table thead {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.review-table th, .data-table th {
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-right: 1px solid rgba(255,255,255,0.2);
}

.review-table th:last-child {
    border-right: none;
}

.review-table tbody tr:nth-child(4n+1) {
    background: #f8f9fa;
}

.review-table tbody tr:nth-child(4n+2) {
    background: #e9ecef;
    font-style: italic;
}

.review-table tbody tr:nth-child(4n+3) {
    background: #ffffff;
}

.review-table tbody tr:nth-child(4n) {
    background: #f1f3f4;
    font-style: italic;
}

.review-table td, .data-table td {
    padding: 10px 8px;
    text-align: center;
    border-right: 1px solid #dee2e6;
    vertical-align: middle;
}

.review-table td:last-child {
    border-right: none;
}

.review-table tbody tr:hover, .data-table tbody tr:hover {
    background: #e3f2fd !important;
    transform: scale(1.01);
    transition: all 0.2s ease;
}

.review-table tbody tr:nth-child(even):hover, .data-table tbody tr:nth-child(even):hover {
    background: #bbdefb !important;
}

/* Separatore visivo tra gruppi di righe ADR */
.review-table tbody tr:nth-child(4n) {
    border-bottom: 3px solid #3498db;
}

/* Stili specifici per righe dati e descrizione ADR */
.review-table .adr-data-row {
    background: #f8f9fa !important;
    font-weight: 500;
}

.review-table .adr-data-row:hover {
    background: #e3f2fd !important;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
}

.review-table .adr-description-row {
    background: #ffffff !important;
    border-bottom: 2px solid #dee2e6;
}

.review-table .adr-description-row:hover {
    background: #f1f8ff !important;
}

.review-table .adr-description-row td {
    text-align: left;
    padding: 8px 12px;
    color: #6c757d;
    font-size: 13px;
}

.review-table .adr-data-row td:first-child {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    font-weight: bold;
    border-radius: 4px;
    margin: 2px;
}

/* ADR Add Button Styling */
.btn-add {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-add:hover {
    background: linear-gradient(135deg, #229954, #27ae60);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* ADR Table Optimization Class - Bar Chart Layout */
.adr-optimized-row {
  display: grid;
  grid-template-columns: 120px 120px 120px 60px;
  grid-template-rows: auto auto;
  gap: 8px;
  padding: 12px;
  border: 2px solid #3498db;
  border-radius: 8px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ADR table optimized styles for 2-row layout */
.adr-table th {
    background-color: #3498db;
    color: white;
    padding: 10px;
    text-align: center;
    font-weight: bold;
}

.adr-table td {
    padding: 8px;
    border: 1px solid #ddd;
    vertical-align: middle;
}

.adr-table input[name="adr_un"] {
    width: 120px;
    min-width: 120px;
    text-align: center;
    font-size: 14px;
    padding: 5px;
    overflow: visible;
    white-space: nowrap;
}

.adr-table input[name="adr_class"] {
    width: 100px;
    min-width: 100px;
    text-align: center;
    font-size: 14px;
    padding: 5px;
    overflow: visible;
    white-space: nowrap;
}

.adr-table input[name="adr_group"] {
    width: 120px;
    min-width: 120px;
    text-align: center;
    font-size: 14px;
    padding: 5px;
    overflow: visible;
    white-space: nowrap;
}

.adr-table input[name="adr_tunnel"] {
    width: 120px;
    min-width: 120px;
    text-align: center;
    font-size: 14px;
    padding: 5px;
    overflow: visible;
    white-space: nowrap;
}

.adr-table input[name="adr_quantity"] {
    width: 80px;
    max-width: 80px;
    text-align: center;
    font-size: 14px;
    padding: 5px;
}

.adr-table input[name="adr_total_weight"],
.adr-table input[name="adr_net_weight"] {
    width: 120px;
    min-width: 120px;
    text-align: center;
    font-size: 14px;
    padding: 5px;
    overflow: visible;
    white-space: nowrap;
}

.adr-table input[name="adr_description"] {
    width: 100%;
    min-width: 300px;
    resize: horizontal;
    padding: 5px;
}

.adr-table input[name="adr_shipping_name"] {
    width: 100%;
    max-width: 200px;
    padding: 5px;
}

.adr-table .action-button {
    width: 35px;
    height: 35px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    border: none;
    border-radius: 5px;
    background-color: #e74c3c;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.adr-table .action-button:hover {
    background-color: #c0392b;
}

/* Step navigation */
.steps {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
  border-bottom: 2px solid #ecf0f1;
  padding-bottom: 0;
  gap: 8px;
}

.steps div {
  flex: 1;
  text-align: center;
  padding: 18px 15px;
  background: #bdc3c7;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.steps div:last-child {
  margin-right: 0;
}

.steps div.active {
  background: #3498db;
  transform: translateY(-2px);
}

.steps div.completed {
  background: #27ae60;
}

.steps div:hover {
  background: #34495e;
}

/* Form sections */
section {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

section.active {
  display: block;
  animation: fadeInUp 0.6s ease-out;
  transition: all 0.3s ease;
}

section:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  transform: translateY(-2px);
}

/* Step Content Visibility */
.step-content {
  display: none;
}

.step-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Form styling */
.row {
  display: flex;
  margin-bottom: 15px;
  align-items: flex-start;
}

.row label {
  flex: 0 0 200px;
  font-weight: 600;
  color: #2c3e50;
  padding: 8px 15px 8px 0;
  text-align: right;
}

.row > div {
  flex: 1;
  padding: 0 15px;
}

/* Grid layouts */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 15px;
}

.grid-4 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 15px;
}

/* Input styling */
input, select, textarea {
  width: 100%;
  padding: 8px 12px;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  color: #333;
  background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
}

/* Specific styling for dangerous goods select elements */
#adr_type, #water_hazardous, #cargo_hazardous {
  max-width: 3cm;
  width: 3cm;
  min-width: 3cm;
}

/* Shipment Summary field width restrictions */
#step2 input, #step2 select {
  max-width: 300px;
}

#step2 input[type="number"] {
  max-width: 150px;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

input:hover, select:hover, textarea:hover {
  border-color: #007bff;
  box-shadow: 0 2px 8px rgba(0,123,255,0.15);
  transform: translateY(-1px);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0,123,255,0.1), 0 2px 8px rgba(0,123,255,0.2);
  transform: translateY(-1px);
  background: #ffffff;
}

/* Order Reference field - reduced width */
#order_ref {
  max-width: 300px;
  width: 300px;
}

/* EX1 Type field - reduced width to half */
#ex1_type {
  max-width: 200px;
  width: 200px;
}

/* Country input with flag */
.country-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  min-width: calc(100% + 19px);
}

.country-input-wrapper input {
  flex: 1;
  padding-right: 120px;
  color: #333 !important;
  background-color: #fff !important;
  opacity: 1 !important;
  text-shadow: none !important;
  -webkit-text-fill-color: #333 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
  text-indent: 0 !important;
  letter-spacing: normal !important;
  text-align: left !important;
}

/* Force gray placeholders for all country inputs - Firefox compatible */
input[name="shipper_country"]::placeholder,
input[name="consignee_country"]::placeholder,
input[name*="loading_site_country"]::placeholder {
  color: #999999 !important;
  opacity: 1 !important;
  font-style: normal !important;
  font-weight: normal !important;
  -webkit-text-fill-color: #999999 !important;
}

/* Firefox specific placeholder styles */
input[name="shipper_country"]::-moz-placeholder,
input[name="consignee_country"]::-moz-placeholder,
input[name*="loading_site_country"]::-moz-placeholder {
  color: #999999 !important;
  opacity: 1 !important;
  font-style: normal !important;
  font-weight: normal !important;
}

/* Universal placeholder override */
input[type="text"][maxlength="2"]::placeholder {
  color: #999999 !important;
  opacity: 1 !important;
  font-style: normal !important;
  font-weight: normal !important;
  -webkit-text-fill-color: #999999 !important;
}

input[name="shipper_country"]::-webkit-input-placeholder,
input[name="consignee_country"]::-webkit-input-placeholder,
input[name*="loading_site_country"]::-webkit-input-placeholder {
  color: #999 !important;
  opacity: 1 !important;
  font-style: normal !important;
  font-weight: normal !important;
}

/* Additional Firefox placeholder override */
input[name="shipper_country"]::-moz-placeholder,
input[name="consignee_country"]::-moz-placeholder,
input[name*="loading_site_country"]::-moz-placeholder {
  color: #999999 !important;
  opacity: 1 !important;
  font-style: normal !important;
  font-weight: normal !important;
}

/* Force Firefox to respect placeholder colors */
input[type="text"][maxlength="2"]::-moz-placeholder {
  color: #999999 !important;
  opacity: 1 !important;
  font-style: normal !important;
  font-weight: normal !important;
}

/* T1 Fields Styling */
/* T1 Inline Container */
.t1-inline-container {
    margin-top: 8px;
    padding: 8px;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    background: #f8f9fa;
}

.t1-checkbox-label {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-weight: 600;
}

.t1-inline-fields {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.t1-mrn-input {
    flex: 1;
    min-width: 120px;
    padding: 6px 10px;
    border: 1px solid #e1e8ed;
    border-radius: 4px;
    font-size: 13px;
}

.t1-date-input {
    flex: 1;
    min-width: 120px;
    padding: 6px 8px;
    border: 1px solid #e1e8ed;
    border-radius: 4px;
    font-size: 13px;
}

.t1-fields.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
        scale: 0.98;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        scale: 1;
    }
}

.t1-fields h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 8px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid #e1e8ed;
    text-align: center;
    letter-spacing: 0.3px;
}

.t1-fields .form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    margin-bottom: 0;
}

.t1-fields .form-group {
    display: flex;
    flex-direction: column;
}

/* Container for T1 dates - Loading Site style */
.t1-dates-container {
    display: flex;
    gap: 8px;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid #e1e8ed;
}

.date-field-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    min-width: 120px;
}

.date-label-container {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
    padding-left: 0px;
}

.date-icon {
    font-size: 16px;
    display: inline-block;
    width: 18px;
    height: 18px;
    text-align: center;
    color: #4a5568;
    opacity: 0.8;
}

.date-label {
    font-size: 12px;
    font-weight: 600;
    color: #4a5568;
    margin: 0 0 4px 0;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.date-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e1e8ed;
    border-radius: 4px;
    font-size: 13px;
    background: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    margin-bottom: 6px;
}

.date-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.25);
    transform: translateY(-1px);
}

.date-input:hover {
    border-color: #95a5a6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.t1-fields label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    color: #4a5568;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.t1-fields input[type="text"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e1e8ed;
    border-radius: 4px;
    font-size: 13px;
    background-color: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    margin-bottom: 6px;
}

.t1-fields input[type="text"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.25);
    transform: translateY(-1px);
}

.t1-fields input[type="text"]:hover {
    border-color: #95a5a6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}



/* Date input styling */
input[type="date"] {
    position: relative;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
}

/* Date picker calendar icon styling */
input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    border-radius: 6px;
    margin-right: 4px;
    opacity: 0.7;
    filter: invert(0.5) sepia(1) saturate(5) hue-rotate(175deg);
    width: 20px;
    height: 20px;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    background-color: rgba(25, 118, 210, 0.1);
    transform: scale(1.1);
}

input[name="shipper_country"]:-ms-input-placeholder,
input[name="consignee_country"]:-ms-input-placeholder,
input[name*="loading_site_country"]:-ms-input-placeholder {
  color: #999 !important;
  opacity: 1 !important;
  font-style: normal !important;
  font-weight: normal !important;
}

.country-input-wrapper input::placeholder {
  color: #999 !important;
  opacity: 1 !important;
  font-style: normal;
  font-weight: normal;
}

.country-input-wrapper input::-webkit-input-placeholder {
  color: #999 !important;
  opacity: 1 !important;
  font-style: normal;
  font-weight: normal;
}

.country-input-wrapper input::-moz-placeholder {
  color: #999 !important;
  opacity: 1 !important;
  font-style: normal;
  font-weight: normal;
}

.country-input-wrapper input:-ms-input-placeholder {
  color: #999 !important;
  opacity: 1 !important;
  font-style: normal;
  font-weight: normal;
}

.country-flag-display {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
  z-index: 1;
}

.country-flag {
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 5px;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

input[type="checkbox"], input[type="radio"] {
  width: auto;
  margin-right: 8px;
}

/* Checkbox container styling */
.checkbox-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-label {
  font-size: 14px;
  color: #555;
  cursor: pointer;
  user-select: none;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

/* Button styling */
.btn, button {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
  display: inline-block;
  text-decoration: none;
  box-shadow: 0 2px 5px rgba(52,152,219,0.3);
  position: relative;
  overflow: hidden;
}

.btn::before, button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before, button:hover::before {
  width: 300px;
  height: 300px;
}

.btn:hover, button:hover {
  background: linear-gradient(135deg, #2980b9 0%, #1f5f8b 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(52,152,219,0.4);
  animation: pulse 2s infinite;
}

.btn:active, button:active {
  transform: translateY(0);
  box-shadow: 0 2px 5px rgba(52,152,219,0.3);
}

.btn.secondary {
  background: #95a5a6;
}

.btn.secondary:hover {
  background: #7f8c8d;
}

.btn.danger {
  background: #e74c3c;
}

.btn.danger:hover {
  background: #c0392b;
}

/* Navigation buttons */
.nav-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #ecf0f1;
}

/* Loading sites */
#sites {
  margin: 20px 0;
}

.site {
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  position: relative;
}

/* City field width reduction - 20% smaller */
#sites .site .grid-4 > .row-city {
  grid-column: 1 / 2;
}

#sites .site .row-city input {
  max-width: 176px; /* Reduced from 220px by 20% */
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #dee2e6;
}

.site-title {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
}

.site-remove {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.site-remove:hover {
  background: #c0392b;
}

/* Equipment styling */
.equip-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.equip-inline label {
  display: flex;
  align-items: center;
  background: #f8f9fa;
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid #dee2e6;
  cursor: pointer;
  transition: all 0.3s ease;
}

.equip-inline label:hover {
  background: #e9ecef;
}

.equip-inline input[type="checkbox"] {
  margin-right: 8px;
  width: auto;
}

.equip-other, .equip-notes {
  margin-top: 10px;
}

/* Slot management */
.slot-top {
  background: #f1f3f4;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 15px;
}

.slot-bar {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 10px;
}

.slot-bar .inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-slot {
  background: #27ae60;
  padding: 6px 12px;
  font-size: 12px;
}

.btn-slot:hover {
  background: #229954;
}

.hint {
  color: #6c757d;
  font-size: 12px;
  font-style: italic;
}

.slots {
  display: none;
}

.slot-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
  padding: 8px;
  background: white;
  border-radius: 4px;
  border: 1px solid #dee2e6;
}

.slot-row input, .slot-row select {
  flex: 1;
}

.trash {
  cursor: pointer;
  font-size: 16px;
  color: #e74c3c;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.trash:hover {
  background: #f8d7da;
}

.empty {
  color: #6c757d;
  font-style: italic;
  text-align: center;
  padding: 20px;
}

/* LDM Table */
.ldm-box {
  margin: 20px 0;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
}

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

.ldm-table th {
  background: #34495e;
  color: white;
  padding: 12px 8px;
  text-align: left;
  font-weight: 600;
}

.ldm-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #dee2e6;
}

.ldm-table tr:hover {
  background: #f8f9fa;
}

.ldm-pill {
  background: #e9ecef;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  color: #495057;
}

.ldm-del {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.ldm-del:hover {
  background: #c0392b;
}

.ldm-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
}

.btn-add-ldm {
  background: #27ae60;
}

.btn-add-ldm:hover {
  background: #229954;
}

.ldm-total {
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
}

/* Country code styling */
.cc {
  display: inline-block;
  background: #3498db;
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 5px;
}

/* Contact-tel merge */
.contact-tel {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

.contact-tel input {
  flex: 1;
}

/* Add space above contact person row */
.row:has(.contact-tel) {
  margin-top: 15px;
}

/* Validation styles */
.inline-error {
  color: #e74c3c;
  font-size: 12px;
  font-weight: 600;
  margin-left: 8px;
}



.req label::after {
  content: ' *';
  color: #e74c3c;
}

/* Print styles - Optimized Professional PDF Document */
@media print {
  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    /* Remove unsupported color-adjust property */
  }
  
  body {
    background: white;
    font-family: 'Arial', 'Helvetica', sans-serif;
    font-size: 9pt;
    line-height: 1.3;
    margin: 0;
    padding: 10mm;
    color: #000;
  }
  
  .wrap {
    max-width: none;
    margin: 0;
    padding: 15px;
    border: 2px solid #666;
  }
  
  /* Hide navigation and interactive elements */
  .steps, .nav-buttons, .no-print, .btn, button {
    display: none !important;
  }
  
  /* Optimized Document Header */
  body::before {
    content: "ROUTING ORDER - FORMULARIO COMPLETO";
    display: block;
    font-size: 14pt;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid #000;
    background: #f0f0f0;
  }
  
  /* Optimized sections */
  section {
    display: block !important;
    page-break-inside: avoid;
    margin-bottom: 10px;
    border: 1px solid #000;
    padding: 8px;
    background: white;
  }
  
  /* Optimized section headers */
  section h2 {
    font-size: 11pt;
    font-weight: bold;
    color: white;
    margin: -8px -8px 8px -8px;
    padding: 6px 8px;
    background: #000;
    text-transform: uppercase;
  }
  
  /* Review section - Simple styling */
  #step5 {
    border: 2px solid #333;
    background: white;
  }
  
  #step5 h2 {
    background: #333;
    font-size: 16pt;
  }
  
  /* Optimized review content sections */
  .review-section {
    margin-bottom: 8px;
    padding: 6px;
    border: 1px solid #000;
    background: white;
  }
  
  .review-section h4 {
    font-size: 10pt;
    font-weight: bold;
    margin: -6px -6px 6px -6px;
    padding: 4px 6px;
    background: #000;
    color: white;
  }
  
  .review-section p {
    margin: 3px 0;
    padding: 2px 4px;
    border-bottom: 1px solid #ddd;
    background: white;
    font-size: 8pt;
  }
  
  .review-section p strong {
    display: inline-block;
    width: 120px;
    font-weight: bold;
    color: #000;
    text-transform: uppercase;
    font-size: 7pt;
  }
  
  /* Optimized Tables styling */
  table {
    width: 100%;
    border-collapse: collapse;
    margin: 6px 0;
    font-size: 8pt;
  }
  
  table th {
    background: #000;
    color: white;
    padding: 4px 3px;
    text-align: left;
    font-weight: bold;
    border: 1px solid #000;
    text-transform: uppercase;
    font-size: 7pt;
  }
  
  table td {
    padding: 3px;
    border: 1px solid #000;
    background: white;
    font-size: 7pt;
  }
  
  table tr:nth-child(even) td {
    background: #f5f5f5;
  }
  
  /* Simple Equipment and LDM sections */
   #print-equip, #print-ldm, .signature-section {
     display: block !important;
     margin: 15px 0;
     padding: 15px;
     border: 1px solid #666;
     background: white;
   }
  
  #print-equip h3, #print-ldm h3 {
    font-size: 12pt;
    font-weight: bold;
    margin: -15px -15px 10px -15px;
    padding: 8px 15px;
    background: #666;
    color: white;
    text-transform: uppercase;
  }
  
  /* Optimized Form fields styling */
  .row {
    display: flex;
    margin-bottom: 4px;
    align-items: center;
    padding: 2px;
    background: white;
  }
  
  .row label {
    font-weight: bold;
    width: 120px;
    margin-right: 6px;
    color: #000;
    text-transform: uppercase;
    font-size: 7pt;
  }
  
  input, select, textarea {
    border: 1px solid #000 !important;
    padding: 2px 4px;
    background: white;
    font-size: 8pt;
  }
  
  input:focus, select:focus, textarea:focus {
    border-color: #000 !important;
    outline: none;
  }
  
  /* Simple Signature Section */
  .signature-section {
    border: 2px solid #333 !important;
    background: white !important;
    margin-top: 20px !important;
  }
  
  .signature-section h3 {
    background: #333 !important;
    color: white !important;
    text-align: center;
    font-size: 14pt !important;
    margin: -15px -15px 15px -15px !important;
    padding: 10px 15px !important;
  }
  
  .signature-section .signature-row {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
    padding: 15px;
    background: white;
    border: 1px solid #ccc;
  }
  
  .signature-section .signature-field {
    text-align: center;
    width: 45%;
    padding: 10px;
    border: 1px solid #ccc;
    background: white;
  }
  
  .signature-section .signature-field h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 11pt;
    font-weight: bold;
    text-transform: uppercase;
  }
  
  .signature-section .signature-field p {
    margin: 6px 0;
    padding: 6px;
    border-bottom: 1px solid #333;
    background: white;
    font-size: 9pt;
    color: #333;
  }
  
  /* Grid layouts */
  .grid-2, .grid-3, .grid-4 {
    display: grid;
    gap: 15px;
    margin: 10px 0;
  }
  
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
  
  /* Page breaks */
  .page-break {
    page-break-before: always;
  }
  
  /* Form field containers */
   .form-group {
     margin-bottom: 12px;
     padding: 8px;
     border: 1px solid #e0e0e0;
     background: #fafafa;
   }
   
   .form-group label {
     font-weight: bold;
     color: #333;
     display: block;
     margin-bottom: 4px;
   }
   
   /* Special styling for important sections */
   .shipper-info, .consignee-info {
     border: 2px solid #28a745;
     background: #f8fff9;
     margin: 15px 0;
     padding: 15px;
   }
   
   .shipper-info h4, .consignee-info h4 {
     background: #28a745;
     color: white;
     margin: -15px -15px 15px -15px;
     padding: 10px 15px;
     font-size: 12pt;
   }
   
   /* Loading sites and destinations */
   .loading-site, .destination {
     border: 1px solid #17a2b8;
     background: #f0f9ff;
     margin: 10px 0;
     padding: 12px;
   }
   
   .loading-site h5, .destination h5 {
     background: #17a2b8;
     color: white;
     margin: -12px -12px 10px -12px;
     padding: 8px 12px;
     font-size: 11pt;
   }
   
   /* Checkbox styling */
   input[type="checkbox"] {
     width: 15px;
     height: 15px;
     margin-right: 8px;
   }
   
   /* Text emphasis */
   .highlight {
     background: #fff3cd;
     padding: 2px 4px;
     border: 1px solid #ffeaa7;
   }
   
   /* Document structure improvements */
   .document-section {
     page-break-inside: avoid;
     margin-bottom: 20px;
   }
   
   .signature-section {
     margin-top: 40px;
     padding: 20px;
     border: 2px solid #333;
     background: #f8f9fa;
   }
   
   .signature-line {
     border-bottom: 1px solid #333;
     width: 200px;
     height: 30px;
     display: inline-block;
     margin: 10px 20px;
   }
   
   /* Simple Footer */
   body::after {
     content: "Routing Order - " attr(data-date);
     display: block;
     position: fixed;
     bottom: 5mm;
     left: 0;
     right: 0;
     text-align: center;
     font-size: 8pt;
     color: #666;
     background: white;
     border-top: 1px solid #ccc;
     padding: 4px;
   }
 }

/* Responsive design */
@media (max-width: 768px) {
  .wrap {
    padding: 10px;
  }
  
  .row {
    flex-direction: column;
  }
  
  .row label {
    text-align: left;
    flex: none;
    margin-bottom: 5px;
  }
  
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .steps {
    flex-direction: column;
  }
  
  .step {
    margin-right: 0;
    margin-bottom: 2px;
  }
  
  .equip-inline {
    flex-direction: column;
  }
  
  .slot-row {
    flex-direction: column;
    gap: 5px;
  }
  
  .contact-tel {
    flex-direction: column;
    gap: 12px;
  }
}

/* Viewport scaling */
body[data-viewport-mode="fixed"] {
  overflow-x: auto;
}

#canvas-root {
  position: relative;
}

#fixed-canvas {
  width: 1280px;
  transform-origin: top left;
  transition: transform 0.3s ease;
}

.viewport-toolbar {
  position: fixed;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  z-index: 1000;
}

.viewport-toolbar button {
  background: transparent;
  border: 1px solid #666;
  color: white;
  padding: 4px 8px;
  margin-left: 5px;
  border-radius: 3px;
  font-size: 11px;
}

.viewport-toolbar button.active {
  background: #3498db;
  border-color: #3498db;
}

/* Additional utility classes */
.hidden {
  display: none !important;
}

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

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

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 5px; }
.mb-2 { margin-bottom: 10px; }
.mb-3 { margin-bottom: 15px; }
.mb-4 { margin-bottom: 20px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 5px; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 15px; }
.mt-4 { margin-top: 20px; }

.small {
  font-size: 12px;
  color: #6c757d;
}

.bold {
  font-weight: 600;
}

/* Form-specific enhancements */
.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: #2c3e50;
}

.form-control {
  width: 100%;
  padding: 8px 12px;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.form-control:focus {
  border-color: #3498db;
  box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

/* Loading animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* EORI Number field styles */
.eori-input-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.eori-input-container input {
  flex: 1;
  min-width: 300px;
  max-width: 500px;
  width: 100%;
  padding: 8px 12px;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.eori-input-container input:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

/* HS Code Table Styles */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.data-table th,
.data-table td {
  padding: 8px 12px;
  border: 1px solid #ddd;
  text-align: left;
}

.data-table th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #2c3e50;
}

/* Column width adjustments - Updated for new structure without Description */
.data-table th:nth-child(1), /* HS Code column */
.data-table td:nth-child(1) {
  width: 18%;
}

.data-table th:nth-child(2), /* Pcs column */
.data-table td:nth-child(2) {
  width: 10%;
}

.data-table th:nth-child(3), /* Gross Weight column */
.data-table td:nth-child(3) {
  width: 18%;
}



.data-table th:nth-child(4), /* Net Weight column */
.data-table td:nth-child(4) {
  width: 15%;
}

.data-table th:nth-child(5), /* Commercial Value column */
.data-table td:nth-child(5) {
  width: 18%;
}

.data-table th:nth-child(6), /* Currency column */
.data-table td:nth-child(6) {
  width: 14%;
}

.data-table th:nth-child(7), /* Origin column */
.data-table td:nth-child(7) {
  width: 10%;
}

.data-table th:nth-child(8), /* Action column */
.data-table td:nth-child(8) {
  width: 5%;
}

/* Weight Totals Display */
.weight-totals-display {
  background-color: #e8f4fd;
  border: 2px solid #007bff;
  border-radius: 8px;
  padding: 15px;
  margin: 20px 0;
  text-align: center;
}

.totals-row {
  color: #0056b3;
  font-size: 16px;
}

.weight-totals-display strong {
  font-weight: 700;
}

.data-table input,
.data-table select,
.data-table textarea {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 3px;
  font-size: 13px;
  box-sizing: border-box;
}

.data-table textarea {
  font-family: inherit;
  font-size: inherit;
  min-height: 60px;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap;
  resize: vertical;
}

.data-table input:focus,
.data-table select:focus,
.data-table textarea:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 3px rgba(52, 152, 219, 0.3);
}

/* HS Description Row Styles */
.hs-description-row {
  background-color: #f8f9fa;
}

.hs-description-row td {
  padding: 4px 8px;
  border-top: none;
}

.hs-description-row input {
  background: transparent;
  border: none;
  width: 100%;
  padding: 8px;
  font-style: italic;
  color: #666;
}

.hs-description-row input:focus {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 3px;
  color: #333;
}

/* Review Section Styles */
.review-section {
    background: #ffffff;
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.review-section:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.review-section h3 {
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #ecf0f1;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Totals Summary */
.totals-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid #3498db;
}

.totals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.total-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.total-label {
    font-weight: 500;
    color: #495057;
}

.total-value {
    font-weight: 700;
    color: #2c3e50;
    font-size: 16px;
}

/* Compliance Section */
.compliance-section {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    border-left: 4px solid #e53e3e;
}

.compliance-checks {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.compliance-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #fed7d7;
}

.compliance-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.compliance-text {
    font-weight: 500;
    color: #2d3748;
}

/* Signature Section */
.signature-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.signature-box {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.signature-header {
    margin-bottom: 16px;
    color: #495057;
    font-size: 14px;
}

.signature-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.signature-line {
    height: 60px;
    border-bottom: 2px solid #6c757d;
    margin: 0 20px;
    position: relative;
}

.signature-line::before {
    content: "✍️";
    position: absolute;
    right: -30px;
    bottom: -15px;
    font-size: 20px;
    opacity: 0.5;
}

.signature-details {
    font-size: 12px;
    color: #6c757d;
    line-height: 1.4;
}

.signature-details p {
    margin: 4px 0;
}

/* Export Section */
.export-section {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    border-left: 4px solid #0066cc;
}

.export-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.export-group {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e1e8ed;
}

.export-group h4 {
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.export-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.export-btn.secondary {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    box-shadow: 0 4px 12px rgba(149, 165, 166, 0.3);
}

.export-btn.secondary:hover {
    box-shadow: 0 6px 20px rgba(149, 165, 166, 0.4);
}

.btn-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.btn-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.btn-text strong {
    font-weight: 600;
    font-size: 16px;
}

.btn-text small {
    font-size: 12px;
    opacity: 0.9;
    font-weight: 400;
}

/* Responsive Design */
@media (max-width: 768px) {
    .review-section {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .totals-grid {
        grid-template-columns: 1fr;
    }
    
    .signature-container {
        grid-template-columns: 1fr;
    }
    
    .export-actions {
        grid-template-columns: 1fr;
    }
    
    .export-btn {
        padding: 12px 16px;
    }
    
    .btn-icon {
        font-size: 20px;
    }
}

/* MDG Notification Styles - Minimal Version */
.mdg-notification {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  margin: 8px 0;
  padding: 0;
  box-shadow: none;
  position: relative;
  overflow: hidden;
}

.mdg-notification::before {
  display: none;
}

.notification-header {
  background: #e9ecef;
  color: #495057;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 3px 3px 0 0;
}

.notification-icon {
  font-size: 14px;
}

.notification-header h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
}

.notification-content {
  padding: 8px 10px;
  position: relative;
  z-index: 1;
}

.notification-content p {
  margin: 0 0 4px 0;
  font-size: 12px;
  line-height: 1.3;
  color: #6c757d;
}

.notification-content strong {
  color: #495057;
  font-weight: 500;
}

.notification-requirements {
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 3px;
  padding: 6px 8px;
  margin: 4px 0;
}

.notification-requirements h5 {
  margin: 0 0 4px 0;
  color: #495057;
  font-size: 12px;
  font-weight: 500;
}

.notification-requirements ul {
  margin: 0;
  padding-left: 12px;
  list-style: none;
}

.notification-requirements li {
  margin: 2px 0;
  color: #6c757d;
  font-size: 11px;
  line-height: 1.2;
  position: relative;
}

.notification-requirements li::before {
  content: '•';
  position: absolute;
  left: -12px;
  top: 0;
  color: #adb5bd;
}

.notification-reminder {
  background: #f8f9fa;
  border-left: 2px solid #dee2e6;
  padding: 4px 6px;
  margin-top: 4px;
  border-radius: 0 2px 2px 0;
}

.notification-reminder p {
  margin: 0;
  font-size: 11px;
  font-style: italic;
  color: #6c757d;
}

/* Responsive adjustments for MDG notification */
@media (max-width: 768px) {
  .mdg-notification {
    margin: 6px 0;
  }
  
  .notification-header {
    padding: 4px 8px;
    flex-direction: row;
    text-align: left;
    gap: 4px;
  }
  
  .notification-content {
    padding: 6px 8px;
  }
  
  .notification-requirements {
    padding: 4px 6px;
  }
}

/* Opening Hours Styles - Compact Horizontal Layout */
.opening-hours-container {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 12px;
  margin-top: 8px;
}

.hours-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #eee;
}

.btn-add-hours {
  background: #28a745;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  transition: background-color 0.2s;
}

.btn-add-hours:hover {
  background: #218838;
}

.hours-24-7-option {
  background: #6c757d;
  color: white;
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.hours-24-7-option:hover {
  background: #5a6268;
}

.hours-24-7-option.active {
  background: #28a745;
  color: white;
}

.hours-24-7-option.active:hover {
  background: #218838;
}

.hours-247-active {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 4px;
  padding: 12px;
  margin: 8px 0;
}

.hours-247-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hours-247-text {
  color: #155724;
  font-weight: 500;
  font-size: 14px;
}

.btn-remove-247 {
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.btn-remove-247:hover {
  background: #c82333;
}

.hours-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hours-slot {
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 8px 12px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
}

.hours-slot-header {
  min-width: 60px;
  flex-shrink: 0;
}

.slot-number {
  font-weight: 600;
  color: #495057;
  font-size: 12px;
  margin: 0;
}

.btn-remove-hours {
  background: #dc3545;
  color: white;
  border: none;
  padding: 3px 6px;
  border-radius: 2px;
  cursor: pointer;
  font-size: 10px;
  flex-shrink: 0;
  margin-left: auto;
}

.btn-remove-hours:hover {
  background: #c82333;
}

.hours-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.day-range-selector {
  display: flex;
  align-items: center;
  gap: 4px;
}

.day-range-inputs {
  display: flex;
  align-items: center;
  gap: 4px;
}

.day-range-inputs select {
  padding: 3px 5px;
  border: 1px solid #ced4da;
  border-radius: 3px;
  font-size: 11px;
  min-width: 70px;
}

.time-range-selector {
  display: flex;
  align-items: center;
  gap: 4px;
}

.time-range-inputs {
  display: flex;
  align-items: center;
  gap: 4px;
}

.time-range-inputs input[type="time"] {
  padding: 3px 5px;
  border: 1px solid #ced4da;
  border-radius: 3px;
  font-size: 11px;
  width: 65px;
}

.time-separator {
  color: #666;
  font-weight: 500;
  font-size: 11px;
}

.hours-options {
  display: flex;
  gap: 8px;
  margin-left: 10px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  font-size: 11px;
  white-space: nowrap;
}

.checkbox-label input[type="checkbox"] {
  margin: 0;
  width: 12px;
  height: 12px;
}

.hours-notes {
  margin-top: 8px;
}

.hours-notes textarea {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #ced4da;
  border-radius: 3px;
  font-size: 12px;
  font-family: inherit;
  resize: vertical;
  min-height: 40px;
}

.hours-notes textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Responsive adjustments for opening hours */
@media (max-width: 768px) {
  .hours-slot {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 8px;
  }
  
  .hours-controls {
    flex-direction: column;
    gap: 6px;
  }
  
  .hours-options {
    margin-left: 0;
    justify-content: flex-start;
  }
}