/* ==========================================================================
   Affiliate & Đại lý Registration Page (affiliate-agent.css)
   ========================================================================== */

.partner-reg-page {
    position: relative;
    min-height: 760px;
    padding: 44px 0 56px;
    background-color: #0e3d17;
    background-image: url('/storage/img/usp/usp-tea-quality.webp');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    overflow: hidden;
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.partner-reg-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        102deg,
        rgba(8, 52, 16, 0.92) 0%,
        rgba(12, 66, 22, 0.84) 44%,
        rgba(18, 84, 28, 0.42) 74%,
        rgba(16, 74, 24, 0.34) 100%
    );
    pointer-events: none;
    z-index: 1;
}

.partner-bg-teacup {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 44%;
    max-width: 560px;
    height: 290px;
    background-image: url('/storage/img/usp/usp-tea-price.webp');
    background-size: cover;
    background-position: center 65%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.9;
    -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.98) 25%, rgba(0, 0, 0, 0.55) 65%, rgba(0, 0, 0, 0) 100%),
        linear-gradient(to right, rgba(0, 0, 0, 1) 58%, rgba(0, 0, 0, 0) 100%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.98) 25%, rgba(0, 0, 0, 0.55) 65%, rgba(0, 0, 0, 0) 100%),
        linear-gradient(to right, rgba(0, 0, 0, 1) 58%, rgba(0, 0, 0, 0) 100%);
    mask-composite: intersect;
}

.partner-leaf-decor {
    position: absolute;
    pointer-events: none;
    z-index: 3;
    opacity: 0.9;
}

.partner-leaf-decor--tl {
    top: -10px;
    left: -10px;
    width: 110px;
    height: 110px;
}

.partner-leaf-decor--tr {
    top: -8px;
    right: -8px;
    width: 120px;
    height: 120px;
}

.partner-reg-page .ctnr {
    position: relative;
    z-index: 2;
}

.partner-reg-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
    gap: 36px;
    align-items: stretch;
}

/* ==========================================================================
   Left Hero Column
   ========================================================================== */
.partner-hero {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 12px 10px 180px 4px;
    color: #ffffff;
}

.partner-brand {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 24px;
    text-decoration: none;
}

.partner-brand__logo {
    max-height: 58px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
    display: block;
}

.partner-brand__mark {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    color: #ffffff;
}

.partner-brand__text {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-weight: 700;
    font-size: 25px;
    color: #ffffff;
    letter-spacing: 0.2px;
    line-height: 1.1;
    padding-bottom: 5px;
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.45);
}

.partner-hero__title {
    margin: 0 0 14px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 46px;
    font-weight: 800;
    line-height: 1.16;
    color: #ffffff;
    text-shadow: 0 3px 16px rgba(0, 0, 0, 0.25);
}

.partner-hero__accent {
    position: relative;
    display: inline-block;
    font-family: 'Dancing Script', 'Playfair Display', cursive;
    font-size: 56px;
    font-weight: 700;
    color: #f4d24f;
    padding: 0 4px;
    line-height: 1;
}

.partner-hero__accent::after {
    content: "";
    position: absolute;
    left: 2px;
    right: 2px;
    bottom: -4px;
    height: 4px;
    background: linear-gradient(90deg, #f4d24f 0%, #f8e07c 65%, rgba(244, 210, 79, 0.2) 100%);
    border-radius: 99px;
    transform: rotate(-1.5deg);
}

.partner-hero__subtitle {
    margin: 0 0 28px;
    font-size: 19px;
    font-weight: 500;
    line-height: 1.48;
    color: rgba(255, 255, 255, 0.92);
    max-width: 390px;
}

/* Feature List */
.partner-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 30px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.partner-benefit {
    display: flex;
    align-items: center;
    gap: 14px;
}

.partner-benefit__icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(182, 232, 126, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d7f5a8;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
}

.partner-benefit__content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.partner-benefit__title {
    margin: 0;
    font-size: 16.5px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
}

.partner-benefit__desc {
    margin: 0;
    font-size: 13.5px;
    color: rgba(236, 248, 232, 0.85);
    line-height: 1.4;
}

/* Hotline Pill */
.partner-hotline {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    align-self: flex-start;
    padding: 10px 24px 10px 12px;
    border-radius: 999px;
    background: rgba(9, 44, 16, 0.72);
    border: 1.5px solid #e7c64e;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    text-decoration: none;
    transition: transform 0.22s ease, background-color 0.22s ease, box-shadow 0.22s ease;
}

.partner-hotline:hover {
    transform: translateY(-2px);
    background: rgba(12, 56, 20, 0.88);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
}

.partner-hotline__icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f8df72 0%, #e1b832 100%);
    color: #0f3f16;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.partner-hotline__info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.partner-hotline__label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 2px;
}

.partner-hotline__number {
    font-size: 22px;
    font-weight: 800;
    color: #f5d451;
    letter-spacing: 0.4px;
}

/* ==========================================================================
   Right Form Card
   ========================================================================== */
.partner-form-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 22px;
    padding: 34px 36px 32px;
    box-shadow: 0 22px 54px rgba(6, 36, 12, 0.32);
    border: 1px solid rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
}

