/* =============================================
   LIGA UROLOGIA — VISUAL RENOVADO
   Design: Médico/Profissional com identidade forte
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:wght@600&display=swap');

:root {
  --cor-primaria: #1a56db;
  --cor-primaria-escura: #1341b0;
  --cor-primaria-claro: #e8f0fe;
  --verde: #059669;
  --verde-claro: #d1fae5;
  --vermelho: #dc2626;
  --vermelho-claro: #fee2e2;
  --amarelo: #d97706;
  --amarelo-claro: #fef3c7;
  --azul: #1e40af;
  --azul-claro: #dbeafe;
  --cinza: #6b7280;
  --cinza-claro: #f3f4f6;
  --borda: #e5e7eb;
  --fundo: #f8fafc;
  --card: #ffffff;
  --texto: #0f172a;
  --texto2: #64748b;
  --sidebar-w: 220px;
  --topbar-h: 60px;
  --radius: 10px;
  --radius-lg: 16px;
  --sombra: 0 1px 4px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
  --sombra-md: 0 4px 16px rgba(0,0,0,0.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Outfit', -apple-system, sans-serif;
  background: var(--fundo);
  color: var(--texto);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ─── LAYOUT ─────────────────────────────────── */
.layout { display: flex; min-height: 100vh; }

/* ─── SIDEBAR ────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(160deg, #0f172a 0%, #1e3a5f 100%);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
}

.logo-area {
  padding: 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.logo-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.06);
}

.logo-img-container {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
}

.logo-icone {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--cor-primaria), #60a5fa);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700;
  color: white;
  flex-shrink: 0;
  letter-spacing: -0.5px;
}

.logo-texto {
  color: white;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  opacity: 0.9;
}

.nav { flex: 1; padding: 12px 8px; }

.nav-secao {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 10px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 400;
  color: rgba(255,255,255,0.6);
  margin-bottom: 2px;
  text-decoration: none;
  transition: all 0.15s;
}

.nav-item:hover {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.9);
}

.nav-item.ativo {
  background: rgba(255,255,255,0.12);
  color: white;
  font-weight: 500;
}

.nav-item.ativo::before {
  content: '';
  position: absolute;
  left: 0;
  width: 3px;
  height: 28px;
  background: #60a5fa;
  border-radius: 0 4px 4px 0;
}

.nav-item { position: relative; }

.nav-icone { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }

.sidebar-rodape {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.usuario-info { flex: 1; min-width: 0; }
.usuario-nome { font-size: 12px; font-weight: 600; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.usuario-perfil { font-size: 11px; color: rgba(255,255,255,0.4); text-transform: capitalize; }

.btn-sair {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.12);
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-sair:hover { color: white; border-color: rgba(255,255,255,0.3); }

/* ─── MAIN ───────────────────────────────────── */
.main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

/* ─── TOPBAR ─────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--card);
  border-bottom: 1px solid var(--borda);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.page-titulo {
  font-size: 18px;
  font-weight: 600;
  color: var(--texto);
  font-family: 'Playfair Display', serif;
}

.topbar-acoes { display: flex; gap: 8px; }

/* ─── CONTENT ────────────────────────────────── */
.content { padding: 24px 28px; flex: 1; }

