* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
    background: url('/images/stoicahub-background_3.png') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden; /* Prevent horizontal scroll */
    overflow-y: auto; /* Allow vertical scroll when needed */
    padding: 2rem 0;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.container, .login-container {
    background: #ffffff;
    padding: 3rem 2.5rem;
    border-radius: 8px; /* More rectangular */
    box-shadow: 0 5px 15px rgba(51, 51, 51, 0.1), 0 0 0 1px rgba(51, 51, 51, 0.05); /* Sombras e Textos #333333 */
    width: 100%;
    max-width: 500px;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(51, 51, 51, 0.1); /* Sombras e Textos #333333 */
}

.container::before, .login-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    background: linear-gradient(90deg, #f7931e, #3cb0fd, #f7931e); /* Hilight principal and Secundário */
    height: 4px;
    border-radius: 8px 8px 0 0; /* Match rectangular design */
}

.header, .login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.header h2, .login-header h2 {
    color: #333333; /* Sombras e Textos */
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #f7931e, #2883bf); /* Hilight principal and Terciário */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header p, .login-header p {
    color: #333333; /* Sombras e Textos - changed from #6c757d */
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
    position: relative;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333333; /* Sombras e Textos */
    font-weight: 600;
    font-size: 0.9rem;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    display: none; /* Hide input icons as requested */
}

input, select {
    width: 100%;
    padding: 0.9rem 1rem; /* Remove left padding that was for icons */
    border: 2px solid #e9ecef;
    border-radius: 4px; /* More rectangular */
    font-size: 1rem;
    background: #ffffff;
    transition: all 0.3s ease;
    outline: none;
    color: #333333; /* Sombras e Textos */
}

input:focus, select:focus {
    border-color: #f7931e; /* Hilight principal - already set correctly */
    background: #ffffff; /* Changed from #fff to explicit #ffffff */
    box-shadow: 0 0 0 3px rgba(247, 147, 30, 0.1); /* Hilight principal with opacity */
}

input:focus, select:focus {
    border-color: #f7931e; /* Hilight principal */
    background: #fff;
    box-shadow: 0 0 0 3px rgba(247, 147, 30, 0.1); /* Hilight principal with opacity */
}

.btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 4px; /* More rectangular */
    background: #f7931e; /* Hilight principal - changed from gradient to solid */
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    background: #e6851a; /* Darker shade of hilight principal */
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(247, 147, 30, 0.3); /* Hilight principal with opacity */
}

.alert {
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
    border-radius: 4px; /* More rectangular */
    font-size: 0.85rem;
    border: 1px solid transparent;
    color: #333333; /* Sombras e Textos */
    background-color: #f8f9fa; /* Fundo */
    border-color: #e9ecef;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(51, 51, 51, 0.1); /* Changed to use #333333 (Sombras e Textos) with opacity */
    color: #333333; /* Sombras e Textos */
}

.footer a {
    color: #2883bf; /* Hilight Terciário */
    text-decoration: none;
    font-weight: 500;
}

.footer a:hover {
    color: #f7931e; /* Hilight principal */
    text-decoration: underline;
}

/* Update all links to follow the color palette */
a {
    color: #2883bf; /* Hilight Terciário */
    text-decoration: none;
    font-weight: 500;
}

a:hover {
    color: #f7931e; /* Hilight principal */
    text-decoration: underline;
}

/* Login specific styles */
.login-container {
    max-width: 420px;
    border-radius: 8px; /* More rectangular */
}

.login-header {
    margin-bottom: 2.5rem;
}

.login-header h2 {
    margin-bottom: 0.5rem;
}

.form-group label {
    margin-bottom: 0.75rem;
}

input[type="text"], input[type="password"] {
    padding: 1rem 1rem 1rem 3rem;
}

.btn {
    margin-top: 1rem;
    border-radius: 4px; /* More rectangular */
}

.alert {
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: 4px; /* More rectangular */
    font-weight: 500;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(220, 53, 69, 0.05));
    color: #721c24;
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-left: 4px solid #dc3545;
}

.alert-success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1), rgba(40, 167, 69, 0.05));
    color: #155724;
    border: 1px solid rgba(40, 167, 69, 0.2);
    border-left: 4px solid #2883bf; /* Hilight Terciário */
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #333333; /* Monochromatic color as requested */
    user-select: none;
    z-index: 2;
}

.password-toggle:hover {
    color: #f7931e; /* Hilight principal on hover */
}

.btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.login-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(108, 117, 125, 0.1);
    color: #333333; /* Sombras e Textos */
}

.footer-links {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 4px; /* More rectangular */
    background: rgba(247, 147, 30, 0.03); /* Hilight principal with opacity */
    border: 1px solid rgba(247, 147, 30, 0.1); /* Hilight principal with opacity */
    transition: all 0.3s ease;
    flex: 1;
    justify-content: center;
}

.footer-link-password {
    display: inline-block;
    text-decoration: none;
    color: #2883bf; /* Hilight Terciário */
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.footer-link-password:hover {
    color: #f7931e; /* Hilight principal */
    text-decoration: underline;
}

.instructions {
    justify-content: left;
}


.footer-link:hover {
    color: #f7931e; /* Hilight principal */
    background: rgba(247, 147, 30, 0.08); /* Hilight principal with opacity */
    border-color: rgba(247, 147, 30, 0.2); /* Hilight principal with opacity */
    transform: translateY(-2px);
}

.link-icon {
    font-size: 1rem;
}


/* Confirmation specific styles */
.container {
    text-align: center;
}

.icon-success {
    font-size: 4rem;
    color: #2883bf; /* Hilight Terciário */
    margin-bottom: 1.5rem;
    animation: scaleIn 0.5s ease-out;
}

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

.message {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1), rgba(40, 167, 69, 0.05));
    color: #155724;
    padding: 1.5rem;
    border-radius: 4px; /* More rectangular */
    margin: 1.5rem 0;
    border: 1px solid rgba(40, 167, 69, 0.2);
    border-left: 4px solid #2883bf; /* Hilight Terciário */
}

.container::before {
    background: linear-gradient(90deg, #2883bf, #f7931e, #2883bf); /* Hilight Terciário and Principal */
}

.header h2 {
    background: linear-gradient(135deg, #f7931e, #2883bf); /* Hilight Principal and Terciário */
}

/* Responsive design - make rectangular design more prominent on desktop */
@media (min-width: 992px) {
    .container, .login-container {
        border-radius: 8px; /* Slightly more rectangular on desktop */
    }
    
    input, select {
        border-radius: 4px; /* More rectangular on desktop */
    }
    
    .btn {
        border-radius: 4px; /* More rectangular on desktop */
    }
    
    .alert {
        border-radius: 4px; /* More rectangular on desktop */
    }
}

@media (max-width: 480px) {
    .login-container {
        margin: 1rem;
        padding: 2rem 1.5rem;
        border-radius: 8px; /* Keep slightly rounded for mobile */
    }

    .login-header h2 {
        font-size: 1.75rem;
    }

    .footer-links {
        flex-direction: column;
    }
}