/* ==========================================================================
   Insurance portal, new design (upgrade/layouts/insurance_portal.php, body.ip2).
   Figma page "06 · Insurance": Portal · Landing 43:672, Motor checkout 43:756,
   Agent dashboard 43:865. White-label: --ip2-brand is the agency colour
   (Figma blue by default). Tokens match the file: ink #0f2236, muted #5a6b7d,
   faint #8a99a8, hairline #e2e8ef, cloud #f4f7fa.
   ========================================================================== */
body.ip2 { margin: 0; background: #f4f7fa; color: #0f2236; font-family: "Manrope", "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
body.ip2 *, body.ip2 *::before, body.ip2 *::after { box-sizing: border-box; }
body.ip2 svg.od-ico { flex: none; }

/* Buttons and links */
body.ip2 .ip2-btn { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 18px; border-radius: 10px; border: 1px solid #e2e8ef; background: #fff; font: 500 15px/1 inherit; font-family: inherit; color: #0f2236; text-decoration: none; cursor: pointer; white-space: nowrap; }
body.ip2 .ip2-btn:hover { background: #f4f7fa; }
body.ip2 .ip2-btn.is-primary { background: var(--ip2-brand); border-color: var(--ip2-brand); color: #fff; }
body.ip2 .ip2-btn.is-primary:hover { filter: brightness(.92); }
body.ip2 .ip2-btn.is-wide { width: 100%; height: 44px; }
body.ip2 .ip2-btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
body.ip2 .ip2-link { color: var(--ip2-brand); font-size: 15px; font-weight: 500; text-decoration: none; }
body.ip2 .ip2-link:hover { text-decoration: underline; }
body.ip2 .ip2-kicker { margin: 0 0 8px; font-size: 13px; font-weight: 500; color: var(--ip2-brand); }

/* Signed-in top bar (agent and customer) */
body.ip2 .ip2-top { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 24px; height: 60px; padding: 0 40px; background: #fff; border-bottom: 1px solid #e2e8ef; }
body.ip2 .ip2-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #0f2236; font-size: 15px; font-weight: 500; }
body.ip2 .ip2-brand img { width: 32px; height: 32px; object-fit: contain; border-radius: 8px; }
body.ip2 .ip2-nav { display: flex; align-items: center; gap: 24px; flex: 1; }
body.ip2 .ip2-nav a { font-size: 13px; font-weight: 500; color: #5a6b7d; text-decoration: none; }
body.ip2 .ip2-nav a:hover { color: #0f2236; }
body.ip2 .ip2-nav a.is-on { color: var(--ip2-brand); }
body.ip2 .ip2-me { position: relative; }
body.ip2 .ip2-me summary { list-style: none; cursor: pointer; }
body.ip2 .ip2-me summary::-webkit-details-marker { display: none; }
body.ip2 .ip2-av { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 999px; background: var(--ip2-brand); color: #fff; font-size: 12px; font-weight: 600; }
body.ip2 .ip2-me-menu { position: absolute; right: 0; top: 42px; width: 240px; padding: 14px; border-radius: 12px; background: #fff; border: 1px solid #e2e8ef; box-shadow: 0 12px 32px -8px rgba(15, 34, 54, .18); display: flex; flex-direction: column; gap: 4px; }
body.ip2 .ip2-me-menu strong { font-size: 14px; }
body.ip2 .ip2-me-menu span { font-size: 12px; color: #8a99a8; overflow-wrap: anywhere; }
body.ip2 .ip2-me-menu a { margin-top: 6px; font-size: 13px; color: var(--ip2-brand); text-decoration: none; }
body.ip2 .ip2-me-menu form { margin: 8px 0 0; padding-top: 10px; border-top: 1px solid #e2e8ef; }
body.ip2 .ip2-me-menu button { padding: 0; border: 0; background: none; font: 500 13px inherit; font-family: inherit; color: #d0422f; cursor: pointer; }
body.ip2 .ip2-burger { display: none; flex-direction: column; gap: 4px; padding: 8px; margin: 0 0 0 auto; cursor: pointer; }
body.ip2 .ip2-burger span { width: 18px; height: 2px; border-radius: 2px; background: #0f2236; }
body.ip2 .ip2-content { min-height: calc(100vh - 60px); }

/* Page scaffolding */
body.ip2 .ip2-page { padding: 32px 40px 48px; display: flex; flex-direction: column; gap: 24px; }
body.ip2 .ip2-narrow { max-width: 1280px; margin: 0 auto; width: 100%; padding-left: 120px; padding-right: 120px; }
body.ip2 .ip2-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
body.ip2 .ip2-head h1 { margin: 0; font-size: 40px; font-weight: 600; line-height: 1.1; letter-spacing: -1px; }
body.ip2 .ip2-head p { margin: 4px 0 0; font-size: 15px; line-height: 1.55; color: #5a6b7d; }
body.ip2 .ip2-back { display: inline-block; margin-bottom: 14px; font-size: 13px; }
body.ip2 .ip2-card { background: #fff; border: 1px solid #e2e8ef; border-radius: 16px; min-width: 0; }
body.ip2 .ip2-pad { padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
body.ip2 .ip2-card h2 { margin: 0; font-size: 20px; font-weight: 600; line-height: 1.3; letter-spacing: -.2px; }
body.ip2 .ip2-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 24px; }
body.ip2 .ip2-muted { margin: 0; font-size: 13px; line-height: 1.5; color: #5a6b7d; }
body.ip2 .ip2-empty { padding: 32px 24px; border-top: 1px solid #e2e8ef; text-align: center; font-size: 14px; color: #5a6b7d; }
body.ip2 .ip2-empty strong { display: block; font-size: 16px; color: #0f2236; margin-bottom: 4px; }

/* Metrics strip */
body.ip2 .ip2-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: #fff; border: 1px solid #e2e8ef; border-radius: 16px; }
body.ip2 .ip2-metrics > div { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px; }
body.ip2 .ip2-metrics > div + div { border-left: 1px solid #e2e8ef; }
body.ip2 .ip2-metrics .l { font-size: 13px; font-weight: 500; color: #5a6b7d; }
body.ip2 .ip2-metrics strong { font-size: 28px; font-weight: 600; line-height: 1.1; letter-spacing: -1px; }
body.ip2 .ip2-metrics .s { font-size: 12px; color: #8a99a8; }
body.ip2 .ip2-metrics .s.is-ok { color: #149c6b; font-weight: 500; }
body.ip2 .ip2-metrics .s.is-q { color: #c98a0b; font-weight: 500; }

/* Filter + table */
body.ip2 .ip2-filter { display: flex; align-items: center; gap: 10px; margin: 0; flex-wrap: wrap; }
body.ip2 .ip2-search { display: flex; align-items: center; gap: 8px; width: 280px; max-width: 100%; height: 44px; padding: 0 14px; border: 1px solid #e2e8ef; border-radius: 12px; background: #fff; color: #8a99a8; margin: 0; }
body.ip2 .ip2-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: 400 15px inherit; font-family: inherit; color: #0f2236; }
body.ip2 .ip2-filter select, body.ip2 .ip2-grid3 select, body.ip2 .ip2-grid3 input { height: 44px; padding: 0 12px; border: 1px solid #e2e8ef; border-radius: 12px; background: #fff; font: 400 15px inherit; font-family: inherit; color: #0f2236; min-width: 0; width: 100%; }
body.ip2 .ip2-filter select { width: 160px; }
body.ip2 .ip2-grid3 input:focus, body.ip2 .ip2-grid3 select:focus, body.ip2 .ip2-search:focus-within { outline: none; border-color: var(--ip2-brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ip2-brand) 18%, transparent); }
body.ip2 .ip2-table-wrap { overflow-x: auto; }
body.ip2 .ip2-table { width: 100%; border-collapse: collapse; }
body.ip2 .ip2-table th { padding: 10px 24px; background: #f4f7fa; border-top: 1px solid #e2e8ef; border-bottom: 1px solid #e2e8ef; text-align: left; font-size: 12px; font-weight: 400; color: #5a6b7d; white-space: nowrap; }
body.ip2 .ip2-table td { padding: 14px 24px; border-bottom: 1px solid #e2e8ef; font-size: 15px; vertical-align: middle; }
body.ip2 .ip2-table tbody tr { cursor: pointer; }
body.ip2 .ip2-table tbody tr:hover td { background: #fafbfc; }
body.ip2 .ip2-table tbody tr:last-child td { border-bottom: 0; }
body.ip2 .ip2-who { display: flex; flex-direction: column; text-decoration: none; color: #0f2236; }
body.ip2 .ip2-who strong { font-weight: 500; }
body.ip2 .ip2-who span { font-size: 12px; color: #8a99a8; }
body.ip2 .ip2-mono { font: 13px "Geist Mono", ui-monospace, monospace; white-space: nowrap; }
body.ip2 .ip2-dim { color: #5a6b7d; }
body.ip2 .ip2-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 13px; font-weight: 500; white-space: nowrap; }
body.ip2 .ip2-pill::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
body.ip2 .ip2-pill.is-ok { background: #e6f5ee; color: #149c6b; }
body.ip2 .ip2-pill.is-q { background: #fbf3e3; color: #c98a0b; }
body.ip2 .ip2-pill.is-bad { background: #fbebe8; color: #d0422f; }
body.ip2 .ip2-pill.is-dim { background: #f4f7fa; color: #5a6b7d; }

/* Public landing */
body.ip2 .ip2-pub-top { display: flex; align-items: center; justify-content: space-between; height: 80px; padding: 0 120px; background: #fff; border-bottom: 1px solid #e2e8ef; }
body.ip2 .ip2-pub-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #0f2236; }
body.ip2 .ip2-pub-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--ip2-brand); color: #fff; overflow: hidden; }
body.ip2 .ip2-pub-mark img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
body.ip2 .ip2-pub-brand strong { display: block; font-size: 15px; font-weight: 500; }
body.ip2 .ip2-pub-brand small { display: block; font-size: 12px; color: #8a99a8; }
body.ip2 .ip2-pub-top nav { display: flex; align-items: center; gap: 28px; }
body.ip2 .ip2-pub { background: #fff; }
body.ip2 .ip2-hero { display: grid; grid-template-columns: minmax(0, 1fr) 480px; gap: 80px; align-items: center; padding: 100px 120px 96px; max-width: 1440px; margin: 0 auto; }
body.ip2 .ip2-hero h1 { margin: 0; font-size: 58px; font-weight: 600; line-height: 1.04; letter-spacing: -2px; max-width: 560px; }
body.ip2 .ip2-hero-copy > p:not(.ip2-kicker) { margin: 24px 0 0; font-size: 19px; line-height: 1.55; color: #5a6b7d; max-width: 440px; }
body.ip2 .ip2-hero-actions { display: flex; gap: 12px; margin-top: 26px; }
body.ip2 .ip2-paths { display: flex; flex-direction: column; gap: 12px; }
body.ip2 .ip2-paths-label { font-size: 13px; font-weight: 500; color: #5a6b7d; }
body.ip2 .ip2-path { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 14px; border: 1px solid #e2e8ef; background: #fff; text-decoration: none; color: #0f2236; transition: border-color .15s ease; }
body.ip2 .ip2-path:hover, body.ip2 .ip2-path:focus-visible { border-color: var(--ip2-brand); box-shadow: 0 0 0 1px var(--ip2-brand); outline: none; }
body.ip2 .ip2-path-ico { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: color-mix(in srgb, var(--ip2-brand) 10%, #fff); color: var(--ip2-brand); }
body.ip2 .ip2-path-text { flex: 1; display: flex; flex-direction: column; gap: 3px; }
body.ip2 .ip2-path-text strong { font-size: 20px; font-weight: 500; letter-spacing: -.2px; }
body.ip2 .ip2-path-text span { font-size: 13px; color: #5a6b7d; }
body.ip2 .ip2-chev { font-size: 24px; color: #5a6b7d; }
body.ip2 .ip2-steps { background: #f4f7fa; }
body.ip2 .ip2-steps-in { max-width: 1440px; margin: 0 auto; padding: 80px 120px 88px; }
body.ip2 .ip2-steps h2 { margin: 0 0 32px; font-size: 28px; font-weight: 600; letter-spacing: -.5px; }
body.ip2 .ip2-steps ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
body.ip2 .ip2-steps li span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 999px; border: 1.5px solid var(--ip2-brand); color: var(--ip2-brand); font-size: 13px; font-weight: 600; margin-bottom: 18px; }
body.ip2 .ip2-steps li strong { display: block; font-size: 20px; font-weight: 600; letter-spacing: -.2px; }
body.ip2 .ip2-steps li p { margin: 10px 0 0; font-size: 15px; line-height: 1.55; color: #5a6b7d; }

/* Motor checkout */
body.ip2 .ip2-checkout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; align-items: start; margin: 0; }
body.ip2 .ip2-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
body.ip2 .ip2-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; }
body.ip2 .ip2-grid3 label { display: flex; flex-direction: column; gap: 6px; margin: 0; min-width: 0; }
body.ip2 .ip2-grid3 label > span { font-size: 13px; font-weight: 500; color: #0f2236; }
body.ip2 .ip2-grid3 label > span em { font-style: normal; font-weight: 400; color: #8a99a8; margin-left: 4px; }
body.ip2 .ip2-more summary { cursor: pointer; font-size: 14px; font-weight: 500; color: var(--ip2-brand); }
body.ip2 .ip2-more summary span { color: #8a99a8; font-weight: 400; margin-left: 6px; }
body.ip2 .ip2-more .ip2-grid3 { margin-top: 14px; }
body.ip2 .ip2-summary { position: sticky; top: 84px; }
body.ip2 .ip2-dl { margin: 0; display: flex; flex-direction: column; gap: 12px; }
body.ip2 .ip2-dl > div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
body.ip2 .ip2-dl dt { color: #5a6b7d; }
body.ip2 .ip2-dl dd { margin: 0; font-weight: 500; text-align: right; }
body.ip2 .ip2-total { padding: 16px; border-radius: 12px; background: color-mix(in srgb, var(--ip2-brand) 10%, #fff); display: flex; flex-direction: column; gap: 4px; }
body.ip2 .ip2-total small { font-size: 12px; color: var(--ip2-brand); }
body.ip2 .ip2-total strong { font-size: 36px; font-weight: 600; letter-spacing: -1px; line-height: 1.1; color: var(--ip2-brand); }
body.ip2 .ip2-note { margin: 0; display: flex; gap: 6px; font-size: 12px; line-height: 1.45; color: #8a99a8; }
body.ip2 #pricing-message i { margin-right: 4px; }

/* Portal pages that have no new-design view yet: keep them tidy inside the shell */
body.ip2 .ip2-content > .ip-main { max-width: none; padding: 32px 40px 48px; margin: 0; }
body.ip2 .ip-eyebrow { text-transform: none; letter-spacing: 0; }
body.ip2 h1, body.ip2 h2, body.ip2 h3 { font-family: inherit; }

@media (max-width: 1100px) {
    body.ip2 .ip2-hero { grid-template-columns: 1fr; gap: 40px; padding: 56px 24px; }
    body.ip2 .ip2-hero h1 { font-size: 40px; letter-spacing: -1px; }
    body.ip2 .ip2-pub-top { padding: 0 24px; }
    body.ip2 .ip2-steps-in { padding: 56px 24px; }
    body.ip2 .ip2-checkout { grid-template-columns: 1fr; }
    body.ip2 .ip2-summary { position: static; }
    body.ip2 .ip2-narrow { padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 760px) {
    body.ip2 .ip2-top { padding: 0 16px; gap: 12px; }
    body.ip2 .ip2-burger { display: inline-flex; }
    body.ip2 .ip2-nav { display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 16px 16px; background: #fff; border-bottom: 1px solid #e2e8ef; }
    body.ip2 .ip2-nav a { padding: 12px 0; font-size: 15px; width: 100%; }
    body.ip2 .ip2-menu-toggle:checked ~ .ip2-nav { display: flex; }
    body.ip2 .ip2-page { padding: 20px 16px 32px; }
    body.ip2 .ip2-head h1 { font-size: 30px; }
    body.ip2 .ip2-metrics { grid-template-columns: 1fr 1fr; }
    body.ip2 .ip2-metrics > div:nth-child(3) { border-left: 0; }
    body.ip2 .ip2-metrics > div:nth-child(n+3) { border-top: 1px solid #e2e8ef; }
    body.ip2 .ip2-grid3 { grid-template-columns: 1fr; }
    body.ip2 .ip2-steps ol { grid-template-columns: 1fr; }
    body.ip2 .ip2-pub-top nav .ip2-link { display: none; }
    body.ip2 .ip2-search, body.ip2 .ip2-filter select { width: 100%; }
    body.ip2 .ip2-table th, body.ip2 .ip2-table td { padding-left: 16px; padding-right: 16px; }
}
body.ip2 .ip2-total strong.is-empty { font-size: 17px; font-weight: 500; letter-spacing: 0; line-height: 1.4; }
