/* ═══════════════════════════════════════════
   GlobalApp — Styles
   Warm beige aesthetic, Inter + Lora
═══════════════════════════════════════════ */

:root {
  --bg:      #f2f0eb;
  --surface: #ffffff;
  --border:  #e3e1dc;
  --border2: #ccc9c2;
  --text:    #1a1a1a;
  --muted:   #6b6860;
  --muted2:  #a09d96;
  --sidebar: 236px;
  --topbar:  52px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  height: 100vh;
  display: flex;
  overflow: hidden;
  font-size: 13px;
}

/* ══════════════════════
   SIDEBAR
══════════════════════ */
.sidebar {
  width: var(--sidebar);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--bg);
  transition: transform 0.2s ease, width 0.2s ease;
  overflow: hidden;
  z-index: 100;
}

.sidebar.collapsed {
  width: 0;
  border-right: none;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 15px 16px 12px;
  cursor: pointer;
  flex-shrink: 0;
}

.logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-word {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 20px;
  color: var(--text);
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.sidebar-nav {
  padding: 4px 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex-shrink: 0;
}

.sn-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
  transition: all 0.12s;
  border: none;
  background: none;
  font-family: 'Inter', sans-serif;
  width: 100%;
  text-align: left;
  white-space: nowrap;
}

.sn-btn:hover { background: rgba(0,0,0,0.05); color: var(--text); }
.sn-icon { font-size: 15px; opacity: 0.65; flex-shrink: 0; }

/* Sidebar history */
#sidebarHistory {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

#sidebarHistory::-webkit-scrollbar { width: 3px; }
#sidebarHistory::-webkit-scrollbar-thumb { background: #dedad4; border-radius: 4px; }

.sidebar-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted2);
  padding: 12px 18px 4px;
  letter-spacing: 0.2px;
}

.sidebar-hist {
  padding: 0 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.hist-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 7px;
  cursor: pointer;
  color: var(--muted);
  font-size: 12.5px;
  transition: all 0.12s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hist-item:hover { background: rgba(0,0,0,0.05); color: var(--text); }
.hist-item.active { background: rgba(0,0,0,0.07); color: var(--text); }
.hi-ico { font-size: 13px; flex-shrink: 0; opacity: 0.55; }
.hi-text { overflow: hidden; text-overflow: ellipsis; }

.sidebar-footer {
  margin-top: auto;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 14px;
  flex-shrink: 0;
}

.sf-lnk { font-size: 11px; color: var(--muted2); cursor: pointer; white-space: nowrap; }
.sf-lnk:hover { color: var(--muted); }

/* Sidebar mobile overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.25);
  z-index: 99;
}

/* ══════════════════════
   MAIN
══════════════════════ */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* ══════════════════════
   TOPBAR
══════════════════════ */
.topbar {
  height: var(--topbar);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 8px;
  flex-shrink: 0;
  position: relative;
  z-index: 50;
}

.tb-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: all 0.12s;
  flex-shrink: 0;
}

.tb-icon-btn:hover { background: rgba(0,0,0,0.06); color: var(--text); }

/* vs divider */
.tb-vs {
  font-size: 11px;
  color: var(--muted2);
  font-weight: 500;
  flex-shrink: 0;
  letter-spacing: 0.3px;
}

/* ── Mode selector ── */
.mode-wrap { position: relative; }

.mode-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid var(--border2);
  border-radius: 8px;
  background: none;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: background 0.12s;
  white-space: nowrap;
}

.mode-btn:hover { background: rgba(0,0,0,0.04); }
.mode-btn-ico { font-size: 14px; }
.mode-btn-caret { font-size: 10px; color: var(--muted2); transition: transform 0.15s; }
.mode-wrap.open .mode-btn-caret { transform: rotate(180deg); }
.mode-wrap.open .mode-btn { background: rgba(0,0,0,0.04); }

/* Mode dropdown */
.mode-dd {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 6px 22px rgba(0,0,0,0.10);
  min-width: 260px;
  overflow: hidden;
  z-index: 200;
}

.mode-wrap.open .mode-dd { display: block; }

.mode-opt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 16px;
  cursor: pointer;
  transition: background 0.12s;
  border-bottom: 1px solid #f4f2ee;
}

