/* Premium Calculator & Policy Comparison — SecureCover. Namespaced .in */
* { box-sizing: border-box; }
body { margin: 0; }
.in {
    --bg: #f0fdfa; --panel: #ffffff; --panel2: #f4fbf9; --line: #cdeee6; --ink: #134e4a; --muted: #5b8a86;
    --brand: #0d9488; --brand-ink: #0f766e; --accent: #7c3aed;
    --ok: #16a34a; --warn: #d97706; --danger: #dc2626;
    --shadow: 0 12px 32px -18px rgba(13,148,136,.3);
    min-height: calc(100vh - 44px);
    font-family: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
    background: radial-gradient(1000px 420px at 90% -10%, rgba(13,148,136,.07), transparent), var(--bg);
    color: var(--ink);
}
.in-btn { border: 0; cursor: pointer; border-radius: .6rem; padding: .6rem 1rem; font: 700 .86rem inherit; background: var(--brand); color: #fff; transition: transform .1s; white-space: nowrap; }
.in-btn:hover { transform: translateY(-1px); }
.in-btn.ghost { background: var(--panel); color: var(--ink); border: 1px solid var(--line); }
.in-btn.ghost:hover { border-color: var(--brand); }
.in-btn.sm { padding: .4rem .75rem; font-size: .8rem; }
.in-h2 { margin: 0; font-size: 1.25rem; }

.in-topbar { display: flex; align-items: center; gap: 1rem; padding: .8rem 1.5rem; background: var(--panel); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; flex-wrap: wrap; }
.in-brand { display: flex; align-items: center; gap: .6rem; }
.in-logo { font-size: 1.6rem; }
.in-brand b { display: block; font-size: 1.05rem; }
.in-brand small { color: var(--muted); font-size: .72rem; }
.in-nav { display: flex; gap: .25rem; margin: 0 auto; flex-wrap: wrap; }
.in-navbtn { border: 0; background: transparent; color: var(--muted); padding: .5rem .8rem; border-radius: .6rem; font: 600 .85rem inherit; cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; }
.in-navbtn:hover { color: var(--ink); background: var(--panel2); }
.in-navbtn.active { background: var(--brand); color: #fff; }
.in-badge { background: rgba(0,0,0,.12); border-radius: 999px; padding: 0 .4rem; font-size: .7rem; min-width: 1.1rem; text-align: center; }
.in-top-actions { display: flex; align-items: center; gap: .6rem; }
.in-live-dot { color: var(--ok); font-size: .72rem; font-weight: 800; letter-spacing: .1em; display: inline-flex; align-items: center; gap: .4rem; }
.in-live-dot::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--ok); animation: inpulse 1.3s infinite; }
@keyframes inpulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.in-view { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }
.in-view[hidden] { display: none !important; }
.in-card { background: var(--panel); border: 1px solid var(--line); border-radius: 1rem; padding: 1.3rem; box-shadow: var(--shadow); }
.in-card h3 { margin: 0 0 1rem; font-size: .95rem; }

/* QUOTE */
.in-products { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; margin-bottom: 1.5rem; }
@media (max-width: 720px) { .in-products { grid-template-columns: repeat(2, 1fr); } }
.in-product { background: var(--panel); border: 2px solid var(--line); border-radius: 1rem; padding: 1.1rem; cursor: pointer; text-align: center; box-shadow: var(--shadow); transition: border-color .15s, transform .1s; }
.in-product:hover { transform: translateY(-2px); }
.in-product.sel { border-color: var(--brand); background: var(--panel2); }
.in-product .pe { font-size: 1.8rem; }
.in-product b { display: block; margin: .3rem 0 .1rem; }
.in-product small { color: var(--muted); font-size: .74rem; }

