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

/* ==========================================
   DESIGN SYSTEM VARIABLES & THEME
   ========================================== */
:root {
  /* Brand Colors - Steel & Teal/Ottanio */
  --color-steel-950: #0b0f19;
  --color-steel-900: #0f172a;
  --color-steel-800: #1e293b;
  --color-steel-700: #334155;
  --color-steel-600: #475569;
  --color-steel-400: #94a3b8;
  --color-steel-200: #e2e8f0;
  --color-steel-100: #f1f5f9;
  --color-steel-50: #f8fafc;

  --color-teal-800: #065f46; /* Emerald 800 */
  --color-teal-700: #047857; /* Emerald 700 - button green */
  --color-teal-600: #059669; /* Emerald 600 */
  --color-teal-500: #10b981; /* Emerald 500 */
  --color-teal-400: #34d399; /* Emerald 400 */
  --color-teal-100: #d1fae5; /* Emerald 100 */
  --color-teal-55: #a7f3d0;  /* Mint / Emerald 200 */
  --color-teal-5: #ecfdf5;   /* Emerald 50 */
  --color-teal-50: #f0fdf4;  /* Emerald 50 */

  /* Alert Colors */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-info: #0ea5e9;

  /* Fonts */
  --font-headings: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Shadows & Radius */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 30px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Glassmorphism */
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-blur: blur(20px);
}

/* ==========================================
   BASE & RESET
   ========================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overflow-y: scroll;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-steel-50);
  color: var(--color-steel-800);
  line-height: 1.6;
  overflow-x: clip;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  color: var(--color-steel-900);
  font-weight: 600;
  line-height: 1.2;
}

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

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

ul {
  list-style: none;
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.text-teal { color: var(--color-teal-600); }
.text-steel-muted { color: var(--color-steel-400); }
.bg-steel-dark { background-color: var(--color-steel-900); color: #fff; }
.bg-teal { background-color: var(--color-teal-600); color: #fff; }

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

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

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

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

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

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

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4, .grid-5 {
    grid-template-columns: 1fr;
  }
}

/* ==========================================
   HEADER, TICKER & LOGO
   ========================================== */
.top-ticker {
  background-color: var(--color-steel-950);
  color: var(--color-steel-400);
  font-size: 0.78rem;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-steel-900);
  overflow: hidden;
  white-space: nowrap;
}

.ticker-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ticker-content {
  display: inline-block;
  animation: ticker 30s linear infinite;
  padding-left: 20%;
}

.ticker-item {
  display: inline-block;
  margin-right: 48px;
}

.ticker-item span.green-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--color-success);
  border-radius: 50%;
  margin-right: 6px;
  box-shadow: 0 0 8px var(--color-success);
  animation: pulse 1.5s infinite;
}

@keyframes ticker {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-100%, 0, 0); }
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.5; }
}

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-steel-200);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}

header.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--color-steel-200);
  box-shadow: var(--shadow-md);
}

.navbar {
  display: flex;
  /* Bootstrap definisce una .navbar propria con flex-wrap: wrap e il nome di
     classe coincide con questo. Senza il reset le voci andavano a capo pur
     restando l'header alto 84px fissi, quindi la seconda riga finiva sopra la
     sezione successiva (evidente su mobile e tablet a utente loggato). */
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  height: 84px;
}

.nav-logo-text {
  font-family: var(--font-headings);
  font-weight: 800;
  font-size: 2.2rem;
  color: #064e3b; /* Darker emerald green for clean, professional look */
  letter-spacing: -1.5px;
  display: flex;
  align-items: center;
  transition: var(--transition-fast);
}

.nav-logo-text:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

/* Logo immagine (logo-ptml.jpg) al posto della scritta "PTML" nella navbar. */
.nav-logo-img {
  height: 52px;
  width: auto;
  display: block;
  border-radius: var(--radius-sm); /* bordi arrotondati come il logo nel footer */
}

/* Logo scrolled styles removed to prevent color shifting */

.footer-logo-text {
  font-family: var(--font-headings);
  font-weight: 800;
  font-size: 2.4rem;
  color: #34d399;
  letter-spacing: -1.8px;
  margin-bottom: 16px;
  display: inline-block;
}

/* Logo immagine nel footer (sfondo scuro): piccolo badge chiaro perche' la jpg
   ha sfondo bianco e altrimenti stonerebbe sul footer. */
.footer-logo-img {
  height: 56px;
  width: auto;
  display: inline-block;
  margin-bottom: 16px;
  background: #fff;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

.invoice-logo-text {
  font-family: var(--font-headings);
  font-weight: 800;
  font-size: 2.2rem;
  color: #064e3b; /* Darker emerald green for dynamic invoices */
  letter-spacing: -1.5px;
  display: inline-block;
}

.nav-menu {
  display: flex;
  gap: 36px;
  align-items: center;
}

.nav-link {
  font-weight: 600;
  color: var(--color-steel-700);
  font-size: 0.95rem;
  position: relative;
  padding: 8px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-teal-600);
  transition: var(--transition-normal);
}

.nav-link:hover {
  color: var(--color-teal-600);
}

.nav-link.active {
  color: var(--color-teal-600);
}

.nav-link.active::after, .nav-link:hover::after {
  width: 100%;
}

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

.nav-btn-outline {
  border: 2px solid var(--color-teal-600);
  color: var(--color-teal-600);
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.88rem;
}

.nav-btn-outline:hover {
  background-color: var(--color-teal-600);
  color: #fff;
}

.nav-btn-solid {
  background-color: #047857; /* Dark emerald green (same tone as success green, but darker/more visible) */
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.88rem;
  box-shadow: 0 4px 10px rgba(4, 120, 87, 0.25);
}

.nav-btn-solid:hover {
  background-color: #065f46; /* Even darker green on hover */
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(4, 120, 87, 0.35);
}

