/* 설정 › 조직·명부 (t-mdes-organization-whole): what organization.js draws under the register -- a scope's detail, its
   admitted assets and the sources not yet registered (no asset map since UR28 C26). Reads the --ds-* tokens of
   style.css and loads after screens-operations.css, which keeps the summary card, the register's table, the status
   line and the registration form (.org-summary, .org-figures, .org-scopes, #org-status, #org-form). */

/* A refused save is said in the colour every refusal has, not as one more line of the form. */
#org-form-error:not(:empty){margin:var(--ds-space-3) 0 0;color:var(--ds-danger-text);font-size:var(--ds-fs-sm);font-weight:600}

/* An identifier (a device, a scan, an evidence record) stands in its line, in the mono face and a step quieter than
   the words around it; the shared code{display:block} is for a block of code. */
[data-page="organization"] code{display:inline;margin:0;font-family:var(--ds-font-mono);font-size:.92em;font-weight:400;color:var(--ds-text-2);overflow-wrap:anywhere;user-select:text}
[data-page="organization"] .text-action code{color:inherit}

/* The row of the scope whose detail stands under the register. */
.org-scopes tr[aria-current="true"]{background:color-mix(in srgb,var(--ds-accent) 12%,transparent)}
.org-scopes tr[aria-current="true"]>td:first-child{box-shadow:inset 3px 0 0 var(--ds-accent)}

/* A detail opened from a row is brought under the page's bar, not behind it. */
#org-detail,#org-admitted-detail,#org-detail [data-org-scope],#org-admitted-detail [data-admitted-asset-ref]{scroll-margin-top:80px}
#org-detail [tabindex="-1"]:focus{outline:none}
#org-detail [tabindex="-1"]:focus-visible{outline:2px solid var(--ds-focus);outline-offset:2px}
#org-detail>article{margin-top:var(--ds-space-4)}
#org-detail>article>h3{margin:0 0 var(--ds-space-3);font-size:var(--ds-fs-lg)}

/* A card's head: the name, its state, and at the row's end the way back to the register. */
.org-head{display:flex;flex-wrap:wrap;align-items:center;gap:var(--ds-space-2) var(--ds-space-3)}
.org-head :is(h3,h4){margin:0;font-size:var(--ds-fs-lg);word-break:keep-all;overflow-wrap:anywhere}
.org-head small{color:var(--ds-text-2);font-size:var(--ds-fs-sm)}
.org-head [data-org-back]{margin-left:auto}

/* A card's facts: a name and its value a row, two rows abreast where the card is wide; a long value takes the row. */
.org-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:var(--ds-space-6,32px);margin:var(--ds-space-3) 0 0;border-bottom:1px solid var(--ds-line)}
.org-facts>div{display:grid;grid-template-columns:9.5em minmax(0,1fr);gap:var(--ds-space-3);align-items:baseline;padding:var(--ds-space-2) 0;border-top:1px solid var(--ds-line);font-size:var(--ds-fs-md)}
.org-facts>.wide{grid-column:1/-1}
.org-facts dt{color:var(--ds-text-2);font-size:var(--ds-fs-sm)}
.org-facts dd{margin:0;min-width:0;word-break:keep-all;overflow-wrap:anywhere}
.org-facts dd small{margin-left:var(--ds-space-2);color:var(--ds-text-2);font-size:var(--ds-fs-sm)}
.org-kinds{display:flex;flex-wrap:wrap;gap:var(--ds-space-2);margin:var(--ds-space-2) 0 0}
#org-history:not(:empty){margin-top:var(--ds-space-4)}
/* An admitted asset's 근거 and 관계 근거 are the panel's section heads (명세 9.4 · 시안 .sect-h: 13px, 600, the third ink),
   a section's 16px from what is over it and 8px over its lines. */
.org-asset>h4{display:flex;align-items:center;gap:var(--ds-space-2);margin:var(--ds-space-4) 0 var(--ds-space-2);color:var(--ds-text-3);font-size:var(--ds-fs-xs);font-weight:600}
#org-history p,.org-asset>p{margin:var(--ds-space-1) 0;font-size:var(--ds-fs-sm)}
/* A revision line has no dot column; its one child sat in the 20px marker track and folded at one or two letters. */
#org-history .lx-tl-i{display:block;padding-bottom:var(--ds-space-3)}
#org-history .lx-tl-i::before{display:none}
#org-history .lx-tl-i>div{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 8px;min-width:0;overflow-wrap:anywhere}

/* Rows of the detail's lists: the state chip sits at the row's end on the first line; a name that opens something is
   the row's lead. */
