@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  color-scheme: dark;
  --paper: #252a27;
  --surface: #303632;
  --surface-soft: #2b302d;
  --ink: #e2e4dc;
  --muted: #a1a69b;
  --line: #424a43;
  --olive: #879477;
  --olive-dark: #afbea1;
  --olive-pale: #3c453b;
  --gold: #c0a474;
  --gold-pale: #443d31;
  --rose: #ca8c7f;
  --rose-pale: #493b37;
  --shadow: 0 14px 36px rgba(10, 13, 11, .18);
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 340px; min-height: 100vh; background: var(--paper); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(111, 121, 96, .24); outline-offset: 2px; }
.app-shell { display: flex; min-height: 100vh; }

.sidebar { position: fixed; z-index: 10; top: 0; bottom: 0; left: 0; width: 252px; height: 100vh; max-height: 100vh; flex: 0 0 252px; display: flex; flex-direction: column; overflow: hidden; background: #202522; border-right: 1px solid var(--line); padding: 25px 15px 18px; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 11px 26px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #495248; border-radius: 11px; color: var(--olive-dark); font-family: 'Plus Jakarta Sans', Arial, sans-serif; font-size: 22px; line-height: 1; }
.brand-name { font-size: 14px; font-weight: 700; letter-spacing: .19em; }
.brand-subtitle { margin-top: 3px; color: var(--muted); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; }
.server-picker { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); text-align: left; cursor: pointer; }
.server-avatar { display: grid; place-items: center; overflow: hidden; width: 33px; height: 33px; flex: 0 0 33px; border-radius: 10px; background: #394238; color: #d8dfd1; font-family: 'Plus Jakarta Sans', Arial, sans-serif; font-size: 17px; }
.server-avatar img, .profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.server-name { display: block; overflow: hidden; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.server-meta { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.chevron { margin-left: auto; color: #a19d91; font-size: 13px; }
.sidebar-nav { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; margin-top: 12px; padding: 0 3px 12px 0; scrollbar-color: #4b534b transparent; scrollbar-width: thin; }
.sidebar-nav::-webkit-scrollbar { width: 5px; }
.sidebar-nav::-webkit-scrollbar-thumb { border-radius: 8px; background: #4b534b; }
.nav-group { margin-top: 7px; }
.nav-group-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 26px; padding: 4px 11px; border: 0; border-radius: 6px; background: transparent; color: #969e94; font-size: 9px; font-weight: 700; letter-spacing: .16em; text-align: left; text-transform: uppercase; cursor: pointer; }
.nav-group-toggle:hover { background: #2a302c; color: #d0d5cd; }
.nav-group-chevron { color: #a6a296; font-size: 13px; letter-spacing: 0; transition: transform .24s cubic-bezier(.2,.75,.25,1); }
.nav-group.collapsed .nav-group-chevron { transform: rotate(-90deg); }
.nav-list { display: grid; gap: 3px; max-height: 460px; overflow: hidden; opacity: 1; transform: translateY(0); visibility: visible; transition: max-height .28s cubic-bezier(.2,.75,.25,1), opacity .18s ease, transform .26s cubic-bezier(.2,.75,.25,1), visibility 0s linear; }
.nav-group.collapsed .nav-list { max-height: 0; opacity: 0; transform: translateY(-5px); visibility: hidden; transition: max-height .26s cubic-bezier(.2,.75,.25,1), opacity .14s ease, transform .24s cubic-bezier(.2,.75,.25,1), visibility 0s linear .26s; }
.nav-link { position: relative; display: flex; align-items: center; gap: 11px; width: 100%; min-height: 37px; padding: 8px 11px; border: 0; border-radius: 9px; background: transparent; color: #b0b6ac; text-align: left; cursor: pointer; transition: background .15s, color .15s; }
.nav-link:hover { background: #2b312d; color: var(--ink); }
.nav-link.active { background: var(--olive-pale); color: var(--olive-dark); font-weight: 600; }
.nav-icon { display: grid; place-items: center; width: 17px; color: inherit; font-size: 15px; }
.nav-count { margin-left: auto; color: #99968b; font-size: 10px; }
.nav-group-toggle { transition: background .16s ease, color .16s ease; }
.sidebar-bottom { flex: 0 0 auto; margin-top: auto; }
.sidebar-note { margin: 13px 3px 0; padding: 13px; border: 1px solid #3d463e; border-radius: 11px; background: #292f2b; }
.note-kicker { color: var(--gold); font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.sidebar-note p { margin: 7px 0 0; color: #afb6aa; font-size: 11px; line-height: 1.6; }
.profile { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 8px 0; border-top: 1px solid var(--line); }
.profile-avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #e9ddd0; color: #765f4b; font-size: 11px; font-weight: 700; }
.profile-name { font-size: 11px; font-weight: 600; }
.profile-role { margin-top: 3px; color: var(--muted); font-size: 10px; }
.profile-menu { margin-left: auto; border: 0; background: transparent; color: var(--muted); cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  .nav-list, .nav-group-chevron, .nav-group-toggle { transition: none !important; }
}

.main-area { min-width: 0; flex: 1; margin-left: 252px; }
.topbar { position: sticky; z-index: 5; top: 0; display: flex; align-items: center; justify-content: space-between; height: 67px; padding: 0 38px; border-bottom: 1px solid var(--line); background: rgba(37, 42, 39, .92); backdrop-filter: blur(14px); }
.breadcrumb { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; }
.breadcrumb strong { color: #e2e4dc; font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 11px; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid #e3e4d8; border-radius: 99px; background: #f5f6ef; color: #6a765b; font-size: 10px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #81916b; box-shadow: 0 0 0 3px rgba(129,145,107,.12); }
.icon-button { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: #7e7c72; cursor: pointer; }
.content { width: min(1140px, 100%); margin: 0 auto; padding: 33px 38px 54px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 0 0 22px; }
.eyebrow { margin-bottom: 8px; color: var(--gold); font-size: 9px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
h1 { margin: 0; font-family: 'Plus Jakarta Sans', Arial, sans-serif; font-size: clamp(27px, 3vw, 34px); font-weight: 600; letter-spacing: -.035em; }
.page-description { max-width: 660px; margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.heading-actions { display: flex; flex-shrink: 0; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: #55564e; font-size: 11px; font-weight: 600; cursor: pointer; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-1px); background: #3b423c; }
.btn-primary { border-color: var(--olive); background: var(--olive); color: #fff; }
.btn-primary:hover { background: var(--olive-dark); }
.btn-quiet { border-color: transparent; background: transparent; }
.btn-danger { border-color: #ead6d1; background: #fff9f7; color: var(--rose); }
.grid { display: grid; gap: 15px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack { display: grid; gap: 15px; }
.card { min-width: 0; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow); }
.card-pad { padding: 18px; }
.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 17px 18px 14px; border-bottom: 1px solid #f0ede5; }
.card-header.no-border { border-bottom: 0; padding-bottom: 4px; }
.card-title { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .01em; }
.card-subtitle { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.card-body { padding: 15px 18px 18px; }
.card-body.compact { padding-top: 9px; }
.divider { height: 1px; margin: 15px 0; background: #f0ede5; }
.section-caption { margin: 0 0 12px; color: #a19d91; font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.field { display: grid; gap: 7px; min-width: 0; }
.field + .field { margin-top: 13px; }
.field-label { color: #68685f; font-size: 10px; font-weight: 600; }
.field-hint { margin-top: -2px; color: #a09d93; font-size: 9px; line-height: 1.5; }
.input, .select, .textarea { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid #e9e5da; border-radius: 8px; background: #fffefa; color: var(--ink); font-size: 11px; }
.input::placeholder, .textarea::placeholder { color: #b7b3a9; }
.select { cursor: pointer; }
.reaction-role-multi { min-height: 104px; padding: 7px; }
.reaction-map-row { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr) auto; align-items: end; gap: 10px; margin-top: 10px; }
.reaction-map-remove { min-height: 40px; padding: 0 12px; }
.textarea { min-height: 76px; resize: vertical; line-height: 1.55; }
.multi-select { position: relative; width: 100%; min-width: 0; }
.multi-control { display: flex; align-items: center; gap: 5px; min-height: 40px; width: 100%; padding: 5px 9px; border: 1px solid #dfdbd0; border-radius: 8px; background: #fffefa; cursor: text; transition: border-color .15s, box-shadow .15s; }
.multi-control:hover { border-color: #cac5b8; }
.multi-select.open .multi-control, .multi-control:focus-within { border-color: #aab29e; box-shadow: 0 0 0 3px rgba(111,121,96,.09); }
.multi-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; min-width: 0; }
.multi-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 4px 5px 4px 7px; border: 1px solid #d8d4c9; border-radius: 6px; background: #f4f2ec; color: #55564e; font-size: 10px; line-height: 1.2; white-space: nowrap; }
.multi-chip-icon { color: #858778; font-size: 11px; }
.multi-remove { display: grid; place-items: center; width: 15px; height: 15px; padding: 0; border: 0; border-radius: 3px; background: transparent; color: #8b887e; font-size: 13px; cursor: pointer; }
.multi-remove:hover { background: #e8e4d9; color: #45463e; }
.multi-input { min-width: 82px; width: 82px; flex: 1; padding: 5px 2px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 11px; }
.multi-input:focus { outline: 0; }
.multi-input::placeholder { color: #9d9a90; }
.multi-caret { margin-left: auto; padding: 0 1px 0 5px; color: #969287; font-size: 13px; line-height: 1; }
.multi-menu { position: absolute; z-index: 10; top: calc(100% + 5px); left: 0; width: 100%; max-height: 256px; overflow: hidden; border: 1px solid #e5e1d6; border-radius: 9px; background: #fffefa; box-shadow: 0 14px 28px rgba(48,45,36,.13); }
.multi-menu[hidden] { display: none; }
.multi-options { max-height: 254px; overflow-y: auto; padding: 6px; scrollbar-color: #d8d3c7 transparent; scrollbar-width: thin; }
.multi-group { padding: 7px 8px 5px; color: #aaa69b; font-size: 8px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.multi-option { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 31px; padding: 6px 8px; border: 0; border-radius: 6px; background: transparent; color: #66665e; font-size: 10px; text-align: left; cursor: pointer; }
.multi-option:hover { background: #f3f1ea; color: #33352d; }
.multi-option.selected { background: #edf0e7; color: #59624e; }
.multi-option-icon { display: inline-grid; place-items: center; width: 15px; color: #98968a; font-size: 12px; }
.multi-option-check { margin-left: auto; color: var(--olive); font-size: 11px; opacity: 0; }
.multi-option.selected .multi-option-check { opacity: 1; }
.multi-empty { padding: 15px; color: #a09d93; font-size: 10px; text-align: center; }
.multi-empty[hidden] { display: none; }
.multi-option[hidden], .multi-group[hidden] { display: none; }
.field-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.switch-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 11px 0; }
.switch-row + .switch-row { border-top: 1px solid #f0ede5; }
.switch-copy { min-width: 0; }
.switch-title { font-size: 11px; font-weight: 600; }
.switch-description { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.switch { position: relative; display: inline-flex; width: 34px; height: 19px; flex: 0 0 34px; }
.switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch-track { position: absolute; inset: 0; border-radius: 99px; background: #ddd9cf; cursor: pointer; transition: background .18s; }
.switch-track::after { position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.13); content: ''; transition: transform .18s; }
.switch input:checked + .switch-track { background: var(--olive); }
.switch input:checked + .switch-track::after { transform: translateX(15px); }
.check-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 11px; }
.check-item { display: flex; align-items: center; gap: 8px; color: #6e6d64; font-size: 10px; cursor: pointer; }
.check-item input { accent-color: var(--olive); }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid #e8e5da; border-radius: 7px; background: #faf9f5; color: #6d6b62; font-size: 9px; }
.tag-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--olive); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 99px; background: var(--olive-pale); color: var(--olive-dark); font-size: 9px; font-weight: 600; }
.badge-muted { background: #f0eee8; color: #77756b; }
.badge-gold { background: var(--gold-pale); color: #927341; }
.badge-rose { background: var(--rose-pale); color: var(--rose); }
.stat-card { padding: 16px; }
.stat-label { color: var(--muted); font-size: 10px; }
.stat-value { margin-top: 11px; font-family: 'Plus Jakarta Sans', Arial, sans-serif; font-size: 27px; font-weight: 600; letter-spacing: -.03em; }
.stat-foot { margin-top: 6px; color: #89877d; font-size: 9px; }
.stat-accent { float: right; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--olive-pale); color: var(--olive-dark); font-size: 14px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 10px 13px; color: #9b988d; font-size: 9px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
td { padding: 12px 13px; border-top: 1px solid #f0ede5; color: #65645c; font-size: 10px; }
.table-primary { color: #34352e; font-weight: 600; }
.table-secondary { margin-top: 4px; color: #98958a; font-size: 9px; }
.table-empty { padding: 27px 15px; color: #a29e93; text-align: center; }
.table-action { padding: 5px 7px; border: 0; border-radius: 6px; background: transparent; color: #838176; cursor: pointer; }
.table-action:hover { background: #f3f0e8; }
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 13px; border: 1px solid #e9e5d8; border-radius: 9px; background: #faf8f0; color: #777366; font-size: 10px; line-height: 1.55; }
.alert-icon { color: var(--gold); font-size: 13px; }
.empty-state { padding: 34px 18px; color: #a29e93; text-align: center; font-size: 10px; }
.empty-mark { display: grid; place-items: center; width: 36px; height: 36px; margin: 0 auto 10px; border: 1px solid var(--line); border-radius: 50%; color: #aaa699; font-family: 'Plus Jakarta Sans', Arial, sans-serif; font-size: 17px; }
.inline-action { padding: 0; border: 0; background: transparent; color: var(--olive-dark); font-size: 10px; font-weight: 600; cursor: pointer; }
.rule-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.rule-title { font-size: 11px; font-weight: 700; }
.rule-description { max-width: 450px; margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.rule-card { padding: 15px 16px; }
.rule-controls { margin-top: 13px; padding-top: 12px; border-top: 1px solid #f0ede5; }
.radio-row { display: flex; flex-wrap: wrap; gap: 7px; }
.radio-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; border: 1px solid #e9e5da; border-radius: 7px; background: var(--surface-soft); color: #79776e; font-size: 9px; cursor: pointer; }
.radio-chip input { accent-color: var(--olive); }
.toast { position: fixed; z-index: 30; right: 24px; bottom: 22px; padding: 11px 15px; border: 1px solid #dfe3d7; border-radius: 9px; background: #fbfcf8; box-shadow: 0 12px 30px rgba(40,40,30,.12); color: var(--olive-dark); font-size: 11px; animation: toast-in .2s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.modal-backdrop { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(38,38,31,.28); backdrop-filter: blur(4px); }
.modal { width: min(510px,100%); max-height: min(88vh,780px); overflow-y: auto; border: 1px solid #e8e3d7; border-radius: 15px; background: var(--surface); box-shadow: 0 24px 70px rgba(35,34,29,.18); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid #f0ede5; }
.modal-head h2 { margin: 0; font-family: 'Plus Jakarta Sans', Arial, sans-serif; font-size: 21px; font-weight: 600; letter-spacing: -.025em; }
.modal-close { width: 27px; height: 27px; border: 1px solid var(--line); border-radius: 7px; background: white; color: #88857a; cursor: pointer; }
.modal-content { padding: 18px 20px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px 18px; border-top: 1px solid #f0ede5; }
.mobile-menu { display: none; }
.muted { color: var(--muted); }
.text-small { font-size: 10px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-14 { margin-bottom: 14px; }
.w-full { width: 100%; }

@media (max-width: 1080px) {
  .sidebar { width: 224px; flex-basis: 224px; }
  .main-area { margin-left: 224px; }
  .content { padding-right: 25px; padding-left: 25px; }
  .topbar { padding-right: 25px; padding-left: 25px; }
  .grid-4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .sidebar { position: fixed; z-index: 12; top: 0; bottom: 0; left: 0; width: 270px; height: 100vh; max-height: 100vh; transform: translateX(-102%); transition: transform .22s ease; box-shadow: 10px 0 35px rgba(40,38,30,.08); }
  .sidebar.open { transform: translateX(0); }
  .main-area { margin-left: 0; }
  .mobile-menu { display: grid; }
  .topbar { height: 59px; padding: 0 16px; }
  .content { padding: 25px 16px 40px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .heading-actions { width: 100%; }
  .heading-actions .btn { flex: 1; }
  .status-pill { display: none; }
}
@media (max-width: 460px) {
  .grid-4 { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat-card { padding: 12px; }
  .stat-value { font-size: 23px; }
  .field-row { grid-template-columns: 1fr; }
  .check-grid { grid-template-columns: 1fr; }
  h1 { font-size: 27px; }
}
@media (max-width: 600px) {
  .reaction-map-row { grid-template-columns: 1fr; }
  .reaction-map-remove { justify-self: start; }
}

/* Muted, low-glare graphite palette with a warm green undertone. */
html { color-scheme: dark; }
body { color: var(--ink); background: var(--paper); }
.sidebar { background: #292e2b; }
.brand-mark { border-color: #50584f; color: var(--olive-dark); }
.server-avatar { background: #3b443a; color: #c0c9b4; }
.chevron, .nav-group-chevron { color: #899187; }
.sidebar-nav { scrollbar-color: #515a51 transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: #515a51; }
.nav-group-toggle { color: #9da398; }
.nav-group-toggle:hover, .nav-link:hover { background: #343a35; color: var(--ink); }
.nav-link { color: #b1b5ab; }
.sidebar-note { border-color: #414941; background: #303631; }
.sidebar-note p { color: #a9ada3; }
.profile-avatar { background: #4a443a; color: #d0b994; }
.topbar { background: rgba(37, 42, 39, .93); }
.breadcrumb strong { color: #d8dbd2; }
.status-pill { border-color: #424b3f; background: #30382f; color: #b2c09f; }
.icon-button, .server-picker, .btn { background: var(--surface); color: #d0d3ca; }
.icon-button { color: #b3b7ad; }
.btn:hover { background: #3a413c; }
.btn-primary { border-color: #7e8b70; background: #718064; color: #f2f1e9; }
.btn-primary:hover { background: #829071; }
.btn-danger { border-color: #654941; background: #3b302d; color: #d89d90; }
.card { background: var(--surface); }
.card-header, .divider, .switch-row + .switch-row, .rule-controls, .modal-head, .modal-footer { border-color: #414842; }
.divider { background: #414842; }
.section-caption { color: #a2a89d; }
.field-label { color: #c2c6bc; }
.field-hint, .stat-foot, .table-secondary { color: #9da298; }
.input, .select, .textarea { border-color: #4a524b; background: #282e2a; color: var(--ink); }
.input::placeholder, .textarea::placeholder { color: #858c82; }
.multi-control { border-color: #4a524b; background: #282e2a; }
.multi-control:hover { border-color: #687365; }
.multi-select.open .multi-control, .multi-control:focus-within { border-color: #7e8b71; box-shadow: 0 0 0 3px rgba(135,148,119,.13); }
.multi-chip { border-color: #596254; background: #3a4338; color: #d0d5c9; }
.multi-chip-icon, .multi-option-icon { color: #a7b09e; }
.multi-remove { color: #a9afa4; }
.multi-remove:hover, .multi-option:hover { background: #3a423b; color: #edf0e8; }
.multi-menu { border-color: #4a524b; background: #303632; box-shadow: 0 14px 28px rgba(8,11,9,.45); }
.multi-options { scrollbar-color: #596256 transparent; }
.multi-group { color: #a4aa9f; }
.multi-option { color: #c3c8bd; }
.multi-option.selected { background: #3c483b; color: #d0ddc4; }
.multi-empty { color: #a4aa9f; }
.switch-track { background: #555d55; }
.switch-track::after { background: #e2e4dc; }
.check-item { color: #c2c6bc; }
.tag { border-color: #485047; background: #343b35; color: #c2c7bd; }
.badge-muted { background: #3b413c; color: #b2b7ad; }
.badge-gold { color: #d2b883; }
.table-primary { color: #e0e2da; }
td { border-color: #414842; color: #c1c6bc; }
th { color: #a7aca2; }
.table-action { color: #a7ada2; }
.table-action:hover { background: #3a413b; }
.alert { border-color: #4b5145; background: #32372f; color: #c0c4b9; }
.empty-state, .table-empty { color: #a3a99e; }
.empty-mark { color: #a7ada2; }
.inline-action { color: #b4c1a5; }
.radio-chip { border-color: #4a524b; background: #2b302d; color: #c1c5bb; }
.toast { border-color: #4a5548; background: #303830; color: #c0cfb1; box-shadow: 0 12px 30px rgba(8,11,9,.4); }
.modal-backdrop { background: rgba(10, 13, 11, .64); }
.modal { border-color: #4a524b; background: #303632; box-shadow: 0 24px 70px rgba(6,8,7,.48); }
.modal-close { border-color: #4a524b; background: #393f3b; color: #bdc1b8; }
.content-wide { width: min(1640px, 100%); max-width: none; }
.server-profile-card { display: flex; align-items: center; gap: 15px; }
.server-profile-mark { display: grid; place-items: center; width: 48px; height: 48px; flex: 0 0 48px; border: 1px solid #56604f; border-radius: 14px; background: #3b443a; color: #d0d9c4; font-family: 'Plus Jakarta Sans', Arial, sans-serif; font-size: 23px; font-weight: 600; }
.server-profile-name { margin-top: 2px; font-size: 15px; font-weight: 700; }
.server-profile-card .badge { margin-left: auto; }
.server-settings-link { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.command-tabs { display: flex; gap: 4px; overflow-x: auto; margin: 0 0 16px; padding: 0 0 9px; border-bottom: 1px solid var(--line); scrollbar-width: thin; scrollbar-color: #596256 transparent; }
.command-tab { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; min-height: 36px; padding: 0 12px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #a9afa5; font-size: 10px; cursor: pointer; }
.command-tab:hover { background: #333a35; color: var(--ink); }
.command-tab.active { border-color: #56604f; background: #384137; color: #dce3d4; }
.command-tab-count { color: #929a8d; font-size: 9px; }
.command-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #2b302d; }
.command-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border-bottom: 1px solid var(--line); }
.command-toolbar-actions, .command-search { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.command-toolbar .btn { min-height: 33px; padding: 0 10px; font-size: 9px; }
.command-toolbar .btn-enable { border-color: #52664f; color: #abc29f; }
.command-toolbar .btn-disable { border-color: #674b45; color: #d59a8c; }
.command-toolbar .btn-select.selected { border-color: #718064; background: #3d4839; color: #d8e0cf; }
.command-search .input { width: 190px; min-height: 33px; padding: 7px 9px; }
.match-description { display: inline-flex; align-items: center; gap: 6px; color: #adb2a8; font-size: 9px; white-space: nowrap; }
.match-description input { accent-color: var(--olive); }
.command-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); color: #b4b9ae; font-size: 10px; }
.command-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 14px; }
.command-card { position: relative; display: flex; min-height: 166px; flex-direction: column; padding: 15px; border-radius: 8px; box-shadow: none; }
.command-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; min-height: 30px; padding-bottom: 10px; border-bottom: 1px solid #414842; }
.command-card-head h2 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.command-card-head .badge { flex-shrink: 0; padding: 4px 7px; font-size: 8px; }
.command-description { flex: 1; margin: 11px 0 14px; color: #c0c5ba; font-size: 10px; line-height: 1.55; }
.command-card-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px solid #414842; }
.command-settings { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: #aebd9d; font-size: 15px; cursor: pointer; }
.command-settings:hover { background: #3b443a; color: #d0dec0; }
.command-disabled { opacity: .68; }
.command-disabled .command-card-head h2 { color: #a5aaa1; }
.command-select { position: absolute; z-index: 1; top: 9px; left: 9px; }
.command-select input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.command-select span { display: block; width: 15px; height: 15px; border: 1px solid #75806e; border-radius: 4px; background: #2a302b; }
.command-select input:checked + span { background: #819071; box-shadow: inset 0 0 0 3px #2d342e; }
.command-select + .command-card-head { padding-left: 18px; }
.command-empty { padding: 35px 18px; color: #a7ada2; font-size: 11px; text-align: center; }
.command-empty[hidden] { display: none; }

@media (max-width: 1200px) {
  .command-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .command-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .command-toolbar { align-items: flex-start; }
}
@media (max-width: 600px) {
  .command-grid { grid-template-columns: 1fr; }
  .command-search, .command-search .input { width: 100%; }
  .server-settings-link { align-items: flex-start; flex-direction: column; }
}
.modal:has(.command-overwrite-form) .modal-head h2 { font-family: 'Plus Jakarta Sans', Arial, sans-serif; font-size: 22px; font-weight: 700; letter-spacing: -.025em; }
.command-overwrite-status { padding: 0 0 2px; color: #d1d5cc; font-size: 11px; }
.command-overwrite-fields .field + .field { margin-top: 15px; }
.command-overwrite-switches { margin-top: 14px; }
.command-overwrite-switches .switch-row { align-items: center; min-height: 42px; padding: 8px 0; }
.command-overwrite-switches .switch-title { display: flex; align-items: center; gap: 7px; color: #e1e4dc; font-size: 12px; font-weight: 700; }
.command-overwrite-switches .switch-description { max-width: 365px; font-size: 9px; }
.command-overwrite-unavailable { display: grid; gap: 4px; padding: 9px 0; color: #e1e4dc; font-size: 12px; font-weight: 700; }
.command-overwrite-unavailable small { color: #a7ada2; font-size: 10px; font-weight: 400; line-height: 1.5; }
.help-tip-wrap { position: relative; display: inline-flex; align-items: center; }
.help-tip-trigger { display: inline-grid; place-items: center; width: 15px; height: 15px; padding: 0; border: 0; border-radius: 50%; background: #596157; color: #e5e8df; font-size: 10px; font-weight: 700; line-height: 1; cursor: help; }
.help-tip-trigger:hover, .help-tip-trigger:focus-visible { background: #75826a; }
.help-tip { position: absolute; z-index: 30; right: auto; bottom: calc(100% + 8px); left: 0; display: none; width: min(310px, 75vw); padding: 10px 12px; border: 1px solid #596256; border-radius: 8px; background: #202522; box-shadow: 0 12px 28px rgba(6,8,7,.45); color: #e0e3db; font-size: 10px; font-weight: 400; line-height: 1.55; }
.help-tip-wrap:hover .help-tip, .help-tip-wrap:focus-within .help-tip { display: block; }
.btn-platform { border: 0; font-weight: 700; }
.btn-platform-twitch { background: #9146ff; color: #fff; }
.btn-platform-twitch:hover { background: #7c35e5; }
.btn-platform-kick { background: #53fc18; color: #152012; }
.btn-platform-kick:hover { background: #43dc10; color: #10190e; }
.btn-platform-youtube { background: #e62117; color: #fff; }
.btn-platform-youtube:hover { background: #c91d15; }
.btn-voice { border-color: #4b7650; background: #397b48; color: #f0f6ec; }
.btn-voice:hover { background: #458d54; }
.asset-card { display: flex; align-items: center; gap: 16px; min-width: 0; padding: 16px; border: 1px solid #465047; border-radius: 11px; background: #2b312d; }
.asset-preview { display: grid; place-items: center; flex: 0 0 84px; width: 84px; height: 84px; overflow: hidden; border: 1px dashed #606b5e; border-radius: 13px; background: #353d36; color: #b5c0aa; }
.asset-banner .asset-preview { flex-basis: 145px; width: 145px; height: 88px; border-radius: 9px; }
.asset-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.asset-avatar .asset-preview img { border-radius: 50%; }
.asset-placeholder { color: #a8b49b; font-family: 'Plus Jakarta Sans', Arial, sans-serif; font-size: 20px; }
.asset-copy { min-width: 0; flex: 1; }
.asset-file-info { overflow: hidden; margin-top: 8px; color: #aab0a5; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.asset-actions { display: flex; align-items: center; gap: 12px; margin-top: 11px; }
.asset-actions .btn { min-height: 30px; padding: 0 10px; font-size: 9px; cursor: pointer; }
.asset-input { display: none; }
.asset-requirement-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.asset-requirement-grid > div { display: grid; gap: 5px; padding: 14px; border: 1px solid #414a42; border-radius: 9px; background: #2b312d; }
.asset-requirement-grid .section-caption { margin: 0; }
.asset-requirement-grid strong { color: #d6dad1; font-size: 11px; font-weight: 600; }
.voice-link-table th { width: 42%; }
.voice-link-table th:last-child { width: 16%; text-align: center; }
.voice-link-table .table-filters th { padding-top: 8px; padding-bottom: 10px; }
.voice-link-table .table-filters .input { min-height: 34px; font-size: 10px; }
.voice-delete { color: #c98c7f; font-size: 10px; }
.voice-empty-row[hidden] { display: none; }
.voice-feature { display: grid; align-content: start; gap: 8px; min-height: 128px; padding: 16px; border: 1px solid #424a43; border-radius: 11px; background: #2d332f; }
.voice-feature-icon { color: #b6c3a6; font-size: 17px; }
.voice-feature strong { color: #dce0d7; font-size: 11px; }
.voice-feature > span:last-child { color: #aeb4a9; font-size: 10px; line-height: 1.55; }
.greetings-layout { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); align-items: start; gap: 15px; }
.greeting-card .card-body { padding-top: 12px; }
.greeting-editor-heading h3, .greeting-section-title { margin: 0; color: #e1e4dc; font-size: 14px; font-weight: 700; }
.greeting-variables { margin: 14px 0 10px; color: #aeb4a9; font-size: 9px; line-height: 1.7; }
.greeting-variables code { color: #d59aab; }
.greeting-card .textarea { min-height: 115px; }
.greeting-card .btn-builder { width: 100%; margin-top: 10px; border-color: #525c63; background: #48535b; color: #e1e4df; font-size: 9px; }
.greeting-card .btn-builder:hover { background: #56616a; }
.embed-builder { margin-top: 12px; padding: 13px; border: 1px solid #434c44; border-radius: 9px; background: #292f2b; }
.greeting-card-actions { display: flex; align-items: center; gap: 13px; margin-top: 13px; padding-top: 12px; border-top: 1px solid #414842; }
.greeting-card-actions .btn { min-height: 30px; padding: 0 11px; font-size: 9px; }
.greeting-channel-separator { height: 1px; margin: 18px 0; background: #414842; }
.greeting-section-title { margin-bottom: 10px; font-size: 12px; }
.greeting-section-title + .card-subtitle { margin: -4px 0 10px; }

.stats-demo-note { margin-bottom: 15px; }
.stats-filter-bar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(170px, .85fr); align-items: end; gap: 12px; margin-bottom: 15px; padding: 15px; border: 1px solid #424a43; border-radius: 12px; background: #2d332f; }
.stats-filter-bar .field { margin: 0; }
.stats-filter-bar .select { min-height: 39px; }
.stats-compare-control { display: flex; align-items: center; gap: 10px; min-height: 39px; padding: 6px 10px; border: 1px solid #424a43; border-radius: 9px; background: #292f2b; cursor: pointer; }
.stats-compare-control input { width: 15px; height: 15px; accent-color: var(--olive); }
.stats-compare-control span { display: grid; gap: 3px; }
.stats-compare-control strong { color: #d9ded4; font-size: 10px; }
.stats-compare-control small { color: #9da498; font-size: 9px; }
.stats-kpi-grid { margin-bottom: 15px; }
.stats-kpi { min-height: 132px; padding: 15px; }
.stats-kpi-top, .stats-kpi-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stats-kpi-label { color: #aeb4a9; font-size: 10px; }
.stats-kpi-icon { color: #b6c3a6; font-size: 16px; }
.stats-kpi-value { display: block; margin: 15px 0 12px; color: #e4e7de; font-family: 'Plus Jakarta Sans', Arial, sans-serif; font-size: 26px; font-weight: 600; letter-spacing: -.035em; }
.stats-kpi-bottom { justify-content: flex-start; flex-wrap: wrap; }
.stats-trend { padding: 4px 6px; border-radius: 6px; font-size: 9px; font-weight: 600; white-space: nowrap; }
.stats-trend.positive { background: #354237; color: #bac9ae; }
.stats-trend.negative { background: #463835; color: #d8a096; }
.stats-trend.neutral { background: #3b413c; color: #b2b7ad; }
.stats-kpi-note { color: #929a90; font-size: 9px; }
.stats-chart-grid { gap: 15px; }
.stats-panel { min-width: 0; }
.stats-panel .card-body { padding: 14px 16px 15px; }
.stats-chart-wrap { position: relative; min-width: 0; }
.stats-chart-empty { display: grid; min-height: 200px; place-items: center; padding: 24px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); text-align: center; }
.stats-svg { display: block; width: 100%; height: auto; overflow: visible; }
.stats-grid-line { stroke: #424a43; stroke-width: 1; stroke-dasharray: 3 5; }
.stats-axis-line { stroke: #596258; stroke-width: 1; }
.stats-axis-label { fill: #969e94; font-family: 'Plus Jakarta Sans', Arial, sans-serif; font-size: 10px; }
.stats-area { fill: rgba(183,196,159,.09); }
.stats-line { fill: none; stroke: var(--series-color, #b7c49f); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.stats-line-previous { stroke: #858b81; stroke-dasharray: 6 5; stroke-width: 1.8; }
.stats-data-dot { fill: var(--series-color, #b7c49f); stroke: #2c322e; stroke-width: 2; pointer-events: none; vector-effect: non-scaling-stroke; }
.stats-hit-target { fill: transparent; stroke: transparent; cursor: crosshair; }
.stats-hit-target:focus-visible, .stats-bar-fill:focus-visible, .stats-donut-slice:focus-visible, .stats-heat-cell:focus-visible { outline: none; stroke: #e6eadf; stroke-width: 2.5; }
.stats-chart-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; margin-top: 9px; }
.stats-legend-item { display: inline-flex; align-items: center; gap: 6px; color: #a8afa4; font-size: 9px; }
.stats-legend-item i, .stats-donut-legend-row i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--legend-color, #b7c49f); }
.stats-legend-item .stats-legend-dashed { width: 16px; height: 0; border-top: 2px dashed #858b81; border-radius: 0; background: transparent; }
.stats-chart-tooltip { position: absolute; z-index: 4; min-width: 150px; max-width: 220px; padding: 9px 11px; border: 1px solid #596256; border-radius: 8px; background: #202522; box-shadow: 0 12px 24px rgba(5,8,6,.42); color: #dfe3da; font-size: 9px; pointer-events: none; }
.stats-chart-tooltip[hidden] { display: none; }
.stats-chart-tooltip > strong { display: block; margin-bottom: 6px; color: #f0f2ec; font-size: 10px; }
.stats-chart-tooltip > span { display: flex; align-items: center; gap: 6px; min-height: 17px; color: #adb4a9; }
.stats-chart-tooltip > span i { width: 5px; height: 5px; border-radius: 50%; background: #b7c49f; }
.stats-chart-tooltip > span b { margin-left: auto; color: #e4e7de; font-variant-numeric: tabular-nums; font-weight: 600; }
.stats-bar-label, .stats-bar-value { fill: #c4c9bf; font-family: 'Plus Jakarta Sans', Arial, sans-serif; font-size: 10px; }
.stats-bar-value { fill: #d9ded4; font-size: 9px; }
.stats-bar-track { fill: #3a413b; }
.stats-bar-fill { fill: var(--bar-color, #b7c49f); cursor: crosshair; transition: opacity .16s ease; }
.stats-bar-fill:hover { opacity: .78; }
.stats-donut-layout { display: grid; grid-template-columns: minmax(150px, .9fr) minmax(150px, 1.1fr); align-items: center; gap: 12px; min-height: 210px; }
.stats-donut-wrap { display: grid; place-items: center; }
.stats-donut-svg { display: block; width: min(190px, 100%); overflow: visible; }
.stats-donut-slice { fill: none; stroke: var(--slice-color); stroke-width: 20; stroke-linecap: butt; transform: rotate(-90deg); transform-origin: 100px 100px; cursor: crosshair; }
.stats-donut-total { fill: #e5e8df; font-family: 'Plus Jakarta Sans', Arial, sans-serif; font-size: 25px; font-weight: 600; }
.stats-donut-caption { fill: #9da498; font-family: 'Plus Jakarta Sans', Arial, sans-serif; font-size: 10px; }
.stats-donut-legend { display: grid; gap: 11px; }
.stats-donut-legend-row, .stats-donut-legend-row > span { display: flex; align-items: center; gap: 7px; }
.stats-donut-legend-row { justify-content: space-between; color: #afb5aa; font-size: 9px; }
.stats-donut-legend-row strong { color: #e1e4dc; font-size: 10px; font-weight: 600; }
.stats-heatmap { display: grid; gap: 5px; }
.stats-heatmap-row { display: grid; grid-template-columns: 36px repeat(24, minmax(0, 1fr)); align-items: center; gap: 3px; }
.stats-heatmap-header { min-height: 15px; margin-bottom: 2px; color: #969e94; font-size: 8px; text-align: center; }
.stats-heatmap-day { color: #aeb4a9; font-size: 9px; }
.stats-heat-cell { display: block; width: 100%; aspect-ratio: 1.15; min-height: 8px; border-radius: 2px; cursor: crosshair; }
.stats-heat-cell.level-0, .stats-heatmap-scale .level-0 { background: #343a35; }
.stats-heat-cell.level-1, .stats-heatmap-scale .level-1 { background: #4b5948; }
.stats-heat-cell.level-2, .stats-heatmap-scale .level-2 { background: #66775c; }
.stats-heat-cell.level-3, .stats-heatmap-scale .level-3 { background: #879a72; }
.stats-heat-cell.level-4, .stats-heatmap-scale .level-4 { background: #b7c49f; }
.stats-heatmap-scale { display: flex; align-items: center; justify-content: flex-end; gap: 5px; margin-top: 12px; color: #969e94; font-size: 8px; }
.stats-heatmap-scale i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.stats-insights-card { margin-top: 15px; }
.stats-insight-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stats-insight-grid > div { display: grid; gap: 7px; min-width: 0; padding: 12px; border: 1px solid #414a42; border-radius: 9px; background: #2b312d; }
.stats-insight-grid span { color: #9da498; font-size: 9px; }
.stats-insight-grid strong { overflow-wrap: anywhere; color: #dce0d7; font-size: 11px; font-weight: 600; }
.stats-source-card { margin-top: 15px; }
.stats-source-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stats-source-item { display: grid; align-content: start; gap: 8px; min-width: 0; padding: 13px; border: 1px solid #414a42; border-radius: 9px; background: #2b312d; }
.stats-source-status { color: #b7c49f; font-size: 8px; font-weight: 700; letter-spacing: .12em; }
.stats-source-item strong { color: #dce0d7; font-size: 11px; font-weight: 600; }
.stats-source-item p { margin: 0; color: #a7aea3; font-size: 10px; line-height: 1.55; }
.stats-source-item code { color: #d4c6a9; font-family: 'Plus Jakarta Sans', Arial, sans-serif; font-size: 9px; }
.stats-source-link { margin: 13px 2px 0; color: #969e94; font-size: 9px; }
.stats-source-link a { color: #c3cbae; text-decoration: underline; text-decoration-color: #68715f; text-underline-offset: 2px; }
.stats-source-link a:hover { color: #e3e8da; }
.raid-permission-note { align-self: center; padding: 12px; border-left: 2px solid #75836a; border-radius: 0 8px 8px 0; background: #2b312d; color: #a7aea3; font-size: 10px; line-height: 1.55; }

@media (max-width: 1000px) {
  .stats-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-insight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-source-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .stats-chart-grid { grid-template-columns: 1fr; }
  .stats-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .stats-filter-bar { grid-template-columns: 1fr; }
  .stats-donut-layout { grid-template-columns: 1fr; }
  .stats-source-grid { grid-template-columns: 1fr; }
  .stats-donut-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stats-donut-legend-row { gap: 4px; font-size: 8px; }
  .stats-heatmap-row { grid-template-columns: 30px repeat(24, minmax(0, 1fr)); gap: 2px; }
  .stats-heat-cell { min-height: 6px; }
}

@media (max-width: 900px) {
  .greetings-layout { grid-template-columns: 1fr; }
  .asset-requirement-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .asset-card { align-items: flex-start; flex-direction: column; }
  .asset-banner .asset-preview { flex-basis: auto; width: 100%; height: auto; aspect-ratio: 680 / 240; }
  .asset-avatar .asset-preview { flex-basis: 84px; }
}

.custom-embed-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); align-items: start; gap: 16px; }
.embed-preview-column { position: sticky; top: 83px; }
.embed-builder-actions, .embed-tabs, .embed-fields-heading, .embed-field-actions, .embed-editor-footer, .embed-raw-heading, .embed-raw-actions, .embed-action-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.embed-builder-actions { justify-content: flex-start; margin-bottom: 14px; }
.embed-tabs { justify-content: flex-start; flex-wrap: wrap; margin: 0 0 13px; padding-bottom: 12px; border-bottom: 1px solid #414842; }
.embed-tab, .embed-add-tab { padding: 7px 10px; border: 1px solid #465047; border-radius: 7px; background: #2b312d; color: #afb5aa; font-size: 10px; cursor: pointer; }
.embed-tab.active { border-color: #78856d; background: #3a4439; color: #e0e5d8; }
.embed-add-tab { border-style: dashed; color: #c2c9ba; }
.embed-builder-actions .btn, .embed-fields-heading .btn { min-height: 31px; font-size: 10px; }
.embed-builder-actions .btn:disabled, .embed-fields-heading .btn:disabled, .embed-add-tab:disabled { opacity: .45; cursor: not-allowed; }
.embed-color-row { display: flex; align-items: center; gap: 14px; margin-bottom: 15px; }
.embed-color-row .btn { min-height: 30px; font-size: 9px; }
.embed-color-picker { display: flex; align-items: center; gap: 8px; color: #aeb4a9; font-size: 10px; }
.embed-color-picker input { width: 36px; height: 28px; padding: 2px; border: 1px solid #50594f; border-radius: 6px; background: #303732; cursor: pointer; }
.embed-fields-heading { margin: 18px 0 10px; }
.embed-fields-heading > div { display: grid; gap: 4px; }
.embed-fields-heading strong { color: #d9ded4; font-size: 11px; }
.embed-fields-heading span, .embed-editor-footer span { color: #969e94; font-size: 9px; }
.embed-field-row { margin-top: 9px; padding: 11px; border: 1px solid #414a42; border-radius: 9px; background: #2b312d; }
.embed-field-actions { justify-content: flex-start; margin-top: 8px; }
.embed-field-actions .check-item { margin: 0; }
.embed-fields-empty, .embed-editor-empty { display: grid; place-items: center; gap: 7px; padding: 25px 14px; border: 1px dashed #465047; border-radius: 9px; color: #9da498; font-size: 10px; text-align: center; }
.embed-editor-empty strong { color: #d7ddd2; font-size: 12px; }
.embed-empty-icon { color: #bdc8b2; font-size: 22px; }
.embed-editor-footer { justify-content: space-between; margin-top: 16px; padding-top: 12px; border-top: 1px solid #414842; }
.embed-explanation { margin: 0 0 14px; }
.embed-upload-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
#embed-attachment-url-row[hidden], #embed-attachment-upload-row[hidden] { display: none !important; }
.embed-upload-row .btn { min-height: 31px; font-size: 9px; cursor: pointer; }
.embed-upload-name { color: #d5dacf; font-size: 10px; }
.embed-action-row { justify-content: flex-start; margin-top: 14px; }
.embed-action-row .btn { min-height: 32px; font-size: 10px; }
.embed-preview-card .card-body { padding: 0; }
.discord-preview-shell { min-height: 300px; padding: 15px; background: #232522; }
.discord-preview-channel { margin: 0 0 13px; padding-bottom: 11px; border-bottom: 1px solid #353a36; color: #afb5ac; font-size: 10px; }
.discord-preview-channel span { color: #7f897c; font-size: 15px; }
.discord-preview-message { display: grid; gap: 9px; }
.discord-message-content { color: #e3e6e0; font-size: 11px; line-height: 1.55; white-space: normal; }
.discord-message-content a { color: #7eacec; text-decoration: none; }
.discord-message-content a:hover { text-decoration: underline; }
.discord-markdown-heading { color: #f0f1ee; font-size: 12px; }
.discord-list-line { display: inline-block; padding-left: 8px; }
.discord-quote { display: inline-block; padding-left: 9px; border-left: 3px solid #555d55; color: #bec4bb; }
.discord-mention { padding: 1px 3px; border-radius: 3px; background: #3c4d66; color: #b9d0f4; }
.discord-inline-code { padding: 1px 4px; border-radius: 3px; background: #202320; color: #d5dbd1; font-family: Consolas, monospace; }
.discord-code-block { overflow-x: auto; margin: 3px 0; padding: 9px 11px; border: 1px solid #414741; border-radius: 5px; background: #202320; color: #d5dbd1; font-size: 9px; white-space: pre-wrap; }
.discord-spoiler { padding: 1px 3px; border-radius: 3px; background: #151715; color: transparent; cursor: pointer; }
.discord-spoiler:hover { color: #d5dbd1; }
.discord-embed { position: relative; overflow: hidden; padding: 12px 13px; border-left: 4px solid var(--embed-accent, #879477); border-radius: 4px; background: #2b2e2b; color: #e0e4dc; font-size: 10px; }
.discord-embed-index { display: block; margin: 0 0 7px; color: #858d83; font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.discord-embed-author { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; color: #e0e4dc; font-weight: 600; }
.discord-embed-author img, .discord-embed-footer img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; }
.discord-embed a { color: #8db4e8; text-decoration: none; }
.discord-embed a:hover { text-decoration: underline; }
.discord-embed-title { margin: 0 0 6px; color: #f0f1ee; font-size: 12px; font-weight: 700; }
.discord-embed-description { color: #d5dad2; font-size: 10px; line-height: 1.55; white-space: normal; }
.discord-embed-main { min-width: 0; }
.discord-embed-main.discord-has-thumbnail { display: flex; align-items: flex-start; justify-content: space-between; gap: 13px; }
.discord-embed-thumbnail { flex: 0 0 76px; width: 76px; max-height: 76px; border-radius: 5px; object-fit: cover; }
.discord-embed-field { display: grid; gap: 4px; margin-top: 11px; }
.discord-embed-field.inline { display: inline-grid; width: calc(33.33% - 8px); margin-right: 8px; vertical-align: top; }
.discord-embed-field strong { color: #e1e5dd; font-size: 9px; }
.discord-embed-field span { color: #b8beb4; font-size: 9px; line-height: 1.45; }
.discord-embed-image { display: block; width: 100%; max-height: 280px; margin-top: 11px; border-radius: 5px; object-fit: contain; object-position: left; }
.discord-embed-footer { display: flex; align-items: center; gap: 7px; margin-top: 11px; color: #adb4a9; font-size: 8px; }
.discord-preview-empty { padding: 28px 15px; border: 1px dashed #414841; border-radius: 6px; color: #9ba297; font-size: 10px; text-align: center; }
.discord-attachment { overflow: hidden; border: 1px solid #3f4540; border-radius: 7px; background: #2b2e2b; }
.discord-attachment img { display: block; width: 100%; max-height: 310px; object-fit: contain; object-position: left; background: #202320; }
.discord-attachment span { display: block; padding: 8px 10px; color: #929a90; font-size: 8px; }
.embed-raw-heading { margin-bottom: 9px; color: #dce0d8; font-size: 10px; font-weight: 600; }
.embed-json-area { min-height: 230px; font-family: Consolas, "SFMono-Regular", monospace; font-size: 9px; line-height: 1.5; }
.embed-raw-actions { margin-top: 9px; }
.embed-raw-actions .btn { min-height: 30px; font-size: 9px; }
@media (max-width: 1100px) {
  .custom-embed-layout { grid-template-columns: minmax(0, 1fr) minmax(320px, .9fr); }
}
@media (max-width: 900px) {
  .custom-embed-layout { grid-template-columns: 1fr; }
  .embed-preview-column { position: static; }
}
@media (max-width: 620px) {
  .custom-embed-layout .grid-3, .custom-embed-layout .grid-2 { grid-template-columns: 1fr; }
  .embed-editor-footer { align-items: flex-start; flex-direction: column; }
}

/* Leveling module */
.leveling-demo-note { margin-bottom: 15px; }
.leveling-tabs { display: flex; gap: 5px; overflow-x: auto; margin: 0 0 18px; padding: 5px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); scrollbar-width: thin; }
.leveling-tab { flex: 0 0 auto; min-height: 34px; padding: 0 13px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); font: inherit; font-size: 10px; cursor: pointer; transition: background .16s ease, color .16s ease, border-color .16s ease; }
.leveling-tab:hover { background: #343a34; color: #e1e5dd; }
.leveling-tab.active { border-color: #495248; background: #394238; color: #e6eadf; }
.leveling-section-title { margin: 0 0 15px; }
.leveling-section-title h2 { margin: 0; color: var(--text); font-size: 18px; letter-spacing: -.02em; }
.leveling-section-title p { max-width: 760px; margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.leveling-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 14px; }
.leveling-grid.mt-14 { margin-top: 14px; }
.leveling-card { overflow: visible; }
.leveling-card .card-title { font-size: 13px; }
.leveling-card .card-subtitle { font-size: 10px; }
.leveling-card .card-body > .switch-row:first-child { margin-top: 0; }
.leveling-card .switch-row { padding: 2px 0; }
.leveling-card .field-hint { display: block; margin-top: 6px; }
.leveling-formula-note { display: grid; gap: 5px; margin-top: 14px; padding: 11px 12px; border: 1px solid #434c42; border-radius: 8px; background: #2b302c; color: #aeb7aa; font-size: 9px; line-height: 1.45; }
.leveling-formula-note strong { margin-bottom: 1px; color: #d8dfd4; font-size: 9px; }
.leveling-message-card { max-width: 100%; }
.leveling-message-card .textarea { min-height: 130px; }
.leveling-tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.leveling-tag-list span { padding: 4px 7px; border: 1px solid #485045; border-radius: 999px; background: #2b312d; color: #c0cbb5; font-family: "Plus Jakarta Sans", sans-serif; font-size: 9px; }
.leveling-action-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.leveling-action-row .field-hint { margin: 0; }
.levelup-test-channel { min-width: 220px; }
.levelup-test-channel .field { margin: 0; }
.color-input { min-height: 38px; padding: 4px; }
.leveling-split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(260px, .9fr); gap: 22px; margin-top: 17px; }
.leveling-split .field-label { margin-bottom: 8px; }
.leveling-empty { padding: 12px 13px; border: 1px dashed #485045; border-radius: 8px; color: #9ea79a; font-size: 10px; line-height: 1.55; }
.leveling-list { display: grid; gap: 7px; }
.leveling-list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 10px; border: 1px solid #414a41; border-radius: 8px; background: #2c322d; color: #dce1d8; font-size: 10px; }
.leveling-list-row > div { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.leveling-level-pill { padding: 4px 7px; border-radius: 999px; background: #414c3d; color: #d0dcc4; font-size: 9px; font-weight: 700; }
.leveling-row-meta { color: #abb4a7; font-size: 9px; }
.leveling-add-form { margin-top: 13px; padding-top: 13px; border-top: 1px solid #414842; }
.leveling-add-grid { align-items: start; }
.leveling-narrow-card { max-width: 620px; }
.leveling-toggle-grid { margin-top: 14px; }
.leveling-color-input { width: 100%; min-height: 37px; padding: 4px; cursor: pointer; }
.rank-card-preview { --rank-accent: #9eaa8a; display: flex; align-items: center; gap: 15px; min-height: 145px; aspect-ratio: 4 / 1; padding: 18px; border: 1px solid #505a4d; border-radius: 11px; background: radial-gradient(ellipse at 90% 15%, rgba(158,170,138,.22), transparent 38%), linear-gradient(120deg, #292e2a, #3a4038); background-position: center; background-size: cover; color: #e2e6dd; }
.rank-card-preview.tone-light { border-color: #ccd5c7; background: linear-gradient(120deg, #e9eee5, #f7f3e9); color: #30372e; }
.rank-card-preview.tone-light .rank-card-user span, .rank-card-preview.tone-light .rank-card-rank { color: #596354; }
.rank-card-avatar { display: grid; flex: 0 0 52px; width: 52px; height: 52px; place-items: center; border: 2px solid var(--rank-accent); border-radius: 50%; background: #4a5544; color: #edf0e9; font-size: 18px; font-weight: 700; }
.rank-card-user { display: grid; flex: 1; min-width: 0; gap: 5px; }
.rank-card-user strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.rank-card-user span, .rank-card-rank { color: #aeb7a8; font-size: 9px; }
.rank-card-progress { overflow: hidden; height: 7px; margin-top: 3px; border-radius: 999px; background: #222622; }
.rank-card-progress span { display: block; width: 64%; height: 100%; border-radius: inherit; background: var(--rank-accent); }
.rank-card-preview[data-progress="outline"] .rank-card-progress { border: 1px solid var(--rank-accent); background: transparent; }
.rank-card-preview[data-progress="outline"] .rank-card-progress span { background: transparent; }
.rank-card-preview[data-progress="gradient"] .rank-card-progress span { background: linear-gradient(90deg, var(--rank-accent), #d0d9c5); }
.rank-card-rank { align-self: flex-start; }
@media (max-width: 900px) {
  .leveling-grid { grid-template-columns: 1fr; }
  .leveling-split { grid-template-columns: 1fr; }
  .leveling-narrow-card { max-width: 100%; }
}
@media (max-width: 620px) {
  .leveling-tabs { margin-right: -2px; }
  .leveling-tab { padding: 0 10px; }
  .leveling-card .grid-3, .leveling-card .grid-2, .leveling-add-grid { grid-template-columns: 1fr; }
  .leveling-action-row { align-items: flex-start; flex-direction: column; }
  .rank-card-preview { min-height: 125px; padding: 13px; }
}

.auth-screen { display: grid; min-height: 100vh; place-items: center; padding: 28px; background: radial-gradient(ellipse at 50% 0%, rgba(135,148,119,.11), transparent 52%), var(--paper); }
.auth-card { width: min(620px, 100%); padding: 34px; border: 1px solid #424a43; border-radius: 18px; background: #2b302d; box-shadow: var(--shadow); }
.auth-mark { width: 44px; height: 44px; margin-bottom: 28px; font-size: 28px; }
.auth-card h1 { font-size: clamp(26px, 4vw, 36px); }
.auth-button { margin-top: 22px; text-decoration: none; }
.guild-choice-list { display: grid; gap: 9px; max-height: min(52vh, 520px); overflow: auto; margin-top: 22px; }
.guild-choice { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 10px 12px; border: 1px solid #414942; border-radius: 11px; background: #252a27; }
.guild-choice-identity { display: flex; align-items: center; gap: 11px; min-width: 0; }
.guild-choice-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guild-choice-icon { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; overflow: hidden; border-radius: 10px; background: #3b4439; color: #dce3d4; font-size: 14px; font-weight: 700; }
.guild-choice-icon img { width: 100%; height: 100%; object-fit: cover; }
.guild-picker-modal { max-height: 80vh; }
.save-status { align-self: center; color: var(--muted); font-size: 10px; }
.status-dot.offline { background: #b98879; box-shadow: 0 0 0 3px rgba(185,136,121,.12); }
.status-dot.online { background: #8fa77b; box-shadow: 0 0 0 3px rgba(143,167,123,.14); }
@media (max-width: 620px) {
  .auth-screen { padding: 16px; }
  .auth-card { padding: 23px 19px; }
  .guild-choice { align-items: flex-start; flex-direction: column; }
  .guild-choice > .btn, .guild-choice > a { align-self: flex-end; }
}
