﻿.register-card {
    font-size: 1rem;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    padding: 5.2em 4.8em;
    background-image: url("../img/banners/register.webp");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.register {
    font-size: 1rem;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 76em;
    padding: 3.6em;
    align-items: flex-start;
    gap: 2.4em;
    border-radius: 1.6em;
    background-color: var(--neutral-1);
    border: 1px solid var(--neutral-7);
    box-shadow: 6px 6px 5.4em 0px rgba(0, 0, 0, 0.05);
}

.register_header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.4em;
    width: 100%;
}

.register_header > h2 {
    font-size: 2.4em;
    font-weight: 600;
    color: var(--brand-1);
}

.register_header > p {
    font-size: 1.2em;
    font-weight: 400;
    color: var(--neutral-12);
}

.register_header > p > a {
    color: var(--brand-1);
    font-weight: 500;
    transition: color 0.2s ease;
}

.register_header > p > a:hover {
    color: var(--brand-3);
    text-decoration: underline;
}

/* =========================================
   Form Container
   ========================================= */

.register_form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2.4em;
}

/* =========================================
   Company Information Section
   ========================================= */

.register_section {
    border: none;
    border-top: 1px dashed var(--neutral-7);
    padding: 1.8em 0 0 0;
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2em;
}

.register_section_title {
    font-size: 1.8em;
    font-weight: 500;
    color: var(--brand-2);
    padding: 0;
    width: 100%;
    display: block;
    float: left;
}

.register_row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 2.8em;
    row-gap: 2em;
    width: 100%;
}

.register_group {
    display: flex;
    flex-direction: column;
    gap: 0.8em;
    width: 100%;
}

.register_group.full_width {
    width: 100%;
}

.register_group > label {
    font-size: 1.3em;
    font-weight: 500;
    color: var(--secondary-8);
    line-height: 1.3;
}

/* Input Fields */
.register_input {
    position: relative;
    width: 100%;
    height: 3.8em;
    display: flex;
    align-items: center;
}

