/* Arkon UI-safe enhancements: does not alter core layout, only overlays controls. */
:root {
  --arkon-void: #0b0b0b;
  --arkon-steel: #1a1d21;
  --arkon-gunmetal: #2a2f36;
  --arkon-silver: #c7ced6;
  --arkon-green: #1ed760;
  --arkon-red: #e03e3e;
  --arkon-blue: #1f7cff;
}

#arkon-enhancement-root {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.arkon-top-tools {
  position: absolute;
  top: 14px;
  right: 156px;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.arkon-tool-btn {
  position: relative;
  height: 36px;
  border: 1px solid rgba(199, 206, 214, 0.22);
  background: #111114;
  color: #eef4ff;
  border-radius: 10px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: none;
  font-size: 13px;
  line-height: 1;
}

.arkon-tool-btn:hover {
  border-color: rgba(30, 215, 96, 0.45);
  box-shadow: none;
}

.arkon-badge {
  min-width: 17px;
  height: 17px;
  border-radius: 6px;
  background: var(--arkon-red);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  margin-left: -4px;
}

.arkon-panel {
  position: absolute;
  top: 56px;
  right: 156px;
  width: min(420px, calc(100vw - 24px));
  max-height: min(680px, calc(100vh - 86px));
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(199, 206, 214, 0.18);
  background: #111114;
  box-shadow: none;
  pointer-events: auto;
  color: #f7fbff;
  display: none;
}

.arkon-panel.is-open { display: block; }

.arkon-panel-header {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(199,206,214,0.13);
}

.arkon-panel-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.arkon-panel-subtitle {
  color: #95a3b8;
  font-size: 12px;
  margin-top: 3px;
}

.arkon-panel-body {
  padding: 14px;
  overflow: auto;
  max-height: calc(min(680px, calc(100vh - 86px)) - 70px);
}

.arkon-notification-row {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(199,206,214,0.1);
  background: rgba(255,255,255,0.035);
  border-radius: 8px;
  margin-bottom: 10px;
}

.arkon-notification-row input { margin-top: 3px; }

.arkon-notification-title {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
}

.arkon-notification-meta {
  margin-top: 4px;
  color: #aab6c8;
  font-size: 12px;
  line-height: 1.35;
}

.arkon-notification-time {
  color: #8fa0b8;
  font-size: 11px;
  white-space: nowrap;
}

.arkon-empty-state {
  border: 1px dashed rgba(199,206,214,0.18);
  border-radius: 8px;
  padding: 18px;
  color: #96a7bc;
  text-align: center;
  font-size: 13px;
}

.arkon-panel-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 14px 14px;
}

.arkon-action-btn {
  border: 1px solid rgba(199,206,214,0.18);
  background: rgba(255,255,255,0.05);
  color: #edf5ff;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  cursor: pointer;
}

.arkon-action-btn.primary {
  border-color: rgba(30,215,96,0.5);
  color: #dfffea;
  background: rgba(30,215,96,0.11);
}

.arkon-chat-panel {
  right: 156px;
  width: min(480px, calc(100vw - 24px));
}

.arkon-chat-log {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 220px;
}

.arkon-chat-message {
  padding: 11px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.arkon-chat-message.user {
  margin-left: 48px;
  background: rgba(31,124,255,0.18);
  border: 1px solid rgba(31,124,255,0.28);
}

.arkon-chat-message.ai {
  margin-right: 48px;
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(199,206,214,0.12);
}

.arkon-chat-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(199,206,214,0.13);
}

.arkon-chat-input {
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(199,206,214,0.18);
  background: rgba(0,0,0,0.32);
  color: #fff;
  padding: 0 12px;
  outline: none;
}

.arkon-memory-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(30,215,96,0.24);
  color: #c9ffd9;
  background: rgba(30,215,96,0.08);
  border-radius: 6px;
  padding: 6px 9px;
  margin: 4px 4px 0 0;
  font-size: 11px;
}

@media (max-width: 980px) {
  .arkon-top-tools { right: 18px; top: 10px; }
  .arkon-panel, .arkon-chat-panel { right: 12px; top: 54px; }
}
