/* ═══════════════════════════════════════════════════════════════
   AIwork 智能工作台 — Modern Light UI v3.0
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg: #f4f5f9;
  --bg-soft: rgba(255, 255, 255, 0.88);
  --panel: #ffffff;
  --panel-border: #e5e7eb;
  --panel-hover: #f9fafb;
  --surface: #f0f1f5;
  --text: #111827;
  --muted: #6b7280;
  --primary: #6366f1;
  --primary-dim: rgba(99, 102, 241, 0.08);
  --cyan: #6366f1;
  --cyan-dim: rgba(99, 102, 241, 0.08);
  --lime: #22c55e;
  --lime-dim: rgba(34, 197, 94, 0.08);
  --amber: #f59e0b;
  --amber-dim: rgba(245, 158, 11, 0.08);
  --rose: #ef4444;
  --rose-dim: rgba(239, 68, 68, 0.08);
  --purple: #8b5cf6;
  --shadow: 0 1px 3px rgba(0,0,0,0.05), 0 8px 24px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --mono: "JetBrains Mono", "Cascadia Code", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }

body {
  min-height: 100vh;
  font-family: "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

h1, h2, h3, strong, button { font-family: "Space Grotesk", sans-serif; }

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

.hidden { display: none !important; }

/* Hide old sci-fi background elements */
.aurora, .grid { display: none !important; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.20); }

/* ── Shared Components ── */
.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px;
}
.panel-head h2 { font-size: 1.2rem; }

.chip {
  padding: 5px 10px; border-radius: 999px; font-size: 11px;
  color: var(--muted); border: 1px solid var(--panel-border);
  background: var(--bg); font-family: var(--mono);
  letter-spacing: 0.04em;
}
.chip.online { color: #fff; background: linear-gradient(135deg, var(--lime), #4ade80); border-color: transparent; }
.chip.accent { color: #fff; background: linear-gradient(135deg, var(--cyan), #818cf8); border-color: transparent; }
.chip.warn { color: #fff; background: linear-gradient(135deg, var(--amber), #fbbf24); border-color: transparent; }
.new-chat-btn { cursor: pointer; color: var(--primary); border-color: var(--primary); transition: all 0.15s; }
.new-chat-btn:hover { color: #fff; background: var(--primary); }

.muted-text { color: var(--muted); font-size: 0.87rem; line-height: 1.6; }


/* ═══════════════════════════════════════════════════
   AUTH SCREEN
   ═══════════════════════════════════════════════════ */
.auth-screen {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #e0e7ff 0%, #f4f5f9 50%, #fce7f3 100%);
}

.auth-card {
  width: min(400px, calc(100vw - 40px));
  padding: 40px 36px; text-align: center;
}

.auth-logo {
  position: relative; width: 72px; height: 72px; margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
}

.logo-ring {
  position: absolute; inset: 0; border: 2px solid var(--cyan);
  border-radius: 50%; animation: ring-spin 8s linear infinite;
  border-top-color: transparent; border-left-color: transparent;
}
.logo-ring.small { width: 48px; height: 48px; }

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

.logo-text {
  font-family: "Space Grotesk", sans-serif; font-weight: 700;
  font-size: 24px; color: var(--cyan);
}

.auth-title { font-size: 2rem; margin-bottom: 6px; color: var(--text); }
.auth-sub { color: var(--muted); font-size: 0.85rem; margin-bottom: 28px; letter-spacing: 0.08em; text-transform: uppercase; }

.auth-card input {
  width: 100%; padding: 14px 16px; margin-bottom: 12px;
  border: 1px solid var(--panel-border); border-radius: var(--radius-sm);
  background: #fff; color: var(--text); font: inherit; font-size: 0.93rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-card input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }
.auth-card input::placeholder { color: var(--muted); }

.auth-card button[type="submit"] {
  width: 100%; padding: 14px; margin-top: 4px;
  border: 0; border-radius: var(--radius-sm); cursor: pointer;
  font-size: 1rem; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--cyan), #818cf8);
  transition: transform 0.15s, box-shadow 0.15s;
}
.auth-card button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(99,102,241,0.25);
}

.auth-toggle { color: var(--muted); font-size: 0.85rem; margin-top: 16px; }
.auth-error { color: var(--rose); font-size: 0.85rem; margin-top: 8px; min-height: 1.2em; }


/* ═══════════════════════════════════════════════════
   TOP BAR
   ═══════════════════════════════════════════════════ */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 20px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--panel-border);
}

.topbar-left, .topbar-right { display: flex; align-items: center; gap: 12px; }

.topbar-logo {
  display: flex; align-items: center; gap: 8px;
  font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 1.1rem;
  color: var(--text);
}
.logo-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 8px rgba(99,102,241,0.4);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

.topbar-nav { display: flex; gap: 2px; }

.nav-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--muted); cursor: pointer;
  font-size: 0.85rem; font-weight: 500; transition: all 0.15s;
}
.nav-btn:hover { color: var(--text); background: rgba(0,0,0,0.04); }
.nav-btn.active { color: var(--cyan); background: var(--cyan-dim); }
.nav-btn svg { flex-shrink: 0; }

