/* ==========================================================================
   Pulse design system, part 2: pieces the console needs that the prototype did not draw
   (drawer, skeleton, menu backdrop, sign-in screen, theme switch). Same tokens, same pl- prefix.
   ========================================================================== */

/* ---- small shell details ---- */
.pl-skip{position:fixed;left:12px;top:-60px;z-index:200;padding:9px 14px;border-radius:9px;background:var(--accent);color:var(--on-accent);font:700 13px/1 var(--font-ui);text-decoration:none}
.pl-skip:focus{top:max(12px,env(safe-area-inset-top,0px))}
.pl-main:focus{outline:none}
/* FocusOnNavigate moves focus to the page title for screen readers; it should not draw a box around it. */
:where(.pl-app,.pl-auth) h1:focus,:where(.pl-app,.pl-auth) h1:focus-visible{outline:none}
.pl-side-foot{margin-top:auto;padding:14px 6px 2px}
.pl-theme .pl-i-sun{display:none}
:root[data-theme="dark"] .pl-theme .pl-i-sun{display:block}
:root[data-theme="dark"] .pl-theme .pl-i-moon{display:none}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .pl-theme .pl-i-sun{display:block}
  :root:not([data-theme="light"]) .pl-theme .pl-i-moon{display:none}
}
/* The wordmark PNG has a wide empty canvas to its right; crop to the lettering. */
.pl-tjo img{display:block;width:94px;height:18px;object-fit:cover;object-position:left center}
.pl-tjo:disabled{opacity:.6;cursor:default}
.pl-avatar{cursor:pointer}
.pl-menu{display:inline-flex}
.pl-pop-bd{position:fixed;inset:0;z-index:74}
.pl-pop{max-width:calc(100vw - 16px)}
.pl-pop .pl-it .pl-ic,.pl-pop button .pl-ic{color:var(--muted)}
.pl-pop .pl-danger .pl-ic{color:var(--neg-ink)}
.pl-acct{min-width:240px}
.pl-toast.pl-neg .pl-ic{color:var(--neg)}
.pl-callout.pl-pos{background:var(--pos-soft);color:var(--pos-ink)}
.pl-callout.pl-info{background:var(--info-soft);color:var(--info-ink)}
.pl-callout code{overflow-wrap:anywhere}

/* Long unbroken strings (a URL inside a provider's error, a long email address) must wrap, never widen the page. */
.pl-q-t,.pl-q-d,.pl-ev-t,.pl-ev-m{overflow-wrap:anywhere}

/* ---- a one-time secret (generated password) ---- */
.pl-secret{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px dashed var(--border-strong);border-radius:10px;background:var(--surface-2)}
.pl-secret code{overflow-wrap:anywhere;font:600 14px/1.3 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.01em}

/* ---- loading placeholders ---- */
.pl-skel{display:flex;flex-direction:column;gap:12px;padding:6px 0}
.pl-skel i{display:block;height:12px;border-radius:6px;background:linear-gradient(90deg,var(--surface-2) 25%,var(--hair) 50%,var(--surface-2) 75%);background-size:200% 100%;animation:pl-shimmer 1.4s ease-in-out infinite}
@keyframes pl-shimmer{from{background-position:200% 0}to{background-position:-200% 0}}

/* ---- side drawer ---- */
.pl-dr-b{position:fixed;inset:0;z-index:90;display:flex;justify-content:flex-end;background:var(--scrim)}
.pl-dr{display:flex;flex-direction:column;width:min(540px,100%);height:100%;border-left:1px solid var(--border-strong);background:var(--surface);box-shadow:var(--shadow-pop);animation:pl-slide .18s ease-out}
.pl-dr.pl-wide{width:min(720px,100%)}
@keyframes pl-slide{from{transform:translateX(28px);opacity:0}to{transform:none;opacity:1}}
@media (max-width:819px){.pl-dr{border-left:0}}

