@charset "UTF-8";
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
*, *::before, *::after {box-sizing: border-box;margin: 0;padding: 0;}

:root {
  --forest:     #1A1C1E;
  --dark:       #1A1C1E;
  --moss:       #2d6a35;
  --leaf:       #4a9e55;
  --lime:       #8fc93a;
  --lime-025:  rgba(143, 201, 58, 0.15);
  --cream:      #f5f0e8;
  --sand:       #e8e0d0;
  --earth:      #8b6f47;
  --text:       #1c2b1e;
  --text2:      #4a5e4c;
  --text3:      #16461a;
  --white:      #ffffff;
  --lime-l:     rgba(143,201,58,0.12);
  --lime-m:     rgba(143,201,58,0.25);
  --leaf-l:     rgba(74,158,85,0.1);
  --border:     #ddd8ce;
  --nav-h:      58px;
  --sb-w:       240px;
  --font-d:     'Fraunces', Georgia, serif;
  --font-s:     'Inter', 'DM Sans', system-ui, sans-serif;
  --font-m:     'DM Mono', monospace;
  --gradient-green1: linear-gradient(135deg, #2d6a35, #8fc93a);
  --gradient-green2: linear-gradient(135deg, #4a9e55, #8fc93a);
  --gradient-green3: radial-gradient(ellipse 600px 400px at 90% 50%, #153119 0%, #0e1f10 70%), radial-gradient(ellipse 300px 300px at 10% 80%, #153019 0%, transparent 65%);
  --close-b:   #353ec7;
}
.icon-das::before{content:"⊞"}
.icon-ana::before{content:"▲"}
.icon-biof::before{content:"⟳"}
.icon-biol::before{content:"⬡"}
.icon-log::before{content:"▸"}
.icon-wrh::before{content:"□"}
.icon-r2s::before{content:"◈"}
.icon-tra::before{content:"≡"}
.icon-cer::before{content:"◻"}
.icon-roa::before{content:"→"}
.icon-set::before{content:"⚙"}
.icon-logout::before{content:"⇥"}
.icon-doc::before{content:"📄"}

.tb-theme-btn{
  font-size: x-large;
  background: transparent;
  margin: unset;
  border-radius: 50%;
  border: 1px solid #80808078;
}

* {
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* IE/Edge */
}
*::-webkit-scrollbar {
  display: none;                /* Chrome/Safari */
}
/* Particelle animate sullo sfondo */
.particles {    position: fixed;    top: 0;    left: 0;    width: 100%;    height: 100%;    overflow: hidden;    z-index: -1;}
.particle {    position: absolute;    width: 10px;    height: 10px;    background: rgba(255,255,255,0.1);    border-radius: 50%;    animation: float 15s infinite;}
@keyframes float {    0%, 100% {        transform: translateY(100vh) rotate(0deg);        opacity: 0;    }    10% {        opacity: 1;    }        90% {        opacity: 1;    }    100% {        transform: translateY(-100vh) rotate(720deg);        opacity: 0;    }}

body {
  font-family: var(--font-s);
  background: #E1F5FE;
  color: var(--text);
  min-height: 100vh;
}
body::before{
  background-image: url(output_transparent.png),linear-gradient(var(--lime-025) 1px, transparent 1px), linear-gradient(90deg, var(--lime-025) 1px, transparent 1px);
  background-size:
    auto,        /* dimensione immagine */
    40px 40px,      /* dimensione celle griglia */
    40px 40px;
  background-repeat:
    no-repeat,
    repeat,
    repeat;
  background-position:
    center,
    0 0,
    0 0;
  opacity: 0;
  content: '';
  position: fixed;     /* fixed invece di absolute: segue lo scroll */
  inset: 0;
  z-index: -1;
}
/* top bar */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--nav-h);
  background: var(--dark);
  border-bottom: 1px solid rgba(143,201,58,0.15);
  display: flex; align-items: center;
  padding: 0 20px;
  gap: 12px;
}
.tb-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
}
.logo-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--moss), var(--lime));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-d); font-size: 15px; font-weight: 700;
  color: var(--dark); flex-shrink: 0;
}
.logo-name {
  font-family: var(--font-d); font-size: 17px; font-weight: 700;
  color: var(--cream); letter-spacing: -0.01em;
}
.logo-name em { font-style: italic; color: var(--lime); }
.tb-divider {
  width: 1px; height: 22px;
  background: rgba(255,255,255,0.1);
  flex-shrink: 0;
}
.tb-breadcrumb {
  font-family: var(--font-m); font-size: 11px;
  color: rgba(255,255,255,0.3); letter-spacing: 0.04em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tb-breadcrumb span { color: var(--lime); }
.tb-right {
  margin-left: auto;
  display: flex; align-items: center; gap: 10px;
}
.tb-status {
  display: flex; align-items: center; gap: 6px;
  background: rgba(143,201,58,0.1);
  border: 1px solid rgba(143,201,58,0.2);
  border-radius: 6px; padding: 5px 11px;
  font-family: var(--font-m); font-size: 10px;
  color: var(--lime); white-space: nowrap;
}
.tb-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--lime); box-shadow: 0 0 5px var(--lime);
  animation: pulse 2.5s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }
