/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-deep: #08090d;
  --bg-primary: #0d0f16;
  --bg-surface: #141722;
  --bg-elevated: #1a1e2e;
  --bg-hover: #222840;
  --accent-start: #6c5ce7;
  --accent-end: #a855f7;
  --accent: #8b6cf6;
  --accent-glow: rgba(139, 108, 246, 0.15);
  --text-primary: #eaecf4;
  --text-secondary: #8890a8;
  --text-tertiary: #5a6178;
  --border: rgba(255, 255, 255, 0.06);
  --border-accent: rgba(139, 108, 246, 0.3);
  --user-bubble: linear-gradient(135deg, #6c5ce7, #8b5cf6);
  --assistant-bubble: #171b28;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(139, 108, 246, 0.15);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
}

html, body {
  height: 100%;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

.screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.screen.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.98);
}

.hidden {
  display: none !important;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-tertiary); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* ===== Login Screen ===== */
#login-screen {
  background: var(--bg-deep);
  flex-direction: column;
}

.login-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: float 20s ease-in-out infinite;
}

.orb-1 {
  width: 400px; height: 400px;
  background: rgba(108, 92, 231, 0.15);
  top: -100px; left: -100px;
}

.orb-2 {
  width: 350px; height: 350px;
  background: rgba(168, 85, 247, 0.12);
  bottom: -50px; right: -50px;
  animation-delay: -7s;
}

.orb-3 {
  width: 250px; height: 250px;
  background: rgba(99, 102, 241, 0.1);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -14s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -30px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(20px, 10px) scale(1.02); }
}

.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  padding: 48px 36px 40px;
  background: rgba(20, 23, 34, 0.7);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.login-avatar { margin-bottom: 20px; }

.avatar-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--user-bubble);
  box-shadow: var(--shadow-glow);
  font-size: 28px;
  font-weight: 700;
  color: white;
}

.login-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
  background: linear-gradient(135deg, var(--text-primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 32px;
}

.auth-step { animation: fadeIn 0.3s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Buttons ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 24px;
  background: var(--user-bubble);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 16px rgba(108, 92, 231, 0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(108, 92, 231, 0.4); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-link {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
  padding: 8px;
  transition: color var(--transition);
  margin-top: 12px;
}
.btn-link:hover { color: var(--accent); }

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}
.btn-icon:hover { background: var(--bg-hover); color: var(--text-primary); }

/* ===== Code Input ===== */
.code-hint {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
}

.code-inputs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.code-inputs input {
  width: 46px; height: 56px;
  text-align: center;
  font-family: var(--font);
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  transition: all var(--transition);
  caret-color: var(--accent);
}
.code-inputs input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.code-inputs input.filled { border-color: var(--border-accent); background: rgba(139, 108, 246, 0.05); }

.code-separator {
  width: 12px; height: 3px;
  background: var(--text-tertiary);
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

/* ===== Auth Feedback ===== */
.auth-error {
  margin-top: 16px;
  padding: 10px 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-md);
  color: #f87171;
  font-size: 13px;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.auth-loading { margin-top: 20px; display: flex; justify-content: center; }

.spinner {
  width: 24px; height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== App Screen ===== */
#app-screen {
  flex-direction: column;
  background: var(--bg-primary);
}

/* ===== App Header ===== */
.app-header {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  background: rgba(13, 15, 22, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 10;
  flex-shrink: 0;
  gap: 12px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.header-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--user-bubble);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: white;
}

.header-info h2 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-secondary);
}

.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.4);
}
.status-dot.offline { background: var(--text-tertiary); box-shadow: none; }

/* ===== Header Navigation ===== */
.header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 3px;
  border: 1px solid var(--border);
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-tab:hover {
  color: var(--text-secondary);
  background: var(--bg-hover);
}

.nav-tab.active {
  color: var(--text-primary);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
}

.nav-tab svg {
  flex-shrink: 0;
  opacity: 0.7;
}
.nav-tab.active svg { opacity: 1; }

/* ===== Tab Content ===== */
.tab-content {
  display: none;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}
.tab-content.active {
  display: flex;
}

/* ===== Messages ===== */
.messages-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  scroll-behavior: smooth;
}

