:root {
    --primary: #e91e8c;
    --primary-dark: #c2177a;
    --primary-light: #f8d7ef;
    --secondary: #6f42c1;
    --accent: #ff6fb7;
    --bg-light: #fdf2f8;
    --bg-sidebar: #1a1a2e;
    --text-dark: #2d2d2d;
    --border-color: #f0e0eb;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    min-height: 100vh;
}

.product-thumbnail {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fff;
}

.product-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-image-preview {
    width: 100%;
    height: 240px;
    object-fit: contain;
    background: #fff;
    border-radius: 6px;
}

.product-image-placeholder {
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    background: var(--bg-light);
}

.product-image-placeholder[hidden] {
    display: none;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav-content {
    flex: 1;
    overflow-y: auto;
}

.sidebar .brand {
    padding: 1.5rem 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.sidebar .brand h4 {
    color: var(--accent);
    margin: 0;
    font-weight: 700;
    font-size: 1.3rem;
}

.sidebar .brand small {
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
}

.sidebar .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 0.7rem 1.2rem;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.sidebar .nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
    border-left-color: var(--accent);
}

.sidebar .nav-link.active {
    color: #fff;
    background: rgba(233, 30, 140, 0.15);
    border-left-color: var(--primary);
    font-weight: 600;
}

.sidebar .nav-link i {
    width: 24px;
    margin-right: 0.5rem;
    text-align: center;
}

.sidebar .nav-section {
    color: rgba(255,255,255,0.35);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 1rem 1.2rem 0.3rem;
    font-weight: 600;
}

.sidebar .nav-sublink {
    font-size: 0.8rem !important;
    padding: 0.35rem 1.2rem 0.35rem 2.8rem !important;
    color: rgba(255,255,255,0.5) !important;
}

.sidebar .nav-sublink:hover {
    color: rgba(255,255,255,0.8) !important;
}

.sidebar .nav-sublink.active {
    color: #fff !important;
    background: rgba(233, 30, 140, 0.1) !important;
}

/* Main content */
.main-content {
    margin-left: 260px;
    min-height: 100vh;
}

.top-bar {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 0.8rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar .page-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.content-area {
    padding: 1.5rem;
}

/* Cards */
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.2rem;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(233, 30, 140, 0.1);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.icon-pink { background: rgba(233,30,140,0.1); color: var(--primary); }
.icon-purple { background: rgba(111,66,193,0.1); color: var(--secondary); }
.icon-green { background: rgba(25,135,84,0.1); color: #198754; }
.icon-blue { background: rgba(13,110,253,0.1); color: #0d6efd; }
.icon-orange { background: rgba(255,193,7,0.1); color: #fd7e14; }
.icon-red { background: rgba(220,53,69,0.1); color: #dc3545; }

/* Cards estándar */
.card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: none;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    border-radius: 12px 12px 0 0 !important;
}

/* Botones */
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* Tablas */
.table {
    font-size: 0.9rem;
}

.table thead th {
    background: var(--bg-light);
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
}

/* Badges de estado */
.badge-estado {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
    border-radius: 6px;
    font-weight: 500;
}

/* Timeline */
.timeline-item {
    position: relative;
    padding-left: 2rem;
    padding-bottom: 1rem;
    border-left: 2px solid var(--border-color);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
}

/* Responsive */
.sidebar-toggle {
    display: none;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: block;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }

    .sidebar-overlay.show {
        display: block;
    }
}

/* Alertas */
.alert {
    border-radius: 10px;
    border: none;
    font-size: 0.9rem;
}

/* Form Controls */
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(233, 30, 140, 0.15);
}

/* Birthday animation */
.birthday-badge {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    color: var(--primary-light);
    margin-bottom: 1rem;
}

/* Cita card */
.cita-card {
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    margin-bottom: 0.5rem;
    background: #fff;
    transition: box-shadow 0.2s;
}

.cita-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Pagination */
.page-link {
    color: var(--primary);
}

.page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
}
