:root {
  color-scheme: light;
  --ink: #2e2518;
  --muted: #746852;
  --paper: #f8edcb;
  --paper-2: #f1dca4;
  --paper-3: #e7c77c;
  --line: #b89a59;
  --line-dark: #7d6334;
  --accent: #8b5e23;
  --accent-dark: #5d3b13;
  --blue: #2f648f;
  --danger: #9d3b33;
  --success: #3d6f42;
  --topbar-height: 68px;
  --rail-width: 72px;
  --drawer-width: 360px;
  --member-width: 265px;
  font-family: Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: #d7c69b; color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
.hidden { display: none !important; }
.eyebrow { margin: 0 0 4px; font: 700 10px/1.2 ui-sans-serif, system-ui, sans-serif; letter-spacing: .17em; color: #315f86; }

.role-screen {
  min-height: 100%; display: grid; place-items: center; padding: 28px;
  background:
    linear-gradient(rgba(247,232,190,.92), rgba(236,210,152,.92)),
    repeating-linear-gradient(0deg, transparent 0 6px, rgba(80,53,18,.025) 7px 8px),
    radial-gradient(circle at 18% 18%, #eff4f4, transparent 34%),
    #d8c293;
}
.role-card {
  position: relative; width: min(980px, 100%); padding: 38px 40px 32px;
  border: 1px solid #9e7c3d; border-radius: 18px;
  background:
    linear-gradient(rgba(255,250,232,.96), rgba(247,233,197,.96)),
    repeating-linear-gradient(90deg, transparent 0 9px, rgba(89,57,17,.03) 10px 11px);
  box-shadow: 0 28px 80px rgba(57,42,18,.28), inset 0 0 0 5px rgba(255,255,255,.34);
}
.role-card::before, .role-card::after { content: ""; position: absolute; inset: 12px; border: 1px solid rgba(120,87,36,.25); border-radius: 11px; pointer-events: none; }
.role-card::after { inset: 18px; border-style: dashed; opacity: .45; }
.role-brand-mark { position: absolute; right: 40px; top: 31px; font-size: 55px; color: rgba(113,76,26,.35); }
.role-card h1 { margin: 0; font-size: clamp(42px, 6vw, 66px); line-height: .95; }
.intro { max-width: 700px; margin: 15px 0 27px; color: var(--muted); font-size: 17px; line-height: 1.5; }
.role-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.role-choice {
  position: relative; min-height: 176px; padding: 24px 20px 20px; text-align: left;
  border: 1px solid #b19150; border-radius: 12px;
  background: linear-gradient(145deg, rgba(255,254,247,.9), rgba(242,220,166,.65));
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.4);
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.role-choice:hover { transform: translateY(-3px); border-color: #6d4a19; box-shadow: 0 10px 25px rgba(74,49,17,.16), inset 0 0 0 2px rgba(255,255,255,.58); }
.role-icon { display: block; margin-bottom: 10px; font-size: 30px; color: #715020; }
.role-choice strong { display: block; margin-bottom: 8px; font-size: 25px; }
.role-choice span:last-child { font-family: ui-sans-serif, system-ui, sans-serif; color: #665d4d; line-height: 1.5; font-size: 14px; }
.beta-note { margin: 18px 0 0; font: 12px/1.4 ui-sans-serif, system-ui, sans-serif; color: #786a52; }

.app { height: 100%; display: grid; grid-template-rows: var(--topbar-height) minmax(0,1fr); }
.topbar {
  z-index: 20; display: grid; grid-template-columns: minmax(230px,1fr) auto minmax(260px,1fr); align-items: center; gap: 18px;
  padding: 0 14px 0 18px; border-bottom: 1px solid #8d6a2b;
  background:
    linear-gradient(180deg, #ecd08e, #dcb86c),
    repeating-linear-gradient(90deg, transparent 0 12px, rgba(82,49,11,.04) 13px 14px);
  box-shadow: 0 3px 14px rgba(55,39,16,.24);
}
.brand-block { min-width: 0; display: flex; align-items: center; gap: 11px; }
.brand-hex { font-size: 32px; color: #614019; }
.brand-block h1 { margin: 0; font-size: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.world-meta { display: flex; align-items: center; gap: 7px; }
.meta-pill { max-width: 260px; padding: 7px 11px; border: 1px solid rgba(94,64,21,.35); border-radius: 999px; background: rgba(255,250,226,.55); font: 12px/1 ui-sans-serif, system-ui, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { justify-self: end; display: flex; align-items: center; gap: 7px; }
.top-button { min-height: 34px; padding: 0 11px; border: 1px solid #8e6b31; border-radius: 7px; background: rgba(255,249,226,.72); }
.top-button:hover { background: #fff4cf; }
.zoom-label { min-width: 52px; text-align: center; font: 12px ui-sans-serif, system-ui, sans-serif; }

.workspace { min-height: 0; display: grid; grid-template-columns: var(--rail-width) var(--drawer-width) minmax(0,1fr) var(--member-width); }
.tool-rail {
  z-index: 12; display: flex; flex-direction: column; align-items: stretch; gap: 3px; padding: 9px 7px;
  border-right: 1px solid #9d7c3f;
  background: linear-gradient(180deg, #f1d99e, #e8ca82);
  box-shadow: 2px 0 8px rgba(66,45,16,.13);
}
.rail-button {
  min-height: 59px; padding: 6px 3px; border: 1px solid transparent; border-radius: 8px; background: transparent;
  display: grid; place-items: center; align-content: center; gap: 3px;
}
.rail-button span { font-size: 22px; line-height: 1; }
.rail-button small { font: 9px/1 ui-sans-serif, system-ui, sans-serif; }
.rail-button:hover { background: rgba(255,250,226,.58); border-color: rgba(107,72,23,.3); }
.rail-button.active { background: #f7e8bc; border-color: #8b5e22; box-shadow: inset 0 0 0 1px rgba(255,255,255,.55); }

.drawer {
  z-index: 10; min-width: 0; overflow-y: auto; overflow-x: hidden; border-right: 1px solid #9c8353;
  background:
    linear-gradient(rgba(250,239,206,.97), rgba(244,225,177,.97)),
    repeating-linear-gradient(0deg, transparent 0 7px, rgba(89,57,17,.025) 8px 9px);
  scrollbar-color: #a37d3a #ecd69d;
}
.drawer.closed { display: none; }
.drawer-head { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 11px; border-bottom: 1px solid #bea063; background: rgba(246,229,184,.96); backdrop-filter: blur(7px); }
.drawer-head h2 { margin: 0; font-size: 24px; }
.small-icon-button { width: 34px; height: 34px; border: 1px solid #a28754; border-radius: 7px; background: #fff5d8; font-size: 22px; }
.tool-panel { display: none; padding: 14px; }
.tool-panel.active { display: block; }
.tool-panel h3 { margin: 0 0 9px; font-size: 16px; }
.selection-card { display: flex; align-items: center; gap: 12px; padding: 13px; border: 1px solid #b59658; border-radius: 10px; background: rgba(255,250,229,.7); }
.selection-card.small { padding: 10px 12px; }
.selection-card span { display: block; color: var(--muted); font: 11px ui-sans-serif, system-ui, sans-serif; }
.selection-card strong { display: block; margin-top: 3px; }
.selection-symbol { font-size: 28px; color: #805819; }
.data-list { margin: 12px 0; border-top: 1px solid #c7ae76; }
.data-list div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 2px; border-bottom: 1px solid #d6bf8b; }
.data-list dt { color: var(--muted); }
.data-list dd { margin: 0; font-weight: 700; text-align: right; }
.primary-button { width: 100%; min-height: 39px; margin-top: 9px; border: 1px solid #674317; border-radius: 7px; background: linear-gradient(#a97b38,#80551f); color: #fff8df; font-weight: 700; box-shadow: inset 0 1px rgba(255,255,255,.22); }
.primary-button:hover:not(:disabled) { background: linear-gradient(#b98b43,#8b6026); }
.hint { margin: 9px 0 0; color: #6e624f; font: 11px/1.45 ui-sans-serif, system-ui, sans-serif; }

.brush-row, .section-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brush-row { padding: 9px 0 12px; border-bottom: 1px solid #c7aa6e; }
.segmented { display: grid; grid-auto-flow: column; gap: 4px; }
.brush-button { min-width: 42px; height: 31px; border: 1px solid #a58955; border-radius: 6px; background: #fff6dc; }
.brush-button.active { border-color: #664414; background: #dcb96d; box-shadow: inset 0 0 0 1px rgba(255,255,255,.45); }
.terrain-categories, .icon-categories { margin-top: 10px; }
.category { margin-bottom: 10px; border: 1px solid #c3a568; border-radius: 9px; overflow: hidden; background: rgba(255,250,230,.5); }
.category summary { cursor: pointer; padding: 9px 11px; background: rgba(224,193,123,.5); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; user-select: none; }
.terrain-grid, .icon-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; padding: 8px; }
.terrain-button, .map-icon-button { min-width: 0; min-height: 38px; padding: 5px 7px; border: 1px solid #b89c66; border-radius: 6px; background: #fff8e3; text-align: left; display: flex; align-items: center; gap: 7px; overflow: hidden; }
.terrain-button:hover, .map-icon-button:hover { border-color: #78501e; background: #fff1c9; }
.terrain-button.active, .map-icon-button.active { border-color: #613b0d; box-shadow: inset 0 0 0 1px #9c6b24; background: #ecd08a; }
.terrain-button .swatch { position: relative; flex: 0 0 26px; width: 26px; height: 25px; border: 1px solid rgba(57,42,17,.45); border-radius: 5px; display: grid; place-items: center; font-size: 14px; background: var(--swatch); overflow: hidden; }
.terrain-button .label, .map-icon-button .label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.map-icon-button .icon-preview { flex: 0 0 27px; width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid #9b7b42; border-radius: 50%; background: #f9e8b9; font-size: 15px; }

.aura-card, .tool-description { margin-top: 13px; padding: 12px; border: 1px solid #b99b60; border-radius: 9px; background: rgba(255,250,231,.64); }
.tool-description { display: grid; gap: 4px; }
.tool-description span { color: var(--muted); font: 12px/1.4 ui-sans-serif, system-ui, sans-serif; }
.section-title-row h3 { margin: 0; }
.section-title-row > span { padding: 3px 8px; border-radius: 999px; background: #ddc17e; font: 11px ui-sans-serif, system-ui, sans-serif; }
label { display: block; margin-top: 10px; font-size: 12px; font-weight: 700; }
input[type="text"], input[type="file"], select, textarea { width: 100%; margin-top: 5px; border: 1px solid #aa8d56; border-radius: 6px; background: #fffaf0; }
input[type="text"], select { height: 36px; padding: 0 9px; }
input[type="file"] { min-height: 36px; padding: 6px; font: 11px ui-sans-serif, system-ui, sans-serif; }
input[type="range"] { width: 100%; accent-color: #8f6426; }
input[type="color"] { width: 100%; height: 36px; margin-top: 5px; padding: 2px; border: 1px solid #aa8d56; border-radius: 6px; background: #fffaf0; }
textarea { padding: 10px; resize: vertical; min-height: 120px; line-height: 1.45; }
.range-labels { display: flex; justify-content: space-between; color: var(--muted); font: 10px ui-sans-serif, system-ui, sans-serif; }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.compact-list { display: grid; gap: 7px; margin-top: 9px; }
.list-item { padding: 8px 9px; border: 1px solid #bea56e; border-radius: 7px; background: rgba(255,250,230,.7); display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 7px; align-items: center; }
.list-item strong, .list-item span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item span { color: var(--muted); font: 10px ui-sans-serif, system-ui, sans-serif; }
.list-item button { border: 1px solid #a98950; border-radius: 5px; background: #fff4d4; }
.empty-list { color: var(--muted); font-style: italic; font-size: 12px; }

.map-shell {
  position: relative; min-width: 0; overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(255,255,255,.18), transparent 64%),
    repeating-linear-gradient(0deg, rgba(80,57,24,.022) 0 1px, transparent 1px 7px),
    #efe3c4;
}
.map-shell::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(74,50,17,.08), transparent 4%, transparent 96%, rgba(74,50,17,.08)); z-index: 2; }
#map-canvas { display: block; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
#map-canvas.panning { cursor: grabbing; }
#map-canvas.path-mode { cursor: cell; }
.map-corner-card { position: absolute; left: 14px; bottom: 14px; display: grid; gap: 2px; padding: 9px 12px; border: 1px solid rgba(100,72,27,.45); border-radius: 8px; background: rgba(255,247,220,.88); box-shadow: 0 5px 18px rgba(53,38,17,.15); pointer-events: none; }
.map-corner-card span { font-weight: 700; }
.map-corner-card small { color: var(--muted); font: 10px ui-sans-serif, system-ui, sans-serif; }
.toast { position: absolute; left: 50%; bottom: 24px; z-index: 9; transform: translateX(-50%); max-width: min(560px,80%); padding: 11px 15px; border-radius: 8px; background: rgba(49,38,22,.95); color: white; font: 13px ui-sans-serif, system-ui, sans-serif; box-shadow: 0 9px 28px rgba(0,0,0,.24); }
.toast.error { background: rgba(143,45,38,.96); }

.book-dialog { width: min(860px, calc(100vw - 28px)); max-height: calc(100vh - 34px); padding: 0; border: 1px solid #74501f; border-radius: 14px; background: transparent; box-shadow: 0 30px 90px rgba(43,29,11,.45); }
.book-dialog::backdrop { background: rgba(35,28,18,.58); backdrop-filter: blur(3px); }
.book-window { min-height: 520px; display: grid; grid-template-rows: auto auto minmax(0,1fr); background:
  linear-gradient(rgba(255,249,229,.96), rgba(244,224,175,.96)),
  repeating-linear-gradient(0deg, transparent 0 8px, rgba(99,65,21,.025) 9px 10px); }
.book-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 13px; border-bottom: 1px solid #b49458; background: linear-gradient(#efd18c,#e0ba68); }
.book-header h2 { margin: 0; font-size: 27px; }
.book-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 8px 12px 0; border-bottom: 1px solid #c2a66f; background: rgba(239,214,156,.68); }
.book-tab { min-height: 38px; padding: 0 13px; border: 1px solid #ad8d53; border-bottom: 0; border-radius: 7px 7px 0 0; background: #f3dfad; white-space: nowrap; }
.book-tab.active { background: #fff5d8; transform: translateY(1px); }
.book-body { min-height: 0; overflow-y: auto; padding: 18px 20px 22px; }
.book-page { min-height: 180px; padding: 18px 20px; border: 1px solid #b69962; border-radius: 8px; background: rgba(255,254,247,.84); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; box-shadow: inset 0 0 24px rgba(116,80,28,.06); }
.note-meta { display: block; margin-bottom: 12px; padding-bottom: 9px; border-bottom: 1px solid #d1ba86; color: var(--muted); font: 11px ui-sans-serif, system-ui, sans-serif; }
.empty-note { color: var(--muted); font-style: italic; }
.book-navigation { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 9px; margin-top: 9px; }
.book-navigation button { min-height: 34px; border: 1px solid #ab8b52; border-radius: 6px; background: #fff3d0; }
.book-navigation button:last-child { justify-self: stretch; }
#note-counter { min-width: 66px; text-align: center; font: 11px ui-sans-serif, system-ui, sans-serif; }
.approve-area { margin-top: 11px; padding: 10px; border: 1px solid #ba8537; border-radius: 7px; background: #fff0c2; display: flex; justify-content: space-between; align-items: center; gap: 10px; font: 12px ui-sans-serif, system-ui, sans-serif; }
.approve-area button { border: 1px solid #72511f; border-radius: 6px; background: #986d2c; color: white; padding: 7px 10px; }
.new-note-area { margin-top: 17px; padding-top: 15px; border-top: 1px solid #c4a873; }
.new-note-area h3 { margin: 0; }

@media (max-width: 1050px) {
  :root { --drawer-width: 320px; }
  .world-meta .meta-pill:nth-child(2) { display: none; }
  .topbar { grid-template-columns: minmax(200px,1fr) auto; }
  .world-meta { display: none; }
}
@media (max-width: 760px) {
  :root { --rail-width: 60px; --drawer-width: 290px; --topbar-height: 62px; }
  .top-actions .zoom-label { display: none; }
  .top-button { padding: 0 7px; font-size: 11px; }
  .brand-block h1 { font-size: 18px; }
  .role-grid { grid-template-columns: 1fr; }
  .role-choice { min-height: auto; }
  .terrain-grid, .icon-grid, .two-columns { grid-template-columns: 1fr; }
  .rail-button small { display: none; }
}
.workspace.drawer-closed { grid-template-columns: var(--rail-width) 0 minmax(0,1fr) var(--member-width); }

/* -------------------------------------------------------------------------- */
/* Authentifizierung und Benutzerverwaltung 0.4                               */
/* -------------------------------------------------------------------------- */
.auth-screen {
  min-height: 100%; display: grid; place-items: center; padding: 28px; overflow: auto;
  background:
    linear-gradient(rgba(247,232,190,.92), rgba(236,210,152,.92)),
    repeating-linear-gradient(0deg, transparent 0 6px, rgba(80,53,18,.025) 7px 8px),
    radial-gradient(circle at 18% 18%, #eff4f4, transparent 34%), #d8c293;
}
.auth-card {
  position: relative; width: min(760px, 100%); padding: 34px 38px 30px;
  border: 1px solid #9e7c3d; border-radius: 18px;
  background: linear-gradient(rgba(255,250,232,.97), rgba(247,233,197,.97));
  box-shadow: 0 28px 80px rgba(57,42,18,.28), inset 0 0 0 5px rgba(255,255,255,.34);
}
.auth-card::before { content:""; position:absolute; inset:12px; border:1px solid rgba(120,87,36,.24); border-radius:11px; pointer-events:none; }
.auth-card > * { position: relative; z-index: 1; }
.auth-card h1 { margin:0; font-size:52px; line-height:1; }
.compact-auth-card { width:min(600px,100%); }
.auth-tabs { display:flex; gap:5px; margin:22px 0 14px; border-bottom:1px solid #b99a5a; }
.auth-tab { flex:1; min-height:42px; border:1px solid transparent; border-bottom:0; border-radius:7px 7px 0 0; background:transparent; }
.auth-tab.active { background:#fff3d2; border-color:#b99a5a; transform:translateY(1px); font-weight:700; }
.auth-form { display:none; padding:5px 2px; }
.auth-form.active { display:block; }
.auth-form .primary-button { margin-top:17px; }
.auth-message { margin:14px 0 0; padding:11px 13px; border:1px solid #b69557; border-radius:7px; background:#fff3ce; font:13px/1.45 ui-sans-serif,system-ui,sans-serif; }
.auth-message.error { border-color:#a65349; background:#ffe5df; color:#7b211b; }
.inline-help { width:20px; height:20px; padding:0; margin-left:4px; border:1px solid #9d7b42; border-radius:50%; background:#fff4d3; font-size:11px; }
.verification-input { letter-spacing:.28em; text-align:center; font-size:24px; }
.secondary-button { width:100%; min-height:39px; margin-top:9px; border:1px solid #8c6d35; border-radius:7px; background:#fff3d1; font-weight:700; }
.pending-profile { display:flex; justify-content:space-between; gap:10px; padding:13px; border:1px solid #b99a5a; border-radius:9px; background:rgba(255,250,230,.72); }
.pending-profile span { color:var(--muted); }

input[type="email"], input[type="password"], input[type="search"], input[type="datetime-local"] {
  width:100%; height:36px; margin-top:5px; padding:0 9px; border:1px solid #aa8d56; border-radius:6px; background:#fffaf0;
}

.member-sidebar {
  min-width:0; overflow-y:auto; border-left:1px solid #9c8353;
  background:linear-gradient(rgba(247,231,190,.97),rgba(235,208,151,.97));
  box-shadow:-2px 0 8px rgba(66,45,16,.12); scrollbar-color:#a37d3a #ecd69d;
}
.member-sidebar > header { position:sticky; top:0; z-index:3; display:flex; align-items:center; justify-content:space-between; padding:13px 12px 10px; border-bottom:1px solid #bea063; background:rgba(238,211,151,.96); }
.member-sidebar h2 { margin:0; font-size:20px; }
.member-list { padding:8px; }
.member-group { margin-bottom:12px; }
.member-group-title { display:flex; justify-content:space-between; margin:0 2px 5px; color:#6b5737; font:700 10px/1.2 ui-sans-serif,system-ui,sans-serif; text-transform:uppercase; letter-spacing:.08em; }
.member-row { display:grid; grid-template-columns:32px minmax(0,1fr) auto; align-items:center; gap:8px; padding:7px 6px; border-radius:7px; }
.member-row:hover { background:rgba(255,250,228,.56); }
.member-avatar { width:32px; height:32px; border:1px solid #8e713f; border-radius:50%; display:grid; place-items:center; background:#e1c27b; font-weight:700; text-transform:uppercase; }
.member-copy { min-width:0; }
.member-copy strong,.member-copy span { display:block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.member-copy strong { font-size:12px; }
.member-copy span { color:var(--muted); font:10px ui-sans-serif,system-ui,sans-serif; }
.online-dot { width:8px; height:8px; border-radius:50%; background:#8b826e; }
.online-dot.online { background:#4f8a51; box-shadow:0 0 0 2px rgba(79,138,81,.18); }
.online-dot.timeout { background:#a24f42; }

.locked-hex { color:#9b3e31; }
.note-management { display:flex; gap:7px; flex-wrap:wrap; margin-top:10px; padding:10px; border:1px solid #bea56e; border-radius:7px; background:rgba(255,248,222,.72); }
.note-management button { min-height:32px; border:1px solid #9c7c46; border-radius:6px; background:#fff1c8; }
.danger-button { border-color:#9d4a40 !important; background:#f8d6ce !important; color:#79251d !important; }

.management-dialog { width:min(1080px,calc(100vw - 30px)); height:min(760px,calc(100vh - 30px)); padding:0; border:1px solid #74501f; border-radius:14px; background:transparent; box-shadow:0 30px 90px rgba(43,29,11,.45); }
.management-dialog::backdrop,.simple-dialog::backdrop { background:rgba(35,28,18,.58); backdrop-filter:blur(3px); }
.management-window { height:100%; display:grid; grid-template-rows:auto auto minmax(0,1fr); background:linear-gradient(rgba(255,249,229,.98),rgba(244,224,175,.98)); }
.management-tabs { display:flex; gap:4px; overflow-x:auto; padding:8px 12px 0; border-bottom:1px solid #c2a66f; background:rgba(239,214,156,.68); }
.management-tab { min-height:38px; padding:0 13px; border:1px solid #ad8d53; border-bottom:0; border-radius:7px 7px 0 0; background:#f3dfad; white-space:nowrap; }
.management-tab.active { background:#fff5d8; transform:translateY(1px); }
.management-tab span { display:inline-block; min-width:18px; padding:2px 5px; border-radius:999px; background:#c89143; color:white; font-size:10px; }
.management-body { min-height:0; overflow:auto; padding:16px 18px 22px; }
.management-panel { display:none; }
.management-panel.active { display:block; }
.management-toolbar { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; margin-bottom:10px; }
.management-toolbar button,.management-panel > button { min-height:36px; border:1px solid #9f7c43; border-radius:6px; background:#fff1ca; }
.management-list { display:grid; gap:9px; }
.management-card { padding:12px; border:1px solid #b99c64; border-radius:9px; background:rgba(255,251,237,.76); }
.management-card-head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.management-card h3 { margin:0 0 3px; font-size:16px; }
.management-card p { margin:3px 0; color:var(--muted); font:11px/1.4 ui-sans-serif,system-ui,sans-serif; }
.management-actions { display:flex; gap:6px; flex-wrap:wrap; margin-top:10px; }
.management-actions button { min-height:32px; border:1px solid #9c7c46; border-radius:6px; background:#fff1c8; }
.role-checks { display:flex; flex-wrap:wrap; gap:5px; margin-top:9px; }
.role-check { display:flex; align-items:center; gap:4px; padding:5px 7px; border:1px solid #b89b64; border-radius:999px; background:#fff6dc; font:11px ui-sans-serif,system-ui,sans-serif; }
.role-check input { margin:0; }
.status-badge { padding:4px 7px; border-radius:999px; background:#ddc17e; font:10px ui-sans-serif,system-ui,sans-serif; }
.status-badge.banned,.status-badge.deactivated { background:#d8907e; }
.status-badge.active { background:#9bc492; }
.account-summary { display:flex; align-items:center; gap:12px; padding:13px; border:1px solid #b99a5a; border-radius:9px; background:rgba(255,250,230,.72); }
.account-summary strong,.account-summary span,.account-summary small { display:block; }
.account-summary span,.account-summary small { color:var(--muted); }
.settings-form { max-width:650px; margin-top:18px; }
.audit-row { display:grid; grid-template-columns:160px 130px minmax(0,1fr); gap:9px; padding:8px; border-bottom:1px solid #d2bb88; font:11px ui-sans-serif,system-ui,sans-serif; }
.simple-dialog { width:min(520px,calc(100vw - 30px)); padding:22px; border:1px solid #74501f; border-radius:12px; background:#fff4d5; }
.simple-dialog h2 { margin-top:0; }

@media (max-width: 1250px) {
  :root { --member-width:220px; }
}
@media (max-width: 980px) {
  :root { --member-width:0px; }
  .member-sidebar { display:none; }
  .workspace { grid-template-columns:var(--rail-width) var(--drawer-width) minmax(0,1fr); }
  .workspace.drawer-closed { grid-template-columns:var(--rail-width) 0 minmax(0,1fr); }
}
@media (max-width: 700px) {
  .auth-card { padding:28px 20px 22px; }
  .auth-card h1 { font-size:42px; }
  .auth-form .two-columns { grid-template-columns:1fr; }
  .management-dialog { width:100vw; height:100vh; max-width:none; max-height:none; border-radius:0; }
  .audit-row { grid-template-columns:1fr; }
}