#messages-list {
  display: flex;
  flex-direction: column;
  padding: 16px 20px 24px;
  min-height: 100%;
  justify-content: flex-end;
}

.load-more {
  display: flex;
  justify-content: center;
  padding: 16px 20px 8px;
}

.btn-load {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-load:hover { background: var(--bg-hover); color: var(--text-primary); }

/* Date separator */
.date-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 0 16px;
}

.date-separator span {
  background: var(--bg-primary);
  padding: 4px 16px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
}

/* Message row */
.message-row {
  display: flex;
  margin-bottom: 4px;
  animation: msgIn 0.3s ease both;
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.message-row.user { justify-content: flex-end; }
.message-row.assistant { justify-content: flex-start; }
.message-row.first-in-group { margin-top: 12px; }

/* Message bubble */
.message-bubble {
  max-width: min(80%, 640px);
  padding: 10px 16px;
  position: relative;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.user .message-bubble {
  background: var(--user-bubble);
  color: white;
  border-radius: var(--radius-lg) var(--radius-lg) 4px var(--radius-lg);
  box-shadow: 0 2px 12px rgba(108, 92, 231, 0.2);
}

.assistant .message-bubble {
  background: var(--assistant-bubble);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) 4px;
}

/* Message content */
.message-content {
  font-size: 15px;
  line-height: 1.6;
}
.message-content p { margin-bottom: 8px; }
.message-content p:last-child { margin-bottom: 0; }
.message-content strong { font-weight: 600; }
.message-content em { font-style: italic; color: var(--text-secondary); }

.message-content a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}
.message-content a:hover { border-bottom-color: var(--accent); }
.user .message-content a { color: rgba(255,255,255,0.9); border-bottom-color: rgba(255,255,255,0.3); }

.message-content ul, .message-content ol { margin: 8px 0; padding-left: 24px; }
.message-content li { margin-bottom: 4px; }
.message-content li::marker { color: var(--text-tertiary); }

.message-content code { font-family: var(--mono); font-size: 13px; }
.message-content :not(pre) > code {
  background: rgba(255,255,255,0.08);
  padding: 2px 6px;
  border-radius: 4px;
}
.user .message-content :not(pre) > code { background: rgba(255,255,255,0.15); }

.message-content pre {
  margin: 10px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #0d1117;
  border: 1px solid rgba(255,255,255,0.06);
}
.message-content pre code {
  display: block;
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.5;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 12px;
  color: var(--text-tertiary);
}

.btn-copy {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-family: var(--font);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all var(--transition);
}
.btn-copy:hover { color: var(--text-secondary); background: rgba(255,255,255,0.06); }
.btn-copy.copied { color: #34d399; }

.message-content blockquote {
  margin: 8px 0;
  padding: 8px 16px;
  border-left: 3px solid var(--accent);
  background: rgba(139, 108, 246, 0.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
}

.message-content table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 14px; }
.message-content th, .message-content td { padding: 8px 12px; border: 1px solid var(--border); text-align: left; }
.message-content th { background: var(--bg-elevated); font-weight: 600; }
.message-content hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

.message-time {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 4px;
  text-align: right;
  opacity: 0;
  transition: opacity var(--transition);
}
.message-row:hover .message-time { opacity: 1; }
.user .message-time { color: rgba(255,255,255,0.5); }

/* ===== Typing Indicator ===== */
.typing-indicator {
  padding: 0 20px 8px;
  flex-shrink: 0;
}

.typing-bubble {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--assistant-bubble);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  animation: fadeIn 0.3s ease;
}

.typing-avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--user-bubble);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.typing-dots {
  display: flex;
  gap: 4px;
}

.typing-dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-tertiary);
  animation: typingBounce 1.4s ease-in-out infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.typing-text {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ===== Chat Input Bar ===== */
.chat-input-bar {
  flex-shrink: 0;
  padding: 12px 16px 16px;
  background: rgba(13, 15, 22, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
}

.input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px 8px 8px 16px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.input-wrapper:focus-within {
  border-color: var(--border-accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

#message-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  resize: none;
  max-height: 160px;
  padding: 4px 0;
}

#message-input::placeholder {
  color: var(--text-tertiary);
}

.btn-send {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--user-bubble);
  color: white;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(108, 92, 231, 0.3);
}
.btn-send:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(108, 92, 231, 0.4);
}
.btn-send:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.input-hint {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 6px;
  text-align: right;
  padding-right: 4px;
}

