/* installpro.app colors (from installpro-app-brand) */
:root {
  --navy: #0F2747;
  --blue: #1E5FD0;
  --teal: #0D9488;         /* ".app" in the logo on white */
  --bright-teal: #14B8A6;  /* highlights only, not for text */
  --light-teal: #2DD4BF;
  --panel: #F1F5F9;
  --border: #E2E8F0;
  --muted: #475569;
  --white: #FFFFFF;

  /* What the light and dark modes change. */
  --text: #0F2747;
  --surface: #FFFFFF;     /* cards, inputs */
  --surface-2: #F8FAFC;   /* hover, read-only fields */
  --selected: #EFF6FF;    /* chosen items */
  --link: #1E5FD0;        /* links and link-style buttons */

  --workflow: #1E5FD0;
  --convert: #B45309;
  --deploy: #0F766E;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 450; /* a touch heavier than regular, easier to read on Windows screens */
  line-height: 1.5;
  color: var(--text);
  background: var(--panel);
}

h1, h2 { font-weight: 800; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 24px; }
h2 { font-size: 15px; }
.muted { color: var(--muted); }

button {
  font: inherit;
  font-weight: 600;
  color: var(--white);
  background: var(--blue);
  border: 0;
  border-radius: 8px;
  padding: 11px 16px;
  cursor: pointer;
}
button:hover { filter: brightness(1.08); }
button:disabled { opacity: 0.45; cursor: default; filter: none; }
button.small { padding: 5px 10px; font-size: 13px; }

/* ---------- Sign in page ---------- */

.signin-page {
  /* the brand's blue fade, like the icon */
  background: linear-gradient(160deg, #0F2747 0%, #1E5FD0 100%) fixed;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.signin-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px 32px;
  box-shadow: 0 20px 50px rgba(5, 15, 35, 0.35);
}

.signin-logo { height: 40px; width: auto; display: block; margin-bottom: 28px; }
.signin-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; text-decoration: none; }
.signin-brand .signin-logo { margin-bottom: 0; }
.signin-module { font-weight: 800; font-size: 22px; color: var(--deploy); letter-spacing: -.01em; }
.signin-card .muted { margin: 6px 0 22px; }

.signin-card form { display: grid; gap: 6px; }
.signin-card label { font-weight: 600; font-size: 14px; margin-top: 8px; }
.signin-card input {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
}
.signin-card input:focus {
  outline: none;
  border-color: var(--link);
  box-shadow: 0 0 0 3px rgba(30, 95, 208, 0.15);
}
.signin-card button { margin-top: 18px; }

.notice {
  background: #FEF3C7;
  border: 1px solid #FCD34D;
  color: #78350F;
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0 0 8px;
  font-size: 14px;
}
.notice.error {
  background: #FEE2E2;
  border-color: #FCA5A5;
  color: #7F1D1D;
}
.notice.ok {
  background: #CCFBF1;
  border-color: #5EEAD4;
  color: #134E4A;
}

/* Text for screen readers only */
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Console layout ---------- */

.topbar {
  display: flex;
  align-items: center;
  gap: 32px;
  background: var(--navy);
  padding: 0 24px;
  height: 60px;
  /* stays at the top while the page scrolls */
  position: sticky;
  top: 0;
  z-index: 50;
}
/* jumping to a spot on the page (#something) lands below the top bar */
html { scroll-padding-top: 76px; }
.topbar-logo { height: 30px; width: auto; display: block; }
.topbar nav { display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.topbar nav::-webkit-scrollbar { display: none; }
/* words in the top bar never break onto a second line */
.topbar nav a, .signout {
  white-space: nowrap;
  flex-shrink: 0;
  color: #CBD5E1;
  text-decoration: none;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 6px;
}
.topbar nav a:hover, .signout:hover { color: var(--white); background: rgba(255,255,255,0.08); filter: none; }
.topbar form { margin: 0; }
.signout { background: none; font-size: 15px; }
/* Who's signed in: a small line just under the blue bar, on the right */
.whobar { display: flex; justify-content: flex-end; padding: 6px 24px 0; font-size: 13px; line-height: 1.3; }
.who { color: var(--muted); text-align: right; }
.who strong { color: var(--text); font-weight: 600; }
.theme-toggle, .topbar form { flex-shrink: 0; }
.topbar nav a.active { color: var(--white); box-shadow: inset 0 -2px 0 var(--bright-teal); border-radius: 0; }

.workspace {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr); /* the right side may shrink; wide tables scroll inside it */
  min-height: calc(100vh - 60px);
}

.customer-list {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 18px 16px;
}
.list-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.empty { color: var(--muted); font-size: 14px; }

.customer-detail { display: grid; place-items: center; padding: 32px; }
.placeholder { text-align: center; max-width: 360px; }
.placeholder img { margin-bottom: 14px; }
.placeholder .muted { margin-top: 8px; }



/* Narrower screens (tablets, phones on their side): squeeze the top bar so
   everything fits; the name moves out (it's on the Change password page). */
@media (max-width: 1150px) {
  .topbar { gap: 14px; padding: 0 16px; }
  .topbar-logo { height: 26px; }
  .topbar nav { gap: 0; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .topbar nav::-webkit-scrollbar { display: none; }
  .topbar nav a { white-space: nowrap; padding: 8px 10px; }
  .signout { white-space: nowrap; padding: 8px 10px; }
  .workspace { grid-template-columns: 220px minmax(0, 1fr); }
  :root { --list-w: 220px; } /* where the fold handle sits */
  .test-badge { margin-left: 0; }
}

/* Small tablets: tighten the tabs a little more so they all still fit */
@media (max-width: 900px) and (min-width: 721px) {
  .topbar { gap: 8px; }
  .topbar-logo { height: 22px; }
  .topbar nav a, .signout { padding: 8px 7px; font-size: 14px; }
  .help-link, .theme-toggle button { padding: 4px; }
}

/* Phones: tabs on their own row, list stacked above the detail area */
@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; justify-content: space-between; gap: 0; padding: 10px 16px 0; height: auto; }
  html { scroll-padding-top: 116px; }
  .topbar-logo { height: 24px; }
  .topbar nav { order: 3; flex-basis: 100%; margin: 6px -12px 0; }
  .topbar nav a { white-space: nowrap; }
  .whobar { padding: 6px 16px 0; font-size: 12px; }
  .workspace { grid-template-columns: 1fr; min-height: 0; }
  .customer-list { border-right: 0; border-bottom: 1px solid var(--border); }
}

/* ---------- Full-width pages (Companies, Users, ...) ---------- */

.page { max-width: 960px; margin: 0 auto; padding: 32px 24px; display: grid; gap: 20px; }
.page-head .muted { margin: 6px 0 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.card h2 { margin-bottom: 12px; }

.inline-form { display: flex; gap: 10px; }
.inline-form input {
  flex: 1;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  min-width: 0;
}
.inline-form input:focus { outline: none; border-color: var(--link); box-shadow: 0 0 0 3px rgba(30, 95, 208, 0.15); }

table.list { width: 100%; border-collapse: collapse; }
table.list th {
  text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--muted); padding: 0 12px 10px;
  border-bottom: 1px solid var(--border);
}
table.list td { padding: 12px; border-bottom: 1px solid var(--border); }
table.list tr:last-child td { border-bottom: 0; }

@media (max-width: 720px) {
  .page { padding: 20px 16px; }
  .inline-form { flex-direction: column; }
}

/* ---------- Users and password pages ---------- */

a { color: var(--link); }
.page.narrow { max-width: 480px; }
.crumb { margin: 0 0 4px; font-size: 14px; }
.crumb a { text-decoration: none; }
.small { font-size: 13px; }
.hint { color: var(--muted); font-size: 13px; margin: 12px 0 0; }

a.who { text-decoration: none; }
a.who:hover { color: var(--text); text-decoration: underline; }

.grid-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  align-items: end;
}
.grid-form label, .stack-form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.grid-form input, .grid-form select, .stack-form input {
  width: 100%;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
}
.grid-form input:focus, .grid-form select:focus, .stack-form input:focus {
  outline: none; border-color: var(--link); box-shadow: 0 0 0 3px rgba(30, 95, 208, 0.15);
}
.grid-form-button button { width: 100%; }

.stack-form { display: grid; gap: 4px; }
.stack-form label { margin: 10px 0 2px; }
.stack-form button { margin-top: 18px; }

a.button {
  display: inline-block; font-weight: 600; color: var(--white); background: var(--blue);
  border-radius: 8px; padding: 11px 16px; text-decoration: none;
}

