/* ==========================================================================
   LANGGRAPH DARK CORE - PREMIUM, MODERN & LIGHTWEIGHT (DEFAULT DARK ONLY)
   Ultra-fast, buttery-smooth 60fps rendering, high-end aesthetics
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS (FOCUSED PURE DARK PALETTE)
   -------------------------------------------------------------------------- */
:root {
  --bg-app: #0a0c10;
  --bg-sidebar: #0e1017;
  --bg-surface: #141722;
  --bg-surface-elevated: #1a1e2c;
  --bg-surface-hover: #202536;
  --bg-input: #11141c;
  --bg-drawer: #08090d;
  
  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-default: rgba(255, 255, 255, 0.09);
  --border-glow: rgba(99, 102, 241, 0.35);
  --border-active: #6366f1;
  
  --text-heading: #f8fafc;
  --text-main: #cbd5e1;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-indigo: #6366f1;
  --accent-indigo-hover: #4f46e5;
  --accent-cyan: #06b6d4;
  --accent-purple: #a855f7;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  
  --user-bubble-bg: linear-gradient(135deg, #1b202e 0%, #131620 100%);
  --user-bubble-border: rgba(99, 102, 241, 0.28);
  --user-bubble-text: #f8fafc;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* --------------------------------------------------------------------------
   2. GLOBAL BASE STYLES & OPTIMIZATION
   -------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
}

html, body, button, input, select, textarea {
  background-color: var(--bg-app);
  color: var(--text-main);
  font-family: var(--font-sans);
  /* Spasi bawaan Plus Jakarta Sans sempit (0.17em); ditambah agar antar kata mudah dibaca. */
  word-spacing: 0.06em;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.font-mono, code, kbd, samp, pre, .action-cmd {
  font-family: var(--font-mono) !important;
  word-spacing: normal;
}

::selection {
  background: rgba(99, 102, 241, 0.25);
  color: #ffffff;
}

/* Lightweight & Smooth Custom Scrollbars */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.2);
  border-radius: 9999px;
  transition: background 0.2s;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-indigo);
}

/* Utility mappings */
.theme-bg-app { background-color: var(--bg-app); }
.theme-bg-sidebar { background-color: var(--bg-sidebar); }
.theme-bg-surface { background-color: var(--bg-surface); }
.theme-border { border-color: var(--border-default); }
.theme-border-subtle { border-color: var(--border-subtle); }
.theme-text-heading { color: var(--text-heading); }
.theme-text-main { color: var(--text-main); }
.theme-text-secondary { color: var(--text-secondary); }
.theme-text-muted { color: var(--text-muted); }

.theme-hover:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-heading);
}

.theme-btn {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-main);
  border-radius: 8px;
  transition: all 0.15s ease;
}
.theme-btn:hover {
  background-color: var(--bg-surface-hover);
  border-color: var(--border-glow);
  color: var(--text-heading);
}

/* --------------------------------------------------------------------------
   3. SIDEBAR NAVIGATION
   -------------------------------------------------------------------------- */
#app-sidebar {
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-default);
}

#sidebar-backdrop {
  display: none;
}

/* Layar kecil (< 768px): sidebar jadi drawer di atas konten, dibuka lewat tombol hamburger. */
@media (max-width: 767px) {
  #app-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(85vw, 320px);
    z-index: 60;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  body.sidebar-open #app-sidebar {
    transform: translateX(0);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
  }
  body.sidebar-open #sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(0, 0, 0, 0.55);
  }
}

.btn-new-chat {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #ffffff;
  border-radius: 10px;
  font-weight: 600;
  box-shadow: 0 4px 14px -2px rgba(99, 102, 241, 0.4);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-new-chat:hover {
  background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
  box-shadow: 0 6px 18px -2px rgba(99, 102, 241, 0.6);
  transform: translateY(-1px);
}

.session-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  font-size: 0.845rem;
  line-height: 1.35;
  color: var(--text-secondary);
  border-left: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.session-item:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-heading);
  transform: translateX(2px);
}
.session-item.active {
  background-color: var(--bg-surface);
  border-left-color: var(--accent-indigo);
  color: var(--text-heading);
  font-weight: 600;
}

.sidebar-mission-btn {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.45rem 0.7rem;
  border-radius: 7px;
  font-size: 0.835rem;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  user-select: none;
}
.sidebar-mission-btn:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-heading);
  border-color: var(--border-subtle);
  transform: translateX(2px);
}

/* Top Mission Bar & Persona Selector Capsule */
.top-mission-bar {
  background-color: var(--bg-app);
  border-bottom: 1px solid var(--border-default);
}

.pill-persona {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}
.pill-persona:hover,
.pill-persona:focus-within {
  border-color: var(--accent-indigo);
  background-color: var(--bg-surface-hover);
}