/* ─── BOTÕES ─────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--borda);
  background: var(--card);
  color: var(--texto);
  font-family: 'Outfit', sans-serif;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn:hover { background: var(--fundo); box-shadow: var(--sombra); }
.btn-primario { background: var(--cor-primaria); color: white; border-color: var(--cor-primaria); }
.btn-primario:hover { background: var(--cor-primaria-escura); box-shadow: 0 4px 12px rgba(26,86,219,0.3); }

.icon-btn {
  width: 30px; height: 30px;
  border-radius: 6px;
  border: 1px solid var(--borda);
  background: var(--card);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--texto2);
  transition: all 0.15s;
  font-family: 'Outfit', sans-serif;
  text-decoration: none;
}
.icon-btn:hover { background: var(--fundo); color: var(--texto); box-shadow: var(--sombra); }
.icon-btn.verde { color: var(--verde); }
.btn-acoes { display: flex; gap: 4px; }

/* ─── STATS ──────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }

.stat-card {
  background: var(--card);
  border: 1px solid var(--borda);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--sombra);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--sombra-md); }

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--cor-primaria);
}
.stat-card.verde::before { background: var(--verde); }
.stat-card.vermelho::before { background: var(--vermelho); }
.stat-card.amarelo::before { background: var(--amarelo); }

.stat-label { font-size: 12px; font-weight: 500; color: var(--texto2); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-valor { font-size: 32px; font-weight: 700; color: var(--texto); line-height: 1; margin-bottom: 4px; font-family: 'Playfair Display', serif; }
.stat-valor.verde { color: var(--verde); }
.stat-valor.vermelho { color: var(--vermelho); }
.stat-valor.amarelo { color: var(--amarelo); }
.stat-sub { font-size: 12px; color: var(--texto2); }
.stat-sub.verde { color: var(--verde); }
.stat-sub.vermelho { color: var(--vermelho); }
.stat-sub.amarelo { color: var(--amarelo); }

/* ─── TABELAS ────────────────────────────────── */
.table-wrap {
  background: var(--card);
  border: 1px solid var(--borda);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--sombra);
}

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

.table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--texto2);
  border-bottom: 1px solid var(--borda);
  background: #f8fafc;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table td { padding: 12px 16px; border-bottom: 1px solid var(--borda); color: var(--texto); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #fafbfc; }

.membro-cell { display: flex; align-items: center; gap: 10px; }

.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cor-primaria), #60a5fa);
  color: white;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ─── BADGES ─────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge.verde { background: var(--verde-claro); color: var(--verde); }
.badge.vermelho { background: var(--vermelho-claro); color: var(--vermelho); }
.badge.amarelo { background: var(--amarelo-claro); color: var(--amarelo); }
.badge.azul { background: var(--azul-claro); color: var(--azul); }
.badge.cinza { background: var(--cinza-claro); color: var(--cinza); }

/* ─── FILTROS ────────────────────────────────── */
.filtro-bar { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }

.filtro-btn {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--borda);
  background: var(--card);
  color: var(--texto2);
  text-decoration: none;
  transition: all 0.15s;
  font-family: 'Outfit', sans-serif;
}
.filtro-btn:hover { background: var(--fundo); }
.filtro-btn.ativo { background: var(--cor-primaria); color: white; border-color: var(--cor-primaria); }

/* ─── FORMULÁRIOS ────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo.full { grid-column: 1 / -1; }
.label { font-size: 12px; color: var(--texto2); font-weight: 600; letter-spacing: 0.3px; }

.input {
  padding: 10px 12px;
  border: 1.5px solid var(--borda);
  border-radius: 8px;
  font-size: 13px;
  background: var(--card);
  color: var(--texto);
  font-family: 'Outfit', sans-serif;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus { outline: none; border-color: var(--cor-primaria); box-shadow: 0 0 0 3px rgba(26,86,219,0.1); }
textarea.input { resize: vertical; min-height: 70px; }
select.input { cursor: pointer; }

/* ─── MODAL ──────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,0.2);
}

.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-titulo { font-size: 17px; font-weight: 600; color: var(--texto); font-family: 'Playfair Display', serif; }
.modal-footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--borda); }

/* ─── ALERTAS ────────────────────────────────── */
.alerta { padding: 12px 16px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.alerta-ok { background: var(--verde-claro); color: var(--verde); border-left: 3px solid var(--verde); }
.alerta-erro { background: var(--vermelho-claro); color: var(--vermelho); border-left: 3px solid var(--vermelho); }

/* ─── ANIVERSÁRIOS ───────────────────────────── */
.aniv-lista { display: flex; flex-direction: column; gap: 10px; }

.aniv-card {
  background: var(--card);
  border: 1px solid var(--borda);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--sombra);
  transition: transform 0.15s;
}
.aniv-card:hover { transform: translateX(4px); }
.aniv-card.hoje { border-color: var(--cor-primaria); background: var(--cor-primaria-claro); }
.aniv-icone { font-size: 24px; flex-shrink: 0; }
.aniv-info { flex: 1; min-width: 0; }
.aniv-nome { font-size: 14px; font-weight: 600; }
.aniv-data { font-size: 12px; color: var(--texto2); }

