/* === Thème sombre SNART INDUSTRIES – Kamis Mark 11 === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #0b1120;
  color: #e2e8f0;
  font-family: 'Share Tech Mono', monospace;
  height: 100vh;
  overflow: hidden;
}

/* Auth overlay */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: #0b1120;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.auth-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  max-width: 360px;
  width: 90%;
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.1);
}
.auth-card h1 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1.8rem;
  margin: 0.5rem 0;
}
.auth-card input {
  width: 100%;
  padding: 0.7rem 1rem;
  margin: 1rem 0;
  border: 1px solid #475569;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 1rem;
}
.auth-card input:focus {
  outline: none;
  border-color: #38bdf8;
}
.error-msg {
  color: #f87171;
  font-size: 0.9rem;
  min-height: 1.2em;
}

/* Shell */
.shell {
  display: flex;
  height: 100vh;
}
.side {
  width: 300px;
  background: #131c2e;
  border-right: 1px solid #1e293b;
  display: flex;
  flex-direction: column;
  padding: 1.2rem;
  overflow-y: auto;
}
.brand {
  margin-bottom: 1.5rem;
}
.brand-kicker {
  font-family: 'Orbitron', sans-serif;
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 3px;
  color: #38bdf8;
}
.brand h1 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  margin: 0.3rem 0;
}
.brand p {
  font-size: 0.8rem;
  color: #94a3b8;
}

.panel {
  background: #1e293b;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}
.panel-title {
  font-weight: 600;
  color: #38bdf8;
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
}
.status-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.dot.online { background: #10b981; }
.dot.offline { background: #f87171; }
.mini-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  margin-bottom: 0.3rem;
}

.chat-tabs {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 250px;
  overflow-y: auto;
}
.chat-tab {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chat-tab.active {
  border-color: #38bdf8;
  background: #1e293b;
}
.chat-tab-title {
  font-size: 0.85rem;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-tab-delete {
  color: #f87171;
  cursor: pointer;
  font-weight: bold;
}

.memory-box {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 0.5rem;
  font-size: 0.75rem;
  max-height: 100px;
  overflow-y: auto;
  color: #94a3b8;
}

.help {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* Main */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.top {
  background: #131c2e;
  border-bottom: 1px solid #1e293b;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-title {
  font-weight: 700;
  font-size: 1.2rem;
}
.top-sub {
  font-size: 0.8rem;
  color: #94a3b8;
}
.top-actions {
  display: flex;
  gap: 0.5rem;
}
.btn {
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
  transition: 0.2s;
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn.ghost {
  background: transparent;
  border: 1px solid #475569;
  color: #cbd5e1;
}
.btn.ghost.active {
  background: #0f172a;
  border-color: #38bdf8;
  color: #38bdf8;
}
.btn.primary {
  background: #1d4ed8;
  color: white;
}
.btn.primary:hover {
  background: #2563eb;
}
.btn.danger {
  background: #b91c1c;
  color: white;
}
.btn.danger:hover {
  background: #dc2626;
}

.chat {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #0b1120;
}
.message {
  max-width: 80%;
  padding: 0.8rem 1.2rem;
  border-radius: 18px;
  line-height: 1.5;
  word-wrap: break-word;
  font-size: 0.95rem;
}
.message.user {
  align-self: flex-end;
  background: #1d4ed8;
  color: white;
  border-bottom-right-radius: 4px;
}
.message.assistant {
  align-self: flex-start;
  background: #1e293b;
  color: #e2e8f0;
  border-bottom-left-radius: 4px;
}
.typing-indicator {
  align-self: flex-start;
  color: #38bdf8;
  font-style: italic;
}

/* Composer */
.composer {
  border-top: 1px solid #1e293b;
  padding: 1rem 1.5rem;
  background: #131c2e;
}
.composer textarea {
  width: 100%;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 10px;
  color: #e2e8f0;
  padding: 0.7rem;
  resize: none;
  font-family: inherit;
  font-size: 0.9rem;
}
.composer textarea:focus {
  outline: none;
  border-color: #38bdf8;
}
.composer-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  align-items: center;
}
.composer-info {
  font-size: 0.8rem;
  color: #94a3b8;
}