@layer base {
[hidden] {
  display: none !important;
}

:root {
  --ink: #121518;
  --ink-soft: #2c3137;
  --cream: #f7f3ef;
  --sea: #0f6a78;
  --sun: #f4a340;
  --rose: #d66d5c;
  --card: #ffffff;
  --surface-2: #fbf9f6;
  --surface-3: #f9f5ef;
  --border: #e3ddd6;
  --bg-1: #ffe5c4;
  --bg-2: #f4efe8;
  --bg-3: #e9f3f1;
  --role-public: #ffffff;
  --role-mod: #2cb678;
  --role-admin: #e35678;
  --shadow: 0 18px 45px rgba(16, 20, 24, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Source Sans 3", sans-serif;
  background: radial-gradient(
    circle at 20% 20%,
    var(--bg-1) 0,
    var(--bg-2) 45%,
    var(--bg-3) 100%
  );
  min-height: 100vh;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--card);
  border-right: 1px solid var(--border);
  padding: 20px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 6px 8px;
  text-decoration: none;
  color: inherit;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

.sidebar-toggle {
  align-self: flex-start;
}

.logo {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--sea), var(--sun));
  color: white;
  font-weight: 700;
  overflow: hidden;
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}

.nav-section {
  border-radius: 16px;
  background: var(--surface-2);
  padding: 10px 12px;
  border: 1px solid transparent;
}

.nav-section[open] {
  border-color: var(--border);
}

.nav-section summary {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  list-style: none;
}

.nav-section summary::-webkit-details-marker {
  display: none;
}

.nav-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: var(--sea);
}

.nav-icon svg {
  width: 20px;
  height: 20px;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0 0 32px;
}

.nav-link {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  transition: background 0.15s ease, color 0.15s ease;
  min-height: 32px;
}

.nav-link:hover {
  background: var(--surface-3);
  color: var(--ink);
}

.nav-link.active {
  background: color-mix(in srgb, var(--sea) 18%, transparent);
  color: var(--ink);
}

.nav-item-icon {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.nav-item-icon img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  opacity: 0.82;
}

.nav-link.active .nav-item-icon img,
.nav-link:hover .nav-item-icon img {
  opacity: 1;
}

.nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--sun);
  flex-shrink: 0;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sidebar-assistant-panels {
  flex: 0 0 auto;
  min-width: 0;
}

.sidebar-assistant-panels:empty {
  display: none;
}

.user-chip {
  font-weight: 600;
  padding: 6px 10px;
  background: var(--surface-2);
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
}

.user-chip-link:hover {
  background: var(--surface-3);
  border-color: var(--border);
}

.user-chip-link:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--sea) 70%, transparent);
  outline-offset: 2px;
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--sea), var(--sun));
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.icon-button {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--ink);
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.mobile-topbar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
  position: sticky;
  top: 0;
  z-index: 10;
}

.mobile-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

.content {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1;
}

.hero {
  padding: 30px;
  border-radius: 24px;
  background: linear-gradient(
    120deg,
    color-mix(in srgb, var(--sea) 18%, transparent),
    color-mix(in srgb, var(--sun) 28%, transparent)
  );
  box-shadow: var(--shadow);
  animation: fadeInUp 0.8s ease forwards;
}

.hero h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.4rem;
  margin-top: 0;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.grid .card {
  animation-delay: 0.06s;
}

.grid .card:nth-child(2) {
  animation-delay: 0.12s;
}

.grid .card:nth-child(3) {
  animation-delay: 0.18s;
}

.grid .card:nth-child(4) {
  animation-delay: 0.24s;
}

.card {
  background: var(--card);
  border-radius: 18px;
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  animation: fadeInUp 0.8s ease forwards;
}

.card h1,
.card h2 {
  font-family: "Space Grotesk", sans-serif;
}

.button {
  background: var(--sea);
  color: white;
  padding: 10px 18px;
  border-radius: 12px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

.button.subtle {
  background: var(--surface-2);
  color: var(--ink);
}

.button.danger {
  background: var(--rose);
}

.platform-toggle {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 320px;
}

.platform-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.platform-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-weight: 600;
}

.platform-check.is-disabled {
  opacity: 0.6;
}

