/* Variables de Color y Fuentes */
:root {
    --bg-color: #f7f6f2; 
    --primary-color: #17937e; 
    --primary-hover: #127a69;
    --text-dark: #1d2b2b;
    --card-bg: #ffffff;
    --light-green: #d1f2eb;
    --light-blue: #d4e6f1;
    --light-purple: #e8daef; /* Para nuevos servicios dinámicos */
}

body {
    background-color: var(--bg-color);
    color: var(--text-dark);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

#dashboard .custom-card h3 {
    word-break: break-word;
}

.font-serif {
    font-family: Georgia, 'Times New Roman', Times, serif;
}
.bg-custom-primary {
    background-color: var(--primary-color) !important;
}
.text-custom-primary {
    color: var(--primary-color) !important;
}

/* Navbar */
.custom-navbar {
    background-color: var(--card-bg);
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 0;
}
.nav-link {
    color: #6c757d;
    font-weight: 500;
    margin: 0 10px;
    padding: 8px 16px !important;
    border-radius: 20px;
    transition: all 0.2s;
}
.nav-link:hover, .nav-link.active {
    background-color: #ebf5f3;
    color: var(--primary-color);
}
.user-badge {
    background-color: #f0f0f0;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Cards Generales */
.custom-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    border: 1px solid #f0f0f0;
    height: 100%;
}
h2, h3 {
    font-family: Georgia, 'Times New Roman', Times, serif;
    color: var(--text-dark);
}

/* Botones */
.btn-custom-primary {
    background-color: var(--primary-color);
    color: white;
    border-radius: 6px;
    font-weight: 500;
    padding: 8px 20px;
    border: none;
}
.btn-custom-primary:hover {
    background-color: var(--primary-hover);
    color: white;
}

/* Dashboard Donut Chart (Simulado) */
.donut-chart {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: conic-gradient(var(--primary-color) 0% 100%);
    position: relative;
}
.donut-chart::before {
    content: "";
    position: absolute;
    top: 15%; left: 15%; width: 70%; height: 70%;
    background-color: white;
    border-radius: 50%;
}

/* Tablas */
.custom-table th {
    font-size: 0.8rem;
    color: #6c757d;
    border-bottom: 1px solid #eee;
}
.custom-table td {
    vertical-align: middle;
    padding: 16px 12px;
    border-bottom: 1px solid #eee;
}

/* Calendario */
.weekly-header .col {
    padding: 15px 0;
    font-size: 0.85rem;
    font-weight: 600;
    border-right: 1px solid #eee;
}
.weekly-grid {
    height: 350px;
}
.weekly-grid .col {
    border-right: 1px solid #eee;
    position: relative;
}
.calendar-bar {
    position: absolute;
    left: 5px; right: 5px;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.75rem;
    color: white;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.monthly-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: #eee;
}
.monthly-day {
    background-color: white;
    min-height: 90px;
    padding: 5px;
    font-size: 0.85rem;
}

/* Personal y Servicios */
.avatar-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}
.bg-light-green { background-color: var(--light-green); }
.bg-light-blue { background-color: var(--light-blue); }
.bg-light-purple { background-color: var(--light-purple); }
.text-primary-dark { color: #0e5a4d; }

.day-toggle-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.day-toggle-btn {
    border: 1px solid #d7dfdc;
    background-color: #fff;
    color: var(--text-dark);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 600;
}

.day-toggle-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.availability-grid {
    display: grid;
    gap: 10px;
}

.availability-row {
    display: grid;
    grid-template-columns: minmax(90px, 120px) 1fr 1fr;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    background-color: #fbfdfc;
}

.availability-row-label {
    font-weight: 600;
}

.availability-empty {
    border: 1px dashed #ced4da;
    border-radius: 10px;
    padding: 14px;
    font-size: 0.9rem;
    color: #6c757d;
    background-color: #fff;
}

.calendar-status-chip {
    display: inline-block;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 0.7rem;
    color: #1d2b2b;
    font-weight: 600;
    margin-top: 4px;
}

.icon-box {
    width: 40px; height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Modales */
.custom-modal {
    border-radius: 12px;
    border: none;
}
.custom-modal .form-control, .custom-modal .form-select {
    border-radius: 6px;
    padding: 10px 12px;
    border: 1px solid #ced4da;
}
.custom-modal .form-control:focus, .custom-modal .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(23, 147, 126, 0.25);
}

.app-footer {
    border-top: 1px solid #e0e0e0;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
}