* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.btn,
button,
input[type="button"],
input[type="submit"] {
  font-family: inherit;
  border-radius: 12px;
  transition: transform .15s ease, box-shadow .15s ease, background .2s ease;
}

.fixed-action {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 10;
}

.fixed-action .btn {
  box-shadow: 0 12px 28px rgba(15, 23, 42, .25);
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #3D96DA; 
  color: #0f172a;
  font-size: 16px;
}

.theme-primary {
  color: #3d96da;
}

.bg-primary {
  background: #3d96da;
}

.bg-accent {
  background: #f7d518;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-card {
  width: 440px;
  background: #fff;
  padding: 32px;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(61, 150, 218, .25);
  border: 1px solid rgba(61, 150, 218, .15);
}

.login-card .brand {
  flex-direction: column;
  gap: 8px;
  animation: fadeUp .4s ease;
}

.login-card .brand img {
  width: 250px;
  height: auto;
}

.login-card small {
  color: #3d96da;
  font-weight: 700;
  letter-spacing: .3px;
}

.login-card h2 {
  margin: 12px 0 16px;
}

.login-card .brand {
  justify-content: center;
  align-items: center;
}

.login-card h3 {
  margin: 12px 0 8px;
}

.full-width {
  width: 100%;
}

.password-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: center;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  gap: 18px;
  padding: 18px;
}

.sidebar {
  background: linear-gradient(180deg, #3d96da 0%, #2f78b1 100%);
  color: #fff;
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 20px 45px rgba(61, 150, 218, .35);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 36px);
  min-height: calc(100vh - 36px);
  width: 100%;
  max-width: 260px;
  position: sticky;
  top: 18px;
  align-self: start;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.sidebar .brand {
  width: 100%;
  justify-content: space-between;
}

.brand img {
  width: 200px;
  height: auto;
}

.brand strong {
  font-size: 1.2rem;
}

.brand small {
  color: rgba(255, 255, 255, .85);
  letter-spacing: .3px;
}

.user-code {
  margin-bottom: 16px;
  font-size: .9rem;
  color: rgba(255, 255, 255, .85);
}

.nav-link {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  color: rgba(255, 255, 255, .88);
  text-decoration: none;
  font-weight: 700;
}

.nav-link .nav-icn {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: rgba(255, 255, 255, .12);
  border-radius: 10px;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, .16);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15);
}

.sidebar-actions {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

.sidebar-btn {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .9);
  background: rgba(255, 255, 255, .1);
  text-decoration: none;
}

.sidebar-btn.logout {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .2);
  color: #fff;
}

.sidebar-btn.logout {
  background: #fff;
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, .12);
}

.sidebar-toggle {
  display: none;
  width: 46px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, .2);
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.sidebar-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #0f172a;
  border-radius: 999px;
}

.sidebar-toggle svg {
  width: 24px;
  height: 24px;
  fill: #0f172a;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  z-index: 10;
}

