* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-pink: #FF0A8C;
    --primary-pink-dark: #E0087A;
    --text-dark: #333333;
    --text-light: #666666;
    --border-color: #E0E0E0;
    --bg-light: #F5F5F5;
    --bg-white: #FFFFFF;
    --input-bg: #F9F9F9;
    --button-bg: #E8E8E8;
    --button-text: #666666;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-white);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.login-box {
    background-color: var(--bg-white);
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Logo */
.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
}

.livelo-logo {
    height: 30px;
    width: auto;
    max-width: 144px;
}

/* Heading */
.login-heading {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 30px;
}

/* Form */
.login-form {
    width: 100%;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 16px;
    z-index: 1;
}

.input-group input {
    width: 100%;
    padding: 14px 45px 14px 45px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    font-family: var(--font-family);
    background-color: var(--bg-white);
    color: var(--text-dark);
    transition: all 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-pink);
    box-shadow: 0 0 0 3px rgba(255, 10, 140, 0.1);
}

.input-group input::placeholder {
    color: var(--text-light);
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: var(--primary-pink);
}

.toggle-password:focus {
    outline: none;
}

/* Forgot Password */
.forgot-password {
    display: block;
    text-align: left;
    color: var(--primary-pink);
    text-decoration: underline;
    font-size: 14px;
    margin-bottom: 25px;
    transition: color 0.3s;
}

.forgot-password:hover {
    color: var(--primary-pink-dark);
}

/* Login Button */
.btn-login {
    width: 100%;
    padding: 16px;
    background-color: var(--button-bg);
    color: var(--button-text);
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 500;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 30px;
}

.btn-login:disabled {
    cursor: not-allowed;
    background-color: #E8E8E8;
    color: #999999;
}

/* Botão habilitado - rosa do Livelo */
.btn-login:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-pink) 0%, var(--primary-pink-dark) 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 10, 140, 0.2);
}

.btn-login:not(:disabled):hover {
    background: linear-gradient(135deg, var(--primary-pink-dark) 0%, #C0076A 100%);
    box-shadow: 0 4px 12px rgba(255, 10, 140, 0.3);
    transform: translateY(-1px);
}

.btn-login:not(:disabled):active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 6px rgba(255, 10, 140, 0.2);
}

.btn-login:not(:disabled):focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 10, 140, 0.2);
}

/* Signup Link */
.signup-link {
    text-align: center;
}

.signup-link p {
    color: var(--text-dark);
    font-size: 14px;
    margin-bottom: 8px;
}

.create-account {
    color: var(--primary-pink);
    text-decoration: underline;
    font-size: 14px;
    transition: color 0.3s;
}

.create-account:hover {
    color: var(--primary-pink-dark);
}