.tb-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--forest), var(--moss));
  border: 1px solid rgba(143,201,58,0.3);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-d); font-size: 12px; font-weight: 700;
  color: var(--lime); cursor: pointer; flex-shrink: 0;
}
/* shell menu piu area lavoro */
.shell {
    display: flex;
    padding-top: var(--nav-h);
    height: 100vh;
    justify-content: flex-start;
    align-items: stretch;
    overflow: hidden;
    flex-direction: row;
    flex-wrap: nowrap;
}

.logo {
    width: 120px;
    height: 120px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.3);
}
h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease;
}
/* pulsante apre chiude menu */
.hamburger {
  display:none;     
  position: relative;
  padding: 0;
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  flex-direction: column; gap: 4px;
}

.line {
  display: block;
  width: 90%;
  height: 4px;
  background: #438dbe;
  position: absolute;
  left: 0;
  border-radius: 2px;
  transition: all 0.3s ease;
  margin:0 5%;
}

/* Posizione iniziale delle 3 linee */
.line:nth-child(1) { top: 10%; }
.line:nth-child(2) { top: 50%; transform: translateY(-50%); }
.line:nth-child(3) { bottom: 10%; }

/* Stato attivo - trasformazione in X */
.hamburger.active .line:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    }

.hamburger.active .line:nth-child(2) {
    opacity: 0;
}

.hamburger.active .line:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}
.sidebar {
    width: var(--sb-w);
    flex-shrink: 0;
    background: var(--forest);
    border-right: 1px solid rgba(255,255,255,0.06);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
/* Sidebar user card */
.sb-user {
  padding: 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; gap: 11px;
}
.sb-avatar {
  width: 36px; height: 36px; border-radius: 9px;
  background: rgba(143,201,58,0.15);
  border: 1px solid rgba(143,201,58,0.25);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-d); font-size: 13px; font-style: italic;
  color: var(--lime); flex-shrink: 0;
}
.sb-user-name {
  font-size: 13px; font-weight: 600;
  color: #E0F7FA; line-height: 1.2;
}
.sb-user-role {
  font-family: var(--font-m); font-size: 9px;
  color: rgba(224,247,250,0.45); letter-spacing: 0.1em;
  text-transform: uppercase; margin-top: 1px;
}
.sb-online {
  margin-left: auto; display: flex; align-items: center; gap: 4px;
  font-family: var(--font-m); font-size: 9px; color: var(--lime);
}
.sb-online-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--lime);
  animation: pulse 2.5s ease-in-out infinite;
}
.sb-nav { flex: 1; padding: 12px 10px; }
.sb-group-label {
  font-family: var(--font-m); font-size: 8.5px;
  color: rgba(224,247,250,0.38); letter-spacing: 0.18em;
  text-transform: uppercase; padding: 12px 10px 6px;
  display: block;
}
.sidebar-button {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 10px; border-radius: 8px;
    text-decoration: none; cursor: pointer;
    transition: all .15s; margin-bottom: 1px;
    border: 1px solid transparent; position: relative;
    font-size: 12.5px; font-weight: 400;
    color: #E0F7FA; flex: 1;
    width: 100%;
    margin: 0 10px;
    background-color: transparent;
}
.sidebar-button :hover {
    color: #fff;
}
.sidebar-button:hover { background: rgba(224,247,250,0.07); }
.sidebar-button.active {
  background: rgba(225,245,254,0.14);
  border-color: rgba(225,245,254,0.30);
  color: #E1F5FE;
  font-weight: 600;
}
.sidebar-button.active::before {
  content: '';
  position: absolute; left: -1px; top: 25%; bottom: 25%;
  width: 2px; background: var(--lime); border-radius: 0 2px 2px 0;
}
.sb-item-icon {
  width: 32px; height: 32px; border-radius: 7px;
  background: rgba(224,247,250,0.06);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0;
  color: #E0F7FA;
  transition: background .15s, color .15s;
}