.mode-opt:last-child { border-bottom: none; }
.mode-opt:hover { background: #f7f5f1; }
.mode-opt.selected { background: #eeece8; }

.mo-ico { font-size: 18px; flex-shrink: 0; margin-top: 1px; opacity: 0.75; }
.mo-name { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.mo-sub  { font-size: 11.5px; color: var(--muted); line-height: 1.4; }

/* ── Model pills ── */
.model-pill-wrap { position: relative; }

.model-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border: 1px solid var(--border2);
  border-radius: 8px;
  background: none;
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: background 0.12s;
  white-space: nowrap;
  max-width: 200px;
}

.model-pill:hover { background: rgba(0,0,0,0.04); }
.mp-label { overflow: hidden; text-overflow: ellipsis; }
.mp-caret { font-size: 10px; color: var(--muted2); transition: transform 0.15s; flex-shrink: 0; }
.model-pill-wrap.open .mp-caret { transform: rotate(180deg); }

/* Model dropdown */
.model-dd {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 6px 22px rgba(0,0,0,0.10);
  width: 300px;
  z-index: 200;
  overflow: hidden;
}

.model-pill-wrap.open .model-dd { display: flex; flex-direction: column; max-height: 380px; }

.mdd-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-bottom: 1px solid #f0ede8;
  background: #fafaf8;
  flex-shrink: 0;
}

.mdd-search input {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--text);
}