.platform-check input {
  width: 16px;
  height: 16px;
}

.platform-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.platform-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
  overflow: hidden;
}

.platform-track label {
  text-align: center;
  font-weight: 600;
  padding: 6px 8px;
  cursor: pointer;
  z-index: 2;
  color: var(--ink-soft);
}

.platform-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(33.333% - 8px);
  height: calc(100% - 8px);
  border-radius: 999px;
  background: #5865f2;
  transition: transform 0.2s ease, background 0.2s ease;
  z-index: 1;
}

.platform-toggle input[value="both"]:checked ~ .platform-track .platform-thumb {
  transform: translateX(100%);
  background: #2cb678;
}

.platform-toggle input[value="twitch"]:checked ~ .platform-track .platform-thumb {
  transform: translateX(200%);
  background: #9146ff;
}

.platform-toggle input[value="discord"]:checked ~ .platform-track label[for^="platform-discord"],
.platform-toggle input[value="both"]:checked ~ .platform-track label[for^="platform-both"],
.platform-toggle input[value="twitch"]:checked ~ .platform-track label[for^="platform-twitch"] {
  color: var(--ink);
}

.command-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 700;
  color: white;
}

.badge.discord {
  background: #5865f2;
}

.badge.both {
  background: #2cb678;
}

.badge.twitch {
  background: #9146ff;
}

.badge.kick {
  background: #53fc18;
  color: #0b1802;
}

.badge.youtube {
  background: #ff0000;
}

.link {
  color: var(--sea);
  font-weight: 600;
  text-decoration: none;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--border);
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: var(--surface-2);
  border-radius: 12px;
}

.table-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
}

.table-search {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-family: inherit;
  min-width: 220px;
}

.table-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.table-page-size {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--ink-soft);
}

.table-page-size select {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.table-page-label {
  font-weight: 600;
  color: var(--muted);
}

.table-pagination .button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.table th[data-sort] {
  cursor: pointer;
}

.table th[data-sort]:hover {
  color: var(--sea);
}

.commands-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.log-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
}

.command-subtitle {
  margin: 6px 0 0;
  color: var(--ink-soft);
}

.table-note {
  margin: 12px 0;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--ink-soft);
}

.table-note code {
  background: var(--surface-3);
  padding: 2px 6px;
  border-radius: 6px;
}

.table-wrap {
  overflow-x: auto;
}

.commands-table th {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.commands-table td {
  vertical-align: top;
}

.command-content-toggle {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
}

.command-content-toggle button {
  min-height: 36px;
  padding: 6px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.command-content-toggle button:hover,
.command-content-toggle button.is-active {
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--lumi-shadow-sm);
}

.command-list-content {
  min-width: 13rem;
  max-width: 32rem;
}

.command-list-content .command-preview {
  max-width: 30rem;
}

.command-description {
  flex-basis: 100%;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.command-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.command-toggle {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.command-toggle::before {
  content: "+";
}

.command-root.is-expanded .command-toggle::before {
  content: "-";
}

.command-toggle.spacer {
  visibility: hidden;
}

.command-subrow {
  display: none;
}

.command-subrow.is-visible {
  display: table-row;
}

.command-subrow .command-trigger {
  padding-left: 16px;
}

.command-highlight td {
  animation: commandPulse 2.4s ease-out;
}

.command-name {
  font-weight: 600;
}

.command-desc {
  display: inline-block;
  max-width: 320px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.copy-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  cursor: pointer;
  font-family: "Space Grotesk", sans-serif;
  position: relative;
  color: var(--ink);
}

.copy-pill code {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  color: inherit;
}

.copy-pill:hover {
  border-color: var(--sea);
  color: var(--ink);
}

.copy-pill.copied::after {
  content: "Copied";
  position: absolute;
  top: -10px;
  right: -6px;
  background: var(--sea);
  color: white;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 999px;
}

.copy-pill.copy-failed {
  border-color: var(--danger);
}

.copy-pill.copy-failed::after {
  content: "Copy failed";
  position: absolute;
  top: -10px;
  right: -6px;
  background: var(--danger);
  color: white;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 999px;
  white-space: nowrap;
}

.copy-link {
  min-width: 96px;
  justify-content: center;
}

.platform-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.level-pill,
.origin-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--surface-3);
  color: var(--ink-soft);
  border: 1px solid var(--border);
}

.level-pill.level-public {
  background: var(--role-public);
  color: #121518;
  border-color: color-mix(in srgb, var(--role-public) 60%, var(--border));
}

.level-pill.level-mod {
  background: var(--role-mod);
  color: white;
  border-color: color-mix(in srgb, var(--role-mod) 70%, var(--border));
}

.level-pill.level-admin {
  background: var(--role-admin);
  color: white;
  border-color: color-mix(in srgb, var(--role-admin) 70%, var(--border));
}

.command-count {
  font-weight: 700;
  text-align: right;
}

.edit-row {
  display: none;
}

.edit-row.is-open {
  display: table-row;
}

.edit-row td {
  padding: 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

@keyframes commandPulse {
  0% {
    background-color: color-mix(in srgb, var(--sea) 16%, transparent);
  }
  60% {
    background-color: color-mix(in srgb, var(--sea) 26%, transparent);
  }
  100% {
    background-color: transparent;
  }
}

.conflict-card {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--rose) 60%, var(--border));
  background: color-mix(in srgb, var(--rose) 12%, var(--surface-2));
}

