/* ========================================
   INVENTÁRIO SABESP v2
   Design system: corporativo, sóbrio, moderno
======================================== */

:root {
  --sabesp-azul: #009EDB;
  --sabesp-azul-escuro: #0077A8;
  --sabesp-azul-mais-escuro: #005A82;
  --sabesp-azul-claro: #E8F6FC;
  --sabesp-amarelo: #F5C518;
  --sabesp-laranja: #FF8C42;
  --sabesp-verde: #16A34A;
  --sabesp-vermelho: #DC2626;

  --bg: #F8FAFC;
  --bg-card: #FFFFFF;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;
  --text: #0F172A;
  --text-muted: #64748B;
  --text-light: #94A3B8;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);

  --transition: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ============ HEADER ============ */
.header {
  background: linear-gradient(180deg, var(--sabesp-azul) 0%, var(--sabesp-azul-escuro) 100%);
  color: white;
  padding: 14px 20px;
  box-shadow: 0 2px 12px rgba(0, 158, 219, 0.25);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-logo {
  height: 32px;
  width: auto;
  display: block;
}

.header-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.3);
}

.header-title-group {
  line-height: 1.2;
}

.header h1 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.header-subtitle {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 2px;
}

.header-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 500;
}

.header-user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  color: var(--sabesp-azul);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
}

.btn-sair {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-sair:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ============ CONTAINER ============ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.container-narrow {
  max-width: 600px;
}

/* ============ LOGIN ============ */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    radial-gradient(circle at 20% 0%, rgba(0, 158, 219, 0.18) 0%, transparent 50%),
    radial-gradient(circle at 80% 100%, rgba(0, 119, 168, 0.22) 0%, transparent 50%),
    linear-gradient(180deg, #F0F9FD 0%, #DCEFF8 100%);
}

.login-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 40px 32px 32px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo img {
  height: 44px;
  width: auto;
  display: inline-block;
}

.login-titulo {
  text-align: center;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.login-titulo h1 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
  letter-spacing: -0.3px;
}

.login-titulo p {
  font-size: 13px;
  color: var(--text-muted);
}

.login-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--sabesp-azul-claro);
  color: var(--sabesp-azul-escuro);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 8px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--text);
}

.form-group input {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius);
  font-size: 15px;
  background: white;
  color: var(--text);
  transition: all var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: var(--sabesp-azul);
  box-shadow: 0 0 0 4px rgba(0, 158, 219, 0.12);
}

.form-group input.codigo {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-weight: 700;
  font-size: 18px;
  text-align: center;
}

.form-help {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 6px;
}

.btn-primario {
  width: 100%;
  padding: 14px;
  background: var(--sabesp-azul);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.btn-primario:hover {
  background: var(--sabesp-azul-escuro);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 158, 219, 0.35);
}

.btn-primario:active {
  transform: translateY(0);
}

.btn-primario:disabled {
  background: var(--text-light);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.erro-msg {
  background: #FEF2F2;
  color: var(--sabesp-vermelho);
  padding: 11px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
  border: 1px solid #FECACA;
  align-items: center;
  gap: 8px;
}

.erro-msg.show {
  display: flex;
}

.login-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.login-footer a {
  color: var(--sabesp-azul);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  transition: color var(--transition);
}

.login-footer a:hover {
  color: var(--sabesp-azul-escuro);
}

.login-rodape {
  text-align: center;
  margin-top: 20px;
  font-size: 11px;
  color: var(--text-light);
  letter-spacing: 0.3px;
}

/* ============ INFO EMPREITEIRA ============ */
.empreiteira-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
}

.empreiteira-icon {
  width: 44px;
  height: 44px;
  background: var(--sabesp-azul-claro);
  color: var(--sabesp-azul);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.empreiteira-info {
  flex: 1;
  min-width: 0;
}

.empreiteira-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-bottom: 2px;
}

.empreiteira-nome {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============ PROGRESSO ============ */
.progresso-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.progresso-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}