.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-steel-800);
  font-size: 1.8rem;
  cursor: pointer;
}

@media (max-width: 900px) {
  .nav-menu {
    display: none;
  }
  .mobile-nav-toggle {
    display: block;
  }
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-teal-700);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 4px 10px rgba(4, 120, 87, 0.2);
}

.btn-primary:hover {
  background-color: var(--color-teal-800);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(4, 120, 87, 0.3);
}

.btn-primary:disabled {
  background-color: var(--color-steel-300);
  color: var(--color-steel-500);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-steel-200);
  color: var(--color-steel-800);
  border: 1px solid var(--color-steel-300);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-secondary:hover {
  background-color: var(--color-steel-100);
  color: var(--color-steel-900);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:disabled {
  background-color: var(--color-steel-100);
  color: var(--color-steel-400);
  border-color: var(--color-steel-200);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ==========================================
   HERO BANNER (APM & MSC STYLES)
   ========================================== */
.hero {
  position: relative;
  min-height: 80vh;
  background-image: linear-gradient(to right, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.4) 100%), url('../images/slider-1.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  color: #fff;
  padding: 28px 0 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.hero-text-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 12px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(13, 148, 136, 0.15);
  border: 1px solid var(--color-teal-500);
  padding: 6px 18px;
  border-radius: 50px;
  color: var(--color-teal-400);
  font-weight: 700;
  font-size: 0.8rem;
  margin-bottom: 12px;
  backdrop-filter: blur(4px);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-title {
  /* Titolo piu' contenuto: lascia spazio alla console e-Services (tab Pay
     Invoice / Track Shipment e relativi campi) senza doverla cercare
     scrollando. */
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.3px;
  margin-bottom: 10px;
  color: var(--color-steel-200);
}

.hero-title span {
  color: var(--color-teal-400);
}

/* Titolo dell'hero su UNA RIGA SOLA da tablet in su.
   Al massimo della clamp il titolo misura ~28,4em, cioe' ~840px a 1.85rem: nel
   blocco da 800px non ci stava e andava a capo. Qui il blocco si allarga a
   1000px (dentro i 1232px utili del .container) e nowrap impedisce comunque il
   ritorno a capo, con ~160px di margine anche nel caso peggiore.
   Sotto i 992px la regola non vale: il font scenderebbe sotto il minimo della
   clamp e il titolo sborderebbe in orizzontale, quindi su telefono e tablet
   stretto continua ad andare a capo normalmente. */
@media (min-width: 992px) {
  .hero-text-content {
    max-width: 1000px;
  }

  .hero-title {
    white-space: nowrap;
  }
}

.hero-description {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--color-steel-200);
  max-width: 650px;
  margin: 0 auto;
}

/* ==========================================
   CENTRAL E-SERVICES CONSOLE (MSC-inspired)
   ========================================== */
.console-box {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  /* Larghezza al 60% della pagina (viewport): esce dal vincolo del .container
     (max 1280px) e resta centrata sul viewport, senza transform per non spostare
     i popup della griglia DevExpress. */
  width: 60vw;
  max-width: 60vw;
  min-width: 0; /* impedisce che contenuti larghi (griglia) allarghino il box */
  margin-left: calc(50% - 30vw);
  margin-right: 0;
  border: 1px solid var(--color-steel-200);
}

.console-tabs {
  display: flex;
  background: var(--color-steel-100);
  border-bottom: 1px solid var(--color-steel-200);
}

.console-tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--color-steel-600);
  font-weight: 700;
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.95rem;
  border-right: 1px solid var(--color-steel-200);
  transition: var(--transition-fast);
}

.console-tab:last-of-type {
  border-right: none;
}

.console-tab svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.console-tab:hover {
  background-color: var(--color-steel-50);
  color: var(--color-steel-900);
}

.console-tab.active {
  background-color: #fff;
  color: var(--color-teal-700);
  border-bottom: 3px solid var(--color-teal-600);
}

.console-body {
  padding: 24px;
  color: var(--color-steel-900);
  /* Contenuti piu' larghi del box (es. griglia Vessel Schedules) scorrono
     internamente invece di essere tagliati: il box resta fisso al 60%. */
  overflow-x: auto;
}

.console-pane {
  display: none;
}

.console-pane.active {
  display: block;
  animation: fadeIn var(--transition-normal);
}

.console-form-row {
  display: flex;
  gap: 16px;
  align-items: flex-end;
}

@media (max-width: 768px) {
  .console-form-row {
    flex-direction: column;
    align-items: stretch;
  }
}

.console-input-group {
  flex: 1;
}

.console-input-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-steel-600);
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.console-input-box {
  position: relative;
  display: flex;
  align-items: center;
}

.console-input-box svg {
  position: absolute;
  left: 16px;
  width: 18px;
  height: 18px;
  fill: var(--color-steel-400);
}

.console-input-box input, .console-input-box select {
  width: 100%;
  border: 1px solid var(--color-steel-200);
  background-color: var(--color-steel-50);
  border-radius: var(--radius-sm);
  color: var(--color-steel-900);
  padding: 14px 16px 14px 44px;
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.console-input-box input:focus, .console-input-box select:focus {
  border-color: var(--color-teal-600);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.console-btn {
  background-color: var(--color-teal-600);
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.console-btn:hover {
  background-color: var(--color-teal-700);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

.console-note {
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--color-steel-600);
}

.console-note a {
  color: var(--color-teal-600);
  font-weight: 600;
  text-decoration: underline;
}

/* ==========================================
   LIVE OPERATIONAL TILES
   ========================================== */
.live-ops-section {
  padding: 80px 0;
  background-color: var(--color-steel-100);
}

.section-title-box {
  text-align: center;
  margin-bottom: 48px;
}

.section-tag {
  display: inline-block;
  background-color: var(--color-teal-100);
  color: var(--color-teal-700);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--color-steel-600);
  max-width: 600px;
  margin: 0 auto;
}

.ops-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 28px;
  border: 1px solid var(--color-steel-200);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ops-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-teal-400);
}