.partner-form-header {
    text-align: center;
    margin-bottom: 22px;
}

.partner-form-header__title {
    margin: 0 0 6px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 34px;
    font-weight: 800;
    color: #144417;
    line-height: 1.2;
}

.partner-form-header__leaf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 2px 0 8px;
    color: #4ea52b;
}

.partner-form-header__desc {
    margin: 0 auto;
    max-width: 490px;
    font-size: 14px;
    line-height: 1.55;
    color: #4b5549;
}

/* Partner Type Selector Cards */
.partner-type-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.partner-type-option {
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    padding: 14px 16px 15px;
    border-radius: 14px;
    background-color: #f7f9f7;
    border: 1.5px solid #e1e6e0;
    transition: all 0.22s ease;
    user-select: none;
}

.partner-type-option:hover {
    border-color: #84c565;
    background-color: #f4faf0;
}

.partner-type-option.is-selected {
    background-color: #eff8ea;
    border-color: #4aa327;
    box-shadow: 0 4px 14px rgba(74, 163, 39, 0.14);
}

.partner-type-option__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.partner-type-option__top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.partner-type-option__radio {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.8px solid #b8c2b6;
    background-color: #ffffff;
    flex-shrink: 0;
    position: relative;
    align-self: flex-start;
    margin-top: 2px;
    transition: border-color 0.2s ease;
}

.partner-type-option.is-selected .partner-type-option__radio {
    border-color: #3a961c;
}

.partner-type-option.is-selected .partner-type-option__radio::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: #3a961c;
    transform: translate(-50%, -50%);
}

.partner-type-option__icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2f8b19;
    flex-shrink: 0;
}

.partner-type-option__titles {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.partner-type-option__name {
    font-size: 16px;
    font-weight: 800;
    color: #163d18;
    line-height: 1.25;
}

.partner-type-option__sub {
    font-size: 13px;
    font-weight: 600;
    color: #3a4a39;
    line-height: 1.25;
}

.partner-type-option__desc {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.45;
    color: #556153;
    text-align: center;
}

/* Form Layout */
.partner-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.partner-form-group {
    margin-bottom: 14px;
}

.partner-form-row .partner-form-group {
    margin-bottom: 0;
}

.partner-form-label {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: #1f2d1e;
    margin-bottom: 6px;
}

.partner-form-label .is-required {
    color: #dc2626;
    margin-left: 2px;
}

.partner-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.partner-input-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7669;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.partner-input-wrap--textarea .partner-input-icon {
    top: 14px;
    transform: none;
}

.partner-form-control {
    width: 100%;
    height: 44px;
    padding: 10px 14px 10px 40px;
    border-radius: 9px;
    border: 1px solid #d5dcd3;
    background-color: #ffffff;
    font-size: 14px;
    color: #1f2920;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.partner-form-control::placeholder {
    color: #939d91;
}

.partner-form-control:focus {
    border-color: #3a961c;
    box-shadow: 0 0 0 3px rgba(58, 150, 28, 0.14);
}

select.partner-form-control {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 36px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235a6558' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

textarea.partner-form-control {
    height: auto;
    min-height: 92px;
    padding-top: 11px;
    padding-bottom: 11px;
    resize: vertical;
    line-height: 1.5;
}

/* Consent Checkbox */
.partner-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 16px 0 20px;
    cursor: pointer;
    user-select: none;
}

.partner-consent__input {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    accent-color: #2f8a18;
    cursor: pointer;
    flex-shrink: 0;
}

.partner-consent__text {
    font-size: 13.5px;
    color: #384437;
    line-height: 1.45;
}

/* Ajax Message */
.partner-form-feedback {
    display: none;
    margin-bottom: 14px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    text-align: center;
    background-color: #f3f9f1;
}

/* Submit Button */
.partner-submit-wrap {
    display: flex;
    justify-content: center;
}

.partner-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 268px;
    height: 48px;
    padding: 0 32px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(180deg, #2b8215 0%, #16550a 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(24, 92, 11, 0.32);
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.partner-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(24, 92, 11, 0.42);
    filter: brightness(1.06);
}

.partner-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
    .partner-bg-teacup {
        display: none;
    }

    .partner-leaf-decor {
        width: 72px;
        height: 72px;
    }

    .partner-reg-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .partner-hero {
        padding: 8px 0 12px;
    }

    .partner-hero__title {
        font-size: 38px;
    }

    .partner-hero__accent {
        font-size: 46px;
    }
}

@media (max-width: 768px) {
    .partner-reg-page {
        padding: 28px 0 44px;
    }

    .partner-form-card {
        padding: 24px 20px;
        border-radius: 16px;
    }

    .partner-form-header__title {
        font-size: 28px;
    }

    .partner-type-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .partner-form-row {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .partner-hero__title {
        font-size: 32px;
    }

    .partner-hero__accent {
        font-size: 40px;
    }

    .partner-hero__subtitle {
        font-size: 16px;
    }

    .partner-hotline__number {
        font-size: 19px;
    }

    .partner-submit-btn {
        width: 100%;
        min-width: 0;
    }
}
