:root {
    --primary: #00A8CC;
    --secondary: #0077B6;
    --accent: #48CAE4;
    --background: #F8F9FA;
    --text: #2C3E50;
    --success: #28A745;
    --warning: #FFC107;
    --error: #DC3545;
    --white: #ffffff;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.3s;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--secondary);
}

.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Main Layout */
.top-header {
    background-color: var(--white);
    padding: 0 20px;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.brand {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.main-wrapper {
    display: flex;
    margin-top: 60px;
    /* Header height */
    min-height: calc(100vh - 60px);
}

.sidebar {
    width: 250px;
    background-color: var(--secondary);
    color: var(--white);
    position: fixed;
    top: 60px;
    bottom: 0;
    left: 0;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
}

.sidebar-menu li a {
    display: block;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-left: 4px solid transparent;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-left-color: var(--accent);
}

.sidebar-menu li.title {
    padding: 10px 20px;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 10px;
}

.content-area {
    flex: 1;
    margin-left: 250px;
    /* Sidebar width */
    padding: 20px;
    background-color: var(--background);
    width: calc(100% - 250px);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 999;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .content-area {
        margin-left: 0;
        width: 100%;
    }

    .menu-toggle {
        display: block;
        cursor: pointer;
        font-size: 1.5rem;
        margin-right: 15px;
    }
}

/* Dashboard Widgets */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-top: 4px solid var(--primary);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text);
}

.stat-label {
    color: #6c757d;
    font-size: 0.9rem;
}

.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
}

.login-card {
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-logo {
    max-width: 150px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
}

/* Calendar */
.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #dee2e6;
    gap: 1px;
    border: 1px solid #dee2e6;
}

.calendar-header {
    background: var(--secondary);
    color: var(--white);
    padding: 10px;
    text-align: center;
    font-weight: bold;
}

.calendar-day {
    background: var(--white);
    min-height: 120px;
    padding: 5px;
    position: relative;
}

.calendar-day.empty {
    background: #f8f9fa;
}

.day-number {
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
    text-align: right;
    color: #6c757d;
}

.appointment-badge {
    display: block;
    padding: 2px 5px;
    margin-bottom: 2px;
    border-radius: 3px;
    font-size: 0.75rem;
    color: #fff;
    text-decoration: none;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.status-pendiente {
    background-color: var(--warning);
    color: #000;
}

.status-confirmada {
    background-color: var(--success);
}

.status-completada {
    background-color: #6c757d;
}

.status-cancelada {
    background-color: var(--error);
}