@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Syne:wght@700;800&display=swap');

:root {
  --bg: #0b1118;
  --bg-elevated: #121a24;
  --bg-card: rgba(18, 26, 36, 0.88);
  --bg-hover: #1a2533;
  --accent: #2dd4bf;
  --accent-deep: #14b8a6;
  --accent-soft: rgba(45, 212, 191, 0.14);
  --accent-glow: rgba(45, 212, 191, 0.28);
  --warm: #f0b429;
  --warm-soft: rgba(240, 180, 41, 0.14);
  --text: #eef3f7;
  --text-muted: #8b9aab;
  --success: #34d399;
  --danger: #fb7185;
  --border: rgba(148, 163, 184, 0.12);
  --radius: 18px;
  --radius-btn: 14px;
  --radius-squircle: 16px;
  --nav-bg: rgba(12, 18, 26, 0.42);
  --nav-border: rgba(148, 163, 184, 0.18);
  --nav-shadow: 0 10px 36px rgba(0, 0, 0, 0.28);
  --nav-active-bg: rgba(45, 212, 191, 0.18);
  --font-base: 15px;
  --font-ui: 'Manrope', system-ui, sans-serif;
  --font-display: 'Syne', 'Manrope', sans-serif;
  --shadow-card: 0 8px 28px rgba(0, 0, 0, 0.22);
}

body.light-theme {
  --bg: #f3f6f8;
  --bg-elevated: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-hover: #e8eef3;
  --accent: #0f9f8c;
  --accent-deep: #0d8a7a;
  --accent-soft: rgba(15, 159, 140, 0.12);
  --accent-glow: rgba(15, 159, 140, 0.2);
  --warm: #d97706;
  --warm-soft: rgba(217, 119, 6, 0.12);
  --text: #12202c;
  --text-muted: #5b6b7c;
  --success: #059669;
  --danger: #e11d48;
  --border: rgba(18, 32, 44, 0.1);
  --nav-bg: rgba(255, 255, 255, 0.48);
  --nav-border: rgba(18, 32, 44, 0.12);
  --nav-shadow: 0 10px 28px rgba(18, 32, 44, 0.08);
  --nav-active-bg: rgba(15, 159, 140, 0.16);
  --shadow-card: 0 6px 20px rgba(18, 32, 44, 0.06);
}

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

button, .chip, .topic-chip, .style-chip, .channel-item, .nav-btn {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  font-size: var(--font-base);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 420px at 10% -10%, rgba(45, 212, 191, 0.16), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(56, 120, 255, 0.1), transparent 50%),
    radial-gradient(600px 400px at 50% 100%, rgba(240, 180, 41, 0.06), transparent 55%);
}

body.light-theme::before {
  background:
    radial-gradient(900px 420px at 10% -10%, rgba(15, 159, 140, 0.12), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(56, 120, 255, 0.08), transparent 50%),
    radial-gradient(600px 400px at 50% 100%, rgba(217, 119, 6, 0.06), transparent 55%);
}

#app {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: 118px;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 10px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle,
.header-icon-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
}

.theme-toggle:active,
.header-icon-btn:active {
  transform: scale(0.94);
}

.header-admin-ico {
  width: 20px;
  height: 20px;
  display: block;
  background: currentColor;
  opacity: 0.9;
  -webkit-mask: url('/static/icons/admin.png') center / contain no-repeat;
  mask: url('/static/icons/admin.png') center / contain no-repeat;
}

.header-icon-btn.active {
  color: var(--accent);
  border-color: rgba(45, 212, 191, 0.45);
  background: var(--accent-soft);
}

.logo {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.04em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark, .mini-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--accent), #38bdf8);
  color: #06201c;
  font-family: var(--font-display);
  font-weight: 800;
}

.brand-mark {
  width: 34px;
  height: 34px;
  font-size: 17px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 6px 18px var(--accent-glow);
  object-fit: cover;
  padding: 0;
  background: transparent;
  border-radius: 50%;
}

.mini-icon {
  width: 28px;
  height: 28px;
  font-size: 11px;
  flex-shrink: 0;
}

.badge {
  background: linear-gradient(135deg, var(--warm), #f59e0b);
  color: #1a1305;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* Page intro */
.page-intro {
  padding: 4px 4px 14px;
  animation: riseIn 0.45s ease both;
}

.page-intro .eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.page-intro h1 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 6px;
}

.page-intro p {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 34ch;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 2px 10px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-head span {
  font-size: 12px;
  color: var(--text-muted);
}

/* Loader */
.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 16px;
  color: var(--text-muted);
}

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

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

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

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

.content {
  padding: 0 16px 16px;
}

.tab {
  display: none;
  animation: fadeIn 0.32s ease;
}

.tab.active {
  display: block;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-card);
}

