:root{
    --dark:#0b1220;
    --dark2:#111827;
    --primary:#6d35f2;
    --primary2:#4f22d8;
    --soft:#f6f7fb;
    --muted:#667085;
    --danger:#ef4444;
    --success:#16a34a;
    --warning:#f59e0b;
    --blue:#2563eb;
}
*{box-sizing:border-box}
body{font-family:Inter,system-ui,-apple-system,Segoe UI,Arial,sans-serif;background:var(--soft);color:#101828}
a{text-decoration:none}
.navbar-public{height:78px;background:white;border-bottom:1px solid #e5e7eb;display:flex;align-items:center;position:sticky;top:0;z-index:10}
.brand{font-weight:900;font-size:30px;color:#0b1220}
.brand span{color:var(--primary)}
.logo-circle{width:42px;height:42px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:#0b1220;color:white;margin-right:8px}
.nav-link-main{color:#101828;font-weight:700;padding:18px 20px;border-bottom:3px solid transparent}
.nav-link-main.active{color:var(--primary);border-color:var(--primary)}
.btn-purple{background:linear-gradient(135deg,var(--primary),var(--primary2));color:white;border:0;border-radius:12px;padding:10px 18px;font-weight:800;box-shadow:0 8px 18px rgba(109,53,242,.25)}
.btn-purple:hover{color:white;opacity:.95}
.btn-outline-purple{border:1px solid var(--primary);color:var(--primary);border-radius:12px;padding:10px 16px;font-weight:800;background:white}
.hero{background:linear-gradient(120deg,#fff7ed,#fff,#f4f0ff);padding:48px 0 28px}
.hero h1{font-weight:950;font-size:52px;line-height:1.05;color:#080d30}
.hero p{font-size:20px;color:#475467}
.hero-img{height:290px;object-fit:cover;border-radius:80px 0 0 80px;width:100%;box-shadow:0 20px 40px rgba(0,0,0,.12)}
.card-soft{background:white;border:1px solid #e5e7eb;border-radius:22px;box-shadow:0 10px 26px rgba(15,23,42,.08)}
.business-card{overflow:hidden}
.business-card img{height:180px;width:100%;object-fit:cover}
.badge-pill{display:inline-flex;border-radius:999px;padding:7px 12px;font-size:13px;font-weight:800}
.badge-active{background:#dcfce7;color:#166534}
.badge-inactive{background:#ffedd5;color:#9a3412}
.badge-pending{background:#fef3c7;color:#92400e}
.badge-confirmed{background:#dcfce7;color:#166534}
.badge-attended{background:#dbeafe;color:#1d4ed8}
.badge-cancelled{background:#fee2e2;color:#991b1b}
.badge-reprogrammed{background:#ede9fe;color:#5b21b6}
.sidebar{background:linear-gradient(180deg,#08111f,#101827);min-height:100vh;color:white;padding:24px 16px;position:fixed;width:285px;left:0;top:0}
.sidebar .brand{color:white;font-size:28px;margin-bottom:36px;display:block}
.sidebar small{color:#c4b5fd;font-weight:700}
.sidebar a{display:flex;gap:12px;align-items:center;color:#e5e7eb;font-weight:700;padding:13px 16px;border-radius:12px;margin-bottom:8px}
.sidebar a.active,.sidebar a:hover{background:linear-gradient(135deg,var(--primary),var(--primary2));color:white}
.sidebar-footer{position:absolute;bottom:18px;left:16px;right:16px}
.admin-main{margin-left:285px;min-height:100vh}
.topbar{height:86px;background:white;border-bottom:1px solid #e5e7eb;display:flex;align-items:center;justify-content:space-between;padding:0 34px}
.content{padding:30px 34px}
.stat-card{background:white;border:1px solid #e5e7eb;border-radius:18px;padding:22px;box-shadow:0 8px 24px rgba(15,23,42,.06)}
.stat-icon{width:58px;height:58px;border-radius:16px;display:flex;align-items:center;justify-content:center;font-size:25px}
.form-control,.form-select{border-radius:12px;padding:11px 14px;border:1px solid #d8deea}
.table{margin-bottom:0}
.table th{color:#475467;font-size:13px;padding:16px;background:#f8fafc}
.table td{padding:16px;vertical-align:middle}
.action-btn{width:40px;height:40px;border-radius:10px;border:1px solid #ded7ff;color:var(--primary);background:white}
.action-danger{border-color:#fecdd3;color:#e11d48}
@media(max-width:900px){
    .sidebar{position:relative;width:100%;min-height:auto}
    .admin-main{margin-left:0}
    .hero h1{font-size:38px}
    .hero-img{border-radius:24px;height:220px}
}


/* Filtros circulares del dashboard */
.filter-circle-group{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    align-items:center;
}
.filter-circle{
    width:82px;
    height:82px;
    border-radius:50%;
    border:1px solid #ded7ff;
    background:white;
    color:#4f22d8;
    font-weight:900;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    line-height:1.1;
    box-shadow:0 8px 18px rgba(15,23,42,.06);
    transition:.2s;
}
.filter-circle small{
    font-size:11px;
    font-weight:700;
    color:#667085;
}
.filter-circle:hover,
.filter-circle.active{
    background:linear-gradient(135deg,var(--primary),var(--primary2));
    color:white;
    transform:translateY(-2px);
}
.filter-circle:hover small,
.filter-circle.active small{
    color:white;
}
.custom-date-box{
    border:1px solid #e5e7eb;
    background:#f8fafc;
    border-radius:18px;
    padding:14px;
}


/* Cuadrícula de turnos para el cliente */
.slot-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(135px,1fr));
    gap:12px;
}
.slot-card{
    border:2px solid #e5e7eb;
    background:#ffffff;
    border-radius:18px;
    padding:14px 10px;
    min-height:106px;
    text-align:center;
    cursor:pointer;
    transition:.2s;
    box-shadow:0 8px 18px rgba(15,23,42,.06);
}
.slot-card:hover{
    border-color:#6d35f2;
    transform:translateY(-2px);
}
.slot-card.selected{
    background:linear-gradient(135deg,var(--primary),var(--primary2));
    border-color:var(--primary);
    color:white;
}
.slot-card.disabled{
    opacity:.60;
    background:#f3f4f6;
    border-color:#e5e7eb;
    color:#667085;
    cursor:not-allowed;
    transform:none;
}
.slot-card.disabled:hover{
    border-color:#e5e7eb;
    transform:none;
}
.slot-number{
    width:34px;
    height:34px;
    border-radius:50%;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:#ede9fe;
    color:#4f22d8;
    font-weight:900;
    margin-bottom:8px;
}
.slot-card.selected .slot-number{
    background:white;
    color:#4f22d8;
}
.slot-card.disabled .slot-number{
    background:#e5e7eb;
    color:#667085;
}
.slot-time{
    font-weight:900;
    font-size:15px;
}
.slot-status{
    font-size:12px;
    font-weight:800;
    margin-top:6px;
}
.slot-status.available{
    color:#16a34a;
}
.slot-card.selected .slot-status.available{
    color:white;
}
.slot-status.blocked{
    color:#dc2626;
}


/* V18 - Dashboard profesional */
.metric-card-pro{
    background:linear-gradient(135deg,#ffffff,#f8f7ff);
    border:1px solid #ebe7ff;
    border-radius:26px;
    padding:22px;
    box-shadow:0 14px 35px rgba(15,23,42,.08);
    min-height:150px;
}
.metric-card-pro .metric-label{
    color:#667085;
    font-weight:800;
    font-size:13px;
    text-transform:uppercase;
    letter-spacing:.04em;
}
.metric-card-pro .metric-value{
    font-size:30px;
    font-weight:950;
    color:#111827;
    margin:8px 0 4px;
}
.metric-card-pro .metric-foot{
    color:#667085;
    font-size:13px;
}
.metric-icon-pro{
    width:48px;
    height:48px;
    border-radius:18px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:24px;
    background:linear-gradient(135deg,var(--primary),var(--primary2));
    color:white;
}
.report-filter-card{
    border:1px solid #ebe7ff;
    background:#fff;
    border-radius:24px;
    padding:18px;
    box-shadow:0 10px 26px rgba(15,23,42,.06);
}
.kpi-strip{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
    gap:14px;
}
.kpi-mini{
    background:#f8fafc;
    border:1px solid #e5e7eb;
    border-radius:20px;
    padding:16px;
}
.kpi-mini strong{
    display:block;
    font-size:22px;
    color:#111827;
}
.kpi-mini span{
    color:#667085;
    font-size:13px;
    font-weight:700;
}
.status-dot{
    width:10px;
    height:10px;
    border-radius:50%;
    display:inline-block;
    margin-right:6px;
}
.status-confirmed{background:#2563eb;}
.status-attended{background:#16a34a;}
.status-cancelled{background:#dc2626;}
.status-pending{background:#f59e0b;}


/* V19 - Menú superior para paneles */
.panel-topnav{
    position:sticky;
    top:0;
    z-index:1050;
    background:rgba(255,255,255,.96);
    backdrop-filter:blur(14px);
    border-bottom:1px solid #ebe7ff;
    box-shadow:0 8px 24px rgba(15,23,42,.06);
}
.panel-topnav .brand-top{
    display:flex;
    align-items:center;
    gap:10px;
    font-weight:950;
    color:#111827;
    text-decoration:none;
}
.topnav-links{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    align-items:center;
}
.topnav-links a{
    text-decoration:none;
    border:1px solid #ede9fe;
    color:#4f22d8;
    background:#fff;
    border-radius:999px;
    padding:9px 14px;
    font-weight:800;
    font-size:14px;
}
.topnav-links a.active,
.topnav-links a:hover{
    background:linear-gradient(135deg,var(--primary),var(--primary2));
    color:white;
    border-color:transparent;
}
.panel-content{
    padding:28px;
}
.panel-header-card{
    border:1px solid #ebe7ff;
    background:linear-gradient(135deg,#ffffff,#f8f7ff);
    border-radius:26px;
    padding:20px 24px;
    box-shadow:0 12px 28px rgba(15,23,42,.06);
    margin-bottom:24px;
}
.logout-top-btn{
    border:0;
    background:#111827;
    color:white;
    border-radius:999px;
    padding:10px 16px;
    font-weight:850;
}
.logout-top-btn:hover{
    background:#000;
}
@media(max-width:991px){
    .topnav-links{
        margin-top:12px;
    }
    .panel-content{
        padding:18px;
    }
}

/* Evitar que estilos anteriores de sidebar afecten nuevos layouts */
body:has(.panel-topnav) .sidebar{
    display:none !important;
}
body:has(.panel-topnav) .admin-main{
    margin-left:0 !important;
    width:100% !important;
}
body:has(.panel-topnav) .topbar{
    display:none !important;
}

/* Gráficas de reportes */
.report-chart-card{
    border:1px solid #ebe7ff;
    background:#fff;
    border-radius:26px;
    padding:22px;
    box-shadow:0 12px 30px rgba(15,23,42,.07);
    min-height:320px;
}
.report-chart-card h5{
    font-weight:950;
    margin-bottom:14px;
}

/* V34 */
.btn-danger{font-weight:850;}
