/* =========================================================
   IOT DOM - Tema scuro pulito
   ========================================================= */

/* ---------- Variabili di brand + altezza navbar ---------- */
:root {
  --brand-orange:    #ec6a00;
  --brand-orange-dk: #853c00;

  --bg-1: #1b1b1b;   /* sfondo pagina */
  --bg-2: #2c2c2c;   /* input */
  --bg-3: #343a40;   /* card */

  --nav-h: 64px;     /* altezza navbar desktop */
}
@media (max-width: 991.98px) {
  :root { --nav-h: 56px; }       /* altezza navbar mobile */
}

/* ------------------------ Layout base -------------------- */
html,
body {
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;

  background-color: var(--bg-1) !important;
  padding-top: var(--nav-h);                 /* spinge i contenuti sotto la navbar fixed-top */
}

.content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

footer {
  width: 100%;
}

/* ----------------- Utility responsive semplici ----------- */
@media (min-width: 992px) { .mobile-only  { display: none; } }
@media (max-width: 992px) { .desktop-only { display: none; } }

.responsive {
  width: 100%;
  max-width: 400px;
  height: auto;
}

/* ----------------------- Navbar & brand ------------------ */
.navbar.navbar-dark {
  background-color: #000;
}

.text-warning {
  color: #e55a00 !important;
}

.btn-warning {
  color: #fff !important;
  background-color: #ff6600 !important;
  border-color: #ff6c06 !important;
}

.btn-warning:hover {
  color: #1a1a1a !important;
  background-color: #bfbfbf !important;
  border-color: #7f7f7f !important;
}

/* ------------------------- Form scuri -------------------- */
.custom-input {
  background-color: var(--bg-2) !important;
  color: #fff !important;
  border-radius: 4px;
  border: none;
}
.custom-input:focus {
  background-color: var(--bg-2) !important;
  color: #fff !important;
}
.custom-input::placeholder {
  color: #ffffffa8 !important;
}

/* ------------------------- Card scure -------------------- */
.custom-card {
  border: 0.02rem solid #9a9a9a !important;
  border-radius: 0.3rem !important;
  background-color: var(--bg-3) !important;
}

/* ----------------------- Pulsante login ------------------ */
.login-btn {
  width: 100%;
  padding: 12px;

  border: none;
  border-radius: 10px;

  font-size: 16px;
  color: #fff;
  cursor: pointer;

  background: linear-gradient(90deg, var(--brand-orange), var(--brand-orange-dk));
  transition: 0.3s;
}
.login-btn:hover { opacity: 0.9; }

/* -------------------- Elementi grafici login ------------- */
.font-login {
  font-family: "Exo 2", sans-serif;
  font-weight: 800;
  font-style: normal;
}

.line {
  width: 100%;
  height: 4px;
  border-radius: 2px;

  background: linear-gradient(to right, #ff8c00, #8c4911);
  box-shadow: 0 4px 6px rgba(0, 0, 0, .1);
}

.triangle {
  position: relative;
  background: #fff;
  height: 5vh;
}
.triangle::before {
  content: '';
  position: absolute;
  bottom: 0;

  width: 0;
  height: 0;
  border-style: solid;
  border-width: 20px 20px 0 20px;
  border-color: #fff transparent transparent transparent;

  left: 50%;
  transform: translateX(-50%) translateY(100%);
}

/* --------------------- Checkbox ingrandite ---------------- */
.form-check-input.form-check-input-lg {
  width: 1.5rem !important;
  height: 1.5rem !important;
  border: 2px solid var(--brand-orange) !important;
}
.form-check-input.form-check-input-lg:checked {
  background-color: var(--brand-orange);
}

/* ------------------------ Spinner grande ----------------- */
.spinner-border-lg {
  width: 8rem !important;
  height: 8rem !important;
}

/* =========================================================
   NAVBAR MOBILE FIX - minimo indispensabile
   ========================================================= */

/* Toggler (hamburger/X): bordo e focus in warning */
.navbar-toggler {
  line-height: 1;
  border: 1px solid transparent;
  border-radius: .5rem;
  padding: .25rem .5rem;
}
.navbar-toggler:focus,
.navbar-toggler:active,
.navbar-toggler[aria-expanded="true"] {
  outline: 0;
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 .15rem rgba(236, 106, 0, .35);
}

/* Icona del toggler (bars/x) */
#navToggleIcon {
  display: inline-block;
  line-height: 1;
  font-size: 1.4rem;
}

/* Separatore sottile arancione nel menu mobile */
.mobile-sep {
  border-top: 1px solid rgba(236, 106, 0, .65);
  margin: .25rem .75rem 0 .75rem;
}

/* Icone mobile: verticali, leggermente a destra, righe distanziate */
.navbar-nav.mobile-actions {
  align-items: flex-end;
  padding-right: .5rem;
}
.navbar-nav.mobile-actions .nav-link {
  padding: .6rem 0;
}

/* Voci admin in grassetto (desktop + mobile) */
.navbar-nav .nav-link.admin-item {
  font-weight: 700;
}

/* ===== MENU tiles (minimo indispensabile) ===== */
.menu-tiles .menu-link { display:flex; padding:.65rem .9rem; }
.menu-tiles .menu-link:hover { opacity:.92; }
