/* GRC KSA organization add-on and /join page.
   Colours come from the bundle's tokens, so light and dark follow html.dark. */
/* In the header after the brand, clear of the centred project selector and the icons; inline-start mirrors
   under the bundle's dir="rtl". z-50 like the header: later in the DOM, so above it, under bundle dialogs. */
.gk-root { position: fixed; top: 12px; inset-inline-start: 170px; z-index: 50; font: inherit; }
.gk-pill { display: inline-flex; align-items: center; gap: 8px; max-width: 220px; padding: 6px 12px; border: 1px solid hsl(var(--border)); border-radius: 9999px; background: hsl(var(--card)); color: hsl(var(--foreground)); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; box-shadow: 0 1px 2px rgb(0 0 0 / 0.15); }
.gk-pill:hover { border-color: hsl(var(--primary) / 0.6); }
.gk-pill:focus-visible, .gk-menu-item:focus-visible, .gk-btn:focus-visible, .gk-input:focus-visible, .gk-icon-btn:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }
.gk-pill-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gk-caret { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid hsl(var(--muted-foreground)); }
.gk-menu { position: absolute; top: calc(100% + 6px); inset-inline-start: 0; min-width: 260px; max-height: 70vh; overflow-y: auto; padding: 6px; border: 1px solid hsl(var(--border)); border-radius: var(--radius); background: hsl(var(--card)); color: hsl(var(--foreground)); box-shadow: 0 8px 24px rgb(0 0 0 / 0.25); }
.gk-menu-label { padding: 6px 8px 4px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: hsl(var(--muted-foreground)); }
.gk-menu-item { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 8px; border: 0; border-radius: calc(var(--radius) - 2px); background: transparent; color: inherit; font: inherit; font-size: 13px; text-align: start; cursor: pointer; }
.gk-menu-item:hover { background: hsl(var(--muted)); }
.gk-active { font-weight: 600; box-shadow: inset 3px 0 0 hsl(var(--primary)); }
.gk-muted { color: hsl(var(--muted-foreground)); font-size: 12px; }
.gk-divider { height: 1px; margin: 6px 0; background: hsl(var(--border)); }
.gk-create, .gk-row { display: flex; gap: 6px; padding: 4px 8px; }
.gk-create[hidden] { display: none; }
.gk-input { padding: 6px 8px; border: 1px solid hsl(var(--border)); border-radius: calc(var(--radius) - 2px); background: hsl(var(--background)); color: hsl(var(--foreground)); font: inherit; font-size: 13px; }
.gk-create .gk-input, .gk-row .gk-input { flex: 1; min-width: 0; }
.gk-btn { padding: 6px 12px; border: 1px solid hsl(var(--border)); border-radius: calc(var(--radius) - 2px); background: hsl(var(--card)); color: hsl(var(--foreground)); font: inherit; font-size: 13px; cursor: pointer; }
.gk-btn-primary { border-color: hsl(var(--primary)); background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.gk-btn-danger { border-color: hsl(var(--destructive)); background: hsl(var(--destructive)); color: #fff; }
.gk-btn-quiet { border-color: transparent; background: transparent; color: hsl(var(--muted-foreground)); }
.gk-error { margin: 6px 8px; padding: 6px 8px; border-radius: calc(var(--radius) - 2px); background: hsl(var(--destructive) / 0.12); color: hsl(var(--destructive)); font-size: 12px; }
.gk-overlay { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-start; justify-content: center; padding: 64px 16px; background: rgb(0 0 0 / 0.5); overflow-y: auto; }
.gk-dialog { width: min(760px, 100%); padding: 20px; border: 1px solid hsl(var(--border)); border-radius: var(--radius); background: hsl(var(--card)); color: hsl(var(--foreground)); }
.gk-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gk-title { margin: 0; font-size: 16px; font-weight: 600; }
.gk-subtitle { margin: 18px 0 8px; font-size: 13px; font-weight: 600; }
.gk-icon-btn { width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: hsl(var(--muted-foreground)); font-size: 18px; cursor: pointer; }
.gk-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.gk-table th { padding: 6px 8px; border-bottom: 1px solid hsl(var(--border)); color: hsl(var(--muted-foreground)); font-weight: 500; text-align: start; }
.gk-table td { padding: 6px 8px; border-bottom: 1px solid hsl(var(--border) / 0.6); vertical-align: middle; }
.gk-tag { display: inline-block; margin-inline-start: 8px; padding: 1px 6px; border-radius: 9999px; background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); font-size: 11px; }
.gk-invite { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gk-invite .gk-subtitle, .gk-result { flex-basis: 100%; }
.gk-invite input[type="email"] { flex: 1; min-width: 200px; }
.gk-link { font-family: ui-monospace, monospace; font-size: 12px; }

/* /join page */
.gk-page { box-sizing: border-box; min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 64px 16px; background: hsl(var(--background)); color: hsl(var(--foreground)); font-family: Inter, system-ui, sans-serif; }
.gk-card { width: min(440px, 100%); padding: 24px; border: 1px solid hsl(var(--border)); border-radius: var(--radius); background: hsl(var(--card)); }
.gk-card form { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.gk-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.gk-qr { display: block; width: 180px; height: 180px; margin: 12px auto; padding: 8px; border-radius: 8px; background: #fff; }

/* Toasts (gk-page.js), links under the bundle's login screen, and page footers. */
.gk-toasts { position: fixed; inset-block-end: 16px; inset-inline-end: 16px; z-index: 80; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.gk-toast { padding: 10px 14px; border: 1px solid hsl(var(--border)); border-inline-start: 3px solid hsl(var(--primary)); border-radius: var(--radius); background: hsl(var(--card)); color: hsl(var(--foreground)); font-family: Inter, system-ui, sans-serif; font-size: 13px; box-shadow: 0 8px 24px rgb(0 0 0 / 0.25); }
.gk-toast-error { border-inline-start-color: hsl(var(--destructive)); }
.gk-login-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin-block-start: 16px; font-family: Inter, system-ui, sans-serif; font-size: 13px; }
.gk-login-links a, .gk-actions a { color: hsl(var(--primary)); text-decoration: none; }
.gk-login-links a:hover, .gk-actions a:hover { text-decoration: underline; }
.gk-login-links a:focus-visible, .gk-actions a:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }
.gk-actions { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 16px 0 0; font-size: 13px; }

/* connector sign-in panel (connectors.js) */
.gk-signin { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid hsl(var(--primary) / 0.3); border-radius: var(--radius); background: hsl(var(--primary) / 0.05); color: hsl(var(--foreground)); font-size: 13px; }
.gk-signin p { margin: 0; }
.gk-signin .gk-row { flex-wrap: wrap; align-items: center; padding: 0; }
.gk-signin .gk-error { margin: 0; }
.gk-signin-title { font-weight: 600; }
.gk-code { padding: 4px 10px; border-radius: calc(var(--radius) - 2px); background: hsl(var(--background)); font-family: ui-monospace, monospace; font-size: 16px; letter-spacing: .12em; }
a.gk-btn { display: inline-block; text-decoration: none; }

/* Coming-soon connector tiles (connectors.js). The pill is drawn here, so nothing is written into the bundle's button. */
button[data-gk-soon] { opacity: .6; cursor: not-allowed; }
button[data-gk-soon]:hover { border-color: hsl(var(--border)); background: hsl(var(--card)); }
button[data-gk-soon]::after { content: "Coming soon"; position: absolute; top: 8px; right: 8px; padding: 2px 8px; border-radius: 999px; background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); font-size: 10px; font-weight: 600; letter-spacing: .02em; }

/* An opened connector's card. The bundle draws it below every tile, often off screen, so it shows as a dialog
   instead; connectors.js closes it on Escape or a click outside. These classes are that card's alone in the bundle. */
.rounded-xl.border-primary\/30.bg-card.overflow-hidden.animate-in { position: fixed; z-index: 60; inset: 5vh 0 auto; margin: 0 auto; width: min(760px, calc(100vw - 32px)); max-height: 90vh; overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 0 0 100vmax rgb(0 0 0 / .6), 0 20px 40px rgb(0 0 0 / .35); }
body:has(.rounded-xl.border-primary\/30.bg-card.overflow-hidden.animate-in) { overflow: hidden; }

/* Frameworks page section headings (frameworks.js), full width in the bundle's tile grid. */
.gk-fw-section { grid-column: 1 / -1; margin: 12px 0 -4px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; text-align: start; color: hsl(var(--muted-foreground)); }
.gk-fw-section:first-child { margin-top: 0; }

/* Client connectors dialog (tenant.js) */
.gk-scroll { overflow-x: auto; }
.gk-setup { margin: 4px 0; font-size: 13px; }
.gk-cell { min-width: 32px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: inherit; font-size: 15px; cursor: pointer; }
.gk-cell:hover { background: hsl(var(--muted)); }
.gk-cell:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }
.gk-agent .gk-table td { vertical-align: top; }
.gk-command { flex: 1; min-width: 0; padding: 4px 8px; border-radius: calc(var(--radius) - 2px); background: hsl(var(--background)); font-family: ui-monospace, monospace; font-size: 12px; white-space: pre-wrap; word-break: break-all; }
.gk-silent { color: hsl(38 92% 45%); font-weight: 600; }

/* The AD card's tabs between the on-site agent and Direct connection (on-site agent spec, Section 7). */
.gk-tabs { display: flex; gap: 4px; margin-bottom: 12px; border-bottom: 1px solid hsl(var(--border)); }
.gk-tab { padding: 8px 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: hsl(var(--muted-foreground)); font: inherit; font-size: 13px; cursor: pointer; }
.gk-tab[aria-selected="true"] { border-bottom-color: hsl(var(--primary)); color: hsl(var(--foreground)); font-weight: 600; }
.gk-tab:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }

/* A card's How to connect guide (connectors.js, ui_hints.help) */
.gk-help { border: 1px solid hsl(var(--border)); border-radius: calc(var(--radius) - 2px); padding: 0 12px; font-size: 13px; line-height: 1.5; }
.gk-help[open] { padding-bottom: 12px; }
.gk-help summary { padding: 10px 0; font-weight: 600; cursor: pointer; }
.gk-help summary:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }
.gk-help h4 { margin: 12px 0 4px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: hsl(var(--muted-foreground)); }
.gk-help ol, .gk-help ul { margin: 0; padding-inline-start: 20px; }
.gk-help ol { list-style: decimal; }
.gk-help ul { list-style: disc; }
.gk-help li { margin: 3px 0; }
.gk-help dt { margin-top: 8px; font-weight: 600; }
.gk-help dd { margin: 2px 0 0; color: hsl(var(--muted-foreground)); }
.gk-help p { margin: 12px 0 0; }
.gk-help a { color: hsl(var(--primary)); text-decoration: underline; }