/* Loading Modal */
.loading-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.loading-modal.show {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.loading-content {
    background: white;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 300px;
    width: 90%;
}

.loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: var(--primary-pink);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-ring:nth-child(2) {
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
    border-top-color: var(--primary-pink-dark);
    animation-duration: 1.5s;
    animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
    width: 50%;
    height: 50%;
    top: 25%;
    left: 25%;
    border-top-color: var(--primary-pink);
    animation-duration: 2s;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 16px;
    color: var(--text-dark);
    font-weight: 500;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .login-box {
        padding: 35px 25px;
        max-width: 100%;
        margin: 20px;
    }

    .logo-container {
        margin-bottom: 30px;
    }

    .livelo-logo {
        height: 28px;
    }

    .login-heading {
        font-size: 22px;
        margin-bottom: 25px;
    }

    .input-group {
        margin-bottom: 18px;
    }

    .input-group input {
        padding: 13px 45px 13px 45px;
        font-size: 15px;
    }

    .btn-login {
        padding: 14px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .login-box {
        padding: 25px 20px;
        margin: 10px;
    }

    .livelo-logo {
        height: 24px;
    }

    .login-heading {
        font-size: 18px;
        margin-bottom: 20px;
    }

    .input-group input {
        padding: 12px 40px 12px 40px;
        font-size: 14px;
    }

    .input-icon {
        font-size: 14px;
        left: 12px;
    }

    .toggle-password {
        right: 12px;
        font-size: 14px;
    }

    .forgot-password {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .btn-login {
        padding: 12px;
        font-size: 14px;
        margin-bottom: 25px;
    }

    .signup-link p {
        font-size: 13px;
    }

    .create-account {
        font-size: 13px;
    }

    .loading-content {
        padding: 30px 20px;
    }

    .loading-spinner {
        width: 60px;
        height: 60px;
    }

    .loading-text {
        font-size: 14px;
    }
}

/* Result Modals (Sucesso e Erro) */
.result-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100dvh; /* Viewport height dinâmico para mobile */
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10001;
    align-items: center; /* Centralizado no desktop */
    justify-content: center;
    animation: fadeIn 0.3s ease;
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.result-modal.show {
    display: flex;
}

.result-content {
    background: white;
    border-radius: 16px;
    padding: 50px 40px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    animation: slideUp 0.4s ease;
    margin: 0 auto;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@keyframes slideUp {
    from {
        transform: translateY(30px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Melhorar animação no mobile */
@media (max-width: 480px) {
    @keyframes slideUp {
        from {
            transform: translateY(20px) scale(0.96);
            opacity: 0;
        }
        to {
            transform: translateY(0) scale(1);
            opacity: 1;
        }
    }
}

.result-success {
    border-top: 5px solid var(--success-color);
}

.result-error {
    border-top: 5px solid var(--error-color);
}

.result-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: bold;
    margin: 0 auto 24px;
    color: white;
    animation: scaleIn 0.5s ease;
    flex-shrink: 0;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.result-success .result-icon {
    background: linear-gradient(135deg, var(--success-color) 0%, #008A4A 100%);
}

.result-error .result-icon {
    background: linear-gradient(135deg, var(--error-color) 0%, #C6283A 100%);
}

.result-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.3;
    word-wrap: break-word;
}

.result-message {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 28px;
    line-height: 1.5;
    word-wrap: break-word;
}

.result-btn {
    background: linear-gradient(135deg, var(--primary-pink) 0%, var(--primary-pink-dark) 100%);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--font-family);
    min-width: 150px;
    width: 100%;
    max-width: 280px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.result-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 10, 140, 0.4);
}

.result-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(255, 10, 140, 0.3);
}

.result-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 10, 140, 0.2);
}

/* Responsive Result Modals */
/* Garantir centralização no desktop e tablet */
@media (min-width: 481px) {
    .result-modal {
        align-items: center !important;
        justify-content: center !important;
        padding: 20px;
    }
    
    .result-content {
        border-radius: 16px;
        animation: slideUp 0.4s ease;
        margin: 0 auto;
    }
}

@media (max-width: 768px) and (min-width: 481px) {
    .result-content {
        padding: 45px 30px;
        width: 85%;
        max-width: 400px;
        margin: 0 auto;
        border-radius: 20px;
    }

    .result-icon {
        width: 70px;
        height: 70px;
        font-size: 35px;
        margin-bottom: 20px;
    }

    .result-title {
        font-size: 22px;
        margin-bottom: 12px;
    }

    .result-message {
        font-size: 15px;
        margin-bottom: 28px;
    }

    .result-btn {
        padding: 15px 35px;
        font-size: 15px;
        max-width: 260px;
    }
}

@media (max-width: 480px) {
    .result-modal {
        padding: 20px;
        align-items: center;
        justify-content: center;
    }

    .result-content {
        padding: 32px 24px 28px;
        width: calc(100% - 40px);
        max-width: 400px;
        margin: 0 auto;
        border-radius: 16px;
        animation: slideUp 0.4s ease;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    }

    .result-icon {
        width: 56px;
        height: 56px;
        font-size: 28px;
        margin-bottom: 16px;
    }

    .result-title {
        font-size: 20px;
        margin-bottom: 8px;
        padding: 0;
    }

    .result-message {
        font-size: 14px;
        margin-bottom: 24px;
        padding: 0;
        line-height: 1.5;
    }

    .result-btn {
        padding: 16px 32px;
        font-size: 15px;
        font-weight: 600;
        min-width: 100%;
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 360px) {
    .result-modal {
        padding: 15px;
        align-items: center;
        justify-content: center;
    }

    .result-content {
        padding: 28px 20px 24px;
        width: calc(100% - 30px);
        max-width: 400px;
        margin: 0 auto;
        border-radius: 16px;
    }

    .result-icon {
        width: 52px;
        height: 52px;
        font-size: 26px;
        margin-bottom: 14px;
    }

    .result-title {
        font-size: 18px;
        margin-bottom: 6px;
    }

    .result-message {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .result-btn {
        padding: 13px 24px;
        font-size: 14px;
    }
}

/* Melhorias para orientação landscape em mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .result-modal {
        align-items: center;
        justify-content: center;
    }

    .result-modal {
        padding: 20px;
    }

    .result-content {
        max-height: 85vh;
        padding: 28px 32px;
        border-radius: 16px;
        width: 90%;
        max-width: 400px;
        margin: 0 auto;
        animation: slideUp 0.4s ease;
    }

    .result-icon {
        width: 52px;
        height: 52px;
        font-size: 26px;
        margin-bottom: 14px;
    }

    .result-title {
        font-size: 18px;
        margin-bottom: 6px;
    }

    .result-message {
        font-size: 14px;
        margin-bottom: 18px;
    }

    .result-btn {
        padding: 13px 32px;
        font-size: 14px;
        max-width: 100%;
    }
}

/* Error Message */
.error-message {
    color: var(--error-color);
    font-size: 14px;
    text-align: center;
    padding: 12px;
    background: rgba(230, 57, 70, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(230, 57, 70, 0.3);
    display: none;
    margin-top: 15px;
}

.error-message.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

