/* ========================================
   FRETE AUTÔNOMO - LOGIN PAGE
   ======================================== */

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

body.login-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    background: #ffffff;
}

/* Left side - background image */
.login-image {
    width: 50%;
    height: 100vh;
    flex-shrink: 0;
    background: url('../images/capa-login.jpg') center/cover no-repeat;
    position: relative;
}

.login-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(30,90,75,0.3) 0%, rgba(30,90,75,0.1) 100%);
}

/* Right side - form */
.login-form-side {
    width: 50%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.login-form-container {
    width: 100%;
    max-width: 420px;
    margin: auto;
    padding: 20px 0;
    flex-shrink: 0;
}

/* Header */
.frete-header {
    text-align: center;
    margin-bottom: 32px;
}

.frete-logo-img {
    max-width: 200px;
    height: auto;
    margin: 0 auto 20px;
    display: block;
}

.frete-title {
    font-size: 22px;
    font-weight: 600;
    color: #1e5a4b;
    margin: 0 0 6px;
}

.frete-subtitle {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #f9f9f9;
    font-size: 15px;
    color: #333;
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    border-color: #1e5a4b;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(30,90,75,0.1);
}

.form-group input::placeholder {
    color: #aaa;
}

/* Remember me row */
.remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.remember-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
}

.remember-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #1e5a4b;
    cursor: pointer;
}

.forgot-link {
    font-size: 13px;
    color: #1e5a4b;
    text-decoration: none;
    font-weight: 600;
}

.forgot-link:hover {
    color: #2d7a68;
    text-decoration: underline;
}

/* Submit button */
.btn-login {
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, #1e5a4b 0%, #2d7a68 100%);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30,90,75,0.3);
}

.btn-login:active {
    transform: translateY(0);
}

/* Error message */
.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-error svg {
    flex-shrink: 0;
}

/* Footer */
.frete-footer {
    margin-top: 24px;
}

.frete-divider {
    text-align: center;
    margin: 0 0 20px;
    position: relative;
    color: #999;
    font-size: 13px;
}

.frete-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #ddd;
}

.frete-divider span {
    background: #fff;
    padding: 0 12px;
    position: relative;
}

.frete-signup {
    text-align: center;
    color: #666;
    font-size: 13px;
}

.frete-signup a {
    color: #1e5a4b;
    text-decoration: none;
    font-weight: 600;
}

.frete-signup a:hover {
    color: #2d7a68;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    body.login-page {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        overflow: auto;
    }

    .login-image {
        width: 100%;
        min-height: 220px;
        height: 220px;
    }

    .login-form-side {
        width: 100%;
        height: auto;
        min-height: auto;
        padding: 30px 20px;
        overflow-y: visible;
    }
}
