/* ==========================================================================
   ORBIT v3.0.0 — application stylesheet
   NOTE: base.html emits a :root override AFTER this stylesheet with the
   colours saved in Admin → Settings → Branding. Values here are fallbacks.
   ========================================================================== */
/* --------------------------------------------------------------------------
   ORBIT BRAND — from ORBIT Brand Guidelines v1.0
   Palette   Field #F1F3F5 · Paper #FAFBFC · Core Ink #14181F · Dust #636B76
             Halo #D8DDE3 · Accent #5B6CFF (Orbit Blue, FILL ONLY)
   Type      Schibsted Grotesk SemiBold for display, IBM Plex Sans for body,
             IBM Plex Mono for versions, slugs, IDs and totals.
   Rules     Body leading never below 160%. The accent is 2.3:1 on Field and
             therefore FAILS as text — it is a fill, with Core Ink on top at
             6.9:1. Halo is rules and dividers, never type. Ring 03 is
             graphic only. Buttons are fully rounded.

   The whole stylesheet reads colour through the semantic variables below
   (--ink, --bg, --line and friends, 395 call sites). Rebranding is therefore
   done HERE, at the one place they are defined, rather than by editing every
   rule — the same choke-point reasoning used for tenant mail routing. The
   --orbit-* names are the brand's own vocabulary and the semantic names are
   mapped onto them, so a future palette change has exactly one edit point.
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Schibsted+Grotesk:wght@400;500;600;700&family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
    --sidebar-w: 248px;

    /* ---- Orbit palette, verbatim from the guidelines ---- */
    --orbit-field: #F1F3F5;       /* ground */
    --orbit-paper: #FAFBFC;       /* raised panels */
    --orbit-ink: #14181F;         /* primary text — 16.0:1 */
    --orbit-dust: #636B76;        /* secondary text — 4.9:1, cleared */
    --orbit-halo: #D8DDE3;        /* rules and dividers — NEVER type */
    --orbit-accent: #5B6CFF;      /* Orbit Blue — FILL ONLY */
    --orbit-accent-on: #FFFFFF;   /* text on the blue fill */
    --orbit-ring-01: #26323F;
    --orbit-ring-02: #4E6275;
    --orbit-ring-03: #93A3B3;     /* graphic use only — never type */

    /* Brand. --brand is a FILL colour everywhere it is used. Text placed on
       it is --brand-on. v3.45.0 (brief section 13): the default accent is
       Orbit Blue #5B6CFF with white type, the same blue as the native apps. */
    --brand: var(--orbit-accent);
    --brand-on: var(--orbit-accent-on);
    --brand-dark: #4655E6;        /* pressed / hover fill */
    /* The accent is a fill and MUST NOT be used as a text colour.
       Some elements still need to read as "brand" while being type: active
       nav icons, links on hover, the invoice total. They use this darkened
       accent, which is the same hue at 5.2:1 on Field and 5.6:1 on Paper.
       It is a separate token precisely so the fill colour cannot drift into
       text use -- the guidelines' rule survives as a name, not a comment. */
    --brand-text: #3A47C9;
    --brand-2: #2EA6F2;           /* cyan end of the accent gradient */
    --brand-soft: rgba(91, 108, 255, .22);
    --brand-softer: rgba(91, 108, 255, .10);

    /* Core neutrals, mapped onto the brand palette. */
    --ink-black: var(--orbit-ink);
    --ink: var(--orbit-ink);
    --ink-grey: #2B333D;          /* body copy — 12.4:1 on Field */
    --muted: var(--orbit-dust);   /* secondary text only */
    --line: var(--orbit-halo);
    --bg: var(--orbit-field);
    --paper: var(--orbit-paper);

    /* The sidebar is the deep end of the ring scale, not pure black: the
       guidelines build depth from Ring 01 inwards. */
    --sidebar-bg: var(--orbit-ring-01);
    --bar-accent: var(--brand-2);   /* v3.24.0: accent drawn on the bar colour */
    --sidebar-text: #EDF0F3;

    /* Type */
    --font-head: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

    --card-radius: 14px;
    /* Fully rounded, per the guidelines. Named so no button has to repeat it. */
    --btn-radius: 999px;

    /* Status — kept semantic, not brand. Darkened to clear 4.5:1 on Field. */
    --ok: #15803D;
    --warn: #A15C07;
    --crit: #C2261B;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--ink-grey);
    font-size: 14px;
    /* Never below 160% — a hard rule in the brand guidelines, and the
       reason this is not the 1.55 it used to be. */
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: var(--brand-text); }
a:hover { color: var(--brand-text); }

/* Headlines: Schibsted Grotesk SemiBold, SENTENCE CASE, tracked -0.04em.
   The Orbit guidelines are explicit and reverse the previous brand's rule:
   "Sentence case everywhere, including the wordmark. Label is the only
   uppercase style." Orbit "speaks at a normal volume", so the uppercase
   transform that used to live here has been removed rather than softened. */
h1, h2, h3 {
    margin: 0 0 10px;
    font-family: var(--font-head);
    font-weight: 600;
    text-transform: none;
    letter-spacing: -.04em;
    line-height: 1.1;
    color: var(--ink-black);
}
h1 { font-size: 30px; }
h2 { font-size: 23px; }
h3 { font-size: 17px; letter-spacing: .4px; }

/* h4 is a subheading: IBM Plex Sans SemiBold, sentence case. */
h4 {
    margin: 0 0 10px;
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--ink-black);
}

strong, b { font-weight: 700; color: var(--ink-black); }

/* ---------------- Public pages (login / register / home) ---------------- */
.public-wrap {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background:
        radial-gradient(circle at 12% 18%, rgba(91, 108, 255, .38), transparent 46%),
        radial-gradient(circle at 88% 84%, rgba(91, 108, 255, .16), transparent 52%),
        var(--ink-black);
    padding: 24px;
}
.public-card {
    background: var(--dm-surface, #fff);
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
    padding: 38px;
    width: 100%;
    max-width: 430px;
}
.public-card.wide { max-width: 560px; }
.public-card h1 { font-size: 23px; margin-bottom: 4px; }
.public-card .sub { color: var(--muted); margin-bottom: 24px; font-size: 13.5px; }
.public-logo {
    width: 56px; height: 56px; border-radius: 15px;
    background: linear-gradient(140deg, var(--brand) 0%, var(--brand-dark) 100%);
    display: flex; align-items: center; justify-content: center;
    color: var(--ink-black); font-size: 26px; margin-bottom: 18px;
}
.public-foot {
    margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line);
    font-size: 13px; color: var(--muted); text-align: center;
}