.application {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.sb-submenu {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: 500px;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}
.sb-submenu.collapsed {
    max-height: 0;
    opacity: 0;
}
.sb-arrow {
    margin-left: auto;
    width: 16px;
    height: 16px;
    border-right: 2px solid #6b8cae;
    border-bottom: 2px solid #6b8cae;
    transform: rotate(-45deg);  /* punta a destra */
    transition: transform 0.3s ease;

    flex-shrink: 0;
}
.has-sub.open .sb-arrow {
    transform: rotate(45deg);  /* ▸ diventa ▾ */
}
.sidebar-sub {
    padding-left: 2.5rem;
    font-size: 0.85em;
    opacity: 0.85;
}

.close{
  display: block;
  position: absolute;
  top:2px;
  right: 2px;
  width: 30px;
  height: 30px;
  border-radius: 5px;
  background-color:var(--close-b) ;
  color:aliceblue;
}

.duecolonne{
  display:grid; 
  grid-template-columns:1fr 1fr; 
  gap:8px;
}

.centrato{
  background:var(--moss);
  opacity:0.8;
  padding:20px;
  transform: translate(-50%, -50%);
  transform-origin: center;
  position: relative;
  left: 50%;
  top: 50%;
}
.construction-icon{
  font-size:xx-large;
  text-align:center
}
.subtitle{
  text-align:center;
}
@media (orientation: portrait) {
    h1 { font-size: 2rem; }
    body{align-items: center;/* display: flex; *//* align-content: flex-start; *//* flex-wrap: wrap; */}
    .subtitle { font-size: 1rem; }
    .logo {position: unset; width: 180px;height: 180px;font-size: 3rem;margin: auto;}
    .sidebar {display: none;}
    .sidebar.active{display: block;left: 0px;position: absolute;top: var( --nav-h);z-index: 2;}
    .hamburger {display: block;z-index: 10;}
    /* Sblocca l'overflow orizzontale per permettere lo scroll delle tabelle */
    .shell       { overflow-x: visible; }
    .application { overflow-x: visible; }
}

@media (max-width: 768px) {
    .shell       { overflow-x: visible; }
    .application { overflow-x: visible; }
}

/* ── Tema scuro: sfondo e colore testo base ──────────────────── */
[data-theme="dark"] body {
    background: #111614;
    color: #c0d4c2;
}

/* ── Tema scuro: tutti i <select> — regola base globale ──────── */
[data-theme="dark"] select {
    appearance: none;
    -webkit-appearance: none;
    background-color: rgba(255,255,255,.06);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238fc93a' d='M3 4.5L6 8l3-3.5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    border: 1px solid rgba(255,255,255,.12);
    color: #e0f7fa;
    padding-right: 30px;
}
[data-theme="dark"] select:focus {
    outline: none;
    border-color: #4a9e55;
    box-shadow: 0 0 0 3px rgba(74,158,85,.18);
}
[data-theme="dark"] select:hover {
    border-color: rgba(143,201,58,.4);
    background-color: #22272a;
}
/* Opzioni della lista dropdown */
[data-theme="dark"] option {
    background-color: #1A1C1E;
    color: #e0f7fa;
}
[data-theme="dark"] option:checked,
[data-theme="dark"] option:hover {
    background-color: #2d6a35;
    color: #ffffff;
}

/* ── Session Toast ───────────────────────────────────────────── */
.auth-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(24px);
    z-index: 10000;
    background: #1a1a1a;
    color: #ffffff;
    padding: 14px 22px 18px 18px;
    border-radius: 12px;
    font-family: var(--font-s);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,.55), 0 2px 8px rgba(0,0,0,.3);
    border: 1px solid rgba(255,255,255,.1);
    opacity: 0;
    transition: opacity .3s ease, transform .3s ease;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
}
.auth-toast--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.auth-toast-icon { font-size: 16px; flex-shrink: 0; }
.auth-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, #4a9e55, #8fc93a);
    border-radius: 0 0 12px 12px;
    transform-origin: left;
    animation: auth-toast-shrink 2s linear forwards;
}
@keyframes auth-toast-shrink {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

/* ── Table empty state ───────────────────────────────────────── */
.tbl-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 52px 24px;
    text-align: center;
    gap: 10px;
}
.tbl-empty-icon { font-size: 30px; }
.tbl-empty-msg  {
    font-size: 13px;
    font-family: var(--font-s);
    color: #9ca3af;
}

/* Scheda info section */
.etr-info-section,
.est-info-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}
.etr-info-section .form-group label,
.est-info-section .form-group label {
    font-size: 11px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.etr-info-section .form-group p,
.est-info-section .form-group p {
    margin: 0;
    font-size: 13px;
    color: #374151;
    font-family: var(--font-m);
}
[data-theme="dark"] .tbl-empty-msg { color: rgba(255,255,255,.35); }