/* ===== Process Page ===== */
.process-page {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.process-status-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
}

.process-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.process-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
}

.process-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.process-dot.idle { background: var(--text-tertiary); }
.process-dot.active {
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.5);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}

.process-status-text {
  font-size: 15px;
  font-weight: 500;
}

.process-timer {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text-secondary);
}

.process-prompt {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  border-left: 3px solid var(--accent);
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

.process-events-wrap {
  flex: 1;
}

.process-events {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.process-empty {
  text-align: center;
  color: var(--text-tertiary);
  font-size: 14px;
  padding: 40px 20px;
}

/* Process event items */
.process-event {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  animation: fadeIn 0.3s ease;
}

.process-event.event-start { border-left: 3px solid var(--accent); }
.process-event.event-complete { border-left: 3px solid #34d399; }
.process-event.event-error { border-left: 3px solid #f87171; }
.process-event.event-thinking { border-left: 3px solid #fbbf24; }
.process-event.event-text { border-left: 3px solid #60a5fa; }

.event-time {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-tertiary);
  flex-shrink: 0;
  padding-top: 1px;
}

.event-body { flex: 1; min-width: 0; }

.event-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
}

.event-detail {
  font-size: 13px;
  color: var(--text-secondary);
  word-break: break-word;
}

.event-detail code {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--bg-elevated);
  padding: 1px 4px;
  border-radius: 3px;
}

.event-stats {
  display: flex;
  gap: 16px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.event-stat {
  font-size: 12px;
  color: var(--text-tertiary);
}
.event-stat strong {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Thinking content */
.thinking-block {
  margin-top: 8px;
  padding: 10px 14px;
  background: rgba(251, 191, 36, 0.05);
  border: 1px solid rgba(251, 191, 36, 0.1);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
  font-family: var(--mono);
  line-height: 1.5;
}

/* ===== Admin Page ===== */
.admin-page {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.admin-period {
  display: flex;
  justify-content: flex-end;
}

.admin-select {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 13px;
  padding: 6px 12px;
  outline: none;
  cursor: pointer;
}
.admin-select:focus { border-color: var(--border-accent); }

.admin-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all var(--transition);
}
.stat-card:hover {
  border-color: rgba(255,255,255,0.1);
  transform: translateY(-1px);
}
.stat-card.accent {
  border-color: var(--border-accent);
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.08), rgba(168, 85, 247, 0.05));
}

.stat-icon {
  color: var(--text-tertiary);
  margin-bottom: 4px;
}
.stat-card.accent .stat-icon { color: var(--accent); }

.stat-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.1;
}
.stat-card.accent .stat-value {
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 13px;
  color: var(--text-tertiary);
}

.admin-section {}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table th {
  padding: 10px 14px;
  text-align: left;
  background: var(--bg-surface);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.admin-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  white-space: nowrap;
}

.admin-table tr:last-child td { border-bottom: none; }

.admin-table tr:hover td {
  background: var(--bg-surface);
}

.admin-table td.table-empty {
  text-align: center;
  color: var(--text-tertiary);
  padding: 32px;
}

.admin-table .mono {
  font-family: var(--mono);
  font-size: 12px;
}

.admin-table .source-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 500;
}
.source-badge.web { background: rgba(96, 165, 250, 0.15); color: #60a5fa; }
.source-badge.telegram { background: rgba(52, 211, 153, 0.15); color: #34d399; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-tab span { display: none; }
  .nav-tab { padding: 8px 10px; }
  .header-info { display: none; }
  .admin-summary { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .login-card { margin: 16px; padding: 36px 24px 32px; }
  .code-inputs input { width: 40px; height: 48px; font-size: 18px; }
  #messages-list { padding: 12px 14px 20px; }
  .message-bubble { max-width: 88%; }
  .app-header { padding: 8px 12px; }
  .process-page, .admin-page { padding: 14px; }
  .admin-summary { grid-template-columns: 1fr 1fr; }
}