.mdd-search input::placeholder { color: #c0bdb6; }
.mdd-si { color: #c0bdb6; font-size: 13px; }
.mdd-cnt { font-size: 10px; color: #c0bdb6; background: #eeece8; padding: 2px 6px; border-radius: 3px; white-space: nowrap; }

.mdd-list { overflow-y: auto; flex: 1; }
.mdd-list::-webkit-scrollbar { width: 4px; }
.mdd-list::-webkit-scrollbar-thumb { background: #dedad4; border-radius: 4px; }

.mdd-grp {
  padding: 8px 14px 3px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: #c0bdb6;
  border-top: 1px solid #f4f2ee;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mdd-grp:first-child { border-top: none; }
.mdd-grp-n { font-size: 10px; color: #ccc9c2; font-weight: 400; text-transform: none; letter-spacing: 0; }

.mdd-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.1s;
}

.mdd-item:hover { background: #f7f5f1; }
.mdd-item.sel { background: #eeece8; }
.mdd-item.hidden { display: none; }

.mdd-abbr {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #e8e5de;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9.5px;
  font-weight: 700;
  color: #777;
  flex-shrink: 0;
  letter-spacing: -0.3px;
}

.mdd-info { flex: 1; min-width: 0; }
.mdd-iname { font-size: 12.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mdd-isub  { font-size: 10.5px; color: var(--muted2); margin-top: 1px; }
.mdd-right { display: flex; align-items: center; gap: 5px; margin-left: auto; flex-shrink: 0; }

.mdd-tag {
  font-size: 9px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 3px;
  background: #eeece8;
  color: #888;
  border: 1px solid #dedad4;
}

.mdd-tag.free { background: #eefaf2; color: #4a9; border-color: #c2e8d4; }
.mdd-tag.top  { background: #fff0e8; color: #c06020; border-color: #f0d0b8; }
.mdd-tag.new  { background: #eef3fa; color: #4070c0; border-color: #c0d4f0; }

.mdd-price { font-size: 10.5px; color: var(--muted2); }
.mdd-chk   { font-size: 11px; font-weight: 700; color: var(--text); }

/* ── Topbar right ── */
.tb-spacer { flex: 1; }

/* ── 3-dot dropdown (Arena.ai style) ── */
.dots-wrap { position: relative; }

.tb-dots {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: all 0.12s;
}

.tb-dots:hover { background: rgba(0,0,0,0.06); color: var(--text); }
.dots-wrap.open .tb-dots { background: rgba(0,0,0,0.06); color: var(--text); }

.dots-dd {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 6px 22px rgba(0,0,0,0.10);
  min-width: 200px;
  overflow: hidden;
  z-index: 200;
  padding: 5px;
}

.dots-wrap.open .dots-dd { display: block; }

.dots-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  transition: background 0.1s;
}

.dots-item:hover { background: #f7f5f1; }

.dots-item-ico {
  color: var(--muted2);
  flex-shrink: 0;
}

.dots-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.dots-item-danger { color: #c0392b; }
.dots-item-danger .dots-item-ico { color: #c0392b; }

.tb-login {
  background: var(--text);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.12s;
  white-space: nowrap;
}

.tb-login:hover { background: #333; }
.tb-login.logged-in { background: none; color: var(--muted); border: 1px solid var(--border2); }
.tb-login.logged-in:hover { background: rgba(0,0,0,0.04); color: var(--text); }

/* ══════════════════════
   CONTENT AREA
══════════════════════ */
.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

/* ══════════════════════
   PANELS ZONE
══════════════════════ */
.panels-zone {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.top-panels {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-height: 0;
}

/* Judge zone */
.judge-zone {
  display: none;
  border-top: 1px solid var(--border);
  height: 36%;
  flex-shrink: 0;
}

.judge-zone.show { display: flex; }

/* ══════════════════════
   INDIVIDUAL PANEL
══════════════════════ */
.panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  overflow: hidden;
  min-width: 0;
  background: var(--bg);
  transition: flex 0.2s ease;
}

.panel:last-child { border-right: none; }
.panel.hidden { display: none; }

/* Panel topbar */
.panel-topbar {
  display: flex;
  align-items: center;
  padding: 10px 16px 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
  gap: 8px;
}

.pt-model-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pt-actions { display: flex; align-items: center; gap: 2px; }

.pt-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted2);
  font-size: 14px;
  transition: all 0.12s;
}

.pt-btn:hover { background: rgba(0,0,0,0.06); color: var(--text); }
.pt-btn:disabled { opacity: 0.3; cursor: default; }

/* Panel body */
.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  font-size: 13.5px;
  line-height: 1.72;
  color: #3a3835;
}

.panel-body::-webkit-scrollbar { width: 4px; }
.panel-body::-webkit-scrollbar-thumb { background: #dedad4; border-radius: 3px; }

/* Panel empty state */
.panel-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted2);
  font-size: 12.5px;
}

.panel-empty-ico { font-size: 28px; opacity: 0.35; }

/* Thinking indicator */
.pb-thinking {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted2);
  margin-bottom: 14px;
}

.pb-thinking-dots span {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted2);
  margin: 0 1px;
  animation: blink 1.2s infinite;
}

.pb-thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.pb-thinking-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
  0%, 80%, 100% { opacity: 0.2; }
  40% { opacity: 1; }
}

/* Streaming cursor */
.stream-cursor {
  display: inline-block;
  width: 2px;
  height: 14px;
  background: var(--text);
  margin-left: 2px;
  vertical-align: middle;
  animation: cursor-blink 0.8s infinite;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Response content */
.resp p { margin-bottom: 11px; }
.resp p:last-child { margin-bottom: 0; }
.resp strong { font-weight: 600; color: var(--text); }
.resp em { font-style: italic; }
.resp code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  background: rgba(0,0,0,0.05);
  padding: 1px 5px;
  border-radius: 4px;
  color: #444;
}

.resp pre {
  background: rgba(0,0,0,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  overflow-x: auto;
  margin: 10px 0;
  font-size: 12px;
  line-height: 1.6;
}

.resp ul, .resp ol { padding-left: 0; margin: 8px 0; list-style: none; }
.resp ul li, .resp ol li { padding: 3px 0 3px 16px; position: relative; color: #444; line-height: 1.6; }
.resp ul li::before { content: '—'; position: absolute; left: 0; color: #c0bdb6; font-size: 12px; }
.resp ol { counter-reset: item; }
.resp ol li::before { counter-increment: item; content: counter(item) '.'; position: absolute; left: 0; color: #c0bdb6; font-size: 12px; }

.resp h1, .resp h2, .resp h3 { font-weight: 600; color: var(--text); margin: 14px 0 6px; }
.resp h1 { font-size: 16px; }
.resp h2 { font-size: 14.5px; }
.resp h3 { font-size: 13.5px; }

.resp .callout {
  background: rgba(0,0,0,0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  margin: 12px 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

/* Judge panel */
.judge-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  background: var(--bg);
}

.judge-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
}

.judge-badge {
  font-size: 10px;
  font-weight: 700;
  background: var(--text);
  color: #fff;
  padding: 3px 9px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.judge-title { font-size: 13px; font-weight: 600; color: var(--text); flex: 1; }
.judge-powered { font-size: 11px; color: var(--muted2); }

/* ══════════════════════
   SATISFIED BAR
══════════════════════ */
.satisfied-bar {
  display: none;
  justify-content: center;
  gap: 10px;
  padding: 0 0 14px 0;
  flex-shrink: 0;
}

.satisfied-bar.show { display: flex; }

.sat-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 24px;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid var(--border2);
  background: var(--surface);
  color: var(--text);
  white-space: nowrap;
  min-width: 180px;
  justify-content: center;
}

.sat-btn:hover { background: #eeece8; border-color: #b0ada6; }
.sat-ico { font-size: 14px; }

/* ══════════════════════
   PROMPT SECTION
══════════════════════ */
.prompt-section {
  background: var(--bg);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  padding: 14px 20px;
}

.prompt-hero {
  text-align: center;
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 28px;
  color: var(--text);
  margin-bottom: 14px;
  letter-spacing: -0.3px;
  opacity: 0.85;
}

/* Hide hero when there's content in panels */
.has-content .prompt-hero { display: none; }

.prompt-box {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 14px;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: border-color 0.15s;
  max-width: 800px;
  margin: 0 auto 10px;
}

.prompt-box:focus-within { border-color: #b0ada6; }

.prompt-box input {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text);
}

.prompt-box input::placeholder { color: #c0bdb6; }
.prompt-box input:disabled { opacity: 0.5; }

/* Prompt toolbar */
.prompt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 800px;
  margin: 0 auto;
}

.ptb-left { display: flex; align-items: center; gap: 4px; }

/* Base toolbar button */
.ptb-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 12.5px;
  padding: 6px 10px;
  border-radius: 7px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.12s;
  white-space: nowrap;
}

.ptb-btn:hover { background: rgba(0,0,0,0.05); color: var(--text); }
.ptb-btn svg { flex-shrink: 0; }

/* Add files — slightly bordered, Arena.ai style */
.ptb-attach {
  border: 1px solid var(--border2);
  background: var(--surface);
  color: var(--muted);
  padding: 5px 10px;
}

.ptb-attach:hover { background: #f0ede8; border-color: #b8b4ac; color: var(--text); }

/* Divider between attach and feature buttons */
.ptb-divider {
  width: 1px;
  height: 20px;
  background: var(--border2);
  margin: 0 2px;
  flex-shrink: 0;
}

/* PPT / Video feature buttons */
.ptb-feature {
  color: var(--muted);
  gap: 5px;
}

.ptb-feature:hover { background: rgba(0,0,0,0.05); color: var(--text); }

/* PRO badge inside toolbar button */
.ptb-pro {
  font-size: 8.5px;
  font-weight: 700;
  background: var(--text);
  color: #fff;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.3px;
  margin-left: 2px;
}

.ptb-right { display: flex; align-items: center; gap: 8px; }

.ptb-layout-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--border2);
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted2);
  transition: all 0.12s;
}

.ptb-layout-icon:hover { background: rgba(0,0,0,0.04); color: var(--text); }

.ptb-send {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--text);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.12s;
}

.ptb-send:hover { background: #333; }
.ptb-send:disabled { background: #ccc9c2; cursor: default; }

/* Stop button (during streaming) */
.ptb-send.stop { background: #c0392b; }
.ptb-send.stop:hover { background: #a93226; }

/* ══════════════════════
   BOTTOM NOTE
══════════════════════ */
.bottom-note {
  text-align: center;
  font-size: 11px;
  color: var(--muted2);
  padding: 6px 0 4px;
}

/* ══════════════════════
   DOWNLOAD OVERLAY
══════════════════════ */
.dl-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.30);
  z-index: 500;
  align-items: center;
  justify-content: center;
}

.dl-overlay.show { display: flex; }

.dl-modal {
  background: var(--surface);
  border-radius: 16px;
  padding: 24px;
  width: 310px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.18);
}

.dl-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; color: var(--text); }
.dl-sub   { font-size: 12px; color: #999; margin-bottom: 18px; }

.dl-options { display: flex; flex-direction: column; gap: 8px; }

.dl-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.12s;
}

.dl-opt:hover { background: #f7f5f1; }

.dl-opt-ico {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.dl-opt-name { font-size: 13px; font-weight: 500; color: var(--text); }
.dl-opt-sub  { font-size: 11px; color: #aaa; margin-top: 1px; }

.dl-pro-badge {
  font-size: 9px;
  font-weight: 700;
  background: var(--text);
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  flex-shrink: 0;
}

.dl-cancel {
  width: 100%;
  margin-top: 14px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #888;
  transition: background 0.12s;
}

.dl-cancel:hover { background: #f7f5f1; }

/* ══════════════════════
   TOAST
══════════════════════ */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--text);
  color: #fff;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 600;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ══════════════════════
   RESPONSIVE — MOBILE
══════════════════════ */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    transform: translateX(-100%);
    width: var(--sidebar);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar.collapsed {
    width: var(--sidebar);
    transform: translateX(-100%);
  }

  .sidebar-overlay.show { display: block; }

  .top-panels { flex-direction: column; }

  .panel { min-height: 200px; border-right: none; border-bottom: 1px solid var(--border); }
  .panel:last-child { border-bottom: none; }

  .model-pill .mp-label { max-width: 80px; }

  .sat-btn { min-width: 140px; padding: 8px 16px; font-size: 12px; }

  .ptb-btn span:not(.ptb-ico) { display: none; }
}

@media (max-width: 480px) {
  .topbar { gap: 5px; padding: 0 10px; }
  .mode-btn { padding: 5px 8px; font-size: 12px; }
  .tb-login { padding: 6px 12px; font-size: 12px; }
}
