:root { --ink:#172033; --muted:#687688; --line:#dce3e9; --blue:#2367a7; --blue-soft:#e8f1f9; --green:#24866a; --red:#ba4040; }
* { box-sizing:border-box; }
body { margin:0; color:var(--ink); background:#f6f8fa; font:14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif; }
button,input { font:inherit; }
button { cursor:pointer; }
button:focus-visible,input:focus-visible,a:focus-visible { outline:2px solid var(--blue); outline-offset:2px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.site-header { position:sticky; top:0; z-index:20; height:58px; background:#fff; border-bottom:1px solid var(--line); }
.header-inner { max-width:1440px; padding:0 24px; height:100%; margin:auto; display:flex; gap:20px; align-items:center; }
.brand { font-size:16px; }.header-context { color:var(--muted); border-left:1px solid var(--line); padding-left:20px; }
.header-right { margin-left:auto; display:flex; gap:16px; align-items:center; color:var(--muted); font-size:12px; }
.header-right > span { max-width:min(40vw,320px); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.text-button { padding:4px; background:none; border:0; color:var(--blue); }
.portal-layout { max-width:1440px; min-height:calc(100vh - 58px); margin:auto; display:grid; grid-template-columns:270px minmax(0,1fr); background:#fff; }
.sidebar { border-right:1px solid var(--line); padding:18px 10px 24px; min-width:0; }
.source-switch { display:flex; margin:0 8px 18px; border:1px solid var(--line); border-radius:5px; overflow:hidden; }
.source-switch button { flex:1; min-width:0; border:0; border-right:1px solid var(--line); background:#fff; padding:7px 4px; color:#526071; }
.source-switch button:last-child { border-right:0; }.source-switch button.active { background:var(--blue-soft); color:#165681; font-weight:700; }
.search-label { display:block; padding:0 8px 12px; }.search-label input,#stockSearch { width:100%; border:1px solid var(--line); border-radius:4px; padding:8px 10px; background:#fff; color:var(--ink); }
#tree { display:flex; flex-direction:column; gap:1px; max-height:calc(100vh - 170px); overflow:auto; }
.tree-item { width:100%; display:block; text-align:left; border:0; border-radius:4px; background:transparent; padding:7px 8px; color:#39495a; overflow-wrap:anywhere; }
.tree-item.depth-1 { padding-left:22px; }.tree-item.depth-2 { padding-left:36px; }.tree-item.depth-3 { padding-left:50px; }.tree-item.depth-4 { padding-left:64px; }
.tree-item:hover { background:#f1f5f8; }.tree-item.active { background:var(--blue-soft); color:#155783; font-weight:700; }
.tree-empty { padding:10px; color:var(--muted); }
.workspace { min-width:0; padding:24px 28px 42px; }
.workspace-head { min-height:112px; display:flex; justify-content:space-between; align-items:start; gap:16px; border-bottom:1px solid var(--line); padding-bottom:18px; }
.workspace-head h1 { font-size:23px; line-height:1.25; margin:7px 0; }
.eyebrow { color:var(--blue); font-size:12px; font-weight:600; }.description { color:var(--muted); max-width:860px; overflow-wrap:anywhere; }
.count { color:var(--muted); white-space:nowrap; font-size:12px; }
.stock-toolbar { display:flex; justify-content:space-between; align-items:center; gap:20px; margin:22px 0 12px; }.stock-toolbar h2 { margin:0; font-size:16px; }.stock-toolbar input { max-width:240px; }
.stock-table-wrap { overflow-x:auto; border-top:1px solid var(--line); }
table { border-collapse:collapse; width:100%; min-width:580px; } th,td { padding:11px 12px; text-align:left; border-bottom:1px solid #edf0f3; }
th { color:var(--muted); font-size:12px; font-weight:600; background:#fafbfc; } td { font-size:13px; }
td a { color:var(--ink); font-weight:600; text-decoration:none; } td a:hover { color:var(--blue); text-decoration:underline; }
.stock-row { cursor:pointer; }.stock-row:hover { background:#f7fafc; }.stock-row:focus-visible { outline:2px solid var(--blue); outline-offset:-2px; }
.stock-code { font:12px ui-monospace,Consolas,monospace; color:#607083; }.detail-link { color:var(--blue); white-space:nowrap; }.table-empty { color:var(--muted); text-align:center; padding:36px; }
.auth-page { min-height:100vh; display:grid; place-items:center; background:#edf3f6; }.auth-wrap { width:min(410px,calc(100vw - 32px)); }.auth-mark { color:#295774; font-weight:750; font-size:18px; margin-bottom:22px; }
.auth-form { background:#fff; border:1px solid var(--line); border-radius:6px; padding:30px; box-shadow:0 12px 28px rgba(25,49,67,.06); }
.auth-form h1 { margin:0 0 24px; font-size:23px; }.auth-form label { display:block; color:#415265; font-size:13px; font-weight:600; margin:14px 0; }
.auth-form input { display:block; width:100%; height:40px; margin-top:6px; padding:0 10px; border:1px solid #cbd5de; border-radius:4px; background:#fff; color:var(--ink); }
.primary { background:#206c9c; color:#fff; border:1px solid #206c9c; border-radius:4px; padding:8px 15px; font-weight:650; }.primary:hover { background:#15567f; }.auth-form .primary { width:100%; margin-top:10px; height:42px; }
.message { padding:9px 12px; border-radius:4px; margin:0 0 16px; }.message.error { color:#9b3030; background:#fff0ef; }.message.success { color:#146b52; background:#e9f7f1; }
.admin-page { background:#f4f7f9; }
.admin-header .brand { color:#173f5b; }
.admin-layout { max-width:1120px; margin:0 auto; padding:36px 24px 64px; }
.admin-page-heading { display:flex; justify-content:space-between; align-items:end; gap:16px; margin-bottom:24px; }
.admin-kicker { margin:0 0 4px; color:var(--blue); font-size:12px; font-weight:700; }
.admin-page-heading h1 { margin:0; font-size:25px; line-height:1.3; }
.admin-total { color:var(--muted); font-size:13px; white-space:nowrap; }
.admin-section { background:#fff; border:1px solid var(--line); border-radius:6px; margin-bottom:16px; }
.admin-section-head { display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:62px; padding:0 24px; border-bottom:1px solid var(--line); }
.admin-section-head h2 { margin:0; font-size:16px; }
.admin-section-head span { color:var(--muted); font-size:12px; }
.create-form { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:22px 24px; align-items:end; padding:24px; }
.create-fields { grid-column:1 / -1; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; max-width:660px; }
.create-fields label,.admin-security label { display:flex; flex-direction:column; gap:7px; font-size:13px; font-weight:600; color:#405063; }
.create-fields input,.admin-security input,.password-details input { width:100%; min-width:0; height:39px; border:1px solid #ccd6df; border-radius:4px; padding:0 11px; background:#fff; color:var(--ink); }
.create-options { min-width:0; }
.field-caption { display:block; margin-bottom:8px; color:var(--muted); font-size:12px; }
.permission-options { display:flex; align-items:center; flex-wrap:wrap; gap:12px 22px; }
.check { display:inline-flex; align-items:center; gap:7px; white-space:nowrap; color:#35495c; font-size:13px; cursor:pointer; }
.check input { width:16px; height:16px; margin:0; accent-color:#206c9c; }
.create-submit { display:flex; justify-content:flex-end; }
.create-submit .primary { min-width:112px; height:39px; }
.users-list { min-height:104px; }
.user-row { display:grid; grid-template-columns:minmax(150px,1fr) minmax(280px,1.7fr) minmax(128px,.8fr); gap:20px; padding:20px 24px; border-bottom:1px solid var(--line); align-items:start; }
.user-row:last-child { border-bottom:0; }
.user-name-line { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.user-identity strong { font-size:14px; overflow-wrap:anywhere; }
.user-identity small { display:block; margin-top:7px; color:var(--muted); font-size:11px; }
.state { font-size:11px; line-height:1.4; padding:2px 6px; border-radius:3px; white-space:nowrap; }
.state.on { color:#167150; background:#e5f4ed; }
.state.off { color:#8c5151; background:#f5ecec; }
.permissions .permission-options { margin-bottom:12px; gap:10px 18px; }
.permissions button,.user-actions button,.admin-security button,.password-details summary { border:1px solid #cbd5de; background:#fff; color:#285f84; border-radius:4px; padding:7px 11px; white-space:nowrap; }
.permissions button:hover,.user-actions button:hover,.admin-security button:hover { background:#f0f6fa; }
.user-actions { display:flex; flex-direction:column; align-items:flex-start; gap:8px; }
.user-actions form { margin:0; }
.user-actions .danger { color:#a23535; }
.password-details { width:100%; }
.password-details summary { display:inline-block; cursor:pointer; font-size:13px; list-style:none; }
.password-details summary::-webkit-details-marker { display:none; }
.password-details[open] summary { margin-bottom:10px; }
.password-details form { display:flex; flex-direction:column; align-items:flex-start; gap:8px; }
.password-details input { width:min(220px,100%); }
.admin-empty { display:flex; flex-direction:column; justify-content:center; align-items:center; min-height:132px; padding:25px; text-align:center; }
.admin-empty strong { font-size:14px; font-weight:650; }
.admin-empty p { margin:6px 0 0; color:var(--muted); font-size:12px; }
.admin-security { padding:0 24px; }
.admin-security summary { display:flex; justify-content:space-between; gap:15px; align-items:center; min-height:62px; cursor:pointer; font-size:15px; font-weight:650; list-style:none; }
.admin-security summary::-webkit-details-marker { display:none; }
.admin-security summary span { color:var(--muted); font-size:12px; font-weight:400; }
.admin-security form { display:flex; align-items:end; gap:12px; padding:0 0 22px; }
.admin-security form label { width:min(320px,100%); }
.admin-security form button { height:39px; }
@media(max-width:900px) { .portal-layout { grid-template-columns:210px minmax(0,1fr); }.workspace { padding:20px; }.user-row { grid-template-columns:1fr 1.4fr; }.user-actions { grid-column:2; flex-direction:row; align-items:flex-start; }.admin-layout { padding:24px 16px 48px; } }
@media(max-width:600px) { .header-inner { padding:0 15px; gap:10px; }.header-context { display:none; }.portal-layout { display:block; }.sidebar { border-right:0; border-bottom:1px solid var(--line); padding:12px 8px; }.source-switch { margin-bottom:10px; }.search-label { padding-bottom:4px; } #tree { max-height:165px; }.workspace { padding:16px; }.workspace-head { min-height:0; }.workspace-head h1 { font-size:20px; }.stock-toolbar { margin-top:17px; }.stock-toolbar input { max-width:180px; }.stock-table-wrap table { min-width:0; }.stock-table-wrap th:nth-child(n+3),.stock-table-wrap td:nth-child(n+3) { display:none; }.stock-table-wrap th:first-child,.stock-table-wrap td:first-child { width:105px; }.auth-form { padding:22px; } }
@media(max-width:600px) { .admin-current-user { display:none; }.admin-layout { padding:24px 12px 40px; }.admin-page-heading { align-items:flex-start; }.admin-page-heading h1 { font-size:22px; }.admin-total { margin-top:21px; }.admin-section-head { padding:0 16px; min-height:54px; }.create-form { display:block; padding:18px 16px; }.create-fields { grid-template-columns:1fr; gap:14px; }.create-options { margin-top:20px; }.permission-options { gap:10px 16px; }.create-submit { justify-content:stretch; margin-top:22px; }.create-submit .primary { width:100%; }.user-row { display:block; padding:18px 16px; }.permissions { margin-top:18px; }.user-actions { margin-top:16px; flex-wrap:wrap; }.admin-security { padding:0 16px; }.admin-security form { display:block; }.admin-security form button { margin-top:12px; width:100%; } }
