/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; background: #f0f4f0; color: #1a2e1a; min-height: 100vh; }

/* ===== UTILITIES ===== */
.hidden { display: none !important; }
.full { width: 100%; }

/* ===== LOGIN ===== */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a4a1a 0%, #2d7a2d 50%, #4a9e4a 100%);
}
.login-box {
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-logo { font-size: 48px; text-align: center; margin-bottom: 8px; }
.login-box h1 { text-align: center; font-size: 24px; color: #1a4a1a; margin-bottom: 4px; }
.login-sub { text-align: center; color: #666; font-size: 14px; margin-bottom: 28px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: #444; margin-bottom: 6px; }
.form-group input {
  width: 100%; padding: 10px 14px; border: 1.5px solid #ddd;
  border-radius: 8px; font-size: 15px; transition: border-color 0.2s;
}
.form-group input:focus { outline: none; border-color: #2d7a2d; }
.login-error { background: #fee; color: #c00; border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 12px; }

/* ===== BUTTONS ===== */
.btn-primary {
  background: #2d7a2d; color: #fff; border: none; border-radius: 8px;
  padding: 11px 20px; font-size: 15px; font-weight: 600; cursor: pointer; transition: background 0.2s;
}
.btn-primary:hover { background: #1a5c1a; }
.btn-secondary {
  background: #e8f5e8; color: #2d7a2d; border: 1.5px solid #2d7a2d; border-radius: 8px;
  padding: 9px 18px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.btn-secondary:hover { background: #2d7a2d; color: #fff; }
.btn-danger {
  background: #dc3545; color: #fff; border: none; border-radius: 8px;
  padding: 9px 18px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn-danger:hover { background: #b02a37; }
.btn-warning {
  background: #f59e0b; color: #fff; border: none; border-radius: 8px;
  padding: 9px 18px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-icon { background: none; border: none; cursor: pointer; font-size: 18px; padding: 4px 8px; }
.btn-logout {
  background: none; border: 1px solid rgba(255,255,255,0.3); color: #fff;
  border-radius: 6px; padding: 6px 12px; font-size: 13px; cursor: pointer;
}
.btn-logout:hover { background: rgba(255,255,255,0.1); }

/* ===== APP LAYOUT ===== */
.app { display: flex; min-height: 100vh; }

/* ===== SIDEBAR ===== */
.sidebar {
  width: 260px; min-width: 260px; background: #1a4a1a;
  color: #fff; display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; height: 100vh;
  z-index: 100; transition: transform 0.3s ease;
  overflow-y: auto;
}
.sidebar-header {
  padding: 20px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: space-between;
}
.logo { font-size: 16px; font-weight: 700; }
.sidebar-close { background: none; border: none; color: #fff; font-size: 18px; cursor: pointer; display: none; }
.sidebar-nav { flex: 1; padding: 12px 0; }
.nav-section-label {
  font-size: 10px; font-weight: 700; letter-spacing: 1.2px;
  color: rgba(255,255,255,0.4); padding: 12px 16px 4px; text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; color: rgba(255,255,255,0.8);
  cursor: pointer; border-radius: 0; transition: all 0.15s;
  font-size: 14px; text-decoration: none; border-left: 3px solid transparent;
}
.nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-item.active { background: rgba(255,255,255,0.12); color: #fff; border-left-color: #6fcf6f; }
.nav-icon { font-size: 16px; width: 20px; text-align: center; }

/* Sottomenu campo */
.nav-campo { margin-bottom: 4px; }
.nav-campo-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; color: rgba(255,255,255,0.9);
  cursor: pointer; font-size: 14px; font-weight: 600;
  border-left: 3px solid transparent; transition: all 0.15s;
}
.nav-campo-header:hover { background: rgba(255,255,255,0.08); }
.nav-campo-header.active { border-left-color: #6fcf6f; }
.nav-campo-arrow { font-size: 11px; transition: transform 0.2s; }
.nav-campo-arrow.open { transform: rotate(90deg); }
.nav-settori { display: none; }
.nav-settori.open { display: block; }
.nav-settore-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px 8px 36px; color: rgba(255,255,255,0.65);
  cursor: pointer; font-size: 13px; transition: all 0.15s;
  border-left: 3px solid transparent;
}
.nav-settore-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-settore-item.active { color: #6fcf6f; }
.nav-crea-settore {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 16px 7px 36px; color: #6fcf6f;
  cursor: pointer; font-size: 13px; font-weight: 600;
}
.nav-crea-settore:hover { color: #8fe08f; }

.sidebar-footer {
  padding: 16px; border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: rgba(255,255,255,0.6);
}

/* ===== TOPBAR ===== */
.main-content { margin-left: 260px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  background: #fff; padding: 0 24px; height: 60px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08); position: sticky; top: 0; z-index: 50;
}
.hamburger { background: none; border: none; font-size: 22px; cursor: pointer; display: none; }
.topbar h2 { font-size: 18px; font-weight: 700; color: #1a4a1a; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.page-content { padding: 24px; flex: 1; }

/* ===== OVERLAY ===== */
.overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4); z-index: 99; display: block;
}
.overlay.hidden { display: none !important; }

/* ===== CARDS ===== */
.card {
  background: #fff; border-radius: 12px; padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06); margin-bottom: 20px;
}
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-title { font-size: 16px; font-weight: 700; color: #1a4a1a; }

/* ===== DASHBOARD ===== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: #fff; border-radius: 12px; padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06); text-align: center;
}
.stat-icon { font-size: 32px; margin-bottom: 8px; }
.stat-value { font-size: 28px; font-weight: 700; color: #1a4a1a; }
.stat-label { font-size: 13px; color: #666; margin-top: 4px; }

/* ===== TABELLE ===== */
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th {
  background: #f8faf8; padding: 10px 14px; text-align: left;
  font-weight: 600; color: #444; border-bottom: 2px solid #e0e8e0; white-space: nowrap;
}
tbody tr { border-bottom: 1px solid #f0f4f0; transition: background 0.1s; }
tbody tr:hover { background: #f8faf8; }
tbody td { padding: 10px 14px; color: #333; vertical-align: middle; }
.qr-thumb { width: 40px; height: 40px; }

/* ===== BADGE ===== */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
}
.badge-green { background: #e8f5e8; color: #1a7a1a; }
.badge-blue { background: #e8f0ff; color: #1a4aaa; }
.badge-orange { background: #fff3e0; color: #e65c00; }

/* ===== FILTRI ===== */
.filtri-bar {
  background: #e8f5e8; border-radius: 10px; padding: 16px;
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 16px;
}
.filtri-bar .form-group { margin: 0; min-width: 150px; flex: 1; }
.filtri-bar label { font-size: 12px; }
.filtri-bar input, .filtri-bar select {
  width: 100%; padding: 8px 10px; border: 1.5px solid #c8e0c8;
  border-radius: 7px; font-size: 14px; background: #fff;
}

/* ===== AZIONI BAR ===== */
.azioni-bar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-bottom: 16px; padding: 12px 16px;
  background: #f8faf8; border-radius: 10px;
}

/* ===== SETTORE HEADER ===== */
.settore-header {
  background: linear-gradient(135deg, #1a4a1a, #2d7a2d);
  color: #fff; border-radius: 12px; padding: 20px 24px; margin-bottom: 20px;
}
.settore-header h2 { font-size: 22px; margin-bottom: 4px; }
.settore-header p { opacity: 0.8; font-size: 14px; }
.settore-stats { display: flex; gap: 24px; margin-top: 12px; flex-wrap: wrap; }
.settore-stat { text-align: center; }
.settore-stat .val { font-size: 24px; font-weight: 700; }
.settore-stat .lbl { font-size: 12px; opacity: 0.75; }

/* ===== TABELLA RIEPILOGO ===== */
.riepilogo-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.riepilogo-table th { background: #1a4a1a; color: #fff; padding: 10px 14px; text-align: left; }
.riepilogo-table td { padding: 10px 14px; border-bottom: 1px solid #e0e8e0; }
.riepilogo-table tr:hover td { background: #f8faf8; }

/* ===== FORM MODAL ===== */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal {
  background: #fff; border-radius: 14px; width: 100%; max-width: 500px;
  max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal-header {
  padding: 16px 20px; border-bottom: 1px solid #e0e8e0;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: #fff; z-index: 1;
}
.modal-header h3 { font-size: 17px; color: #1a4a1a; }
.modal-header button { background: none; border: none; font-size: 20px; cursor: pointer; color: #666; }
.modal-body { padding: 20px; }
.modal-body .form-group { margin-bottom: 14px; }
.modal-body input, .modal-body select, .modal-body textarea {
  width: 100%; padding: 9px 12px; border: 1.5px solid #ddd;
  border-radius: 8px; font-size: 14px; font-family: inherit;
}
.modal-body input:focus, .modal-body select:focus, .modal-body textarea:focus {
  outline: none; border-color: #2d7a2d;
}
.modal-footer { padding: 16px 20px; border-top: 1px solid #e0e8e0; display: flex; gap: 10px; justify-content: flex-end; }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 40px 20px; color: #888; }
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 15px; }

/* ===== LOADING ===== */
.loading { text-align: center; padding: 40px; color: #888; font-size: 15px; }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 999;
  background: #1a4a1a; color: #fff; padding: 12px 20px;
  border-radius: 10px; font-size: 14px; box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  animation: slideUp 0.3s ease;
}
.toast.error { background: #c0392b; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ===== CHECKBOX ===== */
.checkbox-cell input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; accent-color: #2d7a2d; }

/* ===== PIANTA DETAIL ===== */
.pianta-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pianta-qr { text-align: center; }
.pianta-qr img { width: 140px; height: 140px; border: 4px solid #e0e8e0; border-radius: 8px; }
.info-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f0f4f0; font-size: 14px; }
.info-row .label { color: #666; }
.info-row .value { font-weight: 600; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: block; }
  .main-content { margin-left: 0; }
  .hamburger { display: block; }
  .page-content { padding: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .pianta-detail { grid-template-columns: 1fr; }
  .filtri-bar { flex-direction: column; }
  .filtri-bar .form-group { min-width: 100%; }
  .azioni-bar { flex-direction: column; align-items: stretch; }
  .azioni-bar button { width: 100%; }
}
@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* ===== CAMPO CARD ===== */
.campo-card {
  display: flex; align-items: center; gap: 12px;
  background: #f8faf8; border: 1.5px solid #e0e8e0;
  border-radius: 12px; padding: 14px 18px; cursor: pointer;
  transition: all 0.2s; min-width: 180px;
}
.campo-card:hover { background: #e8f5e8; border-color: #2d7a2d; }
.campo-icon { font-size: 28px; }
.campo-info { display: flex; flex-direction: column; }
.campo-info strong { font-size: 15px; color: #1a4a1a; }
.campo-info span { font-size: 12px; color: #666; margin-top: 2px; }


/* ===== SETTORI GRID ===== */
.settori-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.settore-card {
  display: flex; align-items: center; gap: 12px;
  background: #f8faf8; border: 1.5px solid #e0e8e0;
  border-radius: 12px; padding: 16px; cursor: pointer;
  transition: all 0.2s;
}
.settore-card:hover { background: #e8f5e8; border-color: #2d7a2d; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.settore-card-icon { font-size: 28px; }
.settore-card-info { flex: 1; }
.settore-card-info strong { display: block; font-size: 15px; color: #1a4a1a; }
.settore-card-info span { font-size: 12px; color: #888; }
.settore-card-arrow { font-size: 20px; color: #2d7a2d; font-weight: bold; }

/* ===== STATS GRID FIX ===== */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
@media (min-width: 600px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }

/* ===== METEO ===== */
.meteo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
@media (min-width: 500px) { .meteo-grid { grid-template-columns: repeat(4, 1fr); } }
.meteo-item {
  background: #f0f7f0; border-radius: 10px; padding: 12px;
  text-align: center; font-size: 15px; font-weight: 600; color: #1a4a1a;
}

/* ===== CAMPO CARD FIX ===== */
.campo-card { min-width: 0; flex: 1 1 160px; }

/* ===== METEO CARDS ===== */
.meteo-main-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}
@media (min-width: 600px) { .meteo-main-grid { grid-template-columns: repeat(4, 1fr); } }

.meteo-card {
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}
.meteo-temp { background: linear-gradient(135deg, #fff3e0, #ffe0b2); }
.meteo-hum  { background: linear-gradient(135deg, #e3f2fd, #bbdefb); }
.meteo-wind { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); }
.meteo-rain { background: linear-gradient(135deg, #ede7f6, #d1c4e9); }

.meteo-label { font-size: 12px; color: #555; margin-bottom: 6px; font-weight: 600; }
.meteo-value { font-size: 24px; font-weight: 700; color: #1a2e1a; }
.meteo-sub   { font-size: 11px; color: #777; margin-top: 4px; }

/* ===== OTTIMIZZAZIONE MOBILE ===== */

/* Previeni zoom automatico su input iOS */
input, select, textarea {
  font-size: 16px !important;
}

/* Safe area per iPhone con notch */
@supports (padding: max(0px)) {
  .sidebar {
    padding-top: max(20px, env(safe-area-inset-top));
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
  .topbar {
    padding-top: max(0px, env(safe-area-inset-top));
  }
  .page-content {
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
}

/* Touch targets più grandi (min 44px per Apple HIG) */
.nav-item, .nav-campo-header, .nav-settore-item, .nav-crea-settore {
  min-height: 44px;
  display: flex;
  align-items: center;
}

button {
  min-height: 44px;
}

.btn-sm {
  min-height: 36px;
}

/* Bottoni più grandi su mobile */
@media (max-width: 768px) {
  .btn-primary, .btn-secondary, .btn-danger, .btn-warning {
    padding: 12px 18px;
    font-size: 15px;
  }
  
  /* Azioni bar verticale su mobile */
  .azioni-bar {
    flex-direction: column;
    gap: 10px;
  }
  .azioni-bar button {
    width: 100%;
    text-align: left;
    padding: 13px 16px;
  }

  /* Tabelle scrollabili */
  .table-container {
    -webkit-overflow-scrolling: touch;
  }
  
  /* Cards piú compatte */
  .card {
    padding: 14px;
    border-radius: 10px;
  }
  
  /* Settore header più compatto */
  .settore-header {
    padding: 16px;
    border-radius: 10px;
  }
  .settore-header h2 { font-size: 18px; }
  .settore-stat .val { font-size: 20px; }

  /* Modal full-screen su mobile */
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }
  .modal {
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
    width: 100%;
    max-width: 100%;
  }

  /* Page content padding ridotto */
  .page-content {
    padding: 12px;
  }

  /* Meteo grid 2 colonne su mobile */
  .meteo-main-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Stats grid 2 colonne */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Settori grid 1 colonna su mobile piccolo */
  .settori-grid {
    grid-template-columns: 1fr;
  }

  /* QR thumb più grande su mobile */
  .qr-thumb {
    width: 50px;
    height: 50px;
  }

  /* Topbar */
  .topbar {
    padding: 0 12px;
    height: 52px;
  }
  .topbar h2 {
    font-size: 16px;
  }

  /* Login card full-width */
  .login-box {
    border-radius: 0;
    min-height: 100vh;
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .login-screen {
    align-items: stretch;
  }
}

/* iPhone SE e schermi molto piccoli */
@media (max-width: 375px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .stat-card {
    padding: 14px 10px;
  }
  .stat-value {
    font-size: 22px;
  }
  .page-content {
    padding: 10px;
  }
}

/* Android - rimuovi highlight touch blu */
* {
  -webkit-tap-highlight-color: transparent;
}

/* Scroll fluido */
.page-content, .sidebar, .table-container, .modal {
  -webkit-overflow-scrolling: touch;
}

/* Sidebar swipe-friendly */
.sidebar {
  will-change: transform;
}

/* Testo non selezionabile sui pulsanti */
button, .nav-item, .nav-campo-header, .nav-settore-item {
  -webkit-user-select: none;
  user-select: none;
}

/* ===== FIX MOBILE CHROME ===== */

/* Sidebar footer sempre visibile */
.sidebar-footer {
  position: sticky;
  bottom: 0;
  background: #1a4a1a;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding: 12px 16px;
  z-index: 10;
}

/* Username sidebar troncato */
#sidebar-username {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 120px;
  font-size: 12px;
}

/* Pulsante Esci più visibile */
.btn-logout {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.btn-logout:hover { background: rgba(255,255,255,0.25); }

/* Topbar username nascosto su mobile piccolo */
@media (max-width: 480px) {
  #topbar-user { display: none; }
}

/* Fix sidebar su Chrome mobile */
@media (max-width: 768px) {
  .sidebar {
    width: 280px;
    min-width: 280px;
  }
  
  /* Main content full width su mobile */
  .main-content {
    margin-left: 0 !important;
    width: 100%;
  }

  /* Hamburger sempre visibile */
  .hamburger {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    font-size: 20px;
  }

  /* Tabella azioni su mobile */
  tbody td:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }

  /* Gestisci campi - tabella responsive */
  .table-container table thead {
    display: none;
  }
  .table-container table tr {
    display: block;
    border: 1px solid #e0e8e0;
    border-radius: 8px;
    margin-bottom: 8px;
    padding: 10px;
  }
  .table-container table td {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    border: none;
  }
  .table-container table td::before {
    font-weight: 600;
    color: #666;
    min-width: 80px;
    font-size: 12px;
  }
}

/* ===== CAMPI GRID DASHBOARD ===== */
.campi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.campo-big-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #f0f7f0, #e8f5e8);
  border: 1.5px solid #c8e0c8;
  border-radius: 14px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
}
.campo-big-card:hover {
  background: linear-gradient(135deg, #e8f5e8, #d4edda);
  border-color: #2d7a2d;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(45,122,45,0.15);
}
.campo-big-icon { font-size: 40px; }
.campo-big-nome { font-size: 18px; font-weight: 700; color: #1a4a1a; flex: 1; }
.campo-big-info { font-size: 13px; color: #666; }
.campo-big-arrow { font-size: 24px; color: #2d7a2d; font-weight: bold; }

/* ===== CAMPO NAV GRID ===== */
.campo-nav-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.campo-nav-card {
  background: #fff;
  border: 1.5px solid #e0e8e0;
  border-radius: 14px;
  padding: 20px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.campo-nav-card:hover {
  border-color: #2d7a2d;
  background: #f0f7f0;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(45,122,45,0.15);
}
.campo-nav-icon { font-size: 36px; margin-bottom: 8px; }
.campo-nav-label { font-size: 14px; font-weight: 600; color: #1a4a1a; }
.campo-nav-count { font-size: 20px; font-weight: 700; color: #2d7a2d; margin-top: 4px; }

@media (max-width: 480px) {
  .campi-grid { grid-template-columns: 1fr; }
  .campo-nav-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .campo-nav-card { padding: 14px 8px; }
  .campo-nav-icon { font-size: 28px; }
  .campo-nav-label { font-size: 12px; }
  .campo-big-card { padding: 14px; }
  .campo-big-icon { font-size: 32px; }
  .campo-big-nome { font-size: 16px; }
}

/* ===== CAMPO ROW ===== */
.campo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 8px;
  border-bottom: 1px solid #f0f4f0;
  cursor: pointer;
  transition: background 0.15s;
  border-radius: 8px;
}
.campo-row:hover { background: #f8faf8; }
.campo-row:last-child { border-bottom: none; }
.campo-row-icon { font-size: 28px; width: 36px; text-align: center; }
.campo-row-info { flex: 1; }
.campo-row-info strong { display: block; font-size: 16px; color: #1a4a1a; }
.campo-row-info span { font-size: 13px; color: #888; margin-top: 2px; display: block; }
.campo-row-arrow { font-size: 22px; color: #2d7a2d; font-weight: bold; }

/* Rimuovi doppio Gestisci Campi nel menu */
.admin-only + .admin-only { display: none !important; }

/* ===== AZIONI SEZIONI ===== */
.azioni-section {
  margin-bottom: 16px;
}
.azioni-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #888;
  margin-bottom: 8px;
  padding-left: 4px;
}
.azioni-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  background: none;
  padding: 0;
  border-radius: 0;
}
.btn-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 8px;
  background: #fff;
  border: 1.5px solid #e0e8e0;
  border-radius: 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #1a4a1a;
  transition: all 0.15s;
  min-height: 72px;
  text-align: center;
}
.btn-action span { font-size: 22px; }
.btn-action:hover { background: #f0f7f0; border-color: #2d7a2d; }
.btn-action-green { background: #e8f5e8; border-color: #2d7a2d; color: #1a5c1a; }
.btn-action-green:hover { background: #d4edda; }
.btn-action-orange { background: #fff8e1; border-color: #f59e0b; color: #92400e; }
.btn-action-orange:hover { background: #fef3c7; }

@media (min-width: 600px) {
  .azioni-bar { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 380px) {
  .btn-action { padding: 10px 6px; font-size: 12px; min-height: 64px; }
  .btn-action span { font-size: 18px; }
}
