:root {
  color-scheme: light;
  font: 100%/1.6 Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #172923; background: #f5f6ef;
  --accent: #214f3e; --muted: #4d6258; --line: #ccd5cb; --paper: #fffffb;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: var(--accent); }
button, input, textarea { font: inherit; }
button, .button-link { min-height: 2.5rem; padding: .35rem .8rem; border: 1px solid #9aaea1; border-radius: .35rem; color: var(--accent); background: var(--paper); cursor: pointer; }
.button-link { display: inline-flex; align-items: center; text-decoration: none; }
button:hover, .button-link:hover { background: #eaf2e9; }
button:disabled { opacity: .68; cursor: wait; }
:focus-visible { outline: 3px solid #307957; outline-offset: 3px; }
.primary { color: white; background: var(--accent); border-color: var(--accent); }
.primary:hover { background: #2b634d; }
.shell { max-width: 84rem; margin: auto; padding: 0 clamp(1rem, 4vw, 3.2rem) 3rem; }
.masthead, nav, .section-heading, .actions, .row-actions { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.masthead { min-height: 4.25rem; border-bottom: 1px solid var(--line); }
.brand { color: var(--accent); font-weight: 730; text-decoration: none; }
.brand span { margin-left: .25rem; font-size: .86rem; font-weight: 550; }
nav { justify-content: flex-end; }
main { padding-top: clamp(1.5rem, 4vw, 3rem); }
.eyebrow { margin: 0 0 .25rem; color: var(--muted); font-size: .86rem; }
h1, h2, h3 { margin: 0; line-height: 1.32; }
h1 { margin-bottom: 1rem; font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -.025em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: .55rem 0; }
.layout { display: grid; grid-template-columns: minmax(17rem, .85fr) minmax(0, 1.6fr); gap: 1rem; align-items: start; }
.panel { min-width: 0; padding: clamp(1rem, 3vw, 1.5rem); border: 1px solid var(--line); border-radius: .55rem; background: var(--paper); }
.users-panel { position: sticky; top: 1rem; }
.create-form { display: grid; gap: .45rem; margin: 1rem 0; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
input, textarea { width: 100%; min-width: 0; min-height: 2.65rem; padding: .4rem .6rem; border: 1px solid #8da498; border-radius: .3rem; background: white; }
small, .muted, .feedback { color: var(--muted); font-size: .88rem; }
.create-form button { justify-self: start; margin-top: .3rem; }
.user-list { list-style: none; padding: 0; margin: .6rem 0; }
.user-list li + li { border-top: 1px solid var(--line); }
.user-choice { width: 100%; display: grid; gap: .08rem; padding: .65rem .45rem; border-color: transparent; text-align: start; }
.user-choice[aria-current="true"] { background: #eaf2e9; border-color: #91aa99; }
.user-choice strong { overflow-wrap: anywhere; }
.user-choice span, .meta { color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.feedback:empty { display: none; }
.feedback[data-error="true"] { color: #943b2d; }
.detail-panel > h2 { margin-bottom: .35rem; }
.detail-section { margin-top: 1.35rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.detail-section h3 { margin-bottom: .65rem; }
.identity-list { list-style: none; margin: 0; padding: 0; }
.identity-list li { display: flex; justify-content: space-between; align-items: flex-start; gap: .8rem; padding: .65rem 0; border-top: 1px solid #e2e8df; }
.identity-main { min-width: 0; overflow-wrap: anywhere; }
.identity-main strong { display: block; }
.inline-form { display: flex; gap: .5rem; align-items: end; flex-wrap: wrap; margin: .75rem 0; }
.inline-form label { display: grid; flex: 1 1 12rem; gap: .25rem; }
.row-actions { justify-content: flex-end; flex-wrap: wrap; }
.danger { color: #8b3027; }
.state { display: inline-flex; border-radius: 999px; padding: .05rem .55rem; background: #e7f0e8; color: #285541; font-size: .82rem; }
.state.off { color: #6d4e27; background: #f5edda; }
dialog { width: min(36rem, calc(100% - 1.5rem)); max-height: calc(100dvh - 2rem); padding: clamp(1rem, 4vw, 1.6rem); border: 1px solid #a8b6aa; border-radius: .55rem; color: inherit; background: var(--paper); box-shadow: 0 14px 70px #23392d38; }
dialog::backdrop { background: #182b22a1; }
dialog label { display: block; margin: .8rem 0 .3rem; font-weight: 650; }
dialog textarea { resize: vertical; overflow-wrap: anywhere; }
.actions { justify-content: flex-start; flex-wrap: wrap; margin-top: .8rem; }
@media (max-width: 52rem) { .layout { grid-template-columns: minmax(0, 1fr); } .users-panel { position: static; } }
@media (max-width: 35rem) { .masthead { align-items: flex-start; padding: .85rem 0; } nav { flex-wrap: wrap; } .identity-list li { display: grid; } }