.card h3 {
  font-family: var(--font-display);
  font-size: 16px;
  margin-bottom: 8px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.panel-studio {
  border-color: rgba(45, 212, 191, 0.28);
  background:
    linear-gradient(160deg, rgba(45, 212, 191, 0.1), transparent 42%),
    var(--bg-card);
  animation: riseIn 0.5s ease 0.05s both;
}

.panel-studio .hint-text {
  margin-bottom: 14px;
}

.stats-card {
  display: flex;
  justify-content: space-around;
  text-align: center;
  padding: 14px 10px;
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.1), rgba(56, 189, 248, 0.06));
  border-color: rgba(45, 212, 191, 0.2);
}

.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.banner {
  background: linear-gradient(135deg, var(--warm-soft), rgba(245, 158, 11, 0.06));
  border-color: rgba(240, 180, 41, 0.28);
}

.banner p, .hint p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 14px;
}

.hint {
  border-color: rgba(45, 212, 191, 0.25);
  background: var(--accent-soft);
}

/* Buttons */
.btn {
  border: none;
  border-radius: var(--radius-btn);
  padding: 13px 18px;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:active {
  transform: scale(0.97);
  opacity: 0.94;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #06201c;
  box-shadow: 0 8px 22px var(--accent-glow);
}

.btn-secondary {
  background: var(--bg-hover);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-full {
  width: 100%;
  margin-top: 8px;
}

/* Channels */
.channel-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}

.channel-item:active {
  transform: scale(0.98);
}

.channel-item:active, .channel-item.selected {
  border-color: var(--accent);
  background: var(--bg-hover);
}

.channel-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-squircle);
  background: linear-gradient(145deg, var(--accent), #38bdf8);
  color: #06201c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  flex-shrink: 0;
}

.channel-info h4 {
  font-size: 15px;
  margin-bottom: 3px;
  font-weight: 700;
}

.channel-info p {
  font-size: 12px;
  color: var(--text-muted);
}

.channel-status {
  margin-left: auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--danger);
}

.channel-status.active {
  background: var(--success);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.55);
}

/* Chips / topics */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 8px 13px;
  border-radius: 999px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  color: var(--text-muted);
}

.chip:active {
  transform: scale(0.96);
}

.chip.selected {
  background: var(--accent-soft);
  border-color: rgba(45, 212, 191, 0.45);
  color: var(--accent);
}

.topic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.topic-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-squircle);
  background: var(--bg-hover);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.topic-chip:active {
  transform: scale(0.97);
}

.topic-chip.selected {
  background: var(--accent-soft);
  border-color: rgba(45, 212, 191, 0.45);
}

.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.suggestion {
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(45, 212, 191, 0.22);
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

/* Toggles */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  gap: 12px;
  font-weight: 600;
  font-size: 14px;
}

.toggle {
  appearance: none;
  width: 48px;
  height: 28px;
  background: var(--bg-hover);
  border-radius: 14px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

.toggle:checked {
  background: var(--accent);
}

.toggle::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  background: white;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.2s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.toggle:checked::after {
  transform: translateX(20px);
}

.hint-text {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.45;
}

.empty-state {
  text-align: center;
  padding: 28px 20px;
  color: var(--text-muted);
}

.empty-state.card {
  text-align: left;
}

/* Bottom nav — glass, home centered & larger */
.bottom-nav {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 20px);
  max-width: 440px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  background: var(--nav-bg);
  backdrop-filter: blur(28px) saturate(1.35);
  -webkit-backdrop-filter: blur(28px) saturate(1.35);
  border: 1px solid var(--nav-border);
  border-radius: 28px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  z-index: 100;
  box-shadow: var(--nav-shadow);
}

.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  padding: 8px 2px 6px;
  border-radius: 16px;
  cursor: pointer;
  min-height: 56px;
  transition: transform 0.15s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nav-btn .nav-ico {
  width: 24px;
  height: 24px;
  display: block;
  background: currentColor;
  opacity: 0.88;
  -webkit-mask: var(--nav-icon) center / contain no-repeat;
  mask: var(--nav-icon) center / contain no-repeat;
}

.nav-btn[data-tab="dashboard"] { --nav-icon: url('/static/icons/home.png'); }
.nav-btn[data-tab="channels"] { --nav-icon: url('/static/icons/channels.png'); }
.nav-btn[data-tab="settings"] { --nav-icon: url('/static/icons/settings.png'); }
.nav-btn[data-tab="history"] { --nav-icon: url('/static/icons/history.png'); }
.nav-btn[data-tab="payment"] { --nav-icon: url('/static/icons/payment.png'); }

.nav-btn-home {
  flex: 1.35;
  min-height: 72px;
  margin-top: -18px;
  padding: 14px 6px 10px;
  border-radius: 22px;
  font-size: 12px;
  color: var(--accent);
  background: linear-gradient(180deg, rgba(45, 212, 191, 0.22), rgba(45, 212, 191, 0.08));
  border: 1px solid rgba(45, 212, 191, 0.35);
  box-shadow: 0 10px 24px rgba(13, 148, 136, 0.22);
}

.nav-btn-home .nav-ico {
  width: 34px;
  height: 34px;
  opacity: 1;
}

