/* ==========================================
   PELUQUERÍA CLOUD - ESTILOS PRINCIPALES
   ========================================== */

/* --- RESET Y BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-font-smoothing: antialiased; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f4f1ee; color: #2d2a26; line-height: 1.6; }
a { color: #8b5cf6; text-decoration: none; }
a:hover { color: #7c3aed; }
img { max-width: 100%; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }

/* --- VARIABLES --- */
:root {
    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --primary-light: #ede9fe;
    --secondary: #ec4899;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --bg: #f4f1ee;
    --bg-card: #ffffff;
    --text: #2d2a26;
    --text-muted: #78716c;
    --border: #e7e5e4;
    --sidebar-bg: #1e1b2e;
    --sidebar-text: #d4d0e0;
    --sidebar-active: #8b5cf6;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
}

/* --- LAYOUT PRINCIPAL --- */
.app-layout { display: flex; min-height: 100vh; }

/* --- SIDEBAR --- */
.sidebar {
    width: 250px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}
.sidebar-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-header h1 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.sidebar-header h1 .logo-icon {
    width: 28px; height: 28px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}
.sidebar-nav { flex: 1; overflow-y: auto; padding: 0.75rem 0; }
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.5rem;
    color: var(--sidebar-text);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
}
.sidebar-nav a:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
}
.sidebar-nav a.active {
    background: rgba(139,92,246,0.15);
    color: #fff;
    border-left-color: var(--primary);
}
.sidebar-nav a svg { width: 18px; height: 18px; opacity: 0.7; flex-shrink: 0; }
.sidebar-nav a.active svg { opacity: 1; }
.sidebar-section { padding: 0.75rem 1.5rem 0.35rem; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.35); font-weight: 600; }
.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 0.85rem;
}
.sidebar-footer .user-info { display: flex; align-items: center; gap: 0.5rem; }
.sidebar-footer .user-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
}
.sidebar-footer .user-name { font-weight: 600; color: #fff; }
.sidebar-footer .user-role { font-size: 0.75rem; color: var(--sidebar-text); }

/* --- CONTENIDO PRINCIPAL --- */
.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 1.5rem 2rem;
    min-height: 100vh;
}
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.topbar h2 { font-size: 1.35rem; font-weight: 700; color: var(--text); }
.topbar-right { display: flex; align-items: center; gap: 1rem; }

