/* 
    CDental Premium Design System
    Classic, Modern, and Professional Aesthetic for Dental Clinics
*/

:root {
    /* Primary Color Palette - Professional Deep Teal & Clean Whites */
    --primary-h: 210;
    --primary-s: 100%;
    --primary-l: 25%;
    /* Deep Blue/Teal */

    --primary: hsl(var(--primary-h), var(--primary-s), var(--primary-l));
    --primary-light: hsl(var(--primary-h), var(--primary-s), 45%);
    --primary-soft: hsl(var(--primary-h), var(--primary-s), 95%);

    --accent-h: 180;
    --accent-s: 70%;
    --accent-l: 45%;
    --accent: hsl(var(--accent-h), var(--accent-s), var(--accent-l));

    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;

    /* Neutral Palette */
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;

    /* Shadows & Effects */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --glass: rgba(255, 255, 255, 0.8);

    /* Typography */
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --radius: 0.75rem;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Premium Button Syles */
.btn-premium {
    background-color: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-premium:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-premium:active {
    transform: translateY(0);
}

/* Glass Card */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

/* Input Styles */
.premium-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    transition: all 0.2s ease;
    font-size: 1rem;
}

.premium-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.1);
}

/* Appointment Cards & Calendar UI */
.appt-card {
    background: white;
    border-radius: 0.5rem;
    padding: 0.6rem;
    border-left: 4px solid #cbd5e1;
    text-align: left;
    min-width: 140px;
    transition: all 0.2s ease;
}

.appt-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.status-pending {
    border-left-color: #BDBD13;
    background: #FFFF7D;
}

.status-confirmed {
    border-left-color: #44005E;
    background: #75009E;
}

.status-finished {
    border-left-color: #073B00;
    background: #098000;
}

.status-noshow {
    border-left-color: #660000;
    background: #BA0000;
}

.status-blocked {
    border-left-color: #BDBD13;
    background: #FFFF7D;
}

.appt-header {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-main);
}

.appt-patient {
    word-break: break-word;
    white-space: normal;
}

.appt-patient-name {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.appt-body {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.btn-add-appt {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-muted);
    transition: all 0.2s ease;
    border: 1px dashed var(--border);
}

.btn-add-appt:hover {
    background: var(--primary-soft);
    color: var(--primary);
    border-style: solid;
    border-color: var(--primary-light);
    transform: scale(1.1);
}

/* Color de texto para Terminados */
.status-finished .appt-header {
    color: #FFFFFF !important;
    /* Color para el nombre del paciente */
}

.status-finished .appt-body {
    color: #FFFFFF !important;
    /* Color para el motivo (un gris claro) */
}

/* Color de texto para Terminados */
.status-noshow .appt-header {
    color: #FFFFFF !important;
    /* Color para el nombre del paciente */
}

.status-noshow .appt-body {
    color: #FFFFFF !important;
    /* Color para el motivo (un gris claro) */
}

/* Color de texto para Terminados */
.status-confirmed .appt-header {
    color: #FFFFFF !important;
    /* Color para el nombre del paciente */
}

.status-confirmed .appt-body {
    color: #FFFFFF !important;
    /* Color para el motivo (un gris claro) */
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.fixTableHead table {
    border-collapse: separate;
    border-spacing: 0;
}

.fixTableHead th,
.fixTableHead td {
    border: 1px solid var(--border) !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Premium Sidebar & Toggle Functionality */
.sidebar {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001 !important;
}

main {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-toggle {
    position: fixed !important;
    left: calc(16.666667% - 15px);
    top: 60px;
    width: 30px;
    height: 30px;
    background: white !important;
    border: 1px solid var(--border) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10020 !important;
    box-shadow: var(--shadow-md) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--primary) !important;
    padding: 0;
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .sidebar-toggle {
        left: calc(25% - 15px);
        /* MD breakpoint (col-md-3) */
    }
}

.sidebar-toggle:hover {
    background: var(--primary-soft) !important;
    color: var(--primary-light) !important;
    transform: scale(1.1);
}

.sidebar-toggle svg {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

/* Collapse States */
.sidebar.collapsed {
    margin-left: -25% !important;
}

@media (min-width: 992px) {
    .sidebar.collapsed {
        margin-left: -16.666667% !important;
    }
}

main.collapsed-content {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
}

.sidebar.collapsed+.sidebar-toggle {
    left: 15px !important;
}

.sidebar.collapsed+.sidebar-toggle svg {
    transform: rotate(180deg);
}

@media (max-width: 767.98px) {
    .sidebar-toggle {
        display: none;
    }
}