/* STD V2: one presentation layer for every server-rendered work page and shell. */
:root {
  --v2-panel: #fff; --v2-panel-alt: #f8f9fb; --v2-hover: #eef2f7;
  --v2-sidebar: #2a3547; --v2-sidebar-section: #212a3a;
  --v2-sidebar-text: #d8dde5; --v2-sidebar-muted: #aab6c8;
  --v2-sidebar-hover: #34405a; --v2-sidebar-active: #1a3d7c;
  --v2-header: #1a3d7c; --v2-header-text: #fff; --v2-header-muted: #b8c8e0;
  --v2-selected-text: #fff; --v2-gap: 10px;
  /* Compatibility aliases used by existing attachment and detail components. */
  --c-line: var(--c-border-2); --c-card: var(--v2-panel);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --v2-panel: #333944; --v2-panel-alt: #2c313a; --v2-hover: #3d4453;
  --c-bg: #262b34; --c-bg-alt: #2c313a; --c-text: #e8ebf0;
  --c-text-sub: #b8bfc9; --c-text-mute: #a4adbb;
  --c-border: #4a5160; --c-border-2: #3d4453; --c-input-border: #5a6270;
  --c-label: #2c313a; --c-label-border: #4a5160;
  --c-primary: #3563b3; --c-primary-dark: #4a7ac9;
  --c-primary-tint: #2a4470; --c-primary-tint-2: #2a4470;
  --c-grid-head: #3a4152; --c-grid-head-2: #4a5160;
  --c-grid-border: #4a5160; --c-grid-line: #4a5160;
  --c-row-hover: #3d4453; --c-row-selected: #2a4470; --c-row-stripe: #383f4a;
  --v2-header: #1c2537; --v2-sidebar: #202733; --v2-sidebar-section: #19212e;
}
:root[data-shell="light-sidebar"], :root[data-shell="all-light"] {
  --v2-sidebar: #f5f7fa; --v2-sidebar-section: #eaeef3;
  --v2-sidebar-text: #1a1f2c; --v2-sidebar-muted: #66758b;
  --v2-sidebar-hover: #e6ebf2; --v2-sidebar-active: #e0e9f5; --v2-selected-text: #1a3d7c;
}
:root[data-shell="all-light"] { --v2-header: #fff; --v2-header-text: #1a1f2c; --v2-header-muted: #66758b; }
:root[data-theme="dark"][data-shell="light-sidebar"], :root[data-theme="dark"][data-shell="all-light"] {
  --v2-sidebar: #2d323b; --v2-sidebar-section: #262b34;
  --v2-sidebar-text: #e8ebf0; --v2-sidebar-muted: #a4adbb;
  --v2-sidebar-hover: #3d4453; --v2-sidebar-active: #2a4470; --v2-selected-text: #fff;
}
:root[data-theme="dark"][data-shell="all-light"] { --v2-header: #2d323b; --v2-header-text: #e8ebf0; --v2-header-muted: #a4adbb; }

/* Header and menu options use the same authorized Navigation/Favorites as the sidebar. */
.hd-top { background: var(--v2-header); color: var(--v2-header-text); gap: 12px; }
.hd-brand { flex: 0 1 auto; min-width: 0; }
.hd-brand .sys-name { color: inherit; font-size: 12px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd-menu-toggle, .hd-util button.u-ico { color: var(--v2-header-text); }
.hd-util { gap: 8px; flex-shrink: 0; }
.hd-util .u-info { color: var(--v2-header-text); }
.hd-util .u-lang { color: var(--v2-header-text); background: var(--v2-header); border-color: var(--v2-header-muted); }
.v2-header-tools { display: flex; flex: 1; align-items: center; gap: 5px; min-width: 0; }
.v2-header-button, .v2-header-search { color: var(--v2-header-text); border: 0; background: transparent; border-radius: var(--r); padding: 6px 9px; font: inherit; font-size: 12px; white-space: nowrap; cursor: pointer; }
.v2-header-button:hover, .v2-header-button:focus-visible { background: rgb(127 149 183 / 22%); }
.v2-header-search { flex: 1; max-width: 330px; min-width: 110px; text-align: left; color: var(--v2-header-muted); border: 1px solid rgb(127 149 183 / 40%); background: rgb(127 149 183 / 14%); overflow: hidden; text-overflow: ellipsis; }
#mg-sidebar { background: var(--v2-sidebar); color: var(--v2-sidebar-text); border-color: var(--c-border); }
#mg-sidebar .sb-head, #mg-sidebar .sb-favorites { background: var(--v2-sidebar-section); color: var(--v2-sidebar-text); }
#mg-sidebar .submenu, #mg-sidebar .submenu .menu-group > .menu-link { background: var(--v2-sidebar); }
#mg-sidebar .navigation-link, #mg-sidebar .menu-link, #mg-sidebar .favorite-link { color: var(--v2-sidebar-text); border-color: transparent; }
#mg-sidebar .navigation-link:hover, #mg-sidebar .menu-link:hover, #mg-sidebar .favorite-link:hover { background: var(--v2-sidebar-hover); }
#mg-sidebar .navigation-link.is-active, #mg-sidebar .menu-group.is-open > .menu-link { background: var(--v2-sidebar-active); color: var(--v2-selected-text); }
#mg-sidebar .favorite-action, #mg-sidebar .sb-section-title, #mg-sidebar .collapse-btn, #mg-sidebar .favorites-empty { color: var(--v2-sidebar-muted); }
#mg-sidebar .favorite-action:hover { background: var(--v2-sidebar-hover); }
[data-menu-mode="expanded"] #mg-sidebar, [data-menu-mode="expanded"] .hd-menu-toggle { display: none; }
[data-menu-mode="sidebar"] #v2-all-menu-toggle { display: none; }
.mdi-tab-strip { background: var(--v2-panel-alt); border-color: var(--c-border); }
.mdi-tab, .mdi-icon-btn, .mdi-text-btn, .mdi-context-menu { background: var(--v2-panel); color: var(--c-text); border-color: var(--c-border); }
.mdi-tab.is-active { background: var(--v2-panel); color: var(--c-primary); }

/* Native top-layer dialogs supply overlay, ESC and focus containment. */
.v2-dialog { padding: 0; width: min(940px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow: auto; border: 1px solid var(--c-border); border-radius: var(--r-card); background: var(--v2-panel); color: var(--c-text); box-shadow: 0 16px 48px #0f172a40; }
.v2-dialog::backdrop { background: rgb(15 23 42 / 45%); }
.v2-dialog-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; background: var(--v2-panel-alt); border-bottom: 1px solid var(--c-border); }
.v2-dialog-head h2 { margin: 0; font-size: 16px; color: var(--c-text); }
#v2-options { width: min(420px, calc(100vw - 32px)); margin-right: 16px; }
.v2-options-body { padding: 18px; display: grid; gap: 18px; }
.v2-setting { margin: 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.v2-setting legend { font-weight: 700; font-size: 12px; margin-bottom: 8px; color: var(--c-text-sub); }
.v2-setting-choice { display: flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid var(--c-border); border-radius: var(--r); font-size: 12px; cursor: pointer; }
.v2-setting-choice:has(:checked) { background: var(--c-primary-tint); border-color: var(--c-primary); }
.v2-setting-choice:has(:disabled) { opacity: .5; cursor: default; }
.v2-menu-search { margin: 16px; width: calc(100% - 32px); height: 36px; }
.v2-menu-groups { padding: 0 16px 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.v2-menu-group { min-width: 0; border: 1px solid var(--c-border); border-radius: var(--r); overflow: hidden; }
.v2-menu-group h3 { font-size: 13px; padding: 10px 12px; background: var(--v2-panel-alt); margin: 0; color: var(--c-text); }
.v2-menu-link { display: block; padding: 9px 12px; font-size: 13px; color: var(--c-text); overflow-wrap: anywhere; }
.v2-menu-link:hover, .v2-menu-link:focus-visible { background: var(--c-primary-tint); color: var(--c-text); text-decoration: none; }
.v2-menu-empty { padding: 20px; color: var(--c-text-sub); grid-column: 1 / -1; }
.v2-dialog-open, .v2-dialog-open .content { overflow: hidden; }
.v2-standalone-settings { position: fixed; right: 20px; bottom: 20px; background: var(--c-primary); color: #fff; box-shadow: var(--shadow-panel); z-index: 10; }

/* Every work page shares the same page, search, form, grid and detail surfaces. */
.v2-workspace { padding: 14px; background: var(--c-bg); min-width: 0; }
.v2-workspace .page-head { min-height: 38px; margin-bottom: 12px; flex-wrap: wrap; }
.v2-workspace .page-head > .btn:last-child { margin-left: auto; }
.v2-workspace .page-lead { font-size: 12px; color: var(--c-text-sub); margin: 5px 0 0; line-height: 1.6; }
.v2-workspace .panel { background: var(--v2-panel); min-width: 0; }
.v2-workspace .panel-head { height: auto; min-height: 36px; background: var(--v2-panel-alt); }
.v2-workspace .panel-head .p-title { font-size: 13px; }
.v2-workspace .panel-body { padding: 12px; }
.v2-workspace .panel-body.no-pad { padding: 0; }
.v2-workspace .panel-head .p-tools { flex-wrap: wrap; }
.v2-workspace .split > .panel, .v2-workspace .split-even > .panel, .v2-workspace .md-split > .panel { margin-top: 0; }
.v2-workspace .search-bar { margin-bottom: 10px; padding: 0; background: var(--v2-panel); }
.v2-workspace .search-tbl { width: 100%; }
.v2-workspace .search-tbl th { background: var(--v2-panel-alt); padding: 8px 10px; }
.v2-workspace .search-tbl td { background: var(--v2-panel); padding: 6px 8px; }
.v2-workspace .search-actions { padding: 7px 10px; background: var(--v2-panel-alt); }
.v2-workspace .filter-bar { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.v2-workspace .filter-bar:last-child { margin-bottom: 0; }
.v2-workspace .filter-bar > label, .v2-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; font-size: 12px; font-weight: 500; color: var(--c-text-sub); }
.v2-workspace .filter-bar > label, .v2-workspace .filter-bar > .v2-field { flex: 1 1 180px; max-width: 360px; }
.v2-workspace .filter-bar > .form-control, .v2-workspace .filter-bar > .form-select { flex: 1 1 180px; max-width: 320px; }
.v2-workspace .filter-bar > button { flex: 0 0 auto; }
.v2-workspace .grid-wrap, .v2-workspace .grid-scroll { overflow: auto; max-width: 100%; }
.v2-workspace .grid th { white-space: nowrap; }
.v2-workspace .grid td { height: 32px; }
.v2-workspace .grid .btn { vertical-align: middle; }
.v2-workspace .grid-empty td { height: 100px; color: var(--c-text-sub); }
.v2-workspace .form-tbl { border-radius: var(--r); background: var(--v2-panel); }
.v2-workspace .form-tbl th { min-width: 85px; background: var(--v2-panel-alt); }
.v2-workspace .detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.v2-workspace .detail-grid > div { padding: 10px; border: 1px solid var(--c-border-2); border-radius: var(--r); min-width: 0; }
.v2-workspace .detail-grid dt { color: var(--c-text-sub); font-size: 11px; margin-bottom: 4px; }
.v2-workspace .detail-grid dd { margin: 0; overflow-wrap: anywhere; }
.v2-workspace .workspace-switcher { display: flex; gap: 4px; margin-bottom: 10px; padding: 4px; background: var(--v2-panel-alt); border: 1px solid var(--c-border); border-radius: var(--r); width: fit-content; }
.v2-workspace .workspace-switcher button { padding: 7px 14px; border: 0; border-radius: 5px; color: var(--c-text-sub); background: transparent; font: inherit; cursor: pointer; }
.v2-workspace .workspace-switcher button[aria-selected="true"], .v2-workspace .workspace-switcher button[aria-pressed="true"], .v2-workspace .workspace-switcher button.is-active { background: var(--c-primary); color: #fff; }
.v2-workspace .foot { color: var(--c-text-sub); background: var(--v2-panel-alt); border-radius: var(--r); }
/* Keep form/table controls legible in both themes, including native file selection. */
.form-control, .form-select, .btn-default, .pagination .pg, .modal, .layer, .dlg { background-color: var(--v2-panel); color: var(--c-text); border-color: var(--c-border); }
.form-control:disabled, .form-control[readonly], .form-select:disabled { background-color: var(--v2-panel-alt); color: var(--c-text-sub); }
input::file-selector-button { border: 1px solid var(--c-border); border-radius: var(--r); padding: 7px 12px; margin-right: 10px; background: var(--v2-panel); color: var(--c-text); cursor: pointer; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--c-primary); }
textarea.form-control { min-height: 80px; resize: vertical; }
.modal-head, .modal-foot, .layer-foot, .dlg-foot { background: var(--v2-panel-alt); }
.modal-head h3, .modal-close { color: var(--c-text); }

/* List/detail workspaces: keep the existing selection and editor DOM hooks. */
.v2-workspace :is(.menu-detail-drawer, .email-template-editor-drawer, .common-code-editor-drawer, .operational-log-detail) { border-radius: var(--r-card); background: var(--v2-panel); border-color: var(--c-border); }
.v2-workspace :is(.menu-detail-head, .email-template-editor-head, .common-code-editor-head, .operational-log-detail-head) { background: var(--v2-panel-alt); color: var(--c-text); border-bottom: 1px solid var(--c-border); }
.v2-workspace :is(.menu-detail-head, .email-template-editor-head, .common-code-editor-head, .operational-log-detail-head) :is(h2,h3,button,p) { color: var(--c-text); }
.v2-workspace :is(.menu-detail-actions, .email-template-editor-actions, .common-code-editor-actions, .operational-log-detail-foot, .grid-toolbar, .user-grid-toolbar) { background: var(--v2-panel-alt); border-color: var(--c-border); }
.v2-workspace :is(.user-inspector-identity, .user-inspector-empty, .user-inspector-section, .permission-catalog-toolbar, .attachment-item, .attachment-detail-item, .attachment-my-file) { background: var(--v2-panel); color: var(--c-text); border-color: var(--c-border); }
.v2-workspace .managed-file-drop-zone { padding: 24px; border-radius: var(--r); border: 1px dashed var(--c-primary); background: var(--v2-panel-alt); }
.v2-workspace .managed-file-workbench { grid-template-columns: minmax(0, 1.35fr) minmax(280px, 1fr); align-items: stretch; }
.v2-workspace .managed-file-detail-panel { min-height: 260px; }
.v2-workspace .session-workbench { gap: var(--v2-gap); }
.v2-workspace .bulletin-board-workbench { align-items: stretch; }
.v2-workspace .bulletin-board-detail-panel { min-height: 350px; }
.v2-workspace .bulletin-board-detail-body { line-height: 1.8; }
#organization-management-page .split { grid-template-columns: minmax(250px, .7fr) minmax(0, 1.6fr); gap: 12px; margin-bottom: 12px; }
#organization-management-page .split + .split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#organization-unit-detail-form { border-top: 1px solid var(--c-border); padding-top: 12px; margin-top: 12px; }
#organization-unit-detail-form > button { margin-top: 10px; }
#asset-lending-management-page .filter-bar { padding: 4px 0; }
#batch-job-page > .panel { margin-top: 12px; }
#batch-job-page ol { padding-left: 20px; margin: 0; line-height: 1.8; }

/* Authentication/admin access are part of the same design, without adding auth flows. */
.auth-standalone.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100dvh; padding: 32px 16px; background: linear-gradient(135deg, #1a3d7c, #0a1f42); }
.auth-standalone .login-panel { width: min(480px, 100%); min-height: 0; padding: 76px 36px 32px; border-radius: var(--r-card); background: var(--v2-panel); }
.auth-standalone .login-box h1 { font-size: 22px; color: var(--c-text); margin-bottom: 14px; }
.auth-standalone .login-box > p { color: var(--c-text-sub); line-height: 1.7; margin-bottom: 22px; }
.auth-standalone .login-field input { padding-left: 12px; }
.auth-standalone form + form { margin-top: 10px; }
[data-theme="dark"] .login-panel, [data-theme="dark"] .login-field .form-control, [data-theme="dark"] .mobile-app-dialog-card { background: var(--v2-panel); color: var(--c-text); }
.v2-access { background: var(--c-bg); padding: 40px 24px; }
.v2-access main { max-width: 960px; margin: auto; }
.access-header, .access-card, .access-result { background: var(--v2-panel); border: 1px solid var(--c-border); border-radius: var(--r-card); padding: 24px; box-shadow: var(--shadow-panel); }
.access-header { margin-bottom: 16px; border-top: 4px solid var(--c-primary); }
.access-header h1 { font-size: 22px; margin-bottom: 8px; }
.access-header p, .access-card p { color: var(--c-text-sub); line-height: 1.7; }
.access-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.access-card h2 { font-size: 16px; margin: 0 0 8px; }
.access-field { display: grid; gap: 6px; margin-top: 14px; }
.access-card .btn { margin-top: 18px; }
.access-result { margin-top: 16px; border-color: var(--c-success); }
.access-result dl { display: grid; grid-template-columns: 160px 1fr; gap: 10px; }
.access-result .secret { font-family: monospace; font-size: 18px; overflow-wrap: anywhere; }
.access-error { color: var(--c-danger); margin-bottom: 16px; }

@media (max-width: 1200px) {
  .hd-brand .sys-name { max-width: 120px; }
  .v2-header-search { max-width: 180px; }
  #v2-shortcuts-toggle { display: none; }
}
@media (max-width: 1000px) {
  .hd-brand .sys-name, .hd-util .u-info { display: none; }
  .v2-workspace :is(.md-split, .managed-file-workbench, .authorization-role-workbench, .session-workbench) { grid-template-columns: minmax(0, 1fr); height: auto; }
  .v2-workspace :is(.authorization-role-list-panel, .authorization-role-detail > form) { height: auto; }
  .v2-workspace :is(.menu-workbench.is-detail-open, .email-template-workbench.is-editor-open) { grid-template-columns: minmax(0, 1fr); height: auto; gap: 12px; }
  .v2-workspace :is(.menu-workbench.is-detail-open .menu-detail-drawer, .email-template-workbench.is-editor-open .email-template-editor-drawer) { position: static; width: 100%; height: auto; }
}
@media (max-width: 700px) {
  .hd-top { gap: 4px; padding: 0 6px; }
  .v2-header-tools { gap: 0; }
  .v2-header-search, #v2-favorites-toggle { display: none; }
  .v2-header-button { padding: 6px; font-size: 11px; }
  .v2-workspace { padding: 10px; }
  .v2-workspace :is(.split, .split-even), #organization-management-page .split, #organization-management-page .split + .split { grid-template-columns: minmax(0, 1fr); }
  .v2-workspace .search-bar { overflow: auto; }
  .v2-workspace .filter-bar > .v2-field, .v2-workspace .filter-bar > label { max-width: none; }
  .v2-menu-groups { grid-template-columns: minmax(0, 1fr); }
  .v2-workspace .detail-grid, .access-grid { grid-template-columns: minmax(0, 1fr); }
  .v2-access { padding: 20px 12px; }
  .access-result dl { grid-template-columns: minmax(0, 1fr); }
  .auth-standalone .login-panel { padding: 76px 24px 24px; }
}
.v2-workspace .grid-toolbar > .v2-field { flex: 1; }

/* AI assistant panel adapted from the requested STD V2 reference. */
:root { --v2-ai-fg: #fff; }
.ai-assistant {
  position: fixed;
  top: var(--h-header);
  right: 0;
  bottom: 0;
  z-index: 200;
  display: flex;
  width: min(360px, calc(100vw - 48px));
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border-left: 1px solid var(--c-border);
  --ai-radius: 6px;
  --ai-control-radius: 4px;
  background: var(--v2-panel-alt);
  color: var(--c-text);
  box-shadow: -6px 0 20px rgba(15, 23, 42, 0.12);
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition: transform 180ms ease, opacity 120ms ease, visibility 180ms;

}
.assistant-closed .ai-assistant {
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  border-left-color: transparent;
  opacity: 0;
}
.ai-assistant-head {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--c-border-2);
  padding: 10px 12px;
  background: var(--v2-panel);
}
.ai-assistant-brand { display: flex; min-width: 0; align-items: center; gap: 9px; }
.ai-assistant-brand > span:last-child { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.ai-assistant-brand strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.ai-assistant-brand small { overflow: hidden; color: var(--c-text-sub); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.ai-assistant-logo {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border-radius: var(--ai-control-radius);
  background: var(--c-primary);
  color: #fff;
  box-shadow: none;
}
.ai-assistant-close {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--ai-control-radius);
  background: transparent;
  color: var(--c-text-sub);
}
.ai-assistant-close .msi { font-size: 16px; line-height: 1; }
.ai-assistant-close:hover { background: var(--v2-hover); border-color: var(--c-border); }
.ai-assistant button { cursor: pointer; font-family: inherit; transition: background 120ms ease, border-color 120ms ease; }
.ai-assistant button:focus-visible, .ai-toggle-btn:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }
.ai-assistant .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.ai-assistant-body {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 12px;
}
.ai-insight-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  border: 1px solid var(--c-border-2);
  border-radius: var(--ai-radius);
  background: var(--v2-panel);
  padding: 13px;
  box-shadow: var(--shadow-panel);
}
.ai-insight-card-accent { border-color: var(--c-border); }
.ai-insight-card strong { font-size: 12.5px; line-height: 1.5; }
.ai-insight-card strong em { color: #ff6b1a; font-style: normal; }
.ai-insight-card strong em.saving { color: #15965a; }
.ai-insight-card p { margin: 0; color: var(--c-text-sub); font-size: 11px; line-height: 1.55; }
.ai-chip {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  background: rgba(255, 107, 26, 0.10);
  padding: 3px 8px;
  color: #d6530b;
  font-size: 10px;
  font-weight: 700;
}
.ai-chip .msi, .ai-card-title .msi { font-size: 13px; }
.ai-card-title { display: flex; align-items: center; gap: 5px; color: var(--c-primary); font-size: 11px; font-weight: 700; }
.ai-card-actions { display: flex; gap: 6px; padding-top: 3px; }
.ai-card-actions button {
  height: 28px;
  border: 1px solid var(--c-primary);
  border-radius: var(--ai-control-radius);
  background: var(--c-primary);
  padding: 0 10px;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}
.ai-card-actions button.secondary { border-color: var(--c-border); background: var(--v2-panel); color: var(--c-text-sub); }
.ai-progress { height: 5px; overflow: hidden; border-radius: 999px; background: var(--v2-panel-alt); }
.ai-progress span { display: block; height: 100%; border-radius: inherit; background: #22a559; }
.ai-chat-message { display: flex; align-items: flex-start; gap: 8px; }
.ai-chat-message p {
  margin: 0;
  border: 1px solid var(--c-border-2);
  border-radius: var(--ai-radius);
  background: var(--v2-panel);
  padding: 9px 10px;
  color: var(--c-text-sub);
  font-size: 11px;
  line-height: 1.55;
}
.ai-chat-message.is-user { flex-direction: row-reverse; }
.ai-chat-message.is-user p { border-color: rgba(26, 61, 124, 0.18); border-radius: var(--ai-radius); background: var(--c-primary); color: var(--v2-ai-fg); }
.ai-chat-avatar {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border-radius: var(--ai-control-radius);
  background: var(--c-primary-tint);
  color: var(--c-primary);
  font-size: 14px;
}
.ai-chat-message.is-user .ai-chat-avatar { background: var(--c-primary); color: var(--v2-ai-fg); }
.ai-assistant-compose { display: flex; flex-direction: column; gap: 7px; border-top: 1px solid var(--c-border-2); background: var(--v2-panel); padding: 10px 12px 64px; }
.ai-quick-prompts { display: flex; flex-wrap: wrap; gap: 5px; }
.ai-quick-prompts button {
  border: 1px solid var(--c-border-2);
  border-radius: var(--ai-control-radius);
  background: var(--v2-panel-alt);
  padding: 4px 8px;
  color: var(--c-text-sub);
  font-size: 10px;
}
.ai-quick-prompts button:hover { border-color: var(--c-border); background: var(--v2-hover); color: var(--c-text); }
.ai-compose-box { display: flex; align-items: flex-end; gap: 8px; border: 1px solid var(--c-border); border-radius: var(--ai-radius); background: var(--v2-panel); padding: 8px; }
.ai-compose-box:focus-within { border-color: var(--c-primary); box-shadow: 0 0 0 2px rgba(26, 61, 124, 0.10); }
.ai-compose-box textarea { min-height: 34px; min-width: 0; flex: 1; resize: none; border: 0; outline: 0; background: transparent; color: var(--c-text); font: inherit; font-size: 11px; line-height: 1.45; }
.ai-compose-box button { display: grid; width: 28px; height: 28px; flex: 0 0 28px; place-items: center; border: 0; border-radius: var(--ai-control-radius); background: var(--c-primary); color: #fff; }
.ai-compose-box button .msi { font-size: 16px; }
.ai-assistant-compose > small { color: var(--c-text-sub); font-size: 9px; text-align: center; }

/* The assistant remains independent of MDI work tabs. */
.ai-assistant { top: 44px; z-index: 110; }
.ai-assistant[hidden] { display: none; }
.ai-assistant-compose { padding-bottom: 14px; }
.ai-chat-message p { overflow-wrap: anywhere; min-width: 0; }
.ai-assistant .msi { font-style: normal; }
.v2-info-body { padding: 20px; line-height: 1.8; }
.v2-info-body p + p { margin-top: 14px; }
.v2-info-body .btn { margin-top: 16px; }
.v2-dialog[id$='-panel'] { width: min(480px, calc(100vw - 32px)); }
.hd-top { gap: 6px; }
.hd-util { gap: 2px; }
.hd-util .v2-header-button { padding: 6px; }
.hd-brand .sys-name { max-width: 130px; }
.v2-header-search { max-width: 240px; }
#v2-ai-toggle[aria-expanded='true'] { background: rgb(127 149 183 / 28%); }
.v2-workspace table.grid tbody td, .v2-workspace .grid-wrap, .v2-workspace .grid-scroll { background-color: var(--v2-panel); }
.v2-workspace table.grid tbody tr:hover td { background-color: var(--c-row-hover); }
.v2-workspace table.grid tbody tr.is-selected td, .v2-workspace table.grid tbody tr.selected td { background-color: var(--c-row-selected); }
.v2-workspace table.grid tfoot td { background-color: var(--v2-panel-alt); }
.v2-workspace :is(.menu-detail-drawer, .email-template-editor-drawer) { transform: none; }
@media (max-width: 1200px) {
  .hd-top { height: auto; min-height: 44px; flex-wrap: wrap; padding: 5px 8px; }
  .hd-util { margin-left: auto; flex-wrap: wrap; }
  .hd-brand .sys-name { display: none; }
  .ai-assistant { top: 84px; }
}
@media (max-width: 700px) {
  .hd-util { justify-content: flex-end; width: 100%; }
  .hd-util .v2-header-button { font-size: 10px; padding: 4px; }
  .hd-util .u-lang { max-width: 68px; }
  #v2-user-menu { max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ai-assistant { top: 86px; }
  .v2-header-search, #v2-favorites-toggle, #v2-shortcuts-toggle { display: block; }
  .v2-header-search { min-width: 0; }
}
.v2-workspace { container-type: inline-size; }
.v2-workspace table.form-tbl td, .v2-workspace .grid-toolbar { background: var(--v2-panel); }
.v2-workspace .grid-scroll { border-color: var(--c-border); }
.v2-workspace .pagination { background: var(--v2-panel); }
@container (max-width: 1000px) {
  .v2-workspace :is(.authorization-role-workbench, .user-workbench, .managed-file-workbench, .session-workbench, .md-split) { grid-template-columns: minmax(0, 1fr); height: auto; }
  .v2-workspace :is(.authorization-role-rail, .authorization-role-detail, .authorization-role-detail > form, .authorization-role-list-panel) { width: 100%; height: auto; min-width: 0; }
  .v2-workspace .authorization-role-list-panel { min-height: 240px; }
  .v2-workspace :is(.menu-workbench.is-detail-open, .email-template-workbench.is-editor-open) { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .v2-workspace :is(.menu-workbench.is-detail-open .menu-detail-drawer, .email-template-workbench.is-editor-open .email-template-editor-drawer) { position: static; width: 100%; height: auto; }
}
@container (max-width: 700px) {
  .v2-workspace :is(.split, .split-even, .bulletin-board-workbench), #organization-management-page .split, #organization-management-page .split + .split { grid-template-columns: minmax(0,1fr); }
  .v2-workspace .search-bar { overflow: auto; }
  .v2-workspace .search-tbl { min-width: 580px; }
}
.v2-workspace .grid-empty td { background: var(--v2-panel) !important; }
#operational-log-page .operational-log-detail,
#bulletin-board-page .bulletin-board-body,
.v2-workspace .operational-log-timeline-item { background: var(--v2-panel); color: var(--c-text); }
[data-theme='dark'] .ai-card-title, [data-theme='dark'] .ai-chat-avatar { color: #9bc0ff; }
#v2-notifications, #v2-approvals, #v2-help { display: inline-flex; align-items: center; gap: 3px; }
.v2-header-badge { display: inline-grid; place-items: center; min-width: 12px; height: 12px; border-radius: 6px; background: #b33131; color: white; font-size: 9px; }

/* Consistent work-grid rhythm: header → optional status/tools → rows → footer. */
.v2-workspace { --v2-section-gap: 12px; --v2-panel-pad: 12px; }
.v2-workspace .panel-head { padding: 8px var(--v2-panel-pad); min-height: 40px; }
.v2-workspace .panel-body { padding: var(--v2-panel-pad); }
.v2-workspace .panel-body.no-pad { padding: 0; }
.v2-workspace .panel-body.no-pad > .help-text:empty,
.v2-workspace .panel-body.no-pad > p:empty,
.v2-workspace .help-text[aria-live]:empty { display: none; }
.v2-workspace .panel-body.no-pad > .help-text:not(:empty) { margin: 0; padding: 8px 12px; }
.v2-workspace .grid-toolbar { margin: 0; padding: 8px 12px; min-height: 40px; }
.v2-workspace .grid-wrap, .v2-workspace .grid-scroll { margin: 0; border-radius: 0; }
.v2-workspace .pagination, .v2-workspace .v2-grid-footer,
#bulletin-board-page .bulletin-board-list-actions { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 0; padding: 10px 12px; border-top: 1px solid var(--c-border-2); background: var(--v2-panel); }
.v2-workspace > .panel + .panel { margin-top: var(--v2-section-gap); }
.v2-workspace .grid-empty td { height: 96px !important; }
#my-files-page .managed-file-workbench { min-height: 0; align-items: start; gap: 12px; }
#my-files-page .managed-file-workbench > .panel { margin: 0; min-height: 0; }
#my-files-page #managed-file-list-state:empty { display: none; }
#my-files-page #managed-file-load-more { margin: 0; }
#my-files-page .managed-file-drop-zone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 112px; padding: 20px; cursor: pointer; border: 1px dashed var(--c-input-border); background: var(--v2-panel-alt); }
#my-files-page .managed-file-drop-zone:hover, #my-files-page .managed-file-drop-zone:focus-visible,
#my-files-page .managed-file-drop-zone.is-dragging { border-color: var(--c-primary); background: var(--c-primary-tint); outline: 2px solid var(--c-primary-tint); }
#my-files-page .managed-file-drop-zone[aria-disabled='true'] { cursor: not-allowed; opacity: .6; }
#my-files-page .managed-file-drop-zone p { margin: 0; }
#my-files-page .upload-drop-icon { color: var(--c-primary); }
#my-files-page #managed-file-input { display: none; }
#my-files-page .managed-file-selection { align-self: center; }
#my-files-page .managed-file-selection > div { background: transparent; border: 0; padding: 0; }
#my-files-page #managed-file-upload-form { gap: 10px 12px; }
#bulletin-board-page .bulletin-board-workbench { min-height: 0; align-items: start; gap: 12px; }
#bulletin-board-page .bulletin-board-list-region { min-height: 0; max-height: 560px; }
#bulletin-board-page .bulletin-board-detail-panel { min-height: 0; }
#bulletin-board-page .bulletin-board-detail-content { min-height: 0; }
#bulletin-board-page .bulletin-board-detail-head { padding: 16px; }
#bulletin-board-page .bulletin-board-body, #bulletin-board-page .bulletin-board-detail-empty { min-height: 180px; padding: 16px; font-family: inherit; }
#bulletin-board-page .bulletin-board-editor-mode { min-height: 0; }
#bulletin-board-page .bulletin-board-editor-body { max-width: none; padding: 16px; }
#bulletin-board-page .bulletin-board-editor-fields { border-top: 1px solid var(--c-border); border-radius: var(--r); overflow: hidden; }
#bulletin-board-page .bulletin-board-editor-fields > textarea { min-height: 280px; }
#bulletin-board-page .bulletin-board-editor-form > .attachment-editor { border-radius: var(--r); }
#bulletin-board-page .bulletin-board-editor-actions { margin: 0; }
#bulletin-board-page .bulletin-board-status { margin: 0 0 10px; color: var(--c-text-sub); }
@container (max-width: 1000px) { #bulletin-board-page .bulletin-board-workbench { grid-template-columns: minmax(0,1fr); } }
.v2-workspace :is(.split, .split-even, .md-split, .dash-main, .dash-side, .chart-area, .dash-cols) > .panel { margin: 0; }
#bulletin-board-page .bulletin-board-editor-head { flex-wrap: wrap; gap: 8px; }
#bulletin-board-page .panel-note { color: var(--c-text-sub); font-size: 12px; }
#bulletin-board-page .bulletin-board-status:empty { display: none; }
#bulletin-board-page .bulletin-board-workbench { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
#bulletin-board-page .bulletin-board-status { background: var(--v2-panel-alt); border-color: var(--c-border); }
.v2-workspace .v2-grid-footer, #bulletin-board-page .bulletin-board-list-actions { border-radius: 0 0 var(--r-card) var(--r-card); }
@container (max-width: 1000px) { #bulletin-board-page .bulletin-board-workbench { grid-template-columns: minmax(0,1fr); } }
.v2-workspace .common-code-master-row > .panel,
.v2-workspace .authorization-role-detail > form > .panel { margin-top: 0; }
/* Empty result sets should not reserve a viewport-sized block. */
.v2-workspace .grid-wrap:has(tbody > .grid-empty:only-child),
.v2-workspace .grid-scroll:has(tbody > .grid-empty:only-child) { min-height: 0 !important; }
.v2-workspace .pagination { border-radius: 0 0 var(--r-card) var(--r-card); }
/* Preserve HTML visibility contracts even when a component sets display:flex. */
.v2-workspace [hidden] { display: none !important; }
#bulletin-board-page .attachment-item,
#bulletin-board-page .attachment-detail-item { background: var(--v2-panel); color: var(--c-text); }
.board-open-preference { display: flex; align-items: center; gap: 8px; margin-left: auto; font-size: 12px; color: var(--c-text-sub); }
.board-open-preference .form-select { width: 180px; }
#bulletin-board-page[data-open-mode='popup'] .bulletin-board-workbench { grid-template-columns: minmax(0,1fr); }
#bulletin-board-page[data-open-mode='popup'] .bulletin-board-workbench > .md-right { display: none; }
#bulletin-board-page.board-popup-open { overflow: hidden; }
#bulletin-board-page .board-dialog { padding: 0; width: min(1000px,calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; border: 1px solid var(--c-border); border-radius: var(--r-card); background: var(--v2-panel); color: var(--c-text); box-shadow: 0 20px 60px #0005; }
.board-dialog::backdrop { background: rgb(15 23 42 / 48%); }
.board-dialog-head { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; background: var(--v2-panel-alt); border-bottom: 1px solid var(--c-border); }
.board-dialog-head h2 { font-size: 16px; margin: 0; }
#bulletin-board-dialog-body > .panel { border: 0; border-radius: 0; margin: 0; box-shadow: none; }
#bulletin-board-dialog-body > .bulletin-board-status { margin: 0; padding: 8px 16px; }
#bulletin-board-dialog-body .bulletin-board-editor-head { display: none; }
@media (max-width:700px) { .board-open-preference { margin-left: 0; flex-wrap: wrap; } }

/* The expanded navigation follows V2: full width immediately below the header. */
.v2-expanded-menu { position:fixed; inset:44px 0 0; z-index:1200; }
.v2-expanded-menu[hidden] { display:none; }
.v2-expanded-backdrop { position:absolute; inset:0; width:100%; height:100%; border:0; background:rgb(15 23 42 / 22%); font-size:0; }
.v2-expanded-panel { position:relative; max-height:calc(100dvh - 68px); overflow:auto; background:var(--v2-panel); border-bottom:1px solid var(--c-border); border-radius:0 0 12px 12px; box-shadow:0 12px 30px #0003; }
.v2-expanded-panel .v2-menu-groups { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:20px; padding:20px 24px 24px; }
.v2-expanded-panel .v2-menu-group { border:0; padding:0; }
.v2-expanded-panel h3 { padding:0 10px 10px; border-bottom:1px solid var(--c-border); }
.v2-expanded-panel .v2-menu-link { display:block; padding:9px 10px; }
.v2-menu-link[aria-current=page] { color:var(--c-primary); background:var(--v2-panel-alt); font-weight:600; }
[data-menu-mode=sidebar] .v2-expanded-menu { display:none; }
/* One presentation option for all registered master/detail screens. */
html:not([data-detail-mode=inline]) [data-detail-surface]:not(.detail-presented) { display:none!important; }
html:not([data-detail-mode=inline]) :is(.managed-file-workbench,.common-code-workbench,.menu-workbench,.email-template-workbench) { grid-template-columns:minmax(0,1fr)!important; gap:0!important; }
.detail-presentation-dialog { width:min(1120px,calc(100vw - 32px)); max-width:none; max-height:calc(100dvh - 32px); margin:auto; padding:0; border:1px solid var(--c-border); border-radius:12px; background:var(--v2-panel); color:var(--c-text); overflow:auto; box-shadow:0 20px 60px #0004; }
.detail-presentation-dialog::backdrop { background:rgb(15 23 42 / 45%); }
.detail-presentation-head { position:sticky; top:0; z-index:4; display:flex; align-items:center; justify-content:space-between; padding:12px 16px; background:var(--v2-panel-alt); border-bottom:1px solid var(--c-border); }
.detail-presentation-head h2 { font-size:15px; margin:0; }
.detail-presentation-dialog [data-detail-surface].detail-presented { position:static!important; display:block!important; width:100%!important; max-width:none!important; height:auto!important; min-height:0!important; max-height:none!important; margin:0!important; border:0; border-radius:0; box-shadow:none; overflow:visible; transform:none; visibility:visible; }
.detail-presentation-dialog :is(.user-inspector-content,.user-inspector-body,.operational-log-detail-body,.menu-detail-body,.email-template-editor-body,.common-code-editor-body) { max-height:none!important; overflow:visible; }
.detail-presentation-dialog [data-menu-detail-close] { display:none; }
.detail-presentation-dialog .authorization-role-detail { padding:16px; }
.detail-presentation-dialog .permission-catalog-region { max-height:45vh; overflow:auto; }
.detail-presentation-dialog :is(.menu-detail-head,.email-template-editor-head,.common-code-editor-head,.operational-log-detail-head) { display:none; }
.detail-presentation-dialog :is(.menu-detail-actions,.email-template-editor-actions,.common-code-editor-actions,.operational-log-detail-foot) { position:sticky; bottom:0; z-index:2; }
.detail-window-loading body > :not(.detail-window-notice):not(.detail-window-content):not(script):not(.modal-backdrop):not(.toast-container) { display:none!important; }
.detail-window-content { position:fixed!important; inset:0!important; width:100%!important; max-width:none!important; height:100dvh!important; max-height:100dvh!important; border:0!important; border-radius:0!important; margin:0!important; }
.detail-window-notice { padding:24px; }
.board-open-preference { display:none!important; }
[data-detail-mode=inline] #file-management-detail { position:static; width:100%; max-width:none; height:auto; margin-top:12px; }
@media(max-width:600px) { .detail-presentation-dialog { width:calc(100vw - 16px); max-height:calc(100dvh - 16px); } .v2-expanded-panel .v2-menu-groups { grid-template-columns:repeat(2,minmax(0,1fr)); padding:12px; gap:12px; } }
#organization-management-page .organization-workbench { display:grid; grid-template-columns:minmax(240px, 1fr) minmax(0, 2fr); align-items:start; gap:16px; }
#employee-list td:last-child { overflow-wrap:anywhere; }
#employee-list td:last-child button { display:block; margin-top:6px; }
@media(max-width:800px) { #organization-management-page .organization-workbench { grid-template-columns:minmax(0,1fr); } }
#organization-management-page .organization-related { display:block; }
#organization-detail-panel #organization-unit-detail-form { border:0; margin:0; padding:0; }
#organization-create-panel { margin:12px 0; }
.detail-presentation-dialog [data-detail-surface].detail-presented { opacity:1!important; transition:none!important; }
#v2-options { position:fixed; inset:60px 16px auto auto; margin:0; width:min(360px,calc(100vw - 32px)); max-height:calc(100dvh - 80px); z-index:1300; }
#v2-options .v2-options-body { display:block; padding:12px; }
#v2-options .v2-setting { margin-bottom:12px; }

/* Header geometry and branding match the reference shell, with existing actions retained. */
.hd .hd-top { min-height:44px; height:44px; padding:0 12px 0 0; gap:0; flex-wrap:nowrap; }
.hd .hd-brand { display:flex; align-items:center; flex:0 0 220px; height:44px; gap:10px; padding:0 16px; border-right:1px solid rgb(127 149 183 / 30%); }
.v2-brand-mark { display:inline-flex; align-items:center; justify-content:center; width:26px; height:26px; flex:none; background:rgb(127 149 183 / 25%); border:1px solid rgb(127 149 183 / 35%); border-radius:3px; font-size:10px; font-weight:700; color:var(--v2-header-text); }
.v2-brand-copy { display:flex; flex-direction:column; line-height:1.1; white-space:nowrap; }
.v2-brand-copy strong { font-size:13px; letter-spacing:.02em; }
.v2-brand-copy > span { font-size:9px; letter-spacing:.1em; color:var(--v2-header-muted); }
.hd .v2-header-tools { height:44px; padding:0 12px; gap:4px; }
.hd .v2-header-button, .hd .v2-header-search, .hd .hd-menu-toggle { display:inline-flex; align-items:center; justify-content:center; gap:6px; height:30px; padding:0 7px; font-size:12px; }
.hd .v2-header-icon { display:inline-flex; flex:0 0 16px; width:16px; height:16px; }
.v2-header-icon svg { width:100%; height:100%; }
.hd .v2-icon-only, .hd .hd-menu-toggle { width:30px; flex:0 0 30px; padding:0; }
.hd .v2-header-search { justify-content:flex-start; width:320px; max-width:320px; min-width:100px; }
.v2-header-search .v2-header-label { overflow:hidden; text-overflow:ellipsis; }
.hd .hd-util { gap:2px; flex-wrap:nowrap; width:auto; margin-left:auto; }
.hd #v2-user-menu { display:inline-flex; max-width:180px; gap:7px; border-left:1px solid rgb(127 149 183 / 30%); border-radius:0; margin-left:8px; padding-left:12px; }
.v2-user-avatar { display:inline-flex; align-items:center; justify-content:center; width:24px; height:24px; flex:none; border-radius:50%; background:#3563b3; color:#fff; font-size:10px; }
.v2-user-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.v2-profile-locale { display:flex; align-items:center; gap:12px; margin-top:16px; }
.v2-profile-locale select { padding:5px; color:var(--c-text); background:var(--v2-panel); border:1px solid var(--c-border); border-radius:4px; }
.hd [aria-label]:focus-visible { outline:2px solid var(--v2-header-text); outline-offset:1px; }
html[data-menu-mode=expanded] .hd .hd-menu-toggle { display:none; }
html[data-menu-mode=sidebar] .hd #v2-all-menu-toggle { display:none; }
/* Hover/focus applies to the whole favorite row, including its action buttons. */
#mg-sidebar .favorite-item:hover, #mg-sidebar .favorite-item:focus-within { background:var(--v2-sidebar-hover); color:var(--v2-sidebar-text); }
#mg-sidebar .favorite-item .favorite-link:hover, #mg-sidebar .favorite-item .favorite-link:focus-visible { background:transparent; color:var(--v2-sidebar-text); }
#mg-sidebar .favorite-action:hover:not(:disabled), #mg-sidebar .favorite-action:focus-visible { background:var(--v2-sidebar-active); color:var(--v2-selected-text); }
#mg-sidebar .favorite-action:focus-visible { outline:2px solid var(--v2-sidebar-text); outline-offset:-2px; }
/* MDI state colors are independent from Shell style so all six combinations remain legible. */
.mdi-tab-strip { --mdi-active-bg:#fff; --mdi-active-fg:#1a3d7c; --mdi-hover-bg:#e8eef7; --mdi-hover-fg:#1a3d7c; }
:root[data-theme=dark] .mdi-tab-strip { --mdi-active-bg:#3563b3; --mdi-active-fg:#fff; --mdi-hover-bg:#444e60; --mdi-hover-fg:#fff; }
.mdi-tab-strip .mdi-tab { color:var(--c-text); background:var(--v2-panel); border-color:var(--c-border); }
.mdi-tab-strip .mdi-tab:hover { color:var(--mdi-hover-fg); background:var(--mdi-hover-bg); }
.mdi-tab-strip .mdi-tab.is-active { color:var(--mdi-active-fg); background:var(--mdi-active-bg); border-top:2px solid var(--mdi-active-fg); border-bottom-color:var(--mdi-active-bg); }
.mdi-tab-strip .mdi-tab.is-active .mdi-tab-close { color:inherit; }
.mdi-tab-strip .mdi-tab-close:hover { color:var(--c-text); background:var(--v2-hover); }
.mdi-tab-strip .mdi-icon-btn:hover, .mdi-tab-strip .mdi-text-btn:hover { color:var(--mdi-hover-fg); background:var(--mdi-hover-bg); }
.mdi-tab-strip :is(.mdi-tab,.mdi-icon-btn,.mdi-text-btn):focus-visible { outline-color:var(--mdi-active-fg); }
@media(max-width:1200px) { .hd .hd-brand { flex-basis:200px; padding:0 12px; } .hd .v2-header-tools { padding:0 6px; } .hd .v2-header-search { max-width:200px; } .hd #v2-user-menu { max-width:120px; } }
@media(max-width:1000px) { .hd .hd-top { height:auto; flex-wrap:wrap; } .hd .hd-util { height:36px; } .hd .v2-header-tools { flex:1 1 450px; } }
@media(max-width:600px) { .hd .hd-top { padding-right:6px; } .hd .hd-brand { flex:1 1 100%; border:0; } .hd .v2-header-tools { flex-basis:100%; padding:0 6px; height:36px; } .hd .v2-header-button { font-size:11px; padding:0 4px; } .hd .hd-util { width:100%; justify-content:flex-end; } .hd .v2-header-search { flex:1; min-width:40px; } }

/* Per-menu presentation overrides preserve the global default. */
.menu-detail-setting { display:flex; align-items:center; gap:8px; margin-left:auto; font-size:12px; white-space:nowrap; }
.menu-detail-setting .form-select { width:auto; min-width:150px; }
[data-detail-always-layer]:not(.detail-presented) { display:none!important; }
#organization-detail-workspace { min-width:0; }
#organization-detail-workspace .workspace-switcher { margin-top:12px; }
#organization-detail-workspace .panel { margin-bottom:12px; }
@media(max-width:600px) { .menu-detail-setting { width:100%; margin:8px 0 0; flex-wrap:wrap; } }

/* Registration stays in a compact layer, independently of detail display preferences. */
.registration-dialog { width:min(640px, calc(100vw - 32px)); }
.registration-dialog .filter-bar { display:flex; flex-wrap:wrap; gap:16px; }
.registration-dialog .filter-bar > .v2-field,
.registration-dialog .filter-bar > label { width:100%; min-width:0; }
.registration-dialog .filter-bar input,
.registration-dialog .filter-bar select { width:100%; box-sizing:border-box; }

/* Selection and action controls remain distinct, with visible keyboard focus. */
.v2-workspace tr[data-selectable=true]:not([data-selection-disabled=true]) { cursor:pointer; }
.v2-workspace tr[data-selectable=true]:hover:not([data-selection-disabled=true]) > td { background:var(--c-row-selected); }
.v2-workspace tr[data-selectable=true]:focus-visible { outline:2px solid var(--c-primary); outline-offset:-2px; }
.registration-dialog .filter-bar > .v2-field, .registration-dialog .filter-bar > label { flex-basis:100%; max-width:none; }
#bulletin-board-page .bulletin-board-editor-fields { display:flex; flex-direction:column; gap:8px; border:0; overflow:visible; }
#bulletin-board-page .bulletin-board-editor-fields > label { padding:0; background:none; border:0; }
#bulletin-board-page .bulletin-board-editor-fields > :is(input, textarea) { width:100%; max-width:none; box-sizing:border-box; border:1px solid var(--c-border); border-radius:var(--r); margin-bottom:12px; }
#bulletin-board-page .bulletin-board-editor-fields > :is(input, textarea):focus-visible { outline:2px solid var(--c-primary); outline-offset:1px; }
#mg-favorites .favorite-item { display:flex; align-items:center; min-width:0; }
#mg-favorites .favorite-link { flex:1 1 0; min-width:0; white-space:normal; overflow-wrap:anywhere; }
#mg-favorites .favorite-actions { flex:0 0 auto; display:flex; }

/* These workspaces retain the selected item beside their list, without moving it into a dialog. */
#user-management-page.user-sample-page .user-workbench, #authorization-management-page .authorization-role-workbench,
#authorization-management-page .user-role-workspace, #session-management-page .session-workbench {
  display:grid; grid-template-columns:minmax(280px, .8fr) minmax(0, 1.2fr); height:auto; min-height:0; gap:16px; align-items:start;
}
#session-management-page .session-workbench { grid-template-columns:minmax(220px,.55fr) minmax(0,1.45fr); }
#user-management-page.user-sample-page .user-inspector, #session-management-page .session-list-panel { height:auto; overflow:visible; }
#authorization-management-page .authorization-role-detail > form { height:auto; }
#authorization-management-page .authorization-role-list-panel table.grid,
#user-management-page .user-list-panel table.grid { min-width:0; width:100%; table-layout:fixed; }
@container(max-width:1000px) {
 #user-management-page.user-sample-page .user-workbench, #authorization-management-page .authorization-role-workbench,
 #authorization-management-page .user-role-workspace, #session-management-page .session-workbench { grid-template-columns:minmax(0,1fr); }
}

#user-management-page.user-sample-page .user-inspector-body { overflow:visible; }
#user-management-page .user-inspector-content { display:grid; gap:16px; }
#user-management-page .user-inspector-content[hidden] { display:none; }
#user-management-page .user-inspector-section { margin:0; padding:16px; border:1px solid var(--c-border); border-radius:var(--r-card); }
#user-management-page .user-account-form { display:grid; grid-template-columns:minmax(0,1fr) minmax(100px,.6fr); gap:12px; }
#user-management-page .user-account-form .user-inspector-actions { grid-column:1/-1; }
#user-management-page .user-inspector-details dd { overflow-wrap:anywhere; }
#user-registration .user-create-fields { display:grid; gap:16px; }
#user-registration .panel-foot { display:flex; justify-content:flex-end; gap:8px; padding:16px; }
[data-detail-mode=inline] #lending-detail-panel { scroll-margin-top:24px; }

#authorization-management-page .permission-catalog-region { max-height:520px; }

.user-picker-results { margin-top:10px; }
.user-picker-results .grid-wrap { max-height:280px; overflow:auto; }
.user-picker-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:8px 0; }
.user-picker-grid { width:100%; min-width:0!important; table-layout:fixed; }
.user-picker-grid td { overflow-wrap:anywhere; white-space:normal; }
.detail-presentation-dialog:has(#operational-log-detail), .detail-presentation-dialog:has(#file-management-detail) { width:min(920px,calc(100vw - 32px)); }
.detail-presentation-dialog .detail-grid { display:grid; grid-template-columns:minmax(100px,140px) minmax(0,1fr); gap:0; margin:0 0 20px; }
.detail-presentation-dialog .detail-grid dt, .detail-presentation-dialog .detail-grid dd { margin:0; padding:10px 12px; border-bottom:1px solid var(--c-border); overflow-wrap:anywhere; }
.detail-presentation-dialog .detail-grid dt { background:var(--v2-panel-alt); font-weight:500; }
.diagnostic-section { margin:12px 0; border:1px solid var(--c-border); border-radius:var(--r-card); padding:12px; }
.diagnostic-section summary { cursor:pointer; font-weight:600; }
.diagnostic-section pre { white-space:pre-wrap; overflow-wrap:anywhere; max-height:360px; overflow:auto; }
.detail-presentation-dialog .operational-log-detail-foot { background:var(--v2-panel); border-top:1px solid var(--c-border); padding:12px 16px; }

/* Inline details remain in document flow; dialog details retain a sticky close bar. */
[data-detail-mode=inline] #operational-log-page .operational-log-detail {
  position:static; inset:auto; width:100%; height:auto; max-height:none;
  margin-top:16px; box-shadow:none; animation:none; border:1px solid var(--c-border);
}
[data-detail-mode=inline] .operational-log-detail-body { overflow:visible; }
.v2-workspace .email-template-grid-stack { height:auto; min-height:0; }
.v2-workspace .email-template-grid-panel .grid-scroll { max-height:55dvh; }

.person-selection-dialog { width:min(760px,calc(100vw - 32px)); max-height:80dvh; padding:0; border:1px solid var(--c-border); border-radius:12px; overflow:auto; }
.person-selection-dialog::backdrop { background:rgb(15 23 42 / 45%); }
.person-selection-dialog .owner-reference-control { display:flex; gap:8px; flex-wrap:wrap; }
.person-selection-dialog .owner-reference-control input { flex:1; min-width:160px; }
.person-selection-dialog .owner-reference-control select { width:auto; }
.person-selection-dialog .grid { width:100%; min-width:0!important; table-layout:fixed; }
.person-selection-dialog .grid td { white-space:normal; overflow-wrap:anywhere; }
.person-selection-dialog .grid th { background:#48556a; color:white; }
.person-selection-dialog .grid-wrap { margin-top:12px; }

.tree-parent-dialog { width:min(520px,calc(100vw - 32px)); max-height:85dvh; padding:24px; border:1px solid var(--c-border); border-radius:12px; background:var(--v2-panel); color:var(--c-text); }
.tree-parent-dialog::backdrop { background:rgb(15 23 42 / 45%); }
.tree-parent-dialog h2 { font-size:18px; margin:0 0 12px; }
.tree-parent-dialog p { line-height:1.6; }
.tree-parent-dialog label { display:block; margin-top:20px; }
.tree-parent-dialog select { margin-top:8px; width:100%; }
.tree-parent-preview { padding:12px; background:var(--v2-panel-alt); border-radius:6px; }
.tree-parent-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:20px; }

/* List and detail share available width; each keeps its own scroll position. */
.split-detail-workbench { min-width:0; }
[data-detail-mode=inline] .split-detail-workbench:has(> [data-detail-surface]:not([hidden])) {
  display:grid; grid-template-columns:minmax(0,1fr) minmax(340px,1fr); gap:16px;
  height:clamp(360px,65dvh,900px); align-items:stretch;
}
[data-detail-mode=inline] .split-detail-workbench > .panel { min-width:0; min-height:0; margin:0; overflow:auto; }
[data-detail-mode=inline] .split-detail-workbench > [data-detail-surface]:not([hidden]) {
  position:static!important; inset:auto!important; display:flex!important; flex-direction:column;
  width:auto!important; height:100%!important; min-width:0; min-height:0; margin:0!important; overflow:hidden;
}
[data-detail-mode=inline] .split-detail-workbench .operational-log-detail-body { overflow:auto; min-height:0; flex:1; }
.split-detail-workbench .operational-log-detail-head, .split-detail-workbench .operational-log-detail-foot { flex-shrink:0; }
.split-detail-workbench pre { white-space:pre-wrap; overflow-wrap:anywhere; }
/* Fixed column widths and long unbroken content must not enlarge the page. */
#email-template-management-page { min-width:0; }
#email-template-management-page .email-template-workbench { min-width:0; align-items:start; }
#email-template-management-page .email-template-list-region { min-width:0; max-height:60dvh; overflow:auto; }
#email-template-management-page .email-template-list-region .grid { width:100%; min-width:0; table-layout:fixed; }
#email-template-management-page .email-template-list-region :is(td,th) { white-space:normal; overflow-wrap:anywhere; }
#email-template-management-page .email-template-editor-form { min-height:0; }
#email-template-management-page .email-template-editor-drawer { min-width:0; min-height:0; height:auto; max-height:65dvh; overflow:auto; }
#email-template-management-page .email-template-editor-drawer[aria-hidden=true] { display:none; }
.email-template-editor-body { overflow-wrap:anywhere; }
@media(max-width:760px) {
  [data-detail-mode=inline] .split-detail-workbench:has(> [data-detail-surface]:not([hidden])) { grid-template-columns:minmax(0,1fr); height:auto; }
  [data-detail-mode=inline] .split-detail-workbench > [data-detail-surface]:not([hidden]) { height:65dvh!important; }
}

/* Compact editing also applies when the common presenter moves the surface into a dialog. */
#email-template-editor-drawer .email-template-editor-form { min-height:0; }
#email-template-editor-drawer .email-template-editor-fields { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:10px; }
#email-template-editor-drawer .email-template-editor-field { grid-column:1/-1; }
#email-template-detail-form .email-template-editor-field:nth-child(-n+2) { grid-column:auto; }
#email-template-editor-drawer textarea { min-height:90px; max-height:30dvh; resize:vertical; }
#email-template-editor-drawer .email-template-editor-actions { position:sticky; bottom:0; z-index:2; }
#email-template-editor-drawer .email-template-editor-head { position:sticky; top:0; z-index:3; }
#email-template-editor-drawer .email-template-send-panel > summary { padding:12px; cursor:pointer; font-weight:600; border-top:1px solid var(--c-border); }
#email-template-editor-drawer #email-template-variables { min-height:0; padding:6px 0; }
#email-template-editor-drawer .email-template-editor-field .form-control { width:100%; min-width:0; box-sizing:border-box; }

/* Filters wrap by available space; long diagnostic values stay inside their own region. */
#operational-log-page { min-width:0; }
#operational-log-page .operational-log-list-panel { min-width:0; display:flex; flex-direction:column; overflow:hidden; }
#operational-log-page .operational-log-list-panel > .panel-body { min-width:0; min-height:0; display:flex; flex-direction:column; flex:1; }
#operational-log-page .operational-log-grid-wrap { min-width:0; min-height:0; max-height:55dvh; overflow:auto; flex:1; }
#operational-log-page .operational-log-list-panel .pagination { flex-shrink:0; flex-wrap:wrap; }
#operational-log-detail :is(.detail-grid, .detail-grid dd, .code-block, .operational-log-timeline-item) { min-width:0; max-width:100%; overflow-wrap:anywhere; box-sizing:border-box; }
#operational-log-detail .detail-grid { display:grid; grid-template-columns:minmax(80px,110px) minmax(0,1fr); }
#operational-log-detail .detail-grid dd { margin:0; }
#operational-log-detail pre { white-space:pre-wrap; }

/* A stable picker footprint avoids jumping from an input-only dialog to a results dialog. */
.people-picker .people-picker-content { padding:16px; }
.people-picker-search { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; }
.people-picker-search label { grid-column:1/-1; font-size:12px; color:var(--c-text-sub); }
.people-picker-search input { min-width:0; width:100%; }
.people-picker .people-picker-grid-area { height:clamp(180px,32dvh,320px); min-height:180px; }
.people-picker .help-text { min-height:20px; margin:8px 0; }
.people-picker .user-picker-actions { justify-content:center; margin-top:8px; }

/* Preserve reading widths instead of squeezing eleven diagnostic columns equally. */
#operational-log-detail .operational-log-detail-body { padding:20px; }
#operational-log-detail .detail-grid { gap:0; border:1px solid var(--c-border); border-radius:8px; overflow:hidden; }
#operational-log-detail .detail-grid :is(dt,dd) { padding:9px 12px; border-bottom:1px solid var(--c-border); }
#operational-log-detail .detail-grid dt { background:var(--v2-panel-alt); font-weight:500; }
#operational-log-detail .code-block { padding:12px; border:1px solid var(--c-border); border-radius:8px; background:var(--v2-panel-alt); font-size:12px; line-height:1.6; }
#email-template-editor-drawer textarea { min-height:180px; height:24dvh; max-height:45dvh; }
#email-template-editor-drawer .email-template-editor-body { padding:20px; }
#email-template-editor-drawer .email-template-editor-fields { gap:14px; }
#email-template-editor-drawer .email-template-editor-field { gap:7px; font-weight:500; }
#email-template-editor-drawer input[readonly] { background:var(--v2-panel-alt); border-color:transparent; }

/* The log screen is a bounded workbench, not an expanding document. */
#operational-log-page { height:calc(100dvh - 32px); box-sizing:border-box; display:flex; flex-direction:column; overflow:hidden; }
#operational-log-page > :is(.crumb,.page-head) { flex-shrink:0; }
#operational-log-page > .split-detail-workbench { flex:1; min-height:0; height:auto!important; display:grid; grid-template-columns:minmax(0,1fr); }
[data-detail-mode=inline] #operational-log-page > .split-detail-workbench:has(> [data-detail-surface]:not([hidden])) { grid-template-columns:minmax(0,1.15fr) minmax(360px,1fr); }
#operational-log-page .operational-log-list-panel { margin:0; height:100%; min-height:0; }
#operational-log-page .operational-log-grid-wrap { max-height:none; min-height:0; }
#operational-log-page .operational-log-detail-head { min-height:0; padding:12px 16px; }
#operational-log-page .operational-log-detail-head h2 { font-size:16px; }
#operational-log-page .operational-log-detail-kicker { display:none; }
#operational-log-page .operational-log-detail-body { min-height:0; overflow:auto; }
#operational-log-detail .detail-grid dt { white-space:normal; }
@media(max-width:760px) {
  [data-detail-mode=inline] #operational-log-page > .split-detail-workbench:has(> [data-detail-surface]:not([hidden])) { grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr) minmax(0,1fr); }
  [data-detail-mode=inline] #operational-log-page .split-detail-workbench > [data-detail-surface]:not([hidden]) { height:100%!important; }
}

/* Give template editing a full card with a deliberate metadata/content hierarchy. */
#email-template-management-page .email-template-workbench.is-editor-open { grid-template-columns:minmax(300px,1fr) minmax(440px,1.15fr); }
#email-template-management-page #email-template-editor-drawer[aria-hidden=false],
.detail-presentation-dialog #email-template-editor-drawer.detail-presented {
  display:flex!important; flex-direction:column; height:72dvh!important; max-height:72dvh!important; min-height:0; overflow:hidden;
}
#email-template-editor-drawer .email-template-editor-form:not([hidden]) { flex:1; min-height:0; overflow:hidden; }
#email-template-editor-drawer .email-template-editor-body { min-height:0; overflow:auto; padding:20px; }
#email-template-detail-form .email-template-editor-body { display:flex; }
#email-template-detail-form .email-template-editor-fields { flex:1; grid-template-rows:auto auto minmax(200px,1fr) auto; align-content:start; }
#email-template-detail-form .email-template-editor-field:first-child { grid-column:1/-1; }
#email-template-detail-form .email-template-editor-field:nth-of-type(2), #email-template-detail-form .email-template-editor-field:nth-of-type(3) { grid-column:auto; }
#email-template-detail-form .email-template-editor-field:has(textarea) textarea { flex:1; height:100%; min-height:180px; max-height:none; resize:vertical; }
#email-template-editor-drawer .email-template-editor-head { flex-shrink:0; padding:14px 20px; }
#email-template-editor-drawer .email-template-editor-kicker { display:none; }
#email-template-editor-drawer .email-template-editor-actions { flex-shrink:0; padding:12px 20px; }
#email-template-editor-drawer .email-template-send-panel { flex-shrink:0; max-height:40dvh; overflow:auto; }
.detail-presentation-dialog:has(#email-template-editor-drawer) { width:min(960px,calc(100vw - 32px)); }
@media(max-width:900px) {
  #email-template-management-page .email-template-workbench.is-editor-open { grid-template-columns:minmax(0,1fr); }
}
/* Split mode keeps every column inside a horizontally scrollable list. */
.detail-presentation-dialog #email-template-editor-drawer .email-template-editor-body { overflow:auto!important; min-height:0; }

/* Compact filters leave the work area to the list; advanced values survive folding. */
#operational-log-advanced-count { color:var(--c-text-sub); }
#operational-log-page .operational-log-grid-wrap { overflow:auto; }
#operational-log-detail .detail-grid dt, #operational-log-detail .detail-grid dd { margin:0; align-self:stretch; }

/* Shared list behavior for the Board, Batch, Email history and Common Code workspaces. */
:is(#bulletin-board-page, #batch-job-page, #email-send-log-page, #common-code-management-page) .panel { min-width:0; }
:is(#bulletin-board-page, #batch-job-page, #email-send-log-page, #common-code-management-page) :is(.grid-scroll, .grid-wrap) { min-width:0; overflow:auto; overscroll-behavior:contain; }
:is(#bulletin-board-page, #batch-job-page, #email-send-log-page, #common-code-management-page) .panel-head { flex-wrap:wrap; gap:8px; }
:is(#bulletin-board-page, #batch-job-page, #email-send-log-page, #common-code-management-page) .p-tools { margin-left:auto; display:flex; align-items:center; gap:8px; }
:is(#bulletin-board-page, #batch-job-page, #email-send-log-page, #common-code-management-page) .grid-empty td { padding:24px 12px; text-align:center; color:var(--c-text-sub); }
#batch-job-page #batch-detail-stack > .panel-head { position:sticky; top:0; z-index:2; background:var(--v2-panel); }
#batch-job-page details > summary { cursor:pointer; }
#bulletin-board-page[data-detail-closed=true] .bulletin-board-workbench { grid-template-columns:minmax(0,1fr); }
#bulletin-board-page[data-detail-closed=true] .bulletin-board-workbench > .md-right { display:none; }
#bulletin-board-page .bulletin-board-detail-content { max-height:65dvh; overflow:auto; }
#email-send-log-page .email-send-log-search-bar table.search-tbl { min-width:0; width:100%; }
#email-send-log-page .search-tbl :is(input, select) { min-width:0; max-width:100%; }
@media (max-width:800px) {
  #email-send-log-page .search-tbl :is(tbody, tr, th, td) { display:block; width:100%; box-sizing:border-box; }
  #email-send-log-page .search-tbl colgroup { display:none; }
}

#member-profile-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
#member-profile-form > :is(label:last-of-type, p, .page-actions) { grid-column:1 / -1; }
#member-profile-form label { display:flex; flex-direction:column; gap:6px; }

/* 알림 목록은 Shell 대화상자 안에서만 스크롤한다. */
.notification-inbox { max-height: min(65vh, 38rem); overflow-y: auto; }
.notification-inbox-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.notification-inbox ul { list-style: none; padding: 0; margin: 0; }
.notification-inbox li { padding: 1rem 0; border-bottom: 1px solid #d7deea; overflow-wrap: anywhere; }
.notification-inbox li p { white-space: pre-wrap; }
.notification-inbox li button { display: block; margin-top: .5rem; }
#v2-notifications[data-unread]:not([data-unread=""])::after { content: attr(data-unread); font-size: .7rem; background: #b42318; color: white; border-radius: 1rem; padding: 0 .35rem; }

/* 알림함: 수신 설정과 목록을 구분하고 좁은 화면에서도 버튼을 줄바꿈한다. */
#v2-notifications-panel { width: min(36rem, calc(100vw - 2rem)); }
.notification-inbox { padding: 1rem; display: flex; flex-direction: column; gap: .75rem; }
.notification-push-controls { display: flex; flex-wrap: wrap; gap: .5rem; padding: .85rem; border: 1px solid #d7deea; border-radius: .6rem; background: #f6f8fc; }
.notification-push-status { flex-basis: 100%; margin: .2rem 0 0; font-size: .8rem; color: #526078; line-height: 1.5; }
.notification-inbox button { padding: .4rem .7rem; border: 1px solid #c9d3e3; border-radius: .4rem; background: #fff; color: #243b63; font: inherit; font-size: .8rem; cursor: pointer; }
.notification-inbox button:hover { background: #eaf0fa; }
.notification-inbox button:focus-visible { outline: 2px solid #2855a0; outline-offset: 2px; }
.notification-inbox button:disabled { opacity: .55; cursor: default; }
.notification-inbox-toolbar { padding: .25rem 0; font-weight: 600; }
.notification-inbox > p { margin: 0; color: #607087; line-height: 1.5; }
.notification-inbox > p:empty { display: none; }
.notification-inbox li.notification-item { margin-bottom: .5rem; padding: .9rem 1rem; border: 1px solid #e0e5ee; border-radius: .6rem; background: #fff; }
.notification-inbox li.is-unread { border-left: 3px solid #2855a0; background: #f3f7ff; }
.notification-inbox li strong { display: block; color: #25364c; font-size: .95rem; }
.notification-inbox li p { margin: .4rem 0 .65rem; line-height: 1.55; color: #44536a; }
.notification-inbox li small { color: #6b778b; font-size: .75rem; }

/* Menu movement: insertion lines differ from the highlighted child destination. */
.menu-move-feedback { margin:0; padding:8px 12px; min-height:2.5em; }


/* One row-wide insertion line; “after” is anchored below the visible subtree. */
.organization-tree-row { position:relative; }
[data-drop-line]::after { content:""; position:absolute; left:0; right:0; height:3px; background:var(--c-primary); z-index:5; pointer-events:none; }
[data-drop-line]::before { content:""; position:absolute; left:0; width:9px; height:9px; border-radius:50%; background:var(--c-primary); z-index:6; pointer-events:none; transform:translate(-35%,-3px); }
[data-drop-line=before]::before, [data-drop-line=before]::after { top:0; }
[data-drop-line=after]::before, [data-drop-line=after]::after { bottom:0; }
[data-drop-line=after]::before { transform:translate(-35%,3px); }
.organization-tree-row[data-drop-position=child], .organization-tree-row[data-drop-position=child] > button { background:color-mix(in srgb,var(--c-primary) 22%,var(--v2-panel)); border-radius:6px; }
[data-drop-position=child]::after { content:"↳ 하위로 이동"; position:absolute; left:8px; top:50%; transform:translateY(-50%); max-width:75%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:4px 10px; border-radius:6px; color:white; background:var(--c-primary); pointer-events:none; z-index:5; }

.tree-drag-ghost { position:fixed; left:-10000px; top:0; width:max-content; max-width:220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:6px 10px; border-radius:6px; background:var(--c-primary,#214881); color:white; font:13px/1.4 sans-serif; pointer-events:none; }
