* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /*background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/
    background: linear-gradient(
        180deg,
        rgba(42, 123, 155, 1) 0%,
        rgba(42, 123, 155, 0.9) 1%,
        rgba(42, 123, 155, 0.1) 2.2%,
        rgba(255, 255, 255, 0.2) 6%,
        rgba(255, 255, 255, 0.4) 7%,
        rgba(255, 255, 255, 0.6) 8%,
        rgba(255, 255, 255, 0.8) 9%,
        rgba(255, 255, 255, 1) 10%,
        rgba(255, 255, 255, 1) 40%,
        rgba(37, 211, 102, 0.2) 60%,
        rgba(37, 211, 102, 0.4) 70%,
        rgba(37, 211, 102, 0.6) 80%,
        rgba(37, 211, 102, 0.8) 90%,
        rgba(37, 211, 102, 1) 100%
    );
    overflow: hidden;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

/* Background Animation - CORRIGIDO */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Alterado para valor positivo */
    overflow: hidden;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(0, 253, 0, 0.733);
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    top: 20%;
    right: 20%;
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-1px) rotate(180deg);
    }
}

/* Login Card - CORRIGIDO */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 420px;
    max-height: 92vh;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: translateY(0);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    overflow-y: scroll;
    overflow-x: hidden;
}

/* Scroll invisível - webkit (Chrome, Safari, Edge) */
.login-card::-webkit-scrollbar {
    width: 0;
}

/* Scroll invisível - Firefox */
.login-card {
    scrollbar-width: none;
}

.card-header {
    text-align: center;
    margin-bottom: 15px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.logo-icon {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #026A2B, #03C03C);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h1 {
    color: #026A2B;
    font-size: 1.8rem;
    font-weight: 700;
}

.subtitle {
    color: #666;
    font-size: 1rem;
    margin-top: 5px;
}

/* Form Styles - CORRIGIDO */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    position: relative;
}

.input-container {
    position: relative;
}

.input-container input {
    width: 100%;
    padding: 15px 50px 15px 15px; /* Aumentado padding direito para ícones */
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    background: #fff;
    transition: all 0.3s ease;
    outline: none;
}

.input-container input:focus {
    border-color: #026A2B;
    box-shadow: 0 0 0 3px rgba(2, 106, 43, 0.1);
}

.input-container input:valid + label,
.input-container input:focus + label {
    top: -8px;
    left: 10px;
    font-size: 0.8rem;
    background: #fff;
    padding: 0 8px;
    color: #026A2B;
}

.input-container label {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: #999;
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.3s ease;
    background: transparent;
}

.input-icon {
    position: absolute;
    right: 10px; /* Posicionado mais à esquerda para não sobrepor */
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    z-index: 1;
}

.logo-image {
    z-index: 1;
    height: 250px;
    margin-bottom: 20px;
}

/* CORREÇÃO DO BOTÃO DE MOSTRAR SENHA */
.password-toggle {
    position: absolute;
    right: 10px; /* Posicionado à direita */
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 2;
}

.eye-icon {
    /*opacity: 0.6;
    transition: opacity 0.3s ease;*/
}

.password-toggle:hover .eye-icon {
    opacity: 1;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #666;
    font-size: 0.9rem;
}

.remember-me input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remember-me input:checked + .checkmark {
    background: #026A2B;
    border-color: #026A2B;
}

.remember-me input:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 12px;
}

.forgot-password {
    color: #026A2B;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #03C03C;
    text-decoration: underline;
}

