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

:root {
    --blue:    #3b216d; /* #2563eb; */
    --blue-dk: #4a1d9e; /* #1d4ed8; */
    --red:     #ef4444;
    --green:   #16a34a;
    --gray-50: #f9fafb;
    --gray-100:#f3f4f6;
    --gray-200:#e5e7eb;
    --gray-400:#9ca3af;
    --gray-600:#4b5563;
    --gray-800:#1f2937;
    --radius:  8px;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--gray-100);
}

/* ── NAVBAR ─────────────────────────────────── */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    height: 60px;
    background: #dedede;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar-brand { font-size: 1.2rem; font-weight: 700; color: var(--blue); text-decoration: none; }
.navbar-links { display: flex; align-items: center; gap: 1rem; }
.navbar-links a { color: var(--gray-600); text-decoration: none; font-size: 0.9rem; }
.navbar-links a:hover { color: var(--blue); }

/* ── LAYOUT AUTH ────────────────────────────── */
.auth-body { background: var(--gray-100); display: flex; min-height: 100vh; align-items: center; justify-content: center; }
.auth-container { width: 100%; max-width: 640px; padding: 1rem; }
.auth-logo { display: block; text-align: center; font-size: 1.5rem; font-weight: 700; color: var(--blue); text-decoration: none; margin-bottom: 1.5rem; }
.auth-card { background: #fff; border-radius: 12px; border: 1px solid var(--gray-200); padding: 2rem; }
.auth-title { font-size: 1.4rem; font-weight: 700; color: var(--gray-800); margin-bottom: 4px; }
.auth-subtitle { font-size: 0.9rem; color: var(--gray-400); margin-bottom: 1.5rem; }
.auth-footer { text-align: center; font-size: 0.875rem; color: var(--gray-400); margin-top: 1.25rem; }
.auth-footer a { color: var(--blue); text-decoration: none; font-weight: 500; }

/* ── FORMULARIOS ────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 500; color: var(--gray-600); margin-bottom: 4px; }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.875rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.95rem;
    color: var(--gray-800);
    background: #fff;
    transition: border-color 0.15s;
    outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.form-group.has-error input { border-color: var(--red); }
.field-error { font-size: 0.8rem; color: var(--red); margin-top: 3px; display: block; }

.btn-submit {
    width: 100%;
    padding: 0.7rem;
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: background 0.15s;
}
.btn-submit:hover { background: var(--blue-dk); }

/* ── ALERTAS ────────────────────────────────── */
.alert { padding: 0.75rem 1rem; border-radius: var(--radius); font-size: 0.9rem; margin-bottom: 1rem; }
.alert-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ── MAIN CONTENT ───────────────────────────── */
main { max-width: 1800px; margin: 2rem auto; padding: 0 1.5rem; }

/* ── ERRORES ────────────────────────────────── */
.error-page { text-align: center; padding: 5rem 0; }
.error-page h1 { font-size: 5rem; color: var(--gray-200); font-weight: 700; }
.error-page p { color: var(--gray-400); margin: 1rem 0 1.5rem; }
.error-page a { color: var(--blue); text-decoration: none; font-weight: 500; }

/* ── PANEL — LAYOUT ─────────────────────────── */
.panel-layout { display: grid; grid-template-columns: 220px 1fr; gap: 1.5rem; align-items: start; }
.panel-sidebar { background: #fff; border-radius: 12px; border: 1px solid var(--gray-200); padding: 1rem; position: sticky; top: 76px; }
.panel-sidebar a { display: flex; align-items: center; gap: 8px; padding: 0.6rem 0.75rem; border-radius: var(--radius); color: var(--gray-600); text-decoration: none; font-size: 0.9rem; margin-bottom: 2px; }
.panel-sidebar a:hover, .panel-sidebar a.active { background: var(--gray-100); color: var(--blue); font-weight: 500; }
.panel-sidebar .slug-link {font-size: .8rem; color: #9ca3af; text-decoration: none; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.panel-sidebar .slug-link:hover {background: transparent; color: #6b7280; font-weight: 400; }
.panel-content { background: #fff; border-radius: 12px; border: 1px solid var(--gray-200); padding: 1.5rem; }
.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.panel-header h2 { font-size: 1.2rem; font-weight: 600; }

/* ── CARDS DE ESTADÍSTICAS ──────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card { background: var(--gray-50); border-radius: var(--radius); padding: 1.25rem; border: 1px solid var(--gray-200); }
.stat-label { font-size: 0.8rem; color: var(--gray-400); font-weight: 500; margin-bottom: 4px; }
.stat-value { font-size: 1.75rem; font-weight: 700; color: var(--gray-800); }

/* ── TABLA ──────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { text-align: left; padding: 0.6rem 1rem; background: var(--gray-50); color: var(--gray-600); font-weight: 500; font-size: 0.8rem; border-bottom: 1px solid var(--gray-200); }
td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--gray-100); color: var(--gray-800); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--gray-50); }

/* ── BADGE ESTADO CITA ──────────────────────── */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 500; }
.badge-pendiente  { background: #fef9c3; color: #854d0e; }
.badge-confirmada { background: #dcfce7; color: #166534; }
.badge-cancelada  { background: #fee2e2; color: #991b1b; }
.badge-completada { background: #ede9fe; color: #5b21b6; }

/* ── BOTONES ────────────────────────────────── */
.btn { display: inline-block; padding: 0.5rem 1.1rem; border-radius: var(--radius); font-size: 0.875rem; font-weight: 500; cursor: pointer; text-decoration: none; border: 1px solid transparent; transition: all 0.15s; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dk); }
.btn-outline { background: #fff; color: var(--gray-600); border-color: var(--gray-200); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }
.btn-danger { background: var(--red); color: #fff; }

/* ── PÁGINA PÚBLICA DE RESERVAS ─────────────── */
.reserva-header { text-align: center; padding: 2.5rem 1rem 1.5rem; }
.reserva-logo { width: 72px; height: 72px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 1.75rem; font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; }
.reserva-header h1 { font-size: 1.5rem; font-weight: 700; }
.reserva-header p  { color: var(--gray-400); font-size: 0.9rem; }

.pasos { display: flex; justify-content: center; gap: 0; margin: 1.5rem 0; }
.paso  { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--gray-400); }
.paso.activo  { color: var(--blue); font-weight: 600; }
.paso.hecho   { color: var(--green); }
.paso-num { width: 24px; height: 24px; border-radius: 50%; border: 2px solid currentColor; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; }
.paso-sep { width: 32px; height: 2px; background: var(--gray-200); margin: 0 4px; }

.servicios-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.servicio-card { border: 2px solid var(--gray-200); border-radius: var(--radius); padding: 1rem; cursor: pointer; transition: all 0.15s; }
.servicio-card:hover, .servicio-card.selected { border-color: var(--blue); background: #eff6ff; }
.servicio-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.servicio-card .duracion { font-size: 0.8rem; color: var(--gray-400); }
.servicio-card .precio { font-size: 1rem; font-weight: 700; color: var(--blue); margin-top: 4px; }

.slots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; margin: 1rem 0; }
.slot-btn { padding: 0.5rem; border: 1px solid var(--gray-200); border-radius: var(--radius); background: #fff; cursor: pointer; font-size: 0.9rem; font-weight: 500; text-align: center; transition: all 0.15s; }
.slot-btn:hover, .slot-btn.selected { border-color: var(--blue); background: var(--blue); color: #fff; }

@media (max-width: 640px) {
    .panel-layout { grid-template-columns: 1fr; }
    .panel-sidebar { position: static; }
    main { padding: 0 1rem; }
}

.font-blanco {
  color: #fff
}

.aviso-plan {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1.1rem;
    border-radius: var(--radius);
    font-size: .9rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.aviso-plan a {
    font-weight: 600;
    text-decoration: none;
    margin-left: auto;
    white-space: nowrap;
}
.aviso-plan a:hover { text-decoration: underline; }

.aviso-plan--info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}
.aviso-plan--info a { color: #1d4ed8; }

.aviso-plan--warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}
.aviso-plan--warning a { color: #b45309; }

.aviso-plan--danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.aviso-plan--danger a { color: #dc2626; }

/* ── Sidebar footer ── */
.sidebar-footer {
    position: sticky;
    bottom: 0;
    background: #fff;
    border-top: 1px solid var(--gray-200);
    padding: .75rem;
    margin: .75rem -.75rem -.75rem;
    border-radius: 0 0 12px 12px;
}
.slug-link {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .82rem;
    font-weight: 600;
    color: var(--blue);
    text-decoration: none;
    margin-bottom: .2rem;
}
.slug-link:hover { text-decoration: underline; background: transparent !important; }
.slug-url {
    display: block;
    font-size: .72rem;
    color: var(--gray-400);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
nombre-enlace { font-size: .78rem; font-weight: 600; letter-spacing: .1rem; text-transform: lowercase; color: var(--blue); margin-bottom: .5rem; display: block; } 