#org-detail .row,#org-unregistered .row{align-items:center;padding:var(--ds-space-3) var(--ds-space-1)}
#org-detail .row>.tag{justify-self:end}
#org-detail .row b code{color:var(--ds-text);font-size:1em;font-weight:600}
.org-admitted .row .text-action{padding:0;font-size:var(--ds-fs-md);text-align:left}
.org-assets .row .text-action{padding:0;margin-top:var(--ds-space-1)}
.org-assets .row details{margin-top:var(--ds-space-1);font-size:var(--ds-fs-sm)}
.org-assets .row details>summary{cursor:pointer;color:var(--ds-text-2)}
.org-assets .row details p{margin:var(--ds-space-1) 0 0}

/* The asset search: the box and its button on one line, the label over the box. */
#org-search-form{align-items:flex-end;margin:0 0 var(--ds-space-3)}
#org-search-form>label{flex:0 1 360px;margin:0}

/* The admitted asset's detail under its list: the design's inset (시안 .inset -- the second ground, 14px 16px, 10px
   round, no line), not a framed box of its own inside the panel. Its name is the inset's head (시안 .h2), its facts the
   panel's name-and-value list (시안 .kv in the panel: a 92px name, 8px rows, 16px between, no rule under each). */
#org-admitted-detail .org-asset{margin-top:var(--ds-space-2);padding:14px var(--ds-space-4);border:0;border-radius:10px;background:var(--ds-surface-2)}
#org-admitted-detail .org-head :is(h3,h4){font-weight:650;letter-spacing:-.01em}
#org-asset-controls{margin-top:var(--ds-space-3)}
#org-asset-controls h4{margin:0 0 var(--ds-space-2)}
#org-admitted-detail .org-facts{grid-template-columns:minmax(0,1fr);row-gap:var(--ds-space-2);margin:var(--ds-space-4) 0 0;border:0}
#org-admitted-detail .org-facts>div{grid-template-columns:92px minmax(0,1fr);gap:var(--ds-space-4);padding:0;border:0}
#org-admitted-detail .org-facts dt{color:var(--ds-text-3);font-size:var(--ds-fs-xs)}

/* What a registered scope cannot change, said over the greyed fields. */
.org-form-locked{margin:var(--ds-space-2) 0 0;color:var(--ds-text-2);font-size:var(--ds-fs-sm)}

@media(max-width:1100px){.org-facts{grid-template-columns:minmax(0,1fr)}}
@media(max-width:640px){
  .org-facts>div{grid-template-columns:minmax(0,1fr);gap:0}
  .org-head [data-org-back]{margin-left:0}
  #org-detail .row,#org-unregistered .row{grid-template-columns:minmax(0,1fr);gap:var(--ds-space-2)}
  #org-detail .row>.tag{justify-self:start}
}

/* A figure's line under it reads at the body size (14px; c3.78 consistency review: 13px over 2-3 lines). */
.org-figures .ov-metric small{font-size:var(--ds-fs-md)}
/* The waiting summary keeps the room of the 범위별 상태 fold the read one has (its summary line is 24px under one step). */
.org-summary .org-wait-fold{height:24px;margin-top:var(--ds-space-3)}
/* 범위별 상태: a scope a line, as close as the register's rows (each stood 41px apart: 100 scopes were 4,200px). */
.org-summary details>p{margin:0;padding:2px 0;font-size:var(--ds-fs-sm)}
.org-summary details>p .text-action{padding:var(--ds-space-1) 0}
/* A card with one line to say (no collector record, no admitted list) is as tall as that line, not the 235px every
   article starts from. */
#org-detail>article{min-height:0}
/* The admitted-assets card follows the redesign's flat look: no 235px floor, no shadow, a compact padding and a hairline
   in place of the generic article's frame (PC2 C02). */
article.ra10-admitted{min-height:0;margin-top:var(--ds-space-2);padding:var(--ds-space-4) 0 0;box-shadow:none;border:0;border-top:1px solid var(--ds-line);border-radius:0;background:transparent}

/* A collector row (수집기 관측 범위): what was looked at, where and what was found are read as words; each code stands
   quieter beside its word, where it stood as the row's name (c3.48 user stack, whole-review U48-5). */
.org-collectors .row>div>code{margin-left:var(--ds-space-1);font-size:var(--ds-fs-sm);color:var(--ds-text-3)}
.org-collectors .row small{color:var(--ds-text-2)}
.org-collectors .row small code{font-size:1em;color:var(--ds-text-3)}

/* The dot between the parts of a line that may wrap, with the no-break space after it: kept whole, so the dot goes to
   the next line with the part it leads (WebKit breaks between the two under the shared word-break: keep-all). */
.org-dot{white-space:nowrap}