.ops-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.ops-card-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.ops-status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
}

.ops-status-badge.flowing {
  background-color: #ecfdf5;
  color: var(--color-success);
}

.ops-status-badge.warning {
  background-color: #fffbeb;
  color: var(--color-warning);
}

.ops-status-badge.danger {
  background-color: #fef2f2;
  color: var(--color-danger);
}

.ops-status-badge .indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
}

.ops-status-badge.flowing .indicator-dot {
  animation: pulse 1.5s infinite;
}

.ops-metric {
  font-size: 2.75rem;
  font-weight: 800;
  font-family: var(--font-headings);
  color: var(--color-steel-900);
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.ops-metric span {
  font-size: 1.05rem;
  color: var(--color-steel-600);
  font-weight: 500;
}

.ops-card-desc {
  font-size: 0.88rem;
  color: var(--color-steel-600);
  margin-bottom: 16px;
}

.ops-card-footer {
  padding-top: 16px;
  border-top: 1px solid var(--color-steel-100);
  font-size: 0.8rem;
  color: var(--color-steel-600);
  display: flex;
  justify-content: space-between;
}

/* ==========================================
   PORTAL DASHBOARD PAGE (e-services.html)
   ========================================== */
.portal-layout {
  padding: 60px 0;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
}

@media (max-width: 968px) {
  .portal-layout {
    grid-template-columns: 1fr;
  }
}

.portal-nav {
  background-color: #fff;
  border: 1px solid var(--color-steel-200);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  height: fit-content;
  position: sticky;
  top: 104px;
}

/* Sticky solo nel layout a due colonne del desktop, dove la sidebar sta di fianco
   al pannello e scorre insieme a lui. In colonna singola (<= 968px) la sidebar sta
   SOPRA i pannelli ed e' alta ~1300px, molto piu' del viewport: da sticky si
   incolla e, essendo posizionata, viene disegnata SOPRA il pannello, che resta
   nascosto sotto l'elenco dei servizi. Era questo a far sembrare che i link del
   menu e-Services (es. Step Down) non facessero nulla su telefono.
   NB: deve stare DOPO la regola qui sopra — stessa specificita', vince l'ultima:
   dentro il @media (max-width: 968px) piu' in alto non avrebbe alcun effetto. */
@media (max-width: 968px) {
  .portal-nav {
    position: static;
    top: auto;
  }
}

.portal-nav-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-steel-400);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-steel-100);
  margin-bottom: 8px;
}

.portal-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--color-steel-700);
  cursor: pointer;
  transition: var(--transition-fast);
}

.portal-nav-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.portal-nav-link:hover {
  background-color: var(--color-steel-50);
  color: var(--color-teal-600);
}

.portal-nav-link.active {
  background-color: var(--color-teal-50);
  color: var(--color-teal-700);
}

.portal-panel-box {
  background-color: #fff;
  border: 1px solid var(--color-steel-200);
  border-radius: var(--radius-md);
  padding: 36px;
  box-shadow: var(--shadow-sm);
  display: none;
  animation: fadeIn var(--transition-normal);
}

.portal-panel-box.active {
  display: block;
}

/* Pannello "Vessel Schedules & Arrivals": sfonda il container verso destra per
   dare piu' larghezza alla griglia. Sotto i 1280px il container e' gia' a tutta
   larghezza, quindi min() azzera il margine negativo e non si crea overflow. */
.portal-panel-box.panel-wide {
  margin-right: min(0px, calc(672px - 50vw));
}

/* Senza min-width:0 la colonna 1fr si allarga sul contenuto del pannello e il
   margine negativo verrebbe tagliato dal body (overflow-x: clip). Limitato con
   :has() al solo pannello "wide", cosi gli altri pannelli restano come sono. */
.portal-panels-container:has(> .panel-wide.active) {
  min-width: 0;
}

/* Griglia Vessel Schedules: font piu' piccolo e intestazioni su una riga sola.
   Selettori con "table." per vincere su .invoice-sheet-table th/td, definito
   piu' avanti nel foglio. */
table.vessel-schedule-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0;
  font-size: 0.75rem;
}

table.vessel-schedule-table th {
  padding: 8px 9px;
  font-size: 0.7rem;
  letter-spacing: 0;
  white-space: nowrap;
}

table.vessel-schedule-table td {
  padding: 8px 9px;
  font-size: 0.75rem;
  border-bottom: none;
}

.panel-header-box {
  border-bottom: 2px solid var(--color-steel-100);
  padding-bottom: 16px;
  margin-bottom: 28px;
}

.panel-header-title {
  font-size: 1.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
}

.panel-header-title svg {
  width: 28px;
  height: 28px;
  fill: var(--color-teal-600);
}

.panel-header-desc {
  font-size: 0.95rem;
  color: var(--color-steel-600);
  margin-top: 6px;
}

/* ==========================================
   e-INVOICE GENERATOR & PRINTER (Fattura)
   ========================================== */
.invoice-container {
  margin-top: 32px;
  border: 2px dashed var(--color-steel-200);
  border-radius: var(--radius-md);
  padding: 24px;
  background-color: var(--color-steel-50);
}

.invoice-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--color-steel-400);
  padding: 60px 24px;
  text-align: center;
}

.invoice-empty svg {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  fill: currentColor;
}

.invoice-sheet-box {
  background-color: #fff;
  border: 1px solid var(--color-steel-200);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  max-width: 800px;
  margin: 0 auto;
  color: var(--color-steel-900);
}

.invoice-sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid var(--color-steel-200);
  padding-bottom: 24px;
  margin-bottom: 24px;
}

.invoice-sheet-logo img {
  height: 44px;
}

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

