/* Light workspace, inspired by the supplied desktop layout. */
:root {
  --ink: #302f2d;
  --muted: #77746f;
  --line: #e9e7e4;
  --paper: #fff;
  --canvas: #f5f4f2;
  --nav: #f5f4f2;
  --nav-soft: #e9e7e3;
  --brand: #363431;
  --brand-soft: #f1f0ed;
  --shadow: 0 8px 28px #302f2d12;
  --radius: 10px;
}
body { font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", "Segoe UI", sans-serif; font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
input::placeholder, textarea::placeholder { color: #92908a; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid #817b70; outline-offset: 3px; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.ui-icon { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.app { grid-template-columns: 246px minmax(0,1fr); padding-top: 12px; }
.sidebar { height: calc(100vh - 12px); top: 12px; padding: 20px 14px 18px; color: var(--ink); }
.brand { gap: 10px; padding: 0 12px 24px; }
.brand > .ui-icon { width: 23px; height: 23px; }
.brand strong { font-size: 17px; font-weight: 600; }
.brand span { color: #8b8780; font-size: 12px; margin-top: 0; }
.sidebar-create { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 10px 12px; border: 0; border-radius: 7px; color: var(--ink); background: transparent; font-size: 14px; font-weight: 600; text-align: left; }
.sidebar-create:hover { background: var(--nav-soft); }
.nav-group-label { margin: 26px 12px 10px; color: #7f7a73; letter-spacing: 0; font-size: 12px; font-weight: 600; }
.nav-list { gap: 4px; }
.nav-item { min-height: 43px; padding: 10px 12px; gap: 12px; color: #625e58; font-size: 14px; font-weight: 600; border-radius: 7px; }
.nav-item:hover { color: var(--ink); background: #eeece9; }
.nav-item.active { color: var(--ink); background: var(--nav-soft); box-shadow: none; font-weight: 700; }
.sidebar-help { border-top: 1px solid #e3e0db; padding: 16px 12px 0; }
.sidebar-help strong { color: #66615a; font-size: 12px; font-weight: 500; }
.sidebar-help p { color: #88827a; font-size: 12px; line-height: 1.8; }
.sidebar-help button { color: #635d55; font-size: 12px; }
.shell { background: #fff; border: 1px solid var(--line); border-bottom: 0; border-right: 0; border-radius: 16px 0 0 0; min-height: calc(100vh - 12px); }
.topbar { height: 62px; padding: 0 28px; gap: 22px; border-radius: 16px 0 0 0; background: #fffffffa; backdrop-filter: none; }
.workspace-location { display: flex; align-items: center; gap: 12px; min-width: 0; font-size: 13px; color: #817b72; white-space: nowrap; }
.workspace-location strong { color: #4b4640; font-weight: 500; }
.location-separator { color: #c2bdb5; }
.search { margin-left: auto; width: 284px; flex: 0 1 284px; min-width: 0; }
.search input { height: 36px; border-color: transparent; background: #f7f6f4; border-radius: 8px; padding-left: 34px; padding-right: 68px; font-size: 13px; }
.search input:focus { border-color: #c8c2b8; background: #fff; }
.search-icon.ui-icon { width: 15px; height: 15px; left: 11px; top: 11px; color: #888178; }
.shortcut { top: 7px; right: 7px; padding: 0 5px; line-height: 20px; border-color: #e5e1dc; color: #9b958c; font-size: 11px; }
.top-actions { margin-left: 0; }
.account-wrap { position: relative; }
.avatar { width: 34px; height: 34px; padding: 0; border: 1px solid #dfdbd5; border-radius: 50%; background: #e9e5df; color: #5f574c; font-size: 11px; font-weight: 700; }
.avatar:hover { border-color: #bdb6ac; background: #dfdbd4; }
.account-menu { position: absolute; z-index: 60; top: 43px; right: 0; width: 190px; padding: 7px; border: 1px solid #dedad4; border-radius: 10px; background: #fff; box-shadow: 0 14px 36px #312d2720; }
.account-menu[hidden] { display: none; }
.account-summary { padding: 9px 10px 11px; border-bottom: 1px solid var(--line); }
.account-summary strong, .account-summary span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-summary strong { font-size: 13px; }
.account-summary span { margin-top: 2px; color: #8a847b; font-size: 12px; }
.account-menu button { width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; color: #56514b; background: transparent; text-align: left; font-size: 13px; }
.account-menu button:hover { background: #f3f1ee; color: var(--ink); }
.activity { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: inherit; text-align: left; }
.activity:last-child { border-bottom: 0; }
.viewer-mode .sidebar-create { display: none; }
.search-popover { left: auto; right: 81px; top: 62px; width: min(480px, calc(100vw - 320px)); border-radius: 10px; }
.search-result:hover { background: #f6f5f2; }
main { max-width: 1080px; padding: 52px 48px 80px; }
.page-head { margin-bottom: 32px; gap: 24px; }
.page-head h1 { font-family: inherit; font-size: 26px; line-height: 1.4; font-weight: 600; letter-spacing: -.4px; }
.page-head p { margin-top: 7px; font-size: 14px; color: #8a847b; }
.head-actions { gap: 8px; flex-shrink: 0; }
.btn { min-height: 38px; border: 1px solid #e2ded8; border-radius: 8px; padding: 7px 13px; color: #575149; font-size: 14px; font-weight: 500; background: white; }
.btn:hover { background: #f5f3ef; border-color: #cfc8be; }
.btn-primary { background: #363431; color: white; border-color: #363431; }
.btn-primary:hover { background: #514d47; color: white; border-color: #514d47; }
.stats { border: 0; border-radius: 0; border-bottom: 1px solid var(--line); padding: 0 0 25px; grid-template-columns: repeat(4,minmax(0,1fr)); }
.stat { padding: 0 24px; border-right: 1px solid var(--line); }
.stat:first-child { padding-left: 0; }
.stat:last-child { padding-right: 0; }
.stat-top { min-height: 24px; }
.stat-label { color: #8b857c; font-size: 13px; font-weight: 400; }
.stat-icon { display: none; }
.stat strong { font: 500 29px/1.4 "Segoe UI", Arial, sans-serif; margin-top: 8px; color: #49443e; }
.stat-foot { margin-top: 3px; color: #9a948b; font-size: 12px; }
.dashboard-grid, .main-column { gap: 26px; }
.content-grid { grid-template-columns: minmax(0,1fr); gap: 28px; }
.content-grid > .card { border: 0; border-radius: 0; }
.card-header { min-height: 50px; padding: 0 0 14px; border-bottom: 0; }
.card-header h2 { font-size: 16px; font-weight: 500; }
.card-header p { display: none; }
.card-header .link { color: #81776a; font-size: 13px; font-weight: 400; }
.product-list, .activity-list { padding: 0; }
.content-grid .empty-state { min-height: 116px; display: grid; place-items: center; padding: 28px 24px; border: 1px dashed #e4e0da; border-radius: 9px; background: #fdfcfb; color: #9a9287; font-size: 14px; }
.product-row { grid-template-columns: minmax(0,1fr) 44px 100px 92px; padding: 15px 12px; gap: 12px; border-color: var(--line); border-radius: 7px; }
.product-row:hover, .folder-header:hover, .folder-file:hover, button.detail-file:hover { background: #f7f6f3; }
.product-name strong, .activity-main strong { font-size: 14px; font-weight: 500; }
.product-logo, .logo-1, .logo-2, .logo-3, .logo-4 { background: #efede8; color: #70675a; font-weight: 500; }
.product-name span, .activity-main span, .activity-time, .file-count { color: #92897e; }
.product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.product-grid > .empty-state { grid-column: 1 / -1; padding: 58px 24px; border: 1px dashed var(--line); border-radius: 9px; }
.product-card { border-color: var(--line); border-radius: 10px; padding: 20px; }
.product-card:hover { box-shadow: none; border-color: #c9c1b6; }
.product-card h3 { font-size: 17px; font-weight: 500; }
.product-card p { font-size: 14px; }
.tag { font-weight: 400; }
.filter-row { gap: 10px; margin-bottom: 22px; }
.filter-row input, .filter-row select { font-size: 14px; border-color: var(--line); background: #fdfcfb; }
.document-explorer { gap: 12px; }
.folder-header { padding: 15px 18px; }
.folder-title strong { font-size: 15px; font-weight: 500; }
.folder-icon { background: #f3f0e9; color: #927d5b; }
.folder-file-name { font-weight: 400; }
.folder-file-action, .file-view { color: #756957; font-size: 13px; font-weight: 500; }
.file-icon { font-size: 11px; font-weight: 600; }
.file-word { color: #4a6995; background: #edf2f8; }
.file-excel { color: #3d7b5e; background: #ecf4ef; }
.file-ppt { color: #aa7344; background: #fbf1e7; }
.file-pdf { color: #a45d53; background: #f8edea; }
.overlay, .sheet-overlay { background: #28241f55; backdrop-filter: none; }
.modal { border-radius: 14px; box-shadow: 0 20px 70px #28241f26; }
.user-modal { width: min(900px, 100%); }
.user-modal-body { padding-top: 18px; }
.member-form { display: grid; grid-template-columns: 1fr 1.35fr 1fr .8fr auto; align-items: end; gap: 10px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.member-form .field { gap: 5px; }
.member-form label { font-size: 12px; }
.member-form input, .member-form select { min-width: 0; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: #fdfcfb; }
.member-submit { height: 38px; white-space: nowrap; }
.member-list-head { display: flex; align-items: baseline; justify-content: space-between; margin: 20px 0 8px; }
.member-list-head strong { font-size: 14px; }
.member-list-head span { color: #918a81; font-size: 12px; }
.member-row { display: grid; grid-template-columns: minmax(0,1fr) 140px 88px; align-items: center; gap: 12px; min-height: 58px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.member-row:last-child { border-bottom: 0; }
.member-identity strong, .member-identity span { display: block; }
.member-identity strong { font-size: 13px; }
.member-identity span { color: #8b857d; font-size: 12px; }
.member-row select { height: 34px; border: 1px solid var(--line); border-radius: 7px; background: #fff; font-size: 13px; }
.member-state { height: 34px; border: 1px solid var(--line); border-radius: 7px; color: #4d4943; background: #f6f4f1; font-size: 12px; }
.member-state.inactive { color: #9a514c; background: #fbefed; }
.modal-head h2 { font-size: 20px; font-weight: 500; }
.modal-head, .modal-foot { border-color: var(--line); }
.field label { font-size: 14px; font-weight: 500; }
.field input, .field select, .field textarea { border-color: #dfdad2; font-size: 15px; }
.dropzone { background: #faf9f7; border-color: #d5cec4; }
.dropzone b { font-size: 14px; font-weight: 500; }
.close { background: #f5f3ef; color: #81776a; }
.sheet { background: white; }
.sheet-head { color: var(--ink); background: #faf9f7; border-bottom: 1px solid var(--line); }
.sheet-title h2 { font-size: 23px; font-weight: 500; }
.sheet-title p { color: var(--muted); }
.sheet-head .close { color: #81776a; background: #eeeae3; }
.sheet-title { padding-right: 32px; }
.detail-card { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 12px 6px 24px; }
.detail-card h3 { font-weight: 500; font-size: 16px; }
.detail-file strong { font-size: 14px; font-weight: 400; min-width: 0; overflow-wrap: anywhere; }
.fact span, .detail-file small { font-size: 12px; }
.fact strong { font-size: 14px; font-weight: 400; overflow-wrap: anywhere; }
.toast { background: #3c3730; }
@media (max-width: 1180px) {
  main { padding: 36px 30px 70px; }
  .workspace-location > span:not(.location-separator), .location-separator { display: none; }
  .stat:nth-child(-n+2) { border-bottom: 0; }
  .stat:nth-child(2) { border-right: 1px solid var(--line); }
}
@media (max-width: 820px) {
  .app { display: block; padding: 0; }
  .sidebar { height: 68px; top: auto; bottom: 0; padding: 7px 10px; border-top: 1px solid #e2ded8; background: #f6f5f2; }
  .sidebar-create, .brand, .nav-group-label, .sidebar-help { display: none; }
  .nav-item { min-height: 52px; height: auto; padding: 5px; font-size: 12px; gap: 2px; }
  .nav-item .ui-icon { width: 19px; height: 19px; }
  .nav-item.active { box-shadow: none; }
  .shell { min-height: 100vh; border: 0; border-radius: 0; }
  .topbar { height: 60px; gap: 12px; padding: 0 18px; border-radius: 0; }
  .mobile-brand, .shortcut { display: none; }
  .top-actions { display: flex; }
  .top-actions .avatar { display: grid; }
  .workspace-location { font-size: 13px; gap: 8px; flex-shrink: 0; }
  .search { flex: 1; width: auto; }
  .search input { font-size: 13px; padding-right: 10px; }
  .search-popover { left: 16px; right: 16px; top: 54px; width: auto; }
  main { padding: 28px 22px 100px; }
  .product-row { grid-template-columns: minmax(0,1fr) 96px; }
  .page-head { margin-bottom: 25px; gap: 16px; }
  .page-head h1 { font-size: 24px; }
  .stat { padding: 0 14px; }
  .folder-file { grid-template-columns: minmax(0,1fr) 55px; }
  .folder-file-meta:nth-of-type(2) { display: block; }
  .folder-file-meta:nth-of-type(3), .folder-file-action { display: none; }
  .member-form { grid-template-columns: 1fr 1fr; }
  .member-submit { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 0; padding-bottom: 24px; }
  .stat:nth-child(odd) { padding-left: 0; border-right: 1px solid var(--line); }
  .stat:nth-child(even) { padding-right: 0; border-right: 0; }
  .stat strong { font-size: 27px; }
  .stat-foot { white-space: normal; }
  .content-grid { gap: 24px; }
  .product-grid { grid-template-columns: minmax(0,1fr); }
  .head-actions { flex-wrap: wrap; width: 100%; }
  .head-actions .btn { flex: 1; }
  .content-grid .empty-state { padding: 22px 18px; text-align: left; }
  .filter-row input { min-width: 0; width: 100%; flex-basis: 100%; }
  .folder-count { flex: 0 0 auto; }
  .folder-files { padding-left: 10px; padding-right: 10px; }
  .folder-header { gap: 10px; padding: 12px; }
  .folder-file-name { white-space: normal; overflow-wrap: anywhere; }
  .member-form { grid-template-columns: 1fr; }
  .member-submit { grid-column: auto; }
  .member-row { grid-template-columns: minmax(0,1fr) 108px; }
  .member-state { grid-column: 1 / -1; }
}