/* ------------------------------- Layout -------------------------------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    position: fixed; top: 0; bottom: 0; left: 0;
    overflow-y: auto;
    transition: transform .25s ease;
    z-index: 1000;
    display: flex; flex-direction: column;
}
.sidebar .brand {
    display: flex; align-items: center; gap: 11px;
    padding: 18px 20px;
    color: #fff; font-weight: 700; font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.sidebar .brand .logo {
    width: 34px; height: 34px; border-radius: 9px;
    background: linear-gradient(140deg, var(--brand-2), var(--brand));
    color: var(--ink-black);
    display: flex; align-items: center; justify-content: center; font-size: 17px;
    flex: 0 0 34px;
}
.sidebar .brand .btxt { min-width: 0; }
.sidebar .brand .btxt small {
    display: block; font-weight: 500; font-size: 11px;
    color: rgba(255, 255, 255, .45); letter-spacing: .3px;
}
.nav-section { padding: 12px 0; }
.nav-section.bottom { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .08); }
.nav-title {
    font-size: 10.5px; text-transform: uppercase; letter-spacing: .8px;
    color: rgba(255, 255, 255, .35); padding: 10px 20px 6px; font-weight: 700;
}
.nav-link {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 20px; color: rgba(242,242,242,.62); font-weight: 500; font-size: 13.5px;
    border-left: 3px solid transparent;
    transition: background .15s, color .15s;
}
.nav-link:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.nav-link.active {
    background: linear-gradient(90deg, var(--brand-soft), transparent 85%);
    color: #fff; border-left-color: var(--brand); font-weight: 600;
}
.nav-link i { width: 17px; height: 17px; flex: 0 0 17px; }
.nav-badge {
    margin-left: auto; font-size: 10px; font-weight: 700;
    background: var(--brand); color: var(--ink-black); border-radius: 999px; padding: 1px 7px;
}

.main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
    background: var(--dm-surface, #fff); height: 60px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 500;
}
.topbar h2 { font-size: 17px; margin: 0; }
.content { padding: 24px; flex: 1; }
.hamburger { display: none; background: none; border: none; font-size: 22px; cursor: pointer; }

/* -------------------------------- Cards -------------------------------- */
.card {
    background: var(--dm-surface, #fff); border-radius: var(--card-radius);
    border: 1px solid var(--line); box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
    margin-bottom: 20px;
}
.card-header {
    padding: 15px 20px; border-bottom: 1px solid var(--line);
    display: flex; align-items: center; justify-content: space-between;
    font-weight: 600; gap: 12px;
}
.card-body { padding: 20px; }
.card-body.tight { padding: 0; }

/* ----------------------------- Stat cards ------------------------------ */
.stat-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px; margin-bottom: 20px;
}
.stat {
    background: var(--dm-surface, #fff); border-radius: var(--card-radius); padding: 18px 20px;
    border: 1px solid var(--line);
    display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
}
.stat .label { color: var(--muted); font-size: 12.5px; margin-bottom: 6px; }
.stat .value { font-size: 25px; font-weight: 700; line-height: 1.15; }
.stat .sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.stat .icon {
    width: 42px; height: 42px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; color: #fff;
    flex: 0 0 42px;
}
.icon.indigo { background: var(--brand); }
.icon.sky { background: var(--brand-2); }
.icon.green { background: var(--ok); }
.icon.orange { background: var(--warn); }
.icon.red { background: var(--crit); }

/* ------------------------------- Meters -------------------------------- */
.meter { height: 8px; border-radius: 999px; background: var(--dm-surface-3, #EDEDEF); overflow: hidden; margin-top: 10px; }
.meter > span { display: block; height: 100%; border-radius: 999px; background: var(--brand); transition: width .4s ease; }
.meter.ok > span { background: var(--ok); }
.meter.warning > span { background: var(--warn); }
.meter.critical > span { background: var(--crit); }

/* ------------------------------- Tables -------------------------------- */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 20px; text-align: left; border-bottom: 1px solid var(--line); font-size: 13.5px; }
th { background: var(--dm-surface-2, #FAFAFA); color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
tbody tr:hover { background: var(--dm-surface-2, #FAFAFA); }
tbody tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; }

/* ------------------------------ Elements ------------------------------- */
.pill {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
    background: var(--dm-surface-3, #F1F1F2); color: var(--ink-grey); text-transform: uppercase; letter-spacing: .3px;
}
.pill.ok, .pill.active { background: #dcfce7; color: #15803d; }
.pill.warn, .pill.pending_approval { background: #fef3c7; color: #b45309; }
.pill.crit, .pill.disabled, .pill.rejected { background: #fee2e2; color: #b91c1c; }
.pill.muted { background: var(--dm-surface-3, #F1F1F2); color: var(--muted); }

.badge-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.badge-dot.ok { background: var(--ok); }
.badge-dot.warning { background: var(--warn); }
.badge-dot.critical { background: var(--crit); }
.badge-dot.unknown { background: #94a3b8; }

.btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 18px; border-radius: var(--btn-radius); border: 1px solid transparent;
    font-weight: 600; font-size: 13.5px; cursor: pointer; font-family: inherit;
    transition: filter .15s, background .15s;
}
.btn:hover { filter: brightness(.95); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn i { width: 15px; height: 15px; }
/* Orange FILL with Core Ink text — 6.9:1. The accent is 2.3:1 on Field and
   fails as text, so it may never be a text colour; this is the only
   sanctioned way to use it at size. */
.btn-primary { background: var(--brand); color: var(--brand-on); font-weight: 600; }
.btn-primary:hover { background: var(--brand-dark); filter: none; }
.btn-dark { background: var(--dm-fill, var(--ink-black)); color: #fff; }
.btn-outline {
    background: transparent; color: var(--brand-text); border-color: var(--brand);
    font-weight: 700;
}
.btn-outline:hover { background: var(--brand-softer); filter: none; }
.btn-light { background: var(--dm-surface, #fff); color: var(--ink); border-color: var(--line); }
.btn-danger { background: var(--crit); color: #fff; }
.btn-success { background: var(--ok); color: #fff; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 7px; }
.btn-block { width: 100%; justify-content: center; }

label { display: block; font-weight: 600; font-size: 12.5px; margin-bottom: 6px; color: var(--ink-grey); }
/* v2.6.0: tel/date/month added. The signup wizard and the sales enquiry form
   use them for phone numbers and card expiry, and without them those inputs
   fell through to the browser default -- a differently sized, differently
   bordered box sitting next to a styled one on the same row. */
input[type=text], input[type=email], input[type=password], input[type=url],
input[type=number], input[type=color], input[type=tel], input[type=date],
input[type=month], select, textarea {
    width: 100%; padding: 10px 12px; border: 1px solid var(--line);
    border-radius: 9px; font-size: 14px; font-family: inherit; background: var(--dm-surface, #fff);
    color: var(--ink);
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-softer);
}
input[type=color] { padding: 3px; height: 40px; }
.field { margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
/* v2.19.0: a label with something small opposite it, e.g. the sign-in form's
   "Forgot password?". Deliberately NOT .field-row, which is the two-up field
   grid above and would lay the label and the link out as two form columns. */
.label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}
.label-row label { margin-bottom: 0; }
.label-aside {
    font-size: 12px;
    color: var(--muted);
    text-decoration: none;
    white-space: nowrap;
}
.label-aside:hover { color: var(--brand-text); text-decoration: underline; }
/* v2.19.0: a URL shown inside a notice, e.g. the reset link offered when
   email could not be sent. An input rather than an <a> on purpose -- a reset
   link is single use, so clicking it here would spend it. */
.notice-link { display: flex; gap: 8px; margin-top: 10px; }
.notice-link-input {
    flex: 1;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
    padding: 7px 10px;
}
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; }

.alert { padding: 12px 15px; border-radius: 10px; font-size: 13.5px; margin-bottom: 16px; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-ok { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-info { background: #e0f2fe; color: #075985; border: 1px solid #bae6fd; }
.alert-warn { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

.flex { display: flex; align-items: center; gap: 10px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }

/* Definition list used by the specs page */
.spec-list { display: grid; grid-template-columns: auto 1fr; gap: 9px 18px; font-size: 13.5px; }
.spec-list dt { color: var(--muted); font-weight: 500; }
.spec-list dd { margin: 0; font-weight: 600; text-align: right; word-break: break-word; }

/* Permission checkbox grid */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.perm-grid label {
    display: flex; align-items: center; gap: 8px; font-weight: 500;
    font-size: 13px; margin: 0; padding: 8px 10px; border: 1px solid var(--line);
    border-radius: 8px; cursor: pointer; background: var(--dm-surface, #fff);
}
.perm-grid label:hover { background: var(--brand-softer); border-color: var(--brand); }
.perm-grid input { width: auto; }

/* Progress bar (updater) */
.progress { height: 9px; background: var(--dm-surface-3, #EDEDEF); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--brand); width: 0; transition: width .4s ease; }

/* v3.26.0 - shell restart progress panel (admin/marketplace.html) */
.restart-panel { padding: 14px 16px; border-radius: 10px; margin-bottom: 16px; border: 1px solid #fed7aa; background: #fff7ed; color: #7c2d12; font-size: 13.5px; }
.restart-panel .restart-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.restart-panel .restart-head svg { width: 15px; height: 15px; vertical-align: -2px; }
.restart-panel[data-tone="run"] .restart-head svg { animation: restart-spin 1.1s linear infinite; }
.restart-panel .restart-bar { height: 10px; background: rgba(0,0,0,.07); }
.restart-panel .restart-bar > span { transition: width .3s ease; }
.restart-panel .restart-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 0; margin: 10px 0 8px; font-size: 12.5px; }
.restart-panel .restart-steps li { color: #a8a29e; }
.restart-panel .restart-steps li::before { content: "\25CB"; margin-right: 5px; }
.restart-panel .restart-steps li.is-active { color: inherit; font-weight: 600; }
.restart-panel .restart-steps li.is-active::before { content: "\25D4"; }
.restart-panel .restart-steps li.is-done { color: #15803d; }
.restart-panel .restart-steps li.is-done::before { content: "\2713"; }
.restart-panel .restart-status { font-weight: 500; }
.restart-panel .restart-actions { margin-top: 10px; }
.restart-panel[data-tone="ok"] { background: #f0fdf4; border-color: #bbf7d0; color: #14532d; }
.restart-panel[data-tone="ok"] .restart-bar > span { background: #16a34a; }
.restart-panel[data-tone="warn"] { background: #fffbeb; border-color: #fcd34d; color: #92400e; }
.restart-panel[data-tone="warn"] .restart-bar > span { background: #f59e0b; }
.restart-panel[data-tone="error"] { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.restart-panel[data-tone="error"] .restart-bar > span { background: #dc2626; }
@keyframes restart-spin { to { transform: rotate(360deg); } }

/* Toast */
#toast {
    position: fixed; bottom: 24px; right: 24px; z-index: 2000;
    display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
}
.toast-item {
    background: var(--dm-fill, var(--ink-black)); color: #fff; padding: 11px 17px; border-radius: 10px;
    font-size: 13.5px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
    animation: toastIn .2s ease;
}
.toast-item.ok { background: #15803d; }
.toast-item.err { background: #b91c1c; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Drop zone for package upload */
.dropzone {
    border: 2px dashed var(--line); border-radius: 12px; padding: 28px;
    text-align: center; color: var(--muted); cursor: pointer; background: var(--dm-surface-2, #FAFAFA);
    transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: var(--brand-softer); color: var(--brand-text); }

/* ----------------------------- Responsive ------------------------------ */
@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: none; }
    .main { margin-left: 0; }
    .hamburger { display: block; }
    .field-row { grid-template-columns: 1fr; }
    .content { padding: 16px; }
    th, td { padding: 10px 14px; }
}

/* ------------------------------------------------------------- v1.0.0 additions */
/* Card header alias — both .card-header and .card-head are used across templates. */
.card-head {
    padding: 15px 20px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.card-head h3, .card-header h3 { font-size: 14.5px; margin: 0; font-weight: 650; }

/* Stat card aliases.
   .stat is a flex row (icon on the right). Cards built from stat-label /
   stat-value / stat-foot instead need those children on their own lines, so
   allow wrapping and make them full width. */
.stat { flex-wrap: wrap; }
.stat > .stat-label,
.stat > .stat-value,
.stat > .stat-foot,
.stat > .meter { flex: 0 0 100%; }

.stat-label { color: var(--muted); font-size: 12.5px; margin-bottom: 6px; }
.stat-value { font-size: 25px; font-weight: 700; line-height: 1.15; }
.stat-foot  { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* Two-column responsive layout */
.two-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 20px;
    align-items: start;
}

/* Button rows */
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Welcome banner */
.welcome-card { background: linear-gradient(135deg, var(--brand-softer), var(--dm-surface, #fff)); }

/* Link list (portal shortcuts) */
.link-list { list-style: none; padding: 0; margin: 0 0 14px; }
.link-list li { border-bottom: 1px solid var(--line); }
.link-list li:last-child { border-bottom: none; }
.link-list a {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 13px 4px; color: var(--ink); text-decoration: none;
    font-size: 13.5px; border-radius: 8px;
}
.link-list a:hover { background: var(--brand-softer); }
.link-list a i { width: 18px; height: 18px; color: var(--brand-text); margin-top: 2px; flex: 0 0 18px; }

/* Error pages */
.public-body { background: var(--bg); }
.error-code {
    font-size: 62px; font-weight: 800; line-height: 1;
    color: var(--brand-text); letter-spacing: -2px;
}

/* Misc */
.nowrap { white-space: nowrap; }
code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px; background: var(--dm-surface-3, #F1F1F2); padding: 1px 6px; border-radius: 5px;
}
/* ==========================================================================
   ORBIT v1.1.0 — marketplace, multi-tenant portal & app chrome
   Appended to v1.0.0 rules above. Uses the same custom properties so the
   Admin → Settings → Branding override keeps working everywhere.
   ========================================================================== */

/* ---------------------------------------------------------------- helpers */
.form-section {
    margin: 0 0 22px;
    padding: 0 0 18px;
    border-bottom: 1px solid var(--line);
}
.form-section:last-of-type { border-bottom: none; padding-bottom: 0; margin-bottom: 10px; }
.form-section > h4 {
    font-size: 12px; text-transform: uppercase; letter-spacing: .8px;
    color: var(--muted); margin: 0 0 14px; font-weight: 700;
}

.section-title {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin: 26px 0 12px;
}
.section-title:first-child { margin-top: 4px; }
.section-title h3 { margin: 0; font-size: 16px; }
.section-title .muted { font-size: 12.5px; }

.tick {
    display: flex; align-items: center; gap: 8px;
    font-size: 12.5px; color: var(--muted);
    margin: 12px 0 8px; cursor: pointer; user-select: none;
}
.tick input { margin: 0; accent-color: var(--brand); }

.avatar {
    width: 34px; height: 34px; border-radius: 10px; flex: 0 0 34px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(140deg, var(--ink-grey), var(--dm-fill, var(--ink-black)));
    color: var(--brand-text); font-weight: 700; font-size: 13px; letter-spacing: .3px;
    text-transform: uppercase;
}
.avatar.lg { width: 62px; height: 62px; flex: 0 0 62px; border-radius: 18px; font-size: 22px; }
/* v3.31.0: a company's own logo sits on white, contained, never cropped. */
.avatar.co-logo { background: #fff; border: 1px solid var(--line); overflow: hidden; padding: 3px; }
.avatar.co-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* ------------------------------------------------------------ chips / row */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 999px;
    background: var(--dm-surface-3, #F1F1F2); color: var(--ink-grey);
    border: 1px solid transparent;
    font-size: 12.5px; font-weight: 600; white-space: nowrap;
    text-decoration: none; transition: .15s;
}
a.chip:hover { background: var(--brand-softer); color: var(--brand-text); }
.chip.on, .chip.active {
    background: var(--brand); color: var(--ink-black); border-color: var(--brand);
}
.chip i { width: 14px; height: 14px; }

.table-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.table-chips code { background: var(--brand-softer); color: var(--brand-text); }

/* ================================================================== STORE */
.store-hero {
    display: flex; align-items: center; gap: 20px;
    padding: 26px 28px; margin-bottom: 18px;
    border-radius: var(--card-radius);
    background:
        radial-gradient(circle at 92% 0%, rgba(91, 108, 255, .55), transparent 58%),
        var(--ink-black);
    color: #fff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .28);
}
.store-hero h2 { margin: 0 0 4px; font-size: 21px; color: #fff; }
.store-hero p { margin: 0; font-size: 13.5px; color: rgba(255, 255, 255, .78); max-width: 620px; }
/* The global "strong { color: ink-black }" rule paints the company's own
   name in near-black on this near-black panel, which read as a blank gap.
   White, and slightly brighter than the sentence around it, so the name is
   emphasis rather than a hole. */
.store-hero p strong { color: #fff; }
.store-hero-icon {
    width: 58px; height: 58px; flex: 0 0 58px; border-radius: 17px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .22);
}
.store-hero-icon i { width: 28px; height: 28px; color: #fff; }

.store-filters {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
    background: var(--dm-surface, #fff); border: 1px solid var(--line);
    border-radius: var(--card-radius); padding: 14px 16px; margin-bottom: 20px;
}
.store-search { display: flex; gap: 8px; flex: 1 1 260px; }
.store-search input {
    flex: 1; min-width: 0;
    padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px;
    font-size: 13.5px; font-family: inherit; background: var(--dm-surface-2, #FAFAFA);
}
.store-search input:focus {
    outline: none; border-color: var(--brand); background: var(--dm-surface, #fff);
    box-shadow: 0 0 0 3px var(--brand-softer);
}

/* --------------------------------------------------------- the store grid */
.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
    gap: 16px;
}
.featured-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

.store-card {
    display: flex; flex-direction: column; gap: 14px;
    background: var(--dm-surface, #fff); border: 1px solid var(--line);
    border-radius: var(--card-radius); padding: 18px;
    color: var(--ink); text-decoration: none;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
a.store-card:hover {
    transform: translateY(-3px);
    border-color: var(--brand-soft);
    box-shadow: 0 14px 32px rgba(0, 0, 0, .10);
}
.store-card.static:hover { transform: none; box-shadow: none; }
.store-card.feature {
    background: linear-gradient(150deg, var(--dm-surface, #fff) 55%, var(--brand-softer));
    border-color: var(--brand-soft);
}
.store-card-head { display: flex; align-items: flex-start; gap: 14px; }
.store-card-body { flex: 1; display: flex; flex-direction: column; }
.store-card-body h4 { margin: 0 0 3px; font-size: 15px; line-height: 1.25; }
.store-card-body p {
    margin: 0; font-size: 12.8px; color: var(--muted); line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.store-meta {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; margin-top: auto; padding-top: 12px;
    border-top: 1px solid var(--line);
    font-size: 12px; color: var(--muted);
}
.store-meta .pill { font-size: 11px; }

.store-icon {
    width: 48px; height: 48px; flex: 0 0 48px; border-radius: 13px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--brand); color: #fff;
    box-shadow: inset 0 -14px 24px rgba(0, 0, 0, .13);
}
.store-icon i { width: 23px; height: 23px; color: #fff; stroke-width: 2.1; }
.store-icon.sm { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; }
.store-icon.sm i { width: 17px; height: 17px; }
.store-icon.lg { width: 60px; height: 60px; flex: 0 0 60px; border-radius: 17px; }
.store-icon.lg i { width: 29px; height: 29px; }
.store-icon.xl { width: 84px; height: 84px; flex: 0 0 84px; border-radius: 22px; }
.store-icon.xl i { width: 40px; height: 40px; }

/* ======================================================= APP DETAIL PAGE */
.detail-hero { overflow: hidden; }
.detail-hero > .card-body { padding: 26px 28px; }
.detail-top { display: flex; align-items: flex-start; gap: 22px; flex-wrap: wrap; }
.detail-headline { flex: 1 1 320px; min-width: 0; }
.detail-headline h1 { font-size: 26px; margin: 2px 0 6px; letter-spacing: -.4px; }
.detail-tagline { margin: 0 0 12px; font-size: 15px; color: var(--muted); }
.detail-facts {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    font-size: 12.5px;
}
.detail-action {
    flex: 0 0 220px; width: 220px;
    display: flex; flex-direction: column; gap: 2px;
}
.detail-action .hint { margin: 6px 0 0; }
.detail-action form { margin: 0; }
.installed-note {
    display: flex; align-items: center; gap: 7px;
    font-size: 12px; color: var(--ok);
    margin: 10px 0 2px; justify-content: center; text-align: center;
}
.installed-note i { width: 14px; height: 14px; flex: 0 0 14px; }

.highlight-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px; margin-top: 18px;
}
.highlight { display: flex; gap: 12px; align-items: flex-start; }
.highlight strong { font-size: 13.5px; display: block; margin-bottom: 2px; }
.highlight p { margin: 0; font-size: 12.5px; line-height: 1.5; }
.highlight-icon {
    width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand-softer); color: var(--brand-text);
}
.highlight-icon i { width: 17px; height: 17px; }

.feature-list { list-style: none; margin: 0; padding: 0; }
.feature-list li {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 9px 0; font-size: 13.5px;
    border-bottom: 1px dashed var(--line);
}
.feature-list li:last-child { border-bottom: none; }
.feature-list li i {
    width: 16px; height: 16px; flex: 0 0 16px; margin-top: 3px;
    color: var(--ok); stroke-width: 3;
}

/* ==================================================== PORTAL / LAUNCHER */
.app-launcher {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
}
.launch-tile {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 20px 12px; text-align: center;
    background: var(--dm-surface, #fff); border: 1px solid var(--line);
    border-radius: var(--card-radius); color: var(--ink); text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s;
}
.launch-tile:hover {
    transform: translateY(-3px); border-color: var(--brand-soft);
    box-shadow: 0 12px 26px rgba(0, 0, 0, .10);
}
.launch-tile strong { font-size: 13px; line-height: 1.3; }
.launch-tile span { font-size: 11.5px; color: var(--muted); }
.launch-tile.add { border-style: dashed; background: var(--dm-surface-2, #FAFAFA); }
.launch-icon {
    width: 52px; height: 52px; border-radius: 15px;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand); color: #fff;
    box-shadow: inset 0 -14px 22px rgba(0, 0, 0, .13);
}
.launch-icon i { width: 25px; height: 25px; color: #fff; stroke-width: 2.1; }
.launch-icon.ghost {
    background: var(--brand-softer); color: var(--brand-text); box-shadow: none;
    border: 1px dashed var(--brand-soft);
}
.launch-icon.ghost i { color: var(--brand-text); }

.installed-card {
    background: var(--dm-surface, #fff); border: 1px solid var(--line);
    border-radius: var(--card-radius); padding: 18px;
    display: flex; flex-direction: column; gap: 14px;
}
.installed-head { display: flex; align-items: flex-start; gap: 13px; }
.installed-head h4 { margin: 0 0 3px; font-size: 15px; }
.installed-head .muted { font-size: 12.5px; }
.installed-card .btn-row { margin-top: auto; }

/* ------------------------------------------------- sidebar company chip */
.company-chip {
    display: flex; align-items: center; gap: 11px;
    margin: 4px 14px 16px; padding: 11px 12px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 12px;
}
.company-avatar {
    width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(140deg, var(--brand-2), var(--brand));
    color: var(--ink-black); font-weight: 700; font-size: 13px; text-transform: uppercase;
}
.company-meta { min-width: 0; }
.company-meta strong {
    display: block; font-size: 13px; color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.company-meta span {
    display: block; font-size: 11px; color: rgba(242, 242, 242, .55);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.app-dot {
    width: 20px; height: 20px; flex: 0 0 20px; border-radius: 6px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--brand); color: #fff;
}
.app-dot i { width: 12px; height: 12px; color: #fff; stroke-width: 2.4; }

/* ============================================ ADMIN — marketplace listings */
.listing-row { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.listing-main { flex: 1 1 320px; min-width: 0; }
.listing-main h4 { margin: 0 0 4px; font-size: 15px; }
.listing-main p { margin: 6px 0 0; font-size: 12.8px; color: var(--muted); }
.listing-actions {
    display: flex; flex-wrap: wrap; gap: 8px;
    align-items: center; justify-content: flex-end;
}
.listing-actions form { margin: 0; }

/* ============================================= APP CHROME (app_base.html) */
.app-header {
    display: flex; align-items: center; gap: 15px; flex-wrap: wrap;
    padding: 18px 20px; margin-bottom: 16px;
    border-radius: var(--card-radius);
    background: var(--dm-surface, #fff);
    border: 1px solid var(--line);
    border-left: 4px solid var(--app-color, var(--brand));
}
.app-header-icon {
    width: 46px; height: 46px; flex: 0 0 46px; border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    background: var(--app-color, var(--brand)); color: #fff;
    box-shadow: inset 0 -12px 20px rgba(0, 0, 0, .14);
}
.app-header-icon i { width: 22px; height: 22px; color: #fff; stroke-width: 2.1; }
.app-header-text { flex: 1; min-width: 0; }
.app-header-text h3 { margin: 0; font-size: 17px; }
.app-header-text span { font-size: 12.8px; color: var(--muted); }
.app-header-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.app-tabs {
    display: flex; gap: 6px; flex-wrap: wrap;
    margin-bottom: 18px; padding-bottom: 2px;
}
.app-tab {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 14px; border-radius: 9px;
    font-size: 13px; font-weight: 600;
    color: var(--muted); text-decoration: none;
    border: 1px solid transparent; transition: .15s;
}
.app-tab:hover { background: var(--dm-surface-3, #F1F1F2); color: var(--ink); }
.app-tab.active {
    background: var(--dm-surface, #fff); color: var(--app-color, var(--brand-text));
    border-color: var(--line);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .07);
}
.app-tab i { width: 15px; height: 15px; }

/* ================================================================ CRM app */
.note-item {
    padding: 12px 0; border-bottom: 1px solid var(--line);
    font-size: 13.5px;
}
.note-item:last-child { border-bottom: none; }
.note-item .muted { font-size: 11.5px; display: block; margin-top: 4px; }

.pipeline-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px; align-items: start;
}
.pipeline-col {
    background: var(--dm-surface-3, #F4F4F5); border: 1px solid var(--line);
    border-radius: 12px; overflow: hidden;
}
.pipeline-col-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; padding: 11px 13px;
    background: var(--dm-surface, #fff); border-bottom: 1px solid var(--line);
}
.pipeline-col-head strong { font-size: 13px; }
.pipeline-col-head span { font-size: 11.5px; color: var(--muted); }
.pipeline-col-body {
    padding: 11px; display: flex; flex-direction: column; gap: 10px;
    min-height: 90px;
}
.deal-card {
    background: var(--dm-surface, #fff); border: 1px solid var(--line);
    border-radius: 10px; padding: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .07);
}
.deal-card a { color: var(--ink); font-weight: 600; font-size: 13.5px; }
.deal-card a:hover { color: var(--brand-text); }
.deal-value {
    display: block; margin: 5px 0 8px;
    font-size: 15px; font-weight: 700; color: var(--ok);
}
.deal-move { display: flex; gap: 6px; margin: 0; }
.deal-move select {
    flex: 1; min-width: 0; padding: 5px 7px; font-size: 11.5px;
    border: 1px solid var(--line); border-radius: 7px;
    font-family: inherit; background: var(--dm-surface-2, #FAFAFA);
}
.pipeline-empty {
    text-align: center; font-size: 12px; color: #9aa3b2;
    padding: 16px 6px; border: 1px dashed #cfd6e2; border-radius: 9px;
}

/* ========================================================== Analytics app */
.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
    gap: 14px;
}
.metric-card {
    background: var(--dm-surface, #fff); border: 1px solid var(--line);
    border-radius: var(--card-radius); padding: 17px;
}
.metric-card h4 {
    margin: 0 0 6px; font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .6px; color: var(--muted);
}
.metric-value {
    font-size: 27px; font-weight: 800; letter-spacing: -1px;
    color: var(--ink); line-height: 1.15;
}
.metric-card .muted { font-size: 12px; }
.sparkline {
    width: 100%; height: 44px; margin-top: 10px; display: block;
    overflow: visible;
}
.sparkline polyline, .sparkline path {
    fill: none; stroke: var(--brand); stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round;
}

/* =========================================================== Helpdesk app */
.reply-item {
    padding: 13px 15px; margin-bottom: 11px;
    background: #f8fafc; border: 1px solid var(--line);
    border-left: 3px solid var(--brand); border-radius: 10px;
    font-size: 13.5px;
}
.reply-item:last-child { margin-bottom: 0; }
.reply-item .muted { font-size: 11.5px; }
.reply-item p { margin: 7px 0 0; white-space: pre-wrap; }
.reply-item.internal {
    background: #fffbeb; border-color: #fde68a; border-left-color: var(--warn);
}

.pill.prio-urgent { background: #fee2e2; color: #b91c1c; }
.pill.prio-high   { background: #ffedd5; color: #c2410c; }
.pill.prio-normal { background: var(--dm-surface-3, #F1F1F2); color: var(--ink-grey); }
.pill.prio-low    { background: var(--dm-surface-3, #F1F1F2); color: var(--muted); }

.pill.state-open        { background: #dbeafe; color: #1d4ed8; }
.pill.state-in_progress { background: #fef3c7; color: #b45309; }
.pill.state-waiting     { background: #ede9fe; color: #6d28d9; }
.pill.state-resolved    { background: #dcfce7; color: #15803d; }

tr.overdue { background: #fff7f7; }
tr.overdue td:first-child { box-shadow: inset 3px 0 0 var(--crit); }
.overdue .mono, td.overdue { color: var(--crit); font-weight: 600; }

/* ====================================================== PUBLIC LANDING */
.land-nav {
    position: sticky; top: 0; z-index: 40;
    background: rgba(0, 0, 0, .92);
    backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}
/* Generic centred container. Only the nav and footer lay their children out
   in a row -- the hero and content sections must stay stacked. */
.land-inner { max-width: 1120px; margin: 0 auto; padding: 14px 24px; }
.land-nav .land-inner,
.land-foot .land-inner {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.land-logo {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; flex: 0 0 32px; border-radius: 9px;
    background: linear-gradient(140deg, var(--brand-2), var(--brand));
    color: var(--ink-black); font-size: 16px; line-height: 1;
}
.land-logo img { width: 100%; height: 100%; border-radius: 9px; object-fit: cover; }
.land-nav .flex { display: flex; align-items: center; gap: 10px; }
.land-nav strong { color: #fff; font-weight: 800; letter-spacing: -.3px; font-size: 16px; }

.land-hero {
    background:
        radial-gradient(circle at 50% -10%, rgba(91, 108, 255, .42), transparent 55%),
        radial-gradient(circle at 88% 105%, rgba(91, 108, 255, .20), transparent 45%),
        var(--ink-black);
    color: #fff; padding: 84px 24px 92px; text-align: center;
}
.land-hero h1 {
    font-size: 44px; line-height: 1.1; letter-spacing: -1.4px;
    margin: 0 auto 16px; max-width: 780px; color: #fff;
}
.land-hero p {
    font-size: 17px; color: rgba(255, 255, 255, .8);
    max-width: 620px; margin: 0 auto 28px; line-height: 1.6;
}
.land-hero .btn-row { justify-content: center; }
.land-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px; margin-bottom: 20px; border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
    font-size: 12px; font-weight: 700; letter-spacing: .7px;
    text-transform: uppercase; color: #fff;
}

.land-section { padding: 66px 24px; }
.land-section > * { max-width: 1120px; margin-left: auto; margin-right: auto; }
.land-section.alt { background: var(--dm-surface, #fff); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.land-h2 {
    font-size: 29px; letter-spacing: -.7px; text-align: center; margin: 0 0 10px;
}
.land-sub {
    text-align: center; color: var(--muted); font-size: 15px;
    max-width: 580px; margin: 0 auto 38px; line-height: 1.6;
}

.land-steps {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px;
}
.land-step {
    background: var(--dm-surface, #fff); border: 1px solid var(--line);
    border-radius: var(--card-radius); padding: 26px 22px;
}
.land-step h3 { font-size: 16.5px; margin: 14px 0 8px; }
.land-step p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.step-num {
    width: 38px; height: 38px; border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(140deg, var(--brand-2), var(--brand));
    color: var(--ink-black); font-weight: 800; font-size: 15px;
}

.land-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(238px, 1fr)); gap: 20px;
}
.land-feature { text-align: left; }
.land-feature h4 { font-size: 15px; margin: 13px 0 7px; }
.land-feature p { margin: 0; color: var(--muted); font-size: 13.2px; line-height: 1.6; }
.land-ficon {
    width: 44px; height: 44px; border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand-softer); color: var(--brand-text);
}
.land-ficon i { width: 21px; height: 21px; }

.land-foot {
    background: var(--dm-fill, var(--ink-black)); color: rgba(242, 242, 242, .6);
    padding: 34px 24px; font-size: 12.8px;
}
.land-foot a { color: rgba(242, 242, 242, .85); }
.land-foot a:hover { color: #fff; }
.land-foot .land-inner { padding: 0; flex-wrap: wrap; }

/* ============================================================ RESPONSIVE */
@media (max-width: 900px) {
    .detail-action { flex: 1 1 100%; width: 100%; }
    .detail-headline h1 { font-size: 22px; }
    .store-hero { flex-direction: column; align-items: flex-start; text-align: left; }
    .land-hero h1 { font-size: 33px; }
    .land-hero { padding: 60px 20px 66px; }
    .land-section { padding: 48px 20px; }
    .listing-actions { justify-content: flex-start; width: 100%; }
}
@media (max-width: 560px) {
    .store-grid, .featured-grid { grid-template-columns: 1fr; }
    .app-launcher { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
    .store-icon.xl { width: 64px; height: 64px; flex: 0 0 64px; border-radius: 18px; }
    .store-icon.xl i { width: 30px; height: 30px; }
    .land-hero h1 { font-size: 27px; }
}

/* ================================================================= PRINT */
@media print {
    .land-nav, .app-tabs, .detail-action, .store-filters { display: none !important; }
    .store-hero, .land-hero { background: #fff !important; color: #000 !important; }
    .store-card, .metric-card, .installed-card { break-inside: avoid; }
}

/* ==========================================================================
   ORBIT BRAND LAYER — v1.2.0
   Applied per Orbit Internal Brand Guidelines V2.

   Palette hierarchy of use (ORBIT Brand Guidelines v1.0):
     Field  #F1F3F5   ground / primary background
     Paper  #FAFBFC   raised panels
     Ink    #14181F   primary text — 16.0:1
     Dust   #636B76   secondary text ONLY — 4.9:1
     Halo   #D8DDE3   rules and dividers — never type
     Accent #5B6CFF (Orbit Blue) FILL ONLY. 4.1:1 on Field, so it fails as
     normal-size text.
                      Orange fill + Core Ink text = 6.9:1.

   Typography:
     Display     Schibsted Grotesk SemiBold, SENTENCE case, tracked -0.04em
     Body        IBM Plex Sans Regular, 16px, leading never below 160%
     Label       IBM Plex Sans SemiBold, caps, letter-spaced 0.2em
                 (the ONLY uppercase style in the system)
     Button      IBM Plex Sans SemiBold, sentence case, fully rounded
     Data        IBM Plex Mono Regular — versions, slugs, IDs, totals
   ========================================================================== */

/* --- Contrast: white on Orbit Orange is only 2.3:1 and fails WCAG.
       Black on Orbit Orange is 9.9:1 and is the brand's signature pairing.
       Every solid-orange surface therefore carries black glyphs. ---------- */
.store-icon,
.launch-icon,
.app-dot,
.stat .icon.indigo,
.stat .icon.sky { color: var(--ink-black); }
.store-icon i,
.launch-icon i,
.app-dot i { color: var(--ink-black); }
.app-header-icon { color: var(--ink-black); }
.app-header-icon i { color: var(--ink-black); }
.meter > span, .progress > span { background: var(--brand); }

/* --- Buttons are IBM Plex Sans SemiBold, sentence case (never shouted). -- */
.btn { font-family: var(--font-body); text-transform: none; letter-spacing: 0; }

/* --- These elements are data, labels or UI furniture rather than
       headlines, so they use the body face rather than the display one. --- */
.pill, .chip, .app-tab, .badge-dot, .nav-badge,
.store-card-body h4, .installed-head h4, .listing-main h4,
.land-feature h4, .metric-card h4, .stat-value, .metric-value,
.deal-card a, .launch-tile strong, .company-meta strong,
.spec-list dd, code, .mono, .error-code {
    font-family: var(--font-body);
}
.store-card-body h4, .installed-head h4, .listing-main h4,
.land-feature h4, .deal-card a {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 700;
    color: var(--ink-black);
}
/* Numeric displays stay tabular so columns line up. */
.stat-value, .metric-value, .error-code, .mono {
    font-variant-numeric: tabular-nums;
}

/* --- Headline scale. Brand spec: 36px web headline, 100% leading. -------- */
.land-hero h1 {
    font-family: var(--font-head);
    font-weight: 600;
    text-transform: none;
    letter-spacing: -.04em;
    line-height: 1.1;
}
.land-h2 {
    font-family: var(--font-head);
    font-weight: 600;
    text-transform: none;
    letter-spacing: -.04em;
    line-height: 1.1;
}
.detail-headline h1 { letter-spacing: -.2px; line-height: 1.02; }
.store-hero h2 { letter-spacing: .2px; }

/* --- Subheading: IBM Plex Sans SemiBold, sentence case. ---------------- */
.land-sub, .detail-tagline, .store-hero p {
    font-family: var(--font-body);
    text-transform: none;
}

/* --- Links: orange, used sparingly, underlined on hover for clarity. ---- */
.content a:not(.btn):not(.chip):not(.store-card):not(.launch-tile):not(.app-tab):not(.nav-link):hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* --- Focus ring: Orbit Blue, visible on both white and black surfaces.
       v3.45.0 (brief section 13): rgba(91,108,255,.55). ------------------ */
:focus-visible {
    outline: 2px solid rgba(91, 108, 255, .55);
    outline-offset: 2px;
    border-radius: 4px;
}

/* --- Rounded abstract shapes + subtle gradients are core to the brand's
       visual style, so cards get a slightly softer, deeper elevation. ---- */
.card, .store-card, .installed-card, .metric-card, .land-step, .stat {
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 6px 18px rgba(0, 0, 0, .045);
}
.card { border: 1px solid var(--line); }

/* --- Selection uses the accent. ---------------------------------------- */
::selection { background: var(--brand); color: var(--ink-black); }

/* --- Scrollbar inside the black sidebar. -------------------------------- */
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .14); border-radius: 8px;
}
.sidebar::-webkit-scrollbar-track { background: transparent; }

/* --- Topbar gets a hairline so the white content area reads as a
       distinct plane from the white topbar. ---------------------------- */
.topbar { border-bottom: 1px solid var(--line); }

/* =========================================================================
   v1.3.0 — Cloud operations (cluster, autoscale, backups, security)
   ========================================================================= */

/* --- node cards -------------------------------------------------------- */
.node-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 16px;
}
.node {
    border: 1px solid var(--line);
    border-radius: var(--card-radius);
    background: var(--dm-surface, #fff);
    padding: 16px 18px;
    position: relative;
    overflow: hidden;
    transition: border-color .16s ease, box-shadow .16s ease;
}
.node:hover { border-color: var(--brand); box-shadow: 0 6px 18px rgba(0,0,0,.07); }
.node::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
    background: var(--line);
}
.node.is-primary::before { background: var(--brand); }
.node.is-healthy::before { background: var(--ok); }
.node.is-down::before    { background: var(--crit); }
.node.is-draining::before{ background: var(--warn); }

.node-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 10px; margin-bottom: 4px;
}
.node-name {
    font-family: var(--font-head); font-weight: 600; text-transform: none;
    letter-spacing: .3px; font-size: 15px; color: var(--ink-black);
    word-break: break-all; line-height: 1.25;
}
.node-url {
    font-size: 12px; color: var(--muted); text-decoration: none;
    word-break: break-all; display: inline-block; margin-bottom: 12px;
}
.node-url:hover { color: var(--brand-text); text-decoration: underline; }

.node-metrics {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 10px; margin: 12px 0 14px;
}
.node-metric .k {
    font-size: 10px; text-transform: uppercase; letter-spacing: .6px;
    color: var(--muted); font-weight: 700;
}
.node-metric .v {
    font-family: var(--font-head); font-size: 19px; font-weight: 600;
    color: var(--ink-black); line-height: 1.2;
}
.node-metric .v.warn { color: var(--warn); }
.node-metric .v.crit { color: var(--crit); }
.node-foot {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; border-top: 1px solid var(--line); padding-top: 10px;
    font-size: 12px; color: var(--muted);
}

/* --- rule cards -------------------------------------------------------- */
.rule {
    border: 1px solid var(--line);
    border-left: 4px solid var(--line);
    border-radius: var(--card-radius);
    background: var(--dm-surface, #fff); padding: 16px 18px; margin-bottom: 14px;
}
.rule.state-ok        { border-left-color: var(--ok); }
.rule.state-breaching { border-left-color: var(--warn); background: #FFFBF5; }
.rule.state-triggered { border-left-color: var(--crit); background: #FEF6F5; }
.rule.state-cooling   { border-left-color: #6B7280; }
.rule.is-off { opacity: .62; border-left-color: var(--line); background: var(--dm-surface-2, #FAFAFA); }

.rule-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
}
.rule-name {
    font-family: var(--font-head); text-transform: none; font-weight: 600;
    font-size: 15px; letter-spacing: .3px; color: var(--ink-black);
}
.rule-summary {
    font-size: 13px; color: var(--ink-grey); margin-top: 5px; line-height: 1.55;
    max-width: 74ch;
}
.rule-meta {
    display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px;
    padding-top: 11px; border-top: 1px dashed var(--line);
    font-size: 12px; color: var(--muted);
}
.rule-meta b { color: var(--ink-black); font-weight: 600; }
.rule-actions { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }

/* --- the rule builder -------------------------------------------------- */
.builder {
    background: var(--bg); border: 1px solid var(--line);
    border-radius: var(--card-radius); padding: 18px;
}
.builder-sentence {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    font-size: 14px; color: var(--ink-black); line-height: 2.5;
}
.builder-sentence .word { color: var(--ink-grey); font-weight: 500; }
.builder-sentence select,
.builder-sentence input {
    padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px;
    font-family: var(--font-body); font-size: 13px; background: var(--dm-surface, #fff);
    color: var(--ink-black);
}
.builder-sentence select:focus,
.builder-sentence input:focus {
    outline: none; border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-softer);
}
.builder-sentence input[type="number"] { width: 84px; }
.builder-preview {
    margin-top: 14px; padding: 12px 14px; border-radius: 10px;
    background: var(--dm-fill, var(--ink-black)); color: #fff; font-size: 13px;
    line-height: 1.6; border-left: 4px solid var(--brand);
}
.builder-preview b { color: var(--brand-2, #FF9D4D); font-weight: 600; }

/* --- timeline ---------------------------------------------------------- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before {
    content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px;
    width: 2px; background: var(--line);
}
.tl-item { position: relative; padding: 0 0 20px 4px; }
.tl-item::before {
    content: ""; position: absolute; left: -23px; top: 4px;
    width: 11px; height: 11px; border-radius: 50%;
    background: var(--dm-surface, #fff); border: 2px solid var(--muted);
}
.tl-item.ok::before      { border-color: var(--ok); background: var(--ok); }
.tl-item.blocked::before { border-color: var(--warn); background: var(--warn); }
.tl-item.error::before   { border-color: var(--crit); background: var(--crit); }
.tl-when {
    font-size: 11px; color: var(--muted); text-transform: uppercase;
    letter-spacing: .5px; font-weight: 700;
}
.tl-what { font-size: 14px; color: var(--ink-black); margin: 2px 0 3px; font-weight: 500; }
.tl-detail { font-size: 12.5px; color: var(--ink-grey); line-height: 1.55; }

/* --- sparkline / uptime bars ------------------------------------------- */
.spark {
    display: flex; align-items: flex-end; gap: 2px; height: 64px;
    padding: 6px 0; overflow: hidden;
}
.spark i {
    flex: 1 1 auto; min-width: 2px; background: var(--brand);
    border-radius: 2px 2px 0 0; opacity: .82; display: block;
}
.spark i.hot { background: var(--crit); opacity: 1; }
.spark i.warm { background: var(--warn); }

.uptime-bar { display: flex; gap: 2px; height: 34px; align-items: stretch; }
.uptime-bar i {
    flex: 1 1 auto; min-width: 3px; border-radius: 2px; background: var(--ok);
    display: block;
}
.uptime-bar i.degraded { background: var(--warn); }
.uptime-bar i.down     { background: var(--crit); }
.uptime-bar i.none     { background: var(--line); }

/* --- misc -------------------------------------------------------------- */
.kv { display: grid; grid-template-columns: 190px 1fr; gap: 9px 16px; font-size: 13.5px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; color: var(--ink-black); word-break: break-word; }

.danger-zone {
    border: 1px solid #F0C4C0; border-radius: var(--card-radius);
    background: #FEF7F6; padding: 16px 18px;
}
.danger-zone h4 {
    font-family: var(--font-head); text-transform: none;
    color: var(--crit); font-size: 14px; margin: 0 0 6px;
}

.checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.check {
    display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px;
    border: 1px solid var(--line); border-radius: 10px; background: var(--dm-surface, #fff);
    cursor: pointer; transition: border-color .14s ease, background .14s ease;
}
.check:hover { border-color: var(--brand); background: var(--brand-softer); }
.check input { margin-top: 3px; accent-color: var(--brand); flex: none; }
.check .t { font-size: 13.5px; color: var(--ink-black); font-weight: 600; }
.check .d { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.45; }

.mode-picker { display: grid; gap: 10px; }
.mode-opt {
    display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px;
    border: 2px solid var(--line); border-radius: 11px; cursor: pointer;
    background: var(--dm-surface, #fff); transition: all .14s ease;
}
.mode-opt:hover { border-color: var(--brand); }
.mode-opt input { margin-top: 3px; accent-color: var(--brand); flex: none; }
.mode-opt.sel { border-color: var(--brand); background: var(--brand-softer); }
.mode-opt .t {
    font-family: var(--font-head); text-transform: none; font-size: 13px;
    font-weight: 600; letter-spacing: .4px; color: var(--ink-black);
}
.mode-opt .d { font-size: 12.5px; color: var(--ink-grey); margin-top: 3px; line-height: 1.5; }

.hint { font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.5; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }

.sim-banner {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 12px 16px; border-radius: 11px; margin-bottom: 18px;
    background: var(--dm-fill, var(--ink-black)); color: #fff; font-size: 13.5px;
}
.sim-banner .tag {
    background: var(--brand); color: #000; font-weight: 700; font-size: 11px;
    padding: 3px 9px; border-radius: 20px; text-transform: uppercase;
    letter-spacing: .2em; font-family: var(--font-body);
}
.sim-banner .grow { flex: 1 1 auto; min-width: 200px; }

@media (max-width: 720px) {
    .kv { grid-template-columns: 1fr; gap: 3px 0; }
    .kv dt { margin-top: 9px; }
    .builder-sentence { line-height: 2.1; }
}

/* ==========================================================================
   v2.4.0 — SETTINGS HUB
   Settings is now a section, not a page: a second-level menu on the left and
   the chosen panel on the right. The reference design was a blue CRM; this is
   the same *structure* rendered in the Orbit palette — black rail, orange as
   the accent that marks position, white as the working surface.
   ========================================================================== */
.set-shell {
    display: grid;
    grid-template-columns: 252px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}
/* v3.31.0: the settings menu moved into the dark sidebar; the panel is
   the whole width now. */
.set-shell.set-shell-full { grid-template-columns: minmax(0, 1fr); }

/* v3.31.0: the Settings menu, rendered INSIDE the dark sidebar in place of
   the platform menu. Same .nav-link look as the main menu, so moving in and
   out of Settings reads as one menu changing, not a second one appearing. */
.settings-side { padding-top: 6px; }
.settings-side .nav-back {
    color: rgba(242, 242, 242, .78); font-size: 12.5px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    margin-bottom: 6px; padding-top: 9px; padding-bottom: 11px;
}
.settings-side .nav-back:hover { color: #fff; }
.settings-side-head {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 20px 8px; color: #fff;
    font-family: var(--font-head); font-weight: 700; font-size: 15px;
}
.settings-side-head i { width: 17px; height: 17px; color: var(--brand); }
.settings-side .nav-title { padding-top: 14px; }
.settings-side .nav-link { padding-top: 8px; padding-bottom: 8px; }
.settings-side .nav-caret { margin-left: auto; width: 14px; height: 14px; flex: 0 0 14px; opacity: .5; }
.settings-side .nav-children { padding: 2px 0 6px; }
.settings-side .nav-child {
    padding: 6px 20px 6px 49px; font-size: 12.8px;
    color: rgba(242, 242, 242, .55);
}
.settings-side .nav-child.active {
    background: none; border-left-color: transparent;
    color: var(--brand); font-weight: 600;
}

/* ------------------------------------------------------------- sub-menu -- */
.set-nav {
    background: var(--dm-surface, #fff);
    border: 1px solid var(--line);
    border-radius: var(--card-radius);
    padding: 8px;
    /* Sticks while a long panel scrolls, so you can always jump sideways
       without scrolling back to the top first. */
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
}
.set-nav-group { padding: 2px 0 6px; }
.set-nav-group + .set-nav-group {
    border-top: 1px solid var(--line);
    margin-top: 6px;
    padding-top: 10px;
}
.set-nav-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px 8px;
    font-family: var(--font-body);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .2em;
    font-size: 11px;
    color: var(--muted);
}
.set-nav-title i { width: 13px; height: 13px; }

.set-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 11px;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ink-grey);
    /* The 2px bar is transparent, not absent, so nothing shifts on select. */
    border-left: 2px solid transparent;
    margin-bottom: 1px;
}
.set-nav a i { width: 15px; height: 15px; flex: 0 0 15px; color: var(--muted); }
.set-nav a:hover { background: var(--bg); color: var(--ink-black); }
.set-nav a:hover i { color: var(--ink-grey); }
.set-nav a.active {
    background: var(--brand-softer);
    border-left-color: var(--brand);
    color: var(--ink-black);
    font-weight: 700;
}
.set-nav a.active i { color: var(--brand-text); }

/* --------------------------------------------------------------- panel -- */
.set-panel {
    background: var(--dm-surface, #fff);
    border: 1px solid var(--line);
    border-radius: var(--card-radius);
    overflow: hidden;
    min-width: 0;
}
.set-panel-head {
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}
.set-panel-head h3 { margin: 0; }
.set-panel-head .muted { margin: 4px 0 0; font-size: 12.5px; }
.set-panel-body { padding: 20px; }
.set-panel-foot {
    padding: 14px 20px;
    border-top: 1px solid var(--line);
    background: var(--bg);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* A settings row: label on the left, control on the right. Reads as a list
   of decisions rather than a wall of inputs. */
.set-row {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px dashed var(--line);
    align-items: start;
}
.set-row:last-child { border-bottom: 0; }
.set-row > label,
.set-row .set-label {
    margin: 7px 0 0;
    font-weight: 600;
    font-size: 13px;
    color: var(--ink-black);
}
.set-row .set-label small {
    display: block;
    font-weight: 400;
    font-size: 12px;
    color: var(--muted);
    margin-top: 3px;
    line-height: 1.45;
}
.set-row .field { margin-bottom: 0; }
.set-control { min-width: 0; }
/* .hint is inline elsewhere in the app, which put it alongside a max-width
   input instead of under it. Inside a settings row it always sits below. */
.set-control .hint { display: block; max-width: 560px; }
.set-control > .hint:first-child { margin-top: 0; }
.set-narrow { max-width: 300px; }
.set-mid { max-width: 460px; }
/* Stripe keys and price IDs are long opaque strings. Truncating them mid-key
   is how you end up pasting half a secret, so these get the full width. */
.set-wide { max-width: 100%; width: 100%; }

/* v2.7.0. The payments page carries four separate decisions (connection,
   prices, tax, failed payments) and running them together as one column made
   the dangerous ones easy to change by accident. This heading divides them. */
.set-group-head {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .2em;
    color: var(--muted);
    margin: 26px 0 0;
    padding: 0 0 8px;
    border-bottom: 1px solid var(--line);
}
.set-group-head:first-child { margin-top: 0; }
/* The row that follows a group heading already has the heading's rule above
   it, so it must not draw a second line straight underneath. */
.set-group-head + .set-row { padding-top: 12px; }

/* v2.9.0. A price on a store tile. Brand orange rather than the grey of
   the category chips, because on a tile full of metadata the one thing that
   costs money should not look like metadata. */
.pill.price {
    background: var(--brand-softer, #FDF0E3);
    color: var(--brand-dark, #C2610A);
}

/* The price above the Install button. Deliberately the largest thing in
   that column: a customer should not be able to click Install without
   having seen the amount. */
.price-box {
    text-align: center;
    padding: 14px 12px;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--dm-surface-2, #FAFAFA);
}
.price-box .price-amount {
    display: block;
    font-family: var(--font-head);
    font-size: 26px;
    font-weight: 700;
    color: var(--ink-black);
    line-height: 1.15;
}
.price-box .price-per {
    display: block;
    font-size: 12.5px;
    color: var(--muted);
    margin-top: 2px;
}
.price-box .hint { display: block; margin-top: 8px; text-align: center; }
.price-box.included .price-amount { font-size: 20px; color: var(--ok, #15803d); }

/* What an existing install actually costs them. */
.price-note {
    margin: 10px 0 12px;
    padding: 10px 12px;
    border-radius: 9px;
    background: var(--dm-surface-2, #FAFAFA);
    font-size: 13px;
    color: var(--ink-grey);
}
.price-note .hint { display: block; margin-top: 5px; }

/* v2.9.0. One installed app on the company page: who they are, what they
   pay, and the controls to change it. The controls sit on their own line so
   a mis-aimed click cannot hit "Free for them". */
.app-charge-row {
    padding: 14px 0;
    border-bottom: 1px dashed var(--line);
}
.app-charge-row:last-of-type { border-bottom: 0; }
.app-charge-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 10px 0 0 44px;
}
.app-charge-form input[type="number"] { max-width: 110px; padding-left: 25px; }
@media (max-width: 700px) {
    .app-charge-form { margin-left: 0; }
}

/* v2.9.0. App pricing: three tier prices per app, side by side, each with
   its own little label. A settings row per tier per app would have run to
   dozens of rows on one page. Collapses to a single column on a phone. */
.tier-prices {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    max-width: 560px;
}
.tier-price > span {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--muted);
    margin-bottom: 5px;
}
/* The dollar sign is part of the control, not the value, so the operator
   never has to wonder whether to type it (and cents are never implied). */
.tier-price .money-wrap { position: relative; }
.tier-price .money-wrap::before {
    content: "$";
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: var(--muted);
    pointer-events: none;
}
.tier-price input { padding-left: 25px; width: 100%; }
@media (max-width: 700px) {
    .tier-prices { grid-template-columns: minmax(0, 1fr); }
}

/* A priced app's row is the one an operator can cost a customer money with,
   so when charging is on the row is tinted rather than looking identical to
   an included one. */
.app-price-row { padding: 16px 0; border-bottom: 1px dashed var(--line); }
.app-price-row:last-of-type { border-bottom: 0; }
.app-price-head { display: flex; align-items: center; gap: 12px; }
.app-price-head .store-icon { flex: 0 0 auto; }
.app-price-body { margin: 12px 0 0 52px; }
@media (max-width: 700px) {
    .app-price-body { margin-left: 0; }
}

/* Several related on/off toggles that belong on one line together, rather
   than one settings row per checkbox. */
.check-inline {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 18px 8px 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-black);
    cursor: pointer;
}
.check-inline input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--brand);
    cursor: pointer;
}
/* Inline validation text, e.g. a rejected ABN. */
.err { color: #b91c1c; }

.set-section-title {
    font-family: var(--font-body);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .2em;
    font-size: 12px;
    color: var(--muted);
    margin: 22px 0 2px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}
.set-section-title:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

/* ------------------------------------------------------ landing tiles -- */
.set-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 12px;
}
.set-tile {
    display: block;
    padding: 14px 15px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--dm-surface, #fff);
    color: var(--ink-grey);
}
.set-tile:hover {
    border-color: var(--brand);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
    color: var(--ink-grey);
}
.set-tile .set-tile-top {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 6px;
}
.set-tile i { width: 16px; height: 16px; color: var(--brand-text); flex: 0 0 16px; }
.set-tile strong { font-size: 13.5px; }
.set-tile p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* ---------------------------------------------------------- menu editor -- */
.menu-editor { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.menu-row {
    display: grid;
    grid-template-columns: 30px 1fr 92px 110px;
    gap: 12px;
    align-items: center;
    padding: 11px 14px;
    border-bottom: 1px solid var(--line);
    background: var(--dm-surface, #fff);
}
.menu-row:last-child { border-bottom: 0; }
.menu-row.is-hidden { background: var(--bg); }
.menu-row.is-hidden .menu-name { color: var(--muted); text-decoration: line-through; }
.menu-row .menu-name { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 13.5px; }
.menu-row .menu-name i { width: 15px; height: 15px; color: var(--muted); }
.menu-row input[type=number] { width: 100%; padding: 7px 9px; }
.menu-grip { color: var(--line); text-align: center; }
.menu-head {
    display: grid;
    grid-template-columns: 30px 1fr 92px 110px;
    gap: 12px;
    padding: 9px 14px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--muted);
}

/* ------------------------------------------------------------- toggle --- */
.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track {
    width: 40px; height: 22px; border-radius: 999px;
    background: #D4D4D8; position: relative; transition: background .15s ease;
    flex: 0 0 40px;
}
.switch .track::after {
    content: ""; position: absolute; top: 3px; left: 3px;
    width: 16px; height: 16px; border-radius: 50%; background: #fff;
    transition: transform .15s ease; box-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px var(--brand-softer); }
/* A locked-on switch must still read as ON. At .5 it looked greyed out, i.e.
   exactly like "off" — the opposite of what it means. */
.switch input:disabled + .track { opacity: .75; cursor: not-allowed; }
.switch .switch-text { font-size: 13px; color: var(--ink-grey); }

/* ------------------------------------------------------ email templates -- */
.tpl-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 18px; align-items: start; }
.tpl-list { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.tpl-list a {
    display: block; padding: 10px 13px; font-size: 13px; color: var(--ink-grey);
    border-bottom: 1px solid var(--line); border-left: 2px solid transparent;
}
.tpl-list a:last-child { border-bottom: 0; }
.tpl-list a:hover { background: var(--bg); }
.tpl-list a.active {
    background: var(--brand-softer); border-left-color: var(--brand);
    font-weight: 700; color: var(--ink-black);
}
.tpl-list a small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; }
.token {
    display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11.5px; background: var(--bg); border: 1px solid var(--line);
    border-radius: 6px; padding: 2px 7px; margin: 0 5px 5px 0; color: var(--ink-grey);
    cursor: pointer;
}
.token:hover { border-color: var(--brand); color: var(--brand-text); }
textarea.tpl-body { min-height: 260px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.6; }

/* --------------------------------------------------------------- mobile -- */
@media (max-width: 900px) {
    .set-shell { grid-template-columns: 1fr; }
    .set-nav { position: static; max-height: none; }
    .set-row { grid-template-columns: 1fr; gap: 6px; }
    .set-row > label, .set-row .set-label { margin-top: 0; }
    .tpl-layout { grid-template-columns: 1fr; }
    .menu-row, .menu-head { grid-template-columns: 24px 1fr 70px 90px; gap: 8px; }
}

/* ------------------------------------------------- v2.5.0 email settings -- */
/* The small circled "i" beside a label. `title` carries the explanation, so
   this stays a hint rather than another paragraph competing with the field. */
.info-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    margin-left: 4px;
    border-radius: 50%;
    background: var(--muted);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    font-style: normal;
    line-height: 1;
    cursor: help;
    vertical-align: 1px;
    user-select: none;
}
.info-dot:hover { background: var(--dm-fill, var(--ink-black)); }

/* ------------------------------------------------------- v2.5.0 code editor */
/* A transparent textarea sits exactly on top of a highlighted <pre>. Every
   metric that affects glyph position MUST be identical on both, or the
   caret drifts away from the text as you type. That is why the font stack,
   size, line-height, padding, letter-spacing and tab-size are declared once
   here and inherited by both layers. */
.ce-wrap {
    display: flex;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: var(--dm-surface-2, #fbfbfc);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    line-height: 1.65;
    letter-spacing: 0;
    tab-size: 2;
}
.ce-wrap:focus-within { border-color: var(--brand); }

.ce-gutter {
    flex: 0 0 auto;
    padding: 12px 8px 12px 12px;
    text-align: right;
    color: #a1a1aa;
    background: var(--dm-surface-3, #f4f4f5);
    border-right: 1px solid var(--line);
    user-select: none;
    white-space: pre;
    overflow: hidden;
    font: inherit;
    line-height: inherit;
}

.ce-scroller { position: relative; flex: 1 1 auto; min-width: 0; }

.ce-highlight,
.ce-input {
    margin: 0;
    padding: 12px;
    border: 0;
    font: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    tab-size: inherit;
    white-space: pre;
    word-wrap: normal;
    overflow-wrap: normal;
}

.ce-highlight {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    color: #18181b;
    will-change: transform;
}

.ce-input {
    position: relative;
    display: block;
    width: 100%;
    min-height: 340px;
    resize: vertical;
    background: transparent;
    color: transparent;      /* the <pre> underneath supplies the colour */
    caret-color: #18181b;
    overflow: auto;
    outline: none;
}
.ce-input::selection { background: rgba(37, 99, 235, .22); }

/* Token colours. Muted on purpose — this is a settings page, not an IDE. */
.ce-tag     { color: #7c3aed; }
.ce-attr    { color: #2563eb; }
.ce-string  { color: #15803d; }
.ce-comment { color: #9ca3af; font-style: italic; }
.ce-punct   { color: #6b7280; }
.ce-token   {
    color: #b45309;
    background: #fef3c7;
    border-radius: 3px;
    font-weight: 600;
}

/* --------------------------------------------------------- editor tabs -- */
.ce-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: -1px;
    position: relative;
    z-index: 1;
}
.ce-tab {
    padding: 7px 14px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--muted);
    background: var(--dm-surface-3, #f4f4f5);
    border: 1px solid var(--line);
    border-bottom-color: transparent;
    border-radius: 7px 7px 0 0;
    cursor: pointer;
}
.ce-tab:hover { color: var(--ink-black); }
.ce-tab.active {
    color: var(--ink-black);
    background: var(--dm-surface-2, #fbfbfc);
}
.ce-pane { display: none; }
.ce-pane.active { display: block; }
.ce-pane .ce-wrap { border-radius: 0 8px 8px 8px; }

.ce-preview {
    width: 100%;
    min-height: 340px;
    border: 1px solid var(--line);
    border-radius: 0 8px 8px 8px;
    background: var(--dm-surface, #fff);
}

.ce-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 10px 0 0;
}
.ce-note {
    font-size: 12px;
    color: var(--muted);
    margin: 8px 0 0;
    line-height: 1.5;
}

@media (max-width: 900px) {
    .ce-input, .ce-preview { min-height: 240px; }
}

/* --------------------------------------------------------------------------
   v2.6.0 — Pricing, plan choice and the signup wizard
   -------------------------------------------------------------------------- */

/* --- the public pricing page --------------------------------------------- */
.price-hero { text-align: center; padding: 56px 24px 8px; }
.price-hero h1 {
    font-family: var(--font-head); font-size: 40px; line-height: 1.1;
    letter-spacing: -1px; margin: 0 0 12px;
}
.price-hero p {
    color: var(--muted); font-size: 16px; max-width: 620px;
    margin: 0 auto 8px; line-height: 1.6;
}
.price-note {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--brand-softer); color: var(--ink);
    border: 1px solid var(--brand-soft); border-radius: 999px;
    padding: 7px 16px; font-size: 13px; font-weight: 600; margin-top: 14px;
}

/* v2.6.0: five tiers, not four. Five equal columns at 1120px would give each
   card ~200px, which is narrower than the longest feature line and forces a
   ragged wrap in every card. The business tiers get their own 4-up row and
   the individual tier is presented separately above it, because they are
   different products for different buyers rather than points on one ladder. */
.plan-grid {
    display: grid; gap: 20px; max-width: 1180px; margin: 36px auto;
    padding: 0 24px; grid-template-columns: repeat(4, 1fr); align-items: start;
}
@media (max-width: 1080px) { .plan-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .plan-grid { grid-template-columns: 1fr; } }

/* The individual tier: one wide card, visually separated from the business
   ladder so nobody reads "Solo" as the cheap end of the company pricing. */
.plan-solo-wrap { max-width: 1180px; margin: 36px auto 0; padding: 0 24px; }
.plan-solo {
    background: var(--dm-surface, #fff); border: 1px solid var(--line); border-radius: 16px;
    padding: 24px 28px; display: flex; align-items: center; gap: 26px;
    flex-wrap: wrap;
}
.plan-solo .solo-main { flex: 1 1 340px; min-width: 260px; }
.plan-solo .plan-name { margin-bottom: 2px; }
.plan-solo .solo-price {
    font-family: var(--font-head); font-size: 34px; line-height: 1;
    color: var(--ink);
}
.plan-solo .solo-feat {
    display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 12px 0 0;
    padding: 0; list-style: none;
}
.plan-solo .solo-feat li {
    font-size: 13px; color: var(--muted); display: flex; gap: 7px;
    align-items: center;
}
.plan-solo .solo-feat li::before {
    content: "✓"; color: var(--brand-text); font-weight: 700;
}

.audience-head {
    max-width: 1180px; margin: 44px auto 0; padding: 0 24px;
}
.audience-head h2 {
    font-family: var(--font-head); font-size: 23px; margin: 0 0 4px;
    color: var(--ink);
}
.audience-head p { color: var(--muted); font-size: 13.5px; margin: 0; }

@media (max-width: 640px) {
    .plan-solo { flex-direction: column; align-items: flex-start; gap: 16px; }
}

.plan-card {
    background: var(--dm-surface, #fff); border: 1px solid var(--line); border-radius: 16px;
    padding: 26px 22px; display: flex; flex-direction: column;
    position: relative; height: 100%;
}
.plan-card.is-featured {
    border-color: var(--brand); box-shadow: 0 12px 34px rgba(91,108,255,.16);
}
.plan-flag {
    position: absolute; top: -11px; left: 22px; background: var(--brand);
    color: var(--ink-black); font-size: 11px; font-weight: 800;
    letter-spacing: .6px; text-transform: uppercase;
    padding: 4px 11px; border-radius: 999px;
}
.plan-name {
    font-family: var(--font-head); font-size: 19px; font-weight: 800;
    margin: 0 0 4px;
}
.plan-seats { color: var(--muted); font-size: 12.5px; margin-bottom: 16px; }
.plan-price { display: flex; align-items: baseline; gap: 4px; margin-bottom: 2px; }
.plan-amount {
    font-family: var(--font-head); font-size: 40px; font-weight: 800;
    letter-spacing: -1.5px; line-height: 1;
}
.plan-per { color: var(--muted); font-size: 13px; font-weight: 600; }
.plan-gst { color: var(--muted); font-size: 12px; min-height: 17px; margin-bottom: 16px; }
.plan-blurb {
    font-size: 13px; color: var(--ink-grey); line-height: 1.55;
    margin-bottom: 18px; min-height: 40px;
}
.plan-feat { list-style: none; padding: 0; margin: 0 0 22px; flex: 1; }
.plan-feat li {
    display: flex; gap: 9px; align-items: flex-start;
    font-size: 13px; color: var(--ink-grey); padding: 5px 0; line-height: 1.45;
}
.plan-feat svg { width: 15px; height: 15px; color: var(--brand-text); flex: 0 0 15px; margin-top: 2px; }
.plan-card .btn { width: 100%; justify-content: center; }

/* --- "how it works" ------------------------------------------------------ */
.how-strip { background: var(--dm-surface, #fff); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 52px 24px; }
.how-grid {
    max-width: 1120px; margin: 0 auto; display: grid; gap: 28px;
    grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 900px) { .how-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .how-grid { grid-template-columns: 1fr; } }
.how-step .how-num {
    width: 30px; height: 30px; border-radius: 9px; background: var(--brand-softer);
    color: var(--brand-text); display: grid; place-items: center;
    font-weight: 800; font-size: 14px; margin-bottom: 11px;
    border: 1px solid var(--brand-soft);
}
.how-step h3 { font-size: 15px; margin: 0 0 6px; font-weight: 700; }
.how-step p { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 0; }

/* --- comparison table ---------------------------------------------------- */
.cmp-wrap { max-width: 1120px; margin: 52px auto; padding: 0 24px; }
/* A five-column comparison cannot compress below about 470px, so on a phone
   it must scroll INSIDE this box. Without it the table set the width of the
   document and every other section -- hero, plan cards, FAQ -- inherited a
   horizontal scrollbar it had no reason to have. */
.cmp-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cmp-table { width: 100%; border-collapse: collapse; background: var(--dm-surface, #fff);
    border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
    min-width: 560px; }
.cmp-table th, .cmp-table td {
    padding: 13px 16px; text-align: left; font-size: 13.5px;
    border-bottom: 1px solid var(--line);
}
.cmp-table thead th {
    background: var(--bg); font-weight: 700; font-size: 12px;
    text-transform: uppercase; letter-spacing: .5px; color: var(--muted);
}
.cmp-table td:not(:first-child), .cmp-table th:not(:first-child) { text-align: center; }
.cmp-table tbody tr:last-child td { border-bottom: 0; }
.cmp-yes { color: #15803d; font-weight: 700; }
.cmp-no  { color: var(--muted); }

/* --- FAQ ----------------------------------------------------------------- */
.faq-wrap { max-width: 820px; margin: 0 auto 64px; padding: 0 24px; }
.faq-item { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq-item h4 { margin: 0 0 7px; font-size: 14.5px; font-weight: 700; }
.faq-item p { margin: 0; font-size: 13.5px; color: var(--ink-grey); line-height: 1.65; }

/* --- signup wizard ------------------------------------------------------- */
.wiz-steps {
    display: flex; align-items: center; gap: 0; margin: 0 0 26px;
    padding: 0; list-style: none; flex-wrap: wrap;
}
.wiz-steps li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.wiz-steps li + li::before {
    content: ""; width: 26px; height: 1px; background: var(--line); margin: 0 10px;
}
.wiz-dot {
    width: 23px; height: 23px; border-radius: 50%; display: grid;
    place-items: center; font-size: 11.5px; font-weight: 700;
    background: var(--bg); border: 1px solid var(--line); color: var(--muted);
}
.wiz-steps li.is-active { color: var(--ink); font-weight: 700; }
.wiz-steps li.is-active .wiz-dot {
    background: var(--brand); border-color: var(--brand); color: var(--ink-black);
}
.wiz-steps li.is-done .wiz-dot {
    background: var(--dm-fill, var(--ink-black)); border-color: var(--dm-fill, var(--ink-black)); color: #fff;
}

/* Plan chooser inside the wizard */
.pick-grid { display: grid; gap: 12px; margin-bottom: 8px; }
.pick {
    display: block; border: 1.5px solid var(--line); border-radius: 12px;
    padding: 15px 16px; cursor: pointer; background: var(--dm-surface, #fff); position: relative;
    transition: border-color .12s, background .12s;
}
.pick:hover { border-color: var(--brand-2); }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.pick-name { font-weight: 700; font-size: 14.5px; }
.pick-cost { font-weight: 800; font-size: 16px; white-space: nowrap; }
.pick-sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.pick input:checked + .pick-body { color: inherit; }
.pick.is-picked { border-color: var(--brand); background: var(--brand-softer); }
.pick input:focus-visible + .pick-body { outline: 2px solid var(--brand); outline-offset: 3px; }

/* Order summary */
.summary-box {
    background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
    padding: 16px 18px; margin: 18px 0;
}
.summary-row {
    display: flex; justify-content: space-between; gap: 12px;
    font-size: 13.5px; padding: 5px 0; color: var(--ink-grey);
}
.summary-row.is-total {
    border-top: 1px solid var(--line); margin-top: 8px; padding-top: 11px;
    font-weight: 800; color: var(--ink); font-size: 15px;
}
.summary-row .muted { color: var(--muted); }
.trial-banner {
    display: flex; gap: 11px; align-items: flex-start;
    background: #F0FDF4; border: 1px solid #BBF7D0; color: #14532D;
    border-radius: 11px; padding: 13px 15px; font-size: 13px;
    line-height: 1.55; margin-bottom: 18px;
}
.trial-banner svg { width: 17px; height: 17px; flex: 0 0 17px; margin-top: 1px; }

/* Card entry */
.card-fields { display: grid; gap: 12px; grid-template-columns: 1fr 1fr 1fr; }
.card-fields .span-3 { grid-column: 1 / -1; }
.pay-secure {
    display: flex; align-items: center; gap: 7px; color: var(--muted);
    font-size: 12px; margin-top: 10px;
}
.pay-secure svg { width: 14px; height: 14px; }
.dummy-note {
    background: #FEF9C3; border: 1px solid #FDE68A; color: #713F12;
    border-radius: 10px; padding: 11px 14px; font-size: 12.5px;
    line-height: 1.55; margin-bottom: 16px;
}

/* ------------------------------------------------- contact sales (v2.6.0) */
.sales-wrap { max-width: 1040px; margin: 0 auto; padding: 52px 24px 70px; }

.sales-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 44px;
    align-items: start;
}
.sales-h1 {
    font-family: var(--font-head); font-size: 34px; line-height: 1.15;
    margin: 0 0 14px; color: var(--ink);
}
.sales-lead {
    font-size: 15px; line-height: 1.65; color: var(--muted); margin: 0 0 26px;
}

.sales-points { display: grid; gap: 16px; }
.sales-point { display: flex; gap: 13px; align-items: flex-start; }
.sales-point svg {
    width: 19px; height: 19px; flex: 0 0 19px; margin-top: 2px;
    stroke: var(--brand);
}
.sales-point strong {
    display: block; font-size: 14px; color: var(--ink); margin-bottom: 2px;
}
.sales-point span { font-size: 13px; color: var(--muted); line-height: 1.5; }

.sales-card {
    background: var(--dm-surface, #fff); border: 1px solid var(--line); border-radius: 16px;
    padding: 30px 28px; box-shadow: 0 4px 22px rgba(0, 0, 0, .05);
}
.sales-card h2 {
    font-family: var(--font-head); font-size: 21px; margin: 0 0 6px;
    color: var(--ink);
}

.sales-done {
    max-width: 560px; margin: 0 auto; text-align: center;
    background: var(--dm-surface, #fff); border: 1px solid var(--line); border-radius: 16px;
    padding: 44px 34px; box-shadow: 0 4px 22px rgba(0, 0, 0, .05);
}
.sales-done h1 {
    font-family: var(--font-head); font-size: 27px; margin: 0 0 12px;
    color: var(--ink);
}
.sales-done p { font-size: 14.5px; line-height: 1.65; margin: 0 0 12px; }
.sales-tick {
    width: 58px; height: 58px; border-radius: 50%; margin: 0 auto 20px;
    background: #DCFCE7; display: flex; align-items: center;
    justify-content: center;
}
.sales-tick svg { width: 28px; height: 28px; stroke: #15803D; stroke-width: 3; }

@media (max-width: 860px) {
    .sales-grid { grid-template-columns: 1fr; gap: 32px; }
    .sales-h1 { font-size: 27px; }
}

/* --------------------------------------------- signup wizard (v2.6.0) */
.wiz-wrap { max-width: 780px; margin: 0 auto; padding: 40px 24px 70px; }
.wiz-wrap.is-wide { max-width: 980px; }

.wiz-card {
    background: var(--dm-surface, #fff); border: 1px solid var(--line); border-radius: 16px;
    padding: 32px 34px; box-shadow: 0 4px 22px rgba(0, 0, 0, .05);
}
.wiz-h1 {
    font-family: var(--font-head); font-size: 25px; margin: 0 0 6px;
    color: var(--ink);
}
.wiz-sub {
    color: var(--muted); font-size: 13.5px; line-height: 1.6;
    margin: 0 0 22px;
}
.wiz-card .field-row.thirds {
    grid-template-columns: 2fr 1fr 1fr;
}
.wiz-actions {
    display: flex; justify-content: space-between; align-items: center;
    gap: 12px; margin-top: 26px; padding-top: 20px;
    border-top: 1px solid var(--line);
}
.wiz-actions .spacer { flex: 1; }
.wiz-back {
    font-size: 13px; color: var(--muted); text-decoration: none;
    display: inline-flex; align-items: center; gap: 6px;
}
.wiz-back:hover { color: var(--ink); }
.wiz-legend {
    font-family: var(--font-head); font-size: 15px; margin: 26px 0 14px;
    padding-top: 20px; border-top: 1px solid var(--line); color: var(--ink);
}
.wiz-legend:first-of-type { margin-top: 0; padding-top: 0; border-top: none; }

/* The two big "who are you" choices on step one. */
.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.type-card {
    display: block; cursor: pointer; background: var(--dm-surface, #fff); text-align: left;
    border: 2px solid var(--line); border-radius: 14px; padding: 22px 22px;
    transition: border-color .12s, box-shadow .12s;
}
.type-card:hover { border-color: var(--brand-2); }
.type-card input { position: absolute; opacity: 0; pointer-events: none; }
.type-card.is-picked, .type-card:has(input:checked) {
    border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-softer);
}
.type-card .tc-icon {
    width: 38px; height: 38px; border-radius: 10px; display: grid;
    place-items: center; background: var(--brand-softer); margin-bottom: 14px;
}
.type-card .tc-icon svg { width: 19px; height: 19px; stroke: var(--brand); }
.type-card h3 {
    font-family: var(--font-head); font-size: 17px; margin: 0 0 6px;
    color: var(--ink);
}
.type-card p { font-size: 13px; color: var(--muted); line-height: 1.55; margin: 0; }
.type-card .tc-price {
    display: inline-block; margin-top: 12px; font-size: 12.5px;
    font-weight: 700; color: var(--ink);
}
@media (max-width: 640px) { .type-grid { grid-template-columns: 1fr; } }

/* An inline confirmation that a typed ABN really is a valid ABN. */
.abn-state { font-size: 12px; margin-top: 5px; min-height: 16px; }
.abn-ok { color: #15803D; }
.abn-bad { color: #B91C1C; }

.check-row {
    display: flex; gap: 10px; align-items: flex-start; margin: 14px 0;
    font-size: 13.5px; line-height: 1.55;
}
.check-row input[type=checkbox] { width: 16px; height: 16px; margin-top: 2px; flex: 0 0 16px; }
.check-row label { font-weight: 400; margin: 0; font-size: 13.5px; }

/* v3.2.1 - a CONTAINER of `.check` pills, which is a different job from
   `.check-row` above (that one is a single checkbox beside its label, and
   must keep behaving exactly as it did).

   The team pages list one pill per installed application. There is no
   fixed number of them: an operator can install four today and twelve
   next month, and the invite panel that holds them is a 300px rail. A
   non-wrapping flex row therefore squeezed every pill into the leftover
   width -- names broke mid-phrase ("Starter / App"), pills finished at
   ragged heights because only some labels wrapped, and with four
   applications the last pill sat 207px OUTSIDE the card.

   auto-fit + minmax means the number of columns is decided by the space
   that actually exists rather than by the number of applications: one
   per line in the rail (so no name ever wraps), two or three across in
   the full-width forms. `min-width: 0` is what stops a long application
   name from forcing a grid column wider than its share. */
.check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 8px;
    margin: 8px 0 0;
}
.check-grid .check {
    align-items: center;      /* one-line labels look wrong top-aligned */
    min-width: 0;             /* let the cell, not the word, set the width */
    padding: 9px 11px;
    font-size: 13.5px;
    line-height: 1.35;
}
.check-grid .check input[type=checkbox] {
    width: 15px; height: 15px; flex: 0 0 15px; margin-top: 0;
}

/* In the rail there is only ever one column, so the list's height is the
   number of installed applications. Cap it and let it scroll: the panel
   keeps one shape whether the operator installed four applications or
   forty, and "Send invite" stays where it was. 5.5 rows is chosen so the
   four applications that ship today never scroll -- the cap only bites
   once there is actually something below the fold to reach. */
.pg-rail .check-grid {
    max-height: 258px;          /* ~5.5 rows of 47px */
    overflow-y: auto;
    padding-right: 4px;         /* room for the scrollbar, not under it */
    scrollbar-width: thin;
}

/* Plan chooser additions (v2.6.0) — the wizard renders name/sub stacked and
   shows a live "fits N people" hint driven by the seat count. */
.pick-name, .pick-sub { display: block; }
.pick-cost { text-align: right; }
.pick-per { font-weight: 600; font-size: 12px; color: var(--muted); }
.pick-gst {
    display: block; font-weight: 500; font-size: 11.5px; color: var(--muted);
    margin-top: 2px;
}
.pick-note {
    display: block; margin-top: 9px; font-size: 12.5px; color: var(--muted);
    line-height: 1.5;
}
.pick-note a { color: var(--brand-text); }
.pick-fit {
    display: inline-block; margin-top: 9px; font-size: 11.5px;
    font-weight: 700; color: #15803D; background: #DCFCE7;
    border-radius: 999px; padding: 3px 10px;
}
.pick.is-suggested { border-color: var(--brand-2); }
/* A disabled tier (Enterprise) must not look clickable — it is an enquiry,
   not a selection, and offering it as a choice here would provision a
   company on a plan with no agreed price. */
.pick:has(input:disabled) { cursor: default; opacity: .82; background: var(--bg); }
.pick:has(input:disabled):hover { border-color: var(--line); }

/* Over-band notice on the plan step. Shown when the seat count only
   Enterprise can cover, where there is no self-serve plan to select. */
.pick-over {
    display: flex; gap: 11px; align-items: flex-start; margin-top: 18px;
    padding: 14px 16px; border-radius: 12px; background: #FFF7ED;
    border: 1px solid #FED7AA; font-size: 13.5px; line-height: 1.6;
    color: #7C2D12;
}
.pick-over svg { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 2px; }
.pick-over a { color: var(--brand-text); font-weight: 700; }

/* --------------------------------------------------------------------------
   Stripe Elements mount (v2.7.0)

   The card fields are an iframe served by Stripe, so we cannot style their
   insides from here -- only the box they sit in. It is made to match the
   app's own inputs exactly, because a payment field that looks foreign is a
   payment field people abandon.
   -------------------------------------------------------------------------- */
.stripe-mount {
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--dm-surface, #fff);
    min-height: 44px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
/* Stripe adds these classes to the mount element itself. */
.stripe-mount.StripeElement--focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-softer);
}
.stripe-mount.StripeElement--invalid { border-color: #b91c1c; }
/* stripe.js failed to load, so the box explains itself instead of sitting
   there empty and unusable. */
.stripe-mount-failed {
    border-style: dashed;
    border-color: #b91c1c;
    color: #b91c1c;
    font-size: 13px;
    line-height: 1.5;
    background: #fef2f2;
}

/* ------------------------------------------------- Orbit logo (v3.0.0) ---
   The brand kit's primary lockup as SVG (222.86x64 viewBox): mark plus
   wordmark. The resolver in app/templating.py (LOGO_FILES) picks the
   variant for the surface -- reversed artwork on Ink grounds. Sizing rules
   are unchanged from v2.8.2 and still mandatory: size by HEIGHT and let
   width follow, or the lockup squashes ("Do not alter the proportions"),
   and object-fit stays contain, never cover, so the wordmark is never
   cropped. The one raster consumer is outbound mail, which cannot rely on
   SVG support; that PNG is composited onto Paper.                         */
.brand-logo {
    display: block;
    width: auto;
    object-fit: contain;
    /* The artwork carries its own clear space, so no extra padding. */
}

/* Public site header (dark bar) - the white wordmark. */
.land-logo-img {
    height: 30px;
    max-width: 168px;
}
/* When the wordmark is present it replaces BOTH the emoji tile and the
   company-name text, so the header does not read "ORBIT. ORBIT". */
.land-nav .land-brand { display: flex; align-items: center; gap: 10px; }

/* Sign-in card and the welcome card (light background) - black wordmark. */
.public-logo-img {
    height: 42px;
    max-width: 230px;
    margin: 0 auto 18px;
}

/* Admin/portal sidebar (dark) - white wordmark, tucked to the same
   optical size as the old 34px emoji tile. */
.sidebar .brand .brand-logo {
    height: 30px;
    max-width: 168px;
}

/* Footer marks sit quieter than header marks. */
.land-foot .brand-logo { height: 24px; max-width: 132px; opacity: .85; }

@media (max-width: 640px) {
    .land-logo-img { height: 25px; max-width: 132px; }
    .public-logo-img { height: 36px; max-width: 190px; }
}

/* ---------------------------------------------------------------- v2.9.0
   Signup step 5: choose your apps.

   Multi-select sibling of `.pick` above. The checkbox is visible on
   purpose (see v290_c_css.py) -- this is the one wizard step where more
   than one answer is allowed, and the control has to say so. */
.app-pick-list {
    display: grid; gap: 10px; margin: 4px 0 18px;
}
.app-pick {
    display: flex; align-items: center; gap: 13px;
    border: 1.5px solid var(--line); border-radius: 12px;
    padding: 13px 15px; cursor: pointer; background: var(--dm-surface, #fff);
    transition: border-color .12s, background .12s;
}
.app-pick:hover { border-color: var(--brand-2); }
.app-pick.is-picked { border-color: var(--brand); background: var(--brand-softer); }
.app-pick:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 3px; }
.app-pick input[type="checkbox"] {
    width: 18px; height: 18px; flex: 0 0 18px; margin: 0;
    accent-color: var(--brand); cursor: pointer;
}
.app-pick .store-icon { flex-shrink: 0; }
.app-pick-main { flex: 1; min-width: 0; }
.app-pick-name {
    display: block; font-weight: 700; font-size: 14.5px; color: var(--ink-black);
}
.app-pick-sub {
    display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.app-pick-cost {
    font-weight: 800; font-size: 15.5px; white-space: nowrap;
    color: var(--ink-black); text-align: right;
}
.app-pick-per { font-weight: 600; font-size: 12px; color: var(--muted); }
.app-pick-free {
    font-weight: 700; font-size: 12px; letter-spacing: .04em;
    text-transform: uppercase; color: var(--ok);
}

/* Running total. Display only -- the charged figure is the one the server
   stored in the session and re-checks at confirm. */
.app-total {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px; flex-wrap: wrap;
    background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
    padding: 14px 17px; margin-bottom: 8px; font-size: 14px;
}
.app-total-figure { white-space: nowrap; }
.app-total-figure strong { font-size: 19px; color: var(--ink-black); }
.app-total-figure .muted { font-size: 12.5px; }

@media (max-width: 560px) {
    .app-pick { gap: 11px; padding: 12px 13px; }
    .app-pick .store-icon.sm { width: 30px; height: 30px; flex: 0 0 30px; }
    .app-pick .store-icon.sm i { width: 15px; height: 15px; }
    .app-pick-cost { font-size: 14px; }
    .app-total { padding: 13px 14px; }
    .app-total-figure strong { font-size: 17px; }
}

/* ===================================================== v2.10.0 page header
   The topbar carried a single word and nothing else. This band gives each
   main screen a title, a line of purpose, and the figures that matter,
   before the reader has to scroll or interpret a table. */
.page-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 20px; flex-wrap: wrap;
    padding: 0 0 18px; margin-bottom: 20px;
    border-bottom: 1px solid var(--line);
}
.page-head-main { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.page-head-icon {
    flex: none;
    width: 42px; height: 42px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--brand-softer); color: var(--brand-text);
    border: 1px solid var(--brand-soft);
}
.page-head-icon i { width: 20px; height: 20px; }
.page-head-icon.co-logo {
    width: 56px; height: 56px; border-radius: 14px; padding: 5px;
    background: #fff; border: 1px solid var(--line); overflow: hidden;
}
.page-head-icon.co-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.page-head-text { min-width: 0; }
.page-head-text h1 {
    margin: 0; font-family: var(--font-head);
    font-size: 22px; line-height: 1.2; letter-spacing: -.01em;
    color: var(--ink-black);
}
.page-head-text p {
    margin: 5px 0 0; font-size: 13px; color: var(--muted);
    max-width: 68ch; line-height: 1.5;
}
.page-head-stats { display: flex; gap: 26px; flex-wrap: wrap; padding-top: 2px; }
.page-head-stat { display: flex; flex-direction: column; gap: 2px; }
.phs-value {
    font-family: var(--font-head); font-size: 19px; font-weight: 700;
    color: var(--ink-black); line-height: 1.1;
}
.phs-value.brand { color: var(--brand-text); }
.phs-value.ok    { color: #12805C; }
.phs-value.warn  { color: #9A6700; }
.phs-value.crit  { color: #B42318; }
.phs-label {
    font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
    color: var(--muted); font-weight: 600;
}
@media (max-width: 700px) {
    .page-head { gap: 14px; }
    .page-head-stats { gap: 18px; }
    .page-head-text h1 { font-size: 19px; }
}

/* ------------------------------------------- money column + totals row */
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.money-total { font-size: 15px; color: var(--ink-black); }
tfoot .total-row td {
    background: var(--bg);
    border-top: 2px solid var(--line);
    padding-top: 13px; padding-bottom: 13px;
}

/* --------------------------------------------------- v2.10.0 detail tabs
   The company page had nine cards open at once down a two-column scroll.
   These group them the way Settings is grouped. They are real links with
   a ?tab= so a view can be linked to and survives a refresh -- a
   JavaScript-only toggle would lose the operator's place on every save. */
.detail-tabs {
    display: flex; gap: 4px; flex-wrap: wrap;
    border-bottom: 1px solid var(--line);
    margin: 0 0 20px;
}
.detail-tab {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 10px 15px; margin-bottom: -1px;
    font-size: 13px; font-weight: 600; color: var(--muted);
    text-decoration: none; border: 1px solid transparent;
    border-bottom: 2px solid transparent; transition: .15s;
}
.detail-tab:hover { color: var(--ink); background: var(--dm-surface-3, #F1F1F2); }
.detail-tab.active {
    color: var(--brand-text); border-bottom-color: var(--brand);
    background: none;
}
.detail-tab i { width: 15px; height: 15px; }
.detail-tab .tab-count {
    font-size: 11px; font-weight: 700; padding: 1px 7px;
    border-radius: 999px; background: var(--line); color: var(--ink-grey);
}
/* The active count was orange-on-orange-wash: 4.31:1 at 11px, under AA.
   The guideline's own pattern -- solid orange FILL with Core Ink type --
   is both compliant (6.9:1) and more on-brand than a tint. */
.detail-tab.active .tab-count { background: var(--brand); color: var(--brand-on); }
@media (max-width: 700px) {
    .detail-tabs { flex-wrap: nowrap; overflow-x: auto; }
    .detail-tab { white-space: nowrap; }
}

/* --------------------------------------------------------------------------
   The billing summary is a <table class="kv">, but `.kv` was written as a
   two-column CSS *grid* for <dl> lists. On a table those grid rules apply to
   the <tbody>, not to the cells, so every row collapsed into the 190px label
   column and values wrapped one word per line -- "09 / October / 2026" down
   three lines. It only became obvious once the card was on its own tab with
   room to spare beside it.

   Restoring table layout for this one case, rather than changing `.kv`,
   because the dl form of it is used correctly in several other places.
   -------------------------------------------------------------------------- */
table.kv {
    display: table; width: 100%; border-collapse: collapse;
    font-size: 13.5px;
}
table.kv tr { border-bottom: 1px solid var(--line); }
table.kv tr:last-child { border-bottom: none; }
table.kv th {
    text-align: left; vertical-align: top; white-space: nowrap;
    width: 140px; padding: 9px 14px 9px 0;
    color: var(--muted); font-weight: 600;
}
table.kv td {
    vertical-align: top; padding: 9px 0;
    color: var(--ink-black); word-break: break-word;
}
@media (max-width: 700px) {
    table.kv th { width: 110px; white-space: normal; }
}

/* A tab holding a single card should use the width it has. `.two-col` would
   leave a wide empty column beside it, which reads as though something
   failed to load -- and the Business details form is long enough that the
   extra width genuinely helps. */
.one-col { display: block; }
.one-col > div { display: block; }

/* ==========================================================================
   THE COMPANY SHELL (v2.11.0)
   ==========================================================================
   The company side moved from a left sidebar to a dark topbar plus a bottom
   navigation bar. Everything here is prefixed and scoped to `.portal-body`
   or a `p*` class so it cannot reach the platform admin shell, which keeps
   its sidebar. That isolation is deliberate: the two shells are now
   different designs and must be able to change independently.

   Built on the existing tokens (--brand, --line, --bg, --card-radius) so an
   operator's branding still drives the company side, rather than hard-coding
   the orange from the mockups.
   ========================================================================== */

.portal-body {
    margin: 0;
    background: var(--bg);
    /* Room for the fixed bottom bar, plus the iOS home indicator. Without
       this the last card on a long page sits underneath the navigation. */
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
}

/* ------------------------------------------------------------- dark topbar */
.pbar {
    position: sticky; top: 0; z-index: 40;
    display: flex; align-items: center; gap: 18px;
    padding: 0 20px; height: 60px;
    background: var(--sidebar-bg); color: var(--sidebar-text);
}
.pbar-brand {
    display: flex; align-items: center; gap: 9px;
    color: inherit; text-decoration: none; flex: 0 0 auto;
}
.pbar-brand img { height: 26px; width: auto; display: block; }
.pbar-logo { color: var(--brand-text); font-size: 20px; line-height: 1; }
.pbar-word {
    font-family: var(--font-head); font-weight: 700;
    font-size: 19px; letter-spacing: .01em;
}

/* The search sits in the middle on wide screens, exactly as designed. */
.pbar-search {
    position: relative; flex: 1 1 auto;
    max-width: 520px; margin: 0 auto;
}
.pbar-search svg {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    width: 15px; height: 15px; color: rgba(255, 255, 255, .55);
    pointer-events: none;
}
.pbar-search input {
    width: 100%; height: 36px; box-sizing: border-box;
    padding: 0 12px 0 34px;
    border-radius: 9px; border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .07); color: #fff;
    font: inherit; font-size: 13.5px;
}
.pbar-search input::placeholder { color: rgba(255, 255, 255, .5); }
.pbar-search input:focus {
    outline: none; border-color: var(--brand);
    background: rgba(255, 255, 255, .12);
}
/* Chrome adds its own clear button; it collides with the dark field. */
.pbar-search input::-webkit-search-cancel-button { filter: invert(1) opacity(.5); }

.pbar-right { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }

/* ------------------------------------------------- account / workspace menu
   A <details> element rather than a JS dropdown: it opens without
   JavaScript, closes on Escape natively, and is keyboard reachable for
   free. */
.pmenu { position: relative; }
.pmenu > summary {
    display: flex; align-items: center; gap: 9px;
    padding: 5px 9px 5px 5px; border-radius: 999px;
    cursor: pointer; list-style: none;
    background: rgba(255, 255, 255, .07);
}
.pmenu > summary::-webkit-details-marker { display: none; }
.pmenu > summary:hover { background: rgba(255, 255, 255, .13); }
.pmenu > summary svg { width: 15px; height: 15px; opacity: .7; }
.pmenu-avatar {
    width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto;
    display: grid; place-items: center;
    background: var(--brand); color: #fff;
    font-weight: 700; font-size: 12.5px;
}
.pmenu-name {
    font-size: 13.5px; font-weight: 600; max-width: 190px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pmenu-drop {
    position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px;
    background: var(--dm-surface, #fff); color: var(--ink); border: 1px solid var(--line);
    border-radius: 12px; box-shadow: 0 18px 44px rgba(0, 0, 0, .18);
    padding: 6px; z-index: 50;
}
.pmenu-head {
    display: block; padding: 9px 11px 11px;
    border-bottom: 1px solid var(--line); margin-bottom: 6px;
}
.pmenu-head strong { display: block; font-size: 13.5px; }
.pmenu-head span { color: var(--muted); font-size: 12px; }
.pmenu-drop a {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 11px; border-radius: 8px;
    color: var(--ink-grey); text-decoration: none; font-size: 13.5px;
}
.pmenu-drop a:hover { background: var(--bg); color: var(--ink); }
.pmenu-drop a svg { width: 16px; height: 16px; color: var(--muted); }
.pmenu-out {
    border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px !important;
}
/* v3.21.0: switch between the admin console and the company. A form
   button styled exactly like the menu links around it. */
.pmenu-switch-form, .nav-switch-form { margin: 0; }
.pmenu-switch {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 9px 11px; border-radius: 8px; border: 0; background: none;
    color: var(--ink-grey); font: inherit; font-size: 13.5px; font-weight: 600;
    text-align: left; cursor: pointer;
}
.pmenu-switch:hover, .pmenu-switch:focus-visible { background: var(--bg); color: var(--ink); }
.pmenu-switch svg { width: 16px; height: 16px; color: var(--brand-text, #3A47C9); }
.nav-switch {
    width: 100%; border: 0; background: none; font: inherit; text-align: left;
    cursor: pointer;
}

/* --------------------------------------------------------------- content */
.pmain {
    padding: 26px 28px 8px;
    max-width: 1360px; margin: 0 auto;
}

/* ------------------------------------------------------- bottom navigation */
.pnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    display: flex; align-items: stretch;
    background: var(--dm-surface, #fff); border-top: 1px solid var(--line);
    padding: 8px 14px calc(8px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -6px 24px rgba(0, 0, 0, .05);
}
.pnav-item {
    flex: 1 1 0; min-width: 0;
    display: flex; align-items: center; justify-content: center; gap: 9px;
    padding: 11px 8px; border-radius: 11px;
    color: var(--muted); text-decoration: none;
    font-size: 13.5px; font-weight: 600;
}
.pnav-item svg { width: 18px; height: 18px; flex: 0 0 auto; }
.pnav-item span {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pnav-item:hover { color: var(--ink); background: var(--bg); }
.pnav-item.active { color: var(--brand-text); background: var(--brand-softer); }

/* ------------------------------------------------------------- hero band */
.phero {
    position: relative; overflow: hidden;
    border-radius: 16px; margin: 0 0 18px;
    background: var(--sidebar-bg); color: #fff;   /* v3.24.0: theme bar, was #121212 */
    padding: 26px 30px;
    display: flex; align-items: center; gap: 26px;
}
/* The warm glow from the mockups, done in CSS rather than as an image so it
   follows the operator's brand colour and costs no download. */
.phero::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(120% 150% at 78% 50%,
            color-mix(in srgb, var(--brand) 42%, transparent) 0%,
            transparent 62%);
}
.phero-text { position: relative; z-index: 1; flex: 1 1 auto; min-width: 0; }
.phero-eyebrow {
    display: block; text-transform: uppercase; letter-spacing: .1em;
    font-size: 11px; font-weight: 700; color: var(--bar-accent);
    margin-bottom: 9px;
}
.phero h2 {
    font-family: var(--font-head); font-size: 27px; line-height: 1.15;
    margin: 0 0 9px; color: #fff;
}
.phero p {
    margin: 0 0 17px; color: rgba(255, 255, 255, .76);
    font-size: 14px; max-width: 60ch;
}
.phero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.phero .btn-ghost {
    background: transparent; color: #fff;
    border: 1px solid rgba(255, 255, 255, .28);
}
.phero .btn-ghost:hover { background: rgba(255, 255, 255, .1); }
/* The tick list on the right of the marketplace hero. */
.phero-points {
    position: relative; z-index: 1; flex: 0 0 auto;
    display: grid; gap: 9px;
}
.phero-point {
    display: flex; align-items: center; gap: 9px;
    font-size: 13px; color: rgba(255, 255, 255, .86);
}
.phero-point svg { width: 15px; height: 15px; color: var(--bar-accent); }

/* --------------------------------------------------------- the plan rail */
.pplan {
    background: var(--sidebar-bg); color: #fff; border-radius: 16px;   /* v3.24.0 */
    padding: 20px 22px; position: relative; overflow: hidden;
}
.pplan-label {
    text-transform: uppercase; letter-spacing: .1em;
    font-size: 10.5px; font-weight: 700; color: rgba(255, 255, 255, .6);
}
.pplan h3 {
    font-family: var(--font-head); font-size: 24px; margin: 6px 0 2px;
    color: #fff;
}
.pplan-sub { color: rgba(255, 255, 255, .6); font-size: 12.5px; }
.pplan-list { list-style: none; margin: 15px 0 17px; padding: 0; display: grid; gap: 8px; }
.pplan-list li {
    display: flex; align-items: flex-start; gap: 9px;
    font-size: 12.5px; color: rgba(255, 255, 255, .84);
}
.pplan-list svg { width: 14px; height: 14px; color: var(--bar-accent); flex: 0 0 auto; margin-top: 2px; }
.pplan-crown {
    position: absolute; right: 20px; top: 20px;
    width: 42px; height: 42px; border-radius: 12px;
    display: grid; place-items: center;
    background: color-mix(in srgb, var(--bar-accent) 18%, transparent);
    color: var(--bar-accent);
}

/* ------------------------------------------------------------ stat strip */
.pstats {
    display: grid; gap: 14px; margin: 0 0 18px;
    grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
}
.pstat {
    background: var(--dm-surface, #fff); border: 1px solid var(--line);
    border-radius: var(--card-radius); padding: 15px 17px;
    display: flex; align-items: center; gap: 14px; min-width: 0;
}
.pstat-icon {
    width: 42px; height: 42px; border-radius: 12px; flex: 0 0 auto;
    display: grid; place-items: center;
}
.pstat-icon svg { width: 19px; height: 19px; }
.pstat-body { min-width: 0; }
.pstat-label { color: var(--muted); font-size: 12px; font-weight: 600; }
.pstat-value {
    font-size: 25px; font-weight: 700; line-height: 1.1; margin: 1px 0 0;
    font-family: var(--font-head);
}
.pstat-value.sm { font-size: 19px; }
.pstat-sub { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.pstat-sub a { color: var(--brand-text); font-weight: 600; }
/* Soft icon tints. Named by hue rather than meaning so a page can pick
   what reads best beside its neighbours. */
.tint-brand { background: var(--brand-softer); color: var(--brand-text); }
/* v3.24.0: the other tints follow the theme too, so a theme change
   never leaves a stray indigo or sky icon behind. */
.tint-indigo { background: color-mix(in srgb, var(--brand-dark) 12%, transparent); color: color-mix(in srgb, var(--brand-text) 70%, var(--sidebar-bg)); }
.tint-green { background: color-mix(in srgb, var(--sidebar-bg) 10%, transparent); color: var(--sidebar-bg); }
.tint-sky { background: color-mix(in srgb, var(--brand-2) 18%, transparent); color: var(--brand-text); }

/* --------------------------------------------------------- content columns */
.pcols {
    display: grid; gap: 18px; align-items: start;
    grid-template-columns: 1fr 1fr 1fr;
}
.pcols-main {
    display: grid; gap: 18px; align-items: start;
    grid-template-columns: 2fr 1fr;
}

/* ----------------------------------------------------------- list rows */
.prow {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 0; border-bottom: 1px solid var(--line);
}
.prow:last-child { border-bottom: none; }
.prow-icon {
    width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto;
    display: grid; place-items: center; color: #fff;
}
.prow-icon svg { width: 16px; height: 16px; }
.prow-icon.ghost {
    background: var(--bg); color: var(--muted); border: 1px solid var(--line);
}
.prow-body { min-width: 0; flex: 1 1 auto; }
.prow-body strong { display: block; font-size: 13.5px; }
.prow-body span { color: var(--muted); font-size: 12px; }
.prow-when { color: var(--muted); font-size: 11.5px; white-space: nowrap; }

/* Quick actions -- a list of links that behaves like a menu. */
.pactions { display: grid; }
.pactions a {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 12px; border-radius: 10px;
    text-decoration: none; color: var(--ink);
    border-bottom: 1px solid var(--line);
}
.pactions a:last-child { border-bottom: none; }
.pactions a:hover { background: var(--brand-softer); }
.pactions .prow-icon { background: var(--bg); color: var(--brand-text); border: 1px solid var(--line); }
.pactions strong { display: block; font-size: 13.5px; }
.pactions span { color: var(--muted); font-size: 12px; }
.pactions .chev { margin-left: auto; color: var(--muted); }
.pactions .chev svg { width: 16px; height: 16px; }

/* ------------------------------------------------------------- search page */
.psearch-group { margin-bottom: 22px; }
.psearch-group h3 {
    font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
    color: var(--muted); margin: 0 0 8px;
}

/* ------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
    .pcols { grid-template-columns: 1fr 1fr; }
    .pcols-main { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
    .pmain { padding: 20px 16px 8px; }
    .pcols { grid-template-columns: 1fr; }
    .phero { flex-direction: column; align-items: flex-start; padding: 22px; }
    .phero-points { grid-template-columns: 1fr 1fr; }
    /* The wordmark and the company name both compete with the search box
       on a phone; the search keeps the space because it is the useful one. */
    .pmenu-name { display: none; }
    .pbar { gap: 12px; padding: 0 14px; }
}
@media (max-width: 620px) {
    .phero h2 { font-size: 22px; }
    .phero-points { display: none; }
    /* Labels below icons, the way a phone tab bar reads. */
    .pnav { padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px)); }
    .pnav-item { flex-direction: column; gap: 4px; font-size: 10.5px; padding: 7px 2px; }
    .pnav-item svg { width: 20px; height: 20px; }
    .pbar-word { display: none; }
}

/* ==========================================================================
   THE COMPANY DASHBOARD (v2.11.0)
   ==========================================================================
   The pieces the redesigned dashboard and the search page need on top of the
   shell above. Same isolation rule as the rest of this section: every
   selector is `p*`-prefixed or nested inside one, so nothing here can reach
   the platform admin shell.
   ========================================================================== */

/* -------------------------------------------------- greeting / date header */
.phead-row {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 20px; margin: 0 0 18px;
}
.phead-greet h1 {
    font-family: var(--font-head); font-size: 28px; line-height: 1.15;
    margin: 0;
}
.phead-sub { color: var(--ink-grey); font-size: 14px; margin: 5px 0 0; }
.phead-date { text-align: right; flex: 0 0 auto; }
.phead-date > strong { display: block; font-size: 13.5px; }

/* The service-status reading. Real words from the status collector, with a
   colour that matches them -- never a made-up uptime percentage. */
.pstatus {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 5px;
    font-size: 12px; font-weight: 600; color: var(--muted);
    text-decoration: none;
}
a.pstatus:hover { text-decoration: underline; }
.pstatus .pdot {
    width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto;
    background: currentColor;
}
.pstatus.ok { color: var(--ok); }
.pstatus.warning { color: var(--warn); }
.pstatus.critical { color: var(--crit); }

/* ------------------------------------------------------- hero + plan rail */
.phero-row {
    display: grid; gap: 18px; align-items: stretch;
    grid-template-columns: minmax(0, 1fr) 300px;
    margin: 0 0 18px;
}
/* The hero already carries its own bottom margin for the marketplace page;
   inside this row the grid gap does that job instead. */
.phero-row .phero { margin: 0; }

/* ------------------------------------------------------------ list tweaks */
.prow-list { list-style: none; margin: 0; padding: 0; }
/* Cards whose content is a full-width list: keep the vertical padding but
   drop the horizontal, so row separators run the width of the card. */
.card-body.tight-x { padding-left: 0; padding-right: 0; }
.card-body.tight-x .prow { padding-left: 17px; padding-right: 17px; }
.card-body.tight-x .pactions { padding: 0 6px; }
.card-body.tight-x .pempty { padding-left: 17px; padding-right: 17px; }

/* A plain inline link that reads as an action. */
.lnk {
    color: var(--brand-text); font-weight: 600; font-size: 12.5px;
    text-decoration: none;
}
.lnk:hover { text-decoration: underline; }

/* An empty state inside a dashboard column -- honest and quiet, not a
   placeholder pretending there is data. */
.pempty { text-align: center; padding: 26px 18px; color: var(--muted); }
.pempty svg { width: 26px; height: 26px; opacity: .45; }
.pempty h3 {
    font-family: var(--font-head); font-size: 16px; margin: 11px 0 5px;
    color: var(--ink);
}
.pempty p { margin: 9px 0 0; font-size: 13px; }
.pempty .btn { margin-top: 15px; }

/* The smallest button, for the trailing action on a dense list row. */
.btn-xs {
    padding: 5px 11px; font-size: 12px; border-radius: 8px;
    flex: 0 0 auto;
}

/* ------------------------------------------------- carried-over page actions
   The pages not yet redesigned still fill the old `topbar_actions` block.
   The new shell has no topbar slot for them, so they sit here above the
   page title rather than being dropped. */
.pacts-bar {
    display: flex; align-items: center; justify-content: flex-end;
    gap: 10px; flex-wrap: wrap; margin: 0 0 14px;
}

/* ------------------------------------------------------------- search page */
.psearch-box { margin-bottom: 18px; }
.psearch-field {
    display: flex; align-items: center; gap: 11px;
}
.psearch-field > svg { width: 17px; height: 17px; color: var(--muted); flex: 0 0 auto; }
.psearch-field input {
    flex: 1 1 auto; min-width: 0; height: 40px; box-sizing: border-box;
    padding: 0 13px; border: 1px solid var(--line); border-radius: 10px;
    font: inherit; font-size: 14px; background: var(--dm-surface, #fff);
}
.psearch-field input:focus {
    outline: none; border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-softer);
}
.psearch-count { margin: 0 0 12px; font-size: 13px; }

@media (max-width: 1100px) {
    /* The plan rail stops being a rail and becomes a band under the hero. */
    .phero-row { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
    .phead-row { flex-direction: column; gap: 10px; }
    .phead-greet h1 { font-size: 23px; }
    .phead-date { text-align: left; }
    .psearch-field { flex-wrap: wrap; }
    .psearch-field input { width: 100%; }
    .psearch-field .btn { width: 100%; justify-content: center; }
}

/* ---------------------------------------------- headline case, company side
   This block used to flag a deviation: the previous brand demanded ALL CAPS
   headlines while the mockups showed sentence case, and the mockups won for
   the company shell only.

   Orbit removes the conflict. The guideline is now "sentence case
   everywhere, including the wordmark", with Label -- IBM Plex Sans
   SemiBold, caps, 0.2em tracking -- as the only uppercase style. So this is
   no longer an exception; it is the rule, and it is applied globally in the
   base heading styles. What remains here is the tighter optical tracking
   the larger company-side headings want.
   ------------------------------------------------------------------------ */
.portal-body h1,
.portal-body h2,
.portal-body h3,
.portal-body .page-head-text h1 {
    text-transform: none;
    letter-spacing: -.01em;
}
/* The two small eyebrows stay all-caps -- they are labels rather than
   headlines, and the mockups show them capitalised. The stat-card labels
   are NOT included: the mockup prints those in sentence case
   ("Installed apps"), which is also how they read best at 12px. */
.portal-body .phero-eyebrow,
.portal-body .pplan-label { text-transform: uppercase; }

/* ===========================================================================
   v2.12.0 -- Marketplace + My Apps
   Built to the supplied mockups, inside the v2.11.0 company shell. Reuses
   that release's vocabulary (.pbar/.pnav/.pstat) rather than inventing a
   parallel one, so the two pages inherit the shell's spacing and colour.
   Prefix: .pm- (page: marketplace)  .pa- (page: apps)
   =========================================================================== */

/* ------------------------------------------------------------ shared header */
.pg-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 18px; flex-wrap: wrap; margin: 0 0 18px;
}
.pg-head-text h1 { margin: 0 0 4px; font-size: 30px; line-height: 1.15; }
.pg-head-text p { margin: 0; color: var(--muted); font-size: 14px; }

/* ------------------------------------------------------- two-column layout */
.pg-cols {
    display: grid; grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px; align-items: start;
}
@media (max-width: 1100px) { .pg-cols { grid-template-columns: minmax(0, 1fr); } }

/* v3.10.0: single-column page layout, used by Team once the "Invite
   someone" rail was removed on request. A .pg-cols grid with an empty
   second track leaves a 300px gutter of white space beside the content,
   so the layout is changed rather than the rail just being emptied.

   Deliberately a NEW class rather than a change to .pg-cols: other pages
   still have rails, and editing the shared grid to fix one page would
   silently reflow all of them. */
.pg-single { display: block; }
.pg-single > div { min-width: 0; }

/* Row actions sit on one line: Edit, then the mail icon. */
.pt-row-actions {
    display: flex; align-items: center; gap: 6px; justify-content: flex-end;
}
.pt-inline-form { display: inline-flex; margin: 0; }

/* An icon-only button. Square, so the icon is not stretched by the
   padding that a text button needs, and sized to match .btn-sm beside it
   rather than being a different height. */
.btn-icon {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0; width: 30px; height: 30px; line-height: 1;
}
.btn-icon i { width: 15px; height: 15px; }

.pg-rail { display: flex; flex-direction: column; gap: 16px; }
.pg-rail-card {
    background: var(--dm-surface, #fff); border: 1px solid var(--line); border-radius: 14px;
    padding: 16px;
}
.pg-rail-card h4 {
    margin: 0 0 4px; font-size: 15px; text-transform: none; letter-spacing: -.01em;
}
.pg-rail-card p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.pg-rail-icon {
    width: 38px; height: 38px; border-radius: 10px; display: grid;
    place-items: center; margin-bottom: 10px; background: var(--brand-softer);
    color: var(--brand-text);
}
.pg-rail-icon i { width: 19px; height: 19px; }

/* category browse list (real categories, with real counts) */
.pg-cats { list-style: none; margin: 8px 0 0; padding: 0; }
.pg-cats li + li { border-top: 1px solid var(--line); }
.pg-cats a {
    display: flex; align-items: center; gap: 10px; padding: 10px 2px;
    color: var(--ink); text-decoration: none; font-size: 14px;
}
.pg-cats a:hover { color: var(--brand-text); }
.pg-cats .pg-cat-count {
    margin-left: auto; font-size: 12px; color: var(--muted);
    background: var(--bg); border-radius: 999px; padding: 2px 8px;
}
.pg-cats a[aria-current="true"] { color: var(--brand-text); font-weight: 600; }

/* -------------------------------------------------------------- filter bar */
.pg-filters {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin: 0 0 16px;
}
.pg-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.pg-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px;
    border-radius: 999px; border: 1px solid var(--line); background: var(--dm-surface, #fff);
    font-size: 13px; color: var(--ink-grey); text-decoration: none;
    white-space: nowrap;
}
.pg-chip:hover { border-color: var(--brand-2); color: var(--brand-text); }
.pg-chip.on {
    background: var(--brand); border-color: var(--brand); color: #fff;
    font-weight: 600;
}
.pg-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.pg-search {
    position: relative; display: flex; align-items: center;
}
.pg-search i {
    position: absolute; left: 11px; width: 15px; height: 15px; color: var(--muted);
    pointer-events: none;
}
.pg-search input {
    width: 210px; padding: 8px 12px 8px 32px; border: 1px solid var(--line);
    border-radius: 10px; font-size: 13px; background: var(--dm-surface, #fff); color: var(--ink);
}
.pg-search input:focus-visible {
    outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand);
}
.pg-sort { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.pg-sort select {
    padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px;
    font-size: 13px; background: var(--dm-surface, #fff); color: var(--ink);
}
.pg-viewtoggle { display: flex; gap: 4px; }
.pg-viewtoggle a {
    width: 34px; height: 34px; display: grid; place-items: center;
    border: 1px solid var(--line); border-radius: 9px; color: var(--muted);
    background: var(--dm-surface, #fff);
}
.pg-viewtoggle a.on { background: var(--brand-softer); border-color: var(--brand); color: var(--brand-text); }
.pg-viewtoggle i { width: 16px; height: 16px; }
@media (max-width: 720px) {
    .pg-tools { margin-left: 0; width: 100%; }
    .pg-search { flex: 1; }
    .pg-search input { width: 100%; }
}

/* ------------------------------------------------------- marketplace hero */
.pm-hero {
    position: relative; overflow: hidden; border-radius: 16px;
    background: linear-gradient(105deg, #101013 0%, #1c1a19 52%, #35210f 100%);
    color: #fff; padding: 26px 28px; margin: 0 0 18px;
    display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
}
.pm-hero-text { flex: 1; min-width: 260px; }
.pm-hero-eyebrow {
    display: inline-block; font-size: 11px; letter-spacing: .12em;
    text-transform: uppercase; color: var(--brand-2); margin-bottom: 8px;
    font-weight: 700;
}
.pm-hero h2 {
    margin: 0 0 8px; font-size: 26px; line-height: 1.2; color: #fff;
    text-transform: none; letter-spacing: -.015em;
}
.pm-hero p { margin: 0 0 16px; color: #C9C6C2; font-size: 14px; max-width: 56ch; line-height: 1.55; }
.pm-hero .btn-row { gap: 10px; }
.pm-hero-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.pm-hero-points li {
    display: flex; align-items: center; gap: 9px; font-size: 13px; color: #E8E5E2;
}
.pm-hero-points i { width: 16px; height: 16px; color: var(--brand-2); flex-shrink: 0; }

/* -------------------------------------------------------------- app tiles */
.pg-grid {
    display: grid; gap: 14px;
    grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
}
.pg-tile {
    display: flex; flex-direction: column; gap: 10px; padding: 15px;
    background: var(--dm-surface, #fff); border: 1px solid var(--line); border-radius: 14px;
    text-decoration: none; color: var(--ink); min-width: 0;
}
.pg-tile:hover { border-color: var(--brand-2); box-shadow: 0 6px 18px rgba(0,0,0,.06); }
.pg-tile-head { display: flex; align-items: flex-start; gap: 11px; min-width: 0; }
.pg-tile-icon {
    width: 42px; height: 42px; border-radius: 11px; display: grid;
    place-items: center; color: #fff; flex-shrink: 0;
}
.pg-tile-icon i { width: 21px; height: 21px; }
.pg-tile-id { min-width: 0; flex: 1; }
.pg-tile-id h4 {
    margin: 0; font-size: 14.5px; line-height: 1.25; text-transform: none;
    letter-spacing: -.01em; overflow-wrap: anywhere;
}
.pg-tile-cat { font-size: 12px; color: var(--muted); }
.pg-tile-desc {
    margin: 0; font-size: 13px; color: var(--ink-grey); line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.pg-tile-foot {
    display: flex; align-items: center; gap: 8px; margin-top: auto;
    flex-wrap: wrap;
}
.pg-price {
    font-size: 12.5px; font-weight: 600; color: var(--ink);
    background: var(--bg); border-radius: 8px; padding: 5px 9px;
}
.pg-price.free { color: var(--muted); font-weight: 500; }
.pg-tile-foot .btn { margin-left: auto; }
.pg-tag {
    font-size: 11.5px; padding: 3px 8px; border-radius: 999px;
    background: var(--bg); color: var(--muted);
}
.pg-tag.ok { background: rgba(22,163,74,.10); color: #15803D; font-weight: 600; }
.pg-tag.off { background: rgba(180,83,9,.10); color: #B45309; font-weight: 600; }
.pg-tag.locked { background: var(--bg); color: var(--muted); }

/* v3.11.0 -- app versions and updates on My Apps */
.pa-ver {
    display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 600;
    padding: 1px 7px; border-radius: 999px; background: var(--bg);
    color: var(--muted); font-variant-numeric: tabular-nums;
}
.pg-tag.upd {
    display: inline-flex; align-items: center; gap: 4px;
    background: rgba(91,108,255,.12); color: #C2410C; font-weight: 600;
}
.pg-tag.upd svg { width: 13px; height: 13px; }
.pa-update-row {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    margin: 0 0 10px; padding: 8px 10px; border-radius: 10px;
    background: rgba(91,108,255,.06); border: 1px solid rgba(91,108,255,.22);
}
.pa-update-form { margin: 0 0 0 auto; }
.pa-update-ask { margin-left: auto; font-size: 12px; color: var(--muted); }
.pa-updates {
    display: flex; gap: 12px; align-items: flex-start; margin: 0 0 16px;
    padding: 12px 14px; border-radius: 12px;
    background: rgba(91,108,255,.08); border: 1px solid rgba(91,108,255,.28);
}
.pa-updates > svg { color: #C2410C; flex: none; margin-top: 2px; }
.pa-updates strong { display: block; color: var(--ink); }
.pa-updates span { font-size: 13px; color: var(--muted); }

/* list view (My Apps toggle) */
.pg-grid.as-list { grid-template-columns: minmax(0, 1fr); }
.pg-grid.as-list .pg-tile { flex-direction: row; align-items: center; gap: 14px; }
.pg-grid.as-list .pg-tile-head { flex: 1; align-items: center; }
.pg-grid.as-list .pg-tile-desc { display: none; }
.pg-grid.as-list .pg-tile-foot { margin-top: 0; width: auto; }
@media (max-width: 640px) {
    .pg-grid.as-list .pg-tile { flex-direction: column; align-items: stretch; }
}

/* --------------------------------------------------- My Apps: recent list */
.pa-recent { list-style: none; margin: 10px 0 0; padding: 0; }
.pa-recent li + li { border-top: 1px solid var(--line); }
.pa-recent a {
    display: flex; align-items: center; gap: 10px; padding: 9px 2px;
    text-decoration: none; color: var(--ink); font-size: 13.5px;
}
.pa-recent a:hover { color: var(--brand-text); }
.pa-recent .pa-recent-icon {
    width: 28px; height: 28px; border-radius: 8px; display: grid;
    place-items: center; color: #fff; flex-shrink: 0;
}
.pa-recent .pa-recent-icon i { width: 14px; height: 14px; }
.pa-recent .pa-recent-when { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ----------------------------------------------------------- empty states */
.pg-empty {
    background: var(--dm-surface, #fff); border: 1px solid var(--line); border-radius: 14px;
    padding: 42px 24px; text-align: center;
}
.pg-empty i { width: 34px; height: 34px; color: var(--muted); opacity: .5; }
.pg-empty h3 { margin: 14px 0 6px; font-size: 17px; text-transform: none; letter-spacing: -.01em; }
.pg-empty p { margin: 0 auto 16px; color: var(--muted); font-size: 14px; max-width: 46ch; line-height: 1.55; }

/* ===========================================================================
   v2.13.0 -- Team + Settings
   The last of the three company-side pages. Continues the vocabulary from
   v2.11.0 (.pnav/.pstat) and v2.12.0 (.pg-head/.pg-cols/.pg-rail/.pg-tag)
   rather than starting a third dialect, so all five pages share spacing,
   radius and colour without a per-page override anywhere.
   Prefix: .pt- (page: team)  .ps- (page: settings)
   =========================================================================== */

/* ------------------------------------------------------------ team: table */
.pt-toolbar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin: 0 0 2px;
}
.pt-toolbar .pt-search { flex: 1; min-width: 200px; max-width: 340px; }
/* The global form rule sets `select { width: 100% }`, which on a flex row
   makes the role filter claim the whole line and pushes the button onto a
   second row. Constrain it here (the same fix .pg-sort select needed). */
.pt-toolbar select {
    width: auto; flex: 0 0 auto; min-width: 150px;
    padding: 8px 10px; font-size: 13px;
}
.pt-table-wrap { overflow-x: auto; }
/* The wrapper scrolls, so the table is allowed to keep a workable width
   rather than compressing six columns into a phone: without the floor the
   user column collapsed to ~60px and broke every address over three
   lines. Below the floor the row scrolls sideways, which is the readable
   trade for a six-column table on a 390px screen. */
.pt-table {
    width: 100%; min-width: 660px;
    border-collapse: collapse; font-size: 13.5px;
}
.pt-table th {
    text-align: left; font-size: 11px; letter-spacing: .04em;
    text-transform: uppercase; color: var(--muted); font-weight: 700;
    padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.pt-table td {
    padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle;
}
.pt-table tr:last-child td { border-bottom: 0; }
.pt-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pt-avatar {
    width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
    display: grid; place-items: center; color: #fff; font-weight: 700;
    font-size: 13px; background: var(--brand);
}
.pt-user-id { min-width: 0; }
.pt-user-id strong { display: block; font-size: 13.5px; font-weight: 650; }
.pt-user-id span {
    display: block; font-size: 12px; color: var(--muted);
    overflow-wrap: anywhere;
}
.pt-when { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.pt-access { font-size: 12.5px; color: var(--ink-grey); }

/* role pills reuse the .pg-tag shape so a role reads like every other tag */
.pt-role { font-size: 11.5px; padding: 3px 9px; border-radius: 999px; font-weight: 600; }
.pt-role.owner { background: var(--brand-softer); color: var(--brand-text); }
.pt-role.admin { background: rgba(37,99,235,.10); color: #1D4ED8; }
.pt-role.member { background: var(--bg); color: var(--ink-grey); }

/* ------------------------------------------------- team: role explanations */
/* v2.18.0: .pt-roles / .pt-role-* removed with the Role permissions
   card. No other template used them. */

/* ------------------------------------------------------ team: pending list */
.pt-pending { list-style: none; margin: 0; padding: 0; }
.pt-pending li {
    display: flex; align-items: center; gap: 10px; padding: 11px 0;
    flex-wrap: wrap;
}
.pt-pending li + li { border-top: 1px solid var(--line); }
/* `flex: 1` alone is not enough on a phone: the avatar, the role pill and
   the two buttons claim the row first, and the email is squeezed to a few
   pixels, so `overflow-wrap: anywhere` then breaks it one letter per line.
   A flex-basis floor makes the address wrap the row instead of the word. */
.pt-pending-id { min-width: 0; flex: 1 1 190px; }
.pt-pending-id strong { display: block; font-size: 13.5px; overflow-wrap: anywhere; }
.pt-pending-id span { font-size: 12px; color: var(--muted); }
.pt-pending-actions { display: flex; gap: 6px; margin-left: auto; }

/* ---------------------------------------------------- team: activity trail */
.pt-activity { list-style: none; margin: 10px 0 0; padding: 0; }
.pt-activity li { display: flex; gap: 11px; padding: 9px 0; align-items: flex-start; }
.pt-activity li + li { border-top: 1px solid var(--line); }
.pt-activity-icon {
    width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
    display: grid; place-items: center; background: var(--brand-softer);
    color: var(--brand-text);
}
.pt-activity-icon i { width: 14px; height: 14px; }
.pt-activity-body { min-width: 0; flex: 1; }
.pt-activity-body strong { font-size: 13px; font-weight: 650; }
.pt-activity-body p { margin: 1px 0 0; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.pt-activity-when { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

/* =============================================================== settings */
.ps-cols {
    display: grid; grid-template-columns: 232px minmax(0, 1fr);
    gap: 20px; align-items: start;
}
@media (max-width: 900px) { .ps-cols { grid-template-columns: minmax(0, 1fr); } }

.ps-nav { display: flex; flex-direction: column; gap: 2px; }
.ps-nav a {
    display: flex; align-items: center; gap: 11px; padding: 10px 12px;
    border-radius: 10px; text-decoration: none; color: var(--ink-grey);
    font-size: 13.5px;
}
.ps-nav a:hover { background: var(--bg); color: var(--ink); }
.ps-nav a.active { background: var(--brand-softer); color: var(--brand-text); font-weight: 600; }
.ps-nav a i { width: 17px; height: 17px; flex-shrink: 0; }
.ps-nav-label { min-width: 0; }
.ps-nav-label strong { display: block; font-size: 13.5px; font-weight: inherit; }
.ps-nav-label span { display: block; font-size: 11.5px; color: var(--muted); }
/* A preview section is never dressed up as a working one. */
.ps-nav a.preview { opacity: .72; }
.ps-soon {
    margin-left: auto; font-size: 10px; letter-spacing: .04em;
    text-transform: uppercase; font-weight: 700; color: var(--muted);
    background: var(--bg); border-radius: 999px; padding: 2px 7px;
}

.ps-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1080px) { .ps-grid { grid-template-columns: minmax(0, 1fr); } }
.ps-grid .span-2 { grid-column: 1 / -1; }

/* plan card */
.ps-plan-head { display: flex; align-items: center; gap: 12px; }
.ps-plan-icon {
    width: 44px; height: 44px; border-radius: 12px; display: grid;
    place-items: center; background: var(--brand-softer); color: var(--brand-text);
}
.ps-plan-icon i { width: 22px; height: 22px; }
.ps-plan-name { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.ps-plan-sub { font-size: 12.5px; color: var(--muted); }
.ps-features { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.ps-features li { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.ps-features i { width: 15px; height: 15px; color: var(--ok); flex-shrink: 0; }

/* usage strip -- real counts only */
.ps-usage { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 4px; }
.ps-usage-item { display: flex; align-items: center; gap: 9px; }
.ps-usage-icon {
    width: 32px; height: 32px; border-radius: 9px; display: grid;
    place-items: center; background: var(--bg); color: var(--ink-grey);
}
.ps-usage-icon i { width: 16px; height: 16px; }
.ps-usage-value { font-size: 16px; font-weight: 700; line-height: 1.1; }
.ps-usage-label { font-size: 11.5px; color: var(--muted); }

/* preference rows */
.ps-prefs { list-style: none; margin: 0; padding: 0; }
.ps-prefs li {
    display: flex; align-items: center; gap: 12px; padding: 12px 0;
}
.ps-prefs li + li { border-top: 1px solid var(--line); }
.ps-pref-icon {
    width: 34px; height: 34px; border-radius: 10px; display: grid;
    place-items: center; background: var(--bg); color: var(--ink-grey); flex-shrink: 0;
}
.ps-pref-icon i { width: 17px; height: 17px; }
.ps-pref-body { min-width: 0; flex: 1; }
.ps-pref-body strong { display: block; font-size: 13.5px; }
.ps-pref-body span { font-size: 12.5px; color: var(--muted); }

/* the switch */
.ps-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.ps-switch input { opacity: 0; width: 0; height: 0; }
.ps-switch .ps-slider {
    position: absolute; inset: 0; cursor: pointer; border-radius: 999px;
    background: #D4D4D8; transition: background .15s ease;
}
.ps-switch .ps-slider::before {
    content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px;
    background: #fff; border-radius: 50%; transition: transform .15s ease;
}
.ps-switch input:checked + .ps-slider { background: var(--brand); }
.ps-switch input:checked + .ps-slider::before { transform: translateX(18px); }
.ps-switch input:focus-visible + .ps-slider { outline: 2px solid var(--brand-dark); outline-offset: 2px; }

/* a preview panel states plainly that it is a preview */
.ps-preview-note {
    display: flex; gap: 10px; align-items: flex-start; padding: 12px;
    border: 1px dashed var(--line); border-radius: 12px; background: var(--bg);
    font-size: 12.5px; color: var(--muted); line-height: 1.5;
}
.ps-preview-note i { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }

/* ======================================================= ADMIN APP TILES
   v2.13.2 - the admin catalogue is a grid of icons rather than a stack of
   full-width line items. A tile carries the icon and the name only; every
   control (publish, feature, edit, export, delete) lives on the detail page
   the tile links to. State the operator must not miss - unpublished, missing
   package - is shown as a small dot, because an icon-only tile that hides a
   broken package would be worse than the list it replaced. */
.app-tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 14px;
}
.app-tile {
    position: relative;
    display: flex; flex-direction: column; align-items: center; gap: 11px;
    padding: 22px 12px 18px; text-align: center;
    background: var(--dm-surface, #fff); border: 1px solid var(--line);
    border-radius: var(--card-radius); color: var(--ink); text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s;
}
.app-tile:hover {
    transform: translateY(-3px); border-color: var(--brand-soft);
    box-shadow: 0 12px 26px rgba(0, 0, 0, .10);
}
.app-tile:focus-visible {
    outline: 2px solid var(--brand); outline-offset: 2px;
}
.app-tile strong {
    font-size: 13px; line-height: 1.3; font-weight: 600;
    word-break: break-word;
}
/* The tile is icon + name only. A dot in the corner flags state without
   turning the tile back into a line item. */
.app-tile-dot {
    position: absolute; top: 10px; right: 10px;
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--muted);
}
.app-tile-dot.crit { background: var(--crit); }
.app-tile-dot.star { background: #E8A317; }
.app-tile.add { border-style: dashed; background: var(--dm-surface-2, #FAFAFA); }

/* ---- admin app detail page (v2.13.2) ---- */
.app-detail-head {
    display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap;
}
.app-detail-head .store-icon { flex-shrink: 0; }
.app-detail-headline { flex: 1 1 260px; min-width: 0; }
.app-detail-headline h2 { margin: 0 0 4px; font-size: 20px; }
.app-detail-actions {
    display: flex; flex-direction: column; gap: 8px;
    width: 190px; flex-shrink: 0;
}
@media (max-width: 700px) {
    .app-detail-actions { width: 100%; }
    .app-tile-grid {
        grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
    }
}


/* ==========================================================================
   ORBIT v2.14.0 - code samples on the package upload page
   The upload page is the first template in the tree to use <pre>, so there
   was nothing to inherit. The inline `code` rule paints a light chip with
   padding, which looks wrong stretched over a multi-line block, so the
   nested <code> is explicitly reset back to plain text inside a block.
   ========================================================================== */
.code-block {
    margin: 0;
    padding: 12px 14px;
    background: #FAFAFB;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow-x: auto;
    line-height: 1.55;
}
.code-block code {
    display: block;
    background: none;      /* undo the inline chip */
    padding: 0;
    border-radius: 0;
    font-size: 12px;
    color: var(--ink-grey);
    white-space: pre;
}

/* ==========================================================================
   Billing & plan, company portal (v2.15.0)

   Added with the page, not after it. Every class below is used by
   portal/settings_billing.html; nothing here is speculative. The money
   table is the reason this block exists - a customer reading what they owe
   should see a properly aligned statement, not a default HTML table.
   ========================================================================== */

/* The statement. Amounts are right-aligned and tabular so the digits line
   up column-wise; a total that does not align with the lines above it reads
   as sloppy on the one page where confidence matters most. */
.ps-bill { width: 100%; border-collapse: collapse; margin-top: 18px; }
.ps-bill th,
.ps-bill td {
    padding: 9px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--line);
}
.ps-bill th {
    text-align: left;
    font-weight: 500;
    color: var(--ink-grey);
    /* The global "th" rule paints every header cell #FAFAFA and uppercases
       it. In a two-column statement that produced a grey block behind the
       LABEL only, stopping dead in the middle of each row where the amount
       began - the shading read as a selected row rather than a line item.
       Only visible in a screenshot; no assertion would ever have caught it. */
    background: transparent;
    text-transform: none;
    letter-spacing: 0;
    font-size: 14px;
    padding-left: 0;
}
.ps-bill td { padding-right: 0; }
.ps-bill td {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
}
.ps-bill tr.ps-bill-total th,
.ps-bill tr.ps-bill-total td {
    border-bottom: none;
    border-top: 2px solid var(--ink);
    padding-top: 12px;
    font-size: 16px;
    font-weight: 700;
}
.ps-bill tr.ps-bill-total td { color: var(--brand-text); }

/* Free plans get a plain statement instead of a table of zeroes. */
.ps-bill-free {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg);
}
.ps-bill-free-amount {
    font-family: var(--font-head);
    font-size: 26px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.1;
    margin-bottom: 4px;
}

/* Stored card. Brand, last four and expiry only - never a number. */
.ps-card-row { display: flex; align-items: center; gap: 12px; }
.ps-card-row strong { display: block; font-size: 14px; }
.ps-card-row .muted { font-size: 12.5px; }
.ps-card-icon {
    width: 40px; height: 40px; flex: 0 0 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
    background: var(--brand-softer);
    color: var(--brand-text);
}
.ps-card-icon svg { width: 19px; height: 19px; }

/* Subscription statuses. These come straight from Subscription.status and
   had no pill colours at all, so "Payment overdue" rendered in the same
   neutral grey as "Active" - the one distinction on the page a customer
   must not miss. */
.pill.trialing { background: #e0f2fe; color: #075985; }
.pill.past_due { background: #fee2e2; color: #b91c1c; }
.pill.cancelled { background: var(--dm-surface-3, #F1F1F2); color: var(--muted); }

/* v2.15.1. "Expected" marker on a next-bill date that was worked out from
   the monthly cycle rather than confirmed by the payment provider. It has
   to read as a quiet qualifier sitting beside the date, NOT as a status
   pill competing with it - so: small, muted, no fill. Deliberately given a
   rule of its own: shipping a new class with no styling means it inherits
   whatever the surrounding element happens to be, which on this page is
   the 600-weight right-aligned .spec-list dd, and the qualifier would then
   look exactly as certain as the date it is qualifying. */
.ps-est {
    display: inline-block;
    margin-left: 7px;
    padding: 1px 7px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--dm-surface, #fff);
    color: var(--muted);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.6;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    vertical-align: middle;
    white-space: nowrap;
}

/* The plain-English qualifier under a billing date ("Expected date, based
   on your monthly billing cycle", "You will not be invoiced again"). The
   service layer works this wording out for every subscription state; the
   page has to actually show it, or the customer sees a bare date with no
   idea how much to trust it. Left-aligned against the right-aligned dd it
   follows, because it is a sentence, not a value. */
/* Selector is `.spec-list dd.ps-due-note`, not `.ps-due-note`, and that is
   not decoration. `.spec-list dd` sets `text-align: right; font-weight: 600`
   and scores 0,1,1 - one class plus one element - while a bare
   `.ps-due-note` scores only 0,1,0 and LOSES. Measured in a real browser,
   the note rendered right-aligned and looked like an indented fragment
   rather than a sentence, even though this block plainly said
   `text-align: left`. Every declaration here that contradicts
   `.spec-list dd` needs the extra weight to actually apply. */
.spec-list dd.ps-due-note {
    grid-column: 1 / -1;
    margin: -2px 0 2px;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.45;
    text-align: left;
}

/* ===================================================================
   v2.17.0 -- App settings, per-app configuration cards
   -------------------------------------------------------------------
   App settings stopped being a copy of My Apps and became real per-app
   config, so it needs its own furniture. A table was tried first and
   abandoned: each app carries a grid of access checkboxes, which no
   table row holds without becoming unreadable on a phone. Hence one
   card per app.

   Everything here reuses the existing tokens (--line, --muted, --crit,
   --brand-softer) rather than introducing new colours, so the page
   inherits any future theme change instead of drifting away from it. */

/* The "applications, per month" figure in the summary card head. Right
   aligned against the heading, and deliberately NOT a second invoice --
   it is one number that links through to Billing & plan. */
.ps-apps-total { text-align: right; flex: none; }
.ps-apps-total .muted { display: block; font-size: 12px; }
.ps-apps-total strong { font-size: 17px; color: var(--ink-black); }

/* One card per installed app. `margin-top` rather than a gap on a
   wrapper: these cards are siblings of the summary card, not children
   of a flex container, so a gap would not apply to them. */
.ps-app { margin-top: 14px; }

/* Icon + name + category, kept on one line so the card head can put the
   price opposite it. min-width:0 lets a long app name ellipsize instead
   of shoving the price off the edge. */
.ps-app-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ps-app-head h3 { margin: 0; }
.ps-app-head .muted { font-size: 12.5px; }

.ps-app-icon {
    width: 38px; height: 38px; border-radius: 10px; flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff;
}
/* The icon background is an inline style (each app carries its own
   colour in the database), so only the glyph is sized here. */
.ps-app-icon i { width: 19px; height: 19px; }

.ps-app-price { text-align: right; flex: none; white-space: nowrap; }
.ps-app-price strong { display: block; font-size: 15px; color: var(--ink-black); }
.ps-app-price .muted { font-size: 11.5px; }

/* "Disabled" beside the category. Uses --crit because a disabled app is
   still being charged for, which is exactly the state a manager needs to
   notice rather than skim past. */
.ps-app-off { color: var(--crit); font-weight: 700; }

/* Sub-heading inside a card body ("Who can open this"), with its count
   sitting quietly next to it. */
.ps-app-sub {
    display: flex; align-items: baseline; gap: 8px;
    margin: 0 0 10px; font-size: 13.5px; color: var(--ink-black);
}
.ps-app-sub .muted { font-weight: 500; font-size: 12.5px; }

/* The access checkboxes. Same shape as the existing `.checks` grid but
   tighter minmax: these hold a person's name, not a paragraph of
   explanation, so 220px fits three across on a desktop instead of two. */
.ps-access-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
}
/* A locked row is an owner or admin whose access comes from their role.
   It must not look clickable, because it is not: the input is disabled
   and the POST handler refuses to write a grant for a manager. */
.ps-access-grid .check.is-locked {
    background: var(--bg); cursor: default; border-style: dashed;
}
.ps-access-grid .check.is-locked:hover { border-color: var(--line); background: var(--bg); }
.ps-access-grid .check .muted { font-size: 12px; }

.ps-app-actions { margin-top: 12px; }

/* Disable and Remove, side by side, each with its own explanation. They
   are separated from the access form by a rule because they are a
   different kind of action -- one reversible, one not. */
.ps-app-danger {
    margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line);
    display: grid; gap: 12px;
}
.ps-app-danger form {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.ps-app-danger .muted { font-size: 12.5px; line-height: 1.5; flex: 1 1 260px; }

/* Remove is `.btn .btn-light .danger`, not `.btn-danger`: a solid red
   button is the wrong weight for a secondary action sitting inside a
   settings card, but it must still read as destructive. Light button,
   red text, red border on hover. Selector is `.btn.danger` (0,2,0) so it
   outscores `.btn-light` (0,1,0) and the colour actually applies -- the
   plain `.danger` this replaced lost to it and rendered black. */
.btn.danger { color: var(--crit); }
.btn.danger:hover { border-color: var(--crit); background: rgba(194, 38, 27, .06); filter: none; }
.btn.danger i { color: var(--crit); }

/* ---------------------------------------------------------------- company
   email (v3.0.0). The per-company SMTP section in the portal's settings
   rail. Four small classes rather than inline styles, so the page can be
   restyled with the rest of the shell when the brand lands. */

/* The one-sentence statement of what is happening to this workspace's mail
   right now. It sits above the fields because a filled-in form with the
   toggle off looks identical to a working one, and that sentence is the
   only thing on the page that distinguishes them. */
.ce-state {
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper, var(--dm-surface-2, #FAFBFC));
    font-size: 13px;
    line-height: 1.6;
    color: var(--ink-black);
}
.ce-state strong { font-weight: 600; }

/* The scope note: invitations and resets only, never invoices. Quieter than
   the state line -- it is a standing fact, not this workspace's status. */
.ce-scope {
    margin: 0 0 18px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--muted);
}

/* Checkbox sitting beside its own wording rather than in the label column,
   because "Remove the saved password" reads as an action, not a field name. */
.ce-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 400;
    color: var(--ink-black);
    cursor: pointer;
}
.ce-check input { margin: 0; }

/* The removal form. Separated from the save form by a real rule, so it is
   plainly not one of the fields above it. */
.ce-remove {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

/* --- v3.5.0: public integration URL on the App settings card ----------- */
/* The field is read-only and full width because the value is long and the
   whole of it matters -- a truncated URL that looks complete is worse than
   one that obviously scrolls. */
.ps-ingest-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 18px;
}
.ps-ingest-url {
  flex: 1 1 auto;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  background: var(--surface-2, #f7f7f8);
  cursor: text;
}
.ps-ingest-row .btn { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 560px) {
  .ps-ingest-row { flex-direction: column; align-items: stretch; }
}

/* v3.15.0 complimentary (admin-only) plan */
.comp-note { background: #FFF4EA; border: 1px solid #F5C89E; border-radius: 8px;
  padding: 10px 12px; font-size: 13px; line-height: 1.5; color: #26323F; margin-top: 22px; }
.comp-flag { color: #26323F; background: #FFF4EA; border-radius: 6px; padding: 6px 8px; }
/* v3.15.0: a long plan name ("Business (complimentary)") must wrap inside
   the stat's text column, not push the icon onto a new line. */
.stat > div:first-child:not(.icon) { flex: 1 1 0; min-width: 0; }

/* v3.17.0: team-member identity fields an admin may not change (the owner's
   name, email and phone) read as locked rather than as empty-looking inputs. */
.field-row[id^="identity-"] input:disabled {
  background: var(--bg); color: var(--muted, #6b7280); cursor: not-allowed;
}

/* ==========================================================================
   v3.18.0
   ========================================================================== */

/* ---- Settings > Appearance: theme cards ---------------------------------- */
.theme-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.theme-card {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  padding: 12px; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--dm-surface, #fff); cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.theme-card:hover { border-color: var(--brand); }
.theme-card.selected { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-softer); }
.theme-card input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.theme-card:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.theme-swatch {
  display: block; height: 74px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--line); background: var(--bg);
}
.theme-swatch-bar { display: flex; align-items: center; height: 20px; padding: 0 8px; }
.theme-swatch-bar span { width: 34px; height: 5px; border-radius: 3px; opacity: .9; }
.theme-swatch-body { display: flex; flex-direction: column; gap: 6px; padding: 9px 8px; }
.theme-swatch-btn { width: 54px; height: 12px; border-radius: 999px; }
.theme-swatch-line { height: 5px; width: 70%; border-radius: 3px; }
.theme-swatch-line.short { width: 45%; background: var(--line); }
.theme-name { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.theme-blurb { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.density-row { display: flex; flex-wrap: wrap; gap: 12px; }
.density-opt { min-width: 240px; align-items: flex-start; }
.theme-preview { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.theme-preview-bar {
  background: var(--sidebar-bg); color: var(--sidebar-text);
  padding: 12px 16px; font-family: var(--font-head); font-weight: 700;
}
.theme-preview-body { padding: 16px; background: var(--bg); }
.theme-preview-body p { margin: 0 0 12px; }

/* ---- Compact density ----------------------------------------------------- */
.density-compact .card-body { padding: 14px; }
.density-compact .card-head { padding: 10px 14px; }
.density-compact .card { margin-bottom: 14px; }
.density-compact .pt-table td { padding: 7px 10px; }
.density-compact .pt-table th { padding: 7px 10px; }
.density-compact .pstat { padding: 12px 14px; }
.density-compact .field { margin-bottom: 10px; }

/* ---- Team: Edit as a modal ----------------------------------------------- */
.pt-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: none; align-items: flex-start; justify-content: center;
  padding: 6vh 16px; overflow-y: auto;
  background: rgba(20, 24, 31, .48);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.pt-modal.open { display: flex; }
.pt-modal-box {
  width: 100%; max-width: 760px; background: var(--dm-surface, #fff);
  border-radius: var(--card-radius); box-shadow: 0 24px 60px rgba(0, 0, 0, .22);
  animation: pt-modal-rise .16s ease-out;
}
@keyframes pt-modal-rise { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.pt-modal-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.pt-modal-head h3 { margin: 0; font-size: 16px; }
.pt-modal-head .pt-user-id span { color: var(--muted); font-size: 12.5px; }
.pt-modal-close {
  margin-left: auto; border: 0; background: transparent; cursor: pointer;
  width: 34px; height: 34px; border-radius: 999px; color: var(--muted);
  display: grid; place-items: center;
}
.pt-modal-close:hover { background: var(--bg); color: var(--ink); }
.pt-modal-close svg { width: 18px; height: 18px; }
.pt-modal-body { padding: 18px 20px 20px; }
.pt-modal-foot {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding-top: 14px; margin-top: 6px; border-top: 1px solid var(--line);
}
.pt-modal-foot .pt-modal-spacer { flex: 1 1 auto; }
.pt-modal-foot form { margin: 0; }
body.pt-modal-lock { overflow: hidden; }
@media (max-width: 640px) {
  .pt-modal { padding: 0; align-items: flex-end; }
  .pt-modal-box { border-radius: 16px 16px 0 0; max-height: 92vh; overflow-y: auto; }
}

/* ---- Team: bulk import --------------------------------------------------- */
.ti-steps { margin: 0 0 14px; padding-left: 18px; color: var(--ink-grey); }
.ti-steps li { margin-bottom: 4px; }
.ti-drop {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 22px; border: 1.5px dashed var(--line); border-radius: 12px;
  text-align: center; cursor: pointer; color: var(--muted);
}
.ti-drop:hover, .ti-drop.drag { border-color: var(--brand); background: var(--brand-softer); }
.ti-drop input[type=file] { display: none; }
.ti-drop strong { color: var(--ink); }
.ti-file { margin-top: 8px; font-size: 13px; }
.ti-file:not(:empty) { color: var(--ink); font-weight: 600; }
.ti-samples { margin-bottom: 14px; }
#import-file-error:not(:empty) { color: var(--crit, #B42318); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.ti-reason { font-size: 12.5px; color: var(--crit, #B42318); }
.ti-table td.ti-bad { color: var(--crit); }
.ti-table tr.ti-skip td { background: #FFF6F5; }
.ti-table tr.ti-ok td:first-child { border-left: 3px solid var(--ok); }
.ti-table tr.ti-skip td:first-child { border-left: 3px solid var(--crit); }
.ti-summary { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }

/* ---- App logos ----------------------------------------------------------- */
/* v3.24.0: "it needs to fill the whole icon". The v3.18.0 rule framed every
   logo in a white tile with a border and 3px of padding, which read as a
   white ring around the artwork. A logo now fills its icon edge to edge, is
   clipped to the icon's own rounded corners and sits on a soft shadow -- the
   way an app icon looks on a phone. One rule for every icon class that can
   carry a logo (store-icon, pg-tile-icon, prow-icon, launch-icon, app-dot,
   app-header-icon, pa-recent-icon, ps-app-icon, s-app-ico, integ-logo), so
   no page can be left behind with the old frame. Margins baked into the
   image itself are trimmed when the logo is stored (app_logos.trim_margins). */
.app-logo-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  border-radius: inherit;
}
.has-logo {
  background: transparent !important; border: 0 !important; padding: 0 !important;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .12), 0 6px 16px rgba(16, 24, 40, .10) !important;
}
.has-logo > .app-logo-img { width: 100%; height: 100%; max-width: none; }
.has-logo.logo-full { padding: 0 !important; }
.app-logo-admin { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.app-logo-admin .store-icon { width: 64px; height: 64px; }

/* ---------------------------------------------------------------------------
   v3.19.0: Settings > Integrations and the Grok page.
   ------------------------------------------------------------------------- */
.integ-grid { display: grid; gap: 10px; }
.integ-card {
    display: flex; align-items: center; gap: 14px; padding: 14px 16px;
    border: 1px solid var(--line); border-radius: 12px; background: var(--dm-surface, #fff);
    color: inherit; text-decoration: none;
    transition: border-color .14s ease, background .14s ease;
}
.integ-card:hover { border-color: var(--brand); background: var(--brand-softer); }
.integ-logo { width: 44px; height: 44px; border-radius: 10px; flex: none; }
.integ-text { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.integ-name { font-size: 15px; }
.integ-blurb { font-size: 13px; color: var(--muted); line-height: 1.45; }
.integ-state { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.integ-go { font-size: 12.5px; color: var(--brand-text, var(--brand)); font-weight: 600; }
.integ-more { margin: 12px 0 0; font-size: 12.5px; }
/* v3.27.0: integration groups and the Azure Storage page. */
.integ-group + .integ-group { margin-top: 22px; }
.integ-group-title { margin: 0 0 2px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.integ-group-blurb { margin: 0 0 10px; font-size: 12.5px; }
.azs-loc-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 12px; align-items: end; margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.azs-loc-form .field { margin: 0; }
.azs-loc-form > .check, .azs-loc-form > div:last-child { grid-column: 1 / -1; }
.azs-loc-form > .check { display: flex; gap: 8px; align-items: center; border: 0; padding: 0; min-height: 0; }
.azs-loc-form > .check input { width: auto; }
.azs-loc-form input, .azs-loc-form select { width: 100%; }
.azs-path { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.azs-app-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.azs-app-form select { width: auto; min-width: 150px; flex: 0 0 auto; }
.azs-app-locs { display: flex; flex-wrap: wrap; gap: 4px 12px; flex-basis: 100%; font-size: 12.5px; }
.azs-app-locs[hidden] { display: none; }
.azs-browse-crumb { font-size: 13px; margin: 0 0 8px; }
.azs-bad { color: var(--danger, #B42318); font-size: 12.5px; }
.integ-crumb { margin: 0 0 10px; font-size: 13px; }
.grok-head { display: flex; align-items: center; gap: 14px; }
.grok-head h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.copy-row { display: flex; gap: 8px; align-items: center; margin: 6px 0 4px; }
.copy-row input { flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.grok-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 14px; }
.grok-step { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.grok-step h4 { margin: 0 0 6px; font-size: 14px; }
.grok-step ol { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.55; }
.grok-step p { font-size: 12.5px; margin: 8px 0 0; }
.grok-code {
    margin: 8px 0 0; padding: 10px 12px; border-radius: 8px; background: #0f172a;
    color: #e2e8f0; font-size: 12px; overflow-x: auto; white-space: pre;
}
.grok-sub { margin: 18px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.grok-who { display: grid; gap: 8px; }
.grok-people { margin: 8px 0 0 26px; }
.grok-people[hidden] { display: none; }
.grok-token-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.grok-token-form input[type=text] { flex: 1 1 220px; width: auto; }
.grok-token-form select { flex: 0 1 260px; width: auto; }
.grok-table td, .grok-table th { padding: 8px 10px; text-align: left; font-size: 13px; border-bottom: 1px solid var(--line); }
.grok-table form { margin: 0; }
.grok-newtoken { border-color: var(--ok); }

/* v3.20.0: Settings > Integrations > Grok -- the "Chat in Orbit" card. */
.grok-chat-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 14px 0 4px; }
.grok-chat-fields input[type="password"], .grok-chat-fields input[type="text"] { width: 100%; margin: 6px 0 4px; }
.grok-chat-saved { margin: 4px 0 0; }
.grok-chat-test { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px;
                  padding-top: 12px; border-top: 1px solid var(--line); }

/* v3.21.0: Sign in with Microsoft (Microsoft's own button guidance:
   white, 1px grey border, the four-square logo, dark grey text). */
.ms-or { display: flex; align-items: center; gap: 10px; margin: 16px 0 12px;
         color: var(--muted, #5B6470); font-size: 12.5px; }
.ms-or::before, .ms-or::after { content: ""; flex: 1 1 auto; height: 1px;
         background: var(--line, #D8DDE3); }
.btn-ms { display: inline-flex; align-items: center; justify-content: center;
          gap: 10px; background: #fff; color: #5E5E5E; border: 1px solid #8C8C8C;
          font-weight: 600; text-decoration: none; }
.btn-ms:hover { background: var(--dm-surface-3, #F3F3F3); color: #2B2B2B; text-decoration: none; }
.btn-ms:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(0, 120, 212, .35); }
.ms-note { font-size: 12.5px; color: var(--muted, #5B6470); margin: 10px 0 0; }
/* v3.21.0: Settings > Integrations > Microsoft Entra ID */
.entra-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
              gap: 4px 18px; margin-top: 14px; }
.entra-hint { display: block; font-size: 12.5px; margin-top: 4px; }
.entra-inline { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px;
                font-weight: 400; }
.entra-map-form { margin-top: 18px; border-top: 1px solid var(--line, #D8DDE3); padding-top: 6px; }
.entra-sync-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.entra-sync-actions form { margin: 0; }
.entra-plan { margin-top: 16px; }

/* ======================================================================
   v3.24.0 -- marketplace app page (C layout + B strip/tabs + A gallery)
   Everything is drawn from the theme variables so all 8 themes follow.
   ====================================================================== */
.btn-xs { padding: 4px 7px; font-size: 11.5px; border-radius: 6px; }
.btn-xs svg { width: 13px; height: 13px; }
.btn-danger-soft { background: var(--dm-surface, #fff); color: var(--crit); border-color: #F3C7C3; }
.btn-danger-soft:hover { background: #FEF3F2; }

.ad-page {
    display: grid; gap: 20px; align-items: start;
    grid-template-columns: minmax(0, 1fr) 320px;
}
.ad-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; min-width: 0; }
.ad-main > * { min-width: 0; }

.ad-hero {
    position: relative; overflow: hidden;
    padding: 34px 34px 30px; border-radius: 18px; border: 1px solid var(--line);
    background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 13%, var(--dm-surface, #fff)) 0%, var(--dm-surface, #fff) 62%);
}
.ad-hero::after {
    content: ""; position: absolute; right: -80px; top: -80px;
    width: 300px; height: 300px; border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%);
}
.ad-hero > * { position: relative; z-index: 1; }
.ad-eyebrow {
    display: block; font-size: 11.5px; font-weight: 800; letter-spacing: .12em;
    color: var(--brand-text); text-transform: uppercase;
}
.ad-hero h2 {
    font-family: var(--font-head); font-size: 38px; line-height: 1.08;
    letter-spacing: -.02em; margin: 10px 0 12px; max-width: 20ch; color: var(--ink);
}
.ad-hero p { font-size: 15.5px; color: var(--ink-grey); max-width: 60ch; line-height: 1.55; margin: 0; }

.ad-strip {
    display: grid; grid-template-columns: repeat(5, 1fr);
    background: var(--dm-surface, #fff); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
}
.ad-strip > div { padding: 13px 10px; text-align: center; border-right: 1px solid var(--line); min-width: 0; }
.ad-strip > div:last-child { border-right: 0; }
.ad-strip span {
    display: block; font-size: 10.5px; color: var(--muted); text-transform: uppercase;
    letter-spacing: .08em; font-weight: 600;
}
.ad-strip b { font-size: 16px; display: block; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-ok { color: var(--ok); }
.ad-muted { color: var(--muted); font-weight: 600; }

.ad-sec-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.ad-sec-h h3 { font-size: 17px; margin: 0; font-family: var(--font-head); }
.ad-sec-h .muted { font-size: 12.5px; }
.ad-gal-wrap { position: relative; }
.ad-track {
    display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
    padding: 2px 2px 10px; scrollbar-width: thin;
}
.ad-shot {
    flex: 0 0 min(460px, 85%); scroll-snap-align: start; margin: 0;
    border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--dm-surface, #fff);
    transition: transform .15s, box-shadow .15s;
}
.ad-shot:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(16, 24, 40, .12); }
.ad-shot-open { display: block; width: 100%; padding: 0; border: 0; background: var(--dm-surface-2, #F7F8FA); cursor: zoom-in; }
.ad-shot-open img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center; }
.ad-shot figcaption {
    padding: 10px 14px; font-size: 12.5px; color: var(--ink-grey);
    border-top: 1px solid var(--line);
}
.ad-shot figcaption b { color: var(--ink); }
.ad-nav {
    position: absolute; top: 42%; width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid var(--line); background: var(--dm-surface, #fff); color: var(--ink);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .12); cursor: pointer;
    font-size: 20px; line-height: 1; display: grid; place-items: center;
}
.ad-nav.l { left: -12px; }
.ad-nav.r { right: -12px; }
.ad-dots { display: flex; gap: 6px; justify-content: center; margin-top: 4px; }
.ad-dots button {
    width: 7px; height: 7px; border-radius: 50%; border: 0; padding: 0;
    background: #D0D5DD; cursor: pointer; transition: width .15s;
}
.ad-dots button.on { background: var(--brand); width: 18px; border-radius: 4px; }

.ad-tabs-card { padding: 0; overflow: hidden; }
.ad-tabs {
    display: flex; gap: 2px; border-bottom: 1px solid var(--line);
    padding: 0 14px; overflow-x: auto;
}
.ad-tabs button {
    padding: 13px 14px; font: inherit; font-weight: 600; font-size: 13.5px;
    color: var(--muted); background: none; border: 0;
    border-bottom: 2.5px solid transparent; cursor: pointer; white-space: nowrap;
}
.ad-tabs button:hover { color: var(--ink); }
.ad-tabs button.on { color: var(--ink); border-bottom-color: var(--brand); }
.ad-n {
    font-size: 11px; background: var(--dm-surface-3, #EEF0F3); border-radius: 999px;
    padding: 1px 7px; margin-left: 5px; color: #475467;
}
/* Without JavaScript every pane shows, one after another. */
.ad-pane { padding: 22px; }
.ad-pane + .ad-pane { border-top: 1px solid var(--line); }
.ad-tabs-card:not(.js) .ad-tabs { display: none; }
.ad-tabs-card.js .ad-pane { display: none; border-top: 0; }
.ad-tabs-card.js .ad-pane.on { display: block; }
.ad-pane-title { font-size: 15px; margin: 22px 0 10px; font-family: var(--font-head); }
.ad-pane-title:first-child { margin-top: 0; }
.ad-desc p { margin: 0 0 10px; line-height: 1.6; color: var(--ink-grey); }

.ad-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ad-step { display: flex; gap: 12px; align-items: flex-start; }
.ad-step b { display: block; font-size: 14px; }
.ad-step p { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.ad-step-n {
    flex: 0 0 34px; height: 34px; border-radius: 50%;
    background: var(--brand); color: var(--brand-on);
    display: grid; place-items: center; font-weight: 800;
}
.ad-hls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ad-hls.two { grid-template-columns: 1fr 1fr; margin-top: 14px; }
.ad-hl {
    padding: 16px; border-radius: 14px; background: var(--dm-surface-2, #FAFBFC); border: 1px solid var(--line);
    transition: transform .15s, box-shadow .15s, background .15s;
}
.ad-hl:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(16, 24, 40, .07); background: var(--dm-surface, #fff); }
.ad-hl-icon {
    width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
    background: var(--brand-softer); color: var(--brand-text); margin-bottom: 9px;
}
.ad-hl-icon svg { width: 18px; height: 18px; }
.ad-hl h4 { font-size: 14px; margin: 0 0 3px; }
.ad-hl p { color: var(--muted); font-size: 12.5px; line-height: 1.45; margin: 0; }
.ad-checks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 22px; }
.ad-checks li {
    display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px;
    padding: 9px 0; border-bottom: 1px solid var(--dm-surface-3, #F2F4F7); line-height: 1.4;
}
.ad-checks svg { width: 16px; height: 16px; color: var(--brand-text); flex: 0 0 auto; margin-top: 1px; }

.ad-side { position: sticky; top: 76px; display: grid; gap: 14px; }
.ad-card { padding: 20px; }
.ad-card .ad-card-icon { margin-bottom: 12px; }
.ad-card-name { font-family: var(--font-head); font-size: 21px; margin: 0; }
.ad-card-tag { color: var(--muted); font-size: 13px; margin: 4px 0 14px; line-height: 1.45; }
.ad-card .detail-action { margin: 0 0 12px; }
.ad-ticks { list-style: none; margin: 0 0 12px; padding: 0; }
.ad-ticks li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; padding: 5px 0; }
.ad-ticks svg { width: 15px; height: 15px; color: var(--ok); flex: 0 0 auto; margin-top: 2px; }
.ad-danger-card { padding: 14px 18px; }
.ad-danger summary {
    cursor: pointer; font-size: 12.5px; color: var(--muted); font-weight: 600;
    list-style: none; display: flex; align-items: center; gap: 7px;
}
.ad-danger summary svg { width: 14px; height: 14px; }
.ad-danger summary::-webkit-details-marker { display: none; }
.ad-danger[open] summary { margin-bottom: 10px; color: var(--crit); }

.ad-lb {
    position: fixed; inset: 0; z-index: 200; background: rgba(10, 12, 16, .86);
    display: flex; align-items: center; justify-content: center;
    padding: 30px 80px; flex-direction: column; gap: 14px;
}
.ad-lb[hidden] { display: none; }
.ad-lb img {
    max-width: min(1100px, 100%); max-height: calc(100vh - 120px);
    border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); background: #fff;
}
.ad-lb-cap { color: #fff; font-size: 14px; text-align: center; white-space: pre-wrap; }
.ad-lb-x {
    position: absolute; top: 14px; right: 22px; color: #fff; font-size: 32px;
    cursor: pointer; background: none; border: 0; line-height: 1;
}
.ad-lb-n {
    position: absolute; top: 50%; transform: translateY(-50%);
    color: #fff; font-size: 30px; line-height: 1; background: rgba(255, 255, 255, .14);
    border: 0; width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
}
.ad-lb-n.l { left: 18px; }
.ad-lb-n.r { right: 18px; }
body.ad-lb-open { overflow: hidden; }

@media (max-width: 980px) {
    .ad-page { grid-template-columns: 1fr; }
    .ad-side { position: static; order: -1; }
}
@media (max-width: 720px) {
    .ad-strip { grid-template-columns: repeat(2, 1fr); }
    .ad-strip > div { border-bottom: 1px solid var(--line); }
    .ad-steps, .ad-hls, .ad-hls.two, .ad-checks { grid-template-columns: 1fr; }
    .ad-hero { padding: 24px; }
    .ad-hero h2 { font-size: 28px; }
    .ad-lb { padding: 20px; }
}

/* ======================================================================
   v3.24.0 -- home "Make it yours"
   ====================================================================== */
.hcust {
    margin: 0 0 16px; background: var(--dm-surface, #fff); border: 1px solid var(--line);
    border-radius: var(--card-radius);
}
.hcust > summary {
    cursor: pointer; list-style: none; padding: 11px 16px;
    display: flex; align-items: center; gap: 8px;
    font-weight: 600; font-size: 13.5px; color: var(--ink-grey);
}
.hcust > summary::-webkit-details-marker { display: none; }
.hcust > summary svg { width: 15px; height: 15px; color: var(--brand-text); }
.hcust[open] > summary { border-bottom: 1px solid var(--line); }
.hcust-form { padding: 16px; display: grid; gap: 16px; }
.hcust-group { display: grid; gap: 8px; }
.hcust-label {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .08em; color: var(--muted);
}
.hcust-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hcust-chip {
    display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
    padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px;
    font-size: 13px; background: var(--dm-surface, #fff);
}
.hcust-chip:has(input:checked) { border-color: var(--brand); background: var(--brand-softer); }
.hcust-chip input { accent-color: var(--brand); margin: 0; }
.hcust-order { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-width: 520px; }
.hcust-order li {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--dm-surface-2, #FAFBFC);
}
.hcust-name { flex: 1 1 auto; font-size: 13.5px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hcust-pin { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; color: #C0C6CF; font-size: 15px; }
.hcust-pin input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.hcust-pin:has(input:checked) { color: var(--brand); }
.hcust-pin:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

.hseg { display: inline-flex; justify-self: start; width: max-content; background: var(--dm-surface-3, #EEF0F3); border-radius: 10px; padding: 3px; gap: 2px; }
.hseg label { cursor: pointer; }
.hseg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.hseg span, .hseg button {
    display: inline-block; border: 0; background: transparent;
    padding: 6px 12px; border-radius: 8px; font: inherit; font-weight: 600;
    font-size: 12.5px; color: var(--muted); cursor: pointer;
}
.hseg input:checked + span, .hseg button.on {
    background: var(--dm-surface, #fff); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}
.hseg input:focus-visible + span { outline: 2px solid var(--brand); }
.hseg-sm span, .hseg-sm button { padding: 4px 10px; font-size: 12px; }
form.hseg { margin: 0; }
.happs-tools { display: flex; align-items: center; gap: 12px; }

.phero-row.single { grid-template-columns: minmax(0, 1fr); }
.happs-card { margin: 0 0 18px; }
.happs { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
.happ {
    position: relative; border-radius: 16px; background: var(--dm-surface, #fff);
    border: 1px solid var(--line); transition: transform .15s, box-shadow .15s, border-color .15s;
}
.happ:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: 0 10px 22px rgba(16, 24, 40, .08); }
.happ-link {
    display: flex; flex-direction: column; align-items: center; gap: 9px;
    padding: 18px 10px 14px; text-align: center; color: inherit; text-decoration: none;
}
.happ-icon.store-icon { width: 60px; height: 60px; flex: 0 0 60px; border-radius: 17px; }
.happ-text { display: grid; gap: 2px; min-width: 0; max-width: 100%; }
.happ-text strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.happ-text small { font-size: 11px; color: var(--muted); }
.happ-pin-form { position: absolute; top: 6px; right: 6px; margin: 0; }
.happ-pin {
    border: 0; background: none; cursor: pointer; font-size: 14px; line-height: 1;
    padding: 3px; color: #C9CED6; opacity: 0; transition: opacity .15s;
}
.happ:hover .happ-pin, .happ-pin:focus-visible, .happ.pinned .happ-pin { opacity: 1; }
.happ.pinned .happ-pin { color: var(--brand); }

.happs-list { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.happs-list .happ-link { flex-direction: row; text-align: left; padding: 10px 34px 10px 12px; gap: 12px; }
.happs-list .happ-icon.store-icon { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; }
.happs-list .happ-icon i { width: 19px; height: 19px; }
.happs-list .happ-pin-form { top: 50%; transform: translateY(-50%); right: 8px; }

.happs-compact { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.happs-compact .happ { border-color: transparent; background: transparent; }
.happs-compact .happ:hover { background: var(--dm-surface, #fff); border-color: var(--line); box-shadow: none; }
.happs-compact .happ-link { padding: 10px 4px 8px; gap: 7px; }
.happs-compact .happ-icon.store-icon { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 15px; }
.happs-compact .happ-text small { display: none; }
.happs-compact .happ-text strong { font-size: 12px; }

.hcols { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* ======================================================================
   v3.24.0 -- the activity bell in the portal top bar
   ====================================================================== */
.pbell { position: relative; }
.pbell > summary {
    list-style: none; cursor: pointer; width: 36px; height: 36px; border-radius: 10px;
    display: grid; place-items: center; background: rgba(255, 255, 255, .07);
    color: var(--sidebar-text);
}
.pbell > summary::-webkit-details-marker { display: none; }
.pbell > summary:hover, .pbell[open] > summary { background: rgba(255, 255, 255, .15); }
.pbell > summary svg { width: 17px; height: 17px; }
.pbell-drop {
    position: absolute; right: 0; top: calc(100% + 8px); width: 320px;
    background: var(--dm-surface, #fff); color: var(--ink); border: 1px solid var(--line);
    border-radius: 14px; box-shadow: 0 20px 44px rgba(16, 24, 40, .18);
    padding: 6px 0; z-index: 50;
}
.pbell-head { padding: 9px 16px 10px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.pbell-list { list-style: none; margin: 0; padding: 0 16px; max-height: 360px; overflow-y: auto; }
.pbell-list li { padding: 9px 0; border-bottom: 1px solid var(--dm-surface-3, #F2F4F7); font-size: 12.5px; }
.pbell-list li:last-child { border-bottom: 0; }
.pbell-list li b { display: block; font-weight: 600; color: var(--ink); }
.pbell-list li span { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.pbell-empty { color: var(--muted); text-align: center; }
.pbell-all {
    display: block; padding: 10px 16px 6px; border-top: 1px solid var(--line);
    font-size: 13px; font-weight: 600; color: var(--brand-text); text-decoration: none;
}
.pbell-all:hover { text-decoration: underline; }
@media (max-width: 560px) { .pbell-drop { width: min(320px, calc(100vw - 24px)); right: -60px; } }

/* ======================================================================
   v3.24.0 -- admin screenshot manager
   ====================================================================== */
.shot-admin-list { display: grid; gap: 10px; margin: 0 0 14px; }
.shot-admin {
    display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 12px;
    align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 12px;
}
.shot-admin-thumb {
    width: 150px; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden;
    background: var(--dm-surface-3, #F2F4F7); display: grid; place-items: center; font-size: 12px;
}
.shot-admin-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.shot-admin-form { display: grid; gap: 6px; margin: 0; }
.shot-admin-acts { display: flex; gap: 6px; align-items: center; }
.shot-admin-acts form { margin: 0; }
.shot-admin-pkg { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 14px; }
.shot-admin-pkg img { width: 120px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.shot-admin-add { display: grid; gap: 8px; max-width: 520px; }
@media (max-width: 720px) {
    .shot-admin { grid-template-columns: 1fr; }
}

/* v3.28.0: the administrator is signed in as a company user. */
.act-as-bar { position: sticky; top: 0; z-index: 1000; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 16px;
  background: #7c2d12; color: #fff; font-size: 13.5px; }
.act-as-bar .act-as-text { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.act-as-bar svg { width: 16px; height: 16px; }
.act-as-bar .act-as-email { opacity: .8; }
.act-as-bar strong { color: #fff; }
.act-as-form { margin: 0; }
.act-as-return { display: inline-flex; align-items: center; gap: 6px; border: 0; cursor: pointer;
  background: #fff; color: #7c2d12; font-weight: 600; font-size: 13px; padding: 6px 12px; border-radius: 8px; }
.act-as-return:hover { background: #ffedd5; }
form.act-as-row { display: inline; margin: 0; }

/* v3.30.0 -- monthly / annual toggle (signup plan step + pricing page) */
.interval-toggle { display:inline-flex; gap:4px; padding:4px; border-radius:999px;
  background:rgba(0,0,0,.05); margin-bottom:16px; }
.interval-toggle label { display:inline-flex; align-items:center; gap:6px; cursor:pointer;
  padding:7px 16px; border-radius:999px; font-weight:600; font-size:13.5px; }
.interval-toggle label input { position:absolute; opacity:0; pointer-events:none; }
.interval-toggle label.is-on { background:var(--dm-surface, #fff); box-shadow:0 1px 3px rgba(0,0,0,.12); }
.save-pill { font-size:11px; font-weight:700; color:#0a7a3b; background:#e3f6ea;
  padding:2px 8px; border-radius:999px; }
.addon-list .check-row { align-items:flex-start; }

/* ==========================================================================
   v3.31.0 -- PLANS & PRICING / APP PRICING, cleaned up
   "Please clean up plans and pricing its just to messy and ugly i want to be
   able to click in to for eg Solo and it opens it up nice". A plan is a card
   on the list and a page of its own, built like a company page.
   ========================================================================== */
.set-bare { min-width: 0; }
.set-bare-body > .detail-tabs { margin-top: 0; }
.small { font-size: 12.5px; }
.pill.brand { background: var(--brand-softer); color: var(--brand-text); }

.plan-section-head {
    display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
    font-size: 15px; margin: 6px 0 12px;
}
.plan-section-head small { font-weight: 400; font-size: 12.5px; }
.plan-section-head .tab-count {
    background: var(--dm-surface-3, #F1F1F2); color: var(--ink-grey); border-radius: 999px;
    font-size: 11px; padding: 1px 8px; font-weight: 700;
}
.pcard-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px; margin-bottom: 26px;
}
.pcard-wrap { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pcard-wrap > .pcard { flex: 1; }
.pcard {
    position: relative; display: flex; flex-direction: column; gap: 14px;
    background: var(--dm-surface, #fff); border: 1px solid var(--line); border-radius: var(--card-radius);
    padding: 18px 18px 16px; color: var(--ink);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.pcard:hover {
    color: var(--ink); border-color: var(--brand);
    box-shadow: 0 6px 18px rgba(20, 24, 31, .08); transform: translateY(-1px);
}
.pcard.is-featured { border-top: 3px solid var(--brand); padding-top: 16px; }
.pcard.is-archived { background: var(--orbit-paper, var(--dm-surface-2, #FAFBFC)); }
.pcard.is-archived .pc-amount { color: var(--muted); }
.pcard-top { display: flex; align-items: flex-start; gap: 12px; }
.pcard-icon {
    width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--brand-softer); color: var(--brand-text);
}
.pcard-icon i { width: 19px; height: 19px; }
.pcard-title { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pcard-title strong { font-family: var(--font-head); font-size: 16.5px; line-height: 1.25; }
.pcard-title .muted { font-size: 12.5px; }
.pcard-tags { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.pcard-price { display: flex; align-items: baseline; gap: 6px; }
.pc-amount { font-family: var(--font-head); font-size: 28px; font-weight: 700; letter-spacing: -.01em; }
.pc-per { font-size: 12.5px; color: var(--muted); }
.pcard-meta {
    display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--ink-grey);
    border-top: 1px solid var(--line); padding-top: 12px;
}
.pcard-meta span { display: inline-flex; align-items: center; gap: 5px; }
.pcard-meta i { width: 13px; height: 13px; }
.pcard-meta .pc-warn { color: #b45309; font-weight: 600; }
.pcard-open {
    position: absolute; right: 16px; bottom: 14px; display: inline-flex; align-items: center;
    font-size: 12px; font-weight: 600; color: var(--brand-text); opacity: 0;
    transition: opacity .15s ease;
}
.pcard-open i { width: 14px; height: 14px; }
.pcard:hover .pcard-open { opacity: 1; }
.pcard-add {
    align-items: center; justify-content: center; text-align: center; gap: 6px;
    border-style: dashed; background: transparent; box-shadow: none; min-height: 170px;
    color: var(--ink-grey);
}
.pcard-add i { width: 26px; height: 26px; color: var(--brand-text); }
.pcard-add .muted { font-size: 12.5px; }
.pcard-delete { display: flex; gap: 8px; align-items: center; }
.pcard-delete select { flex: 1; min-width: 0; padding: 6px 8px; font-size: 12.5px; }
.plan-tools {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
    padding-top: 16px; border-top: 1px solid var(--line); margin-top: 4px;
}
.plan-tools form { margin: 0; }

/* plan / app detail page */
.field-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field-grid-2 > .field { min-width: 0; }
.money-input {
    display: flex; align-items: stretch; border: 1px solid var(--line);
    border-radius: 9px; background: var(--dm-surface, #fff); overflow: hidden;
}
.money-input:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-softer); }
.money-input > span {
    display: inline-flex; align-items: center; padding: 0 10px;
    background: #F4F5F7; color: var(--muted); font-size: 13px; font-weight: 600;
}
.money-input input { border: 0 !important; box-shadow: none !important; border-radius: 0; flex: 1; min-width: 0; }
.money-input-pct { max-width: 160px; }
.plan-savebar {
    position: sticky; bottom: 0; z-index: 5;
    display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap;
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(4px);
    border: 1px solid var(--line); border-radius: var(--card-radius);
    padding: 12px 16px; margin: 4px 0 20px;
    box-shadow: 0 -4px 14px rgba(20, 24, 31, .05);
}
.plan-savebar > .muted:first-child { margin-right: auto; }
.card.app-list-card .plan-savebar { margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0 0 var(--card-radius) var(--card-radius); box-shadow: none; }
.danger-card { border-color: #fecaca; }
.danger-card .card-head { background: #fff5f5; border-radius: var(--card-radius) var(--card-radius) 0 0; }
.danger-card .card-head h3 { color: var(--crit); }
.plan-delete-form select { max-width: 260px; }

.plan-preview {
    border: 1px solid var(--line); border-radius: 16px; padding: 22px; background: var(--dm-surface, #fff);
    position: relative; max-width: 340px;
}
.plan-preview.is-featured { border: 2px solid var(--brand); }
.plan-preview-flag {
    position: absolute; top: -11px; left: 20px; background: var(--brand); color: var(--brand-on);
    font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 10px;
}
.plan-preview h4 { margin: 0 0 2px; font-family: var(--font-head); font-size: 18px; }
.plan-preview-tag { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.plan-preview-price { font-family: var(--font-head); font-size: 30px; font-weight: 700; margin-bottom: 4px; }
.plan-preview-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px; }
.plan-preview-price span { font-family: var(--font-body); font-size: 13px; font-weight: 400; color: var(--muted); }
.plan-preview ul { list-style: none; padding: 0; margin: 14px 0; font-size: 13px; }
.plan-preview li { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; }
.plan-preview li svg, .plan-preview li i { width: 15px; height: 15px; flex: 0 0 15px; margin-top: 2px; color: var(--brand-text); }
.plan-preview-cta {
    display: block; text-align: center; border-radius: 999px; padding: 9px 12px;
    background: var(--brand); color: var(--brand-on); font-weight: 600; font-size: 13px;
}
.plan-preview-note { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* app pricing */
.tier-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.tier-chip {
    display: flex; flex-direction: column; gap: 1px; min-width: 128px;
    background: var(--dm-surface, #fff); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px;
}
.tc-name { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tc-price { font-weight: 650; font-size: 13.5px; }
.tc-price small { font-weight: 400; color: var(--muted); font-size: 11.5px; }
.tier-chip-link {
    flex-direction: row; align-items: center; justify-content: center; gap: 6px;
    border-style: dashed; color: var(--brand-text); font-weight: 600; font-size: 13px;
}
.tier-chip-link i { width: 14px; height: 14px; }
.app-list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.app-filter { max-width: 240px; padding: 7px 11px; font-size: 13px; }
.app-list-row {
    display: grid; align-items: center; gap: 14px;
    grid-template-columns: minmax(200px, 2.2fr) 88px minmax(130px, 1.3fr) minmax(150px, 1.3fr) minmax(170px, 1.4fr) 28px;
    padding: 10px 18px; border-top: 1px solid var(--line);
}
.app-list-row:hover:not(.app-list-cols) { background: var(--dm-surface-2, #FAFBFC); }
.app-list-cols {
    border-top: 0; padding-top: 8px; padding-bottom: 8px; background: var(--dm-surface-2, #F7F8FA);
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
}
.app-list-row input[type=text], .app-list-row select { padding: 7px 10px; font-size: 13px; }
.app-list-name { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--ink); }
.app-list-name:hover { color: var(--ink); }
.app-list-name:hover strong { color: var(--brand-text); }
.app-list-name .store-icon { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px; }
.app-list-name .store-icon i { width: 17px; height: 17px; }
.aln-text { display: flex; flex-direction: column; min-width: 0; }
.aln-text strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aln-text .muted { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aln-new { color: #b45309; }
.app-list-price { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 13px; }
.app-list-open { color: var(--muted); display: inline-flex; }
.app-list-open:hover { color: var(--brand-text); }
.app-list-open i { width: 17px; height: 17px; }
.band-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 10px 12px; align-items: center; }
.band-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.band-name { font-weight: 600; font-size: 13.5px; }
.legacy-table .money-input { max-width: 110px; }
.app-price-now { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 10px; }
.app-price-now > div {
    display: flex; flex-direction: column; gap: 2px; background: var(--dm-surface-2, #F7F8FA);
    border-radius: 12px; padding: 14px;
}
.app-price-now strong { font-family: var(--font-head); font-size: 22px; }

@media (max-width: 1100px) {
    .app-list-cols { display: none; }
    .app-list-row { grid-template-columns: 1fr 1fr; }
    .app-list-name { grid-column: 1 / -1; }
    .app-list-open { display: none; }
}
@media (max-width: 700px) {
    .field-grid-2, .app-price-now { grid-template-columns: 1fr; }
    .pcard-grid { grid-template-columns: 1fr; }
    .band-grid { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
    .app-list-row { grid-template-columns: 1fr; padding: 12px 14px; }
    .plan-savebar { justify-content: stretch; }
    .plan-savebar .btn { flex: 1; justify-content: center; }
    .pcard-open { opacity: 1; }
}

/* ---------------------------------------------------------------------
   v3.33.0 - live operator dashboard: charts, KPIs, range switch
   --------------------------------------------------------------------- */
.dash-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.dash-bar .grow { flex: 1; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--dm-surface, #fff); }
.seg-btn { padding: 4px 12px; font-size: 12px; color: var(--ink-grey); text-decoration: none; }
.seg-btn + .seg-btn { border-left: 1px solid var(--line); }
.seg-btn.on { background: var(--brand); color: var(--brand-on); font-weight: 600; }
.dash-kpis { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.dash-kpis .spark { margin-top: 8px; height: 26px; }
.oc { position: relative; width: 100%; }
.oc svg { display: block; overflow: visible; }
.oc-tip { position: absolute; top: 6px; display: none; pointer-events: none; z-index: 5;
          background: #14181F; color: #fff; font-size: 12px; line-height: 1.45;
          padding: 7px 9px; border-radius: 8px; min-width: 150px; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.oc-tip i, .oc-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; }
.oc-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.oc-hbar { display: grid; grid-template-columns: minmax(90px, 40%) 1fr 52px; gap: 10px; align-items: center;
           font-size: 13px; padding: 3px 0; }
.oc-hbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); font-size: 12px; }
.oc-hbar-track { height: 8px; background: #EEF1F4; border-radius: 99px; overflow: hidden; }
.oc-hbar-track span { display: block; height: 100%; border-radius: 99px; }
.oc-hbar-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
.dash-grid.one { grid-template-columns: minmax(0, 1fr); }
.dash-grid > .card { margin-bottom: 0; }
@media (max-width: 1000px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } }
.card-header.dh { display: block; }
.card-header.dh .sub { display: block; margin-top: 2px; font-weight: 400; font-size: 12.5px; color: var(--muted); }
#liveDash .pill { white-space: nowrap; }

/* ---------------------------------------------------------------------
   v3.34.0 - Logs & monitoring
   --------------------------------------------------------------------- */
.logs-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 0 0 14px; }
.logs-filters .lf { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); min-width: 130px; }
.logs-filters .lf-grow { flex: 1; min-width: 200px; }
.logs-filters .lf-btns { flex-direction: row; gap: 6px; min-width: 0; }
.logs-filters input, .logs-filters select { padding: 6px 9px; font-size: 13px; }
.logs-tz-note { font-size: 12px; margin: -8px 0 12px; }
.logs-table td { vertical-align: top; font-size: 13px; }
.logs-detail { min-width: 200px; max-width: 300px; overflow-wrap: anywhere; }
.logs-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.logs-table td.logs-target { min-width: 150px; max-width: 220px; overflow-wrap: anywhere; }
.logs-pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 12px 0 20px; }
.logs-count { text-align: center; font-size: 12px; margin: 10px 0 18px; }
.logs-trace { background: #14181F; color: #E6E8EB; padding: 14px; border-radius: 8px; font-size: 12px;
              line-height: 1.5; overflow: auto; max-height: 520px; white-space: pre; }
.logs-alert-form input[type=number] { width: 80px; display: inline-block; padding: 4px 6px; }
.logs-writer { font-size: 12px; }
.log-alert-bar { margin: 0 0 14px; display: flex; flex-direction: column; gap: 6px; }
.log-alert-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px;
                 background: #fee2e2; color: #7f1d1d; border: 1px solid #fecaca; font-size: 13px; }
.log-alert-row.sev-warning, .log-alert-row.sev-info { background: #fef3c7; color: #78350f; border-color: #fde68a; }
.log-alert-row svg { width: 16px; height: 16px; flex: none; }
.log-alert-row .log-alert-text { flex: 1; }
.log-alert-row .log-alert-link { color: inherit; font-weight: 600; }
.log-alert-row form { margin: 0; }

/* ==========================================================================
   v3.39.0 — in-app "Update available" banner (app_base.html)
   ========================================================================== */
.app-update-banner {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    margin: -4px 0 16px; padding: 12px 16px; border-radius: var(--card-radius);
    background: var(--brand-softer); border: 1px solid var(--brand-soft);
}
.app-update-icon {
    width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand); color: var(--brand-on);
}
.app-update-icon svg { width: 18px; height: 18px; }
.app-update-text { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; }
.app-update-text strong { font-size: 14px; color: var(--ink); }
.app-update-text span { font-size: 12.5px; color: var(--muted); }
.app-update-form { margin: 0; }
.app-update-ask { font-size: 12.5px; color: var(--muted); font-weight: 600; }

/* ==========================================================================
   v3.39.0 — dark mode
   "Can you add a dark theme and light theme (current) in orbit?"

   Light is still the default and is unchanged: every surface that used to
   be a literal colour now reads var(--dm-*, <the same literal>), and the
   --dm-* variables exist ONLY inside html[data-mode="dark"]. The mode is
   set on <html> by the server from the orbit_mode cookie (no flash), and by
   the inline head script for "System" (prefers-color-scheme).
   The company accent (Settings > Appearance) and platform branding keep
   working in both modes: the accent is a fill, and fills do not change.
   ========================================================================== */
html[data-mode="dark"] {
    color-scheme: dark;
    /* v3.45.0 (brief section 13): the dark ground is the native apps' navy,
       #120F29 -> #080D1C, with soft indigo (45%) and cyan (30%) glows and
       frosted-glass cards (18px radius, 7% white border). */
    --orbit-field: #080D1C;
    --orbit-paper: #14122E;
    --orbit-ink: #E8ECF1;
    --orbit-dust: #9AA4B1;
    --orbit-halo: rgba(255, 255, 255, .12);
    --bg: #080D1C;
    --paper: #14122E;
    --ink: #E8ECF1;
    --ink-black: #F1F4F7;
    --ink-grey: #C5CCD5;
    --muted: #9AA4B1;
    --line: rgba(255, 255, 255, .12);
    --dm-surface: rgba(255, 255, 255, .06);
    --dm-surface-2: rgba(255, 255, 255, .09);
    --dm-surface-3: rgba(255, 255, 255, .13);
    --dm-fill: rgba(255, 255, 255, .10);
    --dm-glass-border: rgba(255, 255, 255, .07);
    /* v3.45.0: a dark-only name, so no --dm-* var is read in light */
    --dm-glass-bg: rgba(255, 255, 255, .06);
    --dm-glass-radius: 18px;
    /* The accent is a fill and stays put; as TEXT it needs to be lighter
       on a dark ground, so derive it from whatever the accent is. */
    --brand-text: color-mix(in srgb, var(--brand) 62%, white);
    --brand-soft: color-mix(in srgb, var(--brand) 26%, transparent);
    --brand-softer: color-mix(in srgb, var(--brand) 13%, transparent);
    --ok: #4ADE80;
    --warn: #FBBF24;
    --crit: #F87171;
}
html[data-mode="dark"] body {
    color: var(--ink);
    background:
        radial-gradient(circle at 14% 12%, rgba(91, 108, 255, .45), transparent 48%),
        radial-gradient(circle at 86% 88%, rgba(46, 166, 242, .30), transparent 52%),
        linear-gradient(160deg, #120F29 0%, #080D1C 100%);
    background-attachment: fixed;
}
/* frosted glass cards on the navy ground */
html[data-mode="dark"] .card,
html[data-mode="dark"] .pt-modal-box,
html[data-mode="dark"] .od-box,
html[data-mode="dark"] .pmenu-drop,
html[data-mode="dark"] .pbell-drop {
    border-radius: var(--dm-glass-radius);
    border: 1px solid var(--dm-glass-border);
    background: var(--dm-glass-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
html[data-mode="dark"] input,
html[data-mode="dark"] select,
html[data-mode="dark"] textarea { color: var(--ink); border-color: var(--line); }
html[data-mode="dark"] input::placeholder,
html[data-mode="dark"] textarea::placeholder { color: #6E7886; }
html[data-mode="dark"] .btn,
html[data-mode="dark"] .btn:hover,
html[data-mode="dark"] .pnav a,
html[data-mode="dark"] .pmenu-drop a,
html[data-mode="dark"] .nav-link { color: inherit; }
html[data-mode="dark"] .btn-primary { color: var(--brand-on); }
html[data-mode="dark"] .btn-light { color: var(--ink); }
html[data-mode="dark"] .card,
html[data-mode="dark"] .pmenu-drop,
html[data-mode="dark"] .pbell-drop,
html[data-mode="dark"] .pt-modal-box { box-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
html[data-mode="dark"] code { color: var(--ink); }
/* status colours: translucent grounds, light text */
html[data-mode="dark"] .alert-error { background: rgba(248, 113, 113, .12); color: #FCA5A5; border-color: rgba(248, 113, 113, .35); }
html[data-mode="dark"] .alert-ok    { background: rgba(74, 222, 128, .10); color: #86EFAC; border-color: rgba(74, 222, 128, .30); }
html[data-mode="dark"] .alert-info  { background: rgba(56, 189, 248, .10); color: #7DD3FC; border-color: rgba(56, 189, 248, .30); }
html[data-mode="dark"] .alert-warn  { background: rgba(251, 191, 36, .10); color: #FCD34D; border-color: rgba(251, 191, 36, .30); }
html[data-mode="dark"] .pill.ok, html[data-mode="dark"] .pill.active,
html[data-mode="dark"] .pill.state-resolved { background: rgba(74, 222, 128, .14); color: #86EFAC; }
html[data-mode="dark"] .pill.warn, html[data-mode="dark"] .pill.pending_approval,
html[data-mode="dark"] .pill.state-in_progress { background: rgba(251, 191, 36, .14); color: #FCD34D; }
html[data-mode="dark"] .pill.crit, html[data-mode="dark"] .pill.disabled,
html[data-mode="dark"] .pill.rejected, html[data-mode="dark"] .pill.past_due,
html[data-mode="dark"] .pill.prio-urgent { background: rgba(248, 113, 113, .14); color: #FCA5A5; }
html[data-mode="dark"] .pill.trialing { background: rgba(56, 189, 248, .14); color: #7DD3FC; }
html[data-mode="dark"] .pill.prio-high { background: rgba(251, 146, 60, .16); color: #FDBA74; }
html[data-mode="dark"] .pg-tag.upd { color: #FDBA74; }
html[data-mode="dark"] .switch .track,
html[data-mode="dark"] .ps-switch .ps-slider { background: #3A4452; }
html[data-mode="dark"] .ce-highlight { color: #E4E4E7; }
html[data-mode="dark"] .ce-input { caret-color: #E4E4E7; }
/* the Orbit dialog (orbit-dialog.css loads first, so this wins) */
html[data-mode="dark"] .od-box { background: var(--dm-surface); color: var(--ink); }
html[data-mode="dark"] .od-box .btn-light { background: var(--dm-surface-2); color: var(--ink); border-color: var(--line); }
/* the stock black wordmark on a now-dark card */
html[data-mode="dark"] img[src$="orbit-primary-colour.svg"],
html[data-mode="dark"] img[src$="orbit-mark-colour.svg"] { filter: invert(1) hue-rotate(180deg); }

/* The Light / Dark / System switch (account menu, admin sidebar). */
.mode-switch { display: flex; gap: 4px; padding: 6px 10px 8px; margin: 0; }
.mode-switch-label { display: block; padding: 8px 12px 0; font-size: 11px; font-weight: 600;
    letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.mode-switch button {
    flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    padding: 6px 8px; border-radius: 999px; border: 1px solid var(--line);
    background: transparent; color: var(--ink); font: inherit; font-size: 12px; cursor: pointer;
}
.mode-switch button svg { width: 13px; height: 13px; }
.mode-switch button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-on); font-weight: 600; }
.sidebar .mode-switch button { color: var(--sidebar-text); border-color: rgba(255, 255, 255, .18); }
.sidebar .mode-switch button[aria-pressed="true"] { color: var(--brand-on); border-color: var(--brand); }
.sidebar .mode-switch-label { color: rgba(237, 240, 243, .6); }
.login-mode { margin-top: 18px; }
.login-mode .mode-switch-label { padding: 0 0 4px; text-align: center; }
.login-mode .mode-switch { padding: 0; }

/* v3.39.0 — dark mode: public (login / signup) backdrop. --ink-black flips
   to a light ink in dark mode, so the backdrop gets its own dark wash. */
html[data-mode="dark"] .public-wrap {
    background:
        radial-gradient(circle at 12% 18%, rgba(91, 108, 255, .22), transparent 46%),
        radial-gradient(circle at 88% 84%, rgba(91, 108, 255, .10), transparent 52%),
        var(--bg);
}

/* v3.39.0 — Sign in with Apple. Apple's guidelines: black button, white
   logo and text (white-on-black flips in dark mode so it still stands out). */
.btn-apple { display: inline-flex; align-items: center; justify-content: center;
    gap: 8px; background: #000; color: #fff; border: 1px solid #000;
    font-weight: 600; }
.btn-apple:hover { background: #1d1d1f; color: #fff; text-decoration: none; }
.btn-apple:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(0, 0, 0, .3); }
.btn-apple .apple-logo { margin-top: -2px; }
#apple-signin { margin-top: 10px; }
#apple-signup { margin-bottom: 4px; }
html[data-mode="dark"] .btn-apple { background: #fff; color: #000; border-color: #fff; }
html[data-mode="dark"] .btn-apple:hover { background: #E8E8ED; color: #000; }
.apple-linked { display: flex; gap: 12px; align-items: center; padding: 12px 14px;
    border: 1px solid var(--line); border-radius: 12px; margin-bottom: 16px;
    background: var(--dm-surface-2, #FAFAFA); }
.apple-linked-icon { width: 36px; height: 36px; border-radius: 10px; background: #000;
    color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.apple-linked strong { display: block; }
.apple-linked span { color: var(--muted); font-size: 13px; }
.apple-forget { margin-top: 12px; text-align: center; }
.apple-forget .btn-link { background: none; border: 0; color: var(--brand-text);
    cursor: pointer; font: inherit; font-size: 13px; padding: 0; }
input[readonly]#apple-email { background: var(--dm-surface-3, #F1F1F2); }

/* ===================================================================
   v3.40.0 Orbit Studio. Uses the shell's tokens only (--paper, --line,
   --muted, --brand*, --dm-surface-*) so dark mode follows automatically.
   =================================================================== */
.st-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 0 0 18px; }
.st-tab { display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; font-size: 13.5px;
    color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.st-tab svg { width: 15px; height: 15px; }
.st-tab:hover { color: var(--ink); }
.st-tab.active { color: var(--brand-text); border-bottom-color: var(--brand); font-weight: 600; }
.st-tab .st-count { background: var(--brand); color: var(--brand-on, #fff); border-radius: 999px;
    font-size: 11px; padding: 1px 7px; font-weight: 700; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.st-tile { display: flex; flex-direction: column; gap: 8px; padding: 18px; border: 1px solid var(--line);
    border-radius: 14px; background: var(--paper, #fff); color: var(--ink); text-decoration: none; }
.st-tile:hover { border-color: var(--brand); }
.st-tile h4 { margin: 0; font-size: 15.5px; }
.st-tile p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.st-ico { width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center;
    justify-content: center; background: var(--brand-softer); color: var(--brand-text); }
.st-ico svg { width: 19px; height: 19px; }
.st-meta { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.st-pack { white-space: pre-wrap; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px; line-height: 1.55; background: var(--dm-surface-2, #f7f7f8); border: 1px solid var(--line);
    border-radius: 10px; padding: 16px; max-height: 560px; overflow: auto; margin: 0; color: var(--ink); }
.st-code { counter-reset: ln; }
.st-checks { list-style: none; margin: 0; padding: 0; }
.st-checks li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding: 10px 0;
    border-bottom: 1px solid var(--line); font-size: 13.5px; }
.st-checks li:last-child { border-bottom: 0; }
.st-checks .st-dot { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center;
    justify-content: center; font-size: 11px; font-weight: 700; color: #fff; margin-top: 1px; }
.st-dot.ok { background: #16a34a; } .st-dot.warn { background: #d97706; } .st-dot.blocked { background: #dc2626; }
.st-checks .st-detail { color: var(--muted); font-size: 12.5px; margin-top: 2px; overflow-wrap: anywhere; }
.st-timeline { list-style: none; margin: 0; padding: 0; }
.st-timeline li { padding: 11px 0 11px 16px; border-left: 2px solid var(--line); position: relative; font-size: 13.5px; }
.st-timeline li::before { content: ""; position: absolute; left: -6px; top: 15px; width: 10px; height: 10px;
    border-radius: 50%; background: var(--line); }
.st-timeline li.orbit::before { background: var(--brand); }
.st-timeline .st-who { font-weight: 600; } .st-timeline .st-when { color: var(--muted); font-size: 12px; }
.st-timeline .st-body { white-space: pre-wrap; margin-top: 3px; overflow-wrap: anywhere; }
.st-drop { border: 2px dashed var(--line); border-radius: 14px; padding: 26px; text-align: center; color: var(--muted); }
.st-drop.drag { border-color: var(--brand); background: var(--brand-softer); }
.st-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.st-split div { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.st-split span { display: block; font-size: 12px; color: var(--muted); }
.st-split strong { font-size: 17px; }
.st-soon { text-align: center; padding: 42px 20px; }
.st-soon h2 { margin: 10px 0 6px; }
.st-soon p { color: var(--muted); max-width: 520px; margin: 0 auto 6px; }
.st-files { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow: auto; font-size: 13px; }
.st-files a { display: block; padding: 5px 8px; border-radius: 6px; color: var(--ink); text-decoration: none;
    font-family: ui-monospace, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.st-files a.active, .st-files a:hover { background: var(--brand-softer); color: var(--brand-text); }
.st-kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 6px 14px; font-size: 13.5px; margin: 0; }
.st-kv dt { color: var(--muted); } .st-kv dd { margin: 0; overflow-wrap: anywhere; }
.st-checkrow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.st-checkrow:last-child { border-bottom: 0; }
.st-checkrow .st-grow { flex: 1; min-width: 0; }
.st-terms h2 { font-size: 16px; margin: 20px 0 6px; }
.st-terms p { line-height: 1.6; }
.st-inline { display: inline; }
.st-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.st-actions form { margin: 0; }
@media (max-width: 700px) { .st-kv { grid-template-columns: minmax(0, 1fr); } }

/* ===================================================== v3.46.0 Messages
   Team Messaging: list + thread. Uses only the shell's own tokens so dark
   mode and company themes apply without extra rules. */
.pnav-item { position: relative; }
.pnav-badge {
    position: absolute; top: 2px; left: 50%; margin-left: 4px;
    min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px;
    background: var(--brand); color: #fff; font-size: 10.5px; font-weight: 700;
    line-height: 17px; text-align: center;
}
.pnav-badge[hidden] { display: none; }
.msg-shell {
    display: grid; grid-template-columns: 300px 1fr; gap: 0;
    min-height: 62vh; border: 1px solid var(--line); border-radius: 12px;
    overflow: hidden; background: var(--card, var(--bg));
}
.msg-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.msg-list-head { display: flex; gap: 8px; padding: 12px; border-bottom: 1px solid var(--line); }
.msg-list-head input { flex: 1; min-width: 0; }
.msg-convs { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.msg-conv { display: flex; gap: 10px; align-items: center; padding: 11px 12px; cursor: pointer;
    border-bottom: 1px solid var(--line); }
.msg-conv:hover, .msg-conv.active { background: var(--brand-softer, var(--bg)); }
.msg-conv-main { flex: 1; min-width: 0; }
.msg-conv-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-conv-last { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-unread { background: var(--brand); color: #fff; border-radius: 10px; font-size: 11px;
    font-weight: 700; padding: 1px 7px; }
.msg-avatar { width: 34px; height: 34px; border-radius: 50%; flex: 0 0 34px; display: grid;
    place-items: center; background: var(--brand-softer, var(--line)); color: var(--brand-text, var(--ink));
    font-weight: 700; }
.msg-thread { display: flex; flex-direction: column; min-width: 0; }
.msg-thread-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px;
    border-bottom: 1px solid var(--line); }
.msg-thread-head h2 { font-size: 16px; margin: 0; flex: 1; min-width: 0; }
.msg-items { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.msg-bubble { max-width: 72%; padding: 8px 12px; border-radius: 14px; background: var(--bg);
    border: 1px solid var(--line); white-space: pre-wrap; word-wrap: break-word; }
.msg-bubble.mine { align-self: flex-end; background: var(--brand-softer, var(--bg)); }
.msg-bubble.system { align-self: center; font-size: 13px; color: var(--muted); }
.msg-meta { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.msg-meta button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0 4px; font-size: 11.5px; }
.msg-meta button:hover { color: var(--ink); text-decoration: underline; }
.msg-att img { max-width: 220px; border-radius: 8px; display: block; margin-top: 6px; }
.msg-compose { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); align-items: flex-end; }
.msg-compose textarea { flex: 1; min-height: 42px; max-height: 160px; resize: vertical; }
.msg-empty { margin: auto; color: var(--muted); text-align: center; padding: 40px 16px; }
.msg-seen { align-self: flex-end; font-size: 12px; color: var(--muted); padding: 2px 6px; }
.msg-readonly { padding: 12px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; text-align: center; }
.msg-more { margin: 8px auto 0; display: block; }
.msg-dialog { border: 1px solid var(--line); border-radius: 12px; padding: 0; max-width: 460px; width: 92vw; }
.msg-dialog form { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.msg-pick { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; }
.msg-pick label { display: flex; gap: 8px; align-items: center; padding: 7px 10px; border-bottom: 1px solid var(--line); }
@media (max-width: 760px) {
    .msg-shell { grid-template-columns: 1fr; }
    .msg-shell.has-thread .msg-list { display: none; }
    .msg-shell:not(.has-thread) .msg-thread { display: none; }
}

/* v3.47.0: Settings > Integrations > Xero > Synced data */
.xd-main { min-width: 0; }
.xd-tabs { flex-wrap: wrap; margin: 4px 0 14px; }
.xd-search { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.xd-search input[type="search"] { flex: 1 1 240px; min-width: 0; }
.xd-table td { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xd-howto code, .xd-table code { font-size: 12px; }
.xd-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.xd-fields .table-wrap { max-height: 560px; overflow: auto; }
.xd-fields td { word-break: break-all; font-size: 13px; }
.xd-filter { width: 100%; margin-bottom: 8px; }
.xd-json pre { max-height: 600px; overflow: auto; margin: 0; padding: 12px; font-size: 12px; line-height: 1.45;
  background: var(--dm-surface-3, #F6F6F7); border: 1px solid var(--line, #E4E4E7); border-radius: 8px;
  white-space: pre-wrap; word-break: break-word; }
@media (max-width: 900px) { .xd-split { grid-template-columns: 1fr; } }
