:root {
  --ckn-bg: #f5f6fa;
  --ckn-surface: #ffffff;
  --ckn-surface-alt: #f8fafc;
  --ckn-red: #d7262b;
  --ckn-red-hover: #b91c21;
  --ckn-border: #e2e8f0;
  --ckn-muted: #64748b;
  --ckn-dark: #0f172a;
  --ckn-success: #059669;
  --ckn-success-bg: #ecfdf5;
  --ckn-warning: #d97706;
  --ckn-warning-bg: #fffbeb;
  --ckn-error: #dc2626;
  --ckn-error-bg: #fef2f2;
  --sidebar-width: 260px;
  --assistant-width: 380px;
  --shadow-sm: 0 1px 4px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 32px rgba(15, 23, 42, 0.1);
}

/* Dark mode — this CSS is token-driven, so flipping the --ckn-* values here
   re-themes the whole console in one place. `.dark` is set on <html> by
   lib/useTheme.ts; `:root.dark` (specificity 0,2,0) beats the plain `:root`
   above regardless of stylesheet load order. */
:root.dark {
  --ckn-bg: #0f1117;
  --ckn-surface: #1a1d27;
  --ckn-surface-alt: #242736;
  --ckn-border: #2e3347;
  --ckn-muted: #94a3b8;
  --ckn-dark: #f1f5f9;
  --ckn-success-bg: rgba(5, 150, 105, 0.16);
  --ckn-warning-bg: rgba(217, 119, 6, 0.16);
  --ckn-error-bg: rgba(220, 38, 38, 0.16);
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 32px rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--ckn-bg);
  color: var(--ckn-dark);
  font: 14px/1.45 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.admin-shell {
  display: flex;
  min-height: 100vh;
  overflow: hidden;
}

.sidebar-shell {
  width: var(--sidebar-width);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--ckn-border);
  background: var(--ckn-surface);
  padding: 12px;
  gap: 14px;
}

.brand-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  min-height: 64px;
  border-bottom: 1px solid var(--ckn-border);
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--ckn-dark);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.brand-title {
  font-weight: 700;
  line-height: 1;
}

.brand-subtitle {
  font-size: 12px;
  color: var(--ckn-muted);
  margin-top: 3px;
}

.sidebar-search,
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--ckn-border);
  background: var(--ckn-surface);
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--ckn-muted);
}

.sidebar-search input,
.search-box input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  min-width: 0;
}

.sidebar-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sidebar-pill {
  border: 1px solid var(--ckn-border);
  background: var(--ckn-surface);
  color: var(--ckn-muted);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
}

.sidebar-pill.active {
  color: var(--ckn-dark);
  background: var(--ckn-surface-alt);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: auto;
}

.sidebar-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-group-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ckn-muted);
  font-weight: 700;
}

.sidebar-group-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-link-custom {
  border: 0;
  border-left: 3px solid transparent;
  background: transparent;
  color: var(--ckn-muted);
  text-align: left;
  padding: 9px 10px;
  border-radius: 10px;
}

.nav-link-custom:hover,
.nav-link-custom.active {
  background: var(--ckn-surface-alt);
  color: var(--ckn-red);
}

.nav-link-custom.active {
  border-left-color: var(--ckn-red);
}

.nav-title {
  font-size: 12px;
  font-weight: 600;
}

.sidebar-user {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-top: 1px solid var(--ckn-border);
  background: var(--ckn-surface-alt);
  border-radius: 10px;
  font-size: 12px;
}

.user-badge,
.mini-avatar {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.main-shell {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 64px;
  border-bottom: 1px solid var(--ckn-border);
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 16px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-content-row {
  display: flex;
  min-height: 0;
  flex: 1;
}

.workspace-shell {
  min-width: 0;
  flex: 1;
  display: flex;
  background: var(--ckn-bg);
}

.workspace-card {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}

.workspace-head,
.skills-header {
  padding: 16px;
  border-bottom: 1px solid var(--ckn-border);
  background: var(--ckn-surface);
}

.title-row,
.section-head,
.skills-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

h2,
h3,
h4 {
  margin: 0;
}

.workspace-head p,
.section-title-box p,
.skills-header p,
.history-title-block p,
.prompt-card p,
.skill-card p {
  margin: 4px 0 0;
  color: var(--ckn-muted);
}

.header-actions,
.editor-actions,
.footer-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.search-box.compact {
  width: 220px;
  padding-block: 7px;
  background: var(--ckn-surface-alt);
}

.primary-button,
.secondary-button,
.success-button,
.text-button,
.icon-button,
.filter-button,
.event-toggle {
  border-radius: 10px;
  transition: 0.15s ease;
}

.primary-button,
.secondary-button,
.success-button,
.text-button,
.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--ckn-border);
  background: var(--ckn-surface);
  color: var(--ckn-dark);
}

.primary-button {
  border-color: var(--ckn-red);
  background: var(--ckn-red);
  color: #fff;
}