.in-quote-grid { display: grid; grid-template-columns: 300px 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 820px) { .in-quote-grid { grid-template-columns: 1fr; } }
.in-form { background: var(--panel); border: 1px solid var(--line); border-radius: 1rem; padding: 1.3rem; box-shadow: var(--shadow); position: sticky; top: 76px; }
@media (max-width: 820px) { .in-form { position: static; } }
.in-slider { margin-bottom: 1.1rem; }
.in-slider label { display: flex; justify-content: space-between; font-size: .82rem; margin-bottom: .3rem; }
.in-slider label b { color: var(--brand-ink); }
.in-slider input[type=range] { width: 100%; accent-color: var(--brand); }
.in-field { margin-bottom: 1.1rem; }
.in-field > span { display: block; font-size: .72rem; text-transform: uppercase; color: var(--muted); font-weight: 800; margin-bottom: .4rem; }
.in-field select, .in-field input { width: 100%; font: inherit; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: .5rem; background: var(--panel2); color: var(--ink); }
.in-toggle { display: flex; gap: .3rem; background: var(--panel2); border-radius: .5rem; padding: .2rem; }
.in-toggle button { flex: 1; border: 0; background: transparent; padding: .4rem; border-radius: .4rem; font: 600 .82rem inherit; cursor: pointer; color: var(--muted); }
.in-toggle button.on { background: var(--brand); color: #fff; }

.in-quotes { display: flex; flex-direction: column; gap: 1rem; }
.in-quote-card { background: var(--panel); border: 1px solid var(--line); border-radius: 1rem; padding: 1.2rem 1.4rem; box-shadow: var(--shadow); display: grid; grid-template-columns: auto 1fr auto; gap: 1.2rem; align-items: center; }
@media (max-width: 640px) { .in-quote-card { grid-template-columns: 1fr; } }
.in-quote-card.best { border-color: var(--brand); position: relative; }
.in-quote-card.best::after { content: "LOWEST PREMIUM"; position: absolute; top: -.6rem; left: 1.2rem; background: var(--brand); color: #fff; font-size: .6rem; font-weight: 800; padding: .12rem .5rem; border-radius: 999px; }
.in-quote-card .logo { width: 3rem; height: 3rem; border-radius: .7rem; display: grid; place-items: center; color: #fff; font-weight: 800; }
.in-quote-card h4 { margin: 0; font-size: 1.05rem; }
.in-quote-card .qm { color: var(--muted); font-size: .78rem; margin-top: .15rem; }
.in-quote-card .feats { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .5rem; }
.in-quote-card .feat { font-size: .7rem; background: var(--panel2); color: var(--muted); border-radius: 999px; padding: .1rem .5rem; }
.in-quote-card .price { text-align: right; }
.in-quote-card .price b { font-size: 1.5rem; color: var(--brand-ink); }
.in-quote-card .price small { display: block; color: var(--muted); font-size: .72rem; }
.in-quote-card .price .actions { display: flex; gap: .4rem; margin-top: .5rem; justify-content: flex-end; }

/* COMPARE */
.in-compare-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.in-compare-head h2 { margin: 0; }
#in-rider-toggles { display: flex; gap: .3rem; flex-wrap: wrap; }
#in-rider-toggles button { border: 1px solid var(--line); background: var(--panel); color: var(--muted); border-radius: 999px; padding: .35rem .8rem; font: 600 .76rem inherit; cursor: pointer; }
#in-rider-toggles button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.in-compare-wrap { overflow-x: auto; }
.in-compare-table { border-collapse: collapse; width: 100%; min-width: 640px; background: var(--panel); border-radius: 1rem; overflow: hidden; box-shadow: var(--shadow); }
.in-compare-table th, .in-compare-table td { border: 1px solid var(--line); padding: .7rem .9rem; text-align: left; font-size: .84rem; vertical-align: top; }
.in-compare-table th { background: var(--panel2); }
.in-compare-table .rowhead { background: var(--panel2); font-weight: 700; color: var(--muted); width: 150px; }
.in-compare-table .best { color: var(--brand-ink); font-weight: 700; }
.in-compare-table .colhead .logo { width: 2rem; height: 2rem; border-radius: .5rem; display: grid; place-items: center; color: #fff; font-weight: 800; margin-bottom: .3rem; }
.in-compare-table .prem { font-size: 1.1rem; font-weight: 800; }

/* ADVISOR */
.in-advisor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 820px) { .in-advisor-grid { grid-template-columns: 1fr; } }
.in-need-result .big { font-size: 2.2rem; font-weight: 800; color: var(--brand-ink); }
.in-need-result .sub { color: var(--muted); font-size: .85rem; }
.in-gap { margin-top: 1.2rem; }
.in-gap .gr { display: flex; justify-content: space-between; font-size: .85rem; padding: .3rem 0; }
.in-gap .bar { height: 14px; background: var(--line); border-radius: 4px; overflow: hidden; margin: .3rem 0; position: relative; }
.in-gap .bar .have { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ok); }
.in-gap .bar .need { position: absolute; left: 0; top: 0; bottom: 0; background: var(--warn); opacity: .35; }
.in-gap .gap-line { font-weight: 700; }
.in-gap .gap-line.short { color: var(--danger); }
.in-gap .gap-line.ok { color: var(--ok); }

/* LEADS */
.in-leads-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.in-leads-head h2 { margin: 0; }
.in-leads-stats { display: flex; gap: 1.5rem; }
.in-leads-stats .s b { font-size: 1.3rem; font-weight: 800; display: block; }
.in-leads-stats .s small { color: var(--muted); font-size: .72rem; }
.in-leads-board { display: grid; grid-template-columns: repeat(5, 1fr); gap: .8rem; overflow-x: auto; }
@media (max-width: 1000px) { .in-leads-board { grid-template-columns: repeat(3, minmax(180px,1fr)); } }
@media (max-width: 600px) { .in-leads-board { grid-template-columns: repeat(2, minmax(160px,1fr)); } }
.in-lcol { background: var(--panel2); border: 1px solid var(--line); border-radius: .9rem; padding: .7rem; min-height: 280px; }
.in-lcol h3 { margin: 0 0 .7rem; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); display: flex; justify-content: space-between; }
.in-lcard { background: var(--panel); border: 1px solid var(--line); border-radius: .7rem; padding: .7rem; margin-bottom: .5rem; cursor: pointer; }
.in-lcard:hover { border-color: var(--brand); }
.in-lcard b { font-size: .85rem; }
.in-lcard .lm { color: var(--muted); font-size: .72rem; margin: .25rem 0; }
.in-lcard .lp { font-weight: 700; color: var(--brand-ink); font-size: .82rem; }
.in-lcard .adv { width: 100%; margin-top: .5rem; border: 1px solid var(--line); background: var(--panel2); color: var(--brand-ink); border-radius: .4rem; padding: .3rem; font: 700 .72rem inherit; cursor: pointer; }
.in-lcard .adv:hover { background: var(--brand); color: #fff; }

.in-drawer-overlay { position: fixed; inset: 0; background: rgba(19,78,74,.4); display: flex; justify-content: flex-end; z-index: 120; }
.in-drawer-overlay[hidden] { display: none; }
.in-drawer-card { width: min(26rem, 100%); height: 100%; background: var(--panel); overflow: auto; padding: 1.5rem; animation: inslide .25s ease; }
@keyframes inslide { from { transform: translateX(30px); opacity: 0; } }
.in-drawer-card .dh { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.in-drawer-card .dh button { border: 0; background: transparent; color: var(--muted); font-size: 1.4rem; cursor: pointer; }
.in-dstat { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: 1rem 0; }
.in-dstat div { background: var(--panel2); border-radius: .5rem; padding: .6rem .7rem; font-size: .84rem; }
.in-dstat div small { color: var(--muted); display: block; font-size: .68rem; text-transform: uppercase; }

/* ANALYTICS */
.in-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.in-kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 1rem; padding: 1.2rem; box-shadow: var(--shadow); }
.in-kpi b { font-size: 1.7rem; font-weight: 800; display: block; }
.in-kpi small { color: var(--muted); font-size: .78rem; }
.in-kpi .delta { color: var(--ok); font-size: .74rem; font-weight: 600; }
.in-analytics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 900px) { .in-analytics-grid { grid-template-columns: 1fr; } }
.in-card-wide { grid-column: 1 / -1; }
#in-quotechart { width: 100%; height: 200px; }
#in-productdonut { width: 130px; height: 130px; display: block; margin: 0 auto; }
.in-donut-legend { display: flex; flex-wrap: wrap; gap: .4rem .9rem; justify-content: center; font-size: .76rem; color: var(--muted); margin-top: .6rem; }
.in-donut-legend span { display: inline-flex; align-items: center; gap: .3rem; }
.in-donut-legend i { width: .7rem; height: .7rem; border-radius: 3px; }
.in-funnel-row { display: flex; align-items: center; gap: .8rem; padding: .5rem 0; font-size: .84rem; }
.in-funnel-row .n { width: 5.5rem; color: var(--muted); flex: none; }
.in-funnel-row .fb { flex: 1; height: 18px; background: var(--line); border-radius: 4px; overflow: hidden; }
.in-funnel-row .fb i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--accent)); }
.in-funnel-row .v { width: 4rem; text-align: right; font-weight: 700; }

.in-toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; padding: .7rem 1.1rem; border-radius: .7rem; font: 700 .88rem inherit; z-index: 200; box-shadow: 0 15px 40px -12px rgba(0,0,0,.4); max-width: 90vw; }
.in-toast[hidden] { display: none; }
