/*
 * GAP - Modern UI layer
 * SOLO PRESENTAZIONE: nessuna logica applicativa.
 * Le pagine home/timbratori restano escluse per mantenere invariata la loro grafica.
 */
:root {
  --gap-blue: #034c97;
  --gap-blue-dark: #02376f;
  --gap-bg: #f4f7fb;
  --gap-border: #e4eaf1;
  --gap-text: #172033;
  --gap-muted: #6d7788;
  --gap-radius: 12px;
  --gap-shadow: 0 6px 20px rgba(16, 38, 68, .07);
}

/* Tutte le pagine gestionali, ma NON la home/timbratori */
body:not(.route-home) {
  background: var(--gap-bg);
  color: var(--gap-text);
}

body:not(.route-home) .container-timbra {
  width: min(96%, 1500px);
  text-align: left !important;
}

body:not(.route-home) .header {
  position: sticky;
  top: 0;
  z-index: 1030;
}

body:not(.route-home) .menuGAP {
  background: rgba(255,255,255,.97);
  border: 1px solid var(--gap-border);
  border-radius: 0 0 14px 14px;
  box-shadow: 0 5px 18px rgba(16,38,68,.08);
  padding: .45rem .75rem;
}

body:not(.route-home) .menuGAP .nav-link {
  color: #283348;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .15px;
  border-radius: 8px;
  padding: .55rem .65rem;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
body:not(.route-home) .menuGAP .nav-link:hover,
body:not(.route-home) .menuGAP .nav-link:focus {
  background: #edf4fb;
  color: var(--gap-blue);
  text-decoration: none;
}
body:not(.route-home) .menuGAP .bg-grey {
  background: #f0f2f5;
}
body:not(.route-home) .logoGap { max-height: 44px; }

body:not(.route-home) h1,
body:not(.route-home) h2,
body:not(.route-home) h3,
body:not(.route-home) h4,
body:not(.route-home) h5,
body:not(.route-home) h6 {
  color: var(--gap-text);
  font-weight: 650;
}

body:not(.route-home) .card {
  border: 1px solid var(--gap-border) !important;
  border-radius: var(--gap-radius) !important;
  box-shadow: var(--gap-shadow);
  overflow: hidden;
}
body:not(.route-home) .card-header {
  border-bottom: 1px solid var(--gap-border);
  background: #fff;
}

body:not(.route-home) .btn {
  border-radius: 8px;
  font-weight: 600;
  transition: transform .12s ease, box-shadow .12s ease;
}
body:not(.route-home) .btn:hover {
  transform: translateY(-1px);
}
body:not(.route-home) .btn-primary {
  background: var(--gap-blue);
  border-color: var(--gap-blue);
}
body:not(.route-home) .btn-primary:hover {
  background: var(--gap-blue-dark);
  border-color: var(--gap-blue-dark);
}

body:not(.route-home) input.form-control,
body:not(.route-home) select.form-control,
body:not(.route-home) textarea.form-control,
body:not(.route-home) #personaDdl,
body:not(.route-home) input[type="text"],
body:not(.route-home) input[type="date"],
body:not(.route-home) input[type="datetime-local"] {
  border: 1px solid #d8e0e9;
  border-radius: 8px;
  min-height: 38px;
  background: #fff;
}
body:not(.route-home) .form-control:focus,
body:not(.route-home) #personaDdl:focus {
  border-color: #79a9d6;
  box-shadow: 0 0 0 .18rem rgba(3,76,151,.10);
}

/* Tabelle gestionali */
body:not(.route-home) .table-my,
body:not(.route-home) table.dataTable {
  background: #fff;
  border: 1px solid var(--gap-border);
  border-radius: var(--gap-radius);
  overflow: hidden;
  box-shadow: var(--gap-shadow);
}
body:not(.route-home) .table-my thead th,
body:not(.route-home) table.dataTable thead th {
  background: #eef3f8 !important;
  color: #29364b;
  border-top: 0 !important;
  border-bottom: 1px solid #dbe3ec !important;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .25px;
  text-transform: uppercase;
  padding: 12px 10px;
}
body:not(.route-home) .table-my tbody td,
body:not(.route-home) table.dataTable tbody td {
  border-top: 1px solid #edf0f4 !important;
  border-bottom: 0 !important;
  padding: 10px;
  vertical-align: middle;
  color: #303b4d;
  font-size: 14px;
}
body:not(.route-home) .table-my tbody tr:nth-of-type(odd) {
  background: #fbfcfe;
}
body:not(.route-home) .table-my tbody tr:hover {
  background: #f2f7fc;
}

body:not(.route-home) .alert {
  border: 0;
  border-radius: 10px;
  box-shadow: 0 3px 12px rgba(16,38,68,.06);
}

/* Datatable controls */
body:not(.route-home) .dataTables_wrapper .dataTables_filter input,
body:not(.route-home) .dataTables_wrapper .dataTables_length select {
  border: 1px solid #d8e0e9;
  border-radius: 8px;
  background: #fff;
  padding: 5px 9px;
}
body:not(.route-home) .dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 7px !important;
  border: 1px solid transparent !important;
}
body:not(.route-home) .dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--gap-blue) !important;
  color: #fff !important;
  border-color: var(--gap-blue) !important;
}

/* Riepilogo Terni: rifinitura grafica, senza toccare dati o logica */
body.route-stamped_mensa_terni_riepilogo .container-fluid {
  max-width: 1500px;
}
body.route-stamped_mensa_terni_riepilogo .card {
  box-shadow: 0 8px 24px rgba(16,38,68,.08);
}
body.route-stamped_mensa_terni_riepilogo .card-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(16,38,68,.12) !important;
}
body.route-stamped_mensa_terni_riepilogo .btn-primary {
  box-shadow: 0 4px 12px rgba(3,76,151,.18);
}

@media (max-width: 991.98px) {
  body:not(.route-home) .menuGAP { border-radius: 0 0 12px 12px; }
  body:not(.route-home) .menuGAP .nav-link { margin: 2px 0; }
}

@media (max-width: 767.98px) {
  body:not(.route-home) .container-timbra { width: 94%; }
  body:not(.route-home) .table-responsive { border-radius: 10px; }
  body.route-stamped_mensa_terni_riepilogo .container-fluid { padding-left: 12px !important; padding-right: 12px !important; }
}
