/* General Body Styles */
body {
    font-family: 'Roboto', sans-serif;
    background-color: #f0f2f5; /* Light grey background */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    color: #333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Login Container */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 20px; /* Ample padding for spacing */
    box-sizing: border-box; /* Include padding in width calculation */
}

.login-box {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 100%;
    max-width: 400px; /* Max width for larger screens */
    box-sizing: border-box;
    transition: all 0.3s ease-in-out;
}

.login-box:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Headings */
.login-box h2 {
    color: #0056b3; /* Darker blue for heading */
    margin-bottom: 30px;
    font-size: 2em;
    font-weight: 700;
}

/* Error Message */
.error-message {
    background-color: #ffe0e0;
    color: #cc0000;
    border: 1px solid #cc0000;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95em;
    animation: fadein 0.5s;
}

@keyframes fadein {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Form Styles */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Spacing between form elements */
}

.input-group {
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95em;
}

.input-group input[type="text"],
.input-group input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cdd4da;
    border-radius: 8px;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-group input[type="text"]:focus,
.input-group input[type="password"]:focus {
    border-color: #007bff; /* Blue on focus */
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
    outline: none;
}

/* Buttons */
.login-button {
    background-color: #007bff; /* Primary blue */
    color: white;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.login-button:hover {
    background-color: #0056b3; /* Darker blue on hover */
    transform: translateY(-2px);
}

.login-button:active {
    transform: translateY(0);
}

/* Material Symbols Adjustments */
.material-symbols-outlined {
    font-variation-settings:
        'FILL' 0,
        'wght' 400,
        'GRAD' 0,
        'opsz' 24;
    vertical-align: middle;
}

/* Forgot Password Link */
.forgot-password {
    margin-top: 20px;
    font-size: 0.9em;
}

.forgot-password a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 600px) {
    .login-box {
        padding: 30px 20px;
        margin: 0 15px; /* Add some margin on smaller screens */
    }

    .login-box h2 {
        font-size: 1.8em;
        margin-bottom: 25px;
    }

    .login-button {
        padding: 12px 15px;
        font-size: 1em;
    }

    .input-group input {
        padding: 10px 12px;
    }
}

@media (max-width: 320px) {
    .login-box {
        padding: 25px 15px;
    }

    .login-box h2 {
        font-size: 1.6em;
        margin-bottom: 20px;
    }

    .login-form {
        gap: 15px;
    }
}

/* Styles for Welcome/Dashboard Page */

/* General Body Styles (mantener consistente con login.php) */
body {
    font-family: 'Roboto', sans-serif;
    background-color: #f0f2f5; /* Light grey background */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    color: #333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Welcome Container */
.welcome-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

.welcome-box {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 100%;
    max-width: 800px; /* Increased max-width for more content */
    box-sizing: border-box;
    transition: all 0.3s ease-in-out;
}

.welcome-box:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Headings and User Info */
.welcome-box h1 {
    color: #0056b3;
    margin-bottom: 15px;
    font-size: 2.2em;
    font-weight: 700;
}

.username-highlight {
    color: #007bff; /* Primary blue for username */
}

.user-role {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 30px;
    font-weight: 500;
}

/* Buttons Grid */
.buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); /* Mejora: Grid responsivo */
    gap: 20px; /* Espacio entre botones */
    margin-bottom: 30px;
}

.dashboard-button {
    background-color: #007bff; /* Primary blue */
    color: white;
    padding: 15px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1.05em;
    text-decoration: none; /* Remove underline for links */
    display: flex;
    flex-direction: column; /* Icono arriba, texto abajo */
    align-items: center;
    justify-content: center;
    gap: 8px; /* Espacio entre icono y texto */
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    font-weight: 600;
    min-height: 100px; /* Ensure buttons have a minimum height */
}

.dashboard-button:hover {
    background-color: #0056b3; /* Darker blue on hover */
    transform: translateY(-3px); /* Lift effect */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.dashboard-button:active {
    transform: translateY(0);
}

.dashboard-button .material-symbols-outlined {
    font-size: 36px; /* Larger icons for buttons */
    margin-bottom: 5px; /* Space between icon and text */
}

/* Logout Button */
.logout-container {
    margin-top: 20px;
}

.logout-button {
    background-color: #dc3545; /* Red for logout */
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    text-decoration: none;
    display: inline-flex; /* Align icon and text horizontally */
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-weight: 600;
}

.logout-button:hover {
    background-color: #c82333; /* Darker red on hover */
    transform: translateY(-2px);
}

.logout-button:active {
    transform: translateY(0);
}

.logout-button .material-symbols-outlined {
    font-size: 24px; /* Standard icon size */
}

/* Material Symbols Adjustments (consistent) */
.material-symbols-outlined {
    font-variation-settings:
        'FILL' 0,
        'wght' 400,
        'GRAD' 0,
        'opsz' 24;
    vertical-align: middle;
}

/* Responsive Design */
@media (max-width: 768px) {
    .welcome-box {
        padding: 30px 25px;
        max-width: 600px;
    }

    .welcome-box h1 {
        font-size: 2em;
    }

    .user-role {
        font-size: 1em;
        margin-bottom: 25px;
    }

    .buttons-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Ajuste de grid para tablets */
        gap: 15px;
    }

    .dashboard-button {
        padding: 12px 15px;
        font-size: 0.95em;
        min-height: 90px;
    }

    .dashboard-button .material-symbols-outlined {
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    .welcome-box {
        padding: 25px 20px;
        margin: 0 15px;
    }

    .welcome-box h1 {
        font-size: 1.8em;
        margin-bottom: 10px;
    }

    .user-role {
        font-size: 0.9em;
        margin-bottom: 20px;
    }

    .buttons-grid {
        grid-template-columns: 1fr; /* Una columna en pantallas muy pequeñas */
        gap: 12px;
    }

    .dashboard-button {
        padding: 10px 15px;
        font-size: 0.9em;
        min-height: 80px;
    }

    .dashboard-button .material-symbols-outlined {
        font-size: 28px;
    }

    .logout-button {
        padding: 10px 20px;
        font-size: 0.9em;
    }
}

@media (max-width: 320px) {
    .welcome-box {
        padding: 20px 15px;
    }

    .welcome-box h1 {
        font-size: 1.5em;
    }
}