.nav-btn-home.active {
  color: #042f2e;
  background: linear-gradient(180deg, #2dd4bf, #14b8a6);
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(13, 148, 136, 0.35);
}

body.light-theme .nav-btn-home.active {
  color: #042f2e;
}

.nav-btn:active {
  transform: scale(0.95);
}

.nav-btn.active:not(.nav-btn-home) {
  color: var(--accent);
  background: var(--nav-active-bg);
}

.nav-btn.active .nav-ico {
  opacity: 1;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 108px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elevated);
  border: 1px solid rgba(45, 212, 191, 0.35);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  z-index: 200;
  box-shadow: var(--nav-shadow);
  animation: toastIn 0.28s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.hidden {
  display: none !important;
}

/* Preview */
.preview-card {
  border-color: rgba(45, 212, 191, 0.28);
}

.preview-card-inline {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  animation: riseIn 0.35s ease;
}

.preview-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  line-height: 1.45;
}

.preview-meta b {
  color: var(--text);
  font-size: 14px;
}

.preview-text {
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.preview-text a {
  color: var(--accent);
}

.preview-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.preview-media {
  margin-bottom: 12px;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  max-height: 320px;
}

.preview-media img,
.preview-media video {
  width: 100%;
  display: block;
  max-height: 320px;
  object-fit: contain;
}

.preview-media-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 4px;
}

.preview-media-actions .btn {
  flex: 1 1 140px;
}

/* Lists */
.trending-list,
.queue-list,
.history-list,
.analytics-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px;
  background: var(--bg-hover);
  border-radius: 12px;
  border: 1px solid transparent;
}

.trend-info { flex: 1; min-width: 0; }
.trend-info strong { display: block; font-size: 13px; margin-bottom: 2px; }
.trend-info span {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.trend-count {
  font-size: 12px;
  color: var(--accent);
  font-weight: 800;
  background: var(--accent-soft);
  padding: 4px 8px;
  border-radius: 8px;
}

.style-grid { display: flex; flex-direction: column; gap: 8px; }

.style-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-squircle);
  background: var(--bg-hover);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.style-chip:active { transform: scale(0.98); }
.style-chip.selected {
  border-color: rgba(45, 212, 191, 0.45);
  background: var(--accent-soft);
}
.style-chip .mini-icon { width: 34px; height: 34px; }
.style-chip strong { display: block; font-size: 14px; }
.style-chip small { font-size: 11px; color: var(--text-muted); }

.quiet-row {
  display: flex;
  gap: 16px;
  align-items: center;
}

.quiet-row select,
.select-input,
select {
  background: var(--bg-hover);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  font-family: var(--font-ui);
  font-size: 14px;
}

.select-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.select-row label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.text-input, .text-area, .input, .textarea {
  width: 100%;
  background: var(--bg-hover);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  font-family: var(--font-ui);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.text-input:focus, .text-area:focus, .input:focus, .textarea:focus {
  border-color: rgba(45, 212, 191, 0.45);
}

.text-area {
  min-height: 140px;
  resize: vertical;
  line-height: 1.5;
}

.text-area.compact { min-height: 100px; }

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--bg-hover);
  border-radius: 12px;
  padding: 4px;
  border: 1px solid var(--border);
}

.segment {
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 10px;
  padding: 10px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.segment.active {
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.history-item, .queue-item {
  padding: 12px;
  background: var(--bg-hover);
  border-radius: 14px;
  border: 1px solid var(--border);
}

.history-item strong, .queue-item strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.history-meta, .queue-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.queue-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.analytics-summary {
  display: flex;
  gap: 16px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.admin-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.admin-stat {
  background: var(--bg-hover);
  border-radius: 12px;
  padding: 12px;
  border: 1px solid var(--border);
}

.admin-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 20px;
  margin-bottom: 2px;
}

.admin-stat span {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.promo-status {
  font-size: 12px;
  font-weight: 600;
}
.promo-status--on { color: #3ecf8e; }
.promo-status--off { color: var(--text-muted); }

.admin-row {
  padding: 10px 12px;
  background: var(--bg-hover);
  border-radius: 12px;
  font-size: 13px;
  border: 1px solid var(--border);
}

.admin-search-row {
  display: flex;
  gap: 8px;
}

.admin-search-row .input {
  flex: 1;
}

.analytics-stat {
  display: inline-flex;
  gap: 6px;
  align-items: baseline;
  margin-right: 14px;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.analytics-stat strong {
  font-size: 18px;
  color: var(--text);
}
.bar-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.bar-row {
  display: grid;
  grid-template-columns: 72px 1fr 28px;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}
.bar-track {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-hover);
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0d9488, #14b8a6);
}
.mini-list { display: flex; flex-direction: column; gap: 8px; }
.mini-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(13, 148, 136, 0.15);
  color: #0f766e;
}
.mini-card {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-hover);
}

@media (max-width: 360px) {
  .page-intro h1 { font-size: 22px; }
  .nav-btn { font-size: 9px; min-height: 52px; }
  .nav-btn .nav-ico { width: 22px; height: 22px; }
  .nav-btn-home { min-height: 66px; margin-top: -14px; font-size: 11px; }
  .nav-btn-home .nav-ico { width: 30px; height: 30px; }
  .topic-grid { grid-template-columns: 1fr; }
}