.main {
  background: #fff;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, .08);
  border: 1px solid rgba(15, 23, 42, .08);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.title {
  font-size: 1.5rem;
  font-weight: 700;
}

.subtitle {
  color: #64748b;
  font-size: 1rem;
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.wallet {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.wallet.inline {
  flex-direction: row;
  align-items: center;
  gap: 6px;
}

.wallet span {
  font-size: .9rem;
  color: #4f7fad;
}

.wallet strong {
  font-size: 1.2rem;
  color: #3d96da;
}

.plan-badge {
  background: #eef2ff;
  color: #312e81;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .85rem;
  border: 1px solid rgba(49, 46, 129, .15);
}

.btn {
  border: 1px solid rgba(61, 150, 218, .45);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
  background: #fff;
  color: #2f78b1;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn.primary {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  border: none;
  box-shadow: 0 10px 28px rgba(34, 197, 94, .28);
}

.btn.outline {
  background: #fff;
  color: #2f78b1;
}

.btn.ghost {
  background: #fff;
  color: #0f172a;
  border: 1px solid rgba(61, 150, 218, .25);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(61, 150, 218, .18);
}

.hidden {
  display: none !important;
}

.btn.compare-btn {
  padding: 10px 22px;
  min-width: 140px;
  height: 46px;
}

.compare-row {
  display: none;
  justify-content: flex-end;
  margin-top: 12px;
}

body[data-step="1"] .compare-row {
  display: flex;
}

.card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 20px;
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .05);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.title-sm {
  font-size: 1.1rem;
  font-weight: 700;
}

.muted {
  color: #fff;
  font-size: .95rem;
}

.section-title {
  grid-column: 1/-1;
  font-weight: 700;
  margin-top: 8px;
  color: #0f172a;
}

.title-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.title-icn {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, .06);
  border-radius: 10px;
  font-size: 16px;
}

.suggestions {
  margin-top: 6px;
  border: 1px solid rgba(15, 23, 42, .1);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
  display: none;
  max-height: 200px;
  overflow-y: auto;
}

.suggestion-item {
  padding: 10px 12px;
  cursor: pointer;
}

.suggestion-item:hover {
  background: rgba(37, 99, 235, .08);
}

.carrier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.carrier-card {
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #f8fbff;
}

.carrier-info {
  display: grid;
  gap: 4px;
}

.carrier-card .muted {
  font-size: .9rem;
}

.locker-addons {
  margin-top: 12px;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 20px;
  align-items: center;
}

.step {
  text-align: center;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, .2);
  color: #64748b;
  font-weight: 600;
  font-size: .9rem;
}

.step.active {
  background: linear-gradient(135deg, #22d3ee, #2563eb);
  color: #fff;
  border: none;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field.full {
  grid-column: 1/-1;
}

.field label {
  font-weight: 700;
  color: #0f172a;
  font-size: .98rem;
}

.field input,
.field select {
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 1rem;
  background: #f8fbff;
}

.actions-row {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
  flex-wrap: wrap;
}

.actions-row.end {
  justify-content: flex-end;
}

.actions-row.wrap {
  justify-content: flex-start;
}

.btn.small {
  padding: 6px 10px;
  font-size: .85rem;
}

.status-line {
  margin-top: 10px;
}

.actions-col {
  text-align: right;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(15, 23, 42, .12);
  background: #fff;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, color .15s ease;
  color: #0f172a;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.icon-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .12);
  border-color: rgba(37, 99, 235, .4);
  color: #2563eb;
}

.icon-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(15, 23, 42, .12);
}

.table-wrap {
  overflow: auto;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, .08);
}

.table-wrap table {
  width: 100%;
  min-width: 900px;
  border-collapse: separate;
  border-spacing: 0;
}

.table-wrap thead th {
  background: #eef3fc;
  padding: 12px;
  text-align: left;
  font-size: .95rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}

.table-wrap tbody td {
  padding: 12px;
  border-bottom: 1px solid rgba(15, 23, 42, .06);
  font-size: 1rem;
}

.table-wrap tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, .015);
}

.table-wrap .empty {
  text-align: center;
  color: #64748b;
  padding: 18px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.ok {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, .15);
}

.status-dot.ko {
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, .15);
}

.stepper-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stepper-bar .step {
  text-align: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(37, 99, 235, .18);
  background: #f8fbff;
  font-weight: 700;
  color: #0f172a;
}

.stepper-bar .step.active {
  background: linear-gradient(135deg, #22d3ee, #2563eb);
  color: #fff;
  border: none;
  box-shadow: 0 10px 25px rgba(37, 99, 235, .22);
}

.section-block {
  background: #f8fbff;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 16px;
  padding: 14px 14px 6px;
  margin-bottom: 14px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.orange {
  background: #f97316;
}

.dot.red {
  background: #ef4444;
}

.dot.blue {
  background: #2563eb;
}

.dot.green {
  background: #22c55e;
}

.pill-select {
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, .1);
  background: #fff;
  font-weight: 600;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.four-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.actions-row.end {
  justify-content: flex-end;
}

/* Modal ritiro */
.pickup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}

.pickup-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .12);
  width: min(720px, 96vw);
  max-height: min(88vh, 920px);
  padding: 16px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pickup-card .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.pickup-card .modal-body {
  display: grid;
  gap: 12px;
  overflow: hidden;
}