.conflict-card strong {
  color: var(--ink);
}

.conflict-card ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.conflict-card code {
  background: var(--surface-3);
  padding: 2px 6px;
  border-radius: 6px;
}

.perm-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 46px;
  height: 22px;
  border-radius: 999px;
  background: var(--rose);
  border: 1px solid var(--border);
  margin-right: 8px;
  flex-shrink: 0;
}

.perm-toggle.on {
  background: #2cb678;
}

.perm-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  transform: translateX(2px);
  transition: transform 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.perm-toggle.on .perm-thumb {
  transform: translateX(24px);
}

.perm-label {
  font-weight: 600;
  color: var(--ink-soft);
}

.log-window {
  margin-top: 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  padding: 6px;
}

.log-entry {
  border-radius: 12px;
  border: 1px solid transparent;
  padding: 8px 10px;
  margin-bottom: 8px;
  background: var(--card);
}

.log-entry summary {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
}

.log-entry summary::-webkit-details-marker {
  display: none;
}

.log-marker {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sea);
  flex-shrink: 0;
}

.log-entry.level-error .log-marker {
  background: var(--rose);
}

.log-entry.level-warn .log-marker {
  background: var(--sun);
}

.log-entry.level-info .log-marker {
  background: var(--sea);
}

.log-entry.level-debug .log-marker {
  background: color-mix(in srgb, var(--ink-soft) 60%, transparent);
}

.log-message {
  flex: 1;
}

.log-level-pill {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--ink-soft);
  border: 1px solid var(--border);
}

.log-scope-pill {
  max-width: 15rem;
  padding: 4px 8px;
  border: 1px solid color-mix(in srgb, var(--sea) 45%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--sea) 12%, var(--surface-3));
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 10px 2px 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.log-live-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 2.75rem;
  margin-top: 14px;
}

.log-summary-grid {
  margin: 18px 0;
}

.log-storage-settings {
  margin-top: 16px;
}

