:root {
    --primary: #D4AF37;
    --primary-dark: #3a56d4;
    --secondary: #D4AF37;
    --accent: #4cc9f0;
    --white: #ffffff;
    --light: #f8f9fa;
    --gray: #6c757d;
    --dark: #212529;
    --glass: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e9f2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    position: relative;
    overflow: auto;
}

.login-container {
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 10;
}

.login-card {
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 30px 25px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.brand {
    text-align: center;
    margin-bottom: 25px;
}

.brand-logo {
    display: block;
    margin: 0 auto 12px;
    width: 120px;
    height: 85px;
    position: relative;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.08));
}

.brand h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 6px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand p {
    color: var(--gray);
    font-size: 13px;
    font-weight: 400;
    max-width: 250px;
    margin: 0 auto;
    line-height: 1.3;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

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

.input-wrapper .fa-lock,
.input-wrapper .fa-envelope {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 14px;
    z-index: 1;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 12px 12px 36px;
    padding-right: 45px;
    background: rgba(248, 249, 250, 0.9);
    border: 1.5px solid #e9ecef;
    border-radius: 9px;
    font-size: 13px;
    color: var(--dark);
    transition: var(--transition);
    font-weight: 400;
}

.input-wrapper input::placeholder {
    color: #adb5bd;
    font-size: 12px;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.1);
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    font-size: 14px;
    padding: 5px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    z-index: 2;
}

.password-toggle:hover {
    color: var(--primary);
    background: rgba(67, 97, 238, 0.08);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 12px;
}

.remember-me {
    display: flex;
    align-items: center;
}

.remember-me input[type="checkbox"] {
    width: 14px;
    height: 14px;
    border: 1.5px solid #dee2e6;
    border-radius: 3px;
    margin-right: 6px;
    cursor: pointer;
    position: relative;
    appearance: none;
}

.remember-me input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.remember-me input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 9px;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.remember-me label {
    color: var(--gray);
    cursor: pointer;
}

.forgot-password {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.forgot-password:hover {
    color: var(--primary-dark);
}

.login-button {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.2px;
}

.login-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(67, 97, 238, 0.2);
}

.register-section {
    text-align: center;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #e9ecef;
}

.register-section p {
    color: var(--gray);
    font-size: 13px;
    margin-bottom: 10px;
}

.register-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: var(--white);
    border: 1.5px solid var(--primary);
    border-radius: 7px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.register-button:hover {
    background: rgba(67, 97, 238, 0.05);
    transform: translateY(-1px);
}

.register-button i {
    margin-right: 5px;
    font-size: 12px;
}

.error-message {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    padding: 10px;
    border-radius: 7px;
    margin-bottom: 16px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 3px 8px rgba(255, 107, 107, 0.12);
}

.success-message {
    background: linear-gradient(135deg, #51cf66, #40c057);
    color: white;
    padding: 10px;
    border-radius: 7px;
    margin-bottom: 16px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 3px 8px rgba(81, 207, 102, 0.12);
}

/* Modal ajustado */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 10px;
}

.modal-content {
    background: white;
    padding: 22px;
    border-radius: 12px;
    width: 100%;
    max-width: 340px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.modal-header h3 {
    margin: 0;
    color: var(--dark);
    font-size: 16px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--gray);
    padding: 3px;
}

/* Responsive para telas muito pequenas */
@media (max-width: 480px) {
    body {
        padding: 8px;
        align-items: flex-start;
        padding-top: 15px;
    }
    
    .login-card {
        padding: 25px 20px;
        border-radius: 14px;
    }
    
    .brand-logo {
        width: 100px;
        height: 70px;
        margin-bottom: 10px;
    }
    
    .brand h1 {
        font-size: 22px;
        margin-bottom: 5px;
    }
    
    .brand p {
        font-size: 12px;
        max-width: 220px;
    }
    
    .form-group {
        margin-bottom: 14px;
    }
    
    .input-wrapper input {
        padding: 10px 10px 10px 34px;
        padding-right: 40px;
        font-size: 12px;
        border-radius: 8px;
    }
    
    .password-toggle {
        width: 28px;
        height: 28px;
        font-size: 13px;
        padding: 4px;
        right: 6px;
    }
    
    .form-options {
        margin-bottom: 18px;
        font-size: 11px;
    }
    
    .login-button {
        padding: 12px;
        font-size: 13px;
        border-radius: 7px;
    }
    
    .register-section {
        margin-top: 18px;
        padding-top: 15px;
    }
    
    .register-button {
        padding: 9px 18px;
        font-size: 12px;
        border-radius: 6px;
    }
    
    .modal-content {
        padding: 20px;
        max-width: 300px;
    }
}

/* Para telas de celular pequeno */
@media (max-width: 360px) {
    .login-card {
        padding: 22px 18px;
    }
    
    .brand-logo {
        width: 90px;
        height: 63px;
    }
    
    .brand h1 {
        font-size: 20px;
    }
    
    .input-wrapper input {
        padding: 9px 9px 9px 32px;
        padding-right: 38px;
    }
    
    .login-button {
        padding: 11px;
    }
}

/* Para telas grandes (evitar que fique muito pequeno) */
@media (min-width: 1024px) {
    .login-container {
        max-width: 380px;
    }
}