.invoice-sheet-meta h1 {
  font-size: 2rem;
  color: var(--color-steel-600);
  letter-spacing: 1px;
}

.invoice-sheet-meta p {
  font-size: 0.9rem;
  color: var(--color-steel-600);
}

.invoice-sheet-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 32px;
  font-size: 0.9rem;
}

.invoice-sheet-details h4 {
  color: var(--color-steel-600);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

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

.invoice-sheet-table th {
  background-color: var(--color-steel-100);
  color: var(--color-steel-700);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 2px solid var(--color-steel-200);
}

.invoice-sheet-table td {
  padding: 16px;
  border-bottom: 1px solid var(--color-steel-200);
  font-size: 0.9rem;
}

.invoice-sheet-table th.amount, .invoice-sheet-table td.amount {
  text-align: right;
}

.invoice-sheet-summary {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 32px;
}

.sheet-summary-card {
  width: 300px;
}

.sheet-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.9rem;
}

.sheet-summary-row.total {
  border-top: 2px solid var(--color-steel-200);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-teal-700);
  padding-top: 12px;
}

.invoice-sheet-actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 24px;
  max-width: 800px;
  margin: 24px auto 0;
}

/* ==========================================
   INTERACTIVE PAYMENT MODAL (Credit Card)
   ========================================== */
.pay-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.pay-modal-overlay.active {
  display: flex;
}

.pay-modal-box {
  background-color: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 500px;
  border: 1px solid var(--color-steel-200);
  overflow: hidden;
  animation: modalScale 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pay-modal-header {
  background-color: var(--color-steel-900);
  color: #fff;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.pay-modal-body {
  padding: 24px;
}

/* Card Mockup */
.payment-card-scene {
  perspective: 1000px;
  margin: 0 auto 24px;
  width: 320px;
  height: 190px;
}

.payment-card-object {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform var(--transition-slow);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}

.payment-card-object.flipped {
  transform: rotateY(180deg);
}

.payment-card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  padding: 20px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.payment-card-face.front {
  background: linear-gradient(135deg, var(--color-teal-700) 0%, var(--color-steel-900) 100%);
}

.payment-card-face.back {
  background: linear-gradient(135deg, var(--color-steel-900) 0%, var(--color-teal-700) 100%);
  transform: rotateY(180deg);
  padding: 20px 0;
}

.cc-chip {
  width: 40px;
  height: 30px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-radius: 6px;
}

.cc-num {
  font-size: 1.25rem;
  letter-spacing: 3px;
  font-family: monospace;
  margin: 16px 0;
}

.cc-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  text-transform: uppercase;
  opacity: 0.8;
}

.cc-mag-strip {
  width: 100%;
  height: 40px;
  background-color: #000;
  margin-top: 10px;
}

.cc-cvv-strip {
  margin: 20px;
  background-color: #fff;
  color: #000;
  height: 32px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 10px;
  font-family: monospace;
  font-weight: 700;
  border-radius: 4px;
}

.cc-cvv-strip span {
  font-size: 0.9rem;
}

/* Modal Status screens */
.pay-loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 0;
}

.pay-success-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 30px 0;
}

/* ==========================================
   CARGO TRACKER STEPPER (Status Bar)
   ========================================== */
.stepper-box {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin: 40px 0 20px;
}

.stepper-box::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: var(--color-steel-200);
  z-index: 1;
}

.stepper-progress-bar {
  position: absolute;
  top: 15px;
  left: 0;
  height: 4px;
  background-color: var(--color-teal-600);
  z-index: 2;
  transition: width var(--transition-slow);
}

.stepper-node {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 120px;
}

.stepper-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: #fff;
  border: 4px solid var(--color-steel-200);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-steel-400);
  transition: var(--transition-normal);
}

.stepper-node.completed .stepper-circle {
  border-color: var(--color-teal-600);
  background-color: var(--color-teal-600);
  color: #fff;
}

.stepper-node.active .stepper-circle {
  border-color: var(--color-teal-500);
  background-color: #fff;
  color: var(--color-teal-700);
  box-shadow: 0 0 10px rgba(13, 148, 136, 0.4);
}

.stepper-label {
  margin-top: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-steel-600);
}

.stepper-node.completed .stepper-label, .stepper-node.active .stepper-label {
  color: var(--color-steel-900);
  font-weight: 700;
}

.stepper-time {
  font-size: 0.65rem;
  color: var(--color-steel-400);
  margin-top: 2px;
}

/* ==========================================
   BARGE CALCULATOR & CUSTOMS CALENDAR
   ========================================== */
.barge-summary {
  background-color: var(--color-steel-50);
  border: 1px solid var(--color-steel-200);
  border-radius: var(--radius-sm);
  padding: 24px;
  margin-top: 24px;
}

.cal-wrapper {
  border: 1px solid var(--color-steel-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: #fff;
  margin-top: 16px;
}

.cal-header {
  background-color: var(--color-steel-900);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  font-weight: 600;
}

.cal-grid-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--color-steel-100);
}

.cal-day-header {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-steel-400);
  text-align: center;
  padding: 8px 0;
  background-color: var(--color-steel-50);
}

.cal-grid-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background-color: var(--color-steel-100);
}

.cal-day-node {
  background-color: #fff;
  aspect-ratio: 1.25;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.cal-day-node:hover:not(.empty) {
  background-color: var(--color-teal-50);
}

.cal-day-node.empty {
  background-color: var(--color-steel-50);
  cursor: default;
}

.cal-day-num {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-steel-700);
}

.cal-day-slots {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--color-success);
  text-align: right;
}

.cal-day-node.booked .cal-day-slots {
  color: var(--color-danger);
}

.cal-day-node.selected {
  background-color: var(--color-teal-600) !important;
}

.cal-day-node.selected .cal-day-num,
.cal-day-node.selected .cal-day-slots {
  color: #fff !important;
}

