/* intraweb - stile base (stessa famiglia cromatica della vetrina telematizzazione) */

:root {
  --iw-navy: #1a3a5c;
  --iw-blue: #2563eb;
  --iw-bg:   #f5f7fa;
}

body {
  background: var(--iw-bg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #1f2937;
}

/* --- Login --- */
.iw-login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--iw-navy) 0%, #0f2740 100%);
  padding: 1rem;
}
.iw-login-box {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  padding: 2rem;
  width: 100%;
  max-width: 400px;
}
.iw-logo {
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border-radius: 12px;
  background: var(--iw-blue);
  color: #fff;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Card e tabelle --- */
.iw-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.25rem;
  height: 100%;
}
/* Più riquadri nella stessa colonna: niente altezza forzata, altrimenti l'ultimo sborda sul piè di pagina */
.iw-card:not(:only-child) { height: auto; }
.iw-card h2 { font-size: 1rem; font-weight: 600; color: var(--iw-navy); }
.iw-numero { font-size: 1.9rem; font-weight: 700; color: var(--iw-navy); line-height: 1.1; }

.table-sm td, .table-sm th { vertical-align: middle; }

.btn-primary {
  --bs-btn-bg: var(--iw-blue);
  --bs-btn-border-color: var(--iw-blue);
  --bs-btn-hover-bg: #1d4fd8;
  --bs-btn-hover-border-color: #1d4fd8;
}

/* --- Footer --- */
.iw-footer { color: #6b7280; }

/* Le tabelle larghe scorrono da sole invece di allargare la pagina */
.table-responsive { -webkit-overflow-scrolling: touch; }

/* --- Menu laterale (dal 21/10/2026, sostituisce la navbar in alto, come MRN) --- */
:root { --iw-side-w: 250px; }

.iw-sidebar {
  background: var(--iw-navy);
  color: rgba(255, 255, 255, .85);
  display: flex;
  flex-direction: column;
}
@media (min-width: 992px) {
  .iw-sidebar {
    position: fixed;
    top: 0; bottom: 0; left: 0;
    width: var(--iw-side-w);
    overflow-y: auto;
    z-index: 1030;
    background-color: var(--iw-navy) !important; /* offcanvas-lg da desktop la renderebbe trasparente */
  }
  .iw-contenuto { margin-left: var(--iw-side-w); min-height: 100vh; display: flex; flex-direction: column; }
  .iw-contenuto main { flex: 1; }
}
@media (max-width: 991.98px) {
  .iw-sidebar.offcanvas-lg { --bs-offcanvas-width: 280px; --bs-offcanvas-bg: var(--iw-navy); }
}

.iw-topbar {
  background: var(--iw-navy);
  padding: .5rem 1rem;
  display: flex;
  align-items: center;
  position: sticky; top: 0; z-index: 1020;
}
.iw-brand { color: #fff; font-weight: 600; font-size: 1.15rem; text-decoration: none; }
.iw-brand:hover { color: #fff; }

.iw-side-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.1rem .75rem;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.iw-side-azienda { padding: .8rem 1rem; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.iw-side-etichetta,
.iw-side-gruppo {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .06em;
  color: rgba(255, 255, 255, .5);
}
.iw-side-gruppo { padding: 1rem 1.1rem .3rem; }
.iw-az-btn {
  display: flex; align-items: center; gap: .5rem; width: 100%;
  margin-top: .35rem; padding: .45rem .6rem;
  background: rgba(255, 255, 255, .1); border-radius: 6px;
  color: #fff; text-decoration: none; font-size: .9rem;
}
.iw-az-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iw-az-btn:hover { background: rgba(255, 255, 255, .18); color: #fff; }

.iw-side-nav { flex: 1; padding-bottom: 1rem; }
.iw-side-link {
  display: flex; align-items: center; gap: .6rem;
  padding: .45rem 1.1rem; margin: 1px .5rem; border-radius: 6px;
  color: rgba(255, 255, 255, .8); text-decoration: none; font-size: .92rem;
}
.iw-side-link i { font-size: 1rem; width: 1.1rem; text-align: center; }
.iw-side-link:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.iw-side-link.active { background: var(--iw-blue); color: #fff; }

.iw-side-bottom { padding: .9rem 1rem; border-top: 1px solid rgba(255, 255, 255, .1); }
.iw-side-utente {
  font-size: .85rem; margin-bottom: .5rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* bottone con la sola stella dell'emblema ADM: ricevuta originale della Dogana */
.iw-adm-stella { padding: .15rem .4rem; }
.iw-adm-stella img { height: 1.35rem; width: auto; vertical-align: middle; }