.pickup-card .pickup-results {
  overflow: auto;
  max-height: 70vh;
  padding-right: 4px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.pickup-card .pickup-item {
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: #f9fbff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
}

.pickup-card .pickup-item .title-sm {
  margin: 0;
}

.pickup-card .pickup-item .muted {
  font-size: .9rem;
}

.pickup-card .modal-footer {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.pickup-card .form-label {
  font-size: 13px;
  color: #465569;
}

.pickup-card .input {
  width: 100%;
}

.tariffe-list {
  display: grid;
  gap: 12px;
}

.tariff-card {
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  background: #fdfefe;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .05);
}

.tariff-card.disabled {
  opacity: 0.75;
}

.tariff-logo {
  width: 60px;
  height: 60px;
  background: #fff;
  border-radius: 12px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(15, 23, 42, .08);
  overflow: hidden;
}

.tariff-logo img {
  max-width: 48px;
  max-height: 48px;
  object-fit: contain;
}

.logo-pill {
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 700;
  color: #fff;
  display: inline-block;
}

.logo-brt {
  background: #e11d48;
}

.logo-poste {
  background: #facc15;
  color: #1f2937;
}

.logo-inpost {
  background: #fbbf24;
  color: #1f2937;
}

.logo-amazon {
  background: #111827;
}

.tariff-info {
  display: grid;
  gap: 4px;
}

.tariff-info .title-sm {
  margin: 0;
}

.tariff-info .muted {
  font-size: .9rem;
}

.tariff-price {
  text-align: right;
}

.tariff-price strong {
  font-size: 1.4rem;
  color: #0f172a;
}

.tariff-price .muted {
  font-size: .85rem;
}

.tariff-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.summary-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  align-items: start;
}

.summary-box {
  border: 1px solid rgba(15, 23, 42, .1);
  border-radius: 14px;
  padding: 14px;
  background: #f8fbff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
}

.summary-line,
.summary-total {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
}

.summary-total {
  font-size: 1.1rem;
  font-weight: 700;
  border-top: 1px solid rgba(15, 23, 42, .08);
  margin-top: 6px;
  padding-top: 10px;
}

.summary-block {
  display: grid;
  gap: 6px;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .35);
}

.modal-card {
  position: relative;
  background: #fff;
  width: min(420px, 90vw);
  margin: 0 auto;
  padding: 16px;
  border-radius: 14px;
  box-shadow: 0 18px 38px rgba(15, 23, 42, .25);
  z-index: 1001;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.toast {
  position: fixed;
  right: 16px;
  top: 16px;
  background: #0ea5e9;
  color: #fff;
  padding: 12px 14px;
  border-radius: 10px;
  box-shadow: 0 18px 38px rgba(15, 23, 42, .25);
  z-index: 1100;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity .25s ease, transform .25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.fade-slide {
  transition: all .3s ease;
}

.rubrica-card {
  width: min(960px, 96vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rubrica-header {
  gap: 12px;
}

.rubrica-toggles {
  display: flex;
  gap: 8px;
}

.rubrica-toggles .pill {
  padding: 8px 12px;
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, .2);
  background: #f8fbff;
  cursor: pointer;
}

.rubrica-toggles .pill.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.rubrica-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.rubrica-toolbar .search-box {
  flex: 1;
}

.rubrica-toolbar input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, .12);
  background: #f8fafc;
}

.rubrica-table-wrap {
  overflow: auto;
  max-height: 65vh;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 12px;
}

.rubrica-table {
  width: 100%;
  border-collapse: collapse;
}

.rubrica-table th,
.rubrica-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(15, 23, 42, .05);
  font-size: 14px;
}

.rubrica-table th {
  background: #f8fbff;
  position: sticky;
  top: 0;
  z-index: 1;
}

