* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #0a0a0a;
    color: #fff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-wrapper {
    display: flex;
    width: 100%;
    max-width: 1100px;
    min-height: 640px;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Left decorative panel */
.auth-visual {
    flex: 1;
    background: linear-gradient(135deg, #2962ff 0%, #5e0c1b 40%, #38020c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    position: relative;
}

.auth-visual h2 {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
}

/* Right form panel */
.auth-form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 40px;
    position: relative;
}

.auth-form-panel .close-btn {
    position: absolute;
    top: 24px;
    right: 24px;
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.auth-form-panel .back-btn {
    position: absolute;
    top: 24px;
    left: 24px;
    background: none;
    border: none;
    color: #888;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
}

.brand {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
}

.auth-form {
    width: 100%;
    max-width: 340px;
}

.auth-form h1 {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: #bbb;
    margin-bottom: 8px;
}

.input-wrap {
    position: relative;
}

.input-wrap input {
    width: 100%;
    padding: 14px 44px 14px 44px;
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.input-wrap input:focus {
    border-color: #2962ff;
}

.input-wrap input.error {
    border-color: #f23645;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #888;
    pointer-events: none;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.error-text {
    color: #f23645;
    font-size: 13px;
    margin-top: 6px;
}

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
}

.alert-success {
    background: rgba(38, 166, 154, 0.15);
    color: #26a69a;
    border: 1px solid rgba(38, 166, 154, 0.3);
}

.alert-error {
    background: rgba(242, 54, 69, 0.1);
    color: #f23645;
    border: 1px solid rgba(242, 54, 69, 0.3);
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: opacity 0.2s;
}

.submit-btn:hover {
    opacity: 0.9;
}

.switch-link {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #ffffff;
}

.switch-link a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
}

.switch-link a:hover {
    text-decoration: underline;
}

/* ===== Responsive (mobile) ===== */
@media (max-width: 860px) {
    body {
        padding: 0;
        align-items: stretch;
    }

    .auth-wrapper {
        flex-direction: column;
        max-width: 100%;
        min-height: 100vh;
        border-radius: 0;
    }

    .auth-visual {
        display: none;
    }

    .auth-form-panel {
        flex: 1;
        padding: 70px 24px 40px;
        justify-content: flex-start;
    }

    .brand {
        margin-bottom: 60px;
    }

    .auth-form {
        max-width: 100%;
    }
}