.log-time {
  font-size: 0.85rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

.log-details {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono",
    monospace;
  font-size: 0.85rem;
  white-space: pre-wrap;
}

.log-details.empty {
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

@media (max-width: 760px) {
  .log-entry summary {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .log-message {
    flex-basis: calc(100% - 22px);
  }

  .log-time {
    width: 100%;
    padding-left: 20px;
  }
}

.identity-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.identity-list li {
  display: flex;
  gap: 8px;
  align-items: center;
}

.form-grid {
  display: grid;
  gap: 16px;
}

.form-grid h2 {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.theme-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.form-grid .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-grid .field.full {
  grid-column: 1 / -1;
}

.form-grid input,
.form-grid textarea,
.form-grid select {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-family: inherit;
}

.platform-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 10px;
}

.platform-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.platform-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.platform-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.platform-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.checkbox-grid label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  cursor: pointer;
}

.switch-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.switch-track {
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 112, 112, 0.18);
  border: 1px solid rgba(255, 112, 112, 0.5);
  position: relative;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.switch-track::after {
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.switch-input:checked + .switch-track {
  background: rgba(96, 211, 148, 0.25);
  border-color: rgba(96, 211, 148, 0.6);
}

.switch-input:checked + .switch-track::after {
  transform: translateX(20px);
}

.switch-input:focus-visible + .switch-track {
  box-shadow: 0 0 0 3px rgba(120, 200, 255, 0.35);
}

.switch-input:disabled + .switch-track {
  opacity: 0.5;
  cursor: not-allowed;
}

.switch-text {
  color: var(--text);
}

.switch--compact .switch-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.form-grid input[type="color"] {
  padding: 0;
  width: 56px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
}

.form-grid input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.form-grid input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 10px;
}

.form-grid input[type="color"]::-moz-color-swatch {
  border: none;
  border-radius: 10px;
}

.inline-form {
  display: inline-block;
  margin-right: 8px;
}

.inline-details {
  display: inline-block;
  margin-right: 8px;
}

.inline-details summary {
  list-style: none;
  display: inline-block;
}

.inline-details summary::-webkit-details-marker {
  display: none;
}

.flash {
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 600;
}

.flash.success {
  background: #e0f3ee;
  color: #0b5b5f;
}

.flash.error {
  background: #ffe4df;
  color: #8d3a2f;
}

.flash.info {
  background: #f0efe9;
  color: var(--ink);
}

.feedback-floating-button {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--sea);
  color: var(--lumi-button-text, #ffffff);
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
  cursor: pointer;
}

body.has-assistant-panel .feedback-floating-button {
  bottom: 96px;
}

.feedback-floating-badge {
  min-width: 22px;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--rose);
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}

.feedback-submit-status {
  min-height: 20px;
  color: var(--ink-soft);
  font-weight: 700;
}

.feedback-screenshot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.feedback-screenshot-actions label.button {
  margin: 0;
  cursor: pointer;
}

.feedback-screenshot-guide {
  display: grid;
  gap: 4px;
  margin: 2px 0 10px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--sea) 35%, var(--border));
  border-radius: 12px;
  background: color-mix(in srgb, var(--sea) 9%, var(--surface-2));
}

.feedback-screenshot-guide p {
  margin: 0;
  max-width: none;
}

.feedback-screenshot-preview {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}

.feedback-screenshot-preview[hidden] {
  display: none;
}

.feedback-screenshot-preview img {
  width: auto;
  max-width: min(260px, 42vw);
  max-height: 160px;
  border-radius: 8px;
  object-fit: contain;
  background: var(--surface-3);
}

.feedback-screenshot-preview img:not([src]) {
  display: none;
}

.feedback-similar {
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--sun) 40%, var(--border));
  border-radius: 12px;
  background: color-mix(in srgb, var(--sun) 8%, var(--surface-2));
}

.feedback-similar-list {
  display: grid;
  gap: 8px;
}

.feedback-similar-item {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
}

.feedback-attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feedback-page-actions,
.feedback-badge-row,
.feedback-two-col,
.feedback-admin-filters,
.feedback-detail-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.feedback-badge-row {
  margin-top: 10px;
}

.feedback-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 700;
}

.feedback-status-pill.solved {
  border-color: rgba(48, 170, 112, 0.45);
}

.feedback-status-pill.needs-context {
  border-color: rgba(236, 91, 91, 0.55);
}

.feedback-status-pill.not-worked {
  border-color: rgba(148, 163, 184, 0.55);
}

.feedback-list,
.feedback-admin-list,
.feedback-comments {
  display: grid;
  gap: 10px;
}

.feedback-row,
.feedback-admin-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
}

.feedback-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px;
}

.feedback-row h3 {
  margin: 0 0 4px;
}

.feedback-row.is-selected {
  outline: 2px solid var(--sea);
}

.feedback-detail-grid {
  align-items: stretch;
  margin: 14px 0;
}

.feedback-detail-grid > div {
  flex: 1 1 170px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}

.feedback-detail-grid span {
  display: block;
  color: var(--ink-soft);
  font-size: 13px;
}

.feedback-copy-block,
.feedback-comment {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}

.feedback-copy-block p,
.feedback-comment p {
  white-space: pre-wrap;
  margin-bottom: 0;
}