/* ==========================================
   TERMINAL OPERATIONS PAGE & INFRASTRUCTURE
   ========================================== */
.terminal-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr;
  gap: 32px;
  margin-top: 40px;
}

@media (max-width: 968px) {
  .terminal-grid {
    grid-template-columns: 1fr;
  }
}

.terminal-specs-table {
  background: #fff;
  border: 1px solid var(--color-steel-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.terminal-specs-row {
  display: flex;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--color-steel-100);
}

.terminal-specs-row:last-of-type {
  border-bottom: none;
}

.specs-row-label {
  font-weight: 600;
  color: var(--color-steel-700);
}

.specs-row-value {
  font-weight: 700;
  color: var(--color-steel-900);
}

.portlet-card {
  background-color: #fff;
  border: 1px solid var(--color-steel-200);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: var(--transition-normal);
}

.portlet-card:hover {
  border-color: var(--color-teal-500);
  box-shadow: var(--shadow-md);
}

.portlet-icon-box {
  background-color: var(--color-teal-50);
  color: var(--color-teal-600);
  padding: 12px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.portlet-icon-box svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.portlet-content-box h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.portlet-content-box p {
  font-size: 0.9rem;
  color: var(--color-steel-600);
}

/* ==========================================
   ABOUT US TIMELINE & CARBON CHART
   ========================================== */
.heritage-container {
  padding: 80px 0;
  background-image: linear-gradient(135deg, var(--color-steel-950) 0%, var(--color-steel-900) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.heritage-timeline {
  position: relative;
  max-width: 800px;
  margin: 60px auto 0;
}

.heritage-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background-color: var(--color-steel-700);
  transform: translateX(-50%);
}

.timeline-node-card {
  margin-bottom: 40px;
  position: relative;
  width: 50%;
  padding: 0 40px;
}

.timeline-node-card.left {
  left: 0;
  text-align: right;
}

.timeline-node-card.right {
  left: 50%;
  text-align: left;
}

.timeline-node-dot {
  width: 16px;
  height: 16px;
  background-color: var(--color-teal-500);
  border: 4px solid var(--color-steel-900);
  border-radius: 50%;
  position: absolute;
  top: 6px;
  z-index: 5;
}

.timeline-node-card.left .timeline-node-dot {
  right: -8px;
}

.timeline-node-card.right .timeline-node-dot {
  left: -8px;
}

.timeline-node-year {
  font-family: var(--font-headings);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-teal-400);
  margin-bottom: 6px;
}

.timeline-node-desc {
  color: var(--color-steel-200);
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .heritage-timeline::before {
    left: 20px;
  }
  .timeline-node-card {
    width: 100%;
    left: 0 !important;
    padding: 0 0 0 40px;
    text-align: left !important;
  }
  .timeline-node-card.left .timeline-node-dot,
  .timeline-node-card.right .timeline-node-dot {
    left: 12px;
  }
}

.carbon-comparison-card {
  background-color: var(--color-steel-50);
  border: 1px solid var(--color-steel-200);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.carbon-chart-bar-wrap {
  margin-bottom: 24px;
}

.carbon-bar-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  margin-bottom: 6px;
  font-weight: 700;
  color: var(--color-steel-600);
}

.carbon-bar-fill-track {
  height: 14px;
  background:#e2e8f0;
  border-radius: 50px;
  overflow:hidden;
}

.carbon-bar-fill-amount {
  height: 100%;
}

/* ==========================================
   FOOTER
   ========================================== */
footer {
  background-color: var(--color-steel-950);
  color: var(--color-steel-400);
  padding: 60px 0 20px;
  border-top: 1px solid var(--color-steel-900);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 48px;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.footer-brand-box img {
  height: 52px;
  margin-bottom: 16px;
}

.footer-brand-box p {
  margin-bottom: 24px;
  line-height: 1.5;
}

.footer-social-wrapper {
  display: flex;
  gap: 12px;
}

.footer-social-link {
  background-color: rgba(255, 255, 255, 0.05);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  color: #fff;
  transition: var(--transition-fast);
}

.footer-social-link:hover {
  background-color: var(--color-teal-600);
  transform: translateY(-2px);
}

.footer-column h4 {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.footer-column ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-column a:hover {
  color: var(--color-teal-400);
  padding-left: 4px;
}

.footer-bottom-box {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

@media (max-width: 600px) {
  .footer-bottom-box {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

/* ==========================================
   PORTAL HERO & FORMS FORMATTING
   ========================================== */
.portal-hero {
  padding: 100px 0;
  background-color: var(--color-steel-900);
  background-size: cover;
  background-position: center;
  color: #fff;
  text-align: center;
  position: relative;
  border-bottom: 4px solid var(--color-teal-600);
}

.portal-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: #fff;
  font-family: var(--font-headings);
  letter-spacing: -1px;
}

.portal-desc {
  font-size: 1.15rem;
  color: var(--color-steel-200);
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.6;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-steel-600);
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  border: 1px solid var(--color-steel-200);
  background-color: var(--color-steel-50);
  border-radius: var(--radius-sm);
  color: var(--color-steel-900);
  padding: 14px 16px;
  font-size: 0.95rem;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.form-control:focus {
  border-color: var(--color-teal-600);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

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

/* ==========================================
   PRINT INVOICE STYLING
   ========================================== */
@media print {
  body * {
    visibility: hidden;
  }
  .invoice-sheet-box, .invoice-sheet-box * {
    visibility: visible;
  }
  .invoice-sheet-box {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    border: none;
    box-shadow: none;
    padding: 0;
  }
}

/* ==========================================
   RESERVED AREA: DASHBOARD & BOOKING DETAILS
   ========================================== */
.dashboard-user-bar {
  background-color: var(--color-steel-900);
  border-bottom: 1px solid var(--color-steel-800);
  color: var(--color-steel-200);
  padding: 10px 0;
  font-size: 0.85rem;
}

.user-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-avatar-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-success);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--color-success);
}

.user-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.dashboard-nav-link {
  color: var(--color-teal-400);
  font-weight: 600;
}

.dashboard-nav-link:hover {
  color: var(--color-teal-100);
}

.btn-logout {
  background-color: transparent;
  color: var(--color-steel-400);
  border: 1px solid var(--color-steel-700);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: var(--transition-fast);
}

.btn-logout:hover {
  color: #fff;
  border-color: #fff;
  background-color: var(--color-steel-800);
}

.dashboard-workspace {
  padding-top: 24px;
  padding-bottom: 60px;
}

.dashboard-breadcrumbs {
  font-size: 0.82rem;
  color: var(--color-steel-600);
  margin-bottom: 24px;
}

.dashboard-breadcrumbs a {
  color: var(--color-steel-700);
  font-weight: 500;
}

.dashboard-breadcrumbs a:hover {
  color: var(--color-teal-600);
}

.dashboard-alert-banner {
  background-color: #fef2f2;
  border: 1px solid #fee2e2;
  color: #991b1b;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
}

.dashboard-alert-banner .alert-icon {
  width: 24px;
  height: 24px;
  fill: #b91c1c;
  flex-shrink: 0;
}

.dashboard-alert-banner .alert-message {
  font-size: 0.88rem;
  line-height: 1.5;
  flex-grow: 1;
}

.dashboard-alert-banner .alert-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #991b1b;
  cursor: pointer;
  opacity: 0.7;
  transition: var(--transition-fast);
}

.dashboard-alert-banner .alert-close-btn:hover {
  opacity: 1;
}

/* Variante "success": messaggio di conferma in verde.
   Il default del banner è rosso (errori/notice); aggiungendo la classe .success
   diventa verde, così solo i messaggi di errore restano rossi. */
.dashboard-alert-banner.success {
  background-color: #f0fdf4;
  border-color: #dcfce7;
  color: #166534;
}

.dashboard-alert-banner.success .alert-icon {
  fill: #16a34a;
}

.dashboard-alert-banner.success .alert-close-btn {
  color: #166534;
}

.booking-main-card {
  background: linear-gradient(135deg, var(--color-steel-900) 0%, #064e3b 100%);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  box-shadow: var(--shadow-lg);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.booking-card-primary {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.booking-tag-badge {
  background-color: rgba(255, 255, 255, 0.15);
  color: var(--color-teal-100);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 1px;
}

.booking-number {
  font-family: var(--font-headings);
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -1px;
}

/* Riquadro "Access Privileges" nell'header della Company Dashboard:
   elenco dei privilegi (DESCRIPTION_ROLLS) restituiti dal login, uno per riga. */
.dashboard-access-box {
  align-self: stretch;
  min-width: 200px;
  max-width: 320px;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.dashboard-access-title {
  color: var(--color-teal-100);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.dashboard-access-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dashboard-access-list li {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  padding-left: 14px;
  position: relative;
}

.dashboard-access-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-teal-100);
}

.status-indicator-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-xl);
  font-size: 0.85rem;
  font-weight: 700;
}

.status-indicator-badge.success {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-success);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

.booking-actions-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-dashboard-action {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.btn-dashboard-action svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.btn-dashboard-action.btn-outline {
  background-color: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-dashboard-action.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

.btn-dashboard-action.btn-solid {
  background-color: var(--color-teal-500);
  color: #fff;
  border: 2px solid var(--color-teal-500);
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.btn-dashboard-action.btn-solid:hover {
  background-color: var(--color-teal-400);
  border-color: var(--color-teal-400);
  transform: translateY(-2px);
}

.dashboard-info-card {
  background-color: #fff;
  border: 1px solid var(--color-steel-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition-normal);
}

.dashboard-info-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-steel-300);
}

.dashboard-info-card .card-header {
  background-color: var(--color-steel-50);
  border-bottom: 1px solid var(--color-steel-200);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.dashboard-info-card .card-header svg {
  width: 20px;
  height: 20px;
  fill: var(--color-teal-700);
}

.dashboard-info-card .card-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-steel-900);
}

.dashboard-info-card .card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  border-bottom: 1px dashed var(--color-steel-100);
  padding-bottom: 10px;
}

.info-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.info-label {
  color: var(--color-steel-600);
  font-weight: 500;
}

.info-value {
  color: var(--color-steel-900);
  font-weight: 700;
  text-align: right;
}

.info-value.highlight {
  color: var(--color-teal-700);
}

.badge-freight {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.badge-freight.collect {
  background-color: #fef3c7;
  color: #d97706;
}

.parties-card .party-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-steel-900);
  margin-bottom: 12px;
}