.primary-button:hover {
  background: var(--ckn-red-hover);
  border-color: var(--ckn-red-hover);
}

.success-button {
  border-color: #16a34a;
  background: #16a34a;
  color: #fff;
}

.secondary-button:hover,
.text-button:hover,
.icon-button:hover,
.filter-button:hover {
  background: var(--ckn-surface-alt);
}

.secondary-button.slim {
  padding: 5px 8px;
  font-size: 12px;
}

.text-button {
  background: var(--ckn-surface);
}

.icon-button {
  position: relative;
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--ckn-border);
  background: var(--ckn-surface);
  color: var(--ckn-dark);
}

.icon-button.subtle {
  width: 30px;
  height: 30px;
}

.badge-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--ckn-red);
  color: #fff;
  font-size: 10px;
  display: grid;
  place-items: center;
}

.mobile-only {
  display: none;
}

.assistant-column {
  width: var(--assistant-width);
  flex-shrink: 0;
  display: flex;
  border-left: 1px solid var(--ckn-border);
  background: var(--ckn-surface);
}

.assistant-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
}

.assistant-body {
  flex: 1;
  overflow: auto;
  padding: 16px;
  background: rgba(248, 250, 252, 0.8);
}

.assistant-head,
.assistant-actions,
.prompt-card-footer,
.skill-card-foot,
.skill-card-head,
.timeline-top,
.editor-modal-head,
.drawer-head,
.drawer-footer,
.history-head-row,
.editor-statusbar,
.status-left,
.status-right {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.assistant-head {
  margin-bottom: 14px;
}

.live-badge,
.saved-pill,
.active-ver-badge,
.token-badge,
.status-badge,
.tag,
.version-chip,
.file-chip,
.change-badge,
.filter-button span {
  border-radius: 999px;
}

.live-badge,
.saved-pill,
.active-ver-badge {
  background: var(--ckn-success-bg);
  color: var(--ckn-success);
  border: 1px solid #a7f3d0;
  font-size: 11px;
  padding: 4px 8px;
  font-weight: 700;
}

.assistant-summary,
.assistant-suggestions,
.editor-panel,
.prompt-card,
.skill-card,
.timeline-card {
  border: 1px solid var(--ckn-border);
  border-radius: 16px;
  background: var(--ckn-surface);
  box-shadow: var(--shadow-sm);
}

.assistant-summary,
.assistant-suggestions {
  padding: 14px;
  margin-bottom: 12px;
}

.assistant-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ckn-muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.assistant-summary p {
  white-space: pre-line;
  margin: 8px 0 0;
  font-size: 12px;
}

.assistant-suggestions a {
  display: block;
  color: var(--ckn-dark);
  text-decoration: none;
  border-left: 2px solid rgba(37, 99, 235, 0.25);
  padding-left: 10px;
  margin-top: 8px;
  font-size: 13px;
}

.assistant-footer {
  padding: 16px;
  border-top: 1px solid var(--ckn-border);
  background: var(--ckn-surface);
}

.assistant-footer label {
  display: block;
  font-size: 12px;
  color: var(--ckn-muted);
  font-weight: 700;
  margin-bottom: 8px;
}

.assistant-footer textarea,
.form-sheet textarea,
.editor-panel textarea,
.logic-upload textarea,
.form-sheet input,
.form-sheet select,
.editor-panel input {
  width: 100%;
  border: 1px solid var(--ckn-border);
  border-radius: 10px;
  padding: 10px 12px;
  outline: 0;
  background: var(--ckn-surface);
}

.assistant-footer textarea {
  background: var(--ckn-surface-alt);
  border: 0;
  resize: none;
  margin-bottom: 10px;
}

.paperclip-glyph {
  font-size: 12px;
}

.tab-strip,
.editor-modal-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--ckn-border);
}

.tab-strip {
  padding-top: 12px;
}

.tab-strip button,
.editor-modal-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--ckn-muted);
  padding: 10px 12px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.tab-strip button.active,
.editor-modal-tabs button.active {
  color: var(--ckn-red);
  border-bottom-color: var(--ckn-red);
  font-weight: 700;
}

.prompt-gallery-pane,
.prompt-gallery-body,
.skills-workspace,
.system-pane,
.system-editor,
.skill-editor-modal {
  min-height: 0;
  flex: 1;
  display: flex;
}

.prompt-gallery-pane,
.system-pane,
.skills-workspace,
.skill-editor-modal {
  overflow: hidden;
}

.prompt-gallery-pane {
  flex-direction: column;
}

.category-row {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding: 10px 16px;
  border-bottom: 1px solid var(--ckn-border);
  background: var(--ckn-surface);
}

.category-item {
  border: 1px solid var(--ckn-border);
  background: var(--ckn-surface);
  color: var(--ckn-muted);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  white-space: nowrap;
}

.category-item.active {
  background: var(--ckn-error-bg);
  border-color: rgba(215, 38, 43, 0.4);
  color: var(--ckn-red);
  font-weight: 700;
}

