/* ── Tab bar dashboard ────────────────────────────────────── */
.tab-bar {
  display: flex;
  background: #f0f2f5;
  border-radius: 0.75rem;
  padding: 0.25rem;
  gap: 0.25rem;
}
.tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  border-radius: 0.5rem;
  padding: 0.6rem 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #6c757d;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.tab-btn.active {
  background: #ffffff;
  color: #1a1a2e;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
.tab-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 2rem;
  line-height: 1.4;
}
.tab-badge-todo { background: #198754; color: white; }
.tab-badge-done { background: #6c757d; color: white; }

/* ── Note box ─────────────────────────────────────────────── */
.notes-box {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-left: 4px solid #ffc107;
  border-radius: 0.5rem;
  padding: 0.6rem 0.85rem;
}
.notes-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #856404;
  margin-bottom: 0.2rem;
}
.notes-text {
  font-size: 0.97rem;
  color: #333;
  white-space: pre-wrap;
  line-height: 1.5;
}

/* ============================================================
   PULIZIE APP — Stile principale
   Mobile-first, leggibile, colori chiari
   ============================================================ */

/* ── Root ─────────────────────────────────────────────────── */
:root {
  --color-available: #28a745;
  --color-urgent:    #dc3545;
  --color-today:     #fd7e14;
  --color-upcoming:  #0d6efd;
  --color-confirmed: #6c757d;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f5f7fa;
  -webkit-tap-highlight-color: transparent;
}

/* ── Login ────────────────────────────────────────────────── */
.login-bg {
  background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
  padding: 1rem;
}

.login-card {
  border-radius: 1.25rem;
}

/* ── Section headers ──────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
}

.section-green  { background: #d1f5d3; color: #155724; }
.section-yellow { background: #ffe5cc; color: #7d3000; }
.section-blue   { background: #cfe2ff; color: #084298; }
.section-gray   { background: #e9ecef; color: #495057; }

/* ── Apartment cards ──────────────────────────────────────── */
.apt-card {
  border-radius: 1rem !important;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  overflow: hidden;
}

.apt-card:active {
  transform: scale(0.99);
}

/* Card disponibile adesso */
.card-available {
  border-left: 5px solid var(--color-available) !important;
  background: #ffffff;
}

/* Card urgente (stesso giorno) */
.card-urgent {
  border-left: 5px solid var(--color-urgent) !important;
  background: #fff5f5;
  animation: pulse-border 2s ease-in-out infinite;
}

@keyframes pulse-border {
  0%, 100% { border-left-color: var(--color-urgent); }
  50%       { border-left-color: #ff8080; }
}

/* Card apre oggi */
.card-today {
  border-left: 5px solid var(--color-today) !important;
  background: #fff5ee;
}

/* Card prossimi giorni */
.card-upcoming {
  border-left: 4px solid var(--color-upcoming) !important;
  background: #ffffff;
}

/* Card confermata */
.card-confirmed {
  border-left: 4px solid var(--color-confirmed) !important;
  background: #f8f9fa;
  opacity: 0.85;
}

/* Card scaduta */
.card-expired {
  border-left: 5px solid #adb5bd !important;
  background: #f0f0f0;
}

/* ── Badge urgente ────────────────────────────────────────── */
.badge-urgent {
  background: #dc3545;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  animation: blink 1.4s linear infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

/* ── Badge "Entro oggi" (sezione Aprono oggi) ─────────────── */
.badge-today {
  background: #fd7e14;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* ── Interval info ────────────────────────────────────────── */
.interval-info {
  background: #f8f9fa;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  line-height: 1.8;
}

/* ── Pulsante CONFERMA ────────────────────────────────────── */
.btn-confirm {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  border: none;
  border-radius: 0.75rem;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  box-shadow: 0 3px 10px rgba(40,167,69,.35);
  transition: transform 0.1s, box-shadow 0.1s;
}

.btn-confirm:hover, .btn-confirm:focus {
  background: linear-gradient(135deg, #218838 0%, #17a589 100%);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(40,167,69,.45);
}

.btn-confirm:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(40,167,69,.3);
}

/* ── Confirmed badge ──────────────────────────────────────── */
.confirmed-badge {
  background: #d1f5d3;
  border-radius: 0.5rem;
  font-size: 1rem;
  color: #155724;
}

/* ── Navbar tweaks ────────────────────────────────────────── */
.navbar {
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

/* ── Scrollbar (desktop) ──────────────────────────────────── */
@media (min-width: 768px) {
  ::-webkit-scrollbar { width: 6px; }
  ::-webkit-scrollbar-track { background: #f1f1f1; }
  ::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 3px; }
}

/* ── Admin tweaks ─────────────────────────────────────────── */
.nav-tabs .nav-link {
  border-radius: 0.4rem 0.4rem 0 0;
  padding: 0.4rem 0.9rem;
  font-size: 0.88rem;
}

.card-header {
  font-size: 0.95rem;
}

/* ── Responsive table ─────────────────────────────────────── */
@media (max-width: 576px) {
  .table td, .table th {
    font-size: 0.82rem;
    padding: 0.4rem 0.5rem;
  }
}

