:root {
    --navy: #0f2d5c;
    --blue: #1a56db;
    --blue-lt: #2563eb;
    --sky: #e8f0fe;
    --sky-mid: #c7d9f9;
    --white: #ffffff;
    --off-white: #f5f7fa;
    --black: #0d1117;
    --grey-700: #374151;
    --grey-500: #6b7280;
    --grey-300: #d1d5db;
    --grey-100: #f3f4f6;
    --error: #dc2626;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Kanit', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: hidden;
}

/* Right panel */
.right-panel {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.form-wrapper {
    width: 100%;
    max-width: 600px;
    background: var(--white);
    border-radius: 16px;
    padding: 40px 40px 36px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
    animation: slideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-header {
    margin-bottom: 32px;
}

.form-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--black);
    letter-spacing: -0.01em;
    margin-bottom: 6px;
}

.form-header p {
    font-size: 14px;
    color: var(--grey-500);
    font-weight: 300;
}

/* Input groups */
.input-group {
    position: relative;
    margin-bottom: 18px;
}

.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--grey-700);
    margin-bottom: 6px;
}

.input-group input {
    width: 100%;
    background: var(--white);
    border: 1.5px solid var(--grey-300);
    border-radius: 8px;
    padding: 11px 14px;
    color: var(--black);
    font-size: 14.5px;
    font-family: 'Kanit', sans-serif;
    outline: none;
    transition: all 0.2s ease;
}

.input-group input::placeholder {
    color: var(--grey-300);
}

.input-group input:focus {
    border-color: var(--blue-lt);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-group.error input {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.input-suffix {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    /* เปลี่ยนจาก bottom: 10px */
}

.password-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--grey-500);
    padding: 4px;
    display: flex;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: var(--blue-lt);
}

.error-message {
    font-size: 12px;
    color: var(--error);
    font-weight: 500;
    margin-top: 5px;
    opacity: 0;
    transform: translateY(-3px);
    transition: all 0.2s ease;
}

.error-message.show {
    opacity: 1;
    transform: none;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13.5px;
    color: var(--grey-700);
    font-weight: 500;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--grey-300);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-label input:checked+.checkmark {
    background: var(--blue-lt);
    border-color: var(--blue-lt);
    color: white;
}

.forgot-link {
    font-size: 13.5px;
    color: var(--blue-lt);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: var(--navy);
}

/* Submit button */
.submit-btn {
    width: 100%;
    background: var(--blue-lt);
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    cursor: pointer;
    font-family: 'Kanit', sans-serif;
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 20px;
    transition: all 0.2s ease;
    overflow: hidden;
}

.submit-btn:hover {
    background: var(--navy);
    box-shadow: 0 4px 16px rgba(15, 45, 92, 0.25);
    transform: translateY(-1px);
}

.submit-btn:active {
    transform: none;
}

.submit-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-text {
    transition: opacity 0.2s;
}

.btn-loader {
    position: absolute;
    opacity: 0;
    transition: opacity 0.2s;
}

.submit-btn.loading .btn-text {
    opacity: 0;
}

.submit-btn.loading .btn-loader {
    opacity: 1;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--grey-300);
}

.divider span {
    font-size: 12px;
    color: var(--grey-500);
    font-weight: 500;
    letter-spacing: 0.03em;
}

/* Social buttons */
.social-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}

.social-btn {
    flex: 1;
    background: var(--white);
    color: var(--grey-700);
    border: 1.5px solid var(--grey-300);
    border-radius: 8px;
    padding: 10px 16px;
    cursor: pointer;
    font-family: 'Kanit', sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    min-height: 42px;
}

.social-btn:hover {
    border-color: var(--blue-lt);
    color: var(--navy);
    background: var(--sky);
    transform: translateY(-1px);
}

.social-btn:active {
    transform: none;
}

/* Note */
.note-box {
    font-size: 12.5px;
    color: var(--grey-500);
    line-height: 1.9;
    border-top: 1px solid var(--grey-300);
    padding-top: 16px;
    margin-top: 4px;
    font-weight: 300;
}

.note-box .note-title {
    font-weight: 600;
    color: var(--grey-700);
    margin-bottom: 4px;
    font-size: 13px;
}

/* Success */
.success-message {
    display: none;
    text-align: center;
    padding: 16px 0;
}

.success-message.show {
    display: block;
    animation: fadeIn 0.4s ease both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.success-icon {
    width: 56px;
    height: 56px;
    background: var(--blue-lt);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
    animation: pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pop {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

.success-message h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--black);
    letter-spacing: -0.01em;
    margin-bottom: 6px;
}

.success-message p {
    font-size: 13.5px;
    color: var(--grey-500);
    font-weight: 300;
}

@media (max-width: 860px) {
    .left-panel {
        display: none;
    }

    .form-wrapper {
        padding: 32px 24px 28px;
    }
}

@media (max-width: 480px) {
    .social-buttons {
        flex-direction: column;
    }
}