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

:root {
  --clay: #d99685;          
  --sand: #2d2421;          
  --deep-brown: #1a1412;    
  --white: #241c19;         
  --border: #3d302b;        
  --text-main: #f5ede8;     
  --text-muted: #a68f85;    
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--deep-brown);
  color: var(--text-main);
  display: flex;
  min-height: 100vh;
}

sidebar {
  width: 260px;
  background-color: #110d0c;
  border-right: 1px solid var(--border);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

sidebar h2 {
  font-family: 'Playfair Display', serif;
  color: #ffffff;
  font-size: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  list-style: none;
}

.nav-item a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.8rem 1rem;
  display: block;
  border-radius: 12px;
  font-weight: 500;
  transition: 0.2s;
}

.nav-item a:hover, .nav-item.active a {
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--clay);
}

main {
  flex: 1;
  padding: 2.5rem;
  overflow-y: auto;
  background-color: var(--deep-brown);
}

.header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.header-main h1 {
  font-family: 'Playfair Display', serif;
  color: var(--text-main);
  font-size: 2.2rem;
}

.admin-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.bottom-management-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.card {
  background: var(--white);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
}

.card h3 {
  font-family: 'Playfair Display', serif;
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.calendar-day-view {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--white);
}

.time-slot-row {
  display: flex;
  border-bottom: 1px solid var(--border);
  min-height: 70px;
  position: relative;
}

.time-slot-row:last-child { 
  border-bottom: none; 
}

.time-label {
  width: 80px;
  padding: 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: right;
  border-right: 1px solid var(--border);
  background: #1f1816;
}

.slot-events {
  flex: 1;
  position: relative;
  background: #1c1513;
  padding: 4px;
  cursor: pointer;
}

.slot-events:hover {
  background: #2a201c;
}





.appointment-block .client { 
  font-weight: 700; 
}

.appointment-block .time { 
  font-size: 0.75rem; 
  color: var(--text-muted); 
}

.slot-blocked-status {
  background-color: #261b18 !important;
  font-style: italic;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 50px;
}

.services-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.service-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: #29201d;
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: 0.2s;
}

.service-item:hover { 
  border-color: var(--clay); 
}

.service-info h4 { 
  font-weight: 600; 
  font-size: 0.95rem; 
}

.service-info span { 
  font-size: 0.8rem; 
  color: var(--text-muted); 
}

.service-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-icon {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.4rem;
  border-radius: 8px;
  transition: 0.2s;
}

.btn-edit { color: #d9b685; }
.btn-edit:hover { background: #332724; }
.btn-delete { color: #ff7373; }
.btn-delete:hover { background: #3d1f1f; }

.btn-add {
  background-color: var(--clay);
  color: #1a1412;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 40px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}

.btn-add:hover { 
  background-color: #e5a798; 
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  padding: 0.6rem 0.8rem;
  background-color: #1c1513;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--text-main);
}

.form-control:focus {
  outline: none;
  border-color: var(--clay);
}

.date-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 40px;
  border: 1px solid var(--border);
}

.input-date {
  border: none;
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
}

.btn-nav-date {
  background: transparent;
  border: none;
  color: var(--clay);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.2rem 0.5rem;
  transition: 0.2s;
}

.btn-nav-date:hover {
  transform: scale(1.2);
}

.appointment-block {
  background: linear-gradient(135deg, #3d2a25 0%, #2e1f1b 100%);
  border-left: 4px solid var(--clay);
  border-radius: 10px;
  padding: 12px 16px;  /* DUPLICADO: antes 6px 10px */
  width: 100%;
  font-size: 0.9rem;  /* DUPLICADO: antes 0.75rem */
}

.appointment-block.dynamic {
  margin: 6px 0;  /* DUPLICADO: antes 2px 0 */
}

.empty-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 50px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Estilos del Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.7);
}

.modal-content {
  background-color: var(--white);
  margin: 10% auto;
  padding: 2rem;
  border-radius: 24px;
  width: 90%;
  max-width: 500px;
  border: 1px solid var(--border);
}

.modal-content h2 {
  margin-bottom: 1.5rem;
  font-family: 'Playfair Display', serif;
}

.modal-content input,
.modal-content select {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 1rem;
  background-color: #1c1513;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
}

.close {
  color: var(--text-muted);
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: var(--clay);
}

.btn-guardar {
  background-color: var(--clay);
  color: #1a1412;
  border: none;
  padding: 0.8rem;
  border-radius: 40px;
  width: 100%;
  font-weight: 600;
  cursor: pointer;
  margin-top: 1rem;
}

@media (max-width: 900px) {
  .bottom-management-row {
    grid-template-columns: 1fr;
  }
}

.slot-blocked-status {
  background: #261b18;
  justify-content: center;
  font-style: italic;
  font-size: 0.75rem;
  color: #705850;
  cursor: pointer;
}

.slot-blocked-status:hover {
  background: #3a2822;
  color: #a68f85;
}