:root{
  --primario:#0EA5E9;
  --secundario:#0369A1;
  --acento:#2DD4BF;
  --fondo:#FFFFFF;
  --fondo-alt:#F1F5F9;
  --tarjeta:#FFFFFF;
  --tarjeta-shadow:rgba(0,0,0,0.08);
  --texto:#1E293B;
  --ok:#10B981;
  --bad:#EF4444;
  --muted:#94A3B8;
  --header-h: 60px;
}

body{
  margin:0;
  font-family:Arial, Helvetica, sans-serif;
  background:var(--fondo-alt);
  color:var(--texto);
  overflow-x:hidden;
}

/* Backdrop (móvil) */
.backdrop{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.35);
  display:none;
  z-index:8;
}
.backdrop.show{ display:block; }

/* HEADER */
.topbar{
  width:100%;
  background:var(--fondo);
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 18px;
  box-shadow:0 2px 5px rgba(0,0,0,0.07);
  position:fixed;
  top:0;
  left:0;
  z-index:10;
}

.btn-menu{
  font-size:26px;
  cursor:pointer;
  color:var(--primario);
  background:none;
  border:none;
}

/* USUARIO */
.usuario-box{
  position:relative;
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:10px;
  padding:6px 15px;
  background:white;
  border-radius:15px;
  box-shadow:0 2px 6px rgba(0,0,0,0.09);
  max-width:240px;
  margin-right:6px;
  border:1px solid rgba(0,0,0,.06);
}

.usuario-icon{
  width:40px;
  height:40px;
  background:var(--primario);
  color:white;
  border-radius:50%;
  display:flex;
  justify-content:center;
  align-items:center;
  font-size:18px;
  flex-shrink:0;
}

.usuario-nombre{
  max-width:140px;
  font-weight:bold;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}

.flecha{ font-size:14px; opacity:.85; }

/* DROPDOWN */
.dropdown{
  display:none;
  position:absolute;
  top:56px;
  right:0;
  width:210px;
  background:white;
  border-radius:12px;
  box-shadow:0 10px 22px rgba(0,0,0,.18);
  overflow:hidden;
  z-index:20;
  border:1px solid rgba(0,0,0,.06);
}
.dropdown::before{
  content:"";
  position:absolute;
  top:-8px;
  right:18px;
  width:14px;
  height:14px;
  background:white;
  transform:rotate(45deg);
  border-left:1px solid rgba(0,0,0,.06);
  border-top:1px solid rgba(0,0,0,.06);
}
.dropdown button{
  width:100%;
  padding:14px;
  border:none;
  background:none;
  text-align:left;
  font-size:15px;
  cursor:pointer;
}
.dropdown button:hover{ background:var(--fondo-alt); }

/* MENÚ LATERAL */
.menu{
  width:240px;
  background:var(--secundario);
  padding:12px 0;
  color:white;
  position:fixed;

  /* ✅ No se encime: depende del header real */
  top:var(--header-h);
  height:calc(100vh - var(--header-h));

  left:-240px;
  transition:0.25s ease;
  z-index:9;
}

.menu.open{ left:0; }

.menu button{
  width:100%;
  padding:14px 16px;
  background:none;
  border:none;
  color:white;
  text-align:left;
  cursor:pointer;
  font-size:17px;
}
.menu button:hover{ background:rgba(255,255,255,0.15); }

/* CONTENIDO */
.contenido{
  padding:25px;
  background:var(--fondo);
  margin-top:var(--header-h);
  transition:margin-left .25s ease;
  min-height:calc(100vh - var(--header-h));
}

.contenido.push{ margin-left:240px; }

.seccion{
  display:none;
  animation:fade .3s ease;
}

@keyframes fade{
  from{opacity:0; transform:translateY(10px);}
  to{opacity:1; transform:translateY(0);}
}

/* TARJETAS */
.card{
  background:var(--tarjeta);
  padding:25px;
  border-radius:15px;
  margin-bottom:20px;
  box-shadow:0 3px 8px var(--tarjeta-shadow);
  border-left:6px solid var(--primario);
}

/* FORMULARIOS */
label{
  font-weight:bold;
  display:block;
  margin:12px 0 5px 0;
}

input, select{
  width:80%;
  max-width:320px;
  padding:12px;
  border:2px solid #d3e1eb;
  border-radius:10px;
  background:white;
  font-size:15px;
  margin:auto;
  display:block;
  transition:0.2s;
}

input:focus, select:focus{
  border-color:var(--primario);
  outline:none;
  box-shadow:0 0 5px rgba(14,165,233,0.4);
}

.btn{
  background:var(--primario);
  color:white;
  padding:14px 20px;
  font-size:16px;
  border:none;
  border-radius:10px;
  cursor:pointer;
  transition:0.2s;
  width:100%;
  margin-top:15px;
}
.btn:hover{ background:#0a8dcc; }

/* CALENDARIO */
.cal-toolbar{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  margin-bottom:10px;
}

.chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:12px;
  background:var(--fondo-alt);
  font-size:14px;
  color:var(--texto);
}

/* ✅✅✅ AQUI VA LO QUE TE FALTA (BOTONES DISEÑO) ✅✅✅ */
.actions{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:flex-end;
}

.btn-mini{
  border:1px solid #cbd5e1;
  background:white;
  color:#0f172a;
  padding:10px 14px;
  border-radius:12px;
  font-size:14px;
  font-weight:600;
  cursor:pointer;
  box-shadow:0 2px 6px rgba(0,0,0,.08);
  transition:all .15s ease;
  line-height:1;
}

.btn-mini:hover{
  background:#f1f5f9;
  box-shadow:0 8px 18px rgba(0,0,0,.15);
}

.btn-mini:active{
  transform:translateY(1px);
}
/* ✅✅✅ FIN BOTONES ✅✅✅ */

.legend{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:10px;
  justify-content:center;
}

.dot{
  width:10px; height:10px; border-radius:50%;
  display:inline-block;
}
.dot.ok{ background:var(--ok); }
.dot.bad{ background:var(--bad); }
.dot.muted{ background:var(--muted); }

table.cal{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border-radius:14px;
  box-shadow:0 3px 8px var(--tarjeta-shadow);
  background:white;
}

table.cal th, table.cal td{
  border-bottom:1px solid #e8eef5;
  border-right:1px solid #e8eef5;
  padding:12px;
  text-align:center;
  font-size:14px;
}

table.cal th{
  background:var(--fondo-alt);
  font-weight:bold;
}
table.cal tr:last-child td{ border-bottom:none; }
table.cal td:last-child, table.cal th:last-child{ border-right:none; }

.slot{
  display:inline-block;
  padding:8px 10px;
  border-radius:10px;
  font-weight:bold;
  cursor:default;
  min-width:110px;
}

.slot.disponible{
  background:rgba(16,185,129,0.12);
  color:#047857;
  border:1px solid rgba(16,185,129,0.35);
}

.slot.ocupado{
  background:rgba(239,68,68,0.10);
  color:#991B1B;
  border:1px solid rgba(239,68,68,0.30);
}

.slot.no-servicio{
  background:rgba(148,163,184,0.12);
  color:#334155;
  border:1px solid rgba(148,163,184,0.35);
}

.hint{
  font-size:13px;
  color:#475569;
  margin-top:8px;
  text-align:center;
}

.mini{
  font-size:13px;
  color:#334155;
  margin:0;
  text-align:center;
}

/* Responsive: en móvil el menú no empuja */
@media (max-width: 980px){
  .contenido.push{ margin-left:0; }
}
