:root {
  font: 15px/1.55 "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #22382d;
  background: #f5f7f4;
  --green: #205545;
  --muted: #637469;
  --line: #e0e7df;
  --pad: clamp(20px, 3vw, 36px);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select, a { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; border: 0; background: transparent; color: inherit; }
button:disabled { opacity: .5; cursor: wait; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #70a68a; outline-offset: 3px; }
.masthead { background:#193f35; color:#f4faf6; }
.bar, .workspace { width:min(1184px,calc(100% - 96px)); margin-inline:auto; }
.bar,.brand,nav,.actions,.location,.panel-top,.primary,.secondary,.category { display:flex;align-items:center; }
.bar { min-height:76px; gap:clamp(32px,5vw,80px); }
.brand { gap:12px;white-space:nowrap; }
.brand b,.brand small { display:block; }
.brand b { font-size:18px;line-height:1.35;font-weight:600; }
.brand small { font-size:11px;color:#c0d3c9;margin-top:2px; }
.brand-mark { display:grid;gap:4px;align-content:center;justify-content:center;width:36px;height:40px;border:1px solid #7c9a8c;border-radius:9px; }
.brand-mark i { position:relative;width:19px;height:9px;border:1.5px solid #e1efe6;border-radius:2px; }
.brand-mark i::before { content:'';position:absolute;width:6px;top:2px;left:5px;border-top:1.5px solid #e1efe6; }
nav { gap:6px; }
nav button,nav a { display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:40px;padding:8px 16px;border-radius:8px;color:#cfdfd6;text-decoration:none;font-size:14px;font-weight:500;white-space:nowrap; }
nav button:hover,nav a:hover,.exit:hover { background:#2a5145;color:white; }
nav button[aria-pressed=true],nav a[aria-current=page] { background:#edf4ed;color:#184736;font-weight:600; }
.ui-icon { flex:none;width:18px;height:18px; }
.exit { display:flex;align-items:center;gap:6px;border-radius:8px;margin-left:auto;color:#cbdcd2;font-size:13px;padding:8px;white-space:nowrap; }
.workspace { padding:40px 0 64px; }
h1,h2,p {margin:0;}
h1 {font-size:clamp(27px,3vw,36px);line-height:1.25;font-weight:650;letter-spacing:0;margin-bottom:28px;}
h2 {font-size:20px;line-height:1.4;font-weight:600;overflow-wrap:anywhere;}
.categories { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: clamp(26px, 3vw, 42px); }
.category { justify-content: flex-start; gap: 12px; padding: 14px 16px; min-height: 66px; font-weight: 600; background: #fff; border-radius: 12px; border: 1px solid var(--line); }
.category:hover, .secondary:hover { border-color: #a2b9a9; }
.category[aria-pressed=true] { border-color: #67947d; background: #e6f0e6; color: #214d38; box-shadow: inset 0 -2px #67947d; }
.glyph { display: grid; place-items: center; width: 34px; height: 36px; border-radius: 9px; flex: none; background: #f0f1ea; }
.glyph img { width: 22px; height: 22px; }
.glyph.word { background:#e8eff7; } .glyph.excel { background:#e2f0e6; } .glyph.pdf { background:#f8eae4; }
.glyph.image { background:#f1eaf4; } .glyph.video { background:#e5eff2; } .glyph.folder { background:#f5edda; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.panel-top { justify-content:space-between;gap:16px;padding:22px var(--pad); }
.location { gap: 8px; min-width: 0; }
.back { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 8px; background: #f0f4ef; }
.back img { width: 20px; }
.actions { gap: 10px; flex-shrink: 0; }
.primary, .secondary { justify-content: center; gap: 8px; min-height: 42px; padding: 9px 16px; border-radius: 9px; font-weight: 550; }
.primary { background: var(--green); color: #fff; }
.primary:hover { background: #174631; }
.secondary { background: #fff; border: 1px solid #c9d8cc; color: var(--green); }
.actions img { width: 19px; height: 19px; }
.file-grid { display: grid; align-items: center; grid-template-columns: minmax(0, 1fr) 15% 19% 50px; gap: 12px; padding-inline: var(--pad); }
.list-head { font-size: 13px; color: var(--muted); background: #f3f6f2; padding-block: 11px; border-block: 1px solid var(--line); }
.row { min-height: 68px; border-bottom: 1px solid #e9ede7; }
.row:last-child { border-bottom: 0; }
.file-name { display: inline-flex; align-items: center; gap: 14px; min-width: 0; justify-self: start; max-width: 100%; padding: 8px 0; color: inherit; font-weight: 550; text-decoration: none; text-align: left; }
.file-name:hover span:last-child { text-decoration: underline; text-underline-offset: 3px; }
.file-name span:last-child, .member-name { min-width: 0; overflow-wrap: anywhere; }
.size, time, .count { font-size: 13px; color: var(--muted); }
.more { justify-self: end; position: relative; }
.more summary { display: grid; place-items: center; width: 42px; height: 40px; border-radius: 9px; color: var(--green); cursor: pointer; list-style: none; font-size: 22px; line-height: 1; }
.more summary::-webkit-details-marker { display: none; }
.more[open] summary, .more summary:hover { background: #edf3ed; }
.menu { position: absolute; right: 0; top: 100%; z-index: 2; width: 140px; padding: 5px; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 8px 22px #203b281b; }
.menu button, .menu a { display: block; text-align: left; width: 100%; padding: 8px 12px; border-radius: 6px; color: inherit; text-decoration: none; }
.menu button:hover, .menu a:hover { background: #f0f4ee; }
.menu .danger { color: #99483e; }
.empty { min-height: 260px; padding: 52px 20px; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; }
.empty strong { font-size: 17px; font-weight: 550; }
.empty p { margin-top: 6px; color: var(--muted); font-size: 14px; }
.archive-art { position: relative; width: 86px; height: 63px; margin-bottom: 20px; }
.archive-art::before, .archive-art::after, .archive-art i, .archive-art b { content: ''; position: absolute; }
.archive-art::before { left: 6px; bottom: 7px; width: 70px; height: 42px; background: #9cb9a6; border-radius: 5px; transform: rotate(-7deg); }
.archive-art i { left: 11px; top: 4px; width: 31px; height: 12px; background: #9cb9a6; border-radius: 5px 5px 0 0; transform: rotate(-7deg); }
.archive-art b { width: 58px; height: 37px; left: 19px; top: 11px; border: 1px solid #abc1b0; border-radius: 4px; background: #fffef4; transform: rotate(4deg); }
.archive-art::after { left: 7px; bottom: 3px; width: 73px; height: 36px; background: #bfd6bb; border: 1px solid #9cb696; border-radius: 5px 6px 9px 7px; transform: skewX(-6deg); }
.members-layout { display: grid; grid-template-columns: minmax(280px, .76fr) minmax(0, 1.4fr); align-items: start; gap: 26px; }
.grant, .login-fields { padding: var(--pad); }
.grant form, #loginForm { margin-top: 27px; }
form, label { display: grid; }
form { gap: 21px; }
label { gap: 8px; font-size: 14px; font-weight: 550; }
input, select { min-width: 0; width: 100%; border: 1px solid #cdd8cf; border-radius: 8px; padding: 11px 12px; color: inherit; background: white; }
input::placeholder { color: #77857c; font-size: 14px; }
.grant .primary { justify-self: start; margin-top: 3px; }
.member-panel .panel-top { border-bottom: 1px solid var(--line); }
.member-row { display: grid; grid-template-columns:minmax(0,1fr) auto 40px; gap: 14px; align-items: center; padding: 14px var(--pad); min-height: 72px; }
.member-name { flex: 1; }
.member-state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; color: var(--muted); }
.member-state::before { content:''; width: 7px; height: 7px; border-radius: 50%; background: #aaa; }
.member-state.approved::before { background: #599370; }
.revoke { color: #925145; font-size: 13px; }
.empty-symbol { width: 50px; height: 50px; margin-bottom: 17px; padding: 11px; border-radius: 14px; background: #e9f1e8; }
.login-panel { display: grid; grid-template-columns: .85fr 1.15fr; width: min(740px, 90%); margin: clamp(44px, 13vh, 140px) auto; overflow: hidden; }
.login-art { display: grid; place-items: center; background: #e1ecde; min-height: 290px; }
.login-art .archive-art { transform: scale(2.1); margin: 0; }
.login-fields { padding: clamp(26px, 4vw, 52px); }
.login-fields h1 { font-size: 32px; }
dialog { width: min(450px, 92vw); color: inherit; padding: 30px; background: white; border: 1px solid var(--line); border-radius: 16px; }
dialog::backdrop { background: #1c32294f; }
.dialog-actions { justify-content: flex-end; }
.notice:not(:empty) { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); max-width: 90vw; width: max-content; padding: 12px 20px; background: #254837; color: #fff; border-radius: 10px; z-index: 3; box-shadow: 0 6px 24px #1a292322; }
.error { color: #923e33; }.error:empty { display: none; }
@media(max-width:900px) {
  .category { padding: 12px 9px; gap: 7px; }
  .bar, .workspace { width: calc(100% - 48px); }
}
@media(max-width:700px) {
  .bar, .workspace { width: calc(100% - 32px); }
  .workspace {padding-top:24px;}
  .bar {flex-wrap:wrap;gap:0;min-height:60px;padding-block:12px 8px;}
  .brand {min-height:36px;}.brand b {font-size:16px;}.brand-mark {width:32px;height:36px;}
  .exit {order:1;}.bar:has(nav[hidden]) {padding-bottom:12px;}
  nav {order:2;width:100%;gap:4px;margin-top:12px;}
  nav a,nav button {flex:1;gap:6px;padding:8px 4px;min-height:40px;font-size:13px;}
  nav .ui-icon {width:16px;height:16px;}
  .categories { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
  .category { justify-content: center; min-height: 48px; font-size: 14px; }
  .category .glyph { width: 26px; height: 28px; } .category img { width: 18px; }
  .panel-top { flex-wrap: wrap; padding-block: 20px; }
  .library .actions { width: 100%; } .library .actions button { flex: 1; padding-inline: 8px; }
  .file-grid { grid-template-columns: minmax(0,1fr) 38px; }
  .list-head span:nth-child(2), .list-head span:nth-child(3), .file-grid .size, .file-grid time { display: none; }
  .empty { min-height: 210px; }
  .members-layout { grid-template-columns: 1fr; gap: 20px; }
  .member-row { gap: 8px; }
  .login-panel { grid-template-columns: 1fr; max-width: 420px; }
  .login-art { min-height: 108px; } .login-art .archive-art { transform: scale(1.05); }
}
.sr-only {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
.section-title {display:flex;align-items:center;gap:12px;min-width:0;}
.muted {color:var(--muted);font-size:14px;}
.dialog-title {display:flex;align-items:center;justify-content:space-between;gap:16px;}
.close-dialog {display:grid;place-items:center;width:36px;height:36px;border-radius:8px;color:var(--muted);}
.close-dialog:hover {background:#edf2ed;}
dialog {max-height:calc(100dvh - 32px);overflow-y:auto;}
.primary:active,.secondary:active {transform:translateY(1px);}
.file-grid.row:hover,.member-row:hover {background:#f8faf7;}
@media(max-width:380px){nav a,nav button {gap:4px;}.category {gap:4px;padding-inline:4px;}.brand small {font-size:10px;}}
