/* The Master App frame. Owner rule (2026-11-14): the Design App's interface stays exactly as it was.
   While the Design App runs, its own master row is what people see and this sheet draws nothing
   over it. The header and the sign-in card below are copies of the Design App's originals, with
   the values taken from its source (packages/ui/styles.css, apps/shell/src/styles.css at
   GlabDesignApp 4a9c5230); they are shown only when the Design App cannot show its own. */
:root {
  color-scheme: light;
  font-family: Inter, "Google Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --glab-bg: #f8fafc;
  --glab-surface: #ffffff;
  --glab-surface-muted: #f1f5f9;
  --glab-border: #e2e8f0;
  --glab-border-strong: #cbd5e1;
  --glab-control-border: #64748b;
  --glab-text: #1e293b;
  --glab-text-muted: #64748b;
  --glab-text-subtle: #94a3b8;
  --glab-primary: #2563eb;
  --glab-primary-hover: #1d4ed8;
  --glab-primary-soft: #eff6ff;
  --glab-danger: #dc2626;
  --glab-ok: #067647;
  --glab-ok-soft: #ecfdf3;
  --glab-ok-border: #abefc6;
  --glab-warning: #b54708;
  --glab-warning-soft: #fffaeb;
  --glab-warning-border: #fedf89;
  --glab-on-primary: #ffffff;
  --glab-radius: 6px;
  --glab-shadow-float: 0 8px 24px rgba(15, 23, 42, 0.14);
  /* Operations' access page (operations.css): popover note, dialog shadow and backdrop. */
  --glab-shadow-note: 0 7px 21px rgba(30, 41, 59, 0.13);
  --glab-shadow-dialog: 0 10.5px 35px rgba(30, 41, 59, 0.2);
  --glab-backdrop: rgba(15, 23, 42, 0.4);
  --shell-master-height: 36px;
  color: var(--glab-text);
  background: var(--glab-bg);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --glab-bg: #0f1724;
  --glab-surface: #172131;
  --glab-surface-muted: #223044;
  --glab-border: #35445a;
  --glab-border-strong: #45566e;
  --glab-control-border: #8295af;
  --glab-access-control-border: var(--glab-control-border);
  --glab-text: #e5edf7;
  --glab-text-muted: #a3b3c8;
  --glab-text-subtle: #889ab1;
  --glab-primary: #78acff;
  --glab-primary-hover: #9bc1ff;
  --glab-primary-soft: #1c3354;
  --glab-danger: #ff9eaa;
  --glab-ok: #6cdbad;
  --glab-ok-soft: #13332b;
  --glab-ok-border: #336957;
  --glab-warning: #f4c476;
  --glab-warning-soft: #362f20;
  --glab-warning-border: #746030;
  --glab-on-primary: #0f1724;
  --glab-shadow-float: 0 8px 24px rgba(0, 0, 0, 0.45);
  --glab-shadow-note: 0 7px 21px rgba(0, 0, 0, 0.4);
  --glab-shadow-dialog: 0 10.5px 35px rgba(0, 0, 0, 0.5);
  --glab-backdrop: rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { display: flex; flex-direction: column; background: var(--glab-bg); }
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }

/* ---- the master row: copy of .shell-header (shown only while the row's app is stopped) -------- */
.shell-header {
  flex: none;
  height: var(--shell-master-height);
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  column-gap: 20px;
  padding: 0 14px;
  border-bottom: 1px solid var(--glab-border);
  background: var(--glab-surface);
  color: var(--glab-text);
}
.brand { font-size: 12px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.tabs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: stretch;
  gap: 18px;
  min-width: 0;
  height: 100%;
}
.tab-list.glab-tablist {
  display: flex;
  align-items: stretch;
  min-width: 0;
  height: 100%;
  gap: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.tab-list::-webkit-scrollbar { display: none; }
.tab.glab-tab {
  position: relative;
  display: flex;
  flex: none;
  align-items: center;
  height: 100%;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--glab-text-muted);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}