/* ─── SEÇÃO CONFIG ───────────────────────────── */
.config-secao {
  background: var(--card);
  border: 1px solid var(--borda);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 16px;
  box-shadow: var(--sombra);
}
.config-secao-titulo { font-size: 14px; font-weight: 600; color: var(--texto); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--borda); display: flex; align-items: center; gap: 8px; }
.config-dica { font-size: 12px; color: var(--texto2); margin-bottom: 14px; }
.config-dica code { background: var(--cinza-claro); padding: 2px 6px; border-radius: 4px; font-family: monospace; font-size: 12px; color: var(--cor-primaria); }

/* ─── NOTIFICAÇÕES ───────────────────────────── */
.notif-lista { display: flex; flex-direction: column; gap: 10px; }
.notif-card { background: var(--fundo); border: 1px solid var(--borda); border-radius: 8px; padding: 16px; }
.notif-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.notif-titulo { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.notif-desc { font-size: 12px; color: var(--texto2); }

/* Toggle */
.toggle-label { display: inline-flex; align-items: center; cursor: pointer; flex-shrink: 0; }
.toggle-label input { display: none; }
.toggle { width: 44px; height: 24px; border-radius: 12px; background: var(--borda); position: relative; transition: background 0.2s; flex-shrink: 0; }
.toggle::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: white; top: 3px; left: 3px; transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.toggle-label input:checked + .toggle { background: var(--verde); }
.toggle-label input:checked + .toggle::after { transform: translateX(20px); }

/* ─── DOIS COLUNAS ───────────────────────────── */
.dois-colunas { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.section-titulo { font-size: 14px; font-weight: 600; color: var(--texto); margin-bottom: 12px; font-family: 'Playfair Display', serif; }
.link-ver-mais { display: inline-block; font-size: 12px; color: var(--cor-primaria); margin-top: 10px; text-decoration: none; font-weight: 500; }
.link-ver-mais:hover { text-decoration: underline; }
.vazio { color: var(--texto2); font-size: 13px; padding: 30px; text-align: center; background: var(--card); border: 1px dashed var(--borda); border-radius: var(--radius); }
.info-box { background: var(--cinza-claro); border: 1px solid var(--borda); border-radius: var(--radius); padding: 14px 16px; font-size: 13px; line-height: 1.8; color: var(--texto2); }

/* ─── LOGIN ──────────────────────────────────── */
.login-body {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-body::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(26,86,219,0.15) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 50%, rgba(96,165,250,0.1) 0%, transparent 60%);
}

.login-container { width: 100%; max-width: 420px; padding: 20px; position: relative; z-index: 1; }

.login-card {
  background: rgba(255,255,255,0.97);
  border-radius: 20px;
  padding: 40px 36px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.1);
}

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

.login-logo-img {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  object-fit: contain;
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(26,86,219,0.2);
}

.login-logo-icone {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, var(--cor-primaria), #60a5fa);
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: white;
  margin-bottom: 12px;
  box-shadow: 0 8px 24px rgba(26,86,219,0.3);
}

.login-titulo { font-size: 20px; font-weight: 600; margin-bottom: 4px; color: var(--texto); font-family: 'Playfair Display', serif; }
.login-sub { font-size: 13px; color: var(--texto2); }
.login-form { display: flex; flex-direction: column; gap: 16px; }

/* ─── LOGO UPLOAD PREVIEW ────────────────────── */
.logo-preview {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  object-fit: contain;
  border: 2px solid var(--borda);
  background: var(--fundo);
  padding: 4px;
}

/* ─── RESPONSIVO ─────────────────────────────── */
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dois-colunas { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .campo.full { grid-column: 1; }
}
@media (max-width: 640px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .content { padding: 16px; }
}
