/* Reset e Estilos Globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Estilos das Mensagens */
.messages-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.message {
    padding: 16px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease-out;
    transition: opacity 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.message-success {
    background-color: #4caf50;
    color: white;
}

.message-error {
    background-color: #f44336;
    color: white;
}

.message-warning {
    background-color: #ff9800;
    color: white;
}

.message-info {
    background-color: #2196f3;
    color: white;
}

.message-text {
    flex: 1;
    margin-right: 10px;
}

.message-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    padding: 0;
    width: 24px;
    height: 24px;
    line-height: 1;
}

.message-close:hover {
    opacity: 1;
}

/* Login Page */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #DA291C 0%, #FF6B6B 25%, #FFB3B3 50%, #FFE5E5 75%, #FFFFFF 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card,
.change-password-card {
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
}

.login-header,
.change-password-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.logo-avatar {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-avatar img {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

.login-title {
    color: #DA291C;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.login-subtitle {
    color: #757575;
    font-size: 0.95rem;
    margin-top: 8px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #424242;
    font-weight: 500;
    font-size: 0.95rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 12px;
    color: #757575;
    font-size: 20px;
    pointer-events: none;
}

.form-control {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #DA291C;
    box-shadow: 0 0 0 3px rgba(218, 41, 28, 0.1);
}

.form-control.error {
    border-color: #f44336;
}

.form-control.error:focus {
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1);
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: #757575;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.password-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #DA291C;
}

.password-toggle.active {
    color: #DA291C;
}

.error-message {
    color: #f44336;
    font-size: 0.85rem;
    margin-top: 6px;
    display: block;
}

.form-error {
    background-color: #ffebee;
    color: #c62828;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 0.95rem;
    border: 1px solid #ef9a9a;
}

.non-field-errors {
    background-color: #ffebee;
    color: #c62828;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    list-style: none;
}

.non-field-errors li {
    margin: 0;
}

/* Button Styles */
.btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

.btn-primary {
    background-color: #DA291C;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #b92218;
    box-shadow: 0 4px 12px rgba(218, 41, 28, 0.3);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(1px);
}

.btn-primary:disabled {
    background-color: #DA291C;
    color: white;
    cursor: not-allowed;
}

.btn-text,
.btn-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-spinner {
    gap: 8px;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Footer */
.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-text {
    color: #DA291C;
    font-size: 0.85rem;
}

.footer-logo {
    width: 58px;
    height: 28px;
    object-fit: contain;
}

/* Change Password Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.change-password-card {
    max-width: 400px;
    width: 100%;
}

.change-password-header {
    margin-bottom: 24px;
}

.modal-icon {
    font-size: 48px;
    color: #DA291C;
    margin-bottom: 16px;
}

.modal-title {
    font-size: 1.5rem;
    color: #212121;
    margin-bottom: 8px;
    font-weight: 600;
}

.modal-subtitle {
    font-size: 0.9rem;
    color: #757575;
}

.modal-separator {
    height: 1px;
    background: #e0e0e0;
    margin: 24px -40px;
}

/* Password Requirements */
.password-requirements {
    background: #f5f5f5;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 12px;
    font-size: 0.85rem;
    color: #616161;
}

.password-requirements ul {
    margin: 8px 0 0 20px;
    padding: 0;
}

.password-requirements li {
    margin: 4px 0;
}

/* System Home */
.system-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.system-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.system-title {
    font-size: 2rem;
    color: #DA291C;
    font-weight: 700;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-name {
    color: #424242;
    font-weight: 500;
}

.btn-logout {
    padding: 10px 20px;
    background-color: #DA291C;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-logout:hover {
    background-color: #b92218;
}

/* Material Icons */
.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
}

/* Responsive */
@media (max-width: 480px) {
    .login-card,
    .change-password-card {
        padding: 30px 24px;
    }

    .login-title {
        font-size: 1.5rem;
    }

    .modal-title {
        font-size: 1.25rem;
    }
}