/* Status labels */
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.pill.on { background: #CCFBF1; color: #115E59; }
.pill.wait { background: #FEF3C7; color: #78350F; }
.pill.off { background: #E2E8F0; color: #475569; }
.pill.id-pill { background: #E0F2FE; color: #075985; font-weight: 600; margin-left: 4px; vertical-align: 1px; }
tr.off td { color: var(--muted); }

/* Buttons that look like links (Reset password, Switch off) */
td.actions { text-align: right; white-space: nowrap; }
td.actions form { display: inline; margin: 0; }
button.link {
  background: none; color: var(--link); padding: 4px 6px; font-weight: 500; font-size: 14px;
}
button.link:hover { text-decoration: underline; filter: none; }
button.link.danger { color: #B91C1C; }

/* The temporary password box */
.card.temp { border-color: #5EEAD4; background: #F0FDFA; }
.temp-details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 12px 0 0; }
.temp-details dt { color: var(--muted); font-size: 14px; }
.temp-details dd { margin: 0; }
.temp-password {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 18px; font-weight: 600; letter-spacing: 0.06em;
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 4px 10px;
  user-select: all;
}

@media (max-width: 720px) {
  table.list th.actions, td.actions { text-align: left; white-space: normal; }
  table.list, table.list tbody, table.list tr, table.list td { display: block; }
  table.list thead { display: none; }
  table.list tr { padding: 10px 0; border-bottom: 1px solid var(--border); }
  table.list tr:last-child { border-bottom: 0; }
  table.list td { border: 0; padding: 3px 4px; }
}

/* ---------- Feedback ---------- */

.topbar nav a.push-right { margin-left: auto; }
.count {
  display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px;
  border-radius: 999px; background: var(--bright-teal); color: var(--navy);
  font-size: 12px; font-weight: 700; text-align: center; line-height: 20px;
}

.stack-form textarea {
  width: 100%; font: inherit; padding: 10px 12px; color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; resize: vertical;
}
.stack-form textarea:focus { outline: none; border-color: var(--link); box-shadow: 0 0 0 3px rgba(30, 95, 208, 0.15); }

.kinds { border: 0; padding: 0; margin: 0 0 4px; display: flex; flex-wrap: wrap; gap: 8px; }
.stack-form label.kind {
  display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 500;
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; cursor: pointer;
}
.stack-form label.kind:has(input:checked) { border-color: var(--link); background: var(--selected); }

.filter { display: flex; gap: 6px; }
.filter a {
  text-decoration: none; color: var(--muted); font-weight: 500; font-size: 14px;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
}
.filter a.on { color: var(--white); background: var(--navy); border-color: var(--text); }

.section-title { margin-top: 8px; }
.card.message { display: grid; gap: 10px; }
.card.message.done { opacity: 0.7; }
.message-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.message-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.pill.kind-problem { background: #FEE2E2; color: #991B1B; }
.pill.kind-suggestion { background: #DBEAFE; color: #1E40AF; }
.pill.kind-question { background: #FEF3C7; color: #78350F; }

.reply { border-left: 3px solid var(--bright-teal); background: var(--panel); border-radius: 0 8px 8px 0; padding: 10px 14px; }
.reply-label { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--teal); }

.owner-tools summary { cursor: pointer; color: var(--link); font-weight: 500; font-size: 14px; }
.owner-tools .stack-form { margin-top: 8px; }
.owner-tools .stack-form button { margin-top: 8px; justify-self: start; }
.done-form { margin: 0; }
.done-form button.link { padding-left: 0; }

/* ---------- Customers ---------- */

a.button.small { padding: 5px 10px; font-size: 13px; }
.customer-list .list-filter {
  width: 100%; font: inherit; font-size: 14px; padding: 8px 10px; margin-bottom: 10px;
  border: 1px solid var(--border); border-radius: 8px; color: var(--text);
}
.customer-list .list-filter:focus { outline: none; border-color: var(--link); }
.customer-list ul { list-style: none; margin: 0; padding: 0; }
.customer-list li a {
  display: block; padding: 9px 10px; border-radius: 8px; color: var(--text);
  text-decoration: none; font-weight: 500; overflow-wrap: anywhere;
}
.customer-list li a:hover { background: var(--panel); }
.customer-list li a.on { background: var(--selected); color: var(--link); box-shadow: inset 3px 0 0 var(--blue); }

.customer-detail:has(.detail) { display: block; place-items: initial; }
.detail { max-width: 900px; display: grid; gap: 16px; }
.detail h1 { overflow-wrap: anywhere; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.detail h3 { font-size: 14px; margin: 16px 0 4px; }
.back-link { display: none; }
.code-box { margin: 4px 0 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.facts dt { color: var(--muted); font-size: 14px; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
ul.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.customer-form .two-col label { margin-top: 10px; }

details.card.edit summary { cursor: pointer; list-style: none; }
details.card.edit summary::-webkit-details-marker { display: none; }
details.card.edit summary h2 { display: inline; color: var(--link); }
details.card.edit summary h2::before { content: "▸ "; }
details.card.edit[open] summary h2::before { content: "▾ "; }
details.card.edit[open] summary { margin-bottom: 8px; }

[hidden] { display: none !important; }

@media (max-width: 720px) {
  .customer-detail { padding: 20px 16px; }
  .workspace.has-selection .customer-list { display: none; }
  .back-link { display: block; }
  .two-col { grid-template-columns: 1fr; }
}
.workspace.no-list { grid-template-columns: 1fr; }
.workspace.no-list .detail { margin: 0 auto; width: 100%; }

/* ---------- Printers and locations ---------- */

.printers { display: grid; gap: 12px; }
.printers .hint { margin: -6px 0 4px; }
.sub-card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
.sub-card h3 { margin: 0 0 4px; font-size: 15px; }
.location + .location { border-top: 1px solid var(--border); padding-top: 12px; }
.location-name { font-size: 15px; margin: 0 0 6px; }
.printer-list code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 14px; }
.printer-list td { vertical-align: top; }
tr.edit-row td { padding: 0 0 12px; border-bottom: 1px solid var(--border); }
a.link-button { color: var(--link); text-decoration: none; font-size: 14px; font-weight: 500; padding: 4px 6px; }
a.link-button:hover { text-decoration: underline; }
.host-port { grid-template-columns: 1fr 110px; }

.location-tools summary { cursor: pointer; color: var(--link); font-size: 14px; font-weight: 500; }
.location-tools[open] { display: grid; gap: 10px; }
.location-tools[open] summary { margin-bottom: 2px; }
.location-tools .inline-form input { padding: 7px 10px; }
.add-location { border-top: 1px solid var(--border); padding-top: 12px; }
.rename-first { align-items: center; }
.rename-first label { font-size: 14px; color: var(--muted); white-space: nowrap; }

@media (max-width: 720px) {
  .host-port { grid-template-columns: 1fr 1fr; }
  .rename-first { align-items: stretch; }
}
.printers .list-head { margin-bottom: 0; }

/* ---------- Driver Library ---------- */

.section-block { display: grid; gap: 12px; }
.section-block > .hint { margin: -8px 0 0; }
.driver-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
a.driver-card { display: grid; gap: 6px; color: var(--text); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
a.driver-card:hover { border-color: var(--link); box-shadow: 0 4px 14px rgba(15, 39, 71, 0.08); }
a.driver-card.retired { opacity: 0.65; }
.driver-card-head { display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.driver-card p { margin: 0; }
.arch-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.arch-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 14px; }
.arch-list .arch { font-weight: 600; min-width: 118px; }

details.card.upload summary { cursor: pointer; list-style: none; }
details.card.upload summary::-webkit-details-marker { display: none; }
details.card.upload summary h2 { display: inline; color: var(--link); }
details.card.upload[open] summary { margin-bottom: 8px; }
.stack-form input[type=file] { padding: 8px; background: var(--panel); }
.progress-bar { height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; margin-top: 12px; }
.progress-bar span { display: block; height: 100%; width: 0; background: var(--blue); transition: width .2s; }

.list-filter.wide {
  width: 100%; font: inherit; font-size: 14px; padding: 8px 10px; margin: 4px 0 10px;
  border: 1px solid var(--border); border-radius: 8px; color: var(--text);
}
ul.names { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
ul.names li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 12px; border-bottom: 1px solid var(--border); font-size: 14px; }
ul.names li:last-child { border-bottom: 0; }
.manage-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.manage-actions form { margin: 0; }
.manage-actions button.link { padding-left: 0; }

/* ---------- Choosing a printer's driver ---------- */

fieldset.driver-choice { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin: 12px 0 4px; background: var(--surface); display: grid; gap: 6px; }
fieldset.driver-choice legend { font-weight: 600; font-size: 14px; padding: 0 4px; }
.suggestions { display: grid; gap: 6px; }
.suggestions p { margin: 0; }
.stack-form label.choice {
  display: flex; gap: 10px; align-items: flex-start; margin: 0; font-weight: 450;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer;
}
.stack-form label.choice:has(input:checked) { border-color: var(--link); background: var(--selected); }
.stack-form label.choice input { margin-top: 3px; }
.other-driver { padding-left: 30px; }
.other-driver .list-filter.wide { margin: 0 0 6px; }
.other-driver select { width: 100%; font: inherit; font-size: 14px; border: 1px solid var(--border); border-radius: 8px; padding: 4px; color: var(--text); }
.other-driver select optgroup { font-weight: 600; color: var(--muted); }
.driver-cell { font-size: 14px; min-width: 200px; }
.driver-cell .pill { margin-top: 4px; }
.stack-form label.choice input { width: auto; flex: none; padding: 0; }
.stack-form label.kind input { width: auto; padding: 0; }

/* ---------- Driver versions ---------- */
.older-versions { color: var(--muted); }
a.pill.update { background: #DBEAFE; color: #1E40AF; text-decoration: none; }
a.pill.update:hover { text-decoration: underline; }
.move-form { margin: 12px 0 0; }
.stack-form select {
  width: 100%; font: inherit; padding: 10px 12px; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px;
}
.stack-form select:focus { outline: none; border-color: var(--link); box-shadow: 0 0 0 3px rgba(30, 95, 208, 0.15); }
.other-driver select { padding: 4px; }

/* ---------- Default printer settings ---------- */
fieldset.defaults { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin: 12px 0 4px; background: var(--surface); }
fieldset.defaults legend { font-weight: 600; font-size: 14px; padding: 0 4px; }
.three-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.three-col label { margin-top: 0 !important; }
fieldset.defaults .hint { margin: 10px 0 0; }
.defaults-summary { display: inline-block; margin-top: 4px; font-size: 12px; font-weight: 500; color: var(--deploy); background: #CCFBF1; border-radius: 6px; padding: 1px 7px; }
@media (max-width: 720px) { .three-col { grid-template-columns: 1fr; } }

/* ---------- PCs ---------- */
.status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.status-dot.on { background: var(--bright-teal); box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18); }
.status-dot.off { background: #CBD5E1; }
.pc-list td { vertical-align: top; font-size: 14px; }
.pc-location select { font: inherit; font-size: 14px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; color: var(--text); background: var(--surface); }
.pcs { display: grid; gap: 12px; }
.pcs .list-head { margin-bottom: 0; }
.pcs .hint { margin: -6px 0 4px; }

/* ---------- The user portal ---------- */
body.portal { background: var(--panel); }
.portal-top { background: var(--navy); padding: 14px 24px; }
.portal-logo { height: 28px; display: block; }
.portal-main { max-width: 880px; margin: 0 auto; padding: 32px 24px 48px; display: grid; gap: 22px; }
.portal-head h1 { font-size: 26px; }
.portal-head .muted { margin: 6px 0 0; }
.portal-location { display: grid; gap: 12px; }
.portal-location h2 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.portal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; }
.portal-printer {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px;
}
.portal-printer.unavailable { opacity: 0.7; }
.printer-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: #E6FFFA; color: var(--deploy); }
.printer-text h3 { margin: 0; font-size: 16px; font-weight: 700; }
.printer-text p { margin: 2px 0 0; }
.portal-printer button { min-width: 96px; }
.portal-printer .not-here { max-width: 150px; margin: 0; }
.portal-note { text-align: center; }
.portal-message { text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 40px 24px; }
.portal-message img { margin-bottom: 12px; }
.portal-message .muted { max-width: 460px; margin: 10px auto 0; }
@media (max-width: 720px) {
  .portal-grid { grid-template-columns: 1fr; }
  .portal-printer { grid-template-columns: auto 1fr; }
  .portal-printer button, .portal-printer .not-here { grid-column: 1 / -1; max-width: none; }
}

/* Support view banner (the owner viewing a company's console). */
.support-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px;
  padding: 10px 24px; background: #0E7490; color: #fff; font-size: 14px; }
.support-banner.control { background: #B45309; }
.support-banner .support-mode { margin-left: 8px; opacity: 0.92; }
.support-banner .support-actions { display: flex; align-items: center; gap: 14px; }
.support-banner form { margin: 0; }
.support-banner .link.light { color: #fff; text-decoration: underline; }
.support-banner .button.light { background: #fff; color: #0F2744; }

/* "Cancel" under a form's main button. */
.form-cancel { margin: 0; text-align: center; font-size: 14px; }

.card > .hint + table.list { margin-top: 14px; }

/* Setup page (from a customer's setup link) and "Set up a PC". */
.setup-card { max-width: 640px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 32px; text-align: center; }
.setup-card h1 { margin: 12px 0 6px; }
.setup-card .button.big { display: inline-block; font-size: 16px; padding: 12px 22px; margin: 18px 0 8px; }
.setup-steps { text-align: left; margin: 18px 0; padding-left: 22px; display: grid; gap: 10px; line-height: 1.5; }
.setup-card .hint { text-align: left; }
.copy-row { display: flex; gap: 8px; align-items: center; margin: 6px 0 4px; }
.copy-row input { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.switch-form { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.client-steps { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.copy-row input { padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }

/* Support conversations. */
.filter-tabs { display: flex; gap: 6px; }
.filter-tabs a { font-size: 14px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: inherit; text-decoration: none; }
.filter-tabs a.on { background: #0F2744; border-color: #0F2744; color: #fff; }
.conversation-list { list-style: none; margin: 0; padding: 0; }
.conversation-list li { border-top: 1px solid var(--border); }
.conversation-list li:first-child { border-top: 0; }
.conversation-list a { display: flex; justify-content: space-between; gap: 16px; padding: 12px 4px; color: inherit; text-decoration: none; }
.conversation-list a:hover { background: var(--surface-2); }
.conversation-list .conv-main { display: grid; gap: 2px; min-width: 0; }
.conversation-list .conv-side { display: grid; justify-items: end; gap: 4px; white-space: nowrap; }
.conversation-list li.done strong { color: var(--muted); }
.new-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2563EB; margin-right: 8px; vertical-align: 2px; }
.page.narrow-wide { max-width: 760px; }
.conv-actions { display: flex; align-items: center; gap: 12px; }
.conv-actions form { margin: 0; }
.button.secondary { background: var(--surface); color: #1D4ED8; border: 1px solid #93C5FD; }
.thread { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.msg { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; max-width: 88%; }
.msg.mine { justify-self: end; background: var(--selected); border-color: #BFDBFE; }
.msg-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.msg-body { margin: 6px 0 0; }
.shots { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.shots img { max-width: 220px; max-height: 160px; border-radius: 8px; border: 1px solid var(--border); display: block; }
.choice-row { display: flex; gap: 16px; flex-wrap: wrap; }
.choice-row .choice { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.conv-actions .link, .conv-actions .button { white-space: nowrap; }

/* ---------- Dark mode (the moon/sun button in the top bar) ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --text: #E2E8F0;
  --muted: #94A3B8;
  --panel: #0B1424;
  --surface: #111C2E;
  --surface-2: #16233A;
  --selected: #1A3354;
  --border: #26354D;
  --blue: #3B82F6;
  --link: #60A5FA;
  --teal: #2DD4BF;
  --deploy: #5EEAD4;
}
:root[data-theme="dark"] .topbar, :root[data-theme="dark"] .portal-top { background: #060D1A; border-bottom: 1px solid var(--border); }
:root[data-theme="dark"] input, :root[data-theme="dark"] select, :root[data-theme="dark"] textarea { background-color: var(--surface); color: var(--text); }
:root[data-theme="dark"] .pill.on, :root[data-theme="dark"] .defaults-summary { background: #134E4A; color: #99F6E4; }
:root[data-theme="dark"] .pill.wait, :root[data-theme="dark"] .pill.kind-question { background: #422006; color: #FCD34D; }
:root[data-theme="dark"] .pill.off { background: #1E293B; color: #CBD5E1; }
:root[data-theme="dark"] .pill.id-pill { background: #0C4A6E; color: #BAE6FD; }
:root[data-theme="dark"] .pill.kind-problem { background: #450A0A; color: #FCA5A5; }
:root[data-theme="dark"] .pill.kind-suggestion, :root[data-theme="dark"] a.pill.update { background: #172554; color: #93C5FD; }
:root[data-theme="dark"] .notice { background: #422006; border-color: #92400E; color: #FDE68A; }
:root[data-theme="dark"] .notice.error { background: #450A0A; border-color: #991B1B; color: #FECACA; }
:root[data-theme="dark"] .notice.ok { background: #042F2E; border-color: #115E59; color: #99F6E4; }
:root[data-theme="dark"] .card.temp { background: #042F2E; border-color: #115E59; }
:root[data-theme="dark"] .printer-icon { background: #134E4A; color: #5EEAD4; }
:root[data-theme="dark"] .msg.mine { background: #172554; border-color: #1E3A8A; }
:root[data-theme="dark"] .status-dot.off { background: #475569; }
:root[data-theme="dark"] button.link.danger { color: #F87171; }
:root[data-theme="dark"] .button.secondary { color: #93C5FD; border-color: #1E3A8A; }
:root[data-theme="dark"] .filter-tabs a.on, :root[data-theme="dark"] .filter a.on { background: #E2E8F0; border-color: #E2E8F0; color: #0B1424; }
:root[data-theme="dark"] img.brand-dark-invert { filter: invert(1) hue-rotate(180deg); }

/* The light/dark button in the top bar. */
.theme-toggle { margin: 0; }
.theme-toggle button { background: none; color: #CBD5E1; padding: 6px; display: grid; place-items: center; border-radius: 8px; }
.theme-toggle button:hover { color: #fff; background: rgba(255,255,255,0.08); }

/* Installing from the printer page. */
.install-form { display: grid; justify-items: end; gap: 4px; margin: 0; }
.install-status { margin: 0; color: var(--muted); max-width: 220px; text-align: right; }
.install-status:empty { display: none; }
.install-status.done { color: var(--deploy); font-weight: 600; }
.install-status.done::before { content: "✓ "; }
.install-status.failed { color: #B91C1C; }
:root[data-theme="dark"] .install-status.failed { color: #F87171; }
.install-details { margin-top: 4px; font-size: 13px; }
.install-details summary { cursor: pointer; color: var(--muted); }
.install-details pre { white-space: pre-wrap; word-break: break-word; font-size: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; margin: 6px 0 0; max-height: 260px; overflow: auto; }
.install-box { display: grid; justify-items: end; gap: 4px; }
.install-box form { margin: 0; }
button.secondary { background: var(--surface); color: var(--link); border: 1px solid var(--border); }
tr.open-pc td { border-bottom: 0; background: var(--surface-2); }
tr.pc-printers-row td { background: var(--surface-2); padding-top: 0; }
.pc-printers { display: grid; gap: 6px; }
.pc-printer { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 8px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.pc-printer-state { display: flex; gap: 8px; align-items: center; }
.pc-printer-actions { display: flex; gap: 6px; justify-content: flex-end; min-width: 150px; }
.pc-printer-actions form { margin: 0; }
.failed-note { color: #B91C1C; cursor: help; }
:root[data-theme="dark"] .failed-note { color: #F87171; }

/* Long lists on the customer page stay about 8 rows tall and scroll inside. */
/* A table wider than the screen scrolls sideways inside its box, never the whole page. */
.scroll-box { overflow-x: auto; }
.scroll-box.capped { max-height: 480px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.scroll-box.capped table.list thead th { position: sticky; top: 0; z-index: 1; background: var(--surface); padding-top: 10px; }
.scroll-box.capped ul.plain { margin: 0; padding: 4px 12px; }
.pcs .list-filter.wide, .card .list-filter.wide { margin: 4px 0 10px; }
.scroll-box.capped .conversation-list { padding: 0 8px; }

/* Deleting. */
details.card.danger-zone summary h2 { display: inline; color: #B91C1C; }
details.card.danger-zone { border-color: #FCA5A5; }
.danger-card { border-color: #FCA5A5; }
button.danger:not(.link):not(.icon-act) { background: #B91C1C; color: #fff; }
a.danger-link { color: #B91C1C; }
:root[data-theme="dark"] details.card.danger-zone summary h2, :root[data-theme="dark"] a.danger-link { color: #F87171; }
:root[data-theme="dark"] details.card.danger-zone, :root[data-theme="dark"] .danger-card { border-color: #7F1D1D; }

/* The test site says so in the top bar, so it's never mistaken for the real one. */
.test-badge { background: #F59E0B; color: #111827; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; padding: 3px 8px; border-radius: 999px; margin-left: 10px; white-space: nowrap; }
[data-live="release"] > .card + .card { margin-top: 16px; }

/* Edit details and Delete customer sit at the bottom of the Contact box. */
.contact-card { display: flex; flex-direction: column; }
.contact-actions { margin-top: auto; padding-top: 16px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
/* While the Contact box is a form, the box beside it keeps its own height. */
.detail-grid.top-aligned { align-items: start; }
/* The customer page's column may shrink to the screen; wide tables scroll inside their box. */
.detail { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.detail > *, .detail-grid > *, .card.printers > * { min-width: 0; }
.card.printers { grid-template-columns: minmax(0, 1fr); }

/* Devices on the network */
.status-dot.warn { background: #F59E0B; }
.device-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.chip { font: inherit; font-size: 13px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.toner-cell { min-width: 140px; }
.toner { display: flex; align-items: center; gap: 8px; margin: 2px 0; }
.toner-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; min-width: 70px; }
.toner-fill { display: block; height: 100%; border-radius: 999px; background: #64748B; }
.toner-fill.toner-black { background: #111827; }
.toner-fill.toner-cyan { background: #06B6D4; }
.toner-fill.toner-magenta { background: #DB2777; }
.toner-fill.toner-yellow { background: #EAB308; }
.toner-fill.low { box-shadow: inset 0 0 0 1px #DC2626; }
.toner-pct { font-size: 12px; color: var(--muted); min-width: 34px; text-align: right; font-variant-numeric: tabular-nums; }
:root[data-theme="dark"] .toner-fill.toner-black { background: #E5E7EB; }
:root[data-theme="dark"] .chip.on { background: #1E5FD0; border-color: #1E5FD0; }
.toner-pct.low { color: #DC2626; font-weight: 700; }
:root[data-theme="dark"] .toner-pct.low { color: #F87171; }

/* Collapsible sections */
.fold-head { cursor: default; }
.fold-head h2 { margin: 0; }
.fold-toggle { all: unset; cursor: pointer; display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; border-radius: 6px; }
.fold-toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.fold-arrow { display: inline-block; width: 0; height: 0; border-left: 6px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent; transform: rotate(90deg); transition: transform .15s; margin-right: 2px; align-self: center; opacity: .7; }
.folded .fold-arrow { transform: none; }
.fold-summary { font-size: 13px; font-weight: 500; color: var(--muted); }
.fold-summary.alert { color: #B45309; font-weight: 600; }
:root[data-theme="dark"] .fold-summary.alert { color: #FBBF24; }
.folded > .fold-body { display: none; }
.card.folded { padding-bottom: 18px; }
.card.folded > .fold-head { margin-bottom: 0; }
/* the printers: one box for every office, office names stay at the top while scrolling */
.all-printers .location + .location { margin-top: 14px; }
.all-printers.multi .location-name { position: sticky; top: 0; z-index: 3; background: var(--surface); padding: 10px 16px 6px; margin: 0; }
.all-printers.capped.multi .printer-list thead th { top: 34px; }

/* The left-hand list stays put under the top bar and scrolls on its own,
   so a long list of customers never moves the right-hand side. */
@media (min-width: 721px) {
  .workspace > .customer-list {
    position: sticky; top: 60px; align-self: start;
    height: calc(100vh - 60px); overflow-y: auto; overscroll-behavior: contain;
  }
}

/* Users page: left-hand list */
.side-list li a { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.side-count { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--panel); border-radius: 999px; padding: 1px 8px; flex: none; }
.side-list li a.on .side-count { background: var(--surface); color: var(--link); }
.side-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 16px 10px 6px; }
.side-sub { margin: 2px 0 6px 14px !important; border-left: 2px solid var(--border); padding-left: 6px !important; }
.side-sub li a { font-weight: 450; font-size: 14px; padding: 6px 10px; }
.side-empty { color: var(--muted); font-size: 13px; padding: 6px 10px; }
.agent-update { margin: 2px 0 0; } .agent-update button.link { padding-left: 0; font-size: 13px; }
/* Partners page: numbers at a glance */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; display: grid; gap: 2px; color: var(--text); text-decoration: none; }
.stat strong { font-size: 24px; }
.stat strong small { font-size: 14px; color: var(--muted); font-weight: 600; }
.stat span { font-size: 13px; color: var(--muted); }
a.stat:hover { border-color: var(--link); }
.manage-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.manage-actions form { margin: 0; }
a.button.danger { background: #B91C1C; color: #fff; border-color: #B91C1C; }
.contact-clients { margin-top: auto; padding-top: 16px; display: flex; align-items: center; gap: 12px; }
.contact-clients h3 { margin: 0; }
.contact-clients + .contact-actions { margin-top: 0; padding-top: 12px; }

/* Dashboard */
.page.dashboard { max-width: 1100px; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.stat em.bad { color: #B91C1C; font-style: normal; font-weight: 600; }
.status-dot.bad { background: #DC2626; }
.attention-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px 24px; }
.attention-group h3 { font-size: 14px; margin: 0 0 8px; display: flex; align-items: center; }
.attention-group ul, .activity, .health { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.attention-group li { display: grid; gap: 1px; }
.attention-group li a { color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.attention-group li a:hover { color: var(--link); text-decoration: underline; }
.all-good { margin: 0; color: var(--muted); }
.activity li { display: grid; grid-template-columns: 16px 1fr auto; column-gap: 10px; align-items: baseline; }
.activity li .muted:not(.act-when) { grid-column: 2; }
.activity li .act-when { grid-column: 3; grid-row: 1; white-space: nowrap; }
.activity li a { color: var(--text); text-decoration: none; font-weight: 500; }
.activity li a:hover { color: var(--link); text-decoration: underline; }
.activity li.problem a { color: #B91C1C; }
.act-icon { width: 8px; height: 8px; border-radius: 50%; background: var(--bright-teal); align-self: center; }
.act-icon.act-pc { background: var(--blue); }
.act-icon.act-customer { background: #A855F7; }
.activity li.problem .act-icon { background: #DC2626; }
.health li { display: flex; align-items: center; gap: 8px; }
:root[data-theme="dark"] .activity li.problem a, :root[data-theme="dark"] .stat em.bad { color: #F87171; }

/* Team's own setup download, under the setup link */
.setup-download { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 14px 0 0; }
.setup-download .hint { margin: 0; }

/* Sign-in page extras: "Forgot your password?", set-password page */
.signin-foot { margin: 18px 0 0; text-align: center; font-size: 14px; }
.signin-card .hint { margin: 2px 0 0; font-size: 13px; }
.signin-card .notice { margin: 0 0 14px; }
.signin-card .button { display: inline-block; }

/* Your account page: change email */
#email details summary { cursor: pointer; display: inline-block; margin: 2px 0 10px; color: var(--link); font-weight: 500; }
#email details[open] summary { margin-bottom: 14px; }

/* Help */
.help-link { color: #CBD5E1; padding: 6px; display: grid; place-items: center; border-radius: 8px; flex-shrink: 0; margin-right: -24px; }
.help-link:hover, .help-link.active { color: var(--white); background: rgba(255,255,255,0.08); }
@media (max-width: 1150px) { .help-link { margin-right: -10px; } }
.help-page { max-width: 820px; }
.help-search { position: sticky; top: 72px; z-index: 5; }
.help-search input { width: 100%; font-size: 16px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); box-shadow: 0 2px 8px rgba(15,39,71,0.06); }
.help-section h2 { margin-bottom: 6px; }
.help-q { border-top: 1px solid var(--border); }
.help-q:first-of-type { border-top: 0; }
.help-q summary { cursor: pointer; padding: 12px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.help-q summary::-webkit-details-marker { display: none; }
.help-q summary::after { content: "+"; color: var(--muted); font-weight: 450; }
.help-q[open] summary::after { content: "–"; }
.help-q > div { padding: 0 0 14px; color: var(--text); line-height: 1.55; }
.help-q > div p { margin: 0 0 8px; }
.help-q > div ul, .help-q > div ol { margin: 0 0 8px; padding-left: 22px; }
.help-q > div li { margin: 3px 0; }
.help-foot { text-align: center; }
@media (max-width: 720px) { .help-search { top: 120px; } }

/* Dashboard: Dismiss on printer installs that didn't work */
.attention-group li.dismissable { grid-template-columns: 1fr auto; column-gap: 12px; }
.attention-group li.dismissable > a, .attention-group li.dismissable > span { grid-column: 1; }
.attention-group li.dismissable .dismiss { grid-column: 2; grid-row: 1 / span 2; align-self: center; margin: 0; }
.attention-group h3 .dismiss-all { margin: 0 0 0 auto; }
.attention-group h3 .dismiss-all button, .dismiss button { font-weight: 500; font-size: 13px; white-space: nowrap; }
.attention-group h3 .dismiss-all { padding-left: 10px; }

/* Sign-in: Keep me signed in */
.signin-card label.check, .stack-form label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 14px 0 2px; cursor: pointer; }
.signin-card label.check input, .stack-form label.check input { width: auto; margin: 0; }
.signin-card label.check + .hint, .stack-form label.check + .hint { margin: 0 0 14px; }

/* Users page: "+ Add a person" on the right of the heading; the form opens
   above the list */
.detail > .page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
#add-toggle { flex-shrink: 0; margin-top: 4px; }
#add.add-panel .grid-form-button { display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 720px) { .detail > .page-head { flex-wrap: wrap; } }
.nowrap { white-space: nowrap; }
.role-form select { font: inherit; font-size: 14px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; color: var(--text); background: var(--surface); cursor: pointer; }
.pill.own { background: #EDE9FE; color: #5B21B6; }
:root[data-theme="dark"] .pill.own { background: #2E1065; color: #C4B5FD; }
.customer-list li a .pill.own { margin-left: 6px; }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.head-actions .inline-form { margin: 0; }
.import-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin: 14px 0; }
.import-col { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--border); border-radius: 8px; padding: 10px; }
.import-col-head { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-col-sample { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 1.2em; }
.import-col select, .role-default select { font: inherit; font-size: 14px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; color: var(--text); background: var(--surface); }
.import-form label.check, .import-form .choice label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 8px 0; cursor: pointer; }
.import-form label.check input { width: auto; margin: 0; }
.import-form .choice { border: 0; padding: 0; margin: 0 0 16px; }
.import-form .choice legend { font-weight: 600; margin-bottom: 4px; }
.role-default { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 0; }
.role-default label { font-weight: 500; }
.scan-networks { margin: 4px 0 12px; }
.scan-networks .stack-form { max-width: 560px; margin-top: 8px; }
.scan-networks textarea { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; }
.scan-networks .stack-form button { width: auto; justify-self: start; }
.pill.new { background: #E0E7FF; color: #3730A3; }
:root[data-theme="dark"] .pill.new { background: #1E1B4B; color: #A5B4FC; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; }
.scan-networks .button-row button { width: auto; }
.whobar .console-version { margin-right: auto; color: var(--muted); }
.signin-card.doc-card { max-width: 760px; text-align: left; }
.doc-card h1 { margin-bottom: 0; }
.doc-card h2 { font-size: 18px; margin: 26px 0 8px; }
.doc-card p, .doc-card li { font-size: 15px; line-height: 1.6; }
.doc-card ul { padding-left: 20px; margin: 8px 0; }
.doc-card li { margin: 6px 0; }
.signin-legal { font-size: 13px; color: var(--muted); }
.signin-legal a { color: var(--muted); }
/* Short screens (a laptop, or a zoomed-in browser): tighten the sign-in
   box so it fits without scrolling. */
@media (max-height: 820px) {
  .signin-page { padding: 12px 16px; }
  .signin-card:not(.doc-card) { padding: 22px 26px; }
  .signin-card:not(.doc-card) .signin-logo { height: 32px; margin-bottom: 14px; }
  .signin-card:not(.doc-card) h1 { font-size: 22px; }
  .signin-card:not(.doc-card) .muted { margin: 2px 0 8px; }
  .signin-card:not(.doc-card) form { gap: 4px; }
  .signin-card:not(.doc-card) label { margin-top: 4px; }
  .signin-card:not(.doc-card) input { padding: 8px 12px; }
  .signin-card:not(.doc-card) label.check { margin: 10px 0 0; }
  .signin-card:not(.doc-card) label.check + .hint { margin: 0 0 6px; font-size: 12px; }
  .signin-card:not(.doc-card) button { margin-top: 8px; }
  .signin-card:not(.doc-card) .signin-foot { margin-top: 12px; }
}
.doc-card code { font-size: 13px; background: var(--panel); padding: 1px 5px; border-radius: 4px; }
.doc-figure { margin: 12px 0; }
.doc-figure svg { width: 100%; height: auto; display: block; }
.doc-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.doc-table th, .doc-table td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--border); line-height: 1.5; }
.doc-table thead th, .doc-table tr > th { font-weight: 600; color: var(--text); }
.doc-table tr > th { white-space: nowrap; width: 1%; }
.doc-card ul.checklist { list-style: none; padding-left: 0; }
.doc-card ul.checklist li { padding-left: 26px; position: relative; }
.doc-card ul.checklist li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 13px; height: 13px; border: 1.5px solid var(--muted); border-radius: 3px; }
@media (max-width: 600px) { .doc-table { font-size: 13px; } .doc-table th, .doc-table td { padding: 6px; } .doc-card code { word-break: break-all; } }
@media print {
  .doc-page { background: #fff !important; padding: 0; display: block; }
  .doc-page .doc-card { box-shadow: none; border: 0; max-width: none; padding: 0; }
  .no-print { display: none !important; }
  .doc-card h2 { break-after: avoid; }
  .doc-table tr, .doc-figure, .doc-card li { break-inside: avoid; }
  .doc-card a { color: inherit; }
}
.doc-table td:first-child { width: 24%; }
.doc-table thead th:last-child:nth-child(3), .doc-table td:last-child:nth-child(3) { width: 24%; }
.doc-card code { overflow-wrap: anywhere; }
.doc-card p:has(> strong:only-child) { break-after: avoid; margin-bottom: 4px; }
.doc-page { grid-template-columns: minmax(0, 1fr); justify-items: center; }
.doc-page .doc-card { min-width: 0; }
@media (max-width: 600px) { .doc-page .doc-card { padding: 24px 18px; } }
.doc-table thead th { width: auto; white-space: normal; }
.doc-table thead th:first-child { width: 24%; }
.detail-grid.single { grid-template-columns: 1fr; }

/* ---------- Convert ---------- */
.convert-page { max-width: 1100px; }
.convert-private { margin: 0; }
.field-label { display: block; font-weight: 600; font-size: 14px; margin: 4px 0 6px; }
.convert-select, .convert-name { font: inherit; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); min-width: 280px; max-width: 100%; }
.import-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 8px 0 12px; }
.import-choice { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--border); border-radius: 10px; padding: 14px; cursor: pointer; background: var(--surface); }
.import-choice:hover, .import-choice:focus-within { border-color: var(--link); background: var(--selected); }
.import-choice span { color: var(--muted); font-size: 13px; line-height: 1.4; }
.import-choice input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.convert-status { margin: 10px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--panel); color: var(--muted); font-size: 14px; }
.convert-status.success { background: #CCFBF1; color: #115E59; }
.convert-status.error { background: #FEE2E2; color: #991B1B; }
.convert-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.convert-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sort-control { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.sort-control select, .add-entry select, .add-entry input:not([type=checkbox]) { font: inherit; font-size: 14px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); }
.add-entry { border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin: 0 0 12px; background: var(--surface-2); }
.add-entry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.add-entry-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.add-entry label.check { display: flex; align-items: center; gap: 8px; margin: 12px 0; font-size: 14px; }
.convert-table-box { max-height: 620px; overflow: auto; }
.convert-table td { vertical-align: top; }
.convert-table .cellInput, .convert-table .keyInput { font: inherit; font-size: 14px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); width: 100%; min-width: 120px; box-sizing: border-box; }
.convert-table .keyInput { width: 70px; min-width: 0; }
.convert-table .cellLabel { display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; color: var(--muted); }
.convert-table .smbFields { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; min-width: 300px; }
.convert-table .center { text-align: center; }
.convert-table .removeEntry { background: none; border: 0; color: #B91C1C; cursor: pointer; font: inherit; font-size: 13px; padding: 4px; }
.convert-table tr.needsReview td { background: #FEF3C7; }
.convert-table tr.issueTarget td { box-shadow: inset 0 0 0 2px var(--link); }
.convert-table .tag { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--panel); }
.convert-table .tag.email { background: #DBEAFE; color: #1E40AF; }
.convert-table .tag.smb { background: #EDE9FE; color: #5B21B6; }
.convert-table .tag.fax { background: #CCFBF1; color: #115E59; }
.convert-table .ocr { display: block; margin-top: 4px; font-size: 11.5px; }
.convert-table .ocr.low { color: #B45309; font-weight: 600; }
.convert-table .ocr.good, .convert-table .ocr.reviewed { color: var(--muted); }
.convert-name { min-width: 320px; }
.convert-download { margin: 14px 0 6px; }
:root[data-theme="dark"] .convert-status.success, :root[data-theme="dark"] .convert-table .tag.fax { background: #134E4A; color: #99F6E4; }
:root[data-theme="dark"] .convert-status.error { background: #450A0A; color: #FCA5A5; }
:root[data-theme="dark"] .convert-table tr.needsReview td { background: #422006; color: #FCD34D; }
:root[data-theme="dark"] .convert-table .tag.email { background: #172554; color: #93C5FD; }
:root[data-theme="dark"] .convert-table .tag.smb { background: #2E1065; color: #C4B5FD; }
@media (max-width: 700px) { .convert-select, .convert-name { min-width: 0; width: 100%; } }
.model-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 4px 0 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.model-row label { font-weight: 600; font-size: 14px; }
.model-row .hint { margin: 0; }
.convert-more { position: relative; }
.convert-more > summary { list-style: none; cursor: pointer; }
.convert-more > summary::-webkit-details-marker { display: none; }
.convert-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 270px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 30px rgba(15, 39, 71, 0.18); padding: 6px; display: grid; }
.convert-menu button { background: none; border: 0; text-align: left; font: inherit; font-size: 14px; padding: 8px 10px; border-radius: 6px; color: var(--text); cursor: pointer; }
.convert-menu button:hover:not(:disabled) { background: var(--selected); }
.convert-menu button:disabled { color: var(--muted); opacity: 0.6; cursor: default; }
.convert-table .removeEntry { color: var(--muted); font-size: 20px; line-height: 1; padding: 2px 8px; border-radius: 6px; }
.convert-table .removeEntry:hover, .convert-table .removeEntry:focus-visible { color: #B91C1C; background: #FEE2E2; }
:root[data-theme="dark"] .convert-table .removeEntry:hover { color: #FCA5A5; background: #450A0A; }
.convert-more > summary.button { display: inline-block; font-weight: 600; font-size: 13px; padding: 5px 10px; border-radius: 8px; text-decoration: none; user-select: none; }
.convert-table .ocrOk { display: block; margin-top: 4px; background: none; border: 1px solid var(--border); border-radius: 6px; font: inherit; font-size: 12px; padding: 2px 6px; cursor: pointer; color: var(--text); }
.convert-table .ocrOk:hover { border-color: var(--link); color: var(--link); }
.hl-sample { background: #FEF3C7; color: #78350F; padding: 0 4px; border-radius: 4px; }
:root[data-theme="dark"] .hl-sample { background: #422006; color: #FCD34D; }
.status-dot.bad { background: #DC2626; }
strong.bad { color: #B91C1C; }
:root[data-theme="dark"] strong.bad { color: #FCA5A5; }
/* Convert: model search */
.model-picker { position: relative; flex: 0 1 340px; min-width: 260px; }
.model-picker input { width: 100%; box-sizing: border-box; min-width: 0; }
.model-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; max-height: 320px; overflow: auto; list-style: none; margin: 0; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 30px rgba(15, 39, 71, 0.18); }
.model-group { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); padding: 8px 10px 4px; }
.model-option { padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.model-option:hover, .model-option.active { background: var(--selected); color: var(--link); }
.model-none { padding: 10px; color: var(--muted); font-size: 14px; }
/* Convert: problems panel */
.issue-panel { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; margin: 0 0 12px; background: var(--surface-2); }
.issue-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.issue-head p { margin: 0; font-size: 14px; }
.only-problems { display: flex; align-items: center; gap: 6px; font-size: 13.5px; cursor: pointer; }
.only-problems input { margin: 0; }
.issue-group { margin: 8px 0 0; }
.issue-group > summary, .issue-more > summary { cursor: pointer; font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; list-style: none; }
.issue-group > summary::-webkit-details-marker, .issue-more > summary::-webkit-details-marker { display: none; }
.issue-group > summary::before, .issue-more > summary::before { content: "▸"; color: var(--muted); font-size: 12px; }
.issue-group[open] > summary::before, .issue-more[open] > summary::before { content: "▾"; }
.issue-group .issueDismiss { margin-left: auto; font-size: 13px; }
.issue-more { margin: 10px 0 0; }
.issue-more > summary { color: var(--muted); }
.issue-more .issue-group { margin-left: 18px; }
.issue-entries { margin: 6px 0 4px 34px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13.5px; }
.issue-entries li { max-width: 100%; }
.issue-entries .issueJump { background: none; border: 0; padding: 0; font: inherit; color: var(--link); cursor: pointer; text-decoration: underline; }
.issue-tools { display: flex; gap: 16px; margin-top: 8px; font-size: 13px; }
.convert-table tr.has-error td:first-child { box-shadow: inset 3px 0 0 #DC2626; }
.convert-table tr.has-warning td:first-child { box-shadow: inset 3px 0 0 #F59E0B; }
/* Modules: their name beside the logo, and green (the logo's ".app") in the
   top bar and as a heading on a customer's page. */
.topbar-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.topbar-module { color: #2DD4BF; font-weight: 700; font-size: 23px; letter-spacing: -0.01em; line-height: 1; white-space: nowrap; }
.topbar nav a.module { color: #2DD4BF; }
.topbar nav a.module:hover, .topbar nav a.module.active { color: #5EEAD4; }
.module-heading { color: var(--teal); font-size: 20px; font-weight: 700; margin: 12px 0 -4px; letter-spacing: -0.01em; }
:root[data-theme="dark"] .module-heading { color: #2DD4BF; }
@media (max-width: 760px) { .topbar-module { font-size: 19px; } }
@media (max-width: 480px) { .topbar-module { display: none; } }
/* Support sits apart at the right, outside the menu, so it never scrolls
   out of sight on a narrow screen. */
.topbar-support { white-space: nowrap; flex-shrink: 0; color: #CBD5E1; text-decoration: none; font-weight: 500; padding: 8px 12px; border-radius: 6px; }
.topbar-support:hover { color: var(--white); background: rgba(255,255,255,0.08); }
.topbar-support.active { color: var(--white); box-shadow: inset 0 -2px 0 var(--bright-teal); border-radius: 0; }
@media (max-width: 1150px) { .topbar-support { padding: 8px 10px; } }
@media (max-width: 900px) and (min-width: 721px) { .topbar-support { padding: 8px 7px; font-size: 14px; } }
@media (max-width: 1000px) { .topbar-module { font-size: 18px; } }
@media (max-width: 720px) {
  /* phones: Support at the end of the menu's row, still outside the part that scrolls */
  .topbar nav { flex: 1 1 calc(100% - 110px); margin: 6px 0 0 -12px; }
  .topbar-support { order: 4; margin-top: 6px; padding: 8px 6px 8px 10px; }
}
@media (max-width: 900px) { .topbar-module { display: none; } }
/* Who's signed in, with the version and test-site badge side by side
   under it. On pages with a left-hand list, the list runs right up to the
   blue bar and this line sits over the right-hand side only. */
:root { --whobar-h: 26px; }
body:has(.whobar-meta) { --whobar-h: 50px; }
.whobar { flex-direction: column; align-items: flex-end; gap: 4px; height: var(--whobar-h); box-sizing: border-box; position: relative; z-index: 5; pointer-events: none; }
.whobar > * { pointer-events: auto; }
.whobar-meta { display: flex; align-items: center; gap: 8px; }
.whobar .console-version { margin-right: 0; font-size: 12px; }
.whobar .test-badge { margin: 0; font-size: 10.5px; padding: 2px 8px; }
@media (min-width: 721px) {
  .whobar + .workspace { margin-top: calc(-1 * var(--whobar-h)); }
  .whobar + .workspace > .customer-detail { padding-top: calc(32px + var(--whobar-h)); }
}
@media (max-width: 720px) {
  .whobar { height: auto; }
}

/* ---------- The app switcher (Deploy's top bar; see app-switcher.html) ---------- */
.appsw { position: relative; flex-shrink: 0; }
.appsw summary { list-style: none; }
.appsw summary::-webkit-details-marker { display: none; }
.appsw-btn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: #CBD5E1; cursor: pointer; transition: background .15s, color .15s; }
.appsw-btn:hover, .appsw[open] .appsw-btn { background: rgba(255,255,255,0.08); color: #fff; }
.appsw-btn svg { fill: currentColor; }
.appsw-menu { position: absolute; right: 0; top: calc(100% + 10px); width: 300px; background: #0D1A2B; border: 1px solid #24344D; border-radius: 14px; padding: 8px; box-shadow: 0 18px 45px rgba(0,0,0,.38); display: grid; gap: 4px; z-index: 60; }
.appsw-title { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #6F8AA7; padding: 6px 8px 4px; }
.appsw-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 10px; color: #F1F5F9; text-decoration: none; }
.appsw-item:hover, .appsw-item.here { background: rgba(255,255,255,.07); }
.appsw-item b { display: block; font-size: 14px; font-weight: 750; }
.appsw-item small { display: block; font-size: 12px; color: #94A3B8; margin-top: 1px; line-height: 1.35; }
.appsw-icon { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.1); }
.appsw-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.appsw-item.workflow .appsw-icon { color: #93C5FD; background: rgba(30,95,208,.22); }
.appsw-item.deploy .appsw-icon { color: #5EEAD4; background: rgba(15,118,110,.28); }
.appsw-item.convert .appsw-icon { color: #FDBA74; background: rgba(180,83,9,.28); }
.appsw-all { display: block; text-align: center; font-size: 13px; font-weight: 700; padding: 8px; border-top: 1px solid #1E2D43; margin-top: 4px; color: #7FB2FF; }
.topbar-module.convert { color: #FDBA74; }
.appsw-item.admin .appsw-icon { color: #C7D2FE; background: rgba(99,102,241,.25); }

/* Your account: the profile picture (also in workflow.css for Admin's look) */
.photo-card { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.photo-big { width: 84px; height: 84px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: #DBEAFE; color: #1E40AF; font-weight: 800; font-size: 26px; flex: none; }
.photo-big img { width: 100%; height: 100%; object-fit: cover; }
.photo-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; flex: 1 1 260px; min-width: 0; }
.photo-actions form { margin: 0; }
.photo-pick { position: relative; overflow: hidden; display: inline-flex; cursor: pointer; }
.photo-pick { background: var(--blue); color: #fff; font-weight: 700; font-size: 14px; padding: 10px 16px; border-radius: 10px; }
.photo-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* Users list: people with their picture, icon actions */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.users-table th, .users-table td { vertical-align: middle; }
.users-table th { text-align: left; }
.users-table .who-row { display: flex; align-items: center; gap: 12px; }
.users-table .who-email { display: block; margin-top: 2px; }
.avatar-small { width: 34px; height: 34px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: #DBEAFE; color: #1E40AF; font-weight: 800; font-size: 12px; }
.avatar-small img { width: 100%; height: 100%; object-fit: cover; }
.users-table td.actions { text-align: right; white-space: nowrap; }
.users-table td.actions form { display: inline-block; margin: 0 0 0 4px; }
.icon-act { width: 36px; height: 36px; padding: 0; border-radius: 10px; display: inline-grid; place-items: center; cursor: pointer; background: transparent; border: 1px solid var(--border); color: var(--link); transition: background .15s, border-color .15s, color .15s, transform .15s; }
.icon-act svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-act:hover { transform: translateY(-1px); background: var(--selected); }
.icon-act.warn { color: #D97706; } .icon-act.warn:hover { border-color: #D97706; }
.icon-act.good { color: #15803D; } .icon-act.good:hover { border-color: #15803D; }
.icon-act.danger { color: #DC2626; } .icon-act.danger:hover { border-color: #DC2626; }
:root[data-theme="dark"] .icon-act.warn { color: #FBBF24; }
:root[data-theme="dark"] .icon-act.good { color: #4ADE80; }
:root[data-theme="dark"] .icon-act.danger { color: #F87171; }

/* Support: which app a conversation is about */
.app-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 6px; }
.app-pick-one { display: flex !important; align-items: center; gap: 10px; margin: 0 !important; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; font-weight: 700; transition: border-color .15s, background .15s; }
.app-pick-one input { position: absolute; opacity: 0; pointer-events: none; }
.app-pick-one:hover { border-color: #818CF8; }
.app-pick-one:has(input:checked) { border-color: #818CF8; background: var(--selected); box-shadow: 0 0 0 2px rgba(129, 140, 248, .35); }
.app-pick-one:has(input:focus-visible) { outline: 2px solid #818CF8; outline-offset: 2px; }
.app-pick-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; background: rgba(148, 163, 184, .15); color: #CBD5E1; }
.app-pick-ico svg { width: 18px; height: 18px; }
.app-pick-one.workflow .app-pick-ico { background: rgba(13, 148, 136, .18); color: #5EEAD4; }
.app-pick-one.convert .app-pick-ico { background: rgba(245, 158, 11, .18); color: #FCD34D; }
.app-pick-one.deploy .app-pick-ico { background: rgba(59, 130, 246, .18); color: #93C5FD; }
.app-pick-one.monitor .app-pick-ico { background: rgba(236, 72, 153, .16); color: #F9A8D4; }
.app-pick-one.account .app-pick-ico { background: rgba(129, 140, 248, .18); color: #C7D2FE; }
.app-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 750; background: rgba(148, 163, 184, .15); color: #CBD5E1; }
.app-tag.workflow { background: rgba(13, 148, 136, .18); color: #5EEAD4; }
.app-tag.convert { background: rgba(245, 158, 11, .18); color: #FCD34D; }
.app-tag.deploy { background: rgba(59, 130, 246, .18); color: #93C5FD; }
.app-tag.monitor { background: rgba(236, 72, 153, .16); color: #F9A8D4; }
.app-tag.account { background: rgba(129, 140, 248, .18); color: #C7D2FE; }

/* The printer form: compact, several fields to a row */
.compact-form label { margin-top: 0; }
.pf-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px 14px; }
.pf-grid > div { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pf-grid input, .pf-grid select { width: 100%; box-sizing: border-box; margin: 0; }
.pf-2 { grid-column: span 2; } .pf-3 { grid-column: span 3; } .pf-4 { grid-column: span 4; } .pf-port { grid-column: span 1; }
.pf-grid label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compact-form fieldset.driver-choice { margin: 14px 0 0; }
.compact-form .other-driver { display: none; }
.compact-form fieldset.driver-choice:has(input[value="other"]:checked) .other-driver { display: block; }
.compact-form .choice { padding-top: 7px; padding-bottom: 7px; }
.pf-notes { margin-top: 12px; }
.pf-notes summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.pf-notes textarea { margin-top: 8px; width: 100%; box-sizing: border-box; }
.pf-buttons { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.pf-buttons button, .pf-buttons .button { width: auto; min-width: 120px; margin: 0; }
@media (max-width: 820px) { .pf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .pf-2, .pf-3, .pf-4 { grid-column: 1 / -1; } .pf-grid .pf-host { grid-column: span 2; } }

.pf-buttons .button { display: inline-flex; align-items: center; justify-content: center; }
.clear-form { margin: 0; }
.clear-form .link { font-size: 12px; }

/* Users list in a narrow space (e.g. next to the partners list): each person
   becomes a small block instead of a table row, so nothing scrolls sideways. */
.users-table-box { container-type: inline-size; }
.users-table .who-email { overflow-wrap: anywhere; }
@container (max-width: 640px) {
  .users-table thead { display: none; }
  .users-table, .users-table tbody { display: block; }
  .users-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who status" "role actions"; gap: 8px 12px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--border); }
  .users-table tbody tr:last-child { border-bottom: 0; }
  .users-table td { display: block; padding: 0 !important; border: 0 !important; background: none !important; }
  .users-table td.who-cell { grid-area: who; }
  .users-table td.role-cell { grid-area: role; }
  .users-table td.status-cell { grid-area: status; justify-self: end; }
  .users-table td.actions { grid-area: actions; justify-self: end; }
  .users-table td select { max-width: 100%; padding-top: 5px; padding-bottom: 5px; }
  .users-table .avatar-small { width: 30px; height: 30px; font-size: 11px; }
  .users-table .icon-act { width: 32px; height: 32px; }
  .users-table .icon-act svg { width: 16px; height: 16px; }
}

/* Choose a password, forgot password, email changed: the apps' dark look */
body.signin-page {
  background:
    radial-gradient(circle at 80% -10%, rgba(30, 95, 208, .32) 0, transparent 40%),
    radial-gradient(circle at 10% 110%, rgba(13, 148, 136, .22) 0, transparent 36%),
    #07111F !important;
  color: #F1F5F9;
}
body.signin-page .signin-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 40%), #101C2E;
  border: 1px solid #24344D; border-radius: 20px; color: #F1F5F9;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .45);
}
.signin-brand-new { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; text-decoration: none; }
.sb-word { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.sb-word .w-install { color: #fff; } .sb-word .w-pro { color: #7FB2FF; } .sb-word .w-app { color: #2DD4BF; }
body.signin-page h1 { color: #F1F5F9; font-weight: 800; letter-spacing: -.02em; }
body.signin-page .muted, body.signin-page .hint { color: #94A3B8; }
body.signin-page strong { color: #F1F5F9; }
body.signin-page .signin-card label { color: #E2E8F0; font-weight: 700; }
body.signin-page .signin-card input { background: #0B1727; border: 1px solid #2B3B57; color: #F1F5F9; border-radius: 11px; }
body.signin-page .signin-card input:focus { outline: none; border-color: #14B8A6; box-shadow: 0 0 0 3px rgba(20, 184, 166, .22); }
body.signin-page .signin-card button, body.signin-page .signin-card a.button {
  background: linear-gradient(135deg, #1E5FD0, #0D9488); color: #fff; border: 0; border-radius: 11px; font-weight: 800;
  box-shadow: 0 10px 24px rgba(13, 148, 136, .28); transition: transform .18s, filter .18s;
}
body.signin-page .signin-card button:hover, body.signin-page .signin-card a.button:hover { transform: translateY(-2px); filter: brightness(1.08); }
body.signin-page a { color: #7DD3FC; }
body.signin-page .notice.ok { background: rgba(20, 184, 166, .12); border-color: rgba(45, 212, 191, .35); color: #CCFBF1; }
body.signin-page .notice.error { background: rgba(239, 68, 68, .12); border-color: rgba(248, 113, 113, .4); color: #FECACA; }


/* Copy a password link (Users page) */
.copy-link { display: flex; gap: 8px; margin: 12px 0 6px; }
.copy-link input { flex: 1; min-width: 0; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
.card.temp { position: relative; }
.card.temp h2 { padding-right: 36px; }
section.card.temp > button.card-close { box-shadow: none; position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; padding: 0; display: grid; place-items: center; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; transition: background .2s ease, color .2s ease, transform .2s ease; }
section.card.temp > button.card-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
section.card.temp > button.card-close:hover { background: rgba(127,127,127,.15); color: var(--text, inherit); transform: translateY(-1px); }
.card.temp .inline-form p.hint { margin: 0; }
.card.temp .inline-form p.hint .link { display: inline; padding: 0; font: inherit; }
/* Six tiles (a partner's page in Admin): all on one row when there's room */
@media (min-width: 900px) { .stat-row:has(> :nth-child(6):last-child) { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* Owner dashboard › Health: the PCs on an older agent, with Update buttons */
.old-agents summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.old-agents summary::-webkit-details-marker { display: none; }
.old-agents[open] summary .link { visibility: hidden; }
.old-pcs { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.old-pcs li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line, rgba(127,127,127,.25)); border-radius: 10px; }
.old-pcs form { margin: 0; }
.old-pc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.old-pc-main small { overflow-wrap: anywhere; }
.old-all { display: flex; align-items: center; gap: 10px; margin: 10px 0 0; flex-wrap: wrap; }
.health-link { color: inherit !important; text-decoration: none !important; display: inline-flex; align-items: center; gap: 8px; }
.health-link:hover .link { text-decoration: underline; }
.old-pcs { max-height: 340px; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }

/* Address boxes: street and suite full width, then city, state, ZIP on one row */
.addr-fields { display: grid; grid-template-columns: minmax(0, 1fr) 90px 130px; gap: 0 12px; }
.addr-fields .addr-wide { grid-column: 1 / -1; }
.addr-fields label { margin-top: 10px; }
.addr-fields input { width: 100%; }
@media (max-width: 520px) { .addr-fields { grid-template-columns: minmax(0, 1fr) 80px; } .addr-fields .addr-zip { grid-column: 1 / -1; } }

/* Bigger monitors: the customer page uses the room (up to 1400px) instead of
   stopping at 900px with empty space beside it. */
@media (min-width: 1500px) { .detail { max-width: none; } }
.install-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.install-status.changed { color: #B45309; font-weight: 600; }

/* Add a partner: make the contact their Super Admin. */
.stack-form label.make-admin { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0 4px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); font-weight: 400; line-height: 1.45; cursor: pointer; }
.stack-form label.make-admin input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; }
.stack-form label.make-admin b { font-weight: 700; }

/* Client logins: what each client sees of the copiers (ticks under Client). */
.cc-ticks { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 6px; font-size: 12.5px; font-weight: 600; }
.cc-ticks label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; white-space: nowrap; }
.cc-ticks label.dim { opacity: .5; cursor: default; }
.cc-ticks input { width: 15px; height: 15px; margin: 0; accent-color: #22C55E; }
.cc-saved { color: var(--muted); font-weight: 500; }
#upload-progress #upload-cancel { margin-top: 8px; }
/* Users list: the arrow beside each provider shows or hides its customers. */
.side-list li.side-partner { position: relative; }
.side-list li.side-partner > a { padding-left: 30px; }
.side-list .side-toggle { position: absolute; left: 6px; top: 8px; width: 22px !important; min-width: 0 !important; height: 22px; display: grid; place-items: center; padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; color: var(--muted) !important; cursor: pointer; border-radius: 6px; z-index: 1; }
.side-list .side-toggle:hover { color: var(--link) !important; background: var(--panel) !important; transform: none; }
.side-list .side-toggle:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }
.side-list .side-toggle svg { transition: transform .15s ease; }
.side-list .side-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .side-list .side-toggle svg { transition: none; } }
.stack-form label.check.pf-mac { align-items: flex-start; } .stack-form label.check.pf-mac input { margin-top: 3px; }
.printer-form .pf-mac { margin: 12px 0 4px; } .printer-form .pf-mac select { max-width: 100%; }
.printer-form .pf-mac .hint { margin-top: 6px; }
.printer-form .pf-mac .mac-find { margin-bottom: 6px; }
.mac-set .mac-group { border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
.mac-set .mac-group > summary { cursor: pointer; font-weight: 700; }
.mac-set .mac-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 16px; margin-top: 10px; }
.mac-set .mac-opt { display: grid; gap: 4px; align-content: start; }
.mac-set .mac-opt label { font-weight: 600; font-size: 13px; margin: 0; }
.mac-set .mac-opt .hint { font-size: 12px; margin: 0; }
.driver-choice .drv-sub { margin: 10px 0 6px; font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.driver-choice .drv-sub label { margin: 0; font: inherit; color: inherit; }
.driver-choice .pf-mac { margin: 14px 0 2px; padding-top: 12px; border-top: 1px solid var(--border); }
.pf-mac .mac-results { list-style: none; margin: 0 0 8px; padding: 4px; border: 1px solid var(--border); border-radius: 10px; max-height: 280px; overflow-y: auto; }
.pf-mac .mac-results li { margin: 0; padding: 0; }
.pf-mac .mac-results li.muted { padding: 8px 10px; }
.pf-mac .mac-result { display: flex; justify-content: space-between; gap: 12px; width: 100%; text-align: left; background: none !important; box-shadow: none !important; border: 0; border-radius: 8px; padding: 8px 10px; color: var(--text); font-weight: 600; cursor: pointer; }
.pf-mac .mac-result:hover, .pf-mac .mac-result:focus-visible { background: var(--surface-2, rgba(148, 163, 184, .12)) !important; }
.pf-mac .mac-results-head { padding: 6px 10px 2px; }
.pf-mac .mac-result { min-height: 0; line-height: 1.3; }
.mac-set .mac-more { margin-top: 12px; }
.mac-set .mac-more > summary { cursor: pointer; font-weight: 700; color: var(--link); }
.mac-set .mac-more > .list-filter { margin-top: 10px; }