.rubrica-table tbody tr:hover {
  background: #f1f5f9;
}

.rubrica-table .apply-cell {
  text-align: right;
}

.rubrica-table .muted {
  font-size: 12px;
  color: #64748b;
}

.rubrica-add {
  border-top: 1px solid rgba(15, 23, 42, .08);
  padding-top: 10px;
  margin-top: 10px;
}

.hidden {
  display: none !important;
}

.stepper-bar {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
}

.stepper-bar .step {
  flex: 1;
  text-align: center;
}

.section-block {
  background: #f8fbff;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 16px;
  padding: 14px 14px 6px;
  margin-bottom: 14px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.orange {
  background: #f97316;
}

.dot.red {
  background: #ef4444;
}

.dot.blue {
  background: #2563eb;
}

.dot.green {
  background: #22c55e;
}

.pill-select {
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, .1);
  background: #fff;
  font-weight: 600;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.four-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.tariffe-list {
  display: grid;
  gap: 12px;
}

.tariff-card {
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  background: #fdfefe;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .05);
}

.tariff-logo {
  width: 60px;
  height: 60px;
  background: #fff;
  border-radius: 12px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(15, 23, 42, .08);
}

.tariff-info {
  display: grid;
  gap: 4px;
}

.tariff-info .title-sm {
  margin: 0;
}

.tariff-info .muted {
  font-size: .9rem;
}

.tariff-price {
  text-align: right;
}

.tariff-price strong {
  font-size: 1.4rem;
  color: #0f172a;
}

.tariff-price .muted {
  font-size: .85rem;
}

.tariff-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.summary-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  align-items: start;
}

.summary-box {
  border: 1px solid rgba(15, 23, 42, .1);
  border-radius: 14px;
  padding: 14px;
  background: #f8fbff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
}

.summary-line,
.summary-total {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
}

.summary-total {
  font-size: 1.1rem;
  font-weight: 700;
  border-top: 1px solid rgba(15, 23, 42, .08);
  margin-top: 6px;
  padding-top: 10px;
}

.summary-block {
  display: grid;
  gap: 6px;
}

@media (max-width: 1024px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    transform: translateX(-320px);
    transition: transform .25s ease;
    z-index: 20;
    border-radius: 0;
    padding-top: 36px;
    box-shadow: 0 30px 70px rgba(15, 23, 42, .25);
  }

  nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
  }

  .sidebar-toggle {
    display: inline-flex;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .main {
    padding-top: 8px;
  }

  .card {
    padding: 18px;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  body.sidebar-open {
    overflow: hidden;
  }

  body.sidebar-open .sidebar-backdrop {
    display: block;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .login-card {
    width: 100%;
    margin: 0 12px;
  }

  .actions-row {
    flex-direction: column;
    align-items: stretch;
  }

  .actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .brand img {
    width: 72px;
  }

  .table-wrap table {
    min-width: 100%;
  }

  .pickup-overlay {
    align-items: flex-start;
  }

  .pickup-card {
    width: 100%;
    max-height: 80vh;
  }

  .pickup-card .pickup-results {
    grid-template-columns: 1fr;
    max-height: 60vh;
  }
}

.step-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  font-weight: 700;
  margin-bottom: 6px;
}

.section-title.major {
  font-size: 1.05rem;
}

.panel {
  background: #f6f7fb;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 14px;
  padding: 14px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.panel-title {
  font-size: 1.1rem;
  font-weight: 800;
}

.panel-title.orange {
  color: #c2410c;
}

.panel-title.red {
  color: #c2410c;
}

.panel-title.rust {
  color: #b45309;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.soft {
  background: #f8fbff;
}

.small {
  font-size: .9rem;
}

.actions-row.end {
  justify-content: flex-end;
  margin-top: 6px;
}

.wizard-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 14px;
  align-items: start;
}

.wizard-step {
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 14px;
  padding: 14px;
  background: #fdfefe;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
}

.wizard-step .step-label {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #2c6dfb, #23c3ff);
  color: #fff;
  font-weight: 800;
  display: grid;
  place-items: center;
  border-radius: 12px;
  margin-bottom: 8px;
}

/* Uniforma select e bottoni nei form admin/clienti */
.field select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, .12);
  background: #f8fafc;
  height: 44px;
  font-size: 15px;
  color: #0f172a;
}

