:root{--green:#104c3c;--accent:#16806b;--cream:#f6f4ef;--muted:#6f7c74;--line:#e3e8e0}*{box-sizing:border-box}body{margin:0;background:var(--cream);color:#20372d;font:14px/1.6 -apple-system,BlinkMacSystemFont,'PingFang SC',sans-serif}button,input,select{font:inherit}button{cursor:pointer;border:1px solid #dce4dc;background:#fff;color:var(--green);padding:10px 16px;border-radius:8px;font-weight:600}button:hover{background:#e9f2ec}button:disabled{opacity:.5;cursor:wait}.primary{background:var(--green);color:#fff}.primary:hover{background:var(--accent)}.danger{color:#a53b30}input,select{background:#fff;border:1px solid #d4ddd4;border-radius:7px;padding:9px 11px;color:#233f31;min-width:0;max-width:100%}label{display:flex;flex-direction:column;gap:7px;color:#4f6558}h1,h2,h3,p{margin-top:0}h2{font-size:27px;margin-bottom:0}h3{font-size:18px;margin-bottom:15px}small,.muted{color:var(--muted)}[hidden]{display:none!important}.eyebrow{font-size:10px;letter-spacing:1.7px;color:#7a8d7f}.login-page{display:grid;grid-template-columns:1.2fr 1fr;min-height:100vh}.login-brand{background:var(--green);color:#fff;padding:12vh 9vw}.login-brand h1{font-size:34px;margin:20px 0 80px}.login-brand h2{font-size:48px;line-height:1.4;margin-bottom:32px}.login-brand .eyebrow,.login-brand p{color:#bbd2bd}.login-card{align-self:center;max-width:420px;width:85%;margin:50px auto}.login-card h2{margin:12px 0}.login-card label,.account-form label{margin:20px 0}.login-card button{width:100%;margin:10px 0}.error{color:#ab4032}.login-card small{display:block;margin-top:22px}.login-card input{padding:13px}#app{display:flex;min-height:100vh}aside{width:230px;flex-shrink:0;background:var(--green);color:white;position:fixed;height:100vh;padding:36px 20px;display:flex;flex-direction:column}aside h1{font-size:26px;margin:0}aside small{color:#b6d1bf}aside nav{display:grid;gap:9px;margin-top:42px}aside nav button{text-align:left;background:transparent;color:#e2ede4;border-color:transparent}aside nav button.selected{background:#35725d}.aside-foot{margin-top:auto;display:grid;gap:10px}.aside-foot button{text-align:left;background:none;color:#d7e6db;border-color:#477363}main{margin-left:230px;padding:32px 34px;flex:1;min-width:0;max-width:1800px}header{display:flex;justify-content:space-between;align-items:center;margin-bottom:26px;gap:12px}.badge{background:#e2ebdf;color:var(--green);border-radius:8px;padding:8px 12px;font-size:12px;white-space:nowrap}.panel{border:1px solid var(--line);border-radius:14px;padding:22px;background:white;margin:18px 0;min-width:0;box-shadow:0 3px 10px #263d2610}.toolbar{display:flex;gap:14px;align-items:end;flex-wrap:wrap}.toolbar label{min-width:140px}.toolbar input,.toolbar select{max-width:240px}.data-note{font-size:13px;color:#6f7057;margin:18px 0;line-height:1.9}.kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.kpi{border:1px solid var(--line);background:#fff;padding:20px;border-radius:13px;min-width:0}.kpi .label{color:var(--muted);font-size:12px}.kpi strong{display:block;color:var(--green);font-size:clamp(20px,2.1vw,32px);margin:12px 0 4px;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.kpi small{font-size:11px}.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.section-head button{padding:7px 12px}.section-head button.selected{background:#e5efe5}.trend{display:flex;align-items:end;height:180px;gap:5px;min-width:0}.trend-bar{flex:1;min-width:0;height:160px;text-align:center;color:var(--muted);font-size:9px}.trend-bar svg{height:135px;width:100%;display:block}.trend-bar rect{fill:var(--accent)}.trend-bar.partial rect{fill:#bed1c0}.region-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.region-card{padding:15px;background:#f6f8f3;border:1px solid #e3ebdf;border-radius:9px}.region-card strong{display:block;font-size:22px;margin:9px 0;color:var(--green);overflow-wrap:anywhere}.desktop-table{overflow:auto}table{border-collapse:collapse;width:100%;white-space:nowrap}td,th{text-align:left;padding:14px 10px;border-bottom:1px solid #edf0e9}th{color:var(--muted);font-size:12px}td button{border:0;background:transparent;padding:0;text-decoration:underline}#message{border-radius:8px;margin:10px 0;color:#a1472b}#message:not(:empty){padding:12px;background:#f9e9d8}.mobile-store-list,.bottom-nav{display:none}.store-card,.user-row,.org-region{border-bottom:1px solid var(--line);padding:16px 0}.store-card .row,.user-row{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}.mini-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}.mini-grid small{display:block}.mini-grid b{font-size:18px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.form-grid h3,.wide{grid-column:1/-1}.check{flex-direction:row;align-items:center}.check input{width:18px;height:18px}.account-form{max-width:500px}pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;max-height:420px;overflow:auto;background:#f7f8f4;padding:14px;border-radius:8px}footer{font-size:11px;color:#859083;margin:30px 0 8px}.tag{padding:3px 7px;background:#edf3e8;border-radius:5px;font-size:11px}.warn{color:#a15c22}#jobs article{padding:12px 0;border-bottom:1px solid var(--line)}@media(max-width:1100px){aside{width:195px}main{margin-left:195px;padding:24px}.kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.region-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:720px){.login-page{display:block}.login-brand{padding:28px}.login-brand h1{margin:0 0 15px}.login-brand h2{font-size:28px;margin-bottom:15px}.login-brand .eyebrow{display:none}.login-card{margin:35px auto}.login-card h2{font-size:23px}#app{display:block}aside{position:static;width:auto;height:auto;padding:16px 18px;display:flex;flex-direction:row;align-items:center;justify-content:space-between}aside h1{font-size:23px}aside>small,aside nav,.aside-foot small{display:none}.aside-foot{margin:0;font-size:12px;display:flex;align-items:center}.aside-foot button{padding:4px 8px}main{margin:0;padding:20px 14px 90px;max-width:100%}header{margin-bottom:18px}h2{font-size:22px}.badge{font-size:10px;padding:6px 8px}.panel{padding:16px;border-radius:12px}.toolbar{gap:10px}.toolbar label{flex:1;min-width:120px}.toolbar input,.toolbar select{width:100%}.kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.kpi{padding:16px 12px}.kpi strong{font-size:23px}.kpi small{font-size:10px}.region-grid{gap:8px}.region-card{padding:11px}.region-card strong{font-size:19px}.desktop-table{display:none}.mobile-store-list{display:block}.bottom-nav{position:fixed;bottom:0;left:0;right:0;background:#fff;border-top:1px solid var(--line);display:flex;padding:9px 6px max(9px,env(safe-area-inset-bottom));gap:3px;z-index:10}.bottom-nav button{flex:1;min-width:0;border:0;font-size:11px;padding:8px 3px}.bottom-nav button.selected{background:#e4eee2}.form-grid{grid-template-columns:1fr}.wide{grid-column:auto}.trend{gap:2px}.trend-bar span{font-size:8px}.trend-bar:nth-child(even) span{visibility:hidden}.data-note{font-size:12px}.section-head h3{margin:4px 0 12px}}
.kpi strong.amount-long{font-size:clamp(16px,1.5vw,21px);white-space:nowrap;letter-spacing:-.25px}@media(max-width:720px){.kpi strong.amount-long{font-size:17px}}
.access-rule-panel { scroll-margin-top: 16px; }
.access-rule-panel > .muted { margin-bottom: 12px; }
.access-rule-status { margin: 8px 0; color: var(--green); }
.access-rule-status:empty { display: none; }
.access-rule-status.error { color: #ab4032; }
.access-rule-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.access-rule-form legend { padding: 0 6px; font-weight: 650; color: var(--green); }
.access-rule-targets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 12px; }
.access-rule-targets > label, .access-rule-targets select { min-width: 0; }
#accessRuleIdentityHint { margin: 7px 0 0; font-size: 12px; }
.access-rule-form #accessRuleModuleFields { margin-top: 14px; }
.access-rule-modules, .access-rule-actions { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.access-rule-modules .check { min-height: 35px; gap: 7px; }
.access-rule-selection { margin: 8px 0 12px; font-size: 13px; }
.access-rule-list { margin-top: 18px; }
.access-rule-list:empty { display: none; }
.access-rule-list h4 { margin: 0 0 6px; }
.access-rule-items { list-style: none; padding: 0; margin: 0; }
.access-rule-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.access-rule-item > div { min-width: 0; overflow-wrap: anywhere; }
.access-rule-item small { display: block; }
.access-rule-item button { padding: 7px 12px; }
.access-rule-panel :is(button, input, select):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
@media (max-width: 720px) {
  .access-rule-form fieldset { padding: 10px; }
  .access-rule-panel :is(button, select, input[type='search']) { min-height: 44px; }
  .access-rule-modules .check { min-height: 44px; }
}
/* Account administration */
.user-permission-tabs { display: flex; gap: 5px; flex-wrap: wrap; border-bottom: 1px solid #d7e0d7; }
.user-permission-tabs button { background: transparent; border: 0; border-bottom: 2px solid transparent; border-radius: 6px 6px 0 0; padding: 10px 17px; color: #536459; }
.user-permission-tabs button:hover { background: #edf3ed; }
.user-permission-tabs button[aria-selected='true'] { background: #eaf3ea; border-bottom-color: var(--green); color: var(--green); }
.wecom-directory { --directory-surface: #f6f9f5; --directory-border: #dbe5db; }
.directory-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 10px 16px; }
.directory-head h3 { margin: 0 0 3px; font-size: 21px; }
.directory-head p { margin: 0; }
.directory-coverage { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 13px; }
.directory-coverage span { padding: 3px 8px; border-radius: 5px; background: #eff4ed; color: #325543; font-size: 12px; font-weight: 650; }
#directoryStatus { color: #566c5e; font-size: 12px; }
#directoryStatus.error { color: #a43d32; }
#directoryFeedback:not(:empty) { background: #edf7ef; border: 1px solid #d2e7d5; padding: 6px 10px; border-radius: 6px; }
.directory-workspace { display: grid; grid-template-columns: minmax(156px, .23fr) minmax(0, 1fr); align-items: start; gap: 16px; border-top: 1px solid var(--directory-border); padding-top: 17px; margin-top: 15px; }
.directory-org { min-width: 0; border: 1px solid var(--directory-border); border-radius: 9px; background: var(--directory-surface); }
.directory-org > summary { cursor: pointer; padding: 10px 11px; font-weight: 650; color: var(--green); overflow-wrap: anywhere; }
.directory-org > summary small { display: inline-block; margin-inline-start: 4px; color: #5a7163; font-weight: 400; }
.directory-org-body { padding: 2px 6px 8px; max-height: min(58vh, 570px); overflow: auto; }
.directory-tree, .directory-tree ul { list-style: none; margin: 0; padding: 0; }
.directory-tree ul { margin-left: 9px; border-left: 1px solid #dbe6dc; }
.directory-node { display: grid; grid-template-columns: 23px minmax(0, 1fr); align-items: start; }
.directory-node-leaf .directory-node-label { grid-column: 2; }
.directory-node-label, .directory-node-toggle { border: 0; border-radius: 5px; min-height: 32px; background: transparent; color: #345543; font-size: 12px; }
.directory-node-label { width: 100%; padding: 4px 6px; text-align: left; overflow-wrap: anywhere; }
.directory-node-toggle { min-width: 0; padding: 2px 0; }
.directory-node-label[aria-pressed='true'] { background: #deede1; color: #104c3c; font-weight: 750; }
.directory-members { min-width: 0; }
.directory-filters { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, .8fr); gap: 9px; }
.directory-filters label { gap: 3px; font-size: 12px; font-weight: 650; }
.directory-filters :is(input,select) { width: 100%; min-height: 40px; font-weight: 400; }
.directory-results { display: flex; justify-content: space-between; align-items: baseline; gap: 7px 14px; flex-wrap: wrap; margin: 12px 1px 7px; }
.directory-results h4, .directory-results p { margin: 0; }
.directory-results h4 { color: #284c3a; overflow-wrap: anywhere; font-size: 13px; }
.directory-results p { font-size: 12px; }
.directory-table-scroll { border: 1px solid var(--directory-border); border-radius: 8px; max-height: min(58vh, 570px); overflow: auto; }
.directory-table { white-space: normal; font-size: 13px; }
.directory-table :is(th,td) { text-align: left; vertical-align: middle; padding: 9px 10px; overflow-wrap: anywhere; }
.directory-table th { position: sticky; top: 0; z-index: 1; background: #eef4ee; color: #405c4d; font-weight: 700; }
.directory-table td:first-child { min-width: 92px; color: #253e30; }
.directory-table td:nth-child(2) { min-width: 112px; max-width: 290px; color: #486256; font-size: 12px; }
.directory-table td:nth-child(3) { min-width: 100px; }
.directory-table td:last-child { white-space: nowrap; }
.directory-table tbody tr:nth-child(even) { background: #fafcfa; }
.directory-table tbody tr:hover { background: #f1f7f1; }
.directory-table tbody tr:last-child td { border-bottom: 0; }
.directory-table td small { display: block; margin-top: 2px; line-height: 1.4; }
.directory-tags { display: flex; flex-wrap: wrap; gap: 3px; }
.directory-tag { padding: 2px 6px; border-radius: 4px; background: #e6f3e8; color: #225b43; font-size: 11px; white-space: nowrap; }
.directory-tag-neutral { background: #edf0ed; color: #4d6355; }
.directory-tag-warning { background: #faecdf; color: #864728; }
.directory-row-action { display: inline-flex; justify-content: center; align-items: center; border: 1px solid #d8e6da; border-radius: 6px; background: #f7fbf7; color: var(--green); text-decoration: none; padding: 4px 7px; font-size: 12px; font-weight: 700; }
.directory-row-action:hover { background: #e4f1e6; }
.directory-empty { margin: 0; padding: 14px 4px; }
.directory-pager { display: flex; justify-content: flex-end; align-items: center; gap: 9px; margin-top: 11px; }
.directory-pager button { padding: 6px 10px; }
.directory-pager button:disabled { cursor: default; }
.directory-grant { position: fixed; inset: 0 0 0 auto; margin: 0; padding: 0; width: min(100%, 510px); max-width: 100%; height: 100%; height: 100dvh; max-height: 100%; background: #fff; color: #20372d; border: 0; border-left: 1px solid #dbe5db; box-shadow: -8px 0 32px #15382524; overflow: hidden; }
.directory-grant[open] { display: flex; flex-direction: column; }
.directory-grant::backdrop { background: #142c2290; }
.directory-drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; border-bottom: 1px solid var(--line); background: #f4f8f3; }
.directory-drawer-head, .directory-drawer-body, .directory-drawer-footer { padding: 16px 20px; }
.directory-drawer-head h4 { margin: 0 0 4px; color: var(--green); font-size: 21px; overflow-wrap: anywhere; }
.directory-drawer-head p { margin: 0; overflow-wrap: anywhere; }
.directory-close { padding: 0; min-width: 36px; height: 36px; font-size: 22px; line-height: 1; }
.directory-drawer-body { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.directory-drawer-footer { border-top: 1px solid var(--line); padding-bottom: max(14px, env(safe-area-inset-bottom)); }
.directory-grant fieldset { min-width: 0; margin: 0; padding: 9px 10px; border: 1px solid #dbe5db; border-radius: 8px; }
.directory-grant :is(legend, h5) { color: var(--green); font-weight: 650; }
.directory-grant legend { padding: 0 4px; }
#directoryGrantFields { border: 0; padding: 0; display: grid; gap: 16px; }
#directoryGrantFields :is(p,h5) { margin: 0 0 4px; font-size: 12px; }
#directoryGrantFields h5 { margin-top: 6px; }
.directory-grant .directory-suggestions { margin: 0; padding: 7px 9px; border-radius: 6px; background: #eef3ed; color: #405b48; font-size: 12px; overflow-wrap: anywhere; }
.directory-module-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 2px 10px; }
.directory-module-options .check { min-height: 33px; gap: 6px; }
.directory-module-options input { flex: 0 0 auto; }
.directory-store-options { display: grid; gap: 3px; max-height: 210px; overflow-y: auto; }
.directory-save { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.directory-save span { margin-right: auto; }
.directory-save span:empty { display: none; }
.directory-grant .access-rule-status:not(:empty) { margin: 0 0 9px; }
.directory-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.access-role-summary { margin: 16px 0; }
.access-role-summary h4 { margin: 0 0 5px; }
.access-role-scroll { overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.access-role-table { white-space: normal; }
.access-role-table thead { background: #eef4ee; }
.access-role-table :is(th,td) { padding: 8px 10px; }
.access-role-table tbody th { color: var(--green); font-size: inherit; }
.access-role-table tr:last-child :is(th,td) { border-bottom: 0; }
.user-permission-tabs button:focus-visible, .wecom-directory :is(button,input,select,summary,h4):focus-visible, .access-role-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

@media (max-width: 1000px) {
  .directory-workspace { grid-template-columns: 1fr; gap: 12px; }
  .directory-org-body { max-height: 240px; }
}
@media (max-width: 760px) {
  .directory-table-scroll { max-height: none; overflow: visible; border: 0; border-radius: 0; }
  .directory-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .directory-table, .directory-table tbody { display: block; }
  .directory-table tbody { display: grid; gap: 7px; }
  .directory-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 7px; border: 1px solid var(--directory-border); border-radius: 8px; padding: 8px 10px; }
  .directory-table td { border: 0; padding: 0; }
  .directory-table td:first-child, .directory-table td:nth-child(2), .directory-table td:nth-child(3) { min-width: 0; max-width: none; }
  .directory-table td:first-child { grid-column: 1; grid-row: 1; }
  .directory-table td:nth-child(2) { grid-column: 1 / -1; }
  .directory-table td:nth-child(3) { grid-column: 1; }
  .directory-table td:nth-child(4) { grid-column: 2; grid-row: 1; }
  .directory-table td:nth-child(5) { grid-column: 2; grid-row: 3; align-self: end; }
  .directory-table td:nth-child(2)::before { content: '部门 · '; color: #6c7d72; }
  .directory-table td:nth-child(3) strong { font-size: 12px; }
  .directory-node-label, .directory-node-toggle { min-height: 36px; }
  .directory-grant { border-left: 0; }
}
@media (max-width: 520px) {
  .user-permission-tabs button { flex: 1; min-height: 44px; padding: 6px; }
  .directory-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .directory-filters label:first-child { grid-column: 1 / -1; }
  .directory-filters :is(input,select) { min-height: 44px; }
  .directory-head .primary { min-height: 44px; }
  .directory-row-action { min-height: 40px; }
  .directory-drawer-head, .directory-drawer-body, .directory-drawer-footer { padding-inline: 15px; }
  .directory-module-options .check { min-height: 42px; }
  .access-role-table { min-width: 400px; }
}

#usersPage input[type='checkbox'] { accent-color: var(--green); }
.user-store-fields { display: grid; gap: 9px; min-width: 0; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.user-store-fields legend { padding: 0 4px; font-weight: 650; color: var(--green); }
.user-store-fields :is(p,h5) { margin: 0; font-size: 12px; }
.user-store-fields h5 { margin-top: 4px; color: var(--green); }
.user-store-fields label { overflow-wrap: anywhere; }