/* --- AUTH LAYOUT --- */
.auth-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #1e1b2e 0%, #2d1b69 50%, #1e1b2e 100%);
}
.auth-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.auth-card {
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 4px 12px rgba(0,0,0,0.15);
    padding: 2.5rem 2.5rem 1.5rem;
    width: 100%;
    max-width: 420px;
}
.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}
.auth-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(139,92,246,0.35);
}
.auth-icon svg {
    color: #fff;
    stroke: #fff;
}
.auth-logo h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
}
.auth-logo p {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.auth-form .form-group {
    margin-bottom: 1.15rem;
}
.auth-form .btn-block {
    margin-top: 0.5rem;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
}
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}
.auth-footer p {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.auth-credentials-hint {
    margin-top: 1.25rem;
    padding: 0.85rem 1rem;
    background: #faf5ff;
    border: 1px solid #ede9fe;
    border-radius: 8px;
    font-size: 0.82rem;
    color: var(--text-muted);
    text-align: center;
}
.auth-credentials-hint strong {
    color: var(--text);
    display: block;
    margin-bottom: 0.3rem;
}
.auth-credentials-hint code {
    background: #ede9fe;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.82rem;
    color: #5b21b6;
}

/* --- CARDS --- */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}
.card-header h3 { font-size: 0.95rem; font-weight: 600; }
.card-body { padding: 1.25rem; }
.card-body.p-0 { padding: 0; }
.card-form { max-width: 800px; }
.mb-3 { margin-bottom: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.p-4 { padding: 1.5rem; }

/* --- TABLAS --- */
.table { width: 100%; border-collapse: collapse; }
.table th {
    text-align: left;
    padding: 0.65rem 1rem;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    background: #fafaf9;
    border-bottom: 1px solid var(--border);
}
.table td {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
    vertical-align: middle;
}
.table-hover tbody tr:hover { background: #fafaf9; }
.table-sm td, .table-sm th { padding: 0.4rem 0.75rem; font-size: 0.82rem; }
.row-warning { background: #fef3c7 !important; }
.row-muted { opacity: 0.5; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.small { font-size: 0.82rem; }

/* --- FORMULARIOS --- */
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--text);
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="url"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139,92,246,0.12);
}
.form-row { display: flex; gap: 1rem; }
.form-row .col-4 { flex: 0 0 calc(33.333% - 0.67rem); }
.form-row .col-6 { flex: 0 0 calc(50% - 0.5rem); }
.form-actions { display: flex; gap: 0.75rem; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.form-fieldset {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}
.form-fieldset legend {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0 0.5rem;
    color: var(--primary);
}
.checkbox-label { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; cursor: pointer; }
.inline-form { display: inline; }
.select-sm, .input-sm {
    padding: 0.3rem 0.5rem;
    font-size: 0.82rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
}
.date-input {
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.88rem;
}

/* --- BOTONES --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    font-size: 0.88rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    line-height: 1.4;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-block { width: 100%; justify-content: center; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.82rem; }
.btn-xs { padding: 0.2rem 0.5rem; font-size: 0.75rem; }

/* --- BADGES --- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 20px;
    background: #f5f5f4;
    color: var(--text-muted);
}
.badge-sm { font-size: 0.65rem; padding: 0.1rem 0.4rem; }
.badge-info { background: #dbeafe; color: #1d4ed8; }
.badge-success, .badge-completada, .badge-activo, .badge-recibido { background: #d1fae5; color: #065f46; }
.badge-warning, .badge-pendiente, .badge-enviado { background: #fef3c7; color: #92400e; }
.badge-danger, .badge-cancelada, .badge-anulada, .badge-inactivo { background: #fee2e2; color: #991b1b; }
.badge-confirmada { background: #dbeafe; color: #1d4ed8; }
.badge-en_curso { background: #ede9fe; color: #5b21b6; }
.badge-no_show { background: #fce7f3; color: #9d174d; }
.badge-pago { background: #f0fdf4; color: #166534; }
.badge-rol-admin { background: #fce7f3; color: #9d174d; }
.badge-rol-manager { background: #ede9fe; color: #5b21b6; }
.badge-rol-estilista { background: #dbeafe; color: #1d4ed8; }
.badge-rol-recepcionista { background: #d1fae5; color: #065f46; }
.badge-nivel-junior { background: #d1fae5; color: #065f46; }
.badge-nivel-senior { background: #dbeafe; color: #1d4ed8; }
.badge-nivel-master { background: #ede9fe; color: #5b21b6; }

/* --- ALERTAS --- */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.88rem;
    margin-bottom: 1rem;
}
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-danger, .alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.alert-info { background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe; }

/* --- PAGE HEADER --- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.header-left { display: flex; align-items: center; gap: 1rem; }
.header-actions { display: flex; gap: 0.5rem; }

/* --- KPIs --- */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.kpi-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.15rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.kpi-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
}
.kpi-icon.blue { background: #dbeafe; color: #2563eb; }
.kpi-icon.green { background: #d1fae5; color: #059669; }
.kpi-icon.purple { background: #ede9fe; color: #7c3aed; }
.kpi-icon.orange { background: #ffedd5; color: #ea580c; }
.kpi-data { display: flex; flex-direction: column; }
.kpi-value { font-size: 1.35rem; font-weight: 700; color: var(--text); line-height: 1.2; }
.kpi-label { font-size: 0.78rem; color: var(--text-muted); }

/* --- DASHBOARD --- */
.dashboard-grid { }
.dashboard-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.summary-row { display: flex; gap: 2rem; flex-wrap: wrap; }
.summary-item { display: flex; flex-direction: column; }
.summary-label { font-size: 0.82rem; color: var(--text-muted); }
.summary-value { font-size: 1.2rem; font-weight: 700; color: var(--text); }

/* --- AGENDA --- */
.view-toggle { display: flex; gap: 0.25rem; }
.date-nav { display: flex; align-items: center; gap: 0.5rem; }
.agenda-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.5rem; }
.week-day-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    min-height: 200px;
}
.week-day-card.today { border: 2px solid var(--primary); }
.week-day-header {
    padding: 0.5rem 0.6rem;
    background: #fafaf9;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
}
.week-day-body { padding: 0.4rem; }
.week-cita {
    padding: 0.35rem 0.5rem;
    margin-bottom: 0.3rem;
    border-radius: 6px;
    background: var(--primary-light);
    font-size: 0.75rem;
    border-left: 3px solid var(--primary);
}
.week-cita-time { font-weight: 700; display: block; }
.week-cita-client { display: block; }
.week-cita-service { display: block; color: var(--text-muted); font-size: 0.7rem; }
.cita-row.cita-completada { border-left: 3px solid var(--success); }
.cita-row.cita-cancelada { opacity: 0.5; }
.cita-row.cita-en_curso { border-left: 3px solid var(--primary); }
.color-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 0.3rem; }

/* --- ESTADOS SELECT --- */
.estado-pendiente { background: #fef3c7; }
.estado-confirmada { background: #dbeafe; }
.estado-en_curso { background: #ede9fe; }
.estado-completada { background: #d1fae5; }
.estado-cancelada { background: #fee2e2; }

/* --- BÚSQUEDA --- */
.search-form { display: flex; align-items: center; gap: 0.5rem; }
.search-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
    min-width: 280px;
}
.search-box svg { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; }
.search-box input { border: none; outline: none; background: none; flex: 1; font-size: 0.88rem; }
.filter-form { display: flex; align-items: center; gap: 0.5rem; font-size: 0.88rem; }
.filter-form label { font-weight: 600; }
.filter-form input { padding: 0.35rem 0.5rem; border: 1px solid var(--border); border-radius: 6px; }

/* --- CLIENTE PERFIL --- */
.profile-header { display: flex; gap: 1.25rem; align-items: flex-start; }
.profile-avatar {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    flex-shrink: 0;
}
.profile-info { flex: 1; }
.profile-info h2 { font-size: 1.3rem; margin-bottom: 0.25rem; }
.profile-meta { display: flex; gap: 1.25rem; font-size: 0.85rem; color: var(--text-muted); flex-wrap: wrap; }
.profile-stats { display: flex; gap: 1.5rem; text-align: center; }
.stat { display: flex; flex-direction: column; }
.stat-value { font-size: 1.15rem; font-weight: 700; color: var(--text); }
.stat-label { font-size: 0.75rem; color: var(--text-muted); }

/* --- TABS --- */
.tabs { display: flex; gap: 0.25rem; margin-bottom: 1rem; border-bottom: 2px solid var(--border); }
.tab {
    padding: 0.6rem 1.25rem;
    background: none;
    border: none;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* --- DETALLE --- */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.detail-item { display: flex; flex-direction: column; }
.detail-label { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.detail-value { font-size: 0.95rem; }

/* --- TPV --- */
.tpv-layout { display: grid; grid-template-columns: 1fr 350px; gap: 1.25rem; }
.tpv-totals { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.total-line { display: flex; justify-content: space-between; padding: 0.3rem 0; font-size: 0.9rem; }
.total-final { font-size: 1.2rem; font-weight: 700; color: var(--primary); border-top: 2px solid var(--border); padding-top: 0.5rem; margin-top: 0.25rem; }

/* --- TICKET IMPRESIÓN --- */
.ticket-container { max-width: 400px; margin: 0 auto; }
.ticket {
    background: #fff;
    border: 1px dashed var(--border);
    padding: 1.5rem;
    font-size: 0.85rem;
}
.ticket-header { text-align: center; margin-bottom: 1rem; border-bottom: 1px dashed var(--border); padding-bottom: 0.75rem; }
.ticket-header h2 { font-size: 1.1rem; }
.ticket-header p { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.15rem; }
.ticket-info { margin-bottom: 0.75rem; }
.ticket-info p { margin-bottom: 0.15rem; }
.ticket-lines { width: 100%; margin-bottom: 0.75rem; border-collapse: collapse; }
.ticket-lines th, .ticket-lines td { padding: 0.3rem 0; text-align: left; border-bottom: 1px dotted var(--border); font-size: 0.82rem; }
.ticket-totals { border-top: 1px dashed var(--border); padding-top: 0.5rem; }
.ticket-total-line { display: flex; justify-content: space-between; padding: 0.2rem 0; }
.ticket-total-final { font-weight: 700; font-size: 1.1rem; border-top: 2px solid var(--text); padding-top: 0.4rem; margin-top: 0.25rem; }
.ticket-footer { text-align: center; margin-top: 1rem; padding-top: 0.75rem; border-top: 1px dashed var(--border); color: var(--text-muted); }

/* --- MODAL --- */
.modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 200; align-items: center; justify-content: center; }
.modal.show { display: flex; }
.modal-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); }
.modal-content { position: relative; background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow-md); width: 90%; max-width: 500px; z-index: 1; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-size: 1rem; }
.modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-muted); }
.modal-body { padding: 1.25rem; }
.modal-footer { padding: 0.75rem 1.25rem; border-top: 1px solid var(--border); text-align: right; }

/* --- PROGRESS BAR --- */
.progress-bar-container { display: flex; align-items: center; gap: 0.5rem; }
.progress-bar-container .progress-bar { height: 8px; background: var(--primary); border-radius: 4px; }
.progress-bar-container span { font-size: 0.82rem; font-weight: 600; }

/* --- ACTIONS --- */
.action-btns { display: flex; gap: 0.3rem; }

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .dashboard-columns { grid-template-columns: 1fr; }
    .agenda-week { grid-template-columns: repeat(4, 1fr); }
    .tpv-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; padding: 1rem; }
    .form-row { flex-direction: column; gap: 0; }
    .form-row .col-4, .form-row .col-6 { flex: 1; }
    .agenda-week { grid-template-columns: 1fr; }
    .kpi-row { grid-template-columns: 1fr 1fr; }
    .profile-header { flex-direction: column; }
    .detail-grid { grid-template-columns: 1fr; }
    .topbar { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .mobile-toggle { display: block !important; }
}
.mobile-toggle {
    display: none;
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 150;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
}

/* --- PRINT --- */
@media print {
    .sidebar, .topbar, .page-header, .btn, .mobile-toggle { display: none !important; }
    .main-content { margin-left: 0; padding: 0; }
    .card { box-shadow: none; border: 1px solid #ddd; }
    .ticket-container { max-width: 100%; }
}

/* --- CIERRE DE CAJA --- */
.table-compact { font-size: 0.88rem; }
.table-compact td, .table-compact th { padding: 0.35rem 0.5rem; }
.stat-card-danger { background: #fef2f2; border-left: 3px solid var(--danger); }
.stat-card-warning { background: #fffbeb; border-left: 3px solid var(--warning); }
.btn-lg { padding: 0.75rem 2rem; font-size: 1rem; }

/* --- SIDEBAR LOGO --- */
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
}
.sidebar-logo svg { color: var(--primary); flex-shrink: 0; }
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--sidebar-text);
    cursor: pointer;
}
.sidebar-footer .user-details { display: flex; flex-direction: column; }
.sidebar-footer .logout-btn { margin-top: 0.5rem; }

/* --- TOP BAR --- */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.top-bar .page-title { font-size: 1.35rem; font-weight: 700; color: var(--text); }
.top-bar-right { display: flex; align-items: center; gap: 1rem; color: var(--text-muted); }
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 0.25rem;
}
@media (max-width: 768px) {
    .mobile-menu-btn { display: block; }
    .top-bar { gap: 0.5rem; }
}

/* --- BG SECONDARY --- */
.bg-secondary-light { background: var(--bg); }

/* --- INLINE FORM --- */
.inline-form { display: inline-flex; align-items: center; gap: 0.5rem; }

/* --- MISC FIXES --- */
.mb-4 { margin-bottom: 1.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-4 { flex: 0 0 33.333%; max-width: 33.333%; }