.dashboard-table-section {
  background-color: transparent;
}

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

.dashboard-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.dashboard-data-table th {
  background-color: var(--color-steel-900);
  color: #fff;
  font-weight: 700;
  padding: 16px 20px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dashboard-data-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-steel-200);
  color: var(--color-steel-800);
}

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

.dashboard-data-table tr.delivered-row {
  background-color: rgba(16, 185, 129, 0.02);
}

.dashboard-data-table tr:hover {
  background-color: var(--color-steel-50);
}

.muted-value {
  color: var(--color-steel-400);
  font-style: italic;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  text-transform: capitalize;
}

.badge-status.pending {
  background-color: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.badge-status.success {
  background-color: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

/* ==========================================
   GRID OVERRIDES: ROW SELECTION & PAGINATION
   ========================================== */

/* 1. Row Selection Overrides - Uniform Light Green Background for the ENTIRE row */
tr.selected td,
tr.active td,
tr.table-active td,
tr.dx-selection td,
tr.dx-row-focused td,
.dx-selection tr td,
.dx-row-focused tr td,
.dx-selection tr.dx-row-alt td,
.dx-row-focused tr.dx-row-alt td,
.k-state-selected td,
.selected-row td,
tr.selected:nth-child(even) td,
tr.selected:nth-child(odd) td,
tr.active:nth-child(even) td,
tr.active:nth-child(odd) td {
  background-color: #ecfdf5 !important; /* Lighter shade of green (Mint/Emerald 50) */
  color: #064e3b !important; /* Dark forest green for optimal text readability */
}

/* Override and remove any solid dark green on the first column/command cell */
tr.selected td.dx-command-edit,
tr.selected td:first-child,
tr.active td:first-child,
tr.dx-selection td:first-child,
tr.dx-selection td.dx-command-edit,
tr.dx-row-focused td:first-child,
tr.dx-row-focused td.dx-command-edit,
.dx-selection tr td:first-child,
.dx-row-focused tr td:first-child {
  background-color: #ecfdf5 !important;
  color: #064e3b !important;
}

/* Links and content inside selected rows - Green text and no blue */
tr.selected td a,
tr.active td a,
tr.table-active td a,
tr.dx-selection td a,
tr.dx-row-focused td a,
.dx-selection tr td a,
.dx-row-focused tr td a,
tr.selected td span,
tr.dx-selection td span,
tr.dx-row-focused td span {
  color: #047857 !important; /* e-Services Portal Green */
  font-weight: 700 !important;
}

/* Ensure icons/text in command cells are also dark green in selected rows */
tr.selected td.dx-command-edit *,
tr.selected td:first-child *,
tr.dx-selection td.dx-command-edit *,
tr.dx-row-focused td.dx-command-edit *,
.dx-selection tr td:first-child *,
.dx-row-focused tr td:first-child * {
  color: #064e3b !important;
  fill: #064e3b !important;
}

/* 3. Pagination Overrides */
.pagination .active a,
.pagination .active span,
.page-item.active .page-link,
.dx-page-selected,
.k-state-selected.k-page-link,
.pagination-active,
.page-link-active {
  background-color: #047857 !important;
  border-color: #047857 !important;
  color: #fff !important;
}

/* Focus and hover states for active pages */
.page-item.active .page-link:hover,
.dx-page-selected:hover {
  background-color: #065f46 !important;
  border-color: #065f46 !important;
}

/* ==========================================
   RESERVED AREA SIDEBAR LAYOUT
   ========================================== */
.dashboard-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: start;
  margin-top: 24px;
  transition: grid-template-columns 0.3s ease, gap 0.3s ease;
}

.dashboard-layout.sidebar-collapsed {
  grid-template-columns: 1fr;
  gap: 0px;
}

.dashboard-layout.sidebar-collapsed .dashboard-sidebar {
  display: none !important;
}

.sidebar-toggle-btn {
  background-color: var(--color-steel-50);
  border: 1px solid var(--color-steel-200);
  color: var(--color-steel-800);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  transition: var(--transition-fast);
}

.sidebar-toggle-btn:hover {
  background-color: var(--color-steel-100);
  color: var(--color-teal-700);
}

@media (max-width: 968px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.dashboard-sidebar {
  background-color: #fff;
  border: 1px solid var(--color-steel-200);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 104px;
  z-index: 10;
}

.dashboard-sidebar-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-steel-400);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 12px 14px 6px 14px;
  border-bottom: 1px solid var(--color-steel-100);
  margin-bottom: 6px;
  margin-top: 16px;
}

