/* DLS dashboard */
.dash-top { background: var(--band); color: var(--band-text); border-bottom: 1px solid var(--band-line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; }
.dash-top .in { display: flex; align-items: center; gap: 1rem; min-height: 64px; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }
.dash-top .brand { margin-right: auto; gap: 0.9rem; }
.dash-tag { font-family: var(--font-display); font-weight: 800; font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); padding-left: 0.9rem; border-left: 1px solid var(--line-2); }
.dash-top .brand img { height: 34px; width: auto; }
.dash-top a:not(.brand) { color: var(--band-text); font-size: 0.95rem; }
.dash-top .btn { min-height: 40px; }
.dash-main { padding-top: 1.75rem; max-width: 1240px; margin-inline: auto; padding: 1.5rem var(--gutter) 4rem; display: grid; gap: 1.25rem; }
.dash-title { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.dash-title h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
.dash-title .muted { font-size: 0.95rem; }
.toolbar { display: grid; gap: 0.9rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { min-height: 40px; display: inline-flex; align-items: center; gap: 0.5rem; padding: 0 0.9rem; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; font: inherit; font-size: 0.95rem; font-weight: 500; cursor: pointer; }
.chip b { font-variant-numeric: tabular-nums; font-weight: 700; }
.chip[aria-pressed="true"] { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.search { max-width: 380px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.leads { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
.leads th { text-align: left; font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.85rem; font-weight: 600; color: var(--muted); padding: 0.75rem 1rem; background: var(--surface-2); white-space: nowrap; }
.leads td { padding: 0.8rem 1rem; border-top: 1px solid var(--line); vertical-align: middle; }
.leads tbody tr { cursor: pointer; }
.leads tbody tr:hover { background: var(--surface-2); }
.leads .who { display: grid; gap: 0.1rem; }
.leads .who button { all: unset; cursor: pointer; font-weight: 600; text-align: left; }
.leads .who button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.leads tr.is-new .who button { font-weight: 700; }
.leads .sub { color: var(--muted); font-size: 0.875rem; overflow-wrap: anywhere; }
.leads .when { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.pill { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px; font-size: 0.82rem; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--text); }
.pill.new { background: var(--warn-bg); color: var(--warn); }
.pill.contacted { background: var(--info-bg); color: var(--info); }
.pill.enrolled { background: var(--ok-bg); color: var(--ok); }
.status-sel { min-height: 40px; width: auto; padding: 0.3rem 0.6rem; font-size: 0.92rem; font-weight: 600; }
.empty { padding: 3rem 1.5rem; text-align: center; display: grid; gap: 0.75rem; justify-items: center; }
.empty h2 { font-size: 1.8rem; }
@media (max-width: 820px) {
  .leads thead { display: none; }
  .leads, .leads tbody { display: block; }
  .leads tr { display: grid; grid-template-columns: 1fr auto; gap: 0.35rem 0.75rem; padding: 0.9rem 1rem; border-top: 1px solid var(--line); }
  .leads tr:first-child { border-top: 0; }
  .leads td { display: block; padding: 0; border: 0; }
  .leads td.c-when { grid-row: 1; grid-column: 2; }
  .leads td.c-who { grid-row: 1; grid-column: 1; }
  .leads td.c-amt { grid-row: 1; grid-column: 2; font-weight: 700; text-align: right; }
  .leads td.c-date { grid-column: 1 / -1; font-size: 0.85rem; color: var(--muted); }
  .leads td.c-type, .leads td.c-int { grid-column: 1 / -1; }
  .leads td.c-contact { display: none; }
  .leads td.c-status { grid-column: 1 / -1; }
}
/* Drawer */
.scrim { position: fixed; inset: 0; background: rgba(8, 10, 12, 0.55); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(540px, 100%); background: var(--surface); color: var(--text); z-index: 41; overflow-y: auto; box-shadow: -12px 0 40px rgba(0, 0, 0, 0.35); padding: 1.5rem var(--gutter) calc(2rem + env(safe-area-inset-bottom, 0px)); padding-top: calc(1.5rem + env(safe-area-inset-top, 0px)); display: grid; gap: 1.25rem; align-content: start; }
.drawer header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.drawer h2 { font-size: 2.1rem; }
.drawer .meta { display: flex; flex-wrap: wrap; gap: 0.5rem 0.9rem; align-items: center; color: var(--muted); font-size: 0.92rem; margin-top: 0.5rem; }
.close { min-height: 44px; min-width: 44px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); border-radius: var(--radius); cursor: pointer; font-size: 1.3rem; line-height: 1; }
.contact { display: grid; gap: 0.6rem; }
.contact .row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; padding: 0.7rem 0.9rem; background: var(--surface-2); border-radius: var(--radius); }
.contact .row span { user-select: all; font-weight: 500; overflow-wrap: anywhere; }
.contact .row a { margin-left: auto; font-weight: 600; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem; }
.seg button { min-height: 46px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); border-radius: var(--radius); font: inherit; font-weight: 600; cursor: pointer; }
.seg button[aria-pressed="true"] { border-color: transparent; }
.seg button[aria-pressed="true"][data-s="new"] { background: var(--warn-bg); color: var(--warn); }
.seg button[aria-pressed="true"][data-s="contacted"] { background: var(--info-bg); color: var(--info); }
.seg button[aria-pressed="true"][data-s="enrolled"] { background: var(--ok-bg); color: var(--ok); }
.drawer h3 { font-size: 1.15rem; letter-spacing: 0.1em; color: var(--muted); font-weight: 600; margin-bottom: 0.6rem; }
dl.answers { margin: 0; display: grid; }
dl.answers div { padding: 0.7rem 0; border-top: 1px solid var(--line); display: grid; gap: 0.15rem; }
dl.answers dt { font-size: 0.85rem; color: var(--muted); }
dl.answers dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
ul.answers { margin: 0; padding: 0; list-style: none; display: grid; }
ul.answers li { padding: 0.7rem 0; border-top: 1px solid var(--line); }
ul.answers li:first-child { border-top: 0; }
.subs { margin-top: 0.5rem; }
.dash-main h1 { letter-spacing: -0.02em; }
.toast { position: fixed; left: 50%; bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 0.7rem 1.1rem; border-radius: var(--radius); font-weight: 600; z-index: 60; max-width: calc(100% - 2rem); }
.toast.bad { background: var(--bad); color: #fff; }
/* Login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem var(--gutter); background: radial-gradient(110% 90% at 80% 0%, rgba(30, 63, 176, 0.32), transparent 55%), var(--ink); }
.login-card { width: min(440px, 100%); background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; display: grid; gap: 1.25rem; border-top: 4px solid var(--gold); }
.login-card h1 { font-size: 2.4rem; }
.login-card form { display: grid; gap: 1rem; }
.login-note { font-size: 0.9rem; }

/* Shell: sidebar plus content column */
.dash-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.dnav { background: var(--band); border-right: 1px solid var(--band-line); padding: 1.25rem 0.9rem; position: sticky; top: 0; height: 100vh; align-self: start; display: grid; grid-template-rows: auto 1fr; gap: 1.5rem; }
.dnav .brand img { height: 32px; width: auto; }
.dnav nav { display: grid; gap: 0.2rem; align-content: start; }
.dnav nav a { display: block; padding: 0.6rem 0.8rem; color: var(--muted); text-decoration: none; font-weight: 600; border-left: 3px solid transparent; }
.dnav nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.dnav nav a[aria-current="page"] { color: var(--gold); border-left-color: var(--gold); background: rgba(244, 194, 27, 0.07); }
.dcol { min-width: 0; }
.dash-top .in { justify-content: flex-end; max-width: none; }
.dash-top .dash-tag { margin-right: auto; border-left: 0; padding-left: 0; }
.who-am { font-size: 0.9rem; color: var(--muted); }
.who-am b { color: var(--text); margin-right: 0.4rem; }
@media (max-width: 860px) {
  .dash-shell { grid-template-columns: 1fr; }
  .dnav { position: static; height: auto; grid-template-rows: auto; padding: 0.8rem var(--gutter); border-right: 0; border-bottom: 1px solid var(--band-line); }
  .dnav nav { display: flex; overflow-x: auto; gap: 0.3rem; padding-bottom: 0.2rem; }
  .dnav nav a { white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; }
  .dnav nav a[aria-current="page"] { border-bottom-color: var(--gold); }
  .who-am { display: none; }
}
.dash-main { max-width: 1100px; margin: 0; }
.h2s { font-size: 1.35rem; letter-spacing: 0.02em; margin-top: 0.75rem; }
.big { font-family: var(--font-display); font-size: 2rem; font-weight: 900; color: var(--gold); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0.9rem; }
.stat { display: grid; gap: 0.25rem; padding: 1.2rem; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--gold); text-decoration: none; color: var(--text); }
.stat span { font-size: 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.stat b { font-family: var(--font-display); font-size: 2rem; font-weight: 900; }
.stat em { font-style: normal; color: var(--muted); font-size: 0.9rem; }
.stat:hover { background: var(--surface-2); }
.panel.pad { padding: 1.25rem; }
.stackf { display: grid; gap: 1rem; max-width: 640px; }
.stackf .btn { justify-self: start; }
.fld.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.fld.two > div { display: flex; flex-direction: column; gap: 0.4rem; }
.addbox > summary { display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer; font-weight: 600; padding: 0.5rem 0.9rem; border: 1px solid var(--line, #e6e8ec); border-radius: 10px; width: fit-content; list-style: none; user-select: none; }
.addbox > summary::-webkit-details-marker { display: none; }
.addbox > summary::before { content: "+"; font-weight: 800; }
.addbox[open] > summary::before { content: "\2212"; }
.addbox[open] > summary { margin-bottom: 0.75rem; }
.addbox .stackf { max-width: 560px; }
.imggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.imgcard { background: var(--surface); border: 1px solid var(--line); padding: 1rem; display: grid; gap: 0.75rem; align-content: start; }
.imgcard.busy { opacity: 0.6; pointer-events: none; }
.imgprev { aspect-ratio: 16 / 10; background: var(--ink-3); border: 1px dashed var(--line-2); display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.imgprev img { width: 100%; height: 100%; object-fit: cover; }
.imgbtns { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.imgbtns label.btn { cursor: pointer; }
.demo-roles { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.6rem; }
dl.kv { margin: 0; display: grid; }
dl.kv div { display: grid; grid-template-columns: 110px 1fr; gap: 1rem; padding: 0.6rem 0; border-top: 1px solid var(--line); }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; font-weight: 600; }
.guide { max-width: 760px; display: grid; gap: 1.75rem; }
.guide h2 { font-size: 1.5rem; margin-bottom: 0.6rem; }
.guide ol, .guide ul { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.4rem; }
.guide .role { display: inline-block; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; color: var(--gold); margin-left: 0.5rem; }
.guide code { background: var(--surface-2); padding: 0.1rem 0.4rem; }
.pill.paid { background: var(--ok-bg); color: var(--ok); }
.mgrid { display: grid; gap: 1.25rem; }
.mcard { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1.25rem; display: grid; gap: 1rem; }
.mcard.busy { opacity: 0.6; pointer-events: none; }
.mcard h3 { font-size: 1.3rem; }
.mlist { display: grid; gap: 0.75rem; }
.mrow { display: grid; grid-template-columns: 96px 1fr auto; gap: 0.9rem; align-items: center; }
.mrow img, .mthumb { width: 96px; height: 64px; object-fit: cover; border-radius: 10px; background: var(--ink-3); display: grid; place-items: center; color: var(--muted); font-size: 0.8rem; }
.mbtns { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
.nameav { align-items: center; gap: 0.6rem; }
.savatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: 0 0 34px; display: inline-flex; align-items: center; justify-content: center; background: var(--ink-3); font-family: var(--font-display); font-weight: 800; font-size: 0.8rem; color: var(--gold); }
.pphoto { display: flex; gap: 1rem; align-items: center; margin-bottom: 0.5rem; }
.pphoto.busy { opacity: 0.5; pointer-events: none; }
.pphoto-img { width: 88px; height: 88px; border-radius: 12px; overflow: hidden; background: var(--ink-3); display: flex; align-items: center; justify-content: center; flex: 0 0 88px; }
.pphoto-img img { width: 100%; height: 100%; object-fit: cover; }
.pphoto .ph-ini { font-size: 1.6rem; }
.lrow, .pkgrow { display: grid; gap: 0.5rem; align-items: center; margin-bottom: 0.5rem; }
.lrow { grid-template-columns: 1fr 1.4fr auto; }
.pkgrow { grid-template-columns: 1fr 1fr 1.4fr auto; }
.lrow input, .pkgrow input { padding: 0.55rem 0.7rem; border: 1px solid var(--line, #e6e8ec); border-radius: 10px; min-width: 0; }
@media (max-width: 640px) { .lrow, .pkgrow { grid-template-columns: 1fr auto; } }
.madd { display: grid; gap: 0.75rem; max-width: 520px; }
@media (max-width: 640px) { .mrow { grid-template-columns: 72px 1fr; } .mbtns { grid-column: 1 / -1; } }
