:root {
    --sidebar-width: 240px;
    --brand: #4f46e5;
    --brand-dark: #3730a3;
    --bg: #f6f7fb;
    --border: #e5e7eb;
    --text-muted: #6b7280;
}

* { box-sizing: border-box; }

body {
    background: var(--bg);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #1f2937;
    margin: 0;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: #111827;
    color: #e5e7eb;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    padding: 0 20px 4px;
    color: #fff;
}

.sidebar-business {
    padding: 0 20px 20px;
    font-size: .8rem;
    color: #9ca3af;
    border-bottom: 1px solid #1f2937;
    margin-bottom: 12px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.sidebar-nav a {
    color: #d1d5db;
    text-decoration: none;
    padding: 10px 20px;
    font-size: .92rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover { background: #1f2937; color: #fff; }
.sidebar-nav a.active { background: #1f2937; color: #fff; border-left-color: var(--brand); }
.sidebar-nav a.disabled { opacity: .4; pointer-events: none; }

.sidebar-logout {
    padding: 0 20px;
}
.sidebar-logout button {
    width: 100%;
    background: transparent;
    border: 1px solid #374151;
    color: #d1d5db;
    padding: 8px;
    border-radius: 6px;
    font-size: .85rem;
    cursor: pointer;
}
.sidebar-logout button:hover { background: #1f2937; }

/* Main */
.main-content {
    flex: 1;
    min-width: 0;
}

.topbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar-title { font-weight: 600; font-size: 1.1rem; }
.topbar-user { color: var(--text-muted); font-size: .9rem; }
.menu-toggle { background: none; border: none; font-size: 1.4rem; }

.content-area { padding: 24px; }

/* Cards */
.stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 20px;
}
.stat-card .stat-value { font-size: 1.8rem; font-weight: 700; color: var(--brand-dark); }
.stat-card .stat-label { color: var(--text-muted); font-size: .85rem; }

.card-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.btn-brand {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
.btn-brand:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }

.badge-pendiente { background: #fef3c7; color: #92400e; }
.badge-confirmada { background: #dbeafe; color: #1e40af; }
.badge-completada { background: #dcfce7; color: #166534; }
.badge-cancelada { background: #fee2e2; color: #991b1b; }
.badge-no_asistio { background: #f3f4f6; color: #374151; }

.calendar-slot-list { display: flex; flex-direction: column; gap: 10px; }
.appt-row {
    border: 1px solid var(--border);
    border-left: 4px solid var(--brand);
    border-radius: 8px;
    padding: 12px 14px;
    background: #fff;
}
.appt-row.status-cancelada { border-left-color: #ef4444; opacity: .7; }
.appt-row.status-completada { border-left-color: #16a34a; }
.appt-row.status-no_asistio { border-left-color: #9ca3af; opacity: .8; }

@media (max-width: 992px) {
    .sidebar { position: fixed; left: -260px; z-index: 1000; transition: left .2s; }
    .sidebar.open { left: 0; }
}