/* Bilah alat chatbox: satu baris di semua lebar layar. Kelompok kiri boleh menyusut; persona yang mengalah
   (nama dipotong dengan …) supaya tombol lampir, auto/tanya, dan kirim tidak terdorong ke baris baru. */
.chat-toolbar-left {
  flex: 1 1 0%;
  min-width: 0;
  flex-wrap: nowrap;
}
.chat-toolbar-left > * { flex-shrink: 0; }
.chat-toolbar-left > .persona-inline { flex-shrink: 1; min-width: 0; }
.persona-inline #persona-select {
  min-width: 0;
  width: 100%;
  max-width: 10rem;
  text-overflow: ellipsis;
}
@media (max-width: 480px) {
  .chat-toolbar-left { gap: 0.375rem; }
  .persona-inline { padding-left: 0.5rem; padding-right: 0.375rem; }
  .persona-inline #persona-select { max-width: 6.5rem; }
}

#persona-select {
  max-width: 10rem;
  text-overflow: ellipsis;
}
@media (max-width: 480px) {
  .persona-inline #persona-select { max-width: 7.5rem; }
}

#persona-select {
  background-color: transparent !important;
  color: #f8fafc !important;
  font-family: var(--font-sans);
  font-size: 0.775rem;
  font-weight: 500;
  border: none;
  outline: none;
  cursor: pointer;
}

/* Fix dropdown options: prevent white-on-white text across all browsers */
select option {
  background-color: #141722 !important;
  color: #f8fafc !important;
  padding: 0.5rem 0.75rem !important;
  font-size: 0.8rem !important;
  border: none !important;
}
select option:checked,
select option:hover {
  background-color: #1e2436 !important;
  color: #38bdf8 !important;
}

/* --------------------------------------------------------------------------
   4. CHAT FEED & MESSAGE BUBBLES
   -------------------------------------------------------------------------- */
.chat-bubble-user {
  background: var(--user-bubble-bg);
  border: 1px solid var(--user-bubble-border);
  color: var(--user-bubble-text);
  border-radius: 16px 16px 4px 16px;
  padding: 0.65rem 1rem;
  font-size: 0.845rem;
  line-height: 1.55;
  width: fit-content;
  min-width: 48px;
  max-width: 100%;
  word-break: normal;
  overflow-wrap: break-word;
  white-space: pre-wrap;
  box-shadow: var(--shadow-sm);
  display: inline-block;
}

/* Minimalist & High-Performance Action Line */
.antigravity-action-line {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.6rem;
  border-radius: 7px;
  color: var(--text-main);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  font-size: 0.735rem !important;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  margin: 0.2rem 0;
}
.antigravity-action-line:hover {
  background-color: var(--bg-surface-hover);
  border-color: var(--border-glow);
  color: var(--text-heading);
}
.antigravity-action-line.open {
  background-color: var(--bg-surface-hover);
  border-color: var(--accent-indigo);
}

.antigravity-action-line .action-cmd {
  font-family: var(--font-mono) !important;
  font-size: 0.70rem !important;
  color: #38bdf8;
  display: inline-block;
  vertical-align: bottom;
  max-width: 60vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.antigravity-action-drawer {
  background-color: var(--bg-drawer);
  border: 1px solid var(--border-default);
  border-radius: 9px;
  padding: 0.65rem 0.85rem;
  margin: 0.35rem 0 0.75rem 0;
}
.antigravity-action-drawer .output-text {
  font-family: var(--font-mono) !important;
  font-size: 0.725rem !important;
  line-height: 1.55;
  color: #a7f3d0;
  max-height: 360px;
  overflow-y: auto;
  margin: 0;
}

/* --------------------------------------------------------------------------
   5. FLOATING CHAT INPUT CAPSULE
   -------------------------------------------------------------------------- */
.chat-input-capsule {
  background-color: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.chat-input-capsule:focus-within {
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 1px var(--accent-indigo), 0 8px 25px -4px rgba(99, 102, 241, 0.2);
}

#chat-input {
  font-size: 0.845rem;
  line-height: 1.55;
}

.btn-send {
  background: var(--accent-indigo);
  color: #ffffff;
  border-radius: 10px;
  transition: all 0.15s ease;
}
.btn-send:hover {
  background: var(--accent-indigo-hover);
  transform: scale(1.05);
}

/* Floating Scroll to Bottom button */
.scroll-to-bottom-btn {
  position: absolute;
  bottom: 118px;
  left: 50%;
  transform: translateX(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  transition: all 0.2s ease;
}
.scroll-to-bottom-btn:hover {
  color: var(--text-heading);
  border-color: var(--accent-indigo);
  transform: translateX(-50%) translateY(-2px);
}

/* --------------------------------------------------------------------------
   6. LIVE ACTIVITY INDICATOR & HUD (COMPACT PROCESSING BOX)
   -------------------------------------------------------------------------- */
.agent-activity-hud {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 9px;
  padding: 0.45rem 0.75rem;
  margin-bottom: 0.45rem;
  font-size: 0.74rem;
}
.hud-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.hud-status-text {
  font-size: 0.735rem !important;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.4;
}
.hud-timer {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}
.execution-stepper {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.stepper-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem !important;
  color: var(--text-secondary);
  line-height: 1.4;
}
.stepper-item.active {
  color: #38bdf8;
  font-weight: 500;
}
.stepper-item.completed {
  color: #34d399;
}
.stepper-icon {
  font-size: 0.65rem;
  line-height: 1;
}
.stepper-icon.current {
  color: #38bdf8;
  animation: pulse-glow 1.5s infinite;
}
.stepper-icon.done {
  color: #34d399;
}

.activity-orb {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38bdf8;
  animation: pulse-glow 1.8s infinite ease-in-out;
}
@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.2); }
}