/* 계정 (설정 › 계정·역할) and 등록 범위 (조직·직원 목록), U2: a list's head is the press that sorts it, drawn as the head
   it was, its mark (↑ ↓) beside the name; a long list has a search over it, which says how many it keeps. Scoped to the
   two screens' roots; the shared .mc-/.org- rules keep their meaning. */
#members-root .mb-row.mc-head .mb-sort,[data-page="organization"] .org-scopes th .org-scopes-sort{display:inline-flex;gap:4px;align-items:center;width:auto;min-height:0;padding:0;border:0;border-radius:0;background:transparent;color:inherit;font:inherit;text-align:inherit;cursor:pointer;white-space:nowrap}
#members-root .mb-row.mc-head .mb-sort:hover,[data-page="organization"] .org-scopes th .org-scopes-sort:hover{background:color-mix(in srgb,var(--ds-accent) 8%,transparent);text-decoration:underline;text-underline-offset:3px}
#members-root .mb-sort-mark,[data-page="organization"] .org-scopes-sort-mark{color:var(--ds-text)}
#members-root .mb-sort-mark:empty,[data-page="organization"] .org-scopes-sort-mark:empty{display:none}
[data-page="organization"] .org-scopes th.num .org-scopes-sort{flex-direction:row-reverse}
#members-root .mb-find,[data-page="organization"] .org-scopes-find{display:flex;flex-wrap:wrap;align-items:flex-end;gap:var(--ds-space-1) var(--ds-space-3);margin:0 0 var(--ds-space-3)}
[data-page="organization"] .org-scopes-find{margin:0;padding:0 20px var(--ds-space-3)}
:is(#members-root .mb-find,[data-page="organization"] .org-scopes-find)>label{flex:0 1 360px;margin:0}
:is(#members-root .mb-find,[data-page="organization"] .org-scopes-find)>label>input{margin-top:var(--ds-space-1)}
:is(#members-root .mb-find,[data-page="organization"] .org-scopes-find)>p{margin:0 0 var(--ds-space-2)}
:is(#members-root .mb-find,[data-page="organization"] .org-scopes-find) .link-button{width:auto;min-height:0;padding:0;font-size:inherit;text-decoration:underline;text-underline-offset:3px}
[data-page="organization"] .org-scopes-within{margin:0;padding:0 20px var(--ds-space-2)}
[data-page="organization"] .org-scopes-none-found{padding:var(--ds-space-3) 20px}
/* A phone: a scope stands as a block, each value under its head's name (data-label), inside the screen instead of a
   table gone on sideways; the heads stay above as the sort's presses. */
@media(max-width:600px){
  [data-page="organization"] .org-scopes .table-wrap{overflow:visible;-webkit-mask-image:none;mask-image:none}
  [data-page="organization"] .org-scopes table,[data-page="organization"] .org-scopes table>:is(thead,tbody),[data-page="organization"] .org-scopes tr{display:block;width:100%;min-width:0}
  [data-page="organization"] .org-scopes thead>tr{display:flex;flex-wrap:wrap;gap:var(--ds-space-1) var(--ds-space-4);padding:var(--ds-space-2) 20px;border-bottom:1px solid var(--ds-line-strong,var(--ds-line))}
  [data-page="organization"] .org-scopes thead th{display:block;padding:0;border:0;background:transparent;text-align:left}
  [data-page="organization"] .org-scopes th.num .org-scopes-sort{flex-direction:row}
  [data-page="organization"] .org-scopes tbody>tr{display:flex;flex-wrap:wrap;gap:2px var(--ds-space-4);padding:var(--ds-space-2) 20px;border-bottom:1px solid var(--ds-line)}
  [data-page="organization"] .org-scopes td{display:block;max-width:none;padding:2px 0;border:0;text-align:left;white-space:normal}
  /* The name and its unit and team a line each; the four short values share the lines under them. */
  [data-page="organization"] .org-scopes td:is([data-label="범위"],[data-label="조직 / 팀"]){flex:1 1 100%}
  
  [data-page="organization"] .org-scopes td[data-label]:not([data-label="범위"])::before{content:attr(data-label) " ";color:var(--ds-text-2);font-size:var(--ds-fs-xs)}
  [data-page="organization"] .org-scopes tr[aria-current="true"]>td:first-child{box-shadow:none}
  [data-page="organization"] .org-scopes tbody>tr[aria-current="true"]{box-shadow:inset 3px 0 0 var(--ds-accent)}
}

/* 관리 이력 (설정 › 관리 이력 and 계정·역할's 관리 이력 tab), U2: each head is the press that sorts the records read, drawn
   as the head it was with ↑/↓ beside it, the zone beside 시각. Up to 760px a record is a block of named values
   (screens-operations.css, Header #7 a1c3f4d1): its head, hidden there before, stays above the records as one row of
   the sort's presses -- a press a phone could not see was a keyboard stop on a 1px box. The waiting table's head (hidden
   from a reader) stays hidden. */
:is(#audit-log-root,#members-root) .al-table th .al-sort{display:inline-flex;gap:4px;align-items:center;width:auto;min-height:0;padding:0;border:0;border-radius:0;background:transparent;color:inherit;font:inherit;text-align:inherit;cursor:pointer;white-space:nowrap}
:is(#audit-log-root,#members-root) .al-table th .al-sort:hover{background:color-mix(in srgb,var(--ds-accent) 8%,transparent);text-decoration:underline;text-underline-offset:3px}
:is(#audit-log-root,#members-root) .al-sort-mark{color:var(--ds-text)}
:is(#audit-log-root,#members-root) .al-sort-mark:empty{display:none}
:is(#audit-log-root,#members-root) .al-card .al-sorted{margin:0 20px var(--ds-space-2)}
@media(max-width:760px){
  :is(#audit-log-root,#members-root) .al-table:not([aria-hidden="true"])>thead{position:static;display:block;width:auto;height:auto;overflow:visible;clip-path:none}
  :is(#audit-log-root,#members-root) .al-table:not([aria-hidden="true"])>thead>tr{display:flex;flex-wrap:wrap;gap:var(--ds-space-1) var(--ds-space-4);padding:var(--ds-space-2) 20px;border-top:0;border-bottom:1px solid var(--ds-line-strong,var(--ds-line))}
  :is(#audit-log-root,#members-root) .al-table:not([aria-hidden="true"])>thead th{display:block;width:auto;padding:0;border:0;background:transparent}
}

/* The right panels of 계정 · 부서 · 관리 이력 (members.js) and of 수집 대상 (FB-007): the design's .aside puts its parts
   16px apart (시안 Settings.html, 명세 9.4); the panels' own wraps had 14px and 12px. A form keeps its fields' 12px.
   (These load before redesign-ra8.css and -ra10.css, so each rule names the panel's mark over its class.) */
.ra8-panel[data-mb-panel],.ra8-panel[data-mb-panel]>div.lx-stack,.lx-stack.ra10-panel[data-org-panel]{gap:var(--ds-space-4)}
.org-raw{font-family:var(--ds-font-mono,ui-monospace,monospace);font-size:var(--ds-fs-sm);font-weight:400;color:var(--ds-text-3)}

/* ---------- Phase 4 (Click Portal redesign): settings and connection screens, layout only ----------
   A screen's headline (.lx-lede with its .lx-lede-sub quiet line) stands a section's gap above what follows. */
:is(#oauth-ai-apps-root,#admin-consent-root)>.lx-lede{margin-bottom:var(--gap-section)}
.lx-stack[data-ax-view]>.lx-lede[data-ax-top]{margin-bottom:var(--sp-2)}
#admin-consent-root>.lx-note{margin-bottom:var(--gap)}
/* 관리자 동의: the notice reads as a document -- a heading a step clear of the paragraph before it, lines held to a
   readable measure. */
.admin-consent-words{max-width:80ch}
.admin-consent-words>.lx-h3:not(:first-child){margin-top:var(--sp-2)}
/* The 기록 button follows the notice words it attests to, a section's room under them. */
.admin-consent-words+.lx-row{margin-top:var(--sp-4)}
/* 감사 로그's toolbar: the search and 필터 stay together at the row's end; when the chips fill the row they wrap as one. */
#audit-log-root .ra8-tools-end{display:flex;flex:0 1 380px;align-items:center;gap:var(--sp-2);min-width:240px;margin-left:auto}
#audit-log-root .ra8-tools-end>.ra8-find{flex:1 1 auto;min-width:0}
/* 계정 · 역할 for a reader: the Read only mark and its 자세히 sit on one line, not a full-width strip over an orphan fold. */
#members-root [data-mb-readonly]:not([data-mb-readonly="panel"]){display:inline-flex;align-items:center;gap:var(--sp-2);margin-right:var(--sp-3);vertical-align:middle}
#members-root [data-mb-readonly]:not([data-mb-readonly="panel"])+[data-info-more="readonly"]{display:inline-block;vertical-align:middle}
/* 수집 대상: whose targets were counted and its 자세히 on one quiet line under the headline. */
#org-overview>[data-org-universe]{display:inline-flex;align-items:center;gap:var(--sp-1);margin-right:var(--sp-3);vertical-align:middle}
#org-overview>[data-org-universe]+[data-info-more="count"]{display:inline-block;vertical-align:middle}
/* 감사 로그's time: the date and the clock in one face (the clock was set in the code font), figures aligned. */
#audit-log-root .ra8-audit .ra8-clock{font-family:inherit;font-variant-numeric:tabular-nums}
