/* Scoped to the member sign-in page only. Native forms and submission remain intact. */
.portal-page:has(.ivforms-r103) {max-width:1180px;}
.portal-page:has(.ivforms-r103) .portal-heading .overline {display:none;}
.portal-page:has(.ivforms-r103) .portal-heading {margin-bottom:18px;}
.portal-page:has(.ivforms-r103) .portal-heading h1 {font-size:clamp(29px,3.2vw,40px);line-height:1.12;margin:0 0 8px;}
.portal-page:has(.ivforms-r103) .portal-tabs {display:flex;gap:8px;margin-bottom:18px;}
.portal-page:has(.ivforms-r103) .portal-tabs a {padding:10px 16px;border-radius:9px;min-height:40px;box-sizing:border-box;}
.portal-page:has(.ivforms-r103) .portal-tabs a[aria-current="page"] {background:#e7f3fa;border-color:#94c4da;color:#125779;font-weight:700;}
.portal-columns:has(> .portal-card .ivforms-r103) {grid-template-columns:minmax(0,.84fr) minmax(0,1.16fr)!important;gap:24px;align-items:stretch!important;}
.portal-columns:has(> .portal-card .ivforms-r103)>.portal-card {padding:clamp(20px,2.4vw,32px)!important;border-radius:20px;border:1px solid #dbe6ed;box-shadow:0 12px 34px rgba(17,52,80,.06);min-width:0;position:relative;display:flex;flex-direction:column;}
.portal-columns:has(> .portal-card .ivforms-r103)>.portal-card:before {content:"";height:4px;position:absolute;inset-inline:24px;top:0;border-radius:0 0 5px 5px;background:linear-gradient(90deg,#184a76,#1687ad);}
.portal-columns:has(.ivforms-r103)>.portal-card h2 {font-size:clamp(20px,2vw,26px);letter-spacing:-.025em;margin-bottom:9px;}
.portal-columns:has(.ivforms-r103)>.portal-card p {font-size:14px;color:#516a7e;line-height:1.55;}
.portal-columns:has(.ivforms-r103)>.portal-card:has(.ivforms-r103)>p:has(a[href*="dealer_apply"]) {order:2;border-top:1px solid #e1eaf0;margin:18px 0 0;padding-top:14px;}
.portal-columns:has(.ivforms-r103)>.portal-card:has(.ivforms-r103)>p:has(a[href*="dealer_apply"]) a {background:#f3f8fc!important;color:#145c83!important;border:1px solid #cbdfe9!important;box-shadow:none!important;display:inline-flex;justify-content:center;align-items:center;border-radius:9px;min-height:40px;padding:8px 16px;}
.portal-columns .ivforms-r103 {display:flex!important;flex-direction:column;gap:17px!important;min-width:0;width:100%;}
.ivforms-r103 [hidden],.iv103-password [hidden] {display:none!important;}
.ivforms-r103 .iv103-section {border:0;padding:0;margin:0;min-width:0;display:block;width:100%;box-sizing:border-box;}
.ivforms-r103 .iv103-section legend {display:flex;align-items:center;gap:9px;width:100%;box-sizing:border-box;margin:0 0 12px;padding:0 0 9px;border-bottom:1px solid #e5edf2;color:#173e5e;font-size:14px;font-weight:700;}
.iv103-number {display:inline-grid;place-items:center;width:27px;height:27px;flex:0 0 27px;background:#e8f3f9;color:#12658d;border-radius:7px;font-size:12px;font-weight:700;}
.ivforms-r103 .iv103-fields {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 14px;min-width:0;}
.ivforms-r103 .iv103-full {grid-column:1/-1;}
.ivforms-r103 .iv103-fields label,.ivforms-r103 .iv103-country {display:flex;flex-direction:column;gap:6px;color:#29465c;font-weight:600;font-size:13px;line-height:1.4;min-width:0;margin:0;}
.ivforms-r103 .iv103-fields input:not([type=hidden]),.ivforms-r103 .iv103-fields select,.ivforms-r103 .iv103-select {width:100%;min-width:0;box-sizing:border-box;height:46px;min-height:46px;padding:10px 12px;border:1px solid #c9dbe6;border-radius:9px;background:#fff;color:#17354b;font:inherit;font-weight:400;font-size:14px;box-shadow:none;}
.ivforms-r103 .iv103-fields select {appearance:auto;}
.ivforms-r103 .iv103-fields input:focus,.ivforms-r103 .iv103-select:focus-visible,.iv103-pop .iv103-country-option:focus-visible,.iv103-password button:focus-visible {outline:2px solid #167eac;outline-offset:2px;}
.iv103-country {position:relative;}
.ivforms-r103 .iv103-select {display:flex;align-items:center;justify-content:space-between;gap:8px;text-align:start;cursor:pointer;}
.iv103-select span {white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;}
.iv103-select:after {content:"";display:block;border:solid #315974;border-width:0 1.6px 1.6px 0;padding:3px;transform:rotate(45deg);flex-shrink:0;margin-inline-end:4px;margin-top:-3px;}
.iv103-pop {position:absolute;top:100%;inset-inline-start:0;width:max(100%,250px);max-width:min(340px,calc(100vw - 64px));z-index:30;background:#fff;border:1px solid #bdd4e2;border-radius:12px;padding:8px;box-shadow:0 14px 36px rgba(20,48,72,.17);box-sizing:border-box;}
.ivforms-r103 .iv103-pop input {height:38px;min-height:38px;font-size:13px;}
.iv103-results {max-height:212px;overflow:auto;margin-top:6px;}
.ivforms-r103 .iv103-results .iv103-country-option {display:block;width:100%;text-align:start;border:0;border-radius:6px;background:white;color:#17354b;padding:9px 10px;font:inherit;font-weight:400;font-size:13px;cursor:pointer;min-height:36px;}
.ivforms-r103 .iv103-results .iv103-country-option:hover,.ivforms-r103 .iv103-results .iv103-country-option[aria-current=true] {background:#e8f4fa;color:#165b7e;}
.iv103-password {position:relative;display:flex;align-items:center;}
.iv103-password input {padding-inline-end:48px!important;}
.iv103-password button {position:absolute;inset-inline-end:6px;top:50%;transform:translateY(-50%);width:34px!important;height:34px!important;min-height:0!important;padding:6px!important;display:grid;place-items:center;background:#edf4f8!important;color:#245b7b!important;border:0;border-radius:7px;cursor:pointer;box-shadow:none!important;}
.iv103-password button svg {width:20px;height:20px;}
.ivforms-r103 .iv103-hint {color:#607789;font-size:12px;margin-top:-7px;}
.iv103-phone .ivsmart-r9-prefix {align-self:flex-start;border-radius:7px!important;margin-top:0!important;}
.ivforms-r103 .iv103-consents {padding:12px 14px;background:#f4f8fb;border:1px solid #e0eaf0;border-radius:10px;display:grid;gap:8px;font-size:12px;line-height:1.55;color:#385568;}
.ivforms-r103 .iv103-consents label {display:flex;flex-direction:row;align-items:flex-start;gap:9px;font-weight:400;font-size:13px;margin:0;}
.ivforms-r103 .iv103-consents input[type=checkbox] {width:16px!important;height:16px!important;min-height:0!important;flex:none;margin:2px 0 0;accent-color:#126c99;}
.ivforms-r103 .iv103-consents a {text-decoration:underline;text-underline-offset:2px;color:#17658e;font-size:12px;}
.ivforms-r103 .iv103-submit {height:auto;min-height:49px;width:100%;border-radius:10px;font-weight:700;}
.iv103-approval {margin-top:auto;padding:18px 0 0;}
.iv103-approval-inner {background:#edf5fa;border:1px solid #d7e6ee;border-radius:12px;padding:18px;}
.iv103-approval-inner strong {font-size:15px;color:#173e5e;}
.iv103-approval-inner p {margin:8px 0 0!important;font-size:13px!important;}
.iv103-approval-inner p+p {border-top:1px solid #d7e6ee;padding-top:10px;}
@media(max-width:820px){.portal-columns:has(> .portal-card .ivforms-r103){grid-template-columns:minmax(0,1fr)!important;gap:16px;}.iv103-approval{margin-top:14px;}}
@media(max-width:560px){.ivforms-r103 .iv103-fields {grid-template-columns:minmax(0,1fr);}.portal-columns:has(> .portal-card .ivforms-r103)>.portal-card{padding:18px!important;}.iv103-pop{width:100%;max-width:100%;}}
/* Four company/contact controls in a compact 2-by-2 grid at desktop widths. */
@media(min-width:1000px){.ivforms-r103 .iv103-section:first-of-type .iv103-fields>label.iv103-full {grid-column:auto;}}
.portal-columns:has(.ivforms-r103) form:has([name=action][value=account_login]) .iv103-password input {box-sizing:border-box;width:100%;height:46px;min-height:46px;border:1px solid #c9dbe6;border-radius:9px;background:#fff;color:#17354b;font:inherit;font-weight:400;padding:10px 48px 10px 12px;}
/* Keep the sign-in card naturally sized: no large empty area between form and approval details. */
.portal-columns:has(> .portal-card .ivforms-r103){align-items:start!important;}
.iv103-approval {margin-top:18px;padding-top:0;}
.portal-columns:has(.ivforms-r103) form:has([name=action][value=account_login]) {display:grid!important;gap:14px!important;}
.portal-columns:has(.ivforms-r103) form:has([name=action][value=account_login]) button[type=submit] {width:100%;min-height:46px;}
.portal-columns:has(.ivforms-r103)>.portal-card:has(.ivforms-r103)>p:has(a[href*="dealer_apply"]) a {text-decoration:none!important;font-weight:600;}
@media(min-width:1000px){.ivforms-r103 .iv103-section:nth-of-type(2) .iv103-fields>label.iv103-full{grid-column:auto;}.ivforms-r103 .iv103-section:nth-of-type(2) .iv103-hint{grid-column:2;}}

/* R16R5: isolate country control and dropdown from other grid fields. */
.ivforms-r103 .iv103-country:has(.iv103-pop:not([hidden])){z-index:40;}
.ivforms-r103 .iv103-country-option{box-sizing:border-box;user-select:none;}

/* R16R5: keep search results in normal flow on narrow screens; prevent overlay on adjacent fields. */
@media(max-width:820px){.ivforms-r103 .iv103-country .iv103-pop{position:relative;top:auto;inset-inline-start:auto;width:100%;max-width:100%;margin-top:2px;z-index:auto;}.ivforms-r103 .iv103-country .iv103-results{max-height:min(212px,35vh);overscroll-behavior:contain;}.ivforms-r103 .iv103-country .iv103-select{min-height:46px;scroll-margin-block:100px;}.ivforms-r103 .iv103-country .iv103-country-option{scroll-margin-block:12px;}}