.dashboard-sidebar-title:first-of-type {
  margin-top: 0;
}

.dashboard-sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--color-steel-700);
  font-size: 0.88rem;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.dashboard-sidebar-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.dashboard-sidebar-link:hover {
  background-color: var(--color-steel-50);
  color: var(--color-teal-600);
}

.dashboard-sidebar-link.active {
  background-color: var(--color-teal-50);
  color: var(--color-teal-700);
  font-weight: 700;
}

/* User Profile Widget in Sidebar */
.sidebar-user-widget {
  background-color: var(--color-steel-50);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 18px;
  border: 1px solid var(--color-steel-100);
}

.sidebar-user-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-steel-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 0.72rem;
  color: var(--color-teal-700);
  font-weight: 600;
  margin-top: 4px;
}

/* ==========================================
   NAVBAR MEGA MENU DROPDOWN
   ========================================== */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #fff;
  min-width: 580px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--color-steel-200);
  border-radius: var(--radius-md);
  padding: 24px;
  z-index: 1000;
  margin-top: 12px;
}

.dropdown-content-menu::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 16px;
  height: 16px;
  background-color: #fff;
  border-left: 1px solid var(--color-steel-200);
  border-top: 1px solid var(--color-steel-200);
}

.dropdown-content-menu.show {
  display: block;
}

.dropdown-column-wrapper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.dropdown-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dropdown-col-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-steel-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--color-steel-100);
  padding-bottom: 4px;
}

.dropdown-column a {
  font-size: 0.85rem;
  color: var(--color-steel-700);
  text-decoration: none;
  font-weight: 500;
  padding: 6px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  text-align: left;
}

.dropdown-column a:hover {
  background-color: var(--color-steel-50);
  color: var(--color-teal-700);
  padding-left: 12px;
}

/* ==========================================
   MOBILE HAMBURGER MENU RESPONSIVE STYLES
   ========================================== */