.tab.glab-tab:hover { color: var(--glab-text); }
.tab.glab-tab[aria-selected="true"] { color: var(--glab-primary); font-weight: 650; }
.tab.glab-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--glab-primary);
}
.tab.glab-tab[disabled] { color: var(--glab-text-subtle); cursor: default; }
.tab:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--glab-primary); }
.shell-header-context { display: flex; align-items: center; justify-content: flex-end; min-width: 0; gap: 2px; }
.master-feedback-trigger { flex: none; white-space: nowrap; }
.master-feedback-dialog {
  box-sizing: border-box;
  width: min(1000px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--glab-border);
  border-radius: 10px;
  background: var(--glab-surface);
  color: var(--glab-text);
  box-shadow: var(--glab-shadow-dialog);
}
.master-feedback-dialog::backdrop { background: var(--glab-backdrop); }
.master-feedback-dialog > header, .master-feedback-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--glab-border);
}
.master-feedback-dialog h2, .master-feedback-dialog h3, .master-feedback-dialog h4 { margin: 0; }
.master-feedback-dialog h2 { font-size: 16px; }
.master-feedback-dialog h3 { font-size: 15px; }
.master-feedback-dialog h4 { font-size: 13px; }
.master-feedback-content { padding: 14px 16px; min-width: 0; }
.master-feedback-toolbar label, .master-feedback-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.master-feedback-toolbar label { min-width: 0; }
.master-feedback-toolbar select { max-width: 100%; }
.master-feedback-dialog input, .master-feedback-dialog select, .master-feedback-dialog textarea {
  box-sizing: border-box;
  min-width: 0;
  min-height: 32px;
  padding: 5px 8px;
  border: 1px solid var(--glab-control-border);
  border-radius: var(--glab-radius);
  background: var(--glab-surface);
  color: inherit;
  font: inherit;
}
.master-feedback-dialog textarea { resize: vertical; width: 100%; }
.master-feedback-dialog :is(input, select, textarea, button, a):focus-visible { outline: 2px solid var(--glab-primary); outline-offset: 2px; }
.master-feedback-dialog .glab-button { min-height: 32px; height: auto; }
.master-feedback-error { margin: 8px 16px 0; color: var(--glab-danger); }
.master-feedback-table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.master-feedback-table th, .master-feedback-table td { padding: 7px 10px; border-bottom: 1px solid var(--glab-border); text-align: left; overflow-wrap: anywhere; }
.master-feedback-table th { background: var(--glab-surface-muted); color: var(--glab-text-muted); font-size: 12px; }
.master-feedback-table th:first-child { width: 47%; }
.master-feedback-table td:first-child button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; text-align: left; }
.master-feedback-status { display: inline-block; border-radius: 12px; padding: 3px 7px; background: var(--glab-primary-soft); color: var(--glab-primary); }
.master-feedback-form:not([hidden]), .master-feedback-form label { display: grid; gap: 8px; }
.master-feedback-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, 28%); gap: 16px; margin-top: 14px; }
.master-feedback-body { min-width: 0; }
.master-feedback-body > *, .master-feedback-timeline > * { margin-block: 0 10px; }
.master-feedback-detail p { white-space: pre-wrap; overflow-wrap: anywhere; }
.master-feedback-body > section, .master-feedback-timeline { border: 1px solid var(--glab-border); border-radius: var(--glab-radius); padding: 10px 12px; }
.master-feedback-body section > :is(a, label) { display: block; margin-block: 8px; }
.master-feedback-body a { color: var(--glab-primary); overflow-wrap: anywhere; }
.master-feedback-timeline article { border-top: 1px solid var(--glab-border); padding-top: 8px; }
.master-feedback-detail time { display: block; font-size: 11px; color: var(--glab-text-muted); }
.master-feedback-images { display: flex; flex-wrap: wrap; gap: 8px; }
.master-feedback-images img { max-width: min(240px, 100%); max-height: 180px; object-fit: contain; }
.master-feedback-content > .master-feedback-actions { margin-top: 12px; }
.master-feedback-inbox { list-style: none; margin: 10px 0 0; padding: 0; }
.master-feedback-inbox li { border-top: 1px solid var(--glab-border); padding: 10px 0; overflow-wrap: anywhere; }
.master-feedback-inbox li > .glab-button { max-width: 100%; text-align: left; overflow-wrap: anywhere; }
.master-feedback-inbox li > .master-feedback-actions { margin-top: 4px; font-size: 12px; color: var(--glab-text-muted); }
.master-feedback-inbox li > p { margin: 5px 0 0; white-space: pre-wrap; }
@media (max-width: 620px) { .master-feedback-detail { grid-template-columns: 1fr; } }

