:root {
    --primary-color: #2196F3;
    --secondary-color: #FFC107;
    --success-color: #4CAF50;
    --danger-color: #f44336;
    --text-color: #333;
    --border-color: #e0e0e0;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --radius: 8px;
}

/* Login page styles */
.login-container {
    max-width: 400px;
    margin: 40px auto;
    padding: 30px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.login-container h1 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.2em;
}

.login-container h2 {
    color: var(--text-color);
    margin-bottom: 20px;
    font-size: 1.5em;
}

.login-container form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.login-container input {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1em;
    transition: all 0.2s ease;
}

.login-container input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(33,150,243,0.2);
}

.login-container button {
    background: var(--primary-color);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.login-container button:hover {
    background: #1976D2;
    transform: translateY(-1px);
}

.login-container button:active {
    transform: translateY(1px);
}

.login-container p {
    text-align: center;
    margin-top: 15px;
}

.login-container a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.login-container a:hover {
    color: #1976D2;
    text-decoration: underline;
}

#message {
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

#message.error {
    background: #ffebee;
    color: var(--danger-color);
    border: 1px solid #ffcdd2;
}

#message.success {
    background: #e8f5e9;
    color: var(--success-color);
    border: 1px solid #c8e6c9;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    max-width: 1000px;
    margin: auto;
    padding: 20px;
    color: var(--text-color);
    background-color: #f5f5f5;
    line-height: 1.6;
}

@media screen and (max-width: 768px) {
    body {
        padding: 10px;
    }

    #calendario {
        grid-template-columns: repeat(7, 1fr);
        gap: 5px;
        padding: 10px;
    }

    .dia {
        padding: 8px;
        min-height: 60px;
        font-size: 0.9em;
    }

    .repostaje {
        padding: 6px 8px;
        font-size: 0.8em;
    }

    #form-repostaje input {
        margin: 4px;
        width: calc(100% - 8px);
    }

    .login-container {
        margin: 20px auto;
        padding: 20px;
    }
}

@media screen and (max-width: 480px) {
    body {
        padding: 5px;
    }

    #calendario {
        gap: 2px;
        padding: 5px;
    }

    .dia {
        padding: 4px;
        min-height: 50px;
        font-size: 0.8em;
    }

    .nombre-dia {
        font-size: 0.9em;
    }

    #nav-meses {
        padding: 8px;
        font-size: 0.9em;
    }

    button {
        padding: 6px 12px;
        font-size: 0.9em;
    }

    #modal-confirm > div {
        padding: 20px 16px 16px;
        min-width: 250px;
    }

    #modal-message {
        font-size: 1em;
    }

    #modal-yes, #modal-no {
        padding: 8px 16px;
        font-size: 0.9em;
    }
}

#resumen-mensual {
    margin-bottom: 24px;
    padding: 20px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

#calendario {
    display: grid;
    grid-template-columns: repeat(7,1fr);
    gap: 10px;
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.dia {
    border: 1px solid var(--border-color);
    padding: 12px;
    min-height: 80px;
    border-radius: var(--radius);
    position: relative;
    transition: all 0.2s ease;
}

.dia:hover {
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.hoy {
    background-color: #fff8e1;
    border: 2px solid var(--secondary-color);
}

.repostaje {
    background-color: #e3f2fd;
    padding: 8px 12px;
    margin-top: 5px;
    border-radius: 4px;
    font-size: 0.9em;
    transition: all 0.2s ease;
    border: 1px solid var(--primary-color);
}

.repostaje:hover {
    background-color: #bbdefb;
    transform: translateY(-1px);
}

.nombre-dia {
    font-weight: 600;
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 8px;
}

#nav-meses {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-transform: capitalize;
}

button {
    cursor: pointer;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    background: var(--primary-color);
    color: white;
    font-weight: 500;
    transition: all 0.2s ease;
}

button:hover {
    background: #1976D2;
    transform: translateY(-1px);
}

button:active {
    transform: translateY(1px);
}

#form-repostaje {
    margin-top: 24px;
    padding: 20px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

#form-repostaje input {
    margin: 8px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.2s ease;
}

#form-repostaje input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(33,150,243,0.2);
}

#logout {
    float: right;
    margin-bottom: 15px;
    background: var(--danger-color);
}

#logout:hover {
    background: #d32f2f;
}
#modal-confirm {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(3px);
}

#modal-confirm.active {
    display: flex;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#modal-confirm > div {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    padding: 28px 24px 20px;
    min-width: 300px;
    max-width: 90vw;
    text-align: center;
    transform: scale(0.9);
    animation: scaleIn 0.2s ease-out forwards;
}

@keyframes scaleIn {
    to { transform: scale(1); }
}

#modal-message {
    margin-bottom: 24px;
    font-size: 1.15em;
    color: var(--text-color);
    line-height: 1.4;
}

#modal-yes, #modal-no {
    min-width: 80px;
    padding: 10px 20px;
    font-size: 1em;
    border-radius: 4px;
    border: none;
    margin: 0 6px;
    transition: all 0.2s ease;
}

#modal-yes {
    background: var(--danger-color);
    color: white;
    font-weight: 500;
}

#modal-yes:hover {
    background: #d32f2f;
    transform: translateY(-1px);
}

#modal-no {
    background: #f5f5f5;
    color: var(--text-color);
}

#modal-no:hover {
    background: #e0e0e0;
    transform: translateY(-1px);
}

#modal-yes:active, #modal-no:active {
    transform: translateY(1px);
}

#modal-yes:focus, #modal-no:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(33,150,243,0.3);
}