.progresso-titulo {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.progresso-percent {
  font-size: 28px;
  font-weight: 700;
  color: var(--sabesp-azul);
  letter-spacing: -1px;
}

.progresso-bar {
  height: 10px;
  background: var(--bg);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}

.progresso-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--sabesp-azul) 0%, #00C7B7 50%, var(--sabesp-verde) 100%);
  transition: width 0.5s ease;
  border-radius: 5px;
  position: relative;
}

.progresso-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.progresso-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.stat {
  text-align: center;
  padding: 12px 8px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: currentColor;
  opacity: 0.6;
}

.stat-valor {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.5px;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 6px;
  font-weight: 600;
}

.stat-pendente { color: var(--sabesp-laranja); }
.stat-contado { color: var(--sabesp-verde); }
.stat-total { color: var(--sabesp-azul); }
.stat-pendente .stat-label, .stat-contado .stat-label, .stat-total .stat-label {
  color: var(--text-muted);
}

/* ============ FILTROS ============ */
.filtros {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.busca {
  position: relative;
  margin-bottom: 12px;
}

.busca input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius);
  font-size: 15px;
  background: var(--bg);
  transition: all var(--transition);
}

.busca input:focus {
  outline: none;
  border-color: var(--sabesp-azul);
  background: white;
  box-shadow: 0 0 0 4px rgba(0, 158, 219, 0.1);
}

.busca-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.filtro-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: var(--bg);
  padding: 4px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.tab {
  padding: 9px 8px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition);
}

.tab:hover:not(.active) {
  background: white;
  color: var(--text);
}

.tab.active {
  background: white;
  color: var(--sabesp-azul);
  box-shadow: var(--shadow-sm);
}

.tab-pendentes.active { color: var(--sabesp-laranja); }
.tab-contados.active { color: var(--sabesp-verde); }

/* ============ LISTA ============ */
.lista-itens {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.item-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  border-left: 3px solid var(--sabesp-laranja);
  cursor: pointer;
  transition: all var(--transition);
}

.item-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: var(--sabesp-azul);
}

.item-card:active {
  transform: translateY(0) scale(0.99);
}

