/* Admission Enquiry Funnel — EnrolIQ. Namespaced .ae */
* { box-sizing: border-box; } body { margin: 0; }
.ae {
    --bg: #faf7ff; --panel: #fff; --panel2: #f4eefc; --line: #ece0f6; --ink: #1e1b2e; --muted: #6b7280;
    --brand: #7c3aed; --brand-ink: #6d28d9; --accent: #16a34a;
    --ok: #16a34a; --warn: #d97706; --danger: #dc2626;
    --shadow: 0 12px 32px -18px rgba(124,58,237,.3);
    min-height: calc(100vh - 44px); font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
    background: radial-gradient(1000px 420px at 88% -10%, rgba(124,58,237,.07), transparent), var(--bg); color: var(--ink);
}
.ae-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; }
.ae-btn:hover { transform: translateY(-1px); } .ae-btn.ghost { background: var(--panel); color: var(--ink); border: 1px solid var(--line); }
.ae-btn.sm { padding: .4rem .75rem; font-size: .8rem; } .ae-btn:disabled { opacity: .4; cursor: not-allowed; }
.ae-h2 { margin: 0; font-size: 1.25rem; }
.ae-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; }
.ae-brand { display: flex; align-items: center; gap: .6rem; } .ae-logo { font-size: 1.6rem; }
.ae-brand b { display: block; font-size: 1.05rem; } .ae-brand small { color: var(--muted); font-size: .72rem; }
.ae-nav { display: flex; gap: .25rem; margin: 0 auto; flex-wrap: wrap; }
.ae-navbtn { border: 0; background: transparent; color: var(--muted); padding: .5rem .8rem; border-radius: .6rem; font: 600 .85rem inherit; cursor: pointer; display: inline-flex; gap: .4rem; align-items: center; }
.ae-navbtn:hover { color: var(--ink); background: var(--panel2); } .ae-navbtn.active { background: var(--brand); color: #fff; }
.ae-badge { background: rgba(0,0,0,.12); border-radius: 999px; padding: 0 .4rem; font-size: .7rem; min-width: 1.1rem; text-align: center; }
.ae-top-actions { display: flex; align-items: center; gap: .6rem; }
.ae-live-dot { color: var(--ok); font-size: .72rem; font-weight: 800; letter-spacing: .1em; display: inline-flex; align-items: center; gap: .4rem; }
.ae-live-dot::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--ok); animation: aep 1.3s infinite; }
@keyframes aep { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.ae-view { max-width: 1200px; margin: 0 auto; padding: 1.5rem; } .ae-view[hidden] { display: none !important; }
.ae-card { background: var(--panel); border: 1px solid var(--line); border-radius: 1rem; padding: 1.3rem; box-shadow: var(--shadow); }
.ae-card h3 { margin: 0 0 1rem; font-size: .95rem; }

/* ENQUIRE */
.ae-enq-wrap { max-width: 560px; margin: 0 auto; }
.ae-enq-steps { display: flex; gap: .5rem; margin-bottom: 1.2rem; }
.ae-enq-step { flex: 1; text-align: center; font-size: .76rem; color: var(--muted); padding-bottom: .5rem; border-bottom: 3px solid var(--line); }
.ae-enq-step.active { color: var(--brand-ink); border-bottom-color: var(--brand); font-weight: 700; }
.ae-enq-step.done { color: var(--ok); border-bottom-color: var(--ok); }
.ae-enq-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 1rem; padding: 1.6rem; box-shadow: var(--shadow); }
.ae-enq-panel h3 { margin: 0 0 1rem; }
.ae-course-opts { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
@media (max-width: 480px) { .ae-course-opts { grid-template-columns: 1fr; } }
.ae-course-opt { border: 1.5px solid var(--line); border-radius: .8rem; padding: .9rem; cursor: pointer; text-align: center; }
.ae-course-opt.sel { border-color: var(--brand); background: var(--panel2); }
.ae-course-opt .ce { font-size: 1.6rem; } .ae-course-opt b { display: block; font-size: .85rem; margin: .3rem 0 .1rem; }
.ae-course-opt small { color: var(--muted); font-size: .72rem; }
.ae-field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .8rem; font-size: .72rem; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.ae-field input, .ae-field select { font: 400 .9rem inherit; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: .5rem; background: var(--panel2); text-transform: none; }
.ae-field-row { display: flex; gap: .6rem; } .ae-field-row .ae-field { flex: 1; }
.ae-enq-actions { display: flex; gap: .5rem; margin-top: 1rem; }
.ae-batch-pick { display: flex; flex-direction: column; gap: .5rem; }
.ae-batch-pick .bp { display: flex; align-items: center; gap: .8rem; border: 1.5px solid var(--line); border-radius: .7rem; padding: .8rem 1rem; cursor: pointer; }
.ae-batch-pick .bp.sel { border-color: var(--brand); background: var(--panel2); }
.ae-batch-pick .bp .bi { flex: 1; font-size: .88rem; } .ae-batch-pick .bp .bi small { display: block; color: var(--muted); }
.ae-batch-pick .bp .seats { font-size: .74rem; color: var(--muted); }

.ae-enq-confirm { text-align: center; }
.ae-enq-confirm .check { width: 3.5rem; height: 3.5rem; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-size: 1.6rem; margin: 0 auto 1rem; }
.ae-wa { background: #075e54; border-radius: .9rem; overflow: hidden; margin: 1.2rem 0; text-align: left; }
.ae-wa-top { display: flex; align-items: center; gap: .5rem; padding: .7rem .9rem; color: #fff; font-size: .82rem; }
.ae-wa-top .a { width: 1.9rem; height: 1.9rem; border-radius: 50%; background: #128c7e; display: grid; place-items: center; }
.ae-wa-body { background: #e5ddd5; padding: .9rem; display: flex; flex-direction: column; gap: .5rem; }
.ae-wa-msg { background: var(--panel); align-self: flex-start; border-radius: .7rem; border-top-left-radius: .2rem; padding: .55rem .7rem; font-size: .82rem; max-width: 92%; box-shadow: 0 1px 1px rgba(0,0,0,.1); line-height: 1.45; }
.ae-wa-msg.out { background: #dcf8c6; align-self: flex-end; border-top-right-radius: .2rem; }

/* PIPELINE */
.ae-pipe-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.ae-pipe-head h2 { margin: 0; }
.ae-pipe-stats { display: flex; gap: 1.5rem; }
.ae-pipe-stats .s b { font-size: 1.3rem; font-weight: 800; display: block; } .ae-pipe-stats .s small { color: var(--muted); font-size: .72rem; }
.ae-kanban { display: grid; grid-template-columns: repeat(5, 1fr); gap: .8rem; overflow-x: auto; }
@media (max-width: 1000px) { .ae-kanban { grid-template-columns: repeat(3, minmax(190px,1fr)); } }
@media (max-width: 600px) { .ae-kanban { grid-template-columns: repeat(2, minmax(160px,1fr)); } }
.ae-col { background: var(--panel2); border: 1px solid var(--line); border-radius: .9rem; padding: .7rem; min-height: 300px; }
.ae-col h3 { margin: 0 0 .7rem; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); display: flex; justify-content: space-between; }
.ae-col h3 span { background: var(--panel); border-radius: 999px; padding: 0 .5rem; }
.ae-lead-card { background: var(--panel); border: 1px solid var(--line); border-radius: .7rem; padding: .7rem; margin-bottom: .5rem; cursor: pointer; }
.ae-lead-card:hover { border-color: var(--brand); } .ae-lead-card.new { animation: aein .3s ease; border-color: var(--brand); }
@keyframes aein { from { opacity: 0; transform: translateY(-6px); } }
.ae-lead-card b { font-size: .84rem; } .ae-lead-card .lm { color: var(--muted); font-size: .72rem; margin: .25rem 0; }
.ae-lead-card .lscore { display: inline-block; font-size: .66rem; font-weight: 800; padding: .05rem .35rem; border-radius: 999px; }
.ae-lead-card .lscore.hi { background: #dcfce7; color: var(--ok); } .ae-lead-card .lscore.md { background: #fef9c3; color: var(--warn); } .ae-lead-card .lscore.lo { background: #fee2e2; color: var(--danger); }
.ae-lead-card .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; }
.ae-lead-card .adv:hover { background: var(--brand); color: #fff; }

/* LEAD DETAIL */
.ae-lead-back { border: 0; background: transparent; color: var(--brand-ink); font: 600 .85rem inherit; cursor: pointer; margin-bottom: 1rem; }
.ae-lead-grid { display: grid; grid-template-columns: 1fr 300px; gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .ae-lead-grid { grid-template-columns: 1fr; } }
.ae-lead-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.ae-lead-head .av { width: 3rem; height: 3rem; border-radius: 50%; background: linear-gradient(135deg, var(--brand), #a855f7); color: #fff; display: grid; place-items: center; font-weight: 800; }
.ae-lead-head h2 { margin: 0; font-size: 1.35rem; } .ae-lead-head .lm { color: var(--muted); font-size: .85rem; }
.ae-lead-head .stage-pill { margin-left: auto; font-size: .68rem; font-weight: 800; text-transform: uppercase; padding: .15rem .55rem; border-radius: 999px; color: #fff; }
.ae-lead-sec { background: var(--panel); border: 1px solid var(--line); border-radius: 1rem; padding: 1.3rem; box-shadow: var(--shadow); margin-bottom: 1.25rem; }
.ae-lead-sec h4 { margin: 0 0 .8rem; font-size: .95rem; }
.ae-profile { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.ae-profile div { background: var(--panel2); border-radius: .5rem; padding: .6rem .8rem; font-size: .84rem; }
.ae-profile div small { color: var(--muted); display: block; font-size: .68rem; text-transform: uppercase; }
.ae-timeline .te { display: flex; gap: .6rem; font-size: .82rem; padding: .35rem 0; }
.ae-timeline .te .dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--brand); margin-top: .35rem; flex: none; }
.ae-timeline .te small { color: var(--muted); margin-left: auto; }
.ae-note-add { display: flex; gap: .5rem; margin-top: .6rem; }
.ae-note-add input { flex: 1; font: inherit; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: .5rem; }
.ae-lead-side { position: sticky; top: 76px; }
@media (max-width: 900px) { .ae-lead-side { position: static; } }
.ae-lead-actions { background: var(--panel); border: 1px solid var(--line); border-radius: 1rem; padding: 1.3rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .5rem; }
.ae-lead-actions .fu { font-size: .8rem; color: var(--muted); background: var(--panel2); border-radius: .5rem; padding: .6rem .8rem; margin-bottom: .3rem; }

/* BATCHES */
.ae-batch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.ae-batch { background: var(--panel); border: 1px solid var(--line); border-radius: 1rem; padding: 1.3rem; box-shadow: var(--shadow); }
.ae-batch .be { font-size: 1.8rem; } .ae-batch h4 { margin: .3rem 0 .1rem; font-size: 1rem; }
.ae-batch .bm { color: var(--muted); font-size: .8rem; }
.ae-batch .fee { font-weight: 800; color: var(--brand-ink); margin: .5rem 0; }
.ae-batch .seatbar { height: 7px; background: var(--line); border-radius: 999px; overflow: hidden; margin-bottom: .3rem; }
.ae-batch .seatbar i { display: block; height: 100%; background: var(--brand); }
.ae-batch .seatbar i.full { background: var(--danger); }
.ae-batch .seats { font-size: .76rem; color: var(--muted); }

/* ANALYTICS */
.ae-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.ae-kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 1rem; padding: 1.2rem; box-shadow: var(--shadow); }
.ae-kpi b { font-size: 1.7rem; font-weight: 800; display: block; } .ae-kpi small { color: var(--muted); font-size: .78rem; }
.ae-kpi .delta { color: var(--ok); font-size: .74rem; font-weight: 600; }
.ae-analytics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; } @media (max-width: 900px) { .ae-analytics-grid { grid-template-columns: 1fr; } }
#ae-weekchart { width: 100%; height: 180px; }
.ae-funnel-row { display: flex; align-items: center; gap: .8rem; padding: .5rem 0; font-size: .84rem; }
.ae-funnel-row .n { width: 5.5rem; color: var(--muted); flex: none; }
.ae-funnel-row .fb { flex: 1; height: 18px; background: var(--line); border-radius: 4px; overflow: hidden; }
.ae-funnel-row .fb i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #a855f7); }
.ae-funnel-row .v { width: 3rem; text-align: right; font-weight: 700; }
.ae-perf-row { display: flex; align-items: center; gap: .8rem; padding: .5rem 0; border-bottom: 1px dashed var(--line); font-size: .83rem; }
.ae-perf-row:last-child { border-bottom: 0; } .ae-perf-row .n { flex: 1; } .ae-perf-row .m { color: var(--muted); }
.ae-perf-row .rate { font-weight: 700; color: var(--brand-ink); }

.ae-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; }
.ae-toast[hidden] { display: none; }