.cat-badge {
  background: var(--ckn-surface-alt);
  color: var(--ckn-muted);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
}

.category-item.active .cat-badge {
  background: var(--ckn-red);
  color: #fff;
}

.prompt-gallery-body,
.skills-grid,
.history-body,
.editor-modal-body {
  overflow: auto;
}

.prompt-gallery-body {
  padding: 16px;
}

.section-title-box {
  display: flex;
  gap: 12px;
  align-items: center;
}

.section-icon,
.skill-icon,
.history-icon,
.logic-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #eff6ff;
  color: #2563eb;
  flex-shrink: 0;
}

.section-icon.alt {
  background: #eff6ff;
  color: #2563eb;
}

.prompt-card-grid,
.skills-grid {
  display: grid;
  gap: 16px;
}

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

.skills-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  padding: 16px;
  background: var(--ckn-surface-alt);
}

.prompt-card {
  position: relative;
  padding: 18px;
}

.prompt-card.is-draft {
  background: var(--ckn-surface-alt);
  border-style: dashed;
  opacity: 0.8;
}

.card-actions {
  position: absolute;
  top: 10px;
  right: 10px;
}

.prompt-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 36px;
  margin-bottom: 10px;
}

.prompt-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--ckn-surface-alt);
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}

.prompt-card p,
.skill-card p {
  flex: 1;
  font-size: 12px;
}

.prompt-card-footer {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--ckn-border);
  font-size: 12px;
  color: var(--ckn-muted);
}

.tag {
  font-size: 11px;
  padding: 4px 10px;
  border: 1px solid transparent;
}

.tag-ok {
  background: var(--ckn-success-bg);
  color: #065f46;
  border-color: #a7f3d0;
}

.tag-muted {
  background: var(--ckn-surface);
  color: var(--ckn-muted);
  border-color: var(--ckn-border);
}

.system-pane {
  background: var(--ckn-surface-alt);
}

.system-apps {
  width: 232px;
  flex-shrink: 0;
  border-right: 1px solid var(--ckn-border);
  background: var(--ckn-surface);
  padding: 16px 12px;
  overflow: auto;
}

.mini-title {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--ckn-muted);
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.app-select {
  width: 100%;
  border: 2px solid var(--ckn-border);
  background: var(--ckn-surface);
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  text-align: left;
}

.app-select.active {
  border-color: var(--ckn-red);
  background: var(--ckn-error-bg);
}

.app-icon,
.editor-app-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  flex-shrink: 0;
}

.system-editor {
  flex-direction: column;
}

.editor-topbar,
.editor-desc-row,
.variable-row,
.editor-statusbar {
  padding: 10px 14px;
  background: var(--ckn-surface);
  border-bottom: 1px solid var(--ckn-border);
}

.editor-topbar {
  flex-shrink: 0;
}

.editor-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.editor-heading div {
  display: flex;
  flex-direction: column;
}

.editor-heading span {
  color: var(--ckn-muted);
  font-size: 12px;
}

.editor-desc-row {
  background: var(--ckn-surface-alt);
}

.editor-desc-row input {
  width: 100%;
  border: 1px solid var(--ckn-border);
  border-radius: 8px;
  padding: 9px 10px;
}

.variable-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 12px;
}

.variable-row span {
  color: var(--ckn-muted);
  font-weight: 700;
}

.var-chip {
  border: 1px solid var(--ckn-border);
  background: var(--ckn-surface);
  border-radius: 999px;
  padding: 4px 8px;
}

.var-chip code {
  font-size: 12px;
}

.sys-editor {
  flex: 1;
  min-height: 0;
  width: 100%;
  border: 0;
  outline: 0;
  resize: none;
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 16px 20px;
  font: 13px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.token-badge {
  border: 1px solid;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
}

.token-ok {
  background: var(--ckn-success-bg);
  color: #065f46;
  border-color: #a7f3d0;
}

.token-warn {
  background: var(--ckn-warning-bg);
  color: #92400e;
  border-color: #fde68a;
}

.token-over {
  background: var(--ckn-error-bg);
  color: #991b1b;
  border-color: #fecaca;
}

.editor-statusbar {
  border-top: 1px solid var(--ckn-border);
  border-bottom: 0;
  background: var(--ckn-surface-alt);
  color: #94a3b8;
  font-size: 11px;
  flex-shrink: 0;
}

.status-left,
.status-right {
  flex-wrap: wrap;
}

.save-flash {
  color: var(--ckn-success);
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.32);
  display: flex;
  justify-content: flex-end;
  z-index: 50;
}

.drawer {
  height: 100%;
  background: var(--ckn-surface);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 30px rgba(15, 23, 42, 0.18);
}

.drawer-head {
  padding: 16px;
  border-bottom: 1px solid var(--ckn-border);
}

.drawer-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
  background: var(--ckn-surface);
}

.close-button {
  border: 0;
  background: transparent;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
}