@media (max-width: 900px) {
  .navbar {
    position: relative;
    padding: 0 16px;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 80px; /* Aligns right under the 80px header height */
    left: 0;
    width: 100%;
    background-color: #fff;
    border-bottom: 2px solid var(--color-steel-200);
    padding: 24px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    gap: 16px;
    align-items: flex-start;
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-dropdown {
    width: 100%;
  }

  .dropdown-trigger {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 8px 0;
  }

  .dropdown-content-menu {
    position: static;
    transform: none;
    min-width: auto;
    width: 100%;
    box-shadow: none;
    border: none;
    padding: 12px 0 0 12px;
    margin-top: 4px;
    background-color: transparent;
  }

  .dropdown-content-menu::before {
    display: none; /* Hide arrow on mobile */
  }

  .dropdown-column-wrapper {
    grid-template-columns: 1fr; /* Single column stack */
    gap: 16px;
  }

  .dropdown-column {
    gap: 6px;
  }

  .dropdown-col-title {
    font-size: 0.7rem;
    margin-bottom: 4px;
  }

  .dropdown-column a {
    font-size: 0.82rem;
    padding: 6px 0;
  }

  .dropdown-column a:hover {
    padding-left: 8px;
    background-color: transparent;
  }

  /* Adjust actions bar for mobile spacing */
  .nav-actions {
    margin-left: auto;
    margin-right: 16px;
    gap: 8px;
  }

  .nav-btn-outline, .nav-btn-solid {
    padding: 8px 16px;
    font-size: 0.8rem;
  }
}


.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: var(--color-steel-800);
    line-height: 1;
}

@media (max-width: 900px) {
    header .navbar {
        position: relative;
        /* Altezza libera al posto degli 84px fissi: l'header si adatta al
           contenuto invece di lasciarlo traboccare sulla sezione sotto. */
        height: auto;
        min-height: 64px;
        padding-top: 8px;
        padding-bottom: 8px;
        gap: 8px;
    }

    .mobile-nav-toggle {
        display: inline-block;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-start;
        background: #fff;
        border-top: 1px solid var(--color-steel-200);
        box-shadow: var(--shadow-md);
        padding: 12px 20px;
        gap: 8px;
        z-index: 999;
    }

        .nav-menu.open {
            display: flex;
        }

    /* Header ad utente loggato: "Logged in as <email>" e' di gran lunga
       l'elemento piu' largo della navbar e su 360px spingeva l'hamburger
       fuori dallo schermo. L'indirizzo resta visibile nella dashboard. */
    .nav-user {
        display: none;
    }

    .nav-logo-img {
        height: 40px;
    }

    /* I pulsanti restano su una riga sola: andando a capo sforavano
       l'altezza dell'header e finivano sopra la sezione successiva. */
    .nav-actions .nav-btn-outline,
    .nav-actions .nav-btn-solid,
    .nav-actions .btn-secondary {
        white-space: nowrap;
        padding: 8px 12px;
        font-size: 0.78rem;
    }

    /* .nav-actions portava un margin-right: 16px che, sommato al padding
       della navbar, spingeva l'hamburger appena oltre il bordo destro. */
    .nav-actions {
        margin-right: 0;
    }
}

/* Tablet e schermi stretti (fino a 1200px): il menu esteso convive ancora con
   le azioni e la barra va in sofferenza. Due accorgimenti:
   - "Pay Invoice" esce dall'header: punta a /e-services?panel=invoice, la
     stessa identica destinazione della voce "e-Invoice & Settle Payment" del
     menu e-Services, quindi non si perde nulla;
   - l'email, che e' nowrap e lunga a piacere, viene troncata con l'ellissi.
   Senza questi due, a utente loggato la barra sforava e il contenuto in
   eccesso finiva sopra la sezione successiva. */
@media (max-width: 1200px) {
    .nav-actions .nav-btn-outline {
        display: none;
    }

    .nav-user {
        max-width: 160px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-menu {
        gap: 24px;
    }

    /* Le voci restano su una riga: andando a capo dentro l'header rendevano
       la barra illeggibile. */
    .nav-menu > a,
    .nav-dropdown > a,
    .nav-actions .nav-btn-solid,
    .nav-actions .btn-secondary {
        white-space: nowrap;
    }
}

/* Telefoni: logo piu' piccolo e azioni compatte, cosi' l'hamburger resta
   dentro il bordo destro anche a 320px. */
@media (max-width: 560px) {
    .nav-logo-img {
        height: 34px;
    }

    .nav-actions .nav-btn-solid,
    .nav-actions .btn-secondary {
        padding: 7px 10px;
        font-size: 0.72rem;
    }
}

/* Menu hamburger: scorrevole quando non ci sta tutto in altezza.
   .nav-menu e' position:absolute dentro l'header, che e' sticky: non allunga la
   pagina, quindi scorrendo il documento non si raggiungeva mai il suo fondo.
   Con il dropdown e-Services aperto l'elenco supera i 990px e su un telefono da
   812px veniva tagliato a "BROKER SETTINGS": Bank Settings, Company Registration,
   Container Sale, EPT e Tariff erano irraggiungibili.
   Ora il pannello si limita all'altezza utile e scorre al suo interno.
   - Il max-height qui e' un ripiego prudente: ptmlFitMobileNav in js/app.js
     sovrascrive con l'altezza utile esatta, che dipende da dove si trova la
     navbar in quel momento. A pagina in cima sopra l'header c'e' il ticker
     (37px), quindi il menu parte da 101px; scorrendo, l'header si incolla a
     top:0 e il menu parte da 65px. 116px = 80 (header di riferimento del
     layout) + 36 (ticker) copre il caso peggiore: senza JS il menu resta un po'
     piu' corto del necessario, ma non viene mai tagliato fuori schermo.
   - 100dvh e non 100vh: su mobile 100vh include la barra degli indirizzi, che
     all'apertura della pagina coprirebbe il fondo del menu. Prima la riga con
     100vh come ripiego per i browser che non conoscono dvh.
   - overscroll-behavior: contain evita che, arrivati in fondo all'elenco, lo
     scorrimento prosegua trascinando la pagina sotto.
   Deve stare DOPO gli altri blocchi che ridefiniscono .nav-menu (l'ultimo e' il
   @media max-width:900px piu' sopra): stessa specificita', vince l'ultima. */
@media (max-width: 900px) {
  .nav-menu.open {
    max-height: calc(100vh - 116px);
    max-height: calc(100dvh - 116px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
}
