/* NCT Mini · minimalista */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #171717;
  --bg-tertiary: #1f1f1f;
  --bg-hover: #2a2a2a;
  --border: #2a2a2a;
  --text-primary: #ececec;
  --text-secondary: #b4b4b4;
  --text-tertiary: #8e8e8e;
  --accent: #10a37f;
  --accent-hover: #0d8a6a;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius: 12px;
}
[data-theme="light"] {
  --bg-primary: #fff; --bg-secondary: #f7f7f8; --bg-tertiary: #ececec;
  --bg-hover: #e0e0e0; --border: #e5e5e5;
  --text-primary: #0d0d0d; --text-secondary: #4a4a4a; --text-tertiary: #8e8e8e;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body { background: var(--bg-primary); color: var(--text-primary); font-family: var(--font); font-size: 15px; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; outline: none; border: none; background: none; color: inherit; }
svg { width: 20px; height: 20px; }
.app { display: flex; height: 100vh; height: 100dvh; }
.sidebar { width: 260px; background: var(--bg-primary); border-right: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; }
.brand { display: flex; align-items: center; gap: 10px; padding: 16px; }
.brand-logo { width: 32px; height: 32px; background: var(--accent); border-radius: 8px; display: grid; place-items: center; font-size: 18px; }
.brand-name { font-weight: 600; font-size: 14px; }
.brand-sub { font-size: 11px; color: var(--text-tertiary); }
.model-selector { margin: 0 12px 12px; position: relative; }
.model-current { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; }
.model-current:hover { background: var(--bg-tertiary); }
.model-avatar { width: 32px; height: 32px; background: var(--accent); border-radius: 8px; display: grid; place-items: center; font-weight: 600; font-size: 12px; color: white; flex-shrink: 0; }
.model-name { font-weight: 600; font-size: 13px; }
.model-desc { font-size: 11px; color: var(--text-tertiary); }
.chevron { transition: transform 0.2s; }
.model-current.open .chevron { transform: rotate(180deg); }
.model-dropdown { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 4px 12px rgba(0,0,0,0.4); padding: 4px; z-index: 20; }
.model-option { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.model-option:hover { background: var(--bg-hover); }
.sidebar-section { padding: 12px; flex: 1; overflow-y: auto; min-height: 0; }
.sidebar-section-title { font-size: 11px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; margin-bottom: 8px; }
.file-list, .conv-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.file-empty { font-size: 12px; color: var(--text-tertiary); padding: 8px; text-align: center; }
.file-item, .conv-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; font-size: 12px; cursor: pointer; }
.file-item:hover, .conv-item:hover { background: var(--bg-hover); }
.conv-item.active { background: var(--bg-tertiary); }
.file-item .x { margin-left: auto; color: var(--text-tertiary); padding: 0 4px; }
.upload-btn { width: 100%; padding: 6px; background: var(--bg-tertiary); border: 1px dashed var(--border); border-radius: 6px; color: var(--text-secondary); font-size: 11px; }
.upload-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.wrappers-list { display: flex; flex-direction: column; gap: 4px; }
.wrapper-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; font-size: 11px; cursor: pointer; transition: background 0.15s; }
.wrapper-item:hover { background: var(--bg-hover); }
.wrapper-item.active { background: var(--bg-tertiary); }
.wrapper-name { font-weight: 600; font-size: 12px; }
.wrapper-role { font-size: 10px; color: var(--text-tertiary); margin-top: 1px; }
.wrapper-check { color: var(--accent); font-weight: 600; }
.wrapper-empty { font-size: 11px; color: var(--text-tertiary); padding: 8px; text-align: center; }
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.dropzone { position: absolute; inset: 0; background: rgba(10,10,10,0.95); z-index: 50; display: grid; place-items: center; }
.dropzone-inner { text-align: center; }
[hidden] { display: none !important; }
.topbar { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.topbar-title { flex: 1; font-weight: 600; font-size: 14px; }
.icon-btn { width: 36px; height: 36px; border-radius: 6px; display: grid; place-items: center; color: var(--text-secondary); }
.icon-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.files-bar { display: flex; gap: 8px; padding: 8px 24px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.file-chip { display: flex; align-items: center; gap: 6px; padding: 4px 8px; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 12px; font-size: 11px; }
.file-chip .x { color: var(--text-tertiary); cursor: pointer; }
.messages { flex: 1; overflow-y: auto; padding: 24px 0; }
.welcome { max-width: 600px; margin: 60px auto 0; padding: 0 24px; text-align: center; }
.welcome-logo { font-size: 48px; margin-bottom: 16px; }
.welcome-title { font-size: 28px; font-weight: 700; margin-bottom: 8px; background: linear-gradient(135deg, var(--accent), #2a8af0); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.welcome-sub { color: var(--text-secondary); margin-bottom: 24px; }
.suggestions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.suggestion { padding: 12px 14px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); text-align: left; font-size: 13px; }
.suggestion:hover { background: var(--bg-tertiary); }
.message { display: flex; gap: 16px; padding: 16px 24px; max-width: 800px; margin: 0 auto; }
.message.assistant { background: var(--bg-secondary); }
.msg-avatar { width: 30px; height: 30px; border-radius: 6px; display: grid; place-items: center; font-weight: 600; font-size: 12px; color: white; flex-shrink: 0; background: var(--accent); }
.msg-avatar.user { background: #6366f1; }
.msg-body { flex: 1; min-width: 0; }
.msg-name { font-weight: 600; font-size: 13px; margin-bottom: 2px; }
.msg-name .ts { font-weight: 400; color: var(--text-tertiary); margin-left: 6px; font-size: 11px; }
.msg-content { font-size: 15px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word; }
.typing { display: inline-flex; gap: 4px; padding: 8px 0; }
.typing span { width: 6px; height: 6px; background: var(--text-tertiary); border-radius: 50%; animation: bounce 1.4s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }
.input-area { padding: 12px 16px 16px; border-top: 1px solid var(--border); }
.input-box { max-width: 800px; margin: 0 auto; display: flex; align-items: flex-end; gap: 6px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 24px; padding: 8px; }
.input-box:focus-within { border-color: var(--text-tertiary); }
#input { flex: 1; resize: none; font-size: 15px; line-height: 1.5; max-height: 200px; padding: 8px 4px; }
.send-btn { width: 36px; height: 36px; background: var(--accent); color: white; border-radius: 50%; display: grid; place-items: center; }
.send-btn:disabled { background: var(--bg-tertiary); color: var(--text-tertiary); cursor: not-allowed; }
.send-btn:not(:disabled):hover { background: var(--accent-hover); }
.send-btn svg { width: 18px; height: 18px; }
.input-hint { text-align: center; font-size: 11px; color: var(--text-tertiary); margin-top: 8px; }
@media (max-width: 768px) {
  .sidebar { position: fixed; top: 0; left: 0; bottom: 0; transform: translateX(-100%); z-index: 10; transition: transform 0.3s; }
  .sidebar.open { transform: translateX(0); }
  .suggestions { grid-template-columns: 1fr; }
}
.messages::-webkit-scrollbar, .sidebar-section::-webkit-scrollbar { width: 8px; }
.messages::-webkit-scrollbar-thumb, .sidebar-section::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
