/* ==== The three sections (Platform next release P6): the homes /demo and /client, the gates of AppGate and the company
   picker of the top bar (sec-), and Demo > Invitations (inv-) ====
   Same look as the rest of OneStop (app.css: panels, panel-head, table, hint, notice, error, empty, btn, toolbar,
   admin-form, admin-state, admin-actions, mine-picker). Loaded by Components\App.razor for every page, after epics.css.
   Pages: TTech.Platform.Client\Pages\DemoHome.razor, ClientHome.razor, Shared\AppGate.razor, Layout\MainLayout.razor,
   Apps\Demo\InvitationsPage.razor. Colours only through the tokens of app.css, so the dark theme follows. Phones: the
   switch of three sections tightens under 600px, the invitations' toolbar and actions wrap. */

/* The switch of three sections: the same pills as two, a little tighter on a phone */
@media (max-width: 600px) {
  .section-switch a { padding: 6px 11px; gap: 5px; font-size: 0.82rem; }
}

/* The company picker of an employee in the Client section (the mine picker's look, MainLayout) */
.company-picker .mine-name { max-width: 180px; }

/* The homes: the line above the tiles (what the section is, the Guide) */
.home-toolbar { margin-bottom: -6px; }
.welcome-until { color: var(--text); font-weight: 700; }

/* The Client section of an employee without a company: the companies to choose from */
.section-companies .panel-head h2 { margin: 0; }
.section-company-list { display: flex; flex-wrap: wrap; gap: 8px; }
.section-company-list .btn { display: inline-flex; align-items: center; gap: 6px; }

/* AppGate's panels in the Client section (choose a company, the company does not have the app, not connected yet) */
.section-gate h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* The Demo section's home: the invitations (employees) and what the demo is */
.demo-invitations, .demo-about { margin-top: 4px; }
.demo-invitations h3, .demo-about h3 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 1rem; }
.demo-invitations-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-about ul { margin: 8px 0 0; padding-left: 20px; color: var(--muted); }
.demo-about li { margin: 3px 0; }

/* Demo > Invitations */
.inv-toolbar { margin-bottom: 10px; }
.inv-search {
  flex: 1 1 260px;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--field);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
}
.inv-check { display: inline-flex; align-items: center; gap: 6px; font-size: 0.86rem; color: var(--muted); }
.inv-send .panel-head h2 { display: flex; align-items: center; gap: 6px; margin: 0; }
.inv-mail { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel-2); }
.inv-mail pre { margin: 8px 0 0; font: inherit; font-size: 0.88rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.inv-send-actions { flex-wrap: wrap; justify-content: flex-start; }
.inv-table td { vertical-align: top; }
.inv-table tr.inv-ended td { color: var(--muted); }
.inv-note { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-actions { text-align: right; }
@media (max-width: 600px) {
  .inv-note { max-width: 200px; }
}

/* V1.50: Security and privacy (Client\Apps\Security\SecurityPage.razor, /demo/security and /client/security; the homes'
   card: .sec-home) */
.sec-page { width: 100%; }   /* the whole width of the page (2026-11-06; 1200 px before); its cards: .sec-grid's auto-fill */
.sec-head h1 { display: flex; align-items: center; gap: 8px; margin: 4px 0; font-size: 1.5rem; }
.sec-head p { max-width: 900px; }
.sec-toc { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0 14px; font-size: 0.9rem; }
.sec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; align-items: start; }
.sec-card h2 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 1.05rem; }
.sec-card p, .sec-card li { line-height: 1.45; }
.sec-card ul { margin: 6px 0; padding-left: 20px; }
.sec-card li { margin: 4px 0; }
.sec-wide { margin-top: 14px; }
.sec-table-wrap { overflow-x: auto; }
.sec-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.sec-table th, .sec-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.sec-table thead th { color: var(--muted); font-weight: 600; }
.sec-contact { margin-top: 14px; }
.sec-home h3 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 1rem; }
.sec-home p { margin: 6px 0 8px; }
@media (max-width: 600px) {
  .sec-grid { grid-template-columns: 1fr; }
}

/* V1.52: the Demo home's Start here (Client\Shared\DemoStartHere.razor). V1.66 ("much smaller"): a tight panel, one line a step,
   two steps a row on a wide screen (the text cut with an ellipsis, the whole in the tooltip), one a row on a phone */
.panel.demo-start { padding-top: 8px; padding-bottom: 8px; }
.demo-start h3 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 0.9rem; }
.demo-start h3 .hint { font-weight: 400; }
.demo-start-steps { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(560px, 100%), 1fr)); gap: 4px 8px; }
.demo-start-step { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px; color: inherit; text-decoration: none; background: var(--panel-2); font-size: 0.85rem; }
.demo-start-step:hover, .demo-start-step:focus-visible { border-color: var(--accent); }
.demo-start-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-start-go { color: var(--muted); }
@media (max-width: 600px) {
  .demo-start-steps { grid-template-columns: 1fr; }
  .demo-start-text { white-space: normal; }
}

/* V1.66: the AI status of all apps (Client\Shared\AiStatusPanel.razor), the top of the Client and Demo homes: the headline, the
   highlights (risks first), then each app in a grid; each line a link to its app, its level a dot */
.ais .panel-head { flex-wrap: wrap; gap: 6px; }
.ais-intro { flex: 1; min-width: 200px; }
.ais-headline { margin: 4px 0 6px; font-weight: 600; font-size: 0.95rem; }
.ais-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ais-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); gap: 2px 12px; margin-top: 4px; }
.ais-line { display: flex; align-items: flex-start; gap: 6px; padding: 3px 6px; border-radius: 6px; color: inherit; text-decoration: none; font-size: 0.875rem; line-height: 1.4; }
.ais-line:hover, .ais-line:focus-visible { background: var(--os-surface-sunken); }
.ais-line .mud-icon-root { flex: none; margin-top: 1px; }
.ais-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ais-go { color: var(--os-text-2); }
.ais-dot { flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--os-text-2); }
.ais-risk .ais-dot { background: var(--os-bad); }
.ais-watch .ais-dot { background: var(--os-warn); }
.ais-good .ais-dot { background: var(--os-good); }
.ais-info .ais-dot { background: var(--os-info); }
.ais-apps { margin-top: 6px; }
.ais-apps > summary { cursor: pointer; font-size: 0.85rem; color: var(--os-text-2); }
@media (max-width: 600px) {
  .ais-grid { grid-template-columns: 1fr; }
}