/* ---- stage ---------------------------------------------------------------------------------- */
.stage { flex: 1; min-height: 0; position: relative; background: var(--glab-bg); }
.stage > * { position: absolute; inset: 0; }
.app-frame { width: 100%; height: 100%; border: 0; background: var(--glab-surface); }
.master-build-footer { min-height: 32px; padding: 0 12px; color: var(--glab-text-muted); font-size: 11px; border-top: 1px solid var(--glab-border); background: var(--glab-surface); }
.master-build-footer:not([hidden]) { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
body.app-row .master-build-footer:not([hidden]) { position: fixed; z-index: 3; bottom: 0; inset-inline: 0; }
body.design-overlay-open .master-build-footer { visibility: hidden; }
.master-footer-account:not([hidden]) { display: flex; align-items: center; min-width: 0; gap: 4px; }
.master-footer-build-label { margin-inline-start: auto; white-space: nowrap; }
.master-footer-trigger { display: flex; align-items: center; gap: 6px; min-width: 0; min-height: 26px; padding: 0 5px; border: 0; border-radius: var(--glab-radius); background: transparent; color: var(--glab-text); font: inherit; cursor: pointer; }
.master-footer-trigger:hover { background: var(--glab-surface-muted); }
.master-profile-avatar { display: grid; place-items: center; flex: 0 0 19px; height: 19px; border-radius: 50%; background: var(--glab-primary-soft); color: var(--glab-primary); font-size: 9px; font-weight: 650; }
.master-profile-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.master-settings-trigger { flex: none; }
.master-account-dialog.access-confirm { width: min(360px, calc(100% - 32px)); padding: 0; }
.master-account-dialog header { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--glab-border); }
.master-account-dialog header h2 { margin: 0; }
.master-account-dialog section:not([hidden]) { display: grid; gap: 6px; padding: 16px; }
.master-account-dialog section > span { color: var(--glab-text-muted); overflow-wrap: anywhere; }
.master-account-dialog [data-sign-out] { justify-self: start; margin-top: 6px; }
.master-account-dialog label { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
/* The app that draws the master row covers the whole page; what this site shows for the tabs it
   adds sits between that app's row and its bottom bar (values reported by the app). */
body.app-row .stage { position: fixed; inset: 0; }
.overlay { z-index: 2; background: var(--glab-bg); }
body.app-row .overlay { top: var(--overlay-top, 36px); bottom: var(--overlay-bottom, 0px); }
body.app-row .app-frame.overlay { height: calc(100% - var(--overlay-top, 36px) - var(--overlay-bottom, 0px)); }
body.app-row.design-overlay-open .overlay { visibility: hidden; }

.notice { display: grid; place-items: center; padding: 24px; }
.notice-box { max-width: 420px; text-align: center; padding: 28px 32px; background: var(--glab-surface); border: 1px solid var(--glab-border); border-radius: 8px; }
.notice-box h2 { margin: 0 0 8px; font-size: 16px; font-weight: 650; }
.notice-box p { margin: 0 0 16px; color: var(--glab-text-muted); font-size: 13px; }
.notice-box .meta { font-size: 11px; margin: 12px 0 0; }

/* ---- sign-in: copy of .cloud-login ----------------------------------------------------------- */
.cloud-login { display: grid; place-items: center; min-height: 100vh; padding: 24px 16px; background: var(--glab-bg); }
.cloud-login-content { width: 100%; max-width: 512px; }
.cloud-login-heading { margin-bottom: 32px; text-align: center; }
.cloud-login-heading h1 { margin: 0 0 8px; font-size: 30px; line-height: 36px; font-weight: 600; color: var(--glab-text); }
.cloud-login-heading p { margin: 0; font-size: 16px; color: var(--glab-text-muted); }
.cloud-login-card { display: grid; justify-items: center; gap: 24px; padding: 32px; border: 1px solid var(--glab-border); border-radius: 16px; background: var(--glab-surface); text-align: center; }
.cloud-login-card h2 { margin: 0; font-size: 20px; line-height: 28px; font-weight: 500; }
.cloud-login-card p { margin: 0; color: var(--glab-text-muted); font-size: 14px; }
.cloud-login-google { display: flex; justify-content: center; width: 100%; min-height: 44px; }
.cloud-login-card .cloud-login-error { color: var(--glab-danger); }
.cloud-login-dev { display: flex; gap: 8px; width: 100%; }
.cloud-login-dev input { flex: 1; height: 32px; padding: 0 10px; border: 1px solid var(--glab-control-border); border-radius: var(--glab-radius); }
.boot { flex: 1; }

/* ---- controls of this site's own pages (administration, maintenance) ------------------------- */
.glab-button, .button { height: 28px; padding: 0 10px; border: 1px solid var(--glab-control-border); border-radius: var(--glab-radius); background: var(--glab-surface); cursor: pointer; font-size: 12px; font-weight: 500; }
.glab-button:hover, .button:hover { background: var(--glab-surface-muted); }
.glab-button--primary, .button.primary { background: var(--glab-primary); border-color: var(--glab-primary); color: var(--glab-on-primary); }
.glab-button--primary:hover, .button.primary:hover { background: var(--glab-primary-hover); }
.cloud-login-dev .glab-button { height: 32px; }
.button.danger { color: var(--glab-danger); }
.button[disabled] { opacity: 0.5; cursor: default; }
input[type="text"], input[type="email"], select { height: 28px; padding: 0 8px; border: 1px solid var(--glab-control-border); border-radius: var(--glab-radius); background: var(--glab-surface); min-width: 0; font-size: 12px; }
input[type="checkbox"] { width: 14px; height: 14px; margin: 0; accent-color: var(--glab-primary); }
:focus-visible { outline: 2px solid var(--glab-primary); outline-offset: 1px; }

.admin { overflow: auto; font-size: 12px; }
.admin-inner { max-width: 1380px; min-height: 100%; margin: 0 auto; display: grid; grid-template-columns: minmax(120px, 176px) minmax(0, 1fr); }
.admin-content { display: grid; align-content: start; padding: 12px 16px 16px; }
.admin-content > * { min-width: 0; }
.admin-nav { display: flex; flex-direction: column; gap: 2px; padding: 12px 8px; border-right: 1px solid var(--glab-border); background: var(--glab-surface); }
.admin-nav button { min-height: 32px; padding: 5px 10px; border: 0; border-radius: var(--glab-radius); background: none; cursor: pointer; color: var(--glab-text-muted); font: inherit; font-weight: 500; text-align: left; }
.admin-nav button:hover { color: var(--glab-text); background: var(--glab-surface-muted); }
.admin-nav button[aria-selected="true"] { color: var(--glab-primary); background: var(--glab-primary-soft); font-weight: 650; }
.admin-nav button:focus-visible { outline-offset: -2px; }
[data-master-theme] { flex: none; align-self: center; height: 28px; padding: 0 6px; border: 1px solid var(--glab-control-border); border-radius: var(--glab-radius); background: var(--glab-surface); color: var(--glab-text); font-size: 11.5px; }
[data-master-theme]:focus-visible { outline: 2px solid var(--glab-primary); outline-offset: 2px; }
.panel { background: var(--glab-surface); border: 1px solid var(--glab-border); border-radius: 8px; }
.panel-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--glab-border); }
.panel-head h2 { margin: 0; font-size: 13px; font-weight: 650; flex: 1; }
.panel-note { margin: 0; padding: 8px 12px; color: var(--glab-text-muted); border-bottom: 1px solid var(--glab-border); }
.row-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--glab-border); background: var(--glab-bg); }
.row-form input { flex: 1 1 160px; }
.tick { display: inline-flex; padding: 7px; cursor: pointer; border-radius: var(--glab-radius); }
.tick:hover { background: var(--glab-surface-muted); }
[aria-busy="true"] { cursor: progress; opacity: 0.6; }
.notice-cell { width: 60%; }
.notice-edit { display: flex; gap: 6px; }
.notice-edit input { flex: 1; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 7px 12px; border-bottom: 1px solid var(--glab-border); vertical-align: middle; white-space: nowrap; }
th { font-weight: 600; color: var(--glab-text-muted); background: var(--glab-bg); position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
td.wrap { white-space: normal; overflow-wrap: anywhere; min-width: 220px; }
td.center, th.center { text-align: center; }
tr.off td { color: var(--glab-text-muted); }
.pill { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; border: 1px solid var(--glab-border); background: var(--glab-bg); }
.pill.ok { color: var(--glab-ok); border-color: var(--glab-ok-border); background: var(--glab-ok-soft); }
.pill.warn { color: var(--glab-warning); border-color: var(--glab-warning-border); background: var(--glab-warning-soft); }
.pill.off { color: var(--glab-text-muted); }
.meta { color: var(--glab-text-muted); font-size: 11px; }
.empty { padding: 20px 12px; color: var(--glab-text-muted); text-align: center; }
.toast { position: fixed; left: 50%; bottom: 52px; transform: translateX(-50%); z-index: 50; max-width: min(560px, calc(100vw - 32px));
  padding: 9px 14px; border-radius: var(--glab-radius); background: var(--glab-text); color: var(--glab-on-primary); box-shadow: var(--glab-shadow-float); font-size: 12px; }
.toast.error { background: var(--glab-danger); }

/* ---- permission groups: copy of Operations' "Quyền truy cập (Admin)" (operations.css, access-*) ----
   Scoped to .access-page so this site's own panels and controls keep their look. */
.access-page { font-size: 12px; line-height: 1.5; min-width: 0; }
/* wide matrices scroll inside their panel, never the page */
.admin-inner > * { min-width: 0; }
.portable-feedback:empty { display: none; }
.portable-error { color: var(--glab-danger); margin: 0; }
.portable-list { display: grid; gap: 8px; }
.portable-list > [data-load-more] { justify-self: start; }
.portable-queue .portable-title-cell { width: 55%; white-space: normal; }
.portable-queue tbody tr:hover { background: var(--glab-surface-muted); }
.portable-request-link { color: var(--glab-primary); background: transparent; border: 0; text-align: left; padding: 4px 0; min-height: 28px; cursor: pointer; overflow-wrap: anywhere; font-weight: 600; }
.portable-unread { color: var(--glab-primary); font-weight: 600; }
.portable-detail { width: min(620px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; overflow: auto; color: var(--glab-text); box-shadow: var(--glab-shadow-dialog); }
.portable-detail::backdrop { background: var(--glab-backdrop); }
.portable-detail .panel-head { position: sticky; top: 0; background: var(--glab-surface); }
.portable-detail h2:focus { outline: none; }
.portable-facts { display: grid; grid-template-columns: minmax(100px, max-content) minmax(0, 1fr); gap: 6px 16px; margin: 0; padding: 12px; }
.portable-facts dt { color: var(--glab-text-muted); }
.portable-facts dd { margin: 0; overflow-wrap: anywhere; }
.portable-decision, .portable-note { display: grid; gap: 8px; }
.portable-decision { border-top: 1px solid var(--glab-border); padding: 12px; }
.portable-note textarea { border: 1px solid var(--glab-control-border); border-radius: var(--glab-radius); color: var(--glab-text); background: var(--glab-surface); padding: 8px; resize: vertical; }
.access-page h2 { font-size: 12px; font-weight: 600; margin: 0 0 10.5px; }
.access-page .meta { font-size: 10.5px; color: var(--glab-text-muted); }
.access-page .panel { background: var(--glab-surface); border: 1px solid var(--glab-border); border-radius: 10.5px; padding: 17.5px; margin-bottom: 17.5px; }
.access-page button, .access-page select, .access-page input:not([type="checkbox"]), .access-confirm button {
  font: inherit; font-size: 11.5px; min-height: 31.5px; height: auto; border: 1px solid var(--glab-access-control-border, var(--glab-border)); border-radius: 7px; background: var(--glab-surface); color: var(--glab-text); padding: 6px 10.5px; cursor: pointer; }
.access-page input:not([type="checkbox"]) { cursor: text; }
.access-page button:not(:disabled):hover, .access-confirm button:hover { background: var(--glab-surface-muted); border-color: var(--glab-text-subtle); }
.access-page button:disabled { opacity: .5; cursor: default; }
.access-page .danger { color: var(--glab-danger); }
.access-page .field { display: flex; flex-direction: column; gap: 4.5px; min-width: 175px; max-width: 100%; font-size: 10.5px; }
.access-page .toolbar, .access-page .actions, .access-confirm .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 10.5px 0; }
.access-page th { position: static; }
.access-page td, .access-page th { white-space: normal; }
.access-notice { padding: 9px 10.5px; border: 1px solid var(--glab-border); background: var(--glab-surface); border-radius: 5px; margin-bottom: 10.5px; }
.access-notice.error { color: var(--glab-danger); border-color: var(--glab-danger); }
.access-table-tools, .access-editor-head { display: flex; align-items: center; gap: 10.5px; flex-wrap: wrap; }
.access-table-tools { padding: 14px 16px; border-bottom: 1px solid var(--glab-border); }
.access-tool-spacer { flex: 1; }
.access-page .access-primary:not(:disabled) { background: var(--glab-primary); border-color: var(--glab-primary); color: var(--glab-on-primary); }
.access-page .access-primary:not(:disabled):hover { background: var(--glab-primary); border-color: var(--glab-primary); filter: brightness(.96); }
.access-scope-title { display: grid; gap: 2px; }
.access-scope-title strong { font-size: 12px; }
.access-page .access-matrix-panel { padding: 0; overflow: hidden; }
.access-matrix-scroll { overflow: auto; max-height: min(58vh, 490px); scrollbar-gutter: stable; }
.access-matrix-page-scroll { max-height: none; overflow-x: auto; scrollbar-gutter: auto; }
.access-matrix-scroll:focus-visible { outline: 2px solid var(--glab-primary); outline-offset: -2px; }
.access-matrix { width: max-content; min-width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 10.5px; text-align: left; }
.access-matrix td, .access-matrix th { border-right: 1px solid var(--glab-border); border-bottom: 1px solid var(--glab-border); vertical-align: top; }
.access-page .access-matrix thead th { position: sticky; top: 0; z-index: 3; background: var(--glab-surface-muted); color: var(--glab-text); text-align: center; font-size: 10.5px; font-weight: 600; padding: 7px; line-height: 16px; }
.access-matrix thead tr:first-child th { height: 31.5px; }
.access-page .access-matrix .access-group-cell { position: sticky; left: 0; z-index: 2; min-width: 201px; width: 201px; max-width: 227.5px; text-align: left; white-space: normal; background: var(--glab-surface); box-shadow: 2px 0 0 var(--glab-border); padding: 4.5px 10.5px; font-weight: 600; color: var(--glab-text-muted); }
.access-page .access-matrix thead .access-group-cell { z-index: 5; top: 0; background: var(--glab-surface-muted); text-align: left; }
.access-matrix thead th > strong { display: block; font-size: 11.5px; color: var(--glab-text); overflow-wrap: anywhere; }
.access-matrix thead th > small { display: block; font-size: 9.5px; font-weight: 400; color: var(--glab-text-muted); margin: 2.5px 0 7px; }
.access-page .access-matrix thead th button { font-size: 9.5px; min-height: 24.5px; padding: 2.5px 7px; }
.access-matrix .access-right-cell { vertical-align: middle; text-align: center; padding: 3.5px 7px; }
.access-right-cell input { appearance: none; width: 14px; height: 14px; min-height: 14px; padding: 0; margin: 0; vertical-align: middle; border: 1px solid var(--glab-border); border-radius: 3.5px; background: var(--glab-surface); display: inline-grid; place-content: center; cursor: pointer; }
.access-right-cell input:disabled { cursor: default; }
.access-right-cell input:checked { background: var(--glab-primary); border-color: var(--glab-primary); }
.access-right-cell input:checked::after { content: ""; display: block; width: 3.5px; height: 7px; border: solid var(--glab-surface); border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.access-right-cell input:disabled:not(:checked) { background: var(--glab-bg); }
.access-right-cell input:not(:disabled):not(:checked) { border-color: var(--glab-text-muted); }
.access-right-control { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; cursor: pointer; }
.access-right-control:has(input:disabled) { cursor: default; }
.access-matrix td.access-editing { background: var(--glab-primary-soft); }
.access-empty { text-align: center; padding: 24.5px; }
.access-page .access-info { display: inline-flex; align-items: center; justify-content: center; font-size: 9.5px; min-height: 17.5px; height: 17.5px; width: 17.5px; padding: 0; border: 0; background: transparent; color: var(--glab-text-muted); border-radius: 50%; vertical-align: middle; }
.access-matrix tbody .access-group-cell > span { line-height: 16px; }
.access-permission-note { position: fixed; inset: auto; margin: 0; width: 280px; max-width: calc(100vw - 21px); padding: 12px; border: 1px solid var(--glab-border); border-radius: 7px; background: var(--glab-surface); color: var(--glab-text); box-shadow: var(--glab-shadow-note); font-size: 10.5px; font-weight: 400; white-space: normal; text-align: left; overflow-wrap: anywhere; }
.access-permission-note p { margin: 7px 0 0; font-weight: 400; line-height: 1.6; }
.access-transposed thead th { min-width: 140px; }
.access-page .access-transposed .access-group-cell { min-width: 227.5px; max-width: 315px; }
.access-page .access-transposed .access-category th { text-align: left; background: var(--glab-surface-muted); padding: 3.5px 10.5px; color: var(--glab-text-muted); font-weight: 600; }
.access-transposed small { display: block; }
.access-page .access-category-toggle { display: flex; align-items: center; gap: 7px; width: 100%; min-height: 21px; padding: 0; border: 0; background: transparent; color: inherit; font-size: 10.5px; font-weight: 600; text-align: left; }
.access-page .access-category-toggle:not(:disabled):hover { background: transparent; }
.access-category-toggle svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.access-matrix tr[hidden] { display: none; }
.access-person { display: inline-flex; align-items: center; gap: 8px; min-width: 0; text-align: left; }
.access-person > span:last-child { min-width: 0; }
.access-person strong { font-size: 10.5px; font-weight: 500; display: block; overflow-wrap: anywhere; color: var(--glab-text); }
.access-person small { display: block; font-size: 9.5px; font-weight: 400; color: var(--glab-text-muted); margin-top: 2px; overflow-wrap: anywhere; }
.access-avatar { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 24.5px; width: 24.5px; height: 24.5px; border-radius: 50%; color: var(--glab-primary); background: var(--glab-primary-soft); font-size: 9.5px; font-weight: 600; }
.access-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.access-avatar img[hidden] { display: none; }
.access-page #account-invite-form { align-items: flex-end; }
.access-page .access-flags { color: var(--glab-text); margin-top: 0; }
/* the group editor and the confirmation (dialog rules of operations.css) */
dialog.access-editor { width: min(630px, calc(100vw - 42px)); max-height: 80vh; overflow: auto; padding: 21px; border: 1px solid var(--glab-border); border-radius: 10.5px; background: var(--glab-surface); color: var(--glab-text); }
dialog.access-editor::backdrop, dialog.access-confirm::backdrop { background: var(--glab-backdrop); }
dialog.access-editor .actions:last-child { position: sticky; bottom: -21px; background: var(--glab-surface); padding: 10.5px 0; margin-bottom: 0; }
.access-editor-head { justify-content: space-between; }
.access-editor-head h2 { margin-bottom: 3.5px; }
.access-page .access-editor-head .actions { margin: 0; }
.access-editor-fields { display: flex; gap: 14px; flex-wrap: wrap; }
.access-page .access-editor-fields .field { flex: 1; min-width: 210px; }
#group-editor-dialog { width: min(760px, calc(100vw - 42px)); }
.group-members-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.group-members-layout section { min-width: 0; }
.group-members-layout h3 { margin: 0 0 5px; font-size: 11.5px; }
#group-member-search { width: 100%; margin-bottom: 6px; }
.group-members-list { max-height: min(37vh, 320px); overflow: auto; padding: 3px; }
.group-member-summary, #group-form .access-member { display: flex; align-items: center; gap: 7px; min-height: 42px; padding: 5px; border-bottom: 1px solid var(--glab-border); }
#group-form .access-member { cursor: pointer; }
.group-member-summary .access-person, #group-form .access-member .access-person { min-width: 0; }
.group-member-pending { flex: none; margin-inline-start: auto; color: var(--glab-primary); }
@media (max-width: 560px) {
  .group-members-layout { grid-template-columns: minmax(0, 1fr); }
  .group-members-list { max-height: 160px; }
}
dialog.access-confirm { border: 1px solid var(--glab-border); border-radius: 9px; max-width: 472.5px; padding: 21px; color: var(--glab-text); background: var(--glab-surface); box-shadow: var(--glab-shadow-dialog); font-size: 12px; }
dialog.access-confirm h2 { font-size: 12px; font-weight: 600; margin: 0 0 10.5px; }
dialog.access-confirm .actions { justify-content: flex-end; margin-bottom: 0; }
/* Sign-in keys (M18): the new key is shown once in a mono box that can be selected. */
.key-made { margin: 12px 0; padding: 10px 12px; border: 1px solid var(--glab-border); border-radius: var(--glab-radius); display: grid; gap: 8px; }
.key-value { font-family: ui-monospace, Consolas, monospace; font-size: 12px; padding: 6px 8px; border-radius: 6px; background: var(--glab-surface-muted); overflow-wrap: anywhere; user-select: all; flex: 1 1 auto; }
.key-form { margin: 12px 0; }
/* developer machines (M19) */
.admin-stack { display: grid; gap: 16px; }
.admin-stack > * { min-width: 0; }
.mono { font-family: ui-monospace, Consolas, monospace; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.dev-machine-form { margin: 12px; }
.dev-machine-form input[name="mac"] { flex: 0 0 240px; font-family: ui-monospace, Consolas, monospace; }
@media (max-width: 640px) { .dev-machine-form { flex-wrap: wrap; } .dev-machine-form input[name="mac"] { flex: 1 1 100%; } }

.access-app-tabs.tab-list { height: 38px; margin-bottom: 12px; border-bottom: 1px solid var(--glab-border); scrollbar-width: thin; }
.access-app-tabs.tab-list::-webkit-scrollbar { display: block; height: 4px; }
.access-page .access-app-tabs .tab { height: 100%; border: 0; border-radius: 0; background: none; padding: 0 2px; }
.access-page .access-app-tabs .tab:focus-visible { outline-offset: -2px; }
.account-workspace { display: grid; grid-template-columns: minmax(150px, 240px) minmax(0, 1fr); align-items: start; gap: 12px; }
.access-page .account-directory { padding: 8px; }
.account-directory input { width: 100%; margin-bottom: 6px; }
#account-results { max-height: min(58vh, 490px); overflow: auto; }
.access-page .account-result { display: block; width: 100%; padding: 5px 6px; border: 0; text-align: left; }
.access-page .account-result[aria-pressed="true"] { background: var(--glab-primary-soft); }
.account-result .access-person > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.account-detail-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding-bottom: 10px; }
.account-detail-head > .meta { flex-basis: 100%; }
.account-rights-section + .account-rights-section { margin-top: 12px; }
.account-rights-section header, .account-rights-section li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 10px; }
.account-rights-section header { background: var(--glab-surface-muted); border-block: 1px solid var(--glab-border); }
.account-rights-section h3 { margin: 0; font-size: 12px; font-weight: 650; }
.account-rights-section ul { list-style: none; padding: 0; margin: 0; }
.account-rights-section li { padding-inline-start: 20px; border-bottom: 1px solid var(--glab-border); }
.account-rights-section input { flex: none; }
.account-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.account-toolbar .access-app-tabs { flex: 1; margin-bottom: 0; }
.account-toolbar > button { margin-inline-start: auto; flex: none; }
dialog.account-invitation { width: min(400px, calc(100vw - 42px)); }
.account-invite-names { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 10px; }
.account-invitation .account-invite-names .field { min-width: 0; }
.account-invitation .actions { justify-content: flex-end; }
@media (max-width: 680px) {
  .account-workspace { grid-template-columns: minmax(0, 1fr); gap: 0; }
  #account-results { max-height: 144px; }
}