.feedback-two-col > * {
  flex: 1 1 280px;
  min-width: 0;
}

.feedback-comment-admin_reply {
  border-left: 4px solid var(--sea);
}

.feedback-comment-submit_comment,
.feedback-comment-submitter_comment {
  border-left: 4px solid var(--sun);
}

.feedback-comment-work_note {
  border-left: 4px solid var(--ink-soft);
  opacity: 0.92;
}

.feedback-status-fixed,
.feedback-status-solved,
.feedback-status-closed {
  border-color: rgba(48, 170, 112, 0.45);
  color: var(--success);
}

.feedback-status-needs_more_context {
  border-color: rgba(236, 91, 91, 0.55);
  color: var(--rose);
}

.feedback-status-duplicate,
.feedback-status-rejected,
.feedback-status-not_planned,
.feedback-status-wont_fix {
  border-color: rgba(148, 163, 184, 0.55);
  color: var(--ink-soft);
}

.feedback-admin-item summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px;
  cursor: pointer;
}

.feedback-admin-item summary small {
  display: block;
  margin-top: 4px;
  color: var(--ink-soft);
}

.feedback-admin-body {
  display: grid;
  gap: 14px;
  padding: 0 14px 14px;
}

.feedback-metadata {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}

.feedback-metadata pre {
  overflow: auto;
  max-height: 260px;
  margin: 8px 0 0;
  padding: 10px;
  border-radius: 10px;
  background: var(--surface-3);
  white-space: pre-wrap;
}

.feedback-history {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding-left: 20px;
}

.feedback-target-highlight {
  outline: 3px solid var(--sea) !important;
  outline-offset: 3px;
}

