:root{
  --cor-principal:#1E88E5;
  --cor-secundaria:#0D1B2A;
  --bg:#F4F7FA;
  --card:#FFFFFF;
  --border:#DCE3EA;
  --text:#1A2530;
  --muted:#64748B;
  --success:#2E7D32;
  --danger:#C62828;
}
*{box-sizing:border-box;}
html,body{margin:0; padding:0;}
[hidden]{display:none !important;}
.overlay{position:fixed; inset:0; background:rgba(13,27,42,.5); display:flex; align-items:center; justify-content:center; z-index:100; padding:20px;}
.modal-box{background:#fff; width:100%; max-width:420px; max-height:88vh; overflow-y:auto; border-radius:14px; padding:20px;}
body{
  background:var(--bg); color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Inter,sans-serif;
  line-height:1.5;
}
.container{max-width:920px; margin:0 auto; padding:24px 20px 60px;}

.login-wrap{min-height:100vh; display:flex; align-items:center; justify-content:center; padding:20px;}
.login-card{background:var(--card); border:1px solid var(--border); border-radius:16px; padding:32px 28px; width:100%; max-width:360px; box-shadow:0 10px 30px rgba(13,27,42,.1);}
.login-card h1{font-size:20px; margin:0 0 4px;}
.login-card p.sub{color:var(--muted); font-size:13px; margin:0 0 22px;}
.campo{margin-bottom:14px;}
.campo label{display:block; font-size:12.5px; font-weight:600; color:var(--muted); margin-bottom:5px;}
.campo input, .campo textarea, .campo select{width:100%; padding:10px 12px; border:1.5px solid var(--border); border-radius:8px; font-size:14px;}
.campo input:focus, .campo textarea:focus{outline:none; border-color:var(--cor-principal);}
.btn{display:inline-flex; align-items:center; justify-content:center; gap:8px; border:none; border-radius:8px; padding:11px 18px; font-weight:700; font-size:14px; cursor:pointer;}
.btn-primary{background:var(--cor-principal); color:#fff; width:100%; margin-top:6px;}
.btn-primary:hover{filter:brightness(1.08);}
.btn-secundario{background:#fff; border:1.5px solid var(--border); color:var(--text);}
.erro{background:#FEF2F2; color:var(--danger); border:1px solid #FCA5A5; padding:9px 12px; border-radius:8px; font-size:13px; margin-bottom:14px;}
.sucesso{background:#F0FDF4; color:var(--success); border:1px solid #86EFAC; padding:9px 12px; border-radius:8px; font-size:13px; margin-bottom:14px;}
.credenciais-padrao{margin-top:18px; font-size:11.5px; color:var(--muted); text-align:center;}

.topbar{background:var(--cor-secundaria); color:#fff; padding:14px 20px; display:flex; align-items:center; justify-content:space-between;}
.topbar strong{font-size:15px;}
.topbar span{font-size:12px; color:rgba(255,255,255,.7);}

.aviso{background:#EAF3FC; border:1px solid #B6D7F5; color:#0D4A80; padding:12px 16px; border-radius:10px; font-size:13px; margin-bottom:20px;}

.painel{background:var(--card); border:1px solid var(--border); border-radius:14px; padding:20px 20px 22px; margin-bottom:18px;}
.painel h2{font-size:15px; margin:0 0 4px; display:flex; align-items:center; gap:8px;}
.painel .desc{font-size:12.5px; color:var(--muted); margin:0 0 16px;}

.grid-2{display:grid; grid-template-columns:1fr 1fr; gap:12px;}
@media (max-width:560px){ .grid-2{grid-template-columns:1fr;} }

.linha-toggle{display:flex; align-items:center; justify-content:space-between; padding:10px 0; border-bottom:1px solid var(--border);}
.linha-toggle:last-child{border-bottom:none;}
.switch{position:relative; display:inline-block; width:42px; height:24px; flex-shrink:0;}
.switch input{opacity:0; width:0; height:0;}
.slider{position:absolute; cursor:pointer; inset:0; background:#CBD2D9; transition:.15s; border-radius:999px;}
.slider::before{content:''; position:absolute; height:18px; width:18px; left:3px; bottom:3px; background:#fff; transition:.15s; border-radius:50%;}
.switch input:checked + .slider{background:var(--success);}
.switch input:checked + .slider::before{transform:translateX(18px);}

table.lista{width:100%; border-collapse:collapse; font-size:13px;}
table.lista th{text-align:left; font-size:11px; text-transform:uppercase; letter-spacing:.03em; color:var(--muted); padding:6px 8px; border-bottom:2px solid var(--border);}
table.lista td{padding:8px; border-bottom:1px solid var(--border); vertical-align:middle;}
table.lista input[type=text], table.lista input[type=number], table.lista select{width:100%; padding:6px 8px; border:1.5px solid var(--border); border-radius:6px; font-size:13px;}
table.lista input[type=number]{width:90px;}

.icon-btn{background:none; border:1.5px solid var(--border); border-radius:6px; width:28px; height:28px; display:inline-flex; align-items:center; justify-content:center; cursor:pointer; color:var(--muted);}
.icon-btn:hover{color:var(--text); border-color:var(--muted);}
.acoes{display:flex; gap:6px;}

.foto-wrap{position:relative; width:52px; height:52px;}
.foto-preview{width:52px; height:52px; border-radius:10px; object-fit:cover; background:#F0F0F0; display:flex; align-items:center; justify-content:center; font-size:22px; border:1px solid var(--border); cursor:pointer;}
.foto-input{position:absolute; inset:0; opacity:0; cursor:pointer;}

.rodape-painel{display:flex; justify-content:flex-end; gap:10px; margin-top:14px;}

.card-item{border:1px solid var(--border); border-radius:12px; padding:14px; margin-bottom:12px;}
.card-item-topo{display:flex; gap:12px; align-items:flex-start;}
.card-item-campos{flex:1; display:flex; flex-direction:column; gap:8px;}
.card-item-fotos{display:flex; gap:10px; margin-top:10px;}
.card-item-foto{flex:1; text-align:center;}
.card-item-foto label{display:block; font-size:11px; color:var(--muted); margin-bottom:4px;}

/* ---------- Agenda (calendário) ---------- */
.agenda-topo{display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:14px; flex-wrap:wrap;}
.agenda-nav{display:flex; align-items:center; gap:10px;}
.agenda-nav h3{font-size:16px; margin:0;}
.agenda-mes-grid{display:grid; grid-template-columns:repeat(7,1fr); gap:1px; background:var(--border); border:1px solid var(--border); border-radius:10px; overflow:hidden;}
.agenda-dia-nome{background:#EEF3F8; text-align:center; font-size:11px; font-weight:700; color:var(--muted); text-transform:uppercase; padding:8px 0;}
.agenda-dia{background:#fff; min-height:64px; padding:6px; cursor:pointer; position:relative;}
.agenda-dia:hover{background:#F5F9FD;}
.agenda-dia.fora-mes{background:#FAFBFC; color:#C2CBD4;}
.agenda-dia.hoje .agenda-dia-numero{background:var(--cor-principal); color:#fff; border-radius:50%;}
.agenda-dia-numero{font-size:12.5px; font-weight:600; display:inline-flex; align-items:center; justify-content:center; width:22px; height:22px;}
.agenda-dia-badge{position:absolute; bottom:6px; right:6px; background:var(--cor-principal); color:#fff; font-size:10px; font-weight:700; border-radius:999px; min-width:16px; height:16px; padding:0 4px; display:flex; align-items:center; justify-content:center;}
.agenda-lista-item{border:1px solid var(--border); border-radius:10px; padding:10px 12px; margin-bottom:8px;}
.agenda-lista-item-topo{display:flex; justify-content:space-between; align-items:center; gap:8px;}
.agenda-lista-item-horario{font-weight:700; font-size:13px; color:var(--cor-principal);}
.agenda-lista-item-cliente{font-weight:600; font-size:13.5px; margin-top:2px;}
.agenda-lista-item-info{font-size:12px; color:var(--muted); margin-top:3px;}