.close-button:hover {
  background: var(--ckn-surface-alt);
}

.close-button.light {
  color: #fff;
}

.close-button.light:hover {
  background: rgba(255, 255, 255, 0.16);
}

.form-sheet {
  padding: 20px;
  background: rgba(248, 250, 252, 0.8);
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.form-sheet label,
.editor-panel label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-sheet label span,
.editor-panel label span {
  font-size: 13px;
  font-weight: 600;
}

.form-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
}

.form-row > label:last-child:only-child {
  grid-column: 1 / -1;
}

.fill-field {
  grid-column: 2 / 3;
}

.icon-field {
  grid-column: 1 / 2;
}

.field-meta {
  display: flex;
  justify-content: space-between;
  color: var(--ckn-muted);
  font-size: 12px;
}

.switch-field {
  grid-template-columns: 1fr;
}

.switch-box {
  border: 1px solid var(--ckn-border);
  border-radius: 12px;
  background: var(--ckn-surface);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.switch-box.wide {
  margin-top: 8px;
}

.switch-toggle {
  width: 46px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: #cbd5e1;
  padding: 3px;
  position: relative;
}

.switch-toggle span {
  display: block;
  width: 20px;
  height: 20px;
  background: var(--ckn-surface);
  border-radius: 999px;
  transition: transform 0.15s ease;
}

.switch-toggle.on {
  background: var(--ckn-success);
}

.switch-toggle.on span {
  transform: translateX(20px);
}

.text-success {
  color: var(--ckn-success);
}

.text-muted {
  color: var(--ckn-muted);
}

.drawer-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--ckn-border);
  background: var(--ckn-surface);
}