/* ---- sign-in and SSO landing ---- */
.pl-auth{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);min-height:100vh;background:var(--bg);color:var(--text);font:400 13.5px/1.5 var(--font-ui);-webkit-font-smoothing:antialiased}
.pl-auth-brand{position:relative;display:flex;flex-direction:column;justify-content:space-between;gap:32px;padding:44px 52px;overflow:hidden;background:radial-gradient(120% 90% at 100% 0%,#3b2b0d 0%,transparent 58%),#1a150d;color:#f6ecd8}
.pl-ab-top{display:flex;align-items:center;gap:12px}
.pl-ab-top b{display:block;font:800 20px/1 var(--font-display);letter-spacing:-.015em}
.pl-ab-top small{display:block;margin-top:5px;font:600 10px/1 var(--font-ui);letter-spacing:.1em;text-transform:uppercase;color:#c9b99a}
.pl-ab-mid h2{max-width:17ch;font:800 clamp(30px,3.3vw,46px)/1.08 var(--font-display);letter-spacing:-.025em;text-wrap:balance}
.pl-ab-mid p{max-width:44ch;margin-top:16px;color:#dccfb5;font-size:15px;line-height:1.55}
.pl-ab-mid .pl-ab-ur{margin-top:6px;color:#a99b80;font-size:13.5px}
.pl-ab-line{width:100%;height:auto;max-height:150px;overflow:visible}
.pl-ab-foot{color:#a99b80;font-size:12px}
.pl-auth-main{display:grid;place-items:center;padding:32px 24px}
.pl-auth-card{display:flex;flex-direction:column;gap:20px;width:min(400px,100%)}
.pl-auth-logo{display:none;align-items:center;gap:10px}
.pl-auth-logo b{font:800 19px/1 var(--font-display);letter-spacing:-.015em}
.pl-auth-title{font:800 28px/1.1 var(--font-display);letter-spacing:-.02em}
.pl-auth-sub{margin-top:6px;color:var(--muted)}
.pl-auth-sub span{display:block}
.pl-auth-form{display:flex;flex-direction:column;gap:16px}
.pl-pw{position:relative}
.pl-pw .pl-in{padding-right:44px}
.pl-pw .pl-ibtn{position:absolute;top:1px;right:1px;width:36px;height:36px;border:0;background:none}
.pl-btn.pl-block{width:100%;height:40px}
.pl-auth-note{color:var(--muted);font-size:12px}
@media (max-width:900px){
  .pl-auth{grid-template-columns:minmax(0,1fr)}
  .pl-auth-brand{display:none}
  .pl-auth-logo{display:flex}
}

/* Phone cards: a cell is "label ... value", so the value block sits to the right and its lines align with it. */
@media (max-width:819px){
  .pl-tbl-cards td>div:not(.pl-rowact){text-align:right;min-width:0}
  .pl-tbl-cards td>.pl-pcell{text-align:left}
  .pl-tbl-cards .pl-t-sub.pl-ell{margin-left:auto}
}

/* A select inside a label/value row must not push the row wider than its card. */
.pl-kv .pl-sel select{max-width:210px}
.pl-kv .pl-row>span{min-width:0}

/* ---- Packages: plan cards ---- */
.pl-plans{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:14px}
.pl-plan{display:flex;flex-direction:column;gap:16px;padding:18px}
.pl-plan.pl-off{opacity:.7}
.pl-plan-h{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.pl-plan-h h2{font:700 19px/1.2 var(--font-display);letter-spacing:-.01em}
.pl-plan-desc{margin-top:3px;color:var(--muted);font-size:12.5px;overflow-wrap:anywhere}
.pl-price b{font:800 30px/1 var(--font-display);letter-spacing:-.02em}
.pl-price small{margin-left:5px;color:var(--muted);font:500 13px var(--font-ui)}
.pl-price-y{margin-top:6px;color:var(--muted);font-size:12.5px}
.pl-lims{display:flex;flex-direction:column;gap:8px}
.pl-lims li{display:flex;align-items:center;gap:9px}
.pl-lims .pl-ic{color:var(--pos)}
.pl-plan-f{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 12px;margin-top:auto;padding-top:14px;border-top:1px solid var(--hair)}
.pl-plan-chips{display:flex;flex-wrap:wrap;gap:6px}

/* ---- switch rows in a form (a switch, its name, one line of explanation) ---- */
.pl-swrows{display:flex;flex-direction:column;gap:14px;padding-top:6px}
.pl-swrow{display:flex;align-items:flex-start;gap:12px}
.pl-swrow .pl-sw{margin-top:1px}
.pl-swrow b{display:block;font-weight:600}
.pl-swrow span{display:block;margin-top:1px;color:var(--muted);font-size:12.5px}

/* ---- Email log: preview ---- */
.pl-mailframe{display:block;width:100%;height:min(560px,58vh);border:1px solid var(--border);border-radius:10px;background:#fff}
.pl-mailtext{max-height:min(560px,58vh);overflow:auto;margin:0;padding:12px 14px;border:1px solid var(--border);border-radius:10px;background:var(--surface-2);white-space:pre-wrap;overflow-wrap:anywhere;font:500 12.5px/1.55 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.pl-reasons{display:flex;flex-direction:column}
.pl-reason{display:flex;align-items:flex-start;gap:12px;padding:12px 16px;border-top:1px solid var(--hair)}
.pl-reason:first-child{border-top:0}
.pl-reason-b{flex:1;min-width:0}
.pl-reason-t{overflow-wrap:anywhere;font-weight:500}
.pl-reason-m{margin-top:2px;color:var(--muted);font-size:12px;overflow-wrap:anywhere}

/* ---- a labelled date box in a filter bar ---- */
.pl-datebox{display:inline-flex;align-items:center;gap:8px;color:var(--muted);font-weight:500}
.pl-datebox .pl-in{width:auto;height:36px;padding:0 10px;border:1px solid var(--border-strong);border-radius:9px;background:var(--surface);color:var(--text)}
.pl-datebox .pl-in::-webkit-calendar-picker-indicator{cursor:pointer;opacity:.65}
.pl-datebox .pl-in::-webkit-calendar-picker-indicator:hover{opacity:1}

/* ---- Errors: code and the expanded stack trace ---- */
.pl-code{font:500 12px ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;overflow-wrap:anywhere}
.pl-tbl tr.pl-detail:hover{background:none}
.pl-tbl tr.pl-detail td{padding:0 16px 14px;background:var(--surface-2)}
.pl-trace-h{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;padding:12px 0 8px}
.pl-trace{max-height:360px;overflow:auto;margin:0;padding:12px 14px;border:1px solid var(--border);border-radius:10px;background:var(--surface);white-space:pre-wrap;overflow-wrap:anywhere;font:500 11.5px/1.55 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.pl-tbl tr.pl-clk.pl-open{background:var(--surface-hover)}
/* the disclosure button inside a clickable row: reads as the row's own time stamp, with a chevron that turns when open */
.pl-disc{display:inline-flex;align-items:center;gap:6px;padding:2px 4px 2px 0;border:0;border-radius:6px;background:none;color:inherit;font:inherit;white-space:nowrap;cursor:pointer}
.pl-disc .pl-ic{color:var(--muted);transition:transform .15s}
.pl-disc[aria-expanded="true"] .pl-ic{transform:rotate(90deg)}
@media (prefers-reduced-motion:reduce){ .pl-disc .pl-ic{transition:none} }

/* A long sentence in a table cell shows two lines; the full text is in the tooltip and the drawer. */
.pl-clamp{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;overflow-wrap:anywhere}

.pl-namecell{display:flex;align-items:center;gap:8px;min-width:0}
@media (max-width:819px){ .pl-tbl-cards .pl-namecell{justify-content:flex-end} }

/* ---- chart captions and readings: what a line is and its figures, not just the line ---- */
.pl-cap{margin-bottom:4px;color:var(--muted);font:600 12px/1.35 var(--font-ui)}
.pl-read{display:flex;flex-wrap:wrap;align-items:center;gap:4px 16px;margin-top:8px;padding-top:8px;border-top:1px solid var(--hair);font-size:12.5px}
.pl-rd-d{font-weight:700}
.pl-rd-v{display:inline-flex;align-items:center;gap:6px;color:var(--muted)}
.pl-rd-v b{color:var(--text);font-size:13.5px}
.pl-rd-v .pl-k{display:inline-block;width:14px;height:0;border-top:2px solid}
.pl-spk-c{margin-top:2px;color:var(--muted);font:500 11px/1.3 var(--font-ui)}

/* Stages: a client or business name can be arbitrarily long; it wraps inside its cell instead of widening the page. */
.pl-stg td>div{min-width:0;max-width:340px;overflow-wrap:anywhere}