/* Deep Thinking Accordion */
.thinking-box {
  background: rgba(168, 85, 247, 0.04);
  border: 1px solid rgba(168, 85, 247, 0.18);
  border-radius: 9px;
  overflow: hidden;
  margin: 0.45rem 0;
  font-size: 0.74rem;
}
.thinking-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.42rem 0.75rem;
  cursor: pointer;
  background: rgba(168, 85, 247, 0.07);
  font-size: 0.735rem;
  font-weight: 500;
  color: #c084fc;
}
.thinking-content {
  padding: 0.65rem 0.85rem;
  font-size: 0.72rem;
  line-height: 1.55;
  color: var(--text-secondary);
  border-top: 1px solid rgba(168, 85, 247, 0.12);
  font-family: var(--font-mono);
  white-space: pre-wrap;
}

/* --------------------------------------------------------------------------
   7. PROSE & MARKDOWN CODE BLOCKS
   -------------------------------------------------------------------------- */
.prose-custom {
  font-size: 0.845rem;
  line-height: 1.62;
  color: var(--text-main);
  word-break: break-word;
}

/* Balanced, proportional heading hierarchy */
.prose-custom h1 {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-heading);
  letter-spacing: -0.015em;
  margin-top: 1.15rem;
  margin-bottom: 0.45rem;
}
.prose-custom h2 {
  font-size: 1.025rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-heading);
  letter-spacing: -0.01em;
  margin-top: 1rem;
  margin-bottom: 0.4rem;
}
.prose-custom h3 {
  font-size: 0.925rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text-heading);
  margin-top: 0.85rem;
  margin-bottom: 0.35rem;
}
.prose-custom h4,
.prose-custom h5,
.prose-custom h6 {
  font-size: 0.845rem;
  font-weight: 600;
  line-height: 1.5;
  color: #cbd5e1;
  margin-top: 0.75rem;
  margin-bottom: 0.3rem;
}

.prose-custom p {
  margin-bottom: 0.65rem;
  line-height: 1.62;
}
.prose-custom p:last-child {
  margin-bottom: 0;
}

.prose-custom ul,
.prose-custom ol {
  margin-bottom: 0.65rem;
  padding-left: 1.25rem;
  line-height: 1.6;
}
.prose-custom ul {
  list-style-type: disc;
}
.prose-custom ol {
  list-style-type: decimal;
}
.prose-custom li {
  margin-bottom: 0.25rem;
}
.prose-custom li:last-child {
  margin-bottom: 0;
}

.prose-custom strong {
  font-weight: 600;
  color: #f8fafc;
}

.prose-custom em {
  font-style: italic;
  color: #cbd5e1;
}

.prose-custom a {
  color: #38bdf8;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}
.prose-custom a:hover {
  color: #7dd3fc;
}

.prose-custom blockquote {
  border-left: 3px solid var(--accent-indigo);
  padding: 0.4rem 0.85rem;
  margin: 0.65rem 0;
  color: var(--text-secondary);
  background: rgba(99, 102, 241, 0.05);
  border-radius: 0 6px 6px 0;
  font-size: 0.825rem;
}
.prose-custom blockquote p {
  margin-bottom: 0;
}

.prose-custom hr {
  border: 0;
  border-top: 1px solid var(--border-subtle);
  margin: 1rem 0;
}

/* Modern, high-clarity technical table styling */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin: 0.85rem 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--bg-surface);
}

.prose-custom table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0.85rem 0;
  font-size: 0.8rem;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  overflow: hidden;
}

.table-wrapper .prose-custom table,
.table-wrapper table {
  margin: 0;
  border: none;
  border-radius: 0;
}

.prose-custom thead {
  background: rgba(255, 255, 255, 0.04);
}

.prose-custom th {
  color: var(--text-heading);
  font-weight: 600;
  font-size: 0.775rem;
  text-align: left;
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}
.prose-custom th:last-child {
  border-right: none;
}

