/* public/assets/css/app.css */

:root {
  --negro:    #292929;
  --matcha:   #C9D0BC;
  --oro:      #D4A643;
  --vainilla: #ECE8DD;
  --blanco:   #F6F6F6;

  --font-main: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-title: 'Playfair Display', Georgia, serif;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(41,41,41,.09);
  --transition: .18s ease;
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font-main); background: var(--blanco); color: var(--negro); line-height: 1.6; }
img  { max-width: 100%; display: block; }
a    { color: var(--oro); text-decoration: none; }
a:hover { text-decoration: underline; }

/* TIPOGRAFÍA */
h1,h2,h3,h4,h5 { font-family: var(--font-title); color: var(--negro); line-height: 1.2; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }

/* UTILIDADES */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.d-flex { display: flex; }
.gap-1  { gap: .5rem; }
.gap-2  { gap: 1rem; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.w-100 { width: 100%; }

/* BOTONES */
.btn {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .55rem 1.3rem; border-radius: var(--radius);
  font-size: .93rem; font-weight: 600; border: 2px solid transparent;
  cursor: pointer; transition: var(--transition); text-decoration: none;
}
.btn-primary   { background: var(--matcha); color: var(--negro); border-color: var(--matcha); }
.btn-primary:hover { background: #b4bea9; border-color: #b4bea9; text-decoration: none; }
.btn-gold      { background: var(--oro); color: #fff; border-color: var(--oro); }
.btn-gold:hover{ background: #b88b32; border-color: #b88b32; text-decoration: none; }
.btn-outline   { background: transparent; color: var(--negro); border-color: var(--oro); }
.btn-outline:hover { background: var(--vainilla); text-decoration: none; }
.btn-danger    { background: #c0392b; color: #fff; border-color: #c0392b; }
.btn-danger:hover { background: #962d22; text-decoration: none; }
.btn-sm { padding: .3rem .8rem; font-size: .82rem; }
.btn-lg { padding: .75rem 1.8rem; font-size: 1.05rem; }

/* ALERTS / FLASH */
.alert { padding: .85rem 1.2rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: .93rem; }
.alert-success { background: #d4edda; color: #155724; border-left: 4px solid #28a745; }
.alert-error   { background: #f8d7da; color: #721c24; border-left: 4px solid #dc3545; }
.alert-info    { background: #d1ecf1; color: #0c5460; border-left: 4px solid #17a2b8; }
.alert-warning { background: #fff3cd; color: #856404; border-left: 4px solid #ffc107; }

/* FORMS */
.form-group { margin-bottom: 1.1rem; }
.form-label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .35rem; color: var(--negro); }
.form-control {
  width: 100%; padding: .6rem .9rem;
  border: 1.5px solid var(--oro); border-radius: var(--radius);
  font-size: .95rem; color: var(--negro); background: #fff;
  transition: var(--transition); outline: none;
}
.form-control:focus { border-color: #b88b32; box-shadow: 0 0 0 3px rgba(212,166,67,.15); }
.form-hint { font-size: .78rem; color: #666; margin-top: .25rem; }
textarea.form-control { resize: vertical; min-height: 90px; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M0 0l6 8 6-8z' fill='%23D4A643'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9rem center; padding-right: 2.2rem; }

/* CHECKBOX & RADIO */
.form-check { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; cursor: pointer; }
.form-check input[type=checkbox], .form-check input[type=radio] { accent-color: var(--oro); width: 16px; height: 16px; }

/* CARDS */
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-header { background: var(--matcha); padding: 1rem 1.4rem; border-bottom: 2px solid var(--oro); }
.card-header h2, .card-header h3 { color: var(--negro); margin: 0; }
.card-body { padding: 1.4rem; }
.card-footer { padding: .9rem 1.4rem; background: var(--vainilla); border-top: 1px solid var(--oro); }

/* TABLES */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data-table thead tr { background: var(--matcha); }
table.data-table th { padding: .7rem 1rem; text-align: left; font-weight: 700; color: var(--negro); border-bottom: 2px solid var(--oro); }
table.data-table td { padding: .65rem 1rem; border-bottom: 1px solid #e8e8e8; vertical-align: middle; }
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr:hover td { background: var(--vainilla); }

/* BADGES */
.badge { display: inline-block; padding: .2rem .65rem; border-radius: 50px; font-size: .75rem; font-weight: 700; }
.badge-active   { background: #d4edda; color: #155724; }
.badge-inactive { background: #f8d7da; color: #721c24; }
.badge-discount { background: var(--oro); color: #fff; }
.badge-pending  { background: #fff3cd; color: #856404; }
.badge-confirmed{ background: #d4edda; color: #155724; }
.badge-cancelled{ background: #f8d7da; color: #721c24; }
.badge-completed{ background: var(--matcha); color: var(--negro); }

/* NAVBAR */
.navbar {
  background: var(--negro); color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: .8rem 1.5rem; position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.navbar-brand { font-family: var(--font-title); font-size: 1.4rem; color: var(--oro); font-weight: 700; }
.navbar-brand:hover { text-decoration: none; color: var(--matcha); }
.navbar-nav { display: flex; align-items: center; gap: 1.2rem; list-style: none; }
.navbar-nav a { color: var(--matcha); font-size: .9rem; font-weight: 500; transition: var(--transition); }
.navbar-nav a:hover { color: var(--oro); text-decoration: none; }
.navbar-nav a.active { color: var(--oro); }

/* SIDEBAR ADMIN */
.layout-admin { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; background: var(--negro); color: #fff;
  display: flex; flex-direction: column; position: fixed;
  top: 0; left: 0; height: 100vh; overflow-y: auto; z-index: 50;
  transition: var(--transition);
}
.sidebar-brand {
  padding: 1.4rem 1.2rem; border-bottom: 1px solid rgba(212,166,67,.3);
  font-family: var(--font-title); font-size: 1.2rem; color: var(--oro); font-weight: 700;
}
.sidebar-brand small { display: block; font-family: var(--font-main); font-size: .72rem; color: var(--matcha); font-weight: 400; margin-top: 2px; }
.sidebar-nav { flex: 1; padding: 1rem 0; }
.sidebar-section { padding: .5rem 1.2rem .2rem; font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: rgba(201,208,188,.5); font-weight: 700; }
.sidebar-nav a {
  display: flex; align-items: center; gap: .7rem;
  padding: .6rem 1.2rem; color: var(--matcha); font-size: .88rem;
  transition: var(--transition); border-left: 3px solid transparent;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
  color: var(--oro); background: rgba(212,166,67,.08);
  border-left-color: var(--oro); text-decoration: none;
}
.sidebar-footer { padding: 1rem 1.2rem; border-top: 1px solid rgba(212,166,67,.2); font-size: .8rem; color: rgba(201,208,188,.7); }
.main-content { margin-left: 240px; flex: 1; padding: 2rem 2rem; min-height: 100vh; }

/* PAGE HEADER */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.8rem; padding-bottom: 1rem; border-bottom: 2px solid var(--oro); }
.page-header h1 { font-size: 1.7rem; }

/* GRID */
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* SERVICE CARD */
.service-card { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #fff; transition: var(--transition); }
.service-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(41,41,41,.13); }
.service-card img { width: 100%; height: 180px; object-fit: cover; }
.service-card-img-placeholder { width: 100%; height: 180px; background: var(--vainilla); display: flex; align-items: center; justify-content: center; color: var(--oro); font-size: 2.5rem; }
.service-card-body { padding: 1rem; }
.service-card-name { font-weight: 700; font-size: 1rem; margin-bottom: .3rem; }
.service-card-price { font-size: 1.15rem; color: var(--oro); font-weight: 700; }
.service-card-original { font-size: .85rem; color: #999; text-decoration: line-through; }
.service-card-discount { position: absolute; top: 10px; right: 10px; }

/* SCHEDULE / AGENDA */
.agenda-grid { display: grid; grid-template-columns: 80px 1fr; border: 1.5px solid var(--oro); border-radius: var(--radius); overflow: hidden; }
.agenda-time { background: var(--vainilla); font-size: .78rem; font-weight: 700; color: var(--negro); border-bottom: 1px solid #ddd; padding: .4rem .5rem; display: flex; align-items: center; justify-content: flex-end; }
.agenda-slot { border-bottom: 1px solid #eee; min-height: 55px; padding: .3rem .5rem; position: relative; }
.agenda-event { background: var(--matcha); border-left: 3px solid var(--oro); border-radius: 5px; padding: .3rem .5rem; font-size: .78rem; margin-bottom: .2rem; }
.agenda-event-title { font-weight: 700; }
.agenda-event-sub { color: #555; }

/* PHOTO UPLOAD PREVIEW */
.photo-preview { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 3px solid var(--oro); margin-bottom: .75rem; }
.photo-placeholder { width: 120px; height: 120px; border-radius: 50%; background: var(--vainilla); border: 3px solid var(--oro); display: flex; align-items: center; justify-content: center; font-size: 2.5rem; color: var(--oro); margin-bottom: .75rem; }

/* HAMBURGER mobile */
.hamburger { display: none; background: none; border: none; color: var(--matcha); font-size: 1.5rem; cursor: pointer; }

/* PAGINATION */
.pagination { display: flex; gap: .4rem; justify-content: center; margin-top: 1.5rem; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 6px; font-size: .85rem; border: 1.5px solid var(--oro); color: var(--negro); transition: var(--transition); }
.pagination a:hover { background: var(--vainilla); text-decoration: none; }
.pagination .current { background: var(--oro); color: #fff; border-color: var(--oro); }

/* DISCOUNT toggle */
.discount-fields { display: none; }
.discount-fields.visible { display: block; }

/* STEP INDICATOR */
.steps { display: flex; justify-content: center; gap: 0; margin-bottom: 2rem; }
.step { display: flex; align-items: center; gap: .5rem; }
.step-circle { width: 34px; height: 34px; border-radius: 50%; background: var(--vainilla); border: 2px solid var(--oro); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .88rem; color: var(--negro); transition: var(--transition); }
.step.active .step-circle { background: var(--oro); color: #fff; }
.step.done .step-circle { background: var(--matcha); }
.step-label { font-size: .8rem; color: #666; }
.step-line { width: 50px; height: 2px; background: var(--oro); opacity: .3; margin: 0 .2rem; }
.step.done .step-line { opacity: 1; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding: 1rem; }
  .hamburger { display: block; }
  .grid-3 { grid-template-columns: repeat(2,1fr); }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 600px) {
  h1 { font-size: 1.6rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; gap: .75rem; }
  .navbar { padding: .7rem 1rem; }
}