.item-card.contado {
  border-left-color: var(--sabesp-verde);
  background: linear-gradient(180deg, #F0FDF4 0%, white 80%);
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

.item-codigo {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  letter-spacing: 0.3px;
}

.item-status {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.item-status.pendente {
  background: #FFF4E5;
  color: #B45309;
}

.item-status.contado {
  background: #DCFCE7;
  color: #15803D;
}

.item-descricao {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.35;
}

.item-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

.item-info-umb {
  display: inline-block;
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.item-info-contado {
  color: var(--sabesp-verde);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.lista-vazia {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-strong);
  color: var(--text-muted);
}

.lista-vazia-icon {
  font-size: 48px;
  margin-bottom: 12px;
  display: block;
}

.lista-vazia-titulo {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.lista-vazia-desc {
  font-size: 13px;
}

/* ============ MODAL ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 200;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-overlay.show {
  display: flex;
}

.modal {
  background: white;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-width: 500px;
  padding: 24px 24px 28px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.25s cubic-bezier(0.2, 0.9, 0.4, 1);
}

@media (min-width: 640px) {
  .modal-overlay {
    align-items: center;
    padding: 20px;
  }
  .modal {
    border-radius: var(--radius-xl);
    max-height: 80vh;
  }
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0.5; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-handle {
  width: 40px;
  height: 4px;
  background: var(--border-strong);
  border-radius: 2px;
  margin: -12px auto 16px;
}

.modal-codigo-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.modal-codigo-label {
  font-size: 10px;
  background: var(--sabesp-azul-claro);
  color: var(--sabesp-azul-escuro);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-codigo {
  font-size: 13px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-weight: 600;
}

.modal-descricao {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.35;
}

.modal-input-wrapper {
  margin-bottom: 18px;
}

.modal-input-wrapper label {
  font-size: 12px;
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-input {
  width: 100%;
  padding: 18px;
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius);
  letter-spacing: -1px;
  transition: all var(--transition);
}

.modal-input:focus {
  outline: none;
  border-color: var(--sabesp-azul);
  box-shadow: 0 0 0 4px rgba(0, 158, 219, 0.12);
}

.modal-umb {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
  font-weight: 500;
}

.modal-umb strong {
  color: var(--text);
  font-weight: 700;
}

.modal-acoes {
  display: flex;
  gap: 10px;
}

.modal-acoes button {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-cancelar {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-strong) !important;
}

.btn-cancelar:hover {
  background: var(--border);
}

.btn-confirmar {
  background: var(--sabesp-verde);
  color: white;
}

.btn-confirmar:hover {
  background: #15803D;
}

.btn-confirmar:disabled {
  background: var(--text-light);
}

.aviso-ja-contado {
  background: #FFF8E1;
  color: #92400E;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
  border: 1px solid #FDE68A;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

/* ============ ADMIN ============ */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.admin-stat {
  background: var(--bg-card);
  padding: 18px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.admin-stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--sabesp-azul);
}

.admin-stat.laranja::before { background: var(--sabesp-laranja); }
.admin-stat.verde::before { background: var(--sabesp-verde); }
.admin-stat.amarelo::before { background: var(--sabesp-amarelo); }

.admin-stat-valor {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  letter-spacing: -1px;
}

.admin-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 8px;
  font-weight: 600;
}

.admin-tabela-wrapper {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.admin-tabela-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}

.admin-tabela-titulo {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.btn-acao {
  border: none;
  padding: 9px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-atualizar {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-strong) !important;
}

.btn-atualizar:hover {
  background: var(--border);
}

.btn-exportar {
  background: var(--sabesp-verde);
  color: white;
}

.btn-exportar:hover {
  background: #15803D;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.admin-busca {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.admin-busca input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-size: 14px;
  background: white;
}

.admin-busca input:focus {
  outline: none;
  border-color: var(--sabesp-azul);
}

.admin-tabela {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-tabela th {
  background: var(--bg);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.admin-tabela td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.admin-tabela tr:last-child td {
  border-bottom: none;
}

.admin-tabela tbody tr:hover {
  background: var(--bg);
}

.empresa-nome {
  font-weight: 600;
  color: var(--text);
}

.empresa-codigo {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
  font-weight: 600;
}

.progresso-mini {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progresso-mini-bar {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  min-width: 60px;
}

.progresso-mini-fill {
  height: 100%;
  background: var(--sabesp-azul);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progresso-mini-fill.completo {
  background: var(--sabesp-verde);
}

.progresso-mini-valor {
  font-size: 12px;
  font-weight: 600;
  min-width: 80px;
  text-align: right;
  color: var(--text);
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-nao-iniciado {
  background: #F1F5F9;
  color: var(--text-muted);
}

.badge-andamento {
  background: #FFF4E5;
  color: #B45309;
}

.badge-concluido {
  background: #DCFCE7;
  color: #15803D;
}

/* ============ LOADING ============ */
.loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--sabesp-azul);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 14px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============ TOAST ============ */
.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: var(--text);
  color: white;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease;
  z-index: 300;
  max-width: 90%;
  text-align: center;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.toast.success { background: var(--sabesp-verde); }
.toast.error { background: var(--sabesp-vermelho); }

/* ============ FOOTER ============ */
.footer {
  text-align: center;
  padding: 24px 20px;
  font-size: 11px;
  color: var(--text-light);
  letter-spacing: 0.3px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 640px) {
  .header h1 {
    font-size: 14px;
  }
  .header-subtitle {
    font-size: 11px;
  }
  .header-user span {
    display: none;
  }
  .admin-tabela {
    font-size: 12px;
  }
  .admin-tabela th, .admin-tabela td {
    padding: 10px 10px;
  }
  .admin-tabela-mobile-hide {
    display: none;
  }
  .login-card {
    padding: 32px 24px 24px;
  }
}

/* Esconder elementos via JS */
.hidden {
  display: none !important;
}