.field select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.form-grid .actions-row {
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.form-grid .actions-row .btn {
  border-radius: 10px;
}

/* Tracking public landing overrides */
.tracking-shell {
  width: min(1200px, 98vw);
  margin: 22px auto 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.tracking-results-shell {
  width: 100%;
  padding: 0 12px 32px;
}

.tracking-results-inner {
  width: min(1200px, 98vw);
  margin: 0 auto;
}

.tracking-results-card {
  margin: 0;
}

.tracking-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 8px;
}

.tracking-layout {
  display: grid;
  grid-template-columns: 2.2fr 0.9fr;
  gap: 16px;
  align-items: start;
}

.tracking-card {
  margin: 0;
}

.tracking-form {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.tracking-form .field label {
  font-weight: 700;
  color: #0f172a;
}

.tracking-form input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #f8fafc;
}

.tracking-result-group {
  margin-top: 0;
  display: grid;
  gap: 12px;
}

.tracking-result {
  display: flex;
  align-items: center;
  min-height: 56px;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 700;
  color: #0f172a;
  background: #e0f2fe;
  border: 1px solid rgba(14, 165, 233, 0.4);
}

.tracking-result.success {
  background: #dcfce7;
  border-color: rgba(16, 185, 129, 0.45);
  color: #166534;
}

.tracking-result.error {
  background: #fee2e2;
  border-color: rgba(239, 68, 68, 0.45);
  color: #991b1b;
}

.tracking-result.hidden {
  display: none;
}

.tracking-external.hidden {
  display: none;
}

.tracking-external {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(2, 132, 199, 0.06);
}

.tracking-external a {
  color: #0ea5e9;
  font-weight: 700;
  text-decoration: none;
}

.tracking-external a:hover {
  text-decoration: underline;
}

.tracking-panels {
  display: grid;
  grid-template-columns:1fr;/*repeat(auto-fit, minmax(280px, 1fr));*/
  gap: 12px;
}

.tracking-side {
  margin: 0;
  position: sticky;
  top: 18px;
  align-self: start;
}

.info-list {
  margin: 10px 0;
  padding-left: 18px;
  color: #0f172a;
  display: grid;
  gap: 6px;
}

.info-list li {
  line-height: 1.4;
}

.divider {
  height: 1px;
  background: rgba(15, 23, 42, .08);
  margin: 12px 0;
}

.timeline {
  position: relative;
  padding-left: 18px;
  display: grid;
  gap: 10px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: rgba(37, 99, 235, .2);
}

.timeline-item {
  position: relative;
  padding: 8px 10px 8px 18px;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 12px;
  background: #f9fbff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
}

.timeline-dot {
  position: absolute;
  left: -9px;
  top: 14px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .15);
}

.timeline-time {
  font-weight: 700;
  color: #0f172a;
}

.timeline-status {
  font-weight: 700;
  color: #0f172a;
}

.timeline-desc {
  color: #475569;
  margin-top: 2px;
}

.timeline-loc {
  color: #6b7280;
  font-size: .92rem;
  margin-top: 2px;
}

.tracking-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 640px;
}

.tracking-table th,
.tracking-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  text-align: left;
  font-weight: 500;
  color: #0f172a;
}

.tracking-table thead th {
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: #475569;
  border-bottom: 2px solid rgba(15, 23, 42, 0.12);
  background: #f1f5f9;
}

.tracking-table.hidden {
  display: none;
}

@media (max-width: 900px) {
  .tracking-shell {
    padding: 24px 14px 90px;
  }

  .tracking-layout {
    grid-template-columns: 1fr;
  }

  .tracking-form {
    grid-template-columns: 1fr;
  }

  .tracking-table {
    min-width: 100%;
  }
}
