/* ============================================================
   Taxa Salubrizare — Stiluri personalizate
   ============================================================ */

:root {
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --color-primary: #1a56db;
  --color-primary-dark: #1e40af;
  --color-surface: #f8fafc;
  --color-border: #e2e8f0;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --ts-primary:   #0d6efd;
  --ts-sidebar-w: 0px;
}

body {
  font-family: var(--font-primary);
  color: var(--color-text);
  background-color: var(--color-surface);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container-fluid {
  flex: 1;
}

/* ============================================================
   Navbar
   ============================================================ */
.navbar {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  background-color: #f3f4f6 !important;
  border-bottom: 2px solid #166534 !important;
  box-shadow: 0 2px 6px rgba(22,101,52,0.08);
  transition: background-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.navbar.scrolled {
  background-color: rgba(243,244,246,0.50) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(22,101,52,0.12);
}

.navbar-brand {
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.navbar-brand small {
  font-size: 0.72rem;
}

.navbar .nav-link,
.navbar .navbar-brand,
.navbar .nav-link.dropdown-toggle {
  color: #166534 !important;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.375rem 0.625rem;
  border-radius: var(--radius-sm);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.navbar .navbar-brand {
  font-size: 1rem;
  font-weight: 700;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  background-color: rgba(22,101,52,0.08);
  color: #166534 !important;
}

.navbar .nav-link.active {
  background-color: rgba(22,101,52,0.12);
  color: #166534 !important;
  font-weight: 700;
}

/* Iconita de iesire vizibila pe fond alb */
.navbar .nav-link.text-white-50 {
  color: #166534 !important;
  opacity: 0.6;
}

.navbar .nav-link.text-white-50:hover {
  opacity: 1;
}

/* ============================================================
   Cards
   ============================================================ */
.card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.card.border-0 {
  border: 1px solid var(--color-border) !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04) !important;
}

.card-header {
  border-bottom: 1px solid var(--color-border);
  border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
  padding: 1rem 1.25rem;
}

.card-header h5 {
  font-size: 0.9375rem;
  font-weight: 600;
}

/* ============================================================
   Tabele
   ============================================================ */
.table {
  font-size: 0.875rem;
}

.table thead th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  border-bottom: 2px solid var(--color-border);
  padding: 0.625rem 0.75rem;
}

.table tbody td {
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.table-hover tbody tr:hover {
  background-color: #f8fafc;
}

/* ============================================================
   Butoane
   ============================================================ */
.btn {
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  padding: 0.4375rem 0.875rem;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

.btn-sm {
  font-size: 0.8125rem;
  padding: 0.3125rem 0.625rem;
}

/* ============================================================
   Container și layout pagini dense
   ============================================================ */
.container-fluid.px-4 {
  max-width: 1600px;
}

.page-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

/* ============================================================
   Form controls
   ============================================================ */
.form-control, .form-select {
  font-size: 0.875rem;
  border-color: var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.4375rem 0.75rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}

.form-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

/* ============================================================
   Login page
   ============================================================ */
.login-page {
  background: linear-gradient(135deg, #1a56db 0%, #1e40af 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.login-card {
  border-radius: var(--radius-lg);
  border: none;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

/* ── Pagini autentificare unificate (login / forgot / set-password) ── */
.auth-page {
  background: linear-gradient(135deg, #166534 0%, #15803d 55%, #22c55e 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 2rem 0;
}

.auth-card {
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.22);
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.22);
  color: #fff;
  font-size: 2.25rem;
  backdrop-filter: blur(4px);
}

/* Indicator putere parola */
.pw-meter {
  height: 5px;
  border-radius: 4px;
  background: #e2e8f0;
  overflow: hidden;
}
.pw-meter > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 4px;
  transition: width .25s ease, background .25s ease;
}

/* Input cantitate în tabel */
.input-cantitate {
  background: transparent;
  min-width: 85px;
  font-size: 0.85rem;
}

.input-cantitate:focus {
  background: #fff;
  box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.25);
}

/* Tabel date UAT — header colorat */
.tabel-date-uat th {
  font-size: 0.78rem;
  vertical-align: middle;
  white-space: nowrap;
}

/* Tabel raport */
.tabel-raport th,
.tabel-raport td {
  font-size: 0.82rem;
  white-space: nowrap;
}

/* ============================================================
   Cifre tabulare — aliniament vertical în coloane numerice
   ============================================================ */
.tabel-date-uat td,
.tabel-raport td,
.table td.text-end,
.table td.text-center,
.input-cantitate,
.input-q {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 0.82rem;
  font-feature-settings: "tnum" 1;
}

/* ============================================================
   Stat cards dashboard — elimină blob colorat (AI slop pattern)
   ============================================================ */
.card-body [class*="bg-"][class*="bg-opacity-10"] {
  background: transparent !important;
  padding: 0 !important;
}
.card-body [class*="bg-"][class*="bg-opacity-10"] i {
  color: var(--color-text-muted) !important;
  font-size: 1.5rem !important;
}

/* Badge mediu */
.badge-urban  { background-color: #0d6efd; }
.badge-rural  { background-color: #198754; }

/* Footer */
.footer {
  font-size: 0.82rem;
}

/* Animatie la salvare */
.salva-spin {
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   Print
   ============================================================ */
@media print {
  .d-print-none { display: none !important; }
  .navbar, .footer { display: none !important; }
  .card { border: 1px solid #dee2e6 !important; box-shadow: none !important; }
  body { font-size: 10pt; }
  .container-fluid { padding: 0 !important; }
}

/* ============================================================
   Responsive tabele mari
   ============================================================ */
@media (max-width: 768px) {
  .tabel-date-uat,
  .tabel-raport {
    font-size: 0.75rem;
  }
  .input-cantitate {
    min-width: 65px;
  }
}
