:root{
  --hermes-orange:#e07a2b;
  --hermes-orange-dark:#c65c17;
  --hermes-orange-light:#f3a96d;

  --bg:#fffaf6;
  --card:#fff;
  --muted:#6b6b6b;
  --shadow:0 6px 16px rgba(0,0,0,0.08);
  --radius:14px;
  --container:1100px;
}

*{
  box-sizing:border-box;
  font-family:Inter,ui-sans-serif,system-ui;
}

body{
  margin:0;
  background:var(--bg);
  color:#333;
}

/* ===========================
   CONTENEDOR GENERAL
=========================== */
.wrap{
  max-width:var(--container);
  margin:28px auto;
  padding:20px;
}

/* ===========================
   HEADER
=========================== */
header{
  display:flex;
  align-items:center;
  gap:16px;
  margin-bottom:18px;
}

.logo{
  width:52px;
  height:52px;
  border-radius:12px;
  background:linear-gradient(135deg,var(--hermes-orange),var(--hermes-orange-dark));
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-weight:700;
  font-size:18px;
  box-shadow:var(--shadow);
}

h1{margin:0;font-size:20px;}
p.lead{margin:0;font-size:14px;color:var(--muted);}

/* ===========================
   CARDS
=========================== */
.card{
  background:var(--card);
  border-radius:var(--radius);
  padding:16px 18px;
  box-shadow:var(--shadow);
}

/* ===========================
   FORMULARIOS
=========================== */
.form-bar{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:flex-end;
  background:#fff;
  padding:14px;
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  margin-bottom:16px;
}

.field{
  display:flex;
  flex-direction:column;
  flex:1;
  min-width:160px;
  margin-bottom:10px; /* separa grupos label+input del siguiente campo */
}

label{
  font-size:12px;
  color:#555;
  margin-bottom:2px; /* pegadito al input */
}

input,
select{
  padding:10px 12px;
  border-radius:10px;
  border:1px solid #eee;
  background:#fff;
  font-size:14px;
  transition:0.25s;
}

input:focus,
select:focus{
  outline:none;
  border-color:var(--hermes-orange);
  box-shadow:0 0 0 1px rgba(224,122,43,0.25);
}

/* ===========================
   BOTONES
=========================== */
.btn{
  padding:10px 14px;
  border-radius:10px;
  border:none;
  cursor:pointer;
  font-weight:700;
  display:inline-flex;
  align-items:center;
  gap:6px;
  transition:0.25s;
}

.btn-primary{
  background:var(--hermes-orange);
  color:#fff;
  box-shadow:0 6px 12px rgba(224,122,43,0.18);
}

/* hover bonito */
.btn-primary:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 16px rgba(224,122,43,0.28);
}

/* ===========================
   LISTA (USUARIOS / GUARDERÍAS)
=========================== */
.list-card{
  background:#fff;
  border-radius:var(--radius);
  padding:16px;
  box-shadow:var(--shadow);
  margin-top:22px;
}

.list-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:12px;
}

.pill{
  background:#ffe7d3;
  color:#9b4f14;
  padding:3px 8px;
  border-radius:999px;
  font-size:11px;
}

.users-list,
.guards-list{
  list-style:none;
  margin:0;
  padding:0;
}

.user-item,
.guard-item{
  background:#fffaf6;
  border:1px solid #f1e4da;
  padding:14px;
  border-radius:12px;
  margin-bottom:12px;
  position:relative;
}

.user-name,
.guard-name{
  font-size:15px;
  font-weight:700;
}

.user-meta,
.guard-meta{
  font-size:13px;
  color:var(--muted);
}

/* ===== BOTÓN EDITAR (LÁPIZ) ===== */
.btn-edit {
  position:absolute;
  top:14px;
  right:14px;
  width:38px;
  height:38px;
  border-radius:10px;
  background:var(--hermes-orange);
  border:none;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow:0 6px 12px rgba(224,122,43,.25);
  transition:.2s;
}