.prose-custom td {
  padding: 0.48rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  font-size: 0.8rem;
}
.prose-custom td:last-child {
  border-right: none;
}
.prose-custom tbody tr:last-child td {
  border-bottom: none;
}

.prose-custom tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}
.prose-custom tbody tr:hover {
  background: rgba(99, 102, 241, 0.06);
}

/* Inline Code */
.prose-custom code:not(pre code) {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #93c5fd;
  padding: 0.15rem 0.38rem;
  border-radius: 4px;
  font-size: 0.765rem;
  font-family: var(--font-mono);
}

/* Code Block Wrapper */
.code-block-wrapper {
  margin: 0.75rem 0;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid var(--border-default);
  background: var(--bg-drawer);
}
.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.8rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.code-header button {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.15s ease;
}
.code-header button:hover {
  color: var(--text-heading);
}

.code-block-wrapper pre {
  margin: 0;
  padding: 0.75rem 1rem;
  overflow-x: auto;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.755rem;
  line-height: 1.58;
}
.code-block-wrapper pre code {
  font-family: var(--font-mono);
  font-size: inherit;
  background: transparent;
  padding: 0;
  border: none;
}

/* --------------------------------------------------------------------------
   8. CLEAN & LIGHTWEIGHT MODALS & DROPDOWNS
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-card {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tools-menu-popup {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 220px;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 0.35rem;
  z-index: 50;
}
.tools-menu-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.12s ease;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
}
.tools-menu-item:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-heading);
}

.welcome-card-cyber {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.welcome-card-cyber:hover {
  background-color: var(--bg-surface-hover);
  border-color: var(--border-glow);
  transform: translateY(-1.5px);
}

.action-plan-card {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 9px;
  padding: 0.5rem 0.75rem;
  margin: 0.35rem 0;
  font-size: 0.74rem;
}
.action-plan-card ul {
  font-size: 0.735rem;
}

/* Claude Artifacts Split Panel */
#artifacts-panel.active {
  display: flex !important;
  width: 48% !important;
}

/* Attachments & Drag-and-Drop */
.chat-input-capsule.drag-over {
  border-color: var(--accent-cyan) !important;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.3) !important;
  background-color: rgba(6, 182, 212, 0.05) !important;
}

.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.6rem;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  font-size: 0.72rem;
  color: var(--text-heading);
  animation: fadeIn 0.15s ease-out;
}
.attachment-chip img {
  width: 24px;
  height: 24px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.attachment-chip .btn-remove-attachment {
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 0.2rem;
  border-radius: 4px;
  font-size: 0.75rem;
  transition: all 0.15s;
}
.attachment-chip .btn-remove-attachment:hover {
  color: var(--accent-rose);
  background-color: rgba(244, 63, 94, 0.15);
}


/* --------------------------------------------------------------------------
   9. KOMPONEN YANG DIPAKAI DI HTML/JS (sebelumnya belum punya gaya) — memakai token tema
   -------------------------------------------------------------------------- */
.gradient-text-cyber {
  background: linear-gradient(90deg, #818cf8, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.shimmer-text {
  background: linear-gradient(90deg, var(--text-muted) 0%, var(--text-heading) 50%, var(--text-muted) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 2.2s linear infinite;
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.cyber-btn-newchat {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #ffffff;
  border-radius: 10px;
  font-weight: 600;
  box-shadow: 0 4px 14px -2px rgba(99, 102, 241, 0.35);
  transition: all 0.2s ease;
}
.cyber-btn-newchat:hover {
  background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
  transform: translateY(-1px);
}

.glass-panel {
  background-color: var(--bg-sidebar);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.slash-popup {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  margin: 0 1rem 0.4rem;
  max-height: 260px;
  overflow-y: auto;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 0.3rem;
  z-index: 40;
}
.slash-item {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
}
.slash-item:hover {
  background-color: var(--bg-surface-hover);
}

.artifact-badge-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.artifact-badge-card:hover {
  border-color: var(--accent-indigo);
  background-color: var(--bg-surface-hover);
}
.btn-open {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-indigo);
  white-space: nowrap;
}

/* Tombol di header code block (header code block selalu gelap di kedua tema) */
.btn-artifact {
  color: #a5b4fc !important;
  background: rgba(99, 102, 241, 0.15) !important;
  border: 1px solid rgba(99, 102, 241, 0.35) !important;
  border-radius: 6px;
  padding: 0.1rem 0.5rem;
}
.btn-artifact:hover {
  background: rgba(99, 102, 241, 0.3) !important;
  color: #ffffff !important;
}

/* Tombol ganti tema: tampilkan ikon tujuan (terang -> bulan, gelap -> matahari) */
html[data-theme="light"] .theme-icon-sun,
html[data-theme="dark"] .theme-icon-moon {
  display: none;
}
