/* =========================
    RESET GLOBAL
========================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #4e73df;
    --primary-dark: #2e59d9;
    --secondary: #1cc88a;
    --success: #4CAF50;
    --success-dark: #2E7D32;
    --text-dark: #333;
    --text-light: #666;
    --white: #ffffff;
    --shadow-soft: 0 10px 25px rgba(0,0,0,0.08);
    --shadow-medium: 0 15px 35px rgba(0,0,0,0.2);
    --radius: 12px;
    --transition: 0.3s ease;
}

/* =========================
    BODY GLOBAL
========================= */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

/* =========================
    LOGIN FORM
========================= */
.login-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-form {
    background: var(--white);
    padding: 40px;
    width: 100%;
    max-width: 380px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-medium);
    animation: fadeIn 0.6s ease-in-out;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--text-dark);
}

/* Inputs */
.input-group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
}

.input-group label {
    margin-bottom: 6px;
    font-size: 14px;
    color: #555;
}

.input-group input {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
    transition: border var(--transition), box-shadow var(--transition);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(78, 115, 223, 0.2);
}

/* Botón */
.login-form button {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    border: none;
    border-radius: 6px;
    color: var(--white);
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: background var(--transition), transform 0.1s;
}

.login-form button:hover {
    background: var(--primary-dark);
}

.login-form button:active {
    transform: scale(0.98);
}

/* Registro */
.signup-link {
    margin-top: 18px;
    text-align: center;
    font-size: 14px;
}

.signup-link a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: bold;
}

.signup-link a:hover {
    text-decoration: underline;
}

/* =========================
    TOPBAR
========================= */
.topbar {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.topbar-content {
    max-width: 1100px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logout-btn {
    background: var(--white);
    color: var(--primary);
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity var(--transition);
}

.logout-btn:hover {
    opacity: 0.9;
}

/* =========================
    DASHBOARD
========================= */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    padding: 40px;
    max-width: 1100px;
    margin: auto;
}

/* Tarjetas */
.card {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
}

.card h2 {
    margin-bottom: 10px;
    font-size: 20px;
}

.card p {
    font-size: 14px;
    color: var(--text-light);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.12);
}

/* =========================
    HORARIOS / CITAS
========================= */
.contenedor-citas {
    text-align: center;
    background: rgba(255,255,255,0.15);
    padding: 40px;
    border-radius: 15px;
    backdrop-filter: blur(8px);
    max-width: 500px;
    margin: auto;
}

#horarios {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Botones de hora */
.hora-disponible {
    padding: 10px 20px;
    border: 2px solid var(--success);
    background-color: var(--white);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    margin: 5px;
    border-radius: 6px;
}

.hora-disponible:hover {
    background-color: var(--success);
    color: var(--white);
    transform: scale(1.05);
}

.hora-seleccionada {
    background-color: var(--success-dark);
    color: var(--white);
}

/* =========================
    SKELETON LOADING
========================= */
.skeleton-card {
    width: 200px;
    height: 40px;
    margin: 10px 0;
    background: linear-gradient(
        90deg,
        #eeeeee 25%,
        #dddddd 50%,
        #eeeeee 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite;
}

/* =========================
    ANIMACIONES
========================= */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}