.lumi-context-menu {
  position: fixed;
  z-index: 120;
  min-width: 180px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.lumi-context-menu button {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.lumi-context-menu button:hover,
.lumi-context-menu button:focus {
  outline: none;
  background: var(--surface-2);
}

.lumi-context-menu button.is-disabled {
  color: var(--ink-soft);
  cursor: not-allowed;
  opacity: 0.48;
}

.lumi-context-menu button.is-disabled:hover,
.lumi-context-menu button.is-disabled:focus {
  background: transparent;
}

.lumi-context-tooltip {
  position: fixed;
  z-index: 130;
  max-width: min(280px, calc(100vw - 16px));
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-3);
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
  font-size: 13px;
  line-height: 1.35;
  pointer-events: none;
}

.checkbox-inline {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.stat {
  background: var(--surface-3);
  border-radius: 14px;
  padding: 16px;
}

.stats-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.stats-compare {
  display: none;
}

body.stats-compare-mode .stats-default {
  display: none;
}

body.stats-compare-mode .stats-compare {
  display: block;
}

.stats-compare-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.stat-label {
  display: block;
  color: var(--ink-soft);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  font-family: "Space Grotesk", sans-serif;
}

.hint {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.wizard-steps {
  padding-left: 20px;
  margin: 0 0 16px;
  color: var(--ink-soft);
}

.wizard-list {
  margin: 8px 0 0;
  padding-left: 18px;
}

.site-footer {
  padding: 24px 32px 40px;
  color: var(--ink-soft);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow);
  z-index: 50;
  max-width: 320px;
  animation: toast-in 0.2s ease;
}

.toast strong {
  font-size: 0.9rem;
}

.toast-error {
  border-color: rgba(214, 109, 92, 0.6);
  background: color-mix(in srgb, var(--rose) 12%, var(--surface-2));
}

.missing-block {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.missing-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--rose) 18%, transparent);
  color: var(--rose);
  font-weight: 700;
  font-size: 1.4rem;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-content {
  display: grid;
  gap: 12px;
}

.custom-page-frame {
  width: 100%;
  border: none;
  background: transparent;
  display: block;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 14, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 40;
  padding: 24px;
}

.modal-backdrop.is-open {
  display: flex;
}

.modal {
  width: min(560px, 92vw);
  background: var(--card);
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 20px;
  display: grid;
  gap: 12px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

body .modal-backdrop.destructive-confirm-modal {
  z-index: 220;
}

.destructive-inline-confirm {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 4px 6px;
  padding: 5px 7px;
  border: 1px solid color-mix(in srgb, var(--rose) 45%, var(--border));
  border-radius: 8px;
  background: color-mix(in srgb, var(--rose) 8%, var(--surface-2));
  font-size: 0.82rem;
}

.command-preview {
  display: inline-block;
  max-width: min(420px, 48vw);
  overflow: hidden;
  color: var(--ink);
  white-space: normal;
  vertical-align: bottom;
}

.command-preview.is-collapsed {
  display: -webkit-box;
  max-height: 3em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.command-preview.is-expanded {
  max-width: min(720px, 75vw);
  max-height: none;
  overflow: visible;
}

.command-preview-toggle {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.command-preview-toggle:hover,
.command-preview-toggle:focus-visible {
  color: var(--ink);
}

.preview-dynamic {
  padding: 0;
  border-radius: 3px;
  background: color-mix(in srgb, var(--sun) 28%, transparent);
  color: inherit;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}

.command-preview-unavailable {
  color: var(--ink-soft);
  font-style: italic;
}

.command-preview-details {
  display: inline-block;
  margin-left: 6px;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.command-preview-details summary {
  cursor: pointer;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 220px 1fr;
  }
}

@media (max-width: 900px) {
  .feedback-modal .form-grid {
    grid-template-columns: 1fr;
  }

  .feedback-modal .field.full {
    grid-column: auto;
  }

  .feedback-screenshot-actions,
  .feedback-modal .modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .feedback-screenshot-actions .button,
  .feedback-modal .modal-actions .button {
    width: 100%;
  }

  .feedback-screenshot-preview {
    width: 100%;
  }

  .feedback-screenshot-preview img {
    max-width: 100%;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100dvh;
    max-height: 100dvh;
    width: 260px;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    z-index: 20;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .mobile-topbar {
    display: flex;
  }

  .content {
    padding: 20px;
  }
}

body.sidebar-collapsed .sidebar {
  width: 90px;
  padding: 18px 10px;
}

body.sidebar-collapsed .app-shell {
  grid-template-columns: 90px 1fr;
}

body.sidebar-collapsed .brand-link .title,
body.sidebar-collapsed .nav-text,
body.sidebar-collapsed .nav-link-text,
body.sidebar-collapsed .user-name {
  display: none;
}

body.sidebar-collapsed .nav-links {
  padding: 8px 0 0;
  align-items: center;
}

body.sidebar-collapsed .nav-link {
  justify-content: center;
  width: 100%;
  padding: 6px;
  gap: 0;
}




.button.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.login-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

body.sidebar-collapsed .sidebar-footer {
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

body.sidebar-collapsed .sidebar-assistant-panels {
  width: 100%;
}

body.sidebar-collapsed .user-chip {
  padding: 6px;
  border-radius: 12px;
  justify-content: center;
  width: 100%;
}

body.sidebar-collapsed .sidebar-footer form {
  display: flex;
  justify-content: center;
  width: 100%;
}

body.sidebar-collapsed .icon-button {
  width: 34px;
  height: 34px;
}

body.sidebar-collapsed .nav-section summary {
  justify-content: center;
}

body.sidebar-collapsed .nav-section {
  padding: 8px;
}

body.sidebar-collapsed .nav-dot {
  width: 8px;
  height: 8px;
}

body.sidebar-collapsed .nav-item-icon {
  width: 20px;
  height: 20px;
}

body.sidebar-collapsed .nav-item-icon img {
  width: 18px;
  height: 18px;
}



.nav-link-text {
  display: inline-block;
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-icon-grid {
  display: grid;
  gap: 12px;
}

.nav-icon-row {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr auto;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.nav-icon-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-icon-preview {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-3);
  padding: 4px;
  object-fit: contain;
}

.nav-icon-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.moderation-note {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-3);
}

.profile-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.profile-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.profile-username {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-2);
}

.profile-username-label {
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.profile-username-value {
  font-weight: 700;
  font-size: 1.05rem;
}

.profile-widgets {
  display: grid;
  gap: 16px;
}

.profile-widget {
  background: var(--surface-2);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid var(--border);
}

.profile-widget h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-family: "Space Grotesk", sans-serif;
}
}



