:root {
  color-scheme: dark;
  --ink: #e6e9ef;
  --muted: #a3acba;
  --accent: #9ab8ff;
  --paper: #111318;
  --panel: #191d25;
  --input: #12161d;
  --line: #303744;
  --dark: #0d1015;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 14px var(--font); line-height: 1.6; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { outline-offset: 4px; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
a { color: inherit; }
button:disabled { opacity: .5; cursor: not-allowed; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 28px; font-weight: 600; letter-spacing: -.6px; line-height: 1.3; }
h2 { font-size: 15px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; }
.button { border: 1px solid transparent; display: inline-flex; justify-content: center; align-items: center; gap: 10px; text-decoration: none; border-radius: 6px; padding: 9px 16px; font-size: 12px; font-weight: 600; white-space: nowrap; min-height: 40px; }
.primary { background: var(--accent); color: #101b31; }
.primary:hover { background: #b4cbff; }
.secondary { background: #202630; border-color: #3b4657; color: var(--ink); }
.secondary:hover { background: #2a3340; }
.text-button { border: 0; background: none; padding: 0; color: var(--accent); font-size: 12px; font-weight: 500; text-decoration: none; }
.text-button:hover { text-decoration: underline; }
.full { width: 100%; }
.sidebar { position: fixed; width: 220px; top: 0; bottom: 0; left: 0; background: var(--dark); border-right: 1px solid var(--line); color: var(--ink); padding: 26px 18px; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 600; text-decoration: none; }
.brand-icon { background: #273449; color: #b7ceff; font-size: 16px; border-radius: 6px; width: 32px; height: 32px; display: grid; place-items: center; }
.workspace { margin: 30px 0 22px; padding: 12px 10px; border: 1px solid var(--line); border-radius: 6px; }
.workspace label { color: var(--muted); font-size: 10px; letter-spacing: .7px; margin: 0 0 6px; }
.workspace select { color: var(--ink); background: transparent; border: 0; padding: 0; font-size: 12px; }
.workspace option { background: var(--panel); }
nav { display: grid; gap: 6px; }
.nav { display: flex; gap: 12px; border: 0; background: none; color: var(--muted); padding: 11px 12px; text-align: left; border-radius: 5px; font-size: 13px; }
.nav span { font-size: 18px; line-height: 1; }
.nav.active { color: #bdd1ff; background: #243149; }
.nav:hover { background: #202630; }
.sidebar-bottom { margin-top: auto; font-size: 11px; }
.sidebar-bottom .text-button { margin-top: 14px; }
.sidebar-bottom p { margin-top: 10px; color: var(--muted); }
.private { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: #8db7a2; }
main { margin-left: 220px; }
header { height: 68px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 32px; }
.breadcrumb { font-size: 10px; letter-spacing: 1px; color: var(--muted); }
.breadcrumb span { margin-left: 12px; }
.breadcrumb span:last-child { letter-spacing: 0; color: var(--ink); font-size: 12px; }
.pill { font-size: 11px; padding: 4px 10px; background: #252c37; border: 1px solid #3b4555; border-radius: 20px; white-space: nowrap; color: #c0c9d7; }
.pill.online { background: #1a332b; border-color: #305e4a; color: #a8d8bb; }
.content { max-width: 1340px; margin: auto; padding: 28px 32px 32px; }
.page-title { display: flex; justify-content: space-between; align-items: center; margin: 0 0 26px; gap: 16px; }
.page-title p { color: var(--muted); font-size: 13px; margin-top: 8px; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 22px; }
.metrics article, .panel { background: var(--panel); border: 1px solid var(--line); border-radius: 7px; }
.metrics article { padding: 20px; }
.metric-label { display: flex; justify-content: space-between; color: #c1c9d5; font-size: 12px; }
.metric-label span { font-size: 16px; color: var(--muted); }
.metrics strong { display: block; font-size: 34px; line-height: 1.3; font-weight: 550; margin: 10px 0 6px; }
.metrics p { font-size: 11px; color: var(--muted); }
.overview-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; }
.panel { padding: 22px; margin-bottom: 20px; min-width: 0; }
.panel-heading { display: flex; justify-content: space-between; gap: 14px; align-items: center; margin-bottom: 18px; }
.recent-row { border-top: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 15px 0; }
.comp-icon { height: 34px; width: 34px; border-radius: 5px; display: grid; place-items: center; background: #28313e; color: #adbfda; }
.recent-text { flex: 1; min-width: 0; }
.recent-text strong { font-size: 13px; font-weight: 550; display: block; }
.recent-text small { font-size: 11px; color: var(--muted); }
.recent-row button { background: none; border: 0; color: var(--accent); font-size: 12px; }
.connection-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; font-size: 12px; border-top: 1px solid var(--line); gap: 12px; }
.connection-row small { color: #b4c3d8; font-size: 11px; }
.connection-panel .full { margin-top: 18px; }
code { background: #293341; padding: 2px 4px; border-radius: 3px; font-size: 11px; }
.activity-row { padding: 10px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.activity-row small { color: var(--muted); }
.empty { padding: 24px 0; color: var(--muted); font-size: 12px; }
.fine { font-size: 12px; color: var(--muted); line-height: 1.7; margin: 12px 0; }
.notice { border: 1px solid #5c4e31; background: #2b261c; color: #e0c994; border-radius: 6px; padding: 12px 16px; font-size: 12px; margin-bottom: 22px; white-space: pre-wrap; }
label { display: flex; flex-direction: column; font-size: 12px; gap: 7px; color: #c0c9d6; margin: 12px 0; }
label small { font-size: 10px; color: var(--muted); }
input, select, textarea { background: var(--input); border: 1px solid #3a4453; color: var(--ink); padding: 10px 11px; border-radius: 5px; font-size: 12px; min-width: 0; width: 100%; }
input::placeholder, textarea::placeholder { color: #8d98a9; opacity: 1; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
input[readonly] { background: #202630; color: #b0bac9; }
input[type=checkbox] { accent-color: var(--accent); }
input[type=file]::file-selector-button { background: #2c3747; color: var(--ink); border: 1px solid #46546a; padding: 5px 9px; border-radius: 4px; margin-right: 10px; }
textarea { resize: vertical; }
.inline-form { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.inline-form label { flex: 1; min-width: 145px; margin: 0; }
.table-toolbar { display: flex; align-items: center; gap: 20px; justify-content: space-between; margin: 22px 0 12px; }
.table-toolbar input { max-width: 300px; }
.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
th { color: #aab6c8; font-size: 11px; font-weight: 500; padding: 10px 12px; border-bottom: 1px solid var(--line); }
td { font-size: 12px; padding: 14px 12px; border-bottom: 1px solid var(--line); }
td small { color: var(--muted); }
.alias-chip { display: inline-block; background: #293240; color: #c5d0df; padding: 3px 7px; font-size: 11px; border-radius: 4px; margin: 2px 5px 2px 0; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.settings-grid .panel { margin: 0; }
.service-icon { color: #a6bbdf; font-size: 19px; margin-right: 8px; }
.field-actions { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; color: var(--muted); }
.two-col, .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.wide { grid-column: 1 / -1; }
.save-bar { display: flex; justify-content: space-between; align-items: center; margin: 22px 0; }
.save-bar p { font-size: 12px; color: var(--muted); }
#compSelect { max-width: 320px; }
.review { font: 12px var(--font); background: var(--input); border: 1px solid var(--line); border-radius: 5px; padding: 14px; white-space: pre-wrap; color: #b6c5d9; }
.finalize-bar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 22px; }
.check { display: flex; flex-direction: row; align-items: center; margin-right: auto; }
.check input { width: auto; }
#toast { position: fixed; right: 24px; bottom: 24px; max-width: 450px; background: #253044; color: #edf2ff; border: 1px solid #4d6281; border-radius: 7px; padding: 15px 20px; font-size: 12px; box-shadow: 0 8px 32px #0005; z-index: 5; white-space: pre-wrap; }
.login-screen { min-height: 100vh; background: var(--paper); display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 32px; }
.login-copy { color: var(--muted); margin: 8px 0 26px; font-size: 14px; }
.discord-login { width: 100%; }
.login-card .fine { margin: 18px 0 0; font-size: 11px; }
dialog { max-width: 440px; width: calc(100% - 32px); border: 1px solid #465165; border-radius: 9px; padding: 28px; color: var(--ink); background: var(--panel); box-shadow: 0 20px 100px #0008; }
dialog::backdrop { background: #000a; }
dialog h2 { font-size: 22px; margin-bottom: 12px; }
dialog p { font-size: 12px; color: var(--muted); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 22px; }
#revealedKey { font-family: monospace; font-size: 11px; }
@media(max-width:1050px) {
  .sidebar { width: 200px; padding: 24px 16px; }
  main { margin-left: 200px; }
  .content { padding: 26px 24px; }
  header { padding: 0 24px; }
  .overview-grid, .settings-grid { grid-template-columns: 1fr; }
}
@media(max-width:700px) {
  .sidebar { position: static; width: 100%; padding: 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { font-size: 19px; }
  .workspace { margin: 18px 0 12px; padding: 10px; }
  nav { display: flex; overflow: auto; gap: 4px; }
  .nav { white-space: nowrap; padding: 10px; }
  .nav span { display: none; }
  .sidebar-bottom { display: none; }
  main { margin: 0; }
  header { height: 56px; padding: 0 18px; }
  .content { padding: 24px 16px; }
  .page-title { align-items: start; gap: 14px; flex-direction: column; }
  h1 { font-size: 25px; }
  .metrics { gap: 8px; }
  .metric-label { font-size: 11px; }
  .metric-label span { display: none; }
  .metrics article { padding: 13px 10px; }
  .metrics strong { font-size: 28px; }
  .metrics p { font-size: 10px; }
  .panel { padding: 16px; }
  .two-col, .form-grid { grid-template-columns: 1fr; }
  .table-toolbar { align-items: start; flex-direction: column; }
  .table-toolbar input { max-width: none; }
  .save-bar { align-items: start; gap: 15px; flex-direction: column; }
  .finalize-bar { align-items: start; flex-direction: column; }
  #toast { left: 16px; right: 16px; max-width: none; }
  .panel-heading { flex-wrap: wrap; }
}

/* Compact operational controls */
.member-status { min-width:150px; }.member-status span{display:block;margin-bottom:8px}.button.small{padding:6px 10px;font-size:12px}.creator-credit{font-size:11px;color:var(--muted,#8b91a2);opacity:.65;padding:28px 0 4px;text-align:right}.invite-link{font-size:12px;margin:12px 0}.login-logo{width:64px;height:64px;border-radius:18px;margin-bottom:16px}.brand-icon{object-fit:cover}.role-picker{min-width:190px;max-width:310px;border:1px solid var(--border,#353b48);border-radius:8px;background:var(--bg,#111318);padding:9px}.role-picker summary{cursor:pointer;font-size:13px}.role-picker>input{margin-top:10px}.role-options{max-height:190px;overflow:auto;margin-top:8px}.role-option{display:flex;align-items:center;gap:9px;padding:6px 2px;font-size:12px}.role-option input{width:auto;min-width:14px;margin:0}.role-option span{overflow-wrap:anywhere}.guide-steps{padding-left:24px}.guide-steps li{margin-bottom:15px;line-height:1.6}#guide code{white-space:normal;overflow-wrap:anywhere;color:#c4caff}#guide p{line-height:1.65}#guideRows td:first-child{min-width:240px;max-width:390px}#guideRows td{white-space:normal;vertical-align:top}#guideRows td code{font-size:12px}.role-option[hidden]{display:none}

.role-option{flex-direction:row;justify-content:flex-start;align-items:center;gap:10px}.role-option input{flex:none;min-height:0}.role-option span{flex:1;text-align:left}
