/* Ekalix - Administration > Access, the 12.0 parts (adminaccess.js, CONTRACT-V18 W3).

   Single sign-on, API tokens, active sessions, the scope editor and the single sign-on rule fields.
   Every colour is a theme token (var(--...)), so all six themes follow without a rule of their own;
   every class starts aa- so nothing here can reach another page. Labels, chips and tabs keep to one
   line (nowrap, ellipsis as the fallback), and the settings sit beside their facts so neither half
   of the page is left empty. */

/* ---------- the section strip inside Access (markup in app.js, see the integration notes) ---------- */
.aa-sections { display: flex; align-items: center; gap: 4px; margin: 0 0 12px; padding: 3px; width: max-content; max-width: 100%;
  overflow-x: auto; scrollbar-width: none; border: 1px solid var(--border); border-radius: var(--r-s); background: var(--surface-1); }
.aa-sections::-webkit-scrollbar { display: none; }
.aa-section { appearance: none; display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px; border: 1px solid transparent;
  border-radius: var(--r-xs); background: transparent; color: var(--text-2); font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer;
  white-space: nowrap; transition: background var(--t), color var(--t), border-color var(--t); }
.aa-section:hover { color: var(--text); background: var(--surface-2); }
.aa-section.on { color: var(--text); background: var(--accent-bg); border-color: var(--accent-bd); }
.aa-section .n { font-family: var(--mono); font-size: 10.5px; font-weight: 700; color: var(--text-3); border: 1px solid var(--border); border-radius: 999px; padding: 0 6px; line-height: 16px; }
.aa-section.on .n { color: var(--text-2); }
.aa-section .n.warn { color: var(--warning); border-color: var(--warning-bd); background: var(--warning-bg); }

/* ---------- shared pieces ---------- */
.aa-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 4px 28px; align-items: start; }
.aa-split.tok { grid-template-columns: minmax(0, 1fr) 470px; gap: 14px 20px; }
.aa-split.one { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1180px) { .aa-split, .aa-split.tok { grid-template-columns: minmax(0, 1fr); } }

.aa-in { height: 30px; padding: 0 9px; min-width: 0; max-width: 100%; border: 1px solid var(--border); border-radius: var(--r-s);
  background: var(--surface-2); color: var(--text); font: inherit; font-size: 12.5px; transition: border-color var(--t), box-shadow var(--t); }
.aa-in.mono { font-family: var(--mono); font-size: 12px; }
.aa-in::placeholder { color: var(--text-3); }
.aa-in:hover { border-color: var(--border-2); }
.aa-in:focus { outline: none; border-color: var(--accent-bd); box-shadow: 0 0 0 3px var(--accent-bg); }
.aa-in:disabled { opacity: .7; cursor: default; }
.aa-in.bad { border-color: var(--critical-bd); background: var(--critical-bg); }
.aa-in.w-s { width: 190px; }
.aa-in.w-m { width: 290px; }
.aa-in.w-l { width: 430px; }
.aa-i { margin-left: 2px; }
.aa-pad { padding: 0 2px 2px; }
.aa-gap { margin-top: 12px; }
.aa-bad { color: var(--critical); font-size: 12px; }
.aa-good { color: var(--ok); font-weight: 650; }
.aa-chk { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.aa-chk input { accent-color: var(--accent); margin: 0; }
fieldset:disabled .aa-chk { cursor: default; }

.aa-seg { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--border); border-radius: var(--r-s); background: var(--surface-1); flex: 0 0 auto; }
.aa-segb { appearance: none; height: 24px; padding: 0 10px; border: 1px solid transparent; border-radius: var(--r-xs); background: transparent; color: var(--text-2);
  font: inherit; font-size: 12px; font-weight: 650; white-space: nowrap; cursor: pointer; transition: background var(--t), color var(--t), border-color var(--t); }
.aa-segb:hover:not(:disabled) { color: var(--text); background: var(--surface-2); }
.aa-segb.on { color: var(--text); background: var(--accent-bg); border-color: var(--accent-bd); }
.aa-segb:disabled { cursor: default; opacity: .65; }

.aa-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--tone-bd);
  background: var(--tone-bg); color: var(--tone); font-size: 10.5px; font-weight: 750; letter-spacing: .02em; white-space: nowrap; }
.aa-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.aa-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 0 3px var(--tone-bg); flex: 0 0 auto; }
.aa-warnline { display: block; font-size: 12px; line-height: 1.5; color: var(--text); padding: 6px 10px; border-left: 3px solid var(--warning);
  background: var(--warning-bg); border-radius: 0 var(--r-xs) var(--r-xs) 0; }