.btn-edit:hover{
  background:var(--hermes-orange-dark);
  transform:translateY(-1px);
}

.btn-edit svg{
  width:18px;
  height:18px;
  fill:white;
}



/* ===========================
   BUSCADOR (guarderías)
=========================== */
.search-bar{
  margin-bottom:12px;
}

.search-bar input{
  width:100%;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid #ddd;
  font-size:14px;
  transition:0.25s;
  background:#fff;
}

.search-bar input:focus{
  outline:none;
  border-color:var(--hermes-orange);
  box-shadow:0 0 0 1px rgba(224,122,43,0.25);
}

/* ===========================
   MENSAJES
=========================== */
.msg{
  margin-top:6px;
  font-size:13px;
}

.msg.ok{color:#0a7a0a;}
.msg.err{color:#b22;}

/* ===========================
   MODAL
=========================== */
.modal-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.35);
  backdrop-filter:blur(4px);
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:0;
  pointer-events:none;
  transition:0.25s ease;
}

.modal-overlay.show{
  opacity:1;
  pointer-events:auto;
}

.modal{
  background:white;
  width:92%;
  max-width:420px;
  border-radius:18px;
  padding:24px;
  box-shadow:0 12px 28px rgba(0,0,0,0.18);
  transform:translateY(30px) scale(0.95);
  opacity:0;
  transition:0.3s ease;
}

.modal.show{
  transform:translateY(0) scale(1);
  opacity:1;
}

.modal h3{
  text-align:center;
  color:var(--hermes-orange-dark);
  margin-top:0;
}

.modal .field input,
.modal .field select{
  background:#fffaf6;
  margin-top:4px;
  border:1px solid #eee;
  border-radius:10px;
}

/* BOTONES DEL MODAL */
.modal-buttons{
  display:flex;
  gap:10px;
  margin-top:14px;
}

.modal-buttons .btn-small{
  flex:1;
  padding:8px 0;
  border-radius:8px;
  font-size:12px;
  font-weight:700;
  border:none;
  outline:none;
}

.btn-save{
  background:var(--hermes-orange);
  color:white;
}

.btn-delete{
  background:#d6453f;
  color:white;
}

.close-modal{
  position:absolute;
  top:12px;
  right:16px;
  font-size:20px;
  cursor:pointer;
  color:#999;
}

/* ===========================
   AUTOCOMPLETE GUARDERÍAS
=========================== */
.guarderia-field {
  position: relative;
}

.guarderia-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  box-shadow: var(--shadow);
  max-height: 180px;
  overflow-y: auto;
  z-index: 50;
}

.guarderia-item {
  padding: 10px 12px;
  font-size: 14px;
  cursor: pointer;
}

.guarderia-item:hover {
  background: #fff3e6;
}

/* Autocomplete (buscar guardería en usuarios.php) */
.autocomplete{
  position:relative;
  margin-top:6px;
}
.ac-item{
  background:#fffaf6;
  border:1px solid #f1e4da;
  padding:10px 12px;
  border-radius:10px;
  margin-top:8px;
  cursor:pointer;
  font-size:13px;
}
.ac-item:hover{
  background:#ffe7d3;
}
.ac-item.muted{
  color:#777;
  cursor:default;
}


/* ===========================
   DROPDOWN BÚSQUEDA GUARDERÍAS
=========================== */
.dropdown-results{
  position:absolute;
  top:100%;
  left:0;
  right:0;
  background:#fff;
  border:1px solid #eee;
  border-radius:10px;
  box-shadow:0 8px 20px rgba(0,0,0,.08);
  z-index:50;
  max-height:220px;
  overflow-y:auto;
  display:none;
}

.dropdown-results div{
  padding:10px 12px;
  cursor:pointer;
  font-size:14px;
}

.dropdown-results div:hover{
  background:#fff3e6;
}