.danger-link {
  border: 0;
  background: transparent;
  color: var(--ckn-error);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.skills-header {
  align-items: center;
}

.filter-button {
  padding: 7px 10px;
  font-size: 12px;
}

.filter-button.active {
  background: var(--ckn-dark);
  color: #fff;
  border-color: var(--ckn-dark);
}

.filter-button span {
  background: rgba(255, 255, 255, 0.18);
  padding: 1px 6px;
}

.skill-card {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
}

.skill-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.skill-card-head {
  align-items: flex-start;
}

.skill-main {
  display: flex;
  gap: 10px;
  align-items: center;
}

.skill-main strong,
.timeline-title strong,
.history-head-row strong {
  display: block;
}

.skill-main span,
.timeline-user,
.timeline-card span {
  color: var(--ckn-muted);
  font-size: 12px;
}

.status-active {
  background: var(--ckn-success-bg);
  color: var(--ckn-success);
  border: 1px solid #a7f3d0;
}

.status-draft {
  background: var(--ckn-surface-alt);
  color: var(--ckn-muted);
  border: 1px solid #cbd5e1;
}

.status-error {
  background: var(--ckn-error-bg);
  color: var(--ckn-error);
  border: 1px solid #fecaca;
}

.status-badge {
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 700;
}

.skill-card-foot {
  border-top: 1px solid var(--ckn-border);
  padding-top: 12px;
  align-items: flex-end;
}

.skill-meta,
.skill-foot-actions,
.timeline-title,
.change-list,
.change-row,
.history-stats {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.version-chip,
.file-chip {
  background: var(--ckn-surface-alt);
  border: 1px solid var(--ckn-border);
  font-size: 11px;
  padding: 3px 8px;
}

.version-chip.error,
.error-note {
  color: var(--ckn-error);
}

.history-hint {
  opacity: 0.7;
  font-size: 11px;
  color: var(--ckn-muted);
}

.modal-shell {
  background: var(--ckn-surface);
  margin: auto;
  overflow: hidden;
}

.modal-shell.lg {
  width: min(960px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  border-radius: 18px;
}

.modal-shell.fullscreen {
  width: 100vw;
  height: 100vh;
}

.history-modal,
.history-body {
  display: flex;
  flex-direction: column;
}

.history-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
  padding: 20px;
}

.history-hero-top,
.history-title-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.history-hero-top {
  align-items: flex-start;
  justify-content: space-between;
}

.history-icon {
  width: 48px;
  height: 48px;
}

.history-title-block {
  flex: 1;
}

.history-title-block p {
  color: rgba(255, 255, 255, 0.74);
}

.stat-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
  min-width: 92px;
  text-align: center;
}

.stat-card.danger {
  background: rgba(220, 38, 38, 0.24);
}

.stat-card strong {
  display: block;
  font-size: 20px;
}

.stat-card span {
  font-size: 11px;
  opacity: 0.75;
}

.history-body {
  background: var(--ckn-surface-alt);
  padding: 20px;
}

.history-head-row {
  margin-bottom: 12px;
  color: var(--ckn-muted);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timeline-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.timeline-dot {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font: 700 12px/1 ui-monospace, monospace;
  flex-shrink: 0;
  border: 2px solid transparent;
}

.timeline-dot.active {
  background: var(--ckn-success-bg);
  color: var(--ckn-success);
  border-color: #a7f3d0;
}

.timeline-dot.draft {
  background: var(--ckn-warning-bg);
  color: var(--ckn-warning);
  border-color: #fde68a;
}

.timeline-dot.error {
  background: var(--ckn-error-bg);
  color: var(--ckn-error);
  border-color: #fecaca;
}

.timeline-dot.old {
  background: var(--ckn-surface-alt);
  color: #94a3b8;
  border-color: var(--ckn-border);
}

.timeline-card {
  flex: 1;
  padding: 14px;
}

.timeline-card.active {
  border-left: 3px solid var(--ckn-success);
}

.timeline-card.draft {
  border-left: 3px solid var(--ckn-warning);
}

.timeline-card.error {
  border-left: 3px solid var(--ckn-error);
}

.change-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
}

.change-badge.add {
  background: var(--ckn-success-bg);
  color: var(--ckn-success);
}

.change-badge.fix {
  background: var(--ckn-error-bg);
  color: var(--ckn-error);
}

.change-badge.update {
  background: var(--ckn-warning-bg);
  color: #b45309;
}

.change-badge.refactor {
  background: #eff6ff;
  color: #2563eb;
}

.error-box,
.activation-note {
  font-size: 12px;
  padding: 10px 12px;
  border-radius: 10px;
}

.error-box {
  background: var(--ckn-error-bg);
  color: #991b1b;
  border: 1px solid #fecaca;
}

.activation-note {
  color: var(--ckn-success);
}

.event-toggle {
  border: 1px solid var(--ckn-border);
  background: var(--ckn-surface);
  color: var(--ckn-dark);
  padding: 6px 10px;
  margin-top: 6px;
}

.event-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.event-icon {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  margin-top: 3px;
  flex-shrink: 0;
}

.event-icon.activate {
  background: var(--ckn-success);
}

.event-icon.deactivate {
  background: var(--ckn-error);
}

.event-icon.upload {
  background: #2563eb;
}

.event-icon.update {
  background: var(--ckn-warning);
}

.event-icon.error {
  background: var(--ckn-error);
}

.event-row div:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.event-row strong {
  font-size: 12px;
}

.skill-editor-modal {
  background: var(--ckn-bg);
  flex-direction: column;
}

.editor-modal-head {
  padding: 14px 18px;
  background: var(--ckn-surface);
  border-bottom: 1px solid var(--ckn-border);
}

.editor-modal-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.editor-modal-title h3 span {
  color: var(--ckn-muted);
  font-weight: 400;
}

.editor-modal-tabs {
  padding: 0 18px;
  background: var(--ckn-surface);
}

.editor-modal-body {
  padding: 24px;
}

.editor-panel,
.logic-upload {
  width: min(900px, 100%);
  margin: 0 auto;
  padding: 20px;
}

.logic-upload {
  text-align: center;
}

.logic-icon {
  margin: 0 auto 12px;
  width: 64px;
  height: 64px;
}

.dropzone {
  max-width: 560px;
  margin: 20px auto 0;
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  background: var(--ckn-surface-alt);
  padding: 36px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

@media (max-width: 1279px) {
  .assistant-column {
    display: none;
  }

  .mobile-only {
    display: inline-flex;
  }
}

@media (max-width: 991px) {
  .sidebar-shell {
    display: none;
  }

  .system-pane {
    flex-direction: column;
  }

  .system-apps {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--ckn-border);
  }
}

@media (max-width: 767px) {
  .topbar {
    padding: 0 12px;
  }

  .workspace-head,
  .skills-header,
  .prompt-gallery-body,
  .history-body,
  .editor-modal-body {
    padding: 12px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .icon-field,
  .fill-field {
    grid-column: auto;
  }

  .search-box.compact {
    width: 100%;
  }

  .title-row,
  .section-head,
  .skills-header,
  .editor-topbar,
  .drawer-footer,
  .editor-modal-head,
  .skill-card-foot,
  .timeline-top,
  .assistant-actions,
  .editor-statusbar {
    align-items: stretch;
    flex-direction: column;
  }

  .history-hero-top,
  .history-title-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SKILL MANAGEMENT — redesigned 2026-05-25 (sm- prefix)
   ═══════════════════════════════════════════════════════════════════════════ */
.sm-root { display: flex; flex-direction: column; flex: 1; min-height: 0; background: var(--ckn-bg); overflow: hidden; }
.sm-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; background: var(--ckn-surface); border-bottom: 1px solid var(--ckn-border); flex-shrink: 0; flex-wrap: wrap; }
.sm-toolbar-left { display: flex; align-items: center; gap: 12px; }
.sm-page-icon { width: 38px; height: 38px; border-radius: 10px; background: #eff6ff; color: #2563eb; display: grid; place-items: center; flex-shrink: 0; }
.sm-page-title { margin: 0; font-size: 15px; font-weight: 700; }
.sm-page-sub { margin: 2px 0 0; font-size: 12px; color: var(--ckn-muted); }
.sm-toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sm-search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--ckn-border); border-radius: 9px; padding: 7px 10px; background: var(--ckn-surface-alt); color: var(--ckn-muted); width: 200px; }
.sm-search input { flex: 1; border: 0; outline: 0; background: transparent; min-width: 0; font-size: 13px; color: var(--ckn-dark); }
.sm-filters { display: flex; gap: 3px; background: var(--ckn-surface-alt); border: 1px solid var(--ckn-border); border-radius: 10px; padding: 3px; }
.sm-filter-btn { border: 0; background: transparent; border-radius: 7px; padding: 5px 10px; font-size: 12px; color: var(--ckn-muted); display: inline-flex; align-items: center; gap: 5px; transition: 0.12s; }
.sm-filter-btn:hover { background: var(--ckn-surface); color: var(--ckn-dark); }
.sm-filter-btn.active { background: var(--ckn-surface); color: var(--ckn-dark); font-weight: 600; box-shadow: var(--shadow-sm); }
.sm-filter-count { background: #e2e8f0; color: #475569; border-radius: 999px; padding: 1px 6px; font-size: 11px; font-weight: 700; }
.sm-filter-count-error { background: #fecaca; color: #dc2626; }
.sm-btn-primary { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 9px; border: none; background: var(--ckn-red); color: #fff; font-size: 13px; font-weight: 600; transition: 0.12s; }
.sm-btn-primary:hover { background: var(--ckn-red-hover); }
.sm-btn-ghost { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--ckn-border); background: transparent; font-size: 13px; color: var(--ckn-dark); transition: 0.12s; }
.sm-btn-ghost:hover { background: var(--ckn-surface-alt); }
.sm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; padding: 20px; overflow: auto; flex: 1; align-content: start; }
.sm-card { background: var(--ckn-surface); border: 1px solid var(--ckn-border); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s; }
.sm-card:hover { box-shadow: 0 4px 20px rgba(15,23,42,0.08); border-color: #c7d2e0; transform: translateY(-1px); }
.sm-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.sm-card-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sm-card-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.sm-card-name { min-width: 0; }
.sm-card-name strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-card-badges { display: flex; gap: 4px; margin-top: 3px; flex-wrap: wrap; }
.sm-card-desc { font-size: 12px; color: var(--ckn-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.sm-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--ckn-border); padding-top: 10px; }
.sm-card-meta { display: flex; gap: 10px; align-items: center; }
.sm-meta-item { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--ckn-muted); font-family: ui-monospace, monospace; }
.sm-card-actions { display: flex; align-items: center; gap: 6px; }
.sm-badge { display: inline-block; border-radius: 5px; font-size: 10px; font-weight: 600; padding: 2px 6px; }
.sm-badge-kind { background: #f1f5f9; color: #475569; }
.sm-badge-builtin { background: #e0f2fe; color: #0369a1; }
.sm-badge-id { background: #f8fafc; color: #64748b; font-family: ui-monospace, monospace; }
.sm-badge-current { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.sm-badge-note { background: #f1f5f9; color: #475569; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-status { font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 6px; text-transform: uppercase; letter-spacing: 0.04em; flex-shrink: 0; }
.sm-status.active { background: #ecfdf5; color: #059669; }
.sm-status.draft { background: #f8fafc; color: #64748b; }
.sm-status.error { background: #fef2f2; color: #dc2626; }
.sm-auto-btn { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--ckn-border); background: transparent; color: var(--ckn-muted); font-size: 11px; font-weight: 500; transition: 0.12s; }
.sm-auto-btn:hover { background: #fefce8; border-color: #fde68a; color: #b45309; }
.sm-auto-btn.active { background: #fefce8; border-color: #fde68a; color: #b45309; font-weight: 700; }
.sm-icon-btn { width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--ckn-border); background: transparent; display: grid; place-items: center; color: var(--ckn-muted); transition: 0.12s; }
.sm-icon-btn:hover { background: var(--ckn-surface-alt); color: var(--ckn-dark); }
.sm-icon-btn.danger:hover { background: #fef2f2; border-color: #fecaca; color: #dc2626; }
.sm-icon-btn.light { border: 0; background: rgba(255,255,255,0.12); color: #fff; }
.sm-icon-btn.light:hover { background: rgba(255,255,255,0.22); }
.sm-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 60px 20px; color: var(--ckn-muted); text-align: center; }
.sm-empty p { margin: 0; font-size: 15px; color: var(--ckn-dark); }
.sm-empty span { font-size: 12px; }
.sm-empty-sm { padding: 40px; text-align: center; color: var(--ckn-muted); font-size: 13px; }
.sm-loading { padding: 40px; text-align: center; color: var(--ckn-muted); }
.sm-overlay { position: fixed; inset: 0; background: rgba(15,23,42,0.45); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.sm-modal { background: var(--ckn-surface); border-radius: 18px; box-shadow: 0 20px 60px rgba(15,23,42,0.2); display: flex; flex-direction: column; overflow: hidden; max-height: calc(100vh - 32px); }
.sm-modal-sm { width: min(480px, 100%); }
.sm-modal-md { width: min(640px, 100%); }
.sm-modal-lg { width: min(780px, 100%); }
.sm-modal-xl { width: min(920px, 100%); }
.sm-detail-modal { display: flex; flex-direction: column; min-height: 0; }
.sm-detail-hero { background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); color: #fff; padding: 20px 24px; flex-shrink: 0; }
.sm-detail-hero-inner { display: flex; align-items: flex-start; gap: 14px; }
.sm-detail-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.sm-detail-title-block { flex: 1; min-width: 0; }
.sm-detail-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.sm-detail-title-row h3 { margin: 0; font-size: 17px; }
.sm-detail-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.sm-detail-hero-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.sm-hero-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.1); color: #fff; font-size: 12px; font-weight: 600; transition: 0.12s; }
.sm-hero-btn:hover { background: rgba(255,255,255,0.2); }
.sm-detail-tabs { display: flex; border-bottom: 1px solid var(--ckn-border); padding: 0 20px; background: var(--ckn-surface); flex-shrink: 0; }
.sm-detail-tabs button { border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--ckn-muted); padding: 11px 14px; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; transition: 0.12s; }
.sm-detail-tabs button.active { color: var(--ckn-red); border-bottom-color: var(--ckn-red); font-weight: 700; }
.sm-detail-tabs button:hover { color: var(--ckn-dark); }
.sm-tab-count { background: #e2e8f0; color: #475569; border-radius: 999px; padding: 1px 6px; font-size: 10px; font-weight: 700; }
.sm-detail-body { overflow: auto; flex: 1; background: var(--ckn-surface-alt); }
.sm-detail-info { display: flex; flex-direction: column; }
.sm-info-section { padding: 16px 24px; border-bottom: 1px solid var(--ckn-border); background: var(--ckn-surface); }
.sm-info-section:last-child { border-bottom: 0; }
.sm-info-section h4 { margin: 0 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ckn-muted); display: flex; align-items: center; gap: 5px; }
.sm-info-section p { margin: 0; font-size: 13px; line-height: 1.6; }
.sm-tag-list { display: flex; gap: 6px; flex-wrap: wrap; }
.sm-tag { background: var(--ckn-surface-alt); border: 1px solid var(--ckn-border); border-radius: 6px; padding: 3px 8px; font-size: 11px; color: var(--ckn-muted); }
.sm-detail-rows { display: flex; flex-direction: column; }
.sm-detail-row { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--ckn-border); font-size: 13px; }
.sm-detail-row:last-child { border-bottom: 0; }
.sm-detail-row span:first-child { color: var(--ckn-muted); font-size: 12px; }
.sm-detail-row code { font-family: ui-monospace, monospace; font-size: 12px; background: var(--ckn-surface-alt); padding: 2px 6px; border-radius: 4px; }
.sm-prompt-preview { font-size: 11px; font-family: ui-monospace, monospace; white-space: pre-wrap; max-height: 140px; overflow: auto; background: #f8fafc; border: 1px solid var(--ckn-border); border-radius: 8px; padding: 10px 12px; margin: 0; line-height: 1.6; color: #334155; }
.sm-autoselect-box { border: 1px solid var(--ckn-border); border-radius: 10px; overflow: hidden; }
.sm-autoselect-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; }
.sm-autoselect-row > div { flex: 1; }
.sm-autoselect-row strong { font-size: 13px; display: block; }
.sm-autoselect-row p { margin: 2px 0 0; font-size: 11px; color: var(--ckn-muted); }
.sm-autoselect-section { border: 1px solid var(--ckn-border); border-radius: 10px; overflow: hidden; }
.sm-conf-label { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-top: 1px solid var(--ckn-border); background: var(--ckn-surface-alt); gap: 12px; }
.sm-conf-label > span { font-size: 12px; color: var(--ckn-muted); }
.sm-conf-label > span em { font-style: normal; opacity: 0.7; }
.sm-toggle { width: 42px; height: 24px; border-radius: 999px; border: 0; background: #cbd5e1; padding: 3px; flex-shrink: 0; transition: background 0.15s; cursor: pointer; }
.sm-toggle span { display: block; width: 18px; height: 18px; border-radius: 999px; background: #fff; transition: transform 0.15s; }
.sm-toggle.on { background: var(--ckn-success); }
.sm-toggle.on span { transform: translateX(18px); }
.sm-switch-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--ckn-border); border-radius: 10px; padding: 12px 14px; background: var(--ckn-surface); }
.sm-switch-box strong { font-size: 13px; display: block; }
.sm-switch-box p { margin: 2px 0 0; font-size: 11px; color: var(--ckn-muted); }
.sm-history { padding: 20px 24px; }
.sm-timeline { display: flex; flex-direction: column; gap: 10px; }
.sm-tl-item { display: flex; gap: 12px; align-items: flex-start; }
.sm-tl-dot { width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; font-size: 11px; font-weight: 700; font-family: ui-monospace, monospace; flex-shrink: 0; background: var(--ckn-surface-alt); color: #94a3b8; border: 2px solid var(--ckn-border); }
.sm-tl-dot.current { background: #ecfdf5; color: #059669; border-color: #a7f3d0; }
.sm-tl-card { flex: 1; border: 1px solid var(--ckn-border); border-radius: 10px; padding: 12px 14px; background: var(--ckn-surface); }
.sm-tl-card.current { border-left: 3px solid var(--ckn-success); }
.sm-tl-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.sm-tl-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sm-tl-meta strong { font-size: 13px; }
.sm-tl-time { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ckn-muted); flex-shrink: 0; }
.sm-mini-avatar { width: 22px; height: 22px; border-radius: 999px; background: #334155; color: #fff; font-size: 9px; font-weight: 700; display: grid; place-items: center; }
.sm-expand-btn { border: 1px solid var(--ckn-border); background: var(--ckn-surface-alt); border-radius: 6px; padding: 4px 8px; font-size: 11px; color: var(--ckn-muted); transition: 0.12s; }
.sm-expand-btn:hover { background: var(--ckn-surface); color: var(--ckn-dark); }
.sm-ver-preview { font-size: 11px; font-family: ui-monospace, monospace; white-space: pre-wrap; max-height: 120px; overflow: auto; background: var(--ckn-surface-alt); border: 1px solid var(--ckn-border); border-radius: 6px; padding: 8px 10px; margin: 8px 0 0; line-height: 1.5; }
.sm-restore-btn { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; padding: 5px 10px; border-radius: 7px; border: 1px solid var(--ckn-border); background: var(--ckn-surface); font-size: 11px; color: var(--ckn-dark); transition: 0.12s; }
.sm-restore-btn:hover { background: var(--ckn-surface-alt); }
.sm-editor-modal { display: flex; flex-direction: column; min-height: 0; }
.sm-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--ckn-border); background: var(--ckn-surface); flex-shrink: 0; }
.sm-editor-title { display: flex; align-items: baseline; gap: 8px; }
.sm-editor-title h3 { margin: 0; font-size: 15px; }
.sm-editor-subtitle { font-size: 13px; color: var(--ckn-muted); }
.sm-editor-head-actions { display: flex; align-items: center; gap: 8px; }
.sm-save-error { font-size: 12px; color: #dc2626; }
.sm-editor-tabs { display: flex; border-bottom: 1px solid var(--ckn-border); padding: 0 20px; background: var(--ckn-surface); flex-shrink: 0; }
.sm-editor-tabs button { border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--ckn-muted); padding: 10px 14px; font-size: 13px; transition: 0.12s; }
.sm-editor-tabs button.active { color: var(--ckn-red); border-bottom-color: var(--ckn-red); font-weight: 700; }
.sm-editor-tabs button:hover { color: var(--ckn-dark); }
.sm-editor-body { overflow: auto; flex: 1; background: var(--ckn-surface-alt); padding: 24px; }
.sm-editor-fields { display: flex; flex-direction: column; gap: 14px; width: min(820px, 100%); margin: 0 auto; }
.sm-field { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.sm-field-label { font-size: 12px; font-weight: 600; color: var(--ckn-dark); display: flex; align-items: center; gap: 5px; }
.sm-field-hint { font-weight: 400; color: var(--ckn-muted); font-size: 11px; }
.sm-field-error { color: #dc2626; font-weight: 400; font-size: 11px; }
.sm-field-row { display: flex; gap: 12px; }
.sm-input, .sm-select, .sm-textarea { border: 1px solid var(--ckn-border); border-radius: 8px; padding: 9px 11px; background: var(--ckn-surface); font-size: 13px; outline: 0; width: 100%; color: var(--ckn-dark); transition: border-color 0.12s; }
.sm-input:focus, .sm-select:focus, .sm-textarea:focus { border-color: #93c5fd; }
.sm-input-sm { width: 100px; }
.sm-textarea { resize: vertical; line-height: 1.6; }
.sm-textarea.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.sm-select { appearance: none; cursor: pointer; }
.sm-alert { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 8px; font-size: 12px; }
.sm-alert-warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
:root.dark .sm-prompt-preview { background: #1e293b; color: #cbd5e1; }
:root.dark .sm-ver-preview { background: #1e293b; color: #cbd5e1; }
:root.dark .sm-card:hover { border-color: #3e4a5e; }
:root.dark .sm-filter-count { background: #2e3347; color: #94a3b8; }
:root.dark .sm-badge-kind { background: #1e293b; color: #94a3b8; }
:root.dark .sm-badge-id { background: #1a1d27; color: #64748b; }
:root.dark .sm-input, :root.dark .sm-select, :root.dark .sm-textarea { background: #1a1d27; }
:root.dark .sm-tag { background: #242736; }
