.page-admin {
  --line: var(--mist-line, rgba(255,255,255,.25));
  --muted: var(--mist-muted, #d0dae3);
  --accent: var(--mist-ink, #f3f5f7);
  color: var(--mist-ink, #f3f5f7);
  font-size: 15px;
  line-height: 1.6;
}
.admin-shell { width: 100%; max-width: 1720px; margin: 0 auto; padding: 24px 48px 20px; }
.admin-header, .row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-header { justify-content: space-between; gap: 20px; padding: 0 6px 16px; border-bottom: 1px solid var(--line); }
.admin-brand { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 600; letter-spacing: .2px; }
.admin-brand svg { width: 36px; height: 36px; flex: none; }
.admin-header .row { gap: 20px; }
.page-title { margin: 22px 6px 18px; font-family: var(--mist-heading, "Songti SC", "STSong", "SimSun", serif); font-size: 36px; font-weight: 600; letter-spacing: 1px; line-height: 1.3; }
.page-admin h2 { margin: 0; font-family: var(--mist-heading, "Songti SC", "STSong", "SimSun", serif); font-size: 22px; font-weight: 600; line-height: 1.4; }
.page-admin p { line-height: 1.75; }
.page-admin small, .muted { color: var(--muted); font-size: 13px; line-height: 1.7; }
.between { justify-content: space-between; }
#workspace { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; gap: 16px; }
#workspace > * { min-width: 0; }
.panel { border: 1px solid var(--line); border-radius: var(--mist-radius, 20px); padding: 22px 24px; background: var(--mist-panel, rgba(29,53,73,.76)); box-shadow: var(--mist-shadow, 0 14px 45px #12253426); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.toolbar, #createDetails, #roundEmpty, #roundInfo, #authorsPanel { grid-column: 1 / -1; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; border: 1px solid var(--line); border-radius: 18px; padding: 12px 16px; background: var(--mist-panel-soft, rgba(55,79,101,.64)); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.toolbar label { font-size: 14px; color: var(--muted); white-space: nowrap; margin-right: 4px; }
.toolbar select { width: auto; flex: 1; min-width: 200px; max-width: 520px; }
.toolbar #newRound { margin-left: auto; }
.toolbar #newRound, .toolbar #closeRound { min-width: 140px; }
.page-admin button, .page-admin .file { font: inherit; font-size: 14px; min-height: 44px; padding: 8px 18px; border: 1px solid var(--line); border-radius: 999px; background: rgba(88,115,137,.16); color: var(--mist-ink, #f3f5f7); cursor: pointer; touch-action: manipulation; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background-color 160ms ease, border-color 160ms ease, opacity 160ms ease; }
.page-admin button.primary { color: #23374a; background: #f5f3ef; border-color: #f5f3ef; font-weight: 600; }
.page-admin button.danger { color: #ffddd9; border-color: #ddb0b4; background: rgba(116,72,85,.22); }
.page-admin button:disabled { opacity: .45; cursor: default; }
.page-admin button:not(:disabled):active, .page-admin .file:active { background: rgba(150,173,191,.22); }
.page-admin button.primary:not(:disabled):active { background: #e0e4e4; }
.page-admin button:focus-visible, .page-admin .file:focus-within, .page-admin summary:focus-visible, .page-admin input:focus, .page-admin select:focus, .page-admin textarea:focus { outline: 2px solid #f4f4ee; outline-offset: 3px; }
.wide { width: 100%; }
.page-admin input, .page-admin select, .page-admin textarea { font: inherit; font-size: 15px; color: inherit; background: rgba(25,45,64,.56); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-height: 44px; max-width: 100%; }
.page-admin input[type=text], .page-admin input[type=password], .page-admin select, .page-admin textarea { width: 100%; }
.page-admin input::placeholder, .page-admin textarea::placeholder { color: #b7c7d4; opacity: 1; }
.page-admin select option { color: #f3f5f7; background: #30495f; }
.page-admin textarea { resize: vertical; line-height: 1.85; }
.field { display: block; margin: 16px 0 7px; font-size: 14px; color: var(--muted); }
.grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; }
.grid > * { min-width: 0; }
.badge { display: inline-flex; align-items: center; min-height: 28px; padding: 2px 12px; border: 1px solid rgba(213,237,240,.36); border-radius: 999px; color: #d8f4ec; background: rgba(121,167,178,.25); font: 13px/1.5 -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif; }
.badge.closed { color: #d0d9e1; background: rgba(99,113,131,.3); border-color: rgba(221,231,238,.24); }
.connection { color: #d5f2e5; font-size: 13px; }
.connection::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: #a9dfc2; vertical-align: 1px; }
.connection.offline { color: #ffdfbb; }.connection.offline::before { background: #ffcf9c; }
.message { margin: 12px 0; min-height: 22px; color: #dcf5e9; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.75; }
.message:empty { display: none; }.message.error { color: #ffddd9; }
.scopeHint { display: none; margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.scopeHint.previous { display: block; color: #ffe0b3; }
.roundHeading { gap: 16px; }.roundHeading h2 { font-size: 25px; }
.roundHeading > .row { min-width: 0; }.roundHeading h2 { overflow-wrap: anywhere; }
.clock { font-size: 25px; line-height: 1.35; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: .4px; white-space: nowrap; }
.clock.overtime { color: #ffddb1; }
#roundRules { margin: 7px 0 0; font-size: 13px; }
.stats { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); margin: 16px 0 0; padding: 14px 10px; border: 1px solid rgba(230,240,247,.16); border-radius: 13px; background: rgba(141,164,185,.13); }
.stat { min-width: 0; padding: 0 20px; border-left: 1px solid rgba(229,240,247,.24); display: flex; flex-direction: column; gap: 2px; }
.stat:first-child { border-left: 0; }.stat b { order: 1; font-size: 31px; line-height: 1.25; font-weight: 600; font-variant-numeric: tabular-nums; }.stat span { order: 0; color: var(--muted); font-size: 13px; white-space: nowrap; }
.stat:nth-child(3) b { color: #fffde2; }.stat.pending b { color: #ffdfb4; }.stat.error b { color: #ffd4ce; }
#roundInfo > .row:last-child { margin-top: 9px; gap: 6px 16px; }#clockNote { margin: 0; font-size: 12px; }#lastUpdated { font-size: 12px; font-variant-numeric: tabular-nums; }
.note { border: 1px solid rgba(231,240,248,.18); border-radius: 10px; padding: 12px; background: rgba(45,68,87,.65); color: var(--muted); font-size: 13px; line-height: 1.8; }
.banner { margin-top: 14px; border: 1px solid #cfa9a4; border-radius: 12px; padding: 12px 14px; color: #ffe0d5; background: rgba(110,68,69,.38); line-height: 1.7; }
#authorsPanel { min-height: 420px; }#authorsPanel > .row { gap: 8px; }#authorCount { font-family: -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif; font-size: 13px; margin-left: 8px; }
#authorsPanel > .row > small { font-size: 12px; }
.tableWrap { max-height: 420px; overflow: auto; overscroll-behavior: contain; margin-top: 16px; scrollbar-color: #b6c8d3 transparent; scrollbar-width: thin; }
.page-admin table { width: 100%; min-width: 640px; border-collapse: collapse; text-align: left; white-space: nowrap; font-size: 14px; }
.page-admin th { position: sticky; top: 0; z-index: 1; background: #435f76; color: #dfE8ef; font-weight: 500; font-size: 12px; }
.page-admin th, .page-admin td { padding: 10px 12px; border-bottom: 1px solid rgba(225,237,247,.19); font-variant-numeric: tabular-nums; }
.page-admin th:not(:first-child):not(:last-child), .page-admin td:not(:first-child):not(:last-child) { text-align: right; }
.page-admin th:last-child, .page-admin td:last-child { text-align: right; }
.page-admin td.name { min-width: 110px; max-width: 220px; white-space: normal; overflow-wrap: anywhere; }
.page-admin tr.selected td { background: rgba(177,206,226,.23); }.page-admin tr.selected td:first-child { box-shadow: inset 3px 0 #dec7d3; }
.page-admin td.pending { color: #ffdfb4; }.page-admin td.error { color: #ffd4ce; }
.page-admin .tableButton { font-size: 12px; padding: 6px 12px; min-height: 34px; white-space: nowrap; }
.empty { color: var(--muted); text-align: center; padding: 32px 16px; line-height: 1.8; }
#resultPanel { grid-column: 1 / -1; min-width: 0; scroll-margin-top: 20px; }
#resultPanel > .row:first-child { gap: 8px; flex-wrap: nowrap; align-items: flex-start; }
#resultPanel h2 { font-size: 20px; overflow-wrap: anywhere; min-width: 0; flex: 1; }
#resultPanel > .row:first-child > .row { gap: 6px; flex-shrink: 0; }
#resultPanel > .row:first-child button { min-height: 32px; padding: 4px 12px; font-size: 12px; }
.resultStats { margin: 8px 0 12px; color: var(--muted); font-size: 13px; line-height: 1.8; }
#resultPanel #copyClean { min-height: 38px; padding: 6px 16px; font-size: 13px; }
.page-admin pre.output { min-height: 130px; max-height: 238px; overflow: auto; overscroll-behavior: contain; margin: 12px 0; padding: 12px 14px; border: 1px solid rgba(231,241,247,.17); border-radius: 12px; background: rgba(31,52,71,.38); white-space: pre-wrap; overflow-wrap: anywhere; font: 15px/1.95 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif; scrollbar-width: thin; scrollbar-color: #b6c8d3 transparent; }
.page-admin details { min-width: 0; }.page-admin summary { position: relative; cursor: pointer; min-height: 44px; padding: 11px 32px 11px 0; list-style: none; color: inherit; line-height: 1.5; font-size: 14px; }
.page-admin summary::-webkit-details-marker { display: none; }.page-admin summary::after { content: '›'; position: absolute; right: 4px; top: 6px; font: 24px/1.3 -apple-system,BlinkMacSystemFont,sans-serif; color: var(--muted); }
.page-admin details[open] > summary::after { transform: rotate(90deg); }.page-admin details[open] > summary { margin-bottom: 12px; }
#resultPanel details { margin-top: 6px; border: 1px solid rgba(226,239,247,.2); border-radius: 9px; padding: 0 10px; background: rgba(156,167,181,.08); }
.removed { padding: 10px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }.removed p { margin: 3px 0; }
.batch { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; font-size: 13px; }
#settings, #exportDetails, #advanced { grid-column: span 4; padding: 6px 22px; min-width: 0; }
#settings[open], #exportDetails[open], #advanced[open] { grid-column: 1 / -1; padding-bottom: 22px; }
#settings > summary, #exportDetails > summary, #advanced > summary { font-size: 15px; }
#advanced > summary .extended-label { display: none; }
.subsection { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.member-settings > summary { font-size: 17px; }
.member-settings > summary small { margin-left: 10px; }
.member-list { display: grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 10px; margin-top: 14px; }
.member-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(141,164,185,.1); }
.member-card.inactive { background: rgba(30,46,62,.3); }
.member-identity { display: flex; flex-direction: column; gap: 2px; }
.member-identity strong { font-weight: 500; font-variant-numeric: tabular-nums; }
.member-status { color: #dcf5e9; white-space: pre-wrap; }
.member-status:empty { display: none; }.member-status.error { color: #ffddd9; }
.member-settings .linkRow { align-items: center; flex-wrap: wrap; }
.member-settings #memberNumbers { flex: 1; min-width: 200px; }
.linkRow { display: flex; gap: 10px; margin-top: 8px; }.linkRow input { flex: 1; min-width: 0; font-size: 13px; }.linkRow button { white-space: nowrap; }
.mini { font-size: 13px; }.footer { margin: 16px 0 0; text-align: center; color: #d0dbe4; font-size: 12px; line-height: 1.8; }.footer a { color: inherit; text-decoration: none; }.footer a:hover { text-decoration: underline; }
.login { max-width: 440px; margin: 64px auto; }.login h2 { font-size: 26px; }.login .mini { margin-bottom: 0; }
.page-admin dialog { width: calc(100% - 40px); max-width: 480px; padding: 26px; border: 1px solid rgba(239,246,250,.45); border-radius: 20px; color: var(--mist-ink, #f3f5f7); background: rgba(42,66,86,.95); box-shadow: 0 28px 80px #13253666; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.page-admin dialog::backdrop { background: rgba(14,29,43,.62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.dialogActions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.page-admin [hidden] { display: none !important; }
@supports selector(:has(*)) {
  #workspace:has(#resultPanel:not([hidden])) #authorsPanel { grid-column: 1 / 8; }
  #resultPanel { grid-column: 8 / -1; }
}
@media (hover:hover) and (pointer:fine) {
  .page-admin button:not(:disabled):hover, .page-admin .file:hover { border-color: rgba(246,249,252,.75); background: rgba(164,185,201,.18); }
  .page-admin button.primary:not(:disabled):hover { color: #23374a; background: #ffffff; border-color: #ffffff; }
  .page-admin button.danger:not(:disabled):hover { color: #fff0ec; background: rgba(151,91,101,.33); border-color: #f3cbd0; }
  .page-admin tbody tr:not(.selected):hover td { background: rgba(176,203,222,.09); }
}
@media (max-width:1180px) {
  .admin-shell { padding: 24px 28px; }
  #resultPanel, #workspace:has(#resultPanel:not([hidden])) #authorsPanel { grid-column: 1 / -1; }
  #authorsPanel { min-height: 0; }
  .stat { padding: 0 14px; }
}
@media (max-width:760px) {
  .admin-shell { padding: 20px 16px; }.admin-header { padding-inline: 0; }.admin-brand { font-size: 18px; }.admin-header .row { gap: 12px; width: 100%; justify-content: space-between; }
  .page-title { font-size: 32px; margin: 20px 0 16px; }.panel { padding: 18px 16px; }
  .toolbar { padding: 14px; gap: 8px; }.toolbar label { width: 100%; }.toolbar select { min-width: 0; max-width: none; flex-basis: calc(100% - 76px); }.toolbar #newRound { margin-left: 0; }.toolbar #newRound, .toolbar #closeRound { flex: 1; min-width: 0; }
  .roundHeading { align-items: flex-start; }.roundHeading h2 { font-size: 22px; }.clock { font-size: 22px; }
  .stats { grid-template-columns: repeat(3,minmax(0,1fr)); padding: 12px 4px; row-gap: 18px; }.stat { padding: 0 12px; }.stat:nth-child(4) { border-left: 0; }.stat b { font-size: 28px; }.stat span { font-size: 12px; }
  .grid { grid-template-columns: 1fr; }.linkRow { flex-wrap: wrap; }.linkRow input { flex-basis: 100%; }
  #settings, #exportDetails, #advanced { grid-column: 1 / -1; padding-inline: 16px; }
  #resultPanel > .row:first-child { flex-wrap: wrap; }#resultPanel h2 { flex-basis: 100%; }
  .page-admin .tableButton { min-height: 44px; }.page-admin input, .page-admin select, .page-admin textarea { font-size: 16px; }
}
@media (prefers-reduced-motion:reduce) { .page-admin *, .page-admin *::before, .page-admin *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
