﻿@import url("/assets/css/theme-tokens.css");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: radial-gradient(
        circle at top left,
        #fbfcff 0%,
        #eef2f8 54%,
        #e4ebf6 100%
    );
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--text-primary);
}

.login-container {
    width: 100%;
    max-width: 1000px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.welcome-section {
    background: linear-gradient(180deg, #0c162d 0%, #0f1b33 100%);
    color: white;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.welcome-section h1 {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}

.welcome-section p {
    font-size: 16px;
    opacity: 0.95;
    line-height: 1.6;
    margin-bottom: 30px;
    color: #e5ecff;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feature-item {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 14px;
    opacity: 0.9;
}

.feature-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.form-section {
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-header {
    margin-bottom: 30px;
}

.form-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.form-header p {
    color: #6b7280;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1b2430;
    margin-bottom: 8px;
}

input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #cad4e3;
    border-radius: 8px;
    font-size: 14px;
    background: #f9fbff;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(24, 72, 184, 0.15);
}

input::placeholder {
    color: #6b7280;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.password-toggle:hover {
    opacity: 0.7;
}

.remember-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    font-size: 13px;
    color: var(--text-primary);
}

.remember-section input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.forgot-password {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #0d56c0;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: linear-gradient(
        180deg,
        var(--primary) 0%,
        var(--primary-dark) 100%
    );
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 16px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(47, 109, 255, 0.35);
}

.btn-register {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    color: white;
}

.btn-supplier {
    background: linear-gradient(
        180deg,
        var(--primary-light) 0%,
        var(--primary) 100%
    );
}

.btn-supplier:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(24, 72, 184, 0.35);
    border-color: rgba(24, 72, 184, 0.3);
}

.btn-reseller {
    background: linear-gradient(180deg, var(--secondary) 0%, var(--accent) 100%);
}

.btn-reseller:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(183, 24, 53, 0.35);
    border-color: rgba(183, 24, 53, 0.3);
}

.error-message {
    background: #feeceb;
    color: #a82020;
    border: 1px solid #f4b3a4;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}

.error-line {
    margin: 4px 0;
    font-size: 13px;
}

.remember-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    cursor: pointer;
}

.remember-checkbox {
    width: 18px;
    padding: 0;
}

.register-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}

.register-icon {
    font-size: 16px;
}

.login-tip-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 16px;
}

@media (max-width: 768px) {
    .login-container {
        grid-template-columns: 1fr;
    }

    .welcome-section {
        display: none;
    }

    .form-section {
        padding: 40px 24px;
    }

    body {
        padding: 16px;
    }
}

.tips {
    margin-top: 13px;
    color: #667085;
    font-size: 11px;
    text-align: center;
}

.errors {
    background: #fff2f2;
    border: 1px solid #ffd3d3;
    color: #ad2b2b;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 12px;
    font-size: 13px;
}

@media (max-width: 920px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .welcome h1 {
        font-size: 30px;
    }
}

/* Modern Visual Refresh */
body {
    background:
        radial-gradient(70rem 45rem at 8% 0%, #d9ecff 0%, transparent 46%),
        radial-gradient(70rem 45rem at 100% 0%, #d8f6f0 0%, transparent 40%),
        linear-gradient(180deg, #f8fbff 0%, #edf4ff 100%);
}

.login-container {
    max-width: 1060px;
    border: 1px solid #dce8f7;
    border-radius: 22px;
    box-shadow: 0 24px 55px rgba(18, 43, 77, 0.14);
}

.welcome-section {
    background:
        radial-gradient(
            26rem 20rem at 10% 10%,
            rgba(68, 188, 236, 0.28) 0%,
            transparent 50%
        ),
        linear-gradient(160deg, #102444 0%, #113a68 55%, #15508c 100%);
    padding: 56px 42px;
}

.welcome-section h1 {
    font-family: var(--font-heading);
    letter-spacing: -0.03em;
    font-size: 38px;
}

.feature-item {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 9px 10px;
}

.feature-icon {
    background: rgba(255, 255, 255, 0.28);
    font-weight: 800;
}

.form-section {
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    padding: 54px 40px;
}

.form-header h2 {
    font-family: var(--font-heading);
    color: #132440;
    letter-spacing: -0.02em;
}

input {
    border: 1px solid #d4e1f3;
    border-radius: 12px;
    background: #fff;
    padding: 13px 14px;
}

input:focus {
    border-color: rgba(24, 72, 184, 0.45);
    box-shadow: 0 0 0 4px rgba(24, 72, 184, 0.13);
}

.btn-login {
    border-radius: 12px;
    background: linear-gradient(
        145deg,
        var(--primary) 0%,
        var(--primary-light) 100%
    );
    box-shadow: 0 12px 24px rgba(24, 72, 184, 0.3);
}

.btn-login:hover {
    box-shadow: 0 14px 28px rgba(24, 72, 184, 0.36);
}

.btn-register {
    border-radius: 12px;
    font-weight: 700;
}

.btn-supplier {
    background: linear-gradient(150deg, var(--primary) 0%, var(--primary-light) 100%);
}

.btn-reseller {
    background: linear-gradient(150deg, var(--secondary) 0%, var(--accent) 100%);
}

.error-message {
    border-radius: 12px;
    border-color: #f0b7b7;
    background: #fff2f2;
}

@media (max-width: 768px) {
    .login-container {
        border-radius: 16px;
    }

    .form-section {
        padding: 34px 20px;
    }
}

/* Back Button */
.btn-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #ffffff;
    border: 2px solid var(--primary);
    border-radius: 50%;
    color: var(--primary);
    font-size: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(24, 72, 184, 0.25);
}

.btn-back:hover {
    transform: translateX(-3px) scale(1.08);
    box-shadow: 0 6px 16px rgba(24, 72, 184, 0.35);
    background: var(--primary);
    color: #ffffff;
}