/* Buttons */
.login-btn {
    background: linear-gradient(135deg, #026A2B, #03C03C);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(2, 106, 43, 0.3);
}

.login-btn:active {
    transform: translateY(0);
}

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.loader {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Card Footer */
.card-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.card-footer p {
    color: #666;
    font-size: 0.9rem;
}

.signup-link {
    color: #026A2B;
    text-decoration: none;
    font-weight: 600;
}

.signup-link:hover {
    text-decoration: underline;
}

/* Notification */
.notification {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #026A2B;
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 9999;
}

.notification.show {
    transform: translateX(0);
}

.notification.error {
    background: #e74c3c;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-height: 730px) {
    .logo-image {
        height: 200px;
    }
}

@media (max-height: 684px) {
    .logo-image {
        height: 120px;
    }
}


/* Responsive Design */
@media (max-width: 768px) {
    .login-container {
        padding: 15px;
    }
    
    .login-card {
        padding: 30px 25px;
        margin: 10px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .logo {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-options {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .input-container input {
        padding: 12px 45px 12px 12px;
    }
    
    .input-icon {
        right: 12px;
    }

    .password-toggle {
        right: 12px;
    }

    .login-card{
        justify-items: center;
    }

    .login-form {
        width: 90%;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 25px 20px;
        justify-items: center;
    }

    .login-form {
        width: 78%;
    }
    
    h1 {
        font-size: 1.3rem;
    }
    
    .logo-icon {
        font-size: 2rem;
    }
    
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        transform: translateY(-100px);
    }
    
    .notification.show {
        transform: translateY(0);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .login-card {
        background: rgba(40, 40, 40, 0.95);
        color: white;
    }
    
    .input-container input {
        background: #2d2d2d;
        border-color: #444;
        color: white;
    }
    
    .input-container input:focus {
        border-color: #026A2B;
    }
    
    .input-container input:valid + label,
    .input-container input:focus + label {
        background: #2d2d2d;
    }
    
    .card-footer p {
        color: #ccc;
    }
}




/* Modal Overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

/* Modal Card */
.modal-card {
    opacity: 1 !important;
    max-width: 500px !important;
    animation: fadeUp 0.3s ease;
}

/* Select estilizado */
select {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: 2px solid #444;
    font-size: 1rem;
    background: #2d2d2d;
    outline: none;
    color: #757575; /* cor padrão = placeholder */
}

/* Quando o select tiver valor válido */
select.has-value {
    color: #ffffff;
}

/* Estilo das opções */
select option {
    color: #ffffff;
    background: #2d2d2d;
}

/* Placeholder (opção desabilitada) */
select option:disabled {
    color: #757575;
}

select:focus {
    border-color: #026A2B;
}

.hidden {
    display: none;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-overlay.hidden {
    display: none;
}

.modal-card {
    max-width: 550px;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: #f0f0f0;
    color: #333;
}

/* Clientes Selection */
.clientes-selection-container {
    background: #2d2d2d;
    border: 2px solid #444;
    border-radius: 12px;
    padding: 15px;
    transition: all 0.3s ease;
}

.clientes-selection-container.no-selection {
    border-color: #e74c3c;
    background: #2d2d2d;
}

.clientes-title {
    font-size: 1rem;
    color: #ffffff;
    margin-bottom: 15px;
    font-weight: 600;
}

.clientes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    background: #757575;
    border-radius: 8px;
    border: 1px solid #444;
}

.cliente-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px;
    border-radius: 6px;
    transition: background 0.3s ease;
}

.cliente-item:hover {
    background: #f0f0f0;
}

.cliente-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.cliente-item label {
    cursor: pointer;
    font-size: 0.9rem;
    color: #333;
    flex: 1;
}

.clientes-selected-info {
    margin-top: 15px;
    padding: 10px;
    background: #2d2d2d;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    color: #026A2B;
}

.loading-clientes {
    text-align: center;
    padding: 20px;
    color: #666;
}

.error-clientes {
    text-align: center;
    padding: 20px;
    color: #e74c3c;
    background: #fff5f5;
    border-radius: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-card {
        margin: 15px;
        max-width: 95%;
    }

    .logo-image{
        height: 120px;
    }
    
    .clientes-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 480px) {
    .clientes-grid {
        grid-template-columns: 1fr;
    }
}

.cancel-link {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.cancel-link:hover {
    color: #333;
    text-decoration: underline;
}