.register_input > input {
    width: 100%;
    height: 100%;
    padding: 0 1.6em;
    font-size: 1.3em;
    font-weight: 400;
    color: var(--secondary-8);
    background-color: var(--neutral-1);
    border: 1px solid #E8ECEF;
    border-radius: 0.8em;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.register_input > input::placeholder {
    color: #A0AEC0;
    opacity: 0.85;
    font-size: 1em;
    font-weight: 400;
}

.register_input > input:focus {
    border-color: var(--brand-2);
    box-shadow: 0 0 0 3px rgba(139, 197, 61, 0.18);
    outline: none;
}

/* Password Input & Eye Button & Calendar Icon */
.register_input_password,
.register_input:has(.register_eye),
.register_input:has(.register_calendar_icon) {
    height: 4em;
}

.register_input > input[type="password"],
.register_input > input[name="password"],
.register_input > input[name="confirm_password"],
.register_input > input[name="ref_account_opened[]"] {
    height: 100%;
    padding-right: 4.4em;
}

.register_calendar_icon {
    position: absolute;
    right: 1.4em;
    top: 50%;
    transform: translateY(-50%);
    width: 2.2em;
    height: 2.2em;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #A0AEC0;
    transition: color 0.2s ease;
}

.register_calendar_icon > svg {
    width: 1.8em;
    height: 1.8em;
    color: inherit;
}

.register_calendar_icon:hover {
    color: var(--brand-1);
}

.register_eye {
    position: absolute;
    right: 1.4em;
    top: 50%;
    transform: translateY(-50%);
    width: 2.2em;
    height: 2.2em;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #A0AEC0;
    transition: color 0.2s ease;
}

.register_eye > svg {
    width: 1.8em;
    height: 1.8em;
    color: inherit;
}

.register_eye:hover,
.register_eye.show {
    color: var(--secondary-8);
}

.register_eye .icon_eye_on {
    display: none;
}

.register_eye .icon_eye_off {
    display: block;
}

.register_eye.show .icon_eye_on {
    display: block;
}

.register_eye.show .icon_eye_off {
    display: none;
}

/* =========================================
   Password Rules Checklist & Feedback
   ========================================= */

.password_rules_container {
    display: none;
    width: 100%;
    padding: 1.2em 1.6em;
    background-color: var(--secondary-6);
    border: 1px solid rgba(139, 197, 61, 0.25);
    border-radius: 0.8em;
    flex-direction: column;
    gap: 0.8em;
    animation: fadeInSlide 0.25s ease forwards;
}

.password_rules_container.show {
    display: flex;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.password_rules_title {
    font-size: 1.2em;
    font-weight: 500;
    color: var(--secondary-8);
}

.password_rules_list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8em 2em;
    list-style: none;
    margin: 0;
    padding: 0;
}

.password_rule_item {
    display: flex;
    align-items: center;
    gap: 0.8em;
    font-size: 1.2em;
    color: var(--neutral-12);
    transition: color 0.2s ease;
}

.password_rule_item .rule_icon {
    width: 1.6em;
    height: 1.6em;
    border-radius: 50%;
    background-color: var(--neutral-8);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.password_rule_item .rule_icon .icon_dot {
    width: 0.5em;
    height: 0.5em;
    border-radius: 50%;
    background-color: var(--neutral-4);
    display: block;
}

.password_rule_item .rule_icon .icon_check {
    display: none;
    width: 1.1em;
    height: 1.1em;
    color: var(--neutral-1);
}

.password_rule_item.is_valid {
    color: var(--brand-1);
    font-weight: 500;
}

.password_rule_item.is_valid .rule_icon {
    background-color: var(--brand-1);
}

.password_rule_item.is_valid .rule_icon .icon_dot {
    display: none;
}

.password_rule_item.is_valid .rule_icon .icon_check {
    display: block;
}

.password_match_feedback {
    font-size: 1.2em;
    font-weight: 500;
    display: none;
    padding-top: 0.2em;
}

.password_match_feedback.error {
    display: block;
    color: var(--secondary-5);
}

.password_match_feedback.success {
    display: block;
    color: var(--brand-1);
}

.register_input.is_invalid input {
    border-color: var(--secondary-5) !important;
    box-shadow: 0 0 0 2px rgba(232, 36, 27, 0.15) !important;
}

.register_input.is_valid input {
    border-color: var(--brand-1);
}

.register_radio_group.is_invalid .custom_radio {
    border-color: var(--secondary-5) !important;
}

/* =========================================
   Type of Business (Custom Radio Buttons)
   ========================================= */

/* Type of Business Container & Title */
.register_group:has(.register_radio_group) {
    gap: 1.2em;
}

.register_group:has(.register_radio_group) > label,
.register_radio_title {
    font-size: 1.4em;
    font-weight: 600;
    color: var(--secondary-8);
    letter-spacing: -0.01em;
}

.register_radio_group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 2.4em;
    row-gap: 1.4em;
    align-items: center;
    width: 100%;
}

.register_radio_label {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.9em;
    cursor: pointer;
    user-select: none;
}

.register_radio_label:last-child {
    grid-column: 1 / -1;
}

.register_radio_label > input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.custom_radio {
    width: 1.8em;
    height: 1.8em;
    border-radius: 50%;
    border: 1.5px solid #D1D5DB;
    background-color: var(--neutral-1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.custom_radio::after {
    display: none;
}

.register_radio_label:hover .custom_radio {
    border-color: var(--brand-1);
}

.register_radio_label > input[type="radio"]:checked + .custom_radio {
    background-color: var(--brand-1);
    border-color: var(--brand-1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.6 8.2L6.6 11.2L12.4 4.8' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 65% 65%;
}

.register_radio_label > span:last-child {
    font-size: 1.3em;
    font-weight: 400;
    color: var(--neutral-9);
    white-space: nowrap;
}

.business_type_other_wrap {
    margin-top: 0.8em;
    width: 100%;
    display: none;
}

.register_input > input:disabled {
    background-color: #F8FAFC;
    color: #94A3B8;
    cursor: not-allowed;
    border-color: #E2E8F0;
}

/* =========================================
   Submit Button
   ========================================= */

.register_submit {
    font-size: 1rem;
    width: 100%;
    height: 4.8em;
    background-color: var(--brand-1);
    color: var(--neutral-1);
    border-radius: 0.8em;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.register_submit > span {
    font-size: 1.5em;
    font-weight: 500;
}

.register_submit:hover {
    background-color: var(--brand-3);
}

.register_submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background-color: #94a3b8;
    pointer-events: none;
    box-shadow: none;
}

.register_submit:active {
    transform: scale(0.99);
}

/* =========================================
   Trade References & Terms (Future-ready)
   ========================================= */

.trade_references {
    gap: 2em;
    border-bottom: 1px dashed var(--neutral-7);
    padding-bottom: 2.4em;
}

.company_references_list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2.4em;
}

.company_reference_item {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.8em;
}

.company_reference_item:not(:last-child) {
    padding-bottom: 2.4em;
    border-bottom: 1px dashed var(--neutral-7);
}

.company_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.company_badge {
    font-size: 1.5em;
    font-weight: 600;
    color: var(--secondary-8);
    margin: 0;
    line-height: 1.3;
}

.btn_remove_company {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    padding: 0.4em 0.8em;
    font-size: 1.2em;
    font-weight: 500;
    color: var(--secondary-5);
    background-color: rgba(232, 36, 27, 0.08);
    border: none;
    border-radius: 0.4em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn_remove_company:hover {
    background-color: var(--secondary-5);
    color: var(--neutral-1);
}

.btn_add_company {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    padding: 0.4em 0;
    font-size: 1.4em;
    font-weight: 500;
    color: var(--brand-3);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.btn_add_company:hover {
    color: var(--secondary-2);
}

.register_terms {
    width: 100%;
    padding: 0.4em 0;
}

.register_checkbox_label {
    display: flex;
    align-items: flex-start;
    gap: 1.2em;
    cursor: pointer;
    user-select: none;
}

.register_checkbox_label > input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.custom_checkbox {
    width: 1.8em;
    height: 1.8em;
    border-radius: 50%;
    border: 1.5px solid #D1D5DB;
    background-color: var(--neutral-1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0.2em;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.custom_checkbox::after {
    display: none;
}

.register_checkbox_label:hover .custom_checkbox {
    border-color: var(--brand-1);
}

.register_checkbox_label > input[type="checkbox"]:checked + .custom_checkbox {
    background-color: var(--brand-1);
    border-color: var(--brand-1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.6 8.2L6.6 11.2L12.4 4.8' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 65% 65%;
}

.terms_text {
    font-size: 1.3em;
    line-height: 1.65;
    color: var(--neutral-12);
    font-weight: 400;
}

.register_terms_policy {
    margin-top: 1.4em;
    font-size: 1.3em;
    line-height: 1.65;
    color: var(--neutral-12);
    font-weight: 400;
}

.register_terms_policy a {
    color: var(--brand-1);
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s ease;
}

.register_terms_policy a:hover {
    color: var(--brand-3);
}

/* =========================================
   Responsive Breakpoints
   ========================================= */

@media (max-width: 767px) {
    .register-card {
        padding: 4em 2em;
    }

    .register {
        padding: 2.4em 2em;
        gap: 2em;
    }

    .register_row {
        grid-template-columns: 1fr;
        gap: 1.6em;
    }

    .register_radio_group {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 1.6em;
        row-gap: 1.2em;
    }

    .register_radio_label:last-child {
        grid-column: 1 / -1;
    }

    .register_section_title {
        font-size: clamp(1.8em, 4.5vw, 2.2em);
    }

    .password_rules_list {
        grid-template-columns: 1fr;
        gap: 0.6em;
    }
}

@media (max-width: 575px) {
    .register-card {
        padding: 2.8em 1.2em;
    }

    .register {
        padding: 2em 1.4em;
        border-radius: 1.2em;
        font-size: clamp(8px, 2.5vw, 10px);
    }

    .register_radio_group {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   Month-Year Picker Popover (Minimalist Design)
   ========================================= */
.register_input > input[name="ref_account_opened[]"] {
    cursor: pointer;
    user-select: none;
    caret-color: transparent;
}

.month_picker_dropdown {
    position: absolute;
    z-index: 9999;
    width: 260px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    box-shadow: 0 10px 30px -4px rgba(0, 0, 0, 0.12), 0 6px 14px -4px rgba(0, 0, 0, 0.06);
    padding: 14px;
    font-family: inherit;
    display: none;
    box-sizing: border-box;
}

.month_picker_dropdown.is_open {
    display: block;
    animation: monthPickerFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes monthPickerFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.month_picker_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 2px 4px;
}

.month_picker_year_btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #64748B;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    padding: 0;
}

.month_picker_year_btn:hover {
    background: #F1F5F9;
    color: var(--brand-1);
}

.month_picker_year_btn > svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.month_picker_current_year {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0F172A;
    letter-spacing: -0.01em;
}

.month_picker_grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 10px;
}

.month_picker_month_btn {
    padding: 10px 4px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #334155;
    font-size: 1.3rem;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
    user-select: none;
    line-height: 1.2;
}

.month_picker_month_btn:hover {
    background: #EDF7EE;
    color: var(--brand-1);
    font-weight: 600;
}

.month_picker_month_btn.is_selected {
    background: var(--brand-1) !important;
    color: #FFFFFF !important;
    font-weight: 600;
}

.month_picker_footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #F1F5F9;
    padding-top: 8px;
    margin-top: 6px;
}

.month_picker_quick_btn {
    background: none;
    border: none;
    color: var(--brand-1);
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background-color 0.15s ease;
}

.month_picker_quick_btn:hover {
    background: #EDF7EE;
}

.month_picker_clear_btn {
    background: none;
    border: none;
    color: #94A3B8;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.month_picker_clear_btn:hover {
    color: var(--secondary-5, #E8241B);
    background: #FEE2E2;
}

