/* ChatAdmin: the next step (NEXT, 2026-11-14, the owner: "make the important button and its text bigger ... the next
   step need to be highlighted. Do not let customer find next step with guess."). Loaded after style.css (index.html,
   the same line); uses style.css's tokens. next.js keeps ONE primary per screen and each action once. */

/* the primary: the next step - large, filled, at least 44 px high */
.primary, button.primary, a.btn.primary, .btn.primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 10px 20px; border-radius: 10px;
  background: var(--teal); border: 1px solid var(--teal); color: #fff;
  font-size: 16px; font-weight: 600; line-height: 1.25; text-decoration: none; cursor: pointer;
}
.primary:hover, a.btn.primary:hover { background: #185A62; border-color: #185A62; color: #fff; }
.primary:focus-visible, a.btn.primary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.primary[disabled] { opacity: .6; cursor: default; }

/* a primary that is not the next step on this screen (next.js): clearly secondary */
.primary.demoted, a.btn.primary.demoted { background: var(--panel); color: var(--teal); font-weight: 600; }
.primary.demoted:hover { background: var(--teal-soft); color: var(--teal); }

/* the same action shown twice: the copy away from the context is hidden (next.js) */
.dup-hidden { display: none !important; }

/* the plans link in the header: a real button; the call to action while there is no paid plan */
.top a.navlink {
  display: inline-flex; align-items: center; min-height: 38px; padding: 6px 16px; margin-left: 12px;
  border: 2px solid var(--teal); border-radius: 999px; color: var(--teal); background: var(--panel);
  font-size: 15px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.top a.navlink:hover { background: var(--teal-soft); }
.top a.navlink.cta { background: var(--teal); color: #fff; }
.top a.navlink.cta:hover { background: #185A62; }
.top a.navlink.cta.demoted { background: var(--panel); color: var(--teal); }

/* a step list: the current step is marked "Next", the done steps are checked */
.facts li.next-step, .org-steps.next-step {
  font-weight: 700; color: var(--text); border-left: 4px solid var(--teal); padding-left: 10px; margin-left: -14px;
}
.facts li.next-step::before {
  content: "Next"; display: inline-block; margin-right: 8px; padding: 1px 8px; border-radius: 999px;
  background: var(--teal); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .02em;
}
.facts li.done-step { color: var(--green); }

/* the plan button under a "needs a plan" answer */
.plans-cta { margin: 8px 0 4px; }

/* the plans page (PLANS, 2026-11-14): the MSP pilot first and most prominent, Standard recommended, Essential smaller,
   Enterprise one line; the MSP button is prominent but secondary (no purchase: a pilot agreed with Neopiq) */
.commercial .plan.msp-feature {
  border: 2px solid var(--teal); background: var(--teal-soft); padding: 16px 18px; margin: 10px 0 14px; gap: 8px;
}
.commercial .plan.msp-feature h3 { font-size: 20px; }
.commercial .plan.msp-feature p { margin: 0; }
.commercial .plan .badge {
  align-self: flex-start; padding: 2px 10px; border-radius: 999px; background: var(--teal); color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
}
.commercial .plan.recommended { border: 2px solid var(--teal); box-shadow: 0 2px 10px rgba(31, 110, 120, .15); }
.commercial .plan.recommended h3 { font-size: 18px; }
.commercial .plan.recommended .price { font-size: 18px; }
.commercial .plan.minor { font-size: 14px; }
.commercial .plan.minor h3 { font-size: 15px; }
.btn.cta-secondary, a.btn.cta-secondary {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 20px;
  border: 2px solid var(--teal); border-radius: 10px; background: var(--panel); color: var(--teal);
  font-size: 16px; font-weight: 700; text-decoration: none; align-self: flex-start;
}
.btn.cta-secondary:hover { background: var(--panel2); color: var(--teal); }
.commercial .enterprise-line { margin: 14px 0 4px; }

/* the sign-in or connect button that was clicked: it says what happens now */
.primary.going { opacity: .8; cursor: progress; }

@media (max-width: 600px) {
  .primary, a.btn.primary { width: 100%; }
  .top a.navlink { margin-left: 4px; padding: 6px 12px; font-size: 14px; }
}

/* 2026-11-14 (the owner: "too wide ... looks not like a button but like a separator bar"): the plan button under a chat
   answer is sized to its words and sits at the start of the line, like every other button */
a.btn.plans-cta { display: inline-flex; align-self: flex-start; width: auto; max-width: max-content;
  margin: 10px 0 6px; padding: 10px 22px; border-radius: 999px; }
@media (max-width: 600px) { a.btn.plans-cta { max-width: none; width: auto; } }

/* UXB (2026-11-14, the owner's MSP B2B test): the connect page is one short block with ONE action at the top and the
   result right under it, large and coloured; the detail folded; the MSP directory readable */
#mspConnectPanel h2 { font-size: 1.5rem; margin: 0 0 6px; }
#mspConnectPanel .lead { font-size: 1.05rem; margin: 0 0 14px; }
.msp-connect-actions .primary { font-size: 1.1rem; min-height: 48px; padding: 12px 28px; }
.msp-connect-status { margin: 14px 0; padding: 14px 16px; border-radius: 10px; border: 2px solid var(--line, #d6dde3);
  background: var(--panel, #fff); font-size: 1rem; }
.msp-connect-status:empty { display: none; }
.msp-connect-status h3 { margin: 0 0 6px; font-size: 1.2rem; }
.msp-connect-status.ok { border-color: #1b7f5a; background: #eaf7f0; }
.msp-connect-status.ok h3 { color: #145c42; }
.msp-connect-status.bad { border-color: #b3261e; background: #fdeceb; }
.msp-connect-status.bad h3 { color: #8a1c1c; }
.msp-connect-status a.btn.primary, .msp-connect-status button.primary { margin-top: 8px; display: inline-flex; width: auto; }
.msp-connect-details { margin-top: 18px; }
.msp-connect-details summary { cursor: pointer; font-weight: 600; }
.msp-directory td.msp-name { white-space: nowrap; font-weight: 600; }
.msp-directory td { vertical-align: top; }
/* 2026-11-15 (the MSP B2B test, finding 8): the customer table breathes; the create action is a real button */
table.msp-directory { width: 100%; border-collapse: collapse; }
table.msp-directory th, table.msp-directory td { padding: 8px 10px; vertical-align: top; text-align: left; }
table.msp-directory td.msp-actions { gap: 6px; }
#mspCreateBtn { min-height: 40px; padding: 8px 18px; font-size: 15px; }
/* B1 option A: the pending-invitation guidance, small and calm */
.msp-invite-hint { flex-basis: 100%; color: var(--muted, #5b6770); }
/* the legal review of 2026-11-17 (Anthropic's usage policy, EU AI Act art. 50): one calm line under the input, always
   visible (the narrow layout hides the composer hint, never this one) */
.ai-notice { margin: 2px 0 0; font-size: 12px; color: var(--dim); }
/* 2026-11-18 (the live T-CUST test on hub v69): the consent row of a turn, under the Chair's answer and never inside a
   collapsed agent block (admin_consent.js place); an older row for the same consent set is hidden */
.consent-lift { margin: 6px auto 10px; max-width: 760px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
.consent-lift .forward-row.permission-needed { display: flex; flex-wrap: wrap; margin-left: 0; gap: 8px; }
.consent-lift .admin-consent-box { flex-basis: 100%; }
.consent-lift.superseded { display: none; }

/* VISITOR VIEW (2026-11-18, found on the live site): nobody signed in on /start, or the room asking for a sign-in
   (visitor.js sets body.visitor). No operator chrome before a sign-in: no view toggle, Workings, How access works,
   Keys, Start over, model pill or agent tiles; the brand, "← neopiq.ai", what ChatAdmin is, the sign-in and the plans.
   Signed in, the class is gone and the page is as before. Presentation only. */
#siteLink, #visitorLead { display: none; }
body.visitor #siteLink { display: inline-flex; }
body.visitor #visitorLead { display: block; margin: 16px 12px 0; padding: 0 19px; font-size: 16px; line-height: 1.5; color: var(--text); }
body.visitor .viewtoggle, body.visitor #workingsBtn, body.visitor #accessBtn, body.visitor #orgBtn, body.visitor #mspBtn,
body.visitor #keysBtn, body.visitor #resetBtn, body.visitor #llmPill, body.visitor #planLink, body.visitor #trialBadge,
body.visitor #rail, body.visitor #workings, body.visitor .chat > .feed, body.visitor #composer, body.visitor #cardStrip,
body.visitor #llmBanner, body.visitor #mspBand, body.visitor #orgModeLine, body.visitor #organization,
body.visitor #mspPanel { display: none !important; }
body.visitor .room { display: flex; flex-direction: column; min-height: 0; }
body.visitor .chat { flex: 1; min-height: 0; width: 100%; max-width: 1100px; margin: 0 auto; }
@media (max-width: 960px) { body.visitor #visitorLead { margin: 10px 8px 0; padding: 0 12px; font-size: 15px; } }

/* LAND IN CHAT (2026-11-19, the owner: "the Open ChatAdmin button is small and white, very easily not noticed"):
   wherever "Open ChatAdmin" still shows it is THE primary - the site's colour (white on var(--teal) #1F6E78, contrast
   5.9:1, WCAG AA), large, full width on a phone; next.js never demotes it */
a.btn.primary.open-chat { min-height: 52px; padding: 14px 32px; font-size: 18px; font-weight: 700; border-radius: 12px;
  background: var(--teal); border-color: var(--teal); color: #fff; margin: 12px 0 4px; }
a.btn.primary.open-chat:hover { background: #185A62; border-color: #185A62; color: #fff; }
@media (max-width: 600px) { a.btn.primary.open-chat { display: flex; width: 100%; } }
/* the two entry points: the free first look is the primary, the sign-in of an organisation already on ChatAdmin a
   plain text link under it */
.signin-existing { margin: 8px 0 14px; font-size: 15px; }
.signin-existing a, .signin-existing button { color: var(--teal); font-weight: 600; text-decoration: underline;
  background: none; border: none; padding: 0; font-size: 15px; cursor: pointer; }
/* 2026-11-19 (the owner, Production v86): the two entry points are two buttons of the same size side by side - the
   first filled, the second outlined (stacked on a phone); one short line under them */
.actions.entry-pair { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; max-width: 640px; }
.actions.entry-pair > .entry-btn { flex: 1 1 0; min-width: 220px; min-height: 52px; padding: 12px 20px; font-size: 17px; font-weight: 700;
  border: 2px solid var(--teal); }
.actions.entry-pair > .entry-btn.entry-second, .actions.entry-pair > .entry-btn.demoted {
  background: var(--panel); color: var(--teal); border: 2px solid var(--teal); }
.actions.entry-pair > .entry-btn.entry-second:hover { background: var(--teal-soft); color: var(--teal); }
.entry-hint { margin: 8px 0 14px; font-size: 15px; color: var(--muted); }
@media (max-width: 600px) { .actions.entry-pair { flex-direction: column; } .actions.entry-pair > .entry-btn { width: 100%; min-width: 0; flex: none; } }
.commercial .plans-heading { margin: 18px 0 4px; font-size: 16px; }
.commercial .plain-status { font-size: 16px; font-weight: 600; }
.commercial details.tech-details { margin: 6px 0; font-size: 13px; color: var(--muted, #5b6770); }
.commercial details.tech-details summary { cursor: pointer; }
.commercial .ask-admin { font-size: 17px; font-weight: 600; }

/* CUSTOMER VIEW (2026-11-19, the UX review of Sandbox v82; customer.js sets body.customer-view for a signed-in person
   who is not a Neopiq operator, unless the footer's "Technical details" is open): no operator or technical item -
   the keys, Workings, the Everything view, the model pill, How access works, the build line, the composer's key hint,
   the turn and budget counters, the done line, a tool's internal name and raw input/result, the second status of a
   tile. Every control stays in the page; the class alone hides it. */
.plain-name { display: none; }
body.customer-view #keysBtn, body.customer-view #workingsBtn, body.customer-view #viewEverythingBtn,
body.customer-view #llmPill, body.customer-view #accessBtn, body.customer-view #workings, body.customer-view #keyDrawer,
body.customer-view #version, body.customer-view .composer-hint, body.customer-view .budget-line,
body.customer-view .tech-line, body.customer-view .tool .name, body.customer-view .tool details,
body.customer-view .tile .pills .pill:not(.state), body.customer-view .tile .tag, body.customer-view .tile .facts,
body.customer-view .tile .keyline { display: none !important; }
body.customer-view .tool .plain-name { display: inline; font-weight: 600; }
/* backlog item 26: the conversation names the area - "You · to Microsoft Entra" (not "YOU"), the To: chips in words */
body.customer-view .msg .who { text-transform: none; letter-spacing: 0; }
body.customer-view .chip[data-to] { font-family: inherit; }
/* nothing connected yet: ONE line on the rail instead of the same badge on every tile (every view) */
.rail.all-connect .tile .pill.state { display: none; }
.rail-connect { margin: 0 0 10px; padding: 10px 12px; border: 2px solid var(--amber); border-radius: 10px;
  background: var(--amber-soft); color: var(--text); font-weight: 700; font-size: 15px; }
footer .tech-toggle { margin-left: 12px; background: none; border: none; padding: 2px 4px; color: var(--teal);
  font-size: 12px; text-decoration: underline; cursor: pointer; }

/* TOP BAR CONNECT (the owner in Production, hub v85, 2026-11-19: "Connect" half hidden behind the "Conversation" pill,
   still reacting to hover and click). On a desktop the sign-in area used to shrink below its own buttons (style.css:
   min-width 0) and they spilled out of it, under the view toggle. Now the area never gets narrower than what it holds:
   its buttons never shrink, the identity line is capped (ellipsis), and a header too full for one line scrolls
   sideways instead of stacking controls on one another. */
@media (min-width: 961px) {
  header.top .signin { min-width: auto; flex: none; }
  header.top .signin > .signed-in { max-width: 28vw; }
  header.top .signin > button { flex: none; }
}

/* THE OPEN VIEW IS THE ACTIVE CONTROL (the owner's test report B6, 2026-11-19: with the Organization page open the
   "Conversation" pill stayed teal and "Organization" looked idle). While the Organization (or Customers) panel is open
   its button is filled and the view toggle shows no pressed view. */
header.top #orgBtn[aria-expanded="true"], header.top #mspBtn[aria-expanded="true"] {
  background: var(--teal); border-color: var(--teal); color: #fff; }
body:has(#orgBtn[aria-expanded="true"]) .viewtoggle .viewbtn[aria-pressed="true"],
body:has(#mspBtn[aria-expanded="true"]) .viewtoggle .viewbtn[aria-pressed="true"] { background: var(--panel); color: var(--muted); }
/* back from Connect your environment (report B3): the one "Ask again: <the question>" under the thread */
#feed .resume-ask { align-self: flex-start; margin: 4px 0 8px; }
/* the Organization page in plain words (report B6): the technical line folds under Technical details */
.org-tech { font-size: 12px; color: var(--muted); } .org-tech summary { cursor: pointer; }
