/* 用户中心的布局与颜色 */
:root {
  color-scheme: light;
  --bg: #f8f9fb; --card: #fff; --text: #181c26; --muted: #626c7a; --border: #e4e6eb;
  --soft: #f3f4f6; --primary: #2563eb; --primary-dark: #174bc2; --primary-soft: #edf4ff;
  --line: #eff0f2; --ok-bg: #dcf8e9; --ok-fg: #147044; --warn-bg: #fff2df; --warn-fg: #87500a;
  --bad-bg: #ffe5e7; --bad-fg: #a72538; --ink-blue: #245ad1; --hero: #eef5ff;
  --auth-bg: radial-gradient(ellipse at 29% 4%, #dceaff 0, transparent 51%), linear-gradient(145deg,#f3f7fd,#e8eff8 70%,#e2edfc);
  --shadow: 0 1px 3px rgb(21 34 56 / 4%); --shadow-lg: 0 6px 22px rgb(21 34 56 / 7%);
  --rail: clamp(208px,15vw,282px); --bar: 66px; --pad: clamp(22px,4.6vw,90px);
  --font: -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",Arial,sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101419; --card: #191e25; --text: #e7ebf2; --muted: #a5afbd; --border: #343b46;
  --soft: #242b34; --primary: #3878f3; --primary-dark: #2866da; --primary-soft: #202f4a;
  --line: #2c333d; --ok-bg: #173a2d; --ok-fg: #92e5b7; --warn-bg: #41321d; --warn-fg: #ffd08d;
  --bad-bg: #44252d; --bad-fg: #ffa8af; --ink-blue: #90b6ff; --hero: #202f48;
  --auth-bg: radial-gradient(ellipse at 32% 0,#243659,transparent 58%),#121a26;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar) + 20px); }
body { margin: 0; font: 15px/1.55 var(--font); color: var(--text); }
button, input { font: inherit; }
a { color: var(--ink-blue); text-decoration: none; }
button, summary { cursor: pointer; }
:where(a,button,summary,input,[tabindex="0"]):focus-visible { outline: 3px solid #749fff; outline-offset: 3px; }
.ui-icon { width: 19px; height: 19px; flex: 0 0 auto; vertical-align: middle; }
.center-shell { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.ui-bar { position: sticky; inset-block-start: 0; height: var(--bar); z-index: 30; display: flex; flex: 0 0 auto; align-items: center; gap: 12px; padding: 0 clamp(16px,2.2vw,46px); border-bottom: 1px solid var(--border); background: var(--card); }
.ui-brand, .ui-tools, .ui-user summary, .ui-btn, .ui-tool, .cell-icon, .status-pill { display: inline-flex; align-items: center; }
.ui-brand { gap: 10px; color: var(--text); white-space: nowrap; }
.ui-brand:hover { color: var(--text); }
.ui-brand img { width: 32px; height: 32px; border-radius: 9px; }
.ui-brand strong { font-size: 16px; letter-spacing: .015em; }
.ui-brand span { color: var(--muted); font-size: 12px; }
.ui-tools { margin-inline-start: auto; gap: 16px; }
.ui-tool { border: 1px solid var(--border); background: var(--card); color: var(--muted); width: 36px; height: 36px; border-radius: 11px; justify-content: center; padding: 0; }
.ui-tool:hover, .app-open:hover { background: var(--soft); color: var(--text); }
.ui-theme .ui-icon:nth-child(2), [data-theme="dark"] .ui-theme .ui-icon:first-child { display: none; }
[data-theme="dark"] .ui-theme .ui-icon:nth-child(2) { display: block; }
.ui-user { position: relative; }
.ui-user summary { gap: 9px; color: var(--text); }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
.ui-user img,.signed-user img { width: 34px; height: 34px; border-radius: 50%; background: var(--soft); object-fit: cover; }
.ui-user b, .ui-user small, .directory-name b, .directory-name small { display: block; max-width: 21ch; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ui-user b { font-size: 13px; }
.ui-user small, .directory-name small { font-size: 12px; color: var(--muted); }
.ui-user summary > svg { width: 14px; }
.ui-user > div { position: absolute; right: 0; top: calc(100% + 12px); width: 165px; padding: 5px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); }
.ui-user > div a { display: block; padding: 8px 12px; border-radius: 7px; color: var(--text); font-size: 14px; }
.ui-user > div a:hover { background: var(--soft); }
.ui-rail { position: fixed; inset: var(--bar) auto 0 0; width: var(--rail); background: var(--card); border-right: 1px solid var(--border); padding: 20px 16px; overflow-y: auto; z-index: 25; }
.ui-rail nav { display: grid; gap: 4px; }
.ui-rail nav a { padding: 0 15px; min-height: 43px; display: flex; align-items: center; gap: 13px; border-radius: 9px; color: var(--muted); font-size: 14px; font-weight: 500; }
.ui-rail nav a:hover { color: var(--text); background: var(--soft); }
.ui-rail nav a[aria-current] { background: var(--primary-soft); color: var(--ink-blue); font-weight: 600; }
.ui-group-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.ui-group-section h2 { margin: 0 15px 9px; color: var(--muted); font-size: 12px; font-weight: 550; }
.ui-group-section nav a { min-width: 0; }
.ui-group-section nav a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-group-empty { margin: 8px 15px; color: var(--muted); font-size: 13px; }
.ui-menu,.ui-shade { display: none; }
.ui-main,.ui-footer { width: min(calc(100% - var(--rail) - 2 * var(--pad)),1190px); margin-inline-start: calc(var(--rail) + (100% - var(--rail) - min(100% - var(--rail) - 2 * var(--pad),1190px)) / 2); }
.ui-main { padding: 34px 0 48px; display: grid; gap: 20px; align-content: start; }
.ui-heading { margin: 0 0 2px; }
.ui-heading h1 { display: flex; gap: 11px; align-items: center; margin: 0; font-size: clamp(22px,1.45vw,27px); font-weight: 700; letter-spacing: -.035em; line-height: 1.35; }
.ui-heading h1::before { content: ""; width: 5px; height: .93em; border-radius: 3px; background: var(--primary); }
.ui-heading p { margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.ui-panel,.center-shell .acc-box { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: clamp(18px,1.6vw,28px); box-shadow: var(--shadow); min-width: 0; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 19px; }
.panel-heading h2, .center-shell .acc-box-head h2 { font-size: 16px; line-height: 1.4; margin: 0; font-weight: 650; }
.counter,.risk-tag,.status-pill { font-size: 12px; font-weight: 550; width: fit-content; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.counter { background: var(--soft); color: var(--muted); }
.ui-btn,.center-shell .btn,.center-auth .btn { justify-content: center; gap: 8px; border-radius: 9px; border: 1px solid var(--border); padding: 8px 15px; min-height: 38px; color: var(--text); background: var(--card); box-shadow: var(--shadow); text-decoration: none; font-weight: 550; font-size: 14px; }
.ui-btn:hover,.center-shell .btn:hover,.center-auth .btn:hover { color: var(--text); background: var(--soft); transform: none; }
.ui-btn.primary,.center-shell .btn-primary,.center-auth .btn-primary { color: white; border-color: transparent; background: var(--primary); }
.ui-btn.primary:hover,.center-shell .btn-primary:hover,.center-auth .btn-primary:hover { background: var(--primary-dark); color: white; }
.ui-btn.compact,.center-shell .btn-sm { min-height: 32px; font-size: 13px; padding: 5px 12px; }
.ui-btn .ui-icon { width: 15px; height: 15px; }
.ui-empty,.ui-notice { padding: 25px; text-align: center; color: var(--muted); }
.ui-notice { border-radius: 10px; background: var(--bad-bg); color: var(--bad-fg); }
.identity-card { position: relative; overflow: hidden; background: linear-gradient(105deg,var(--card) 15%,var(--hero)); padding: clamp(24px,2.5vw,42px); }
.identity-copy { position: relative; z-index: 2; width: fit-content; max-width: 75%; }
.identity-avatar { width: 46px; height: 46px; border-radius: 13px; object-fit: cover; }
.identity-copy h2 { margin: 12px 0 4px; font-size: clamp(21px,1.9vw,30px); letter-spacing: -.04em; overflow-wrap: anywhere; }
.identity-copy p { margin: 0 0 19px; color: var(--muted); font-size: 14px; }
.identity-art { position: absolute; width: 290px; height: 290px; right: 5%; top: 50%; transform: translateY(-50%); display: grid; place-items: center; color: var(--ink-blue); pointer-events: none; }
.identity-art i { position: absolute; border: 1px solid currentColor; width: 110%; height: 110%; border-radius: 50%; opacity: .1; }
.identity-art i:nth-child(2) { width: 83%; height: 83%; }
.identity-art i:nth-child(3) { width: 57%; height: 57%; }
.identity-art span { display: grid; place-items: center; width: 80px; height: 80px; border-radius: 24px; border: 1px solid var(--border); background: var(--card); box-shadow: 0 8px 30px rgb(35 80 155 / 9%); transform: rotate(-7deg); }
.identity-art svg { width: 42px; height: 42px; }
.app-directory,.quick-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit,minmax(min(100%,230px),1fr)); }
.directory-item,.quick-grid a { position: relative; display: flex; align-items: center; gap: 12px; min-width: 0; padding: 15px; border: 1px solid var(--border); border-radius: 12px; }
.app-mark,.quick-icon,.client-logo { display: grid; place-items: center; flex-shrink: 0; background: var(--primary-soft); color: var(--ink-blue); font-weight: 650; }
.app-mark,.quick-icon { width: 40px; height: 40px; border-radius: 10px; overflow: hidden; }
.app-mark img,.client-logo img { width: 100%; height: 100%; object-fit: contain; }
.directory-name { min-width: 0; }
.directory-name b,.quick-grid b { font-size: 14px; font-weight: 600; color: var(--text); }
.directory-name small { max-width: 100%; }
.app-open,.quick-grid a > svg { margin-left: auto; color: var(--muted); }
.app-open { display: grid; place-items: center; border-radius: 8px; min-width: 30px; min-height: 32px; }
.app-open svg,.quick-grid a > svg { width: 16px; }
.quick-grid small { display: block; font-size: 12px; color: var(--muted); }
.quick-grid a:hover,.directory-item:focus-within { border-color: var(--ink-blue); }
.ui-segment { display: inline-flex; align-items: center; gap: 3px; padding: 4px; background: var(--soft); border-radius: 999px; }
.ui-segment a { display: flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px; font-size: 14px; color: var(--muted); }
.ui-segment a[aria-current] { color: var(--text); background: var(--card); box-shadow: 0 1px 4px rgb(0 0 0 / 10%); }
.ui-segment svg { width: 16px; height: 16px; }
.table-scroll { margin-top: 30px; border: 1px solid var(--line); border-radius: 15px; overflow: auto; }
.history-table { border-collapse: collapse; width: 100%; min-width: 720px; text-align: left; font-size: 14px; }
.history-table th { background: var(--soft); color: var(--muted); font-size: 12px; font-weight: 550; }
.history-table th,.history-table td { padding: 11px clamp(11px,1.2vw,23px); white-space: nowrap; }
.history-table td { height: 47px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.history-table tbody tr:hover { background: var(--bg); }
.history-table td.ui-empty { height: 110px; }
.history-table .ip-region { min-width: 8em; max-width: 20em; white-space: normal; overflow-wrap: anywhere; color: var(--muted); }
.cell-icon,.status-pill { gap: 6px; }
.cell-icon svg { width: 15px; height: 15px; color: var(--ink-blue); }
.browser-icon[data-browser="Firefox"] svg { color: #dd681a; }
.browser-icon[data-browser="Edge"] svg { color: #098e88; }
.status-pill { gap: 3px; padding: 2px 7px; }
.status-pill svg { width: 13px; height: 13px; }
.status-pill.ok,.risk-tag.low { background: var(--ok-bg); color: var(--ok-fg); }
.status-pill.fail,.risk-tag.high { background: var(--bad-bg); color: var(--bad-fg); }
.risk-tag.review { background: var(--warn-bg); color: var(--warn-fg); }
.event-detail summary,.table-note { font-size: 12px; color: var(--muted); }
.event-detail summary { color: var(--ink-blue); }
.event-detail small { display: block; width: 22ch; white-space: normal; overflow-wrap: anywhere; }
.table-note { margin: 12px 2px 0; }
.ui-footer { margin-block-start: auto; padding-block: 15px 22px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.ui-footer > div,.ui-filing { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 5px 16px; }
.ui-footer a,.ui-filing a { color: inherit; }
.ui-filing { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.ui-footer a:hover,.ui-filing a:hover { text-decoration: underline; }
/* 账户设置 */
.profile-identity { display: grid; justify-items: start; gap: 6px; }
.profile-identity .acc-avatar-wrap,.profile-identity .user-avatar-img { width: 62px; height: 62px; }
.profile-identity .user-avatar-img { margin: 0; border: 1px solid var(--border); box-shadow: none; }
.profile-identity .acc-avatar-edit { opacity: 1; background: var(--primary); }
.profile-identity .user-name,.center-shell .modal-current,.center-shell .modal .field-label { color: var(--text); }
.profile-identity .user-role { gap: 6px; }
.profile-rows { margin: 20px 0; border-top: 1px solid var(--border); }
.profile-rows > div { display: flex; gap: 12px; align-items: center; min-height: 54px; border-bottom: 1px solid var(--line); font-size: 14px; }
.profile-rows span { color: var(--muted); min-width: 66px; }
.profile-rows b { flex: 1; overflow-wrap: anywhere; font-weight: 500; }
.center-shell .acc-box-head { padding: 0; margin: 0; }
.center-shell .acc-box-head .muted { color: var(--muted); margin-top: 4px; }
.center-shell .acc-cols { min-width: 0; gap: 14px; }
.center-shell .acc-row,.center-shell .bind-row { border-color: var(--line); }
.center-shell .bind-row,.center-shell .acc-form { background: var(--bg); border-color: var(--border); }
.center-shell .bind-row:hover { background: var(--soft); box-shadow: none; }
.center-shell .bind-row > .muted { flex: 1; }
.center-shell .acc-field input,.center-shell .modal .input,.center-auth .auth-form .input,.center-auth .pw-input { min-width: 0; color: var(--text); background: var(--card); border: 1px solid var(--border); border-radius: 9px; }
.center-shell .modal { background: var(--card); border: 1px solid var(--border); }
.center-shell .modal-head { background: var(--primary-soft); color: var(--text); }
.center-shell .modal-head p,.center-shell .modal-close { color: var(--muted); }
.center-shell .modal-head-icon svg { stroke: var(--ink-blue); }
.center-shell .btn-warn { background: var(--bad-bg) !important; border-color: transparent !important; color: var(--bad-fg) !important; }

/* 授权确认、登录及找回密码 */
.center-auth { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; background: var(--auth-bg); color: var(--text); padding: 38px 18px 24px; }
.corner-tools { position: absolute; right: clamp(12px,2vw,30px); top: 16px; z-index: 2; }
.corner-tools .ui-tool { border-radius: 50%; box-shadow: var(--shadow); }
.consent-card,.center-auth .auth-card,.center-auth .pw-card { width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 23px; box-shadow: 0 2px 8px rgb(38 59 91 / 3%); }
.consent-card { max-width: 684px; padding: clamp(24px,3vw,48px); margin: auto 0; }
.consent-header { text-align: center; margin-bottom: 25px; }
.client-logo { width: 49px; height: 49px; margin: 0 auto 12px; border-radius: 13px; font-size: 20px; overflow: hidden; }
.consent-label { color: var(--ink-blue); font-size: 14px; font-weight: 600; margin: 0 0 5px; }
.consent-header h1,.auth-intro h1 { font-size: 24px; line-height: 1.35; margin: 0; letter-spacing: -.035em; overflow-wrap: anywhere; }
.consent-header > p:not(.consent-label),.auth-intro p { color: var(--muted); margin: 5px 0 0; font-size: 14px; }
.signed-user { display: inline-flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 12px; color: var(--muted); font-size: 13px; }
.signed-user img { width: 26px; height: 26px; }
.signed-user b { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.consent-card .panel-heading { margin-bottom: 14px; }
.consent-card .panel-heading h2 { font-size: 15px; }
.permission-list { padding: 9px 17px; margin: 0; border: 1px solid var(--border); border-radius: 14px; list-style: none; }
.permission-list li { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 12px; align-items: start; padding: 18px 4px; }
.permission-list li + li { border-top: 1px solid var(--line); }
.permission-icon { display: grid; place-items: center; margin-top: 2px; background: var(--primary); width: 21px; height: 21px; color: white; border-radius: 50%; }
.permission-icon svg { width: 14px; height: 14px; }
.permission-list b { font-size: 14px; font-weight: 600; }
.permission-list p { color: var(--muted); font-size: 13px; line-height: 1.65; margin: 4px 0 0; }
.risk-tag { margin-top: 1px; font-size: 11px; }
.request-detail { margin-top: 18px; border-radius: 14px; }
.request-detail summary { padding: 8px 14px; display: flex; align-items: center; justify-content: space-between; color: var(--text); font-size: 14px; background: var(--soft); border-radius: 999px; }
.request-detail[open] summary svg { transform: rotate(180deg); }
.request-detail dl { display: grid; grid-template-columns: max-content minmax(0,1fr); gap: 6px 15px; font-size: 13px; margin: 14px; }
.request-detail dt { color: var(--muted); }
.request-detail dd { margin: 0; overflow-wrap: anywhere; }
.consent-return { color: var(--muted); text-align: center; font-size: 13px; margin: 20px 0; }
.consent-return strong { color: var(--text); font-weight: 550; }
.consent-actions { display: flex; gap: 9px; justify-content: flex-end; padding-top: 16px; border-top: 1px solid var(--line); }
.consent-actions .ui-btn { border-radius: 999px; padding: 9px 23px; min-height: 42px; }
.center-auth > .ui-filing { margin-top: 16px; }
.center-auth .auth-wrap,.center-auth .pw-wrap { display: block; min-height: auto; width: 100%; max-width: 458px; margin: auto; padding: 0; background: transparent; overflow: visible; }
.center-auth .auth-card,.center-auth .pw-card { max-width: none; padding: 30px clamp(20px,3vw,36px); }
.auth-intro { text-align: center; margin-bottom: 22px; }
.auth-intro img { display: block; margin: 0 auto 10px; }
.auth-intro h1 { font-size: 22px; }
.auth-mark { display: grid; place-items: center; width: fit-content; margin: 0 auto 14px; }
.center-auth .auth-tabs { background: var(--soft); border: 0; border-radius: 12px; padding: 4px; }
.center-auth .auth-tab { color: var(--muted); border: 0; border-radius: 9px; }
.center-auth .auth-tab.active { background: var(--card); color: var(--text); box-shadow: 0 1px 4px rgb(0 0 0 / 10%); }
.center-auth .pw-title,.center-auth .pw-field label,.center-auth .auth-form .field-label,.center-auth .platform .pf-name { color: var(--text); }
.center-auth .pw-sub,.center-auth .auth-foot,.center-auth .auth-divider,.center-auth .check,.center-auth .auth-note { color: var(--muted); }
.center-auth .platform { background: var(--card); border-color: var(--border); box-shadow: none; }
.center-auth .platform:hover { background: var(--soft); }
.center-auth .pw-sub b { color: var(--text) !important; }
.center-doc { background: var(--bg); }
.center-doc .doc-wrap { width: min(100%,860px); }
.doc-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.center-doc .doc-back { margin: 0; color: var(--ink-blue); }
.center-doc .doc-card { background: var(--card); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow); }
.center-doc .doc-card :is(h1,h2,th,strong) { color: var(--text); }
.center-doc .doc-card :is(p,li,td) { color: var(--muted); }
.center-doc .doc-card th { background: var(--soft); }
.center-doc .doc-card :is(th,td) { border-color: var(--border); }

@media (min-width: 761px) and (max-width: 1100px) {
  .center-shell .acc-cols { grid-template-columns: 1fr; }
  .identity-art { right: -70px; opacity: .65; }
}
@media (max-width: 760px) {
  :root { --bar: 56px; --pad: 16px; }
  .ui-bar { padding: 0 14px; gap: 9px; }
  .ui-brand img { width: 27px; height: 27px; }
  .ui-brand { gap: 7px; }
  .ui-brand strong { font-size: 15px; }
  .ui-tools { gap: 8px; }
  .ui-user summary > span { display: none; }
  .ui-menu { display: inline-flex; width: 33px; height: 33px; }
  .ui-rail { visibility: hidden; transform: translateX(-100%); width: min(270px,84vw); transition: transform .16s ease; }
  .menu-open .ui-rail { visibility: visible; transform: translateX(0); }
  .menu-open .ui-shade { display: block; position: fixed; border: 0; inset: var(--bar) 0 0; background: rgb(16 24 40 / 30%); z-index: 20; }
  .ui-main,.ui-footer { width: calc(100% - 2 * var(--pad)); margin-inline: auto; }
  .ui-main { padding: 25px 0 32px; gap: 15px; }
  .ui-segment a { font-size: 13px; }
  .history-panel { padding: 14px; }
  .table-scroll { margin-top: 18px; }
  .identity-copy { max-width: 81%; }
  .identity-art { right: -100px; width: 220px; height: 220px; opacity: .5; }
  .identity-art span { width: 55px; height: 55px; border-radius: 18px; }
  .identity-art svg { width: 30px; height: 30px; }
  .center-shell .acc-cols { grid-template-columns: 1fr; }
  .center-shell .bind-row { flex-wrap: wrap; gap: 8px; }
  #devices .bind-row .bind-bound { order: 3; flex-basis: 100%; flex-wrap: wrap; }
  .center-shell .bind-row .plat { width: auto; }
  .center-auth { padding: 58px 12px 18px; }
  .corner-tools { top: 11px; right: 13px; }
  .consent-card { border-radius: 18px; }
}
@media (max-width: 475px) {
  .ui-brand span { display: none; }
  .identity-art { right: -116px; }
  .identity-copy p { max-width: 24ch; }
  .consent-card { padding: 23px 16px; }
  .permission-list { padding: 4px 12px; }
  .permission-list li { gap: 8px; padding: 15px 0; }
  .consent-actions .ui-btn { flex: 1; }
  .center-doc .doc-card { padding: 22px 15px; }
  .center-doc .doc-wrap { padding: 15px 12px 30px; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
/* 用户组业务分类与目录编辑 */
[hidden] { display: none !important; }
.directory-subnav { margin: 2px 0 8px 23px; padding-left: 9px; border-left: 1px solid var(--border); display: grid; gap: 3px; }
.ui-rail .directory-subnav a { padding: 6px 10px; gap: 8px; min-height: 36px; font-size: 13px; }
.directory-subnav .ui-icon { width: 15px; height: 15px; }
.directory-subnav small { margin-left: auto; color: var(--muted); }
.directory-caption { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.directory-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; font-size: 13px; }
.directory-heading { flex-wrap: wrap; }
.directory-folders { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.directory-folder { display: flex; align-items: center; gap: 15px; border: 1px solid var(--border); border-radius: 13px; padding: 24px 20px; color: var(--text); transition: border-color .15s, background .15s; min-width: 0; }
.directory-folder:hover { background: var(--primary-soft); border-color: var(--primary); }
.folder-mark { display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); border-radius: 13px; width: 52px; height: 52px; flex: 0 0 auto; }
.folder-mark .ui-icon { width: 27px; height: 27px; }
.folder-copy { min-width: 0; flex: 1; }
.folder-copy strong { display: block; font-size: 16px; overflow-wrap: anywhere; }
.folder-copy small { display: block; margin-top: 5px; color: var(--muted); }
.directory-folder > .ui-icon { width: 16px; color: var(--muted); }
.directory-editor { scroll-margin-top: calc(var(--bar) + 20px); }
.directory-editor fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.directory-section-title { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.directory-section-title h3 { margin: 0; font-size: 14px; }
.directory-category-row, .directory-app-row { display: grid; grid-template-columns: minmax(70px, .65fr) minmax(120px,1.5fr) auto; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.directory-app-row { grid-template-columns: minmax(150px,1.5fr) minmax(120px,1fr) auto; }
.directory-editor label { font-size: 14px; overflow-wrap: anywhere; }
.directory-editor input, .directory-editor select { width: 100%; min-width: 0; border: 1px solid var(--border); border-radius: 8px; color: var(--text); background: var(--card); padding: 9px 10px; font: inherit; font-size: 14px; }
.directory-editor select:focus-visible { outline: 3px solid #749fff; outline-offset: 2px; }
.directory-row-actions { display: flex; gap: 5px; }
.directory-editor button:disabled { opacity: .45; cursor: default; }
.directory-savebar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 22px; }
#directory-status { margin: 0; font-size: 13px; color: var(--muted); flex: 1; min-width: 160px; overflow-wrap: anywhere; }
@media(max-width:1100px) { .directory-folders { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) {
 .directory-folders { grid-template-columns: 1fr; gap: 10px; }
 .directory-folder { padding: 18px; }
 .directory-heading { align-items: flex-start; }
 .directory-actions { gap: 10px; }
 .directory-category-row, .directory-app-row { grid-template-columns: minmax(0,1fr) auto; gap: 9px; }
 .directory-category-row label, .directory-app-row label { grid-column: 1 / -1; }
 .directory-editor .panel-heading { flex-wrap: wrap; }
 .directory-editor .panel-heading > .counter { display:none; }
 .directory-subnav { flex: 0 0 auto; }
}