.topbar-user {
  color: var(--muted); font-size: 0.85rem; font-family: var(--mono);
}
.topbar-env { font-size: 10px; }


/* ═══════════════════════════════════════════════════
   VIEWS — Layout
   ═══════════════════════════════════════════════════ */
.app-shell { position: relative; z-index: 1; min-height: 100vh; }
.view { display: none; }
.view.active { display: block; }


/* ═══════════════════════════════════════════════════
   HOME VIEW
   ═══════════════════════════════════════════════════ */
.view-home {
  padding: 48px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.home-header {
  text-align: center;
  margin-bottom: 44px;
}
.home-header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.home-header p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.tool-card {
  position: relative;
  padding: 28px 24px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.25s ease;
  overflow: hidden;
}
.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
  opacity: 0;
  transition: opacity 0.25s;
}
.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  border-color: transparent;
}
.tool-card:hover::before { opacity: 1; }

.tool-card .tool-icon {
  font-size: 2.2rem;
  margin-bottom: 14px;
  display: block;
}
.tool-card .tool-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.tool-card .tool-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
}

/* Tool card accent colors */
.tool-card[data-tool="general"]::before { background: linear-gradient(90deg, #6366f1, #818cf8); }
.tool-card[data-tool="general"]:hover { border-color: rgba(99,102,241,0.3); }

.tool-card[data-tool="plan"]::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.tool-card[data-tool="plan"]:hover { border-color: rgba(59,130,246,0.3); }

.tool-card[data-tool="proposal"]::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.tool-card[data-tool="proposal"]:hover { border-color: rgba(139,92,246,0.3); }

.tool-card[data-tool="info"]::before { background: linear-gradient(90deg, #06b6d4, #22d3ee); }
.tool-card[data-tool="info"]:hover { border-color: rgba(6,182,212,0.3); }

.tool-card[data-tool="ppt"]::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.tool-card[data-tool="ppt"]:hover { border-color: rgba(245,158,11,0.3); }

.tool-card[data-tool="image"]::before { background: linear-gradient(90deg, #ec4899, #f472b6); }
.tool-card[data-tool="image"]:hover { border-color: rgba(236,72,153,0.3); }

.tool-card[data-tool="literature"]::before { background: linear-gradient(90deg, #10b981, #34d399); }
.tool-card[data-tool="literature"]:hover { border-color: rgba(16,185,129,0.3); }

.tool-card[data-tool="paper"]::before { background: linear-gradient(90deg, #14b8a6, #2dd4bf); }
.tool-card[data-tool="paper"]:hover { border-color: rgba(20,184,166,0.3); }

.tool-card[data-tool="data"]::before { background: linear-gradient(90deg, #f97316, #fb923c); }
.tool-card[data-tool="data"]:hover { border-color: rgba(249,115,22,0.3); }


/* ═══════════════════════════════════════════════════
   CHAT VIEW
   ═══════════════════════════════════════════════════ */
.chat-layout {
  display: grid; grid-template-columns: 1fr 360px;
  height: calc(100vh - 56px);
}

.chat-main {
  display: flex; flex-direction: column;
  border-right: 1px solid var(--panel-border);
  background: #fafbfc;
}

.chat-messages {
  flex: 1; overflow-y: auto; padding: 24px 28px;
  scroll-behavior: smooth;
}

/* Welcome */
.chat-welcome {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 60vh; text-align: center;
}
.chat-welcome h2 { font-size: 1.6rem; margin-bottom: 8px; color: var(--text); }
.chat-welcome p { color: var(--muted); max-width: 480px; line-height: 1.7; margin-bottom: 28px; }

.welcome-icon {
  position: relative; width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.welcome-icon span { font-family: "Space Grotesk"; font-weight: 700; color: var(--cyan); }

.quick-prompts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.quick-prompt {
  padding: 10px 16px; border: 1px solid var(--panel-border);
  border-radius: 999px; background: #fff;
  color: var(--text); cursor: pointer; font-size: 0.85rem;
  transition: all 0.15s; box-shadow: var(--shadow-sm);
}
.quick-prompt:hover {
  background: var(--cyan-dim); border-color: rgba(99,102,241,0.3);
  transform: translateY(-1px);
}

/* PPT Config Panel */
.ppt-config-panel { width: 100%; margin-bottom: 16px; background: #fff; border: 1px solid var(--panel-border); border-radius: 12px; padding: 16px 20px; box-shadow: var(--shadow-sm); }
.ppt-config-section { margin-bottom: 12px; }
.ppt-config-section:last-child { margin-bottom: 0; }
.ppt-config-section > label { font-size: 0.85rem; font-weight: 600; color: var(--text); display: block; margin-bottom: 8px; }
.ppt-config-row { display: flex; gap: 24px; }
.ppt-config-row > .ppt-config-section { flex: 1; }
.ppt-themes { display: flex; flex-wrap: wrap; gap: 8px; }
.ppt-theme-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border: 2px solid var(--panel-border);
  border-radius: 999px; background: #fff; cursor: pointer;
  font-size: 0.8rem; color: var(--text); transition: all 0.2s;
}
.ppt-theme-btn:hover { border-color: var(--tc, #6366F1); box-shadow: 0 2px 8px rgba(0,0,0,0.08); transform: translateY(-1px); }
.ppt-theme-btn.active { border-color: var(--tc, #6366F1); background: color-mix(in srgb, var(--tc, #6366F1) 8%, #fff); box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.ppt-theme-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; border: 1px solid rgba(0,0,0,0.1); }
.ppt-option-group { display: flex; flex-wrap: wrap; gap: 6px; }
.ppt-opt-btn {
  padding: 5px 12px; border: 1.5px solid var(--panel-border);
  border-radius: 999px; background: #fff; cursor: pointer;
  font-size: 0.78rem; color: var(--dim); transition: all 0.2s;
}
.ppt-opt-btn:hover { border-color: #6366F1; color: var(--text); }
.ppt-opt-btn.active { border-color: #6366F1; background: rgba(99,102,241,0.06); color: #6366F1; font-weight: 600; }
.ppt-opt-hint { font-weight: 400; font-size: 0.72rem; color: var(--dim); }
.ppt-upload-hint {
  display: flex; align-items: center; gap: 8px; margin-top: 12px;
  padding: 10px 14px; background: #F0F4FF; border-radius: 8px;
  font-size: 0.8rem; color: #4B5563;
}
.ppt-upload-icon { font-size: 1.1rem; }

/* Messages */
.msg { display: flex; gap: 12px; margin-bottom: 20px; max-width: 800px; animation: msg-in 0.3s ease; }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.msg-user { justify-content: flex-end; margin-left: auto; }
.msg-user .msg-bubble { background: var(--cyan); color: #fff; border: none; }

.msg-ai .msg-bubble { background: #fff; border: 1px solid var(--panel-border); color: var(--text); }

.msg-avatar {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; font-family: "Space Grotesk";
}
.msg-user .msg-avatar { background: var(--cyan-dim); color: var(--cyan); }
.msg-ai .msg-avatar { background: var(--lime-dim); color: var(--lime); }

.msg-bubble {
  padding: 12px 16px; border-radius: var(--radius);
  line-height: 1.7; font-size: 0.93rem; min-width: 60px;
  word-break: break-word;
}
.msg-bubble p { margin: 0 0 8px; }
.msg-bubble p:last-child { margin-bottom: 0; }

/* Typing indicator */
.msg-typing .msg-bubble { padding: 14px 20px; }
.typing-dots { display: flex; gap: 4px; }
.typing-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--muted); animation: typing 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 typing { 0%,60%,100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }

/* Workflow step message */
.msg-step { margin: 16px 0; padding: 14px 16px; border-radius: var(--radius-sm);
  border-left: 3px solid var(--cyan); background: var(--cyan-dim); }
.msg-step.step-audit { border-left-color: var(--amber); background: var(--amber-dim); }
.msg-step.step-debate { border-left-color: var(--purple); background: rgba(139,92,246,0.06); }
.msg-step.step-error { border-left-color: var(--rose); background: var(--rose-dim); }
.msg-step.step-done { border-left-color: var(--lime); background: var(--lime-dim); }
.msg-step-label { font-size: 0.78rem; color: var(--muted); font-family: var(--mono); margin-bottom: 4px; }
.msg-step-content { font-size: 0.9rem; line-height: 1.65; color: var(--text); }

/* Artifact card */
.artifact-card {
  margin-top: 12px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--lime-dim); border: 1px solid rgba(34,197,94,0.2);
}
.artifact-card h4 { font-size: 0.95rem; margin-bottom: 6px; color: var(--text); }
.artifact-card .artifact-items { display: grid; gap: 6px; margin-top: 10px; }
.artifact-item {
  padding: 8px 12px; border-radius: var(--radius-xs);
  background: rgba(0,0,0,0.03); font-size: 0.85rem; color: var(--text);
}
.artifact-download {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px; padding: 8px 14px;
  border: 1px solid rgba(34,197,94,0.3); border-radius: var(--radius-xs);
  background: transparent; color: var(--lime); cursor: pointer;
  font-size: 0.82rem; transition: all 0.15s; text-decoration: none;
}
.artifact-download:hover { background: var(--lime-dim); color: var(--lime); }

/* Generated image container with download overlay */
.generated-image {
  position: relative; display: inline-block; max-width: 100%; margin: 8px 0;
}
.generated-image img { display: block; border-radius: 8px; }
.img-overlay {
  position: absolute; top: 8px; right: 8px;
  opacity: 0; transition: opacity 0.2s;
}
.generated-image:hover .img-overlay { opacity: 1; }

/* ═══════════════════════════════════════════════════
   ACADEMIC DOCUMENT STYLING
   ═══════════════════════════════════════════════════ */

/* Headings */
.doc-h1 {
  font-size: 1.6em; font-weight: 700; color: #111;
  margin: 1em 0 0.4em; padding-bottom: 6px;
  border-bottom: 2px solid var(--primary);
  line-height: 1.3;
}
.doc-h2 {
  font-size: 1.3em; font-weight: 600; color: #222;
  margin: 0.8em 0 0.3em; padding-bottom: 4px;
  border-bottom: 1px solid var(--panel-border);
  line-height: 1.35;
}
.doc-h3 {
  font-size: 1.1em; font-weight: 600; color: #333;
  margin: 0.6em 0 0.25em; line-height: 1.4;
}
.doc-h4 {
  font-size: 1em; font-weight: 600; color: #444;
  margin: 0.5em 0 0.2em; line-height: 1.4;
}

/* Lists */
.doc-list {
  padding-left: 1.8em; margin: 0.4em 0 0.6em; line-height: 1.7;
}
.doc-list li {
  margin: 0.2em 0; padding-left: 0.2em;
}
.doc-list li::marker { color: var(--primary); }

/* Horizontal rule */
.doc-hr {
  border: none; height: 1px;
  background: linear-gradient(90deg, transparent, var(--panel-border), transparent);
  margin: 1.2em 0;
}

/* Inline code */
.doc-inline-code {
  background: rgba(99,102,241,0.08); padding: 2px 6px;
  border-radius: 4px; font-family: var(--mono);
  font-size: 0.85em; color: #d63384;
}

/* Code blocks */
.doc-code-block {
  background: #f8f9fa; padding: 14px 16px;
  border-radius: 8px; overflow-x: auto;
  font-size: 0.85em; font-family: var(--mono);
  margin: 10px 0; border: 1px solid var(--panel-border);
  line-height: 1.6;
}
.doc-code-block code { background: none; padding: 0; color: #1a1a1a; }

/* Tables - academic style */
.doc-table-wrap {
  overflow-x: auto; margin: 12px 0;
  border-radius: 8px; border: 1px solid var(--panel-border);
}
.doc-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.88rem; line-height: 1.5;
}
.doc-table th {
  background: var(--primary); color: #fff;
  padding: 10px 14px; text-align: left;
  font-weight: 600; font-size: 0.85rem;
  white-space: nowrap;
}
.doc-table td {
  padding: 9px 14px; border-bottom: 1px solid var(--panel-border);
}
.doc-table tbody tr:nth-child(even) { background: rgba(99,102,241,0.03); }
.doc-table tbody tr:hover { background: rgba(99,102,241,0.06); }

/* Figures - academic paper style */
.doc-figure {
  display: block; text-align: center;
  margin: 16px auto; max-width: 100%;
  position: relative;
}
.doc-figure img {
  max-width: 100%; height: auto;
  border-radius: 6px; display: block;
  margin: 0 auto; box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.doc-figure figcaption {
  margin-top: 8px; font-size: 0.82rem;
  color: #555; font-style: italic; text-align: center;
}
.doc-figure:hover .img-overlay { opacity: 1; }
.doc-figure .img-overlay {
  position: absolute; top: 8px; right: 8px;
  opacity: 0; transition: opacity 0.2s;
}

/* KaTeX display math */
.doc-math-display {
  overflow-x: auto; margin: 12px 0;
  padding: 10px 0; text-align: center;
}
.doc-math-display .katex-display { margin: 0; }

/* KaTeX inline fixes */
.katex { font-size: 1.05em; }
.msg-bubble .katex { vertical-align: -0.2em; }
.img-dl-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0,0,0,0.6); color: #fff; text-decoration: none;
  font-size: 16px; backdrop-filter: blur(4px);
  transition: background 0.15s;
}
.img-dl-btn:hover { background: rgba(0,0,0,0.85); }

/* Visual blocks (Mermaid / HTML rendered visuals) */
.visual-block {
  margin: 12px 0; padding: 16px; border-radius: var(--radius-sm);
  background: #fff; border: 1px solid var(--panel-border);
  overflow: auto; max-width: 100%;
}
.visual-block .mermaid { display: flex; justify-content: center; }
.visual-block .mermaid svg { max-width: 100%; height: auto; }
.html-visual { min-height: 60px; overflow: auto; }
.visual-actions {
  display: flex; gap: 8px; margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--panel-border);
}
.visual-save-btn {
  padding: 6px 14px; border: 1px solid var(--panel-border);
  border-radius: var(--radius-xs); background: var(--bg);
  color: var(--text); cursor: pointer; font-size: 0.8rem;
  transition: all 0.15s;
}
.visual-save-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Chat Input */
.chat-input-area { padding: 16px 28px 20px; border-top: 1px solid var(--panel-border); background: #fff; position: relative; }
.chat-input-wrap {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 12px 14px; border-radius: var(--radius);
  background: var(--bg); border: 1px solid var(--panel-border);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.chat-input-wrap:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(99,102,241,0.08); }

#chatInput {
  flex: 1; border: 0; background: transparent; color: var(--text);
  font: inherit; font-size: 0.93rem; resize: none;
  line-height: 1.5; max-height: 150px; outline: none;
}
#chatInput::placeholder { color: var(--muted); }

.send-btn {
  flex-shrink: 0; width: 36px; height: 36px; border: 0;
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: var(--cyan); color: #fff;
  transition: transform 0.15s, opacity 0.15s;
}
.send-btn:disabled { opacity: 0.3; cursor: default; }
.send-btn:not(:disabled):hover { transform: scale(1.08); }

.chat-hint {
  margin-top: 8px; font-size: 0.75rem; color: var(--muted);
  text-align: center; opacity: 0.7;
}

/* Task Type Selector */
.task-type-bar {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 10px; flex-wrap: wrap;
}
.task-type-label { font-size: 0.78rem; color: var(--muted); margin-right: 4px; }
.task-type-btn {
  padding: 4px 12px; border-radius: 14px; border: 1px solid var(--panel-border);
  background: #fff; color: var(--muted); font-size: 0.78rem;
  cursor: pointer; transition: all 0.15s; font-family: inherit;
}
.task-type-btn.active {
  background: var(--cyan-dim); color: var(--cyan); border-color: rgba(99,102,241,0.3);
}
.task-type-btn:hover { color: var(--text); border-color: var(--muted); }

/* Upload */
.upload-btn {
  flex-shrink: 0; width: 36px; height: 36px; display: flex;
  align-items: center; justify-content: center; cursor: pointer;
  color: var(--muted); border-radius: 50%; transition: color 0.15s;
}
.upload-btn:hover { color: var(--cyan); }
.upload-preview {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; padding: 8px 0;
}
.upload-preview.hidden { display: none; }
.upload-thumb {
  position: relative; width: 68px; height: 68px; border-radius: var(--radius-xs);
  overflow: hidden; border: 1px solid var(--panel-border); background: var(--bg);
}
.upload-thumb img { width: 100%; height: 100%; object-fit: cover; }
.upload-thumb .file-icon {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; height: 100%; font-size: 0.6rem; color: var(--muted);
  text-align: center; padding: 4px; word-break: break-all; gap: 2px;
}
.upload-thumb .file-ext {
  display: block; font-size: 0.7rem; font-weight: 700; color: var(--cyan);
  margin-bottom: 1px;
}
.upload-thumb .file-size {
  position: absolute; bottom: 0; left: 0; right: 0;
  font-size: 0.55rem; color: #fff; background: rgba(0,0,0,0.55);
  text-align: center; padding: 1px 0; line-height: 1.3;
}
.upload-thumb .remove-file {
  position: absolute; top: -4px; right: -4px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--rose); color: #fff; border: none;
  font-size: 11px; cursor: pointer; display: flex; align-items: center;
  justify-content: center; line-height: 1;
}

/* Drag-and-drop overlay */
.chat-input-area.drag-over {
  outline: 2px dashed var(--cyan); outline-offset: -2px;
  background: rgba(0, 194, 255, 0.04);
}
.chat-input-area.drag-over::after {
  content: "\62d6\653e\6587\u4ef6\u5230\u6b64\u5904";
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; color: var(--cyan); font-weight: 600;
  background: rgba(255,255,255,0.85); border-radius: inherit; pointer-events: none;
  z-index: 10;
}

/* Stop Button */
.stop-btn {
  flex-shrink: 0; width: 36px; height: 36px; border: 0;
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: var(--rose); color: #fff;
  transition: transform 0.15s, opacity 0.15s;
  animation: stop-pulse 1.5s ease-in-out infinite;
}
.stop-btn:hover { transform: scale(1.08); }
.stop-btn.hidden { display: none !important; }
@keyframes stop-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); } 50% { box-shadow: 0 0 0 8px rgba(239,68,68,0); } }


/* ═══════════════════════════════════════════════════
   WORKFLOW ASIDE
   ═══════════════════════════════════════════════════ */
.workflow-aside {
  overflow-y: auto; padding: 20px 16px;
  background: #fff;
}

.aside-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 100%; text-align: center;
  color: var(--muted); gap: 16px;
}
.aside-empty svg { opacity: 0.3; }
.aside-empty p { font-size: 0.85rem; line-height: 1.6; }

.aside-section { margin-bottom: 24px; }
.aside-section h3 {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.85rem; color: var(--muted); margin-bottom: 12px;
  text-transform: uppercase; letter-spacing: 0.06em;
}

/* Plan Steps */
.plan-steps { display: grid; gap: 8px; }
.plan-step {
  display: grid; grid-template-columns: 24px 1fr; gap: 8px; align-items: start;
  padding: 10px 12px; border-radius: var(--radius-xs);
  background: var(--bg); font-size: 0.85rem;
  transition: background 0.2s;
}
.plan-step.active { background: var(--cyan-dim); }
.plan-step.done { background: var(--lime-dim); }
.plan-step.failed { background: var(--rose-dim); }

.step-num {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700; font-family: var(--mono);
  border: 1px solid var(--panel-border); color: var(--muted);
}
.plan-step.active .step-num { border-color: var(--cyan); color: var(--cyan); }
.plan-step.done .step-num { border-color: var(--lime); color: var(--lime); background: var(--lime-dim); }
.plan-step.failed .step-num { border-color: var(--rose); color: var(--rose); }

.step-title { font-weight: 600; margin-bottom: 2px; color: var(--text); }
.step-agent { font-size: 0.75rem; color: var(--muted); font-family: var(--mono); }

/* Live Metrics */
.live-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lm-item {
  padding: 10px 12px; border-radius: var(--radius-xs);
  background: var(--bg);
}
.lm-item span { display: block; font-size: 0.75rem; color: var(--muted); }
.lm-item strong { font-size: 1.1rem; font-family: var(--mono); color: var(--text); }

/* Agent Log */
.agent-log { display: grid; gap: 6px; max-height: 300px; overflow-y: auto; }
.log-entry {
  padding: 8px 10px; border-radius: var(--radius-xs);
  background: var(--bg); font-size: 0.8rem;
  line-height: 1.5; border-left: 2px solid var(--panel-border);
  animation: msg-in 0.25s ease;
}
.log-entry.log-thinking { border-left-color: var(--cyan); }
.log-entry.log-action { border-left-color: var(--lime); }
.log-entry.log-audit { border-left-color: var(--amber); }
.log-entry.log-debate { border-left-color: var(--purple); }
.log-entry.log-error { border-left-color: var(--rose); }

.log-label { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); margin-bottom: 2px; }
.log-text { color: var(--text); }


/* ═══════════════════════════════════════════════════
   DASHBOARD VIEW
   ═══════════════════════════════════════════════════ */
.view-dashboard { padding: 24px; }
.dash-grid {
  display: grid; grid-template-columns: 300px 1fr;
  gap: 20px; max-width: 1200px; margin: 0 auto;
}
.dash-card { padding: 24px; }
.dash-card.span-2 { grid-column: 1 / -1; }

.metric-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.metric-card {
  padding: 16px; border-radius: var(--radius-sm);
  background: var(--bg); border: 1px solid var(--panel-border);
}
.metric-card span { font-size: 0.78rem; color: var(--muted); display: block; }
.metric-card strong { font-size: 1.5rem; display: block; margin-top: 6px; font-family: var(--mono); color: var(--text); }
.metric-card p { font-size: 0.8rem; color: var(--muted); margin-top: 8px; line-height: 1.5; }

.task-history { max-height: 60vh; overflow-y: auto; }

/* Task History Items */
.task-history-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: var(--radius-xs);
  background: var(--bg); margin-bottom: 6px;
  font-size: 0.85rem; line-height: 1.5;
  cursor: pointer; transition: background 0.15s;
}
.task-history-item:hover { background: var(--surface); }
.task-history-item.thi-active {
  background: var(--primary); color: #fff;
  box-shadow: 0 2px 8px rgba(59,130,246,0.15);
}
.task-history-item.thi-active .thi-prompt { color: #fff; }
.task-history-item.thi-active .thi-time { color: rgba(255,255,255,0.7); }
.task-history-item.thi-active .thi-del { color: rgba(255,255,255,0.6); }
.task-history-item.thi-active .thi-del:hover { color: #fff; background: rgba(255,255,255,0.2); }

/* History search */
.history-search-wrap { padding: 0 0 10px; }
.history-search-input {
  width: 100%; padding: 8px 12px; border: 1px solid var(--panel-border);
  border-radius: var(--radius-xs); background: var(--bg); color: var(--text);
  font-size: 0.85rem; outline: none; transition: border-color 0.2s;
  box-sizing: border-box;
}
.history-search-input:focus { border-color: var(--primary); }
.history-search-results {
  max-height: 300px; overflow-y: auto; margin-bottom: 10px;
  border: 1px solid var(--primary); border-radius: var(--radius-xs);
  background: #fff;
}
.search-result-item {
  padding: 10px 12px; border-bottom: 1px solid var(--panel-border);
  cursor: pointer; transition: background 0.15s;
}
.search-result-item:hover { background: var(--bg); }
.search-result-item:last-child { border-bottom: none; }
.sr-prompt { font-size: 0.85rem; color: var(--text); margin-bottom: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sr-time { font-size: 0.72rem; color: var(--muted); }
.search-file-link {
  font-size: 0.75rem; color: var(--primary); text-decoration: none;
  padding: 2px 6px; border-radius: 4px; background: rgba(59,130,246,0.08);
}
.search-file-link:hover { background: rgba(59,130,246,0.15); }
.thi-icon { flex-shrink: 0; font-size: 1rem; }
.thi-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.thi-prompt {
  color: var(--text); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.thi-time {
  color: var(--muted); font-size: 0.72rem; white-space: nowrap;
}
.thi-del {
  flex-shrink: 0; width: 24px; height: 24px;
  border: none; border-radius: 50%;
  background: transparent; color: var(--muted);
  cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.thi-del:hover { color: var(--rose); background: var(--rose-dim); }

.sys-stats { display: flex; gap: 16px; flex-wrap: wrap; }
.sys-item {
  padding: 12px 16px; border-radius: var(--radius-sm);
  background: var(--bg); min-width: 140px;
  text-align: center;
}
.sys-item span { display: block; font-size: 0.78rem; color: var(--muted); margin-bottom: 6px; }
.status-ok { color: var(--lime); }
.status-err { color: var(--rose); }


/* ═══════════════════════════════════════════════════
   MODELS VIEW
   ═══════════════════════════════════════════════════ */
.view-models { padding: 24px; max-width: 1200px; margin: 0 auto; }
.models-header { padding: 24px; margin-bottom: 20px; }

.model-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.model-card {
  padding: 20px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--panel-border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.model-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.model-card .mc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.model-card .mc-code {
  padding: 4px 8px; border-radius: var(--radius-xs); font-family: var(--mono);
  font-size: 0.75rem; font-weight: 600; background: var(--cyan-dim); color: var(--cyan);
}
.model-card .mc-tag {
  padding: 3px 8px; border-radius: 999px; font-size: 0.7rem;
  background: var(--amber-dim); color: var(--amber); margin-left: auto;
}
.model-card .mc-role { font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; color: var(--text); }
.model-card .mc-desc { color: var(--muted); font-size: 0.82rem; line-height: 1.6; }


/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */

/* ── Tablet (≤1080px) ── */
@media (max-width: 1080px) {
  .chat-layout { grid-template-columns: 1fr; }
  .workflow-aside { display: none; }
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .model-cards { grid-template-columns: repeat(2, 1fr); }
}

/* ── Small tablet / large phone (≤768px) ── */
@media (max-width: 768px) {
  html { font-size: 14px; }

  .topbar { height: 48px; padding: 0 12px; }
  .topbar-nav { display: none; }
  .topbar-logo span { font-size: 0.95rem; }
  .topbar-env { display: none; }
  .topbar-user { font-size: 0.75rem; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .chat-layout { height: calc(100vh - 48px); }

  .view-home { padding: 20px 12px; }
  .home-header { margin-bottom: 24px; }
  .home-header h1 { font-size: 1.5rem; }
  .home-header p { font-size: 0.88rem; }
  .tool-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tool-card { padding: 16px 14px; }
  .tool-card .tool-icon { font-size: 1.6rem; margin-bottom: 8px; }
  .tool-card .tool-name { font-size: 0.95rem; }
  .tool-card .tool-desc { font-size: 0.78rem; }

  .chat-messages { padding: 16px 12px; }
  .chat-input-area { padding: 10px 12px 14px; }
  .chat-hint { font-size: 0.68rem; }
  .msg { max-width: 100%; }

  .dash-grid { grid-template-columns: 1fr; gap: 12px; }
  .view-dashboard { padding: 12px; }
  .dash-card { padding: 16px; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .model-cards { grid-template-columns: 1fr; }
  .view-models { padding: 12px; }

  .live-metrics { grid-template-columns: 1fr 1fr; }

  /* Doc Editor */
  .doc-editor-container { width: 100vw; height: 100vh; border-radius: 0; }
  .doc-editor-toolbar { gap: 6px; padding: 8px 10px; }
  .doc-editor-toolbar h3 { font-size: 0.82rem; }
  .doc-editor-body { padding: 16px; }
  .doc-editor-download-actions { margin-left: 0; }
}

/* ── Phone (≤480px) ── */
@media (max-width: 480px) {
  html { font-size: 13px; }

  .topbar { padding: 0 8px; gap: 4px; }
  .topbar-left { gap: 6px; }
  .topbar-right { gap: 4px; }
  .topbar-user { display: none; }

  .view-home { padding: 16px 10px; }
  .home-header h1 { font-size: 1.3rem; }
  .tool-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tool-card { padding: 14px 10px; }
  .tool-card .tool-icon { font-size: 1.4rem; margin-bottom: 6px; }
  .tool-card .tool-name { font-size: 0.85rem; margin-bottom: 4px; }
  .tool-card .tool-desc { font-size: 0.72rem; line-height: 1.4; }

  .chat-messages { padding: 10px 8px; }
  .chat-input-area { padding: 8px 8px 10px; }
  .chat-input-wrap { padding: 8px 10px; gap: 6px; }
  #chatInput { font-size: 0.88rem; }
  .chat-hint { display: none; }
  .chat-welcome h2 { font-size: 1.2rem; }
  .chat-welcome p { font-size: 0.82rem; padding: 0 8px; }
  .quick-prompt { font-size: 0.78rem; padding: 8px 12px; }
  .ppt-config-panel { padding: 12px 14px; }
  .ppt-config-row { flex-direction: column; gap: 10px; }
  .ppt-theme-btn { padding: 5px 10px; font-size: 0.72rem; }
  .ppt-opt-btn { padding: 4px 10px; font-size: 0.72rem; }

  .task-type-bar { gap: 4px; margin-bottom: 6px; }
  .task-type-label { display: none; }
  .task-type-btn { padding: 3px 8px; font-size: 0.7rem; }

  .msg-avatar { width: 26px; height: 26px; font-size: 10px; }
  .msg-bubble { padding: 10px 12px; font-size: 0.88rem; }
  .msg-actions { gap: 4px; }
  .msg-action-btn { padding: 4px 8px; font-size: 0.68rem; }

  .upload-thumb { width: 48px; height: 48px; }

  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric-card strong { font-size: 1.2rem; }
  .sys-stats { gap: 8px; }
  .sys-item { min-width: 100px; padding: 8px 10px; }

  .model-card { padding: 14px; }

  /* Task history on mobile */
  .task-history-item { gap: 4px; padding: 6px 8px; font-size: 0.78rem; }
  .thi-time { display: none; }
  .thi-del { width: 22px; height: 22px; font-size: 12px; }

  /* Doc Editor */
  .doc-editor-actions { display: none; }
  .doc-editor-download-actions { gap: 4px; }
  .doc-dl-btn { padding: 5px 10px; font-size: 0.72rem; }
}


/* ═══════════════════════════════════════════════════
   DOCUMENT EDITOR MODAL
   ═══════════════════════════════════════════════════ */
.doc-editor-modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  animation: modal-in 0.25s ease;
}
.doc-editor-modal.hidden { display: none !important; }
@keyframes modal-in { from { opacity: 0; } to { opacity: 1; } }

.doc-editor-container {
  width: min(960px, calc(100vw - 40px));
  height: min(80vh, 700px);
  display: flex; flex-direction: column;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--panel-border);
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  overflow: hidden;
}

.doc-editor-toolbar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--panel-border);
  flex-wrap: wrap;
}
.doc-editor-toolbar h3 {
  font-size: 0.95rem; color: var(--cyan); margin-right: auto;
  white-space: nowrap;
}

.doc-editor-actions {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
}

.toolbar-btn {
  padding: 4px 10px; border: 1px solid var(--panel-border);
  border-radius: var(--radius-xs); background: #fff;
  color: var(--text); cursor: pointer; font-size: 0.8rem;
  transition: all 0.15s; font-family: inherit;
}
.toolbar-btn:hover { background: var(--cyan-dim); border-color: var(--cyan); color: var(--cyan); }

.toolbar-sep { color: var(--panel-border); font-size: 0.9rem; margin: 0 2px; }

.toolbar-select {
  padding: 4px 8px; border: 1px solid var(--panel-border);
  border-radius: var(--radius-xs); background: #fff;
  color: var(--text); font-size: 0.8rem; cursor: pointer;
}

.doc-editor-download-actions {
  display: flex; align-items: center; gap: 6px; margin-left: 12px;
}

.doc-dl-btn {
  padding: 6px 14px; border: 1px solid var(--panel-border);
  border-radius: var(--radius-xs); background: transparent;
  color: var(--text); cursor: pointer; font-size: 0.8rem;
  font-family: inherit; transition: all 0.15s; white-space: nowrap;
}
.doc-dl-btn.pdf-btn { border-color: rgba(99,102,241,0.3); color: var(--cyan); }
.doc-dl-btn.pdf-btn:hover { background: var(--cyan-dim); }
.doc-dl-btn.pptx-btn { border-color: rgba(245,158,11,0.3); color: var(--amber); }
.doc-dl-btn.pptx-btn:hover { background: var(--amber-dim); }
.doc-dl-btn.close-btn { border-color: rgba(239,68,68,0.3); color: var(--rose); }
.doc-dl-btn.close-btn:hover { background: var(--rose-dim); }

.doc-editor-body {
  flex: 1; overflow-y: auto; padding: 28px 32px;
  background: #fff; color: #1a1a1a;
  font-family: "Noto Sans SC", sans-serif; font-size: 15px;
  line-height: 1.8; outline: none;
}
.doc-editor-body h1 { font-size: 1.8em; margin: 0.6em 0 0.3em; color: #111; }
.doc-editor-body h2 { font-size: 1.4em; margin: 0.5em 0 0.25em; color: #222; }
.doc-editor-body h3 { font-size: 1.15em; margin: 0.4em 0 0.2em; color: #333; }
.doc-editor-body p { margin: 0.4em 0; }
.doc-editor-body ul, .doc-editor-body ol { padding-left: 1.5em; margin: 0.4em 0; }
.doc-editor-body img { max-width: 100%; border-radius: 6px; margin: 8px 0; }


/* ═══════════════════════════════════════════════════
   MESSAGE ACTION BUTTONS
   ═══════════════════════════════════════════════════ */
.msg-actions {
  display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap;
}
.msg-action-btn {
  padding: 5px 12px; border-radius: 999px; cursor: pointer;
  font-size: 0.75rem; font-family: inherit;
  border: 1px solid var(--panel-border);
  background: var(--bg);
  color: var(--muted); transition: all 0.15s;
}
.msg-action-btn:hover { color: var(--cyan); border-color: var(--cyan); background: var(--cyan-dim); }
.msg-action-btn.act-edit { border-color: rgba(99,102,241,0.3); color: var(--cyan); }
.msg-action-btn.act-pdf { border-color: rgba(34,197,94,0.3); color: var(--lime); }
.msg-action-btn.act-pptx { border-color: rgba(245,158,11,0.3); color: var(--amber); }
.msg-action-btn.act-copy { border-color: var(--panel-border); }


/* ═══════════════════════════════════════════════════
   MOBILE BOTTOM NAV
   ═══════════════════════════════════════════════════ */
.mobile-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 60; height: 56px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--panel-border);
  justify-content: space-around; align-items: center;
  padding: 0 4px;
}
.mobile-nav .mob-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 8px; border: 0; background: transparent;
  color: var(--muted); cursor: pointer; font-size: 0.62rem;
  font-family: inherit; transition: color 0.15s;
}
.mobile-nav .mob-btn.active { color: var(--cyan); }
.mobile-nav .mob-btn svg { flex-shrink: 0; }

@media (max-width: 768px) {
  .mobile-nav { display: flex; }
  /* Offset content for bottom nav */
  .view-home, .view-dashboard, .view-models { padding-bottom: 64px; }
  .chat-layout { height: calc(100vh - 48px - 56px); }
}

@media (max-width: 480px) {
  .mobile-nav { height: 50px; }
  .mobile-nav .mob-btn { font-size: 0.58rem; padding: 4px 6px; }
  .chat-layout { height: calc(100vh - 48px - 50px); }
}