.aa-warnline b { color: var(--warning); font-weight: 700; }
.aa-note { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 8px 10px 8px 12px; border: 1px solid var(--tone-bd);
  border-left: 3px solid var(--tone); border-radius: var(--r-s); background: var(--tone-bg); font-size: 12.5px; color: var(--text); }
.aa-note > .ic { width: 18px; height: 18px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--tone);
  color: var(--on-accent); font-size: 10.5px; font-weight: 800; }
.aa-confirm { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--critical-bd); border-left: 3px solid var(--critical);
  border-radius: var(--r-s); background: var(--critical-bg); font-size: 12.5px; color: var(--text); }
.aa-confirm > .ic { width: 18px; height: 18px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--critical);
  color: var(--on-accent); font-size: 10.5px; font-weight: 800; }
.aa-confirm .grow { min-width: 220px; }

.aa-card { min-width: 0; padding: 11px 13px 12px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: var(--r);
  background: linear-gradient(180deg, var(--surface-2), var(--surface-1)); }
.aa-card:last-child { margin-bottom: 0; }
.aa-ch { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; font-size: var(--fs-micro); font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.aa-p { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--text-2); }
.aa-facts { display: flex; flex-direction: column; }
.aa-fr { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 5px 0; border-bottom: 1px solid var(--hairline); font-size: 12.5px; }
.aa-fr:last-child { border-bottom: 0; }
.aa-fr .k { color: var(--text-3); white-space: nowrap; }
.aa-fr .v { color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.aa-card .aa-warnline { margin-top: 8px; }

/* ---------- single sign-on ---------- */
.aa-form { min-width: 0; }
.aa-form .cfgrow { padding: 6px 2px; }
.aa-provs { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.aa-prov { height: 26px; gap: 6px; }
.aa-provd { color: var(--ok); font-weight: 800; font-size: 11px; }
.aa-provi { width: 14px; height: 14px; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--border-2); color: var(--text-3);
  font: italic 800 9px/1 Georgia, 'Times New Roman', serif; }
.aa-prov:hover .aa-provi, .aa-prov.on .aa-provi { color: var(--accent); border-color: var(--accent-bd); }
.aa-selwarn { border-color: var(--warning-bd); background: var(--warning-bg); }
.aa-names { display: inline-flex; flex-direction: column; gap: 3px; min-width: 0; }
.aa-ti { width: 290px; min-height: 30px; padding: 3px 6px; }
.aa-testbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.aa-checks { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.aa-check { display: flex; align-items: flex-start; gap: 9px; padding: 5px 8px; border-radius: var(--r-xs); background: var(--surface-1); border: 1px solid var(--hairline); }
.aa-check.t-critical { border-color: var(--critical-bd); background: var(--critical-bg); }
.aa-check > .ic { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 1px; display: grid; place-items: center; border-radius: 50%; background: var(--tone);
  color: var(--on-accent); font-size: 9.5px; font-weight: 800; }
.aa-check b { display: block; font-size: 12px; font-weight: 650; color: var(--text); }
.aa-cd { display: block; font-size: 11.5px; line-height: 1.45; color: var(--text-3); overflow-wrap: anywhere; }
/* Passed: name and detail on one line (the whole detail is the row's tooltip). Failed: the detail in full. */
.aa-check.t-ok { align-items: center; padding: 3px 8px; }
.aa-check.t-ok > .grow { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.aa-check.t-ok b { flex: 0 0 auto; white-space: nowrap; }
.aa-check.t-ok .aa-cd { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aa-check.t-critical .aa-cd { color: var(--text-2); }

/* ---------- API tokens ---------- */
.aa-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.aa-bar .chip { white-space: nowrap; }
.aa-search { min-width: 0; width: 280px; }
.aa-list { min-width: 0; }
.aa-ttbl { border: 1px solid var(--border); border-radius: var(--r-s); border-collapse: separate; border-spacing: 0; overflow: hidden; }
.aa-ttbl td { vertical-align: top; }
.aa-ttbl .aa-c0 { width: 30px; padding-right: 0; }
.aa-ttbl .pill.bare { padding: 0; }
.aa-tn { color: var(--text); font-weight: 650; overflow-wrap: anywhere; }
.aa-cov { min-width: 120px; overflow-wrap: anywhere; }
.aa-tr.s-expiring td { background: var(--warning-bg); }
.aa-tr.s-expired td, .aa-tr.s-revoked td { color: var(--text-3); }
.aa-tr.s-expired .aa-tn, .aa-tr.s-revoked .aa-tn { color: var(--text-2); text-decoration: line-through; text-decoration-thickness: 1px; text-decoration-color: var(--text-3); }
.aa-tr.s-expired .rolep, .aa-tr.s-revoked .rolep { opacity: .6; }
.aa-noend { color: var(--warning); font-weight: 650; cursor: help; border-bottom: 1px dotted var(--warning-bd); }
.aa-soon { color: var(--warning); font-weight: 650; }
.aa-confirmrow td { background: var(--surface-1); padding: 6px 10px 8px; }
.aa-more { display: flex; align-items: center; gap: 10px; padding: 10px 2px 0; }
.aa-make { margin-bottom: 0; }
.aa-frow { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.aa-frow.top { align-items: start; }
.aa-frow.top > label { padding-top: 6px; }
.aa-frow > label { font-size: 12.5px; font-weight: 650; color: var(--text); white-space: nowrap; }
.aa-frow > .aa-in { width: 100%; }
.aa-frow > select { justify-self: start; }
.aa-frow.top > .aa-grow0 { grid-column: 2 / -1; min-width: 0; }
.aa-presets { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.aa-presets .chip { height: 26px; padding: 0 9px; white-space: nowrap; }
.aa-days { width: 64px; font-family: var(--mono); }
.aa-presets .unit { font-size: 12px; color: var(--text-3); }
.aa-ferr { margin: 2px 0 8px; }
.aa-makebar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--hairline); }

/* the secret, once */
.aa-once { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; margin-bottom: 12px; border: 1px solid var(--warning-bd); border-left: 3px solid var(--warning);
  border-radius: var(--r-s); background: var(--warning-bg); font-size: 13px; line-height: 1.5; color: var(--text); }
.aa-once > .ic { width: 20px; height: 20px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--warning); color: var(--on-accent);
  font-size: 11px; font-weight: 800; }
.aa-once b { color: var(--warning); }
.aa-secretrow { display: flex; align-items: center; gap: 10px; }
.aa-secret { flex: 1 1 auto; min-width: 0; display: block; padding: 10px 12px; border: 1px solid var(--accent-bd); border-radius: var(--r-s);
  background: var(--code-bg); color: var(--code-fg); font-family: var(--mono); font-size: 13px; letter-spacing: .02em; overflow-wrap: anywhere;
  user-select: all; -webkit-user-select: all; cursor: text; }
.aa-ex { margin-top: 8px; }
.aa-exh { margin-bottom: 3px; font-size: var(--fs-micro); font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); }
pre.code.aa-code { white-space: pre-wrap; overflow-wrap: anywhere; padding-right: 72px; max-height: none; }

/* ---------- sessions ---------- */
.aa-read { font-size: 11.5px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.aa-sl { border: 1px solid var(--border); border-radius: var(--r-s); overflow: hidden; }
.aa-sr { display: grid; grid-template-columns: minmax(0, 2.6fr) 70px minmax(0, 1.7fr) minmax(0, 1.15fr) 104px 128px; gap: 10px; align-items: center;
  min-height: 38px; padding: 4px 12px; border-bottom: 1px solid var(--hairline); font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.aa-sr.head { min-height: 30px; background: var(--sheen); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.aa-sg:last-child > .aa-sr:last-child, .aa-sg:last-child .aa-ss:last-child .aa-sr { border-bottom: 0; }
.aa-sg > .aa-sr:not(.head):hover { background: var(--hover-tint); }
.aa-sg.open > .aa-sr:first-child { background: var(--surface-2); }
.aa-sr.sub { min-height: 32px; padding-left: 46px; background: var(--surface-1); font-size: 12px; }
.aa-who { display: flex; align-items: center; gap: 7px; min-width: 0; }
.aa-fold { appearance: none; flex: 0 0 auto; width: 24px; height: 24px; display: grid; place-items: center; padding: 0; border: 1px solid var(--border);
  border-radius: var(--r-xs); background: var(--surface-2); color: var(--text-2); cursor: pointer; }
.aa-fold:hover { color: var(--text); border-color: var(--border-2); }
.aa-wn { display: inline-flex; align-items: baseline; gap: 7px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.aa-wn b { color: var(--text); font-weight: 650; overflow: hidden; text-overflow: ellipsis; }
.aa-wn .mono { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }
.aa-kind { flex: 0 0 auto; display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 4px; border: 1px solid var(--border);
  font-size: 10px; font-weight: 750; letter-spacing: .03em; white-space: nowrap; color: var(--text-2); background: var(--surface-2); }
.aa-kind.k-oidc { color: var(--accent); border-color: var(--accent-bd); background: var(--accent-bg); }
.aa-ell { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.aa-act { display: flex; justify-content: flex-end; }
.aa-sconf { padding: 6px 12px 8px 46px; background: var(--surface-1); border-bottom: 1px solid var(--hairline); }
.aa-sconf.sub { padding-left: 70px; }

/* ---------- the scope editor ---------- */
.aa-scope { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 9px 10px; border: 1px solid var(--border); border-radius: var(--r-s); background: var(--surface-1); }
.aa-scopetop { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.aa-cover { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.aa-cover.none { color: var(--warning); font-weight: 650; }
.aa-srows { display: flex; flex-direction: column; gap: 6px; }
.aa-srow { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; align-items: start; }
.aa-scope.narrow .aa-srow { grid-template-columns: 78px minmax(0, 1fr); }
.aa-sk { padding-top: 5px; font-size: var(--fs-micro); font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.aa-sv { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; min-width: 0; }
.aa-tog { height: 26px; padding: 0 9px; white-space: nowrap; }
.aa-tog b { font-weight: 600; color: var(--text-3); }
.aa-tog.on b { color: var(--text); }
.aa-chosen { height: 24px; display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.aa-chosen.unknown { border-color: var(--warning-bd); background: var(--warning-bg); }
.aa-combo { position: relative; display: inline-flex; flex: 1 1 150px; min-width: 130px; max-width: 280px; }
.aa-cin { width: 100%; height: 26px; font-size: 12px; }
.aa-sugg { position: absolute; top: calc(100% + 3px); left: 0; z-index: 40; min-width: 100%; width: max-content; max-width: 360px; max-height: 260px; overflow-y: auto;
  padding: 4px; border: 1px solid var(--border-2); border-radius: var(--r-s); background: var(--raised); box-shadow: var(--shadow); }
.aa-opt { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 5px 8px; border-radius: var(--r-xs); font-size: 12.5px;
  color: var(--text); cursor: pointer; white-space: nowrap; }
.aa-opt.hi { background: var(--accent-bg); }
.aa-opt.free .aa-ol { color: var(--accent); font-weight: 650; }
.aa-ol { overflow: hidden; text-overflow: ellipsis; }
.aa-os { font-size: 11px; color: var(--text-3); font-family: var(--mono); }
.aa-words { display: flex; align-items: baseline; gap: 8px; min-width: 0; padding-top: 6px; border-top: 1px solid var(--hairline); font-size: 12.5px; }
.aa-words .k { flex: 0 0 auto; font-size: var(--fs-micro); font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.aa-words .v { min-width: 0; color: var(--text); font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; }
.aa-covlist { display: flex; flex-wrap: wrap; gap: 4px; max-height: 120px; overflow-y: auto; }
.aa-cs { padding: 1px 7px; border-radius: 4px; border: 1px solid var(--hairline); background: var(--surface-2); font-size: 11.5px; color: var(--text-2); white-space: nowrap; }
.aa-scope.dis .aa-cin { display: none; }

/* ---------- single sign-on rule fields, the Windows scheme, a new rule, a rule's scope ---------- */
.aa-claim { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.aa-claim .aa-hint { flex: 1 1 100%; }
.aa-csel { flex: 0 0 auto; }
.aa-cval { width: 300px; }
.aa-hint { display: block; min-width: 0; font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aa-winauth { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.aa-wrow { display: flex; align-items: center; gap: 8px; }
.aa-spn { display: flex; flex-direction: column; gap: 6px; padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--r-s); background: var(--surface-1); color: var(--text-2); }
.aa-spn code { font-family: var(--mono); font-size: 11.5px; color: var(--text); }
.aa-addrule { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; }
.aa-addline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.aa-addline > .k { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); font-weight: 700; white-space: nowrap; }
/* Inside the add-rule line the claim's select and box join the line, and its hint takes a line of its own under it. */
.aa-addline .aa-claim { display: contents; }
.aa-addline .aa-hint { order: 99; flex: 1 1 100%; padding-left: 2px; }
.aa-covbtn { max-width: 360px; }
.aa-covt { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.aa-covbtn.on { border-color: var(--accent-bd); background: var(--accent-bg); color: var(--text); }
.aa-addscope { max-width: 900px; }
.aa-scopecell { display: inline-flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; }
.aa-sct { font-size: 12px; color: var(--text-3); overflow-wrap: anywhere; }
.aa-sct.scoped { color: var(--text); font-family: var(--mono); }
