:root {
  font: 15px/1.55 "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #22382d;
  background: #f5f7f3;
  --green: #245b47;
  --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: #fff; border-bottom: 1px solid var(--line); }
.bar, .workspace { width: min(1180px, calc(100% - 9vw)); margin-inline: auto; }
.bar, .brand, nav, .actions, .location, .panel-top, .primary, .secondary, .category { display: flex; align-items: center; }
.bar { gap: clamp(24px, 5vw, 72px); min-height: 76px; }
.brand { gap: 12px; white-space: nowrap; }
.brand b { font-size: 19px; letter-spacing: .02em; }
.brand small { font-size: 13px; color: var(--muted); border-left: 1px solid #ccd8cf; padding-left: 11px; }
.brand-mark { display: grid; gap: 3px; align-content: center; justify-content: center; width: 33px; height: 36px; background: var(--green); border-radius: 8px; }
.brand-mark i { width: 18px; height: 8px; border: 1.5px solid #d6ebe1; border-radius: 2px; position: relative; }
.brand-mark i::before { content: ''; position: absolute; width: 6px; top: 2px; left: 4.5px; border-top: 1px solid #d6ebe1; }
nav { align-self: stretch; gap: 28px; }
nav button { padding: 0 2px; border-bottom: 3px solid transparent; margin-top: 3px; color: var(--muted); }
nav button[aria-pressed=true] { border-color: var(--green); color: var(--green); font-weight: 650; }
.exit { margin-left: auto; font-size: 13px; color: var(--muted); padding: 8px; }
.workspace { padding: clamp(32px, 5vw, 64px) 0 64px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(30px, 3.3vw, 46px); letter-spacing: -.04em; font-weight: 650; line-height: 1.23; margin-bottom: 30px; }
h2 { font-size: 21px; line-height: 1.4; font-weight: 620; 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: 18px; }
.panel-top { justify-content: space-between; gap: 16px; padding: 25px 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: 12px; color: var(--muted); background: #f6f8f4; padding-block: 11px; border-block: 1px solid var(--line); }
.row { min-height: 74px; 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: flex; 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); }
  .bar { flex-wrap: wrap; gap: 0; min-height: 60px; padding-top: 12px; }
  .brand { min-height: 38px; margin-bottom: 10px; } .exit { order: 1; margin-bottom: 10px; }
  nav { order: 2; width: 100%; height: 46px; gap: 26px; }
  .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); }
}
