/* ═══════════════════════════════════════════════════════════
   MrBox24 CMS — Mobile Demo
   Zaprojektowane wyłącznie dla smartfonów (mobile-first, brak media query)
   ═══════════════════════════════════════════════════════════ */

/* ── Reset & Custom Properties ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent:      #7c3aed;
  --accent-soft: #ede9fe;
  --accent-dark: #5b21b6;
  --green:       #16a34a;
  --green-soft:  #dcfce7;
  --red:         #dc2626;
  --red-soft:    #fee2e2;
  --amber:       #d97706;
  --amber-soft:  #fef3c7;

  --bg:          #f1f5f9;
  --surface:     #ffffff;
  --surface2:    #f8fafc;
  --border:      #e2e8f0;
  --text:        #0f172a;
  --text-2:      #334155;
  --text-muted:  #64748b;

  --header-h:    54px;
  --nav-h:       66px;
  --radius:      14px;
  --radius-sm:   8px;
  --shadow:      0 2px 8px rgba(0,0,0,.08);
  --shadow-md:   0 4px 20px rgba(0,0,0,.12);
}

html { height: 100%; }

body {
  height: 100%;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* ── App Shell ──────────────────────────────────────────────── */
.app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

/* ── Header ─────────────────────────────────────────────────── */
.app-header {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
  position: relative;
  z-index: 100;
  box-shadow: var(--shadow);
}

.app-header-left { display: flex; align-items: center; gap: 8px; }

.app-logo {
  font-size: 17px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.3px;
}

.app-badge {
  font-size: 10px;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 2px 7px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.app-header-right { display: flex; align-items: center; gap: 6px; }

.header-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: background .2s;
}
.header-avatar.logged-in { background: var(--green-soft); color: var(--green); }
.header-avatar:active { background: var(--border); }

/* ── Main Content ───────────────────────────────────────────── */
.app-main {
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* ── Tab Panels ─────────────────────────────────────────────── */
.tab-panel {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  background: var(--bg);
  padding-bottom: 16px;
}

/* ── Panel Sub-header ───────────────────────────────────────── */
.panel-subheader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.panel-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-title i { color: var(--accent); font-size: 17px; }

/* ── Sub-tabs ───────────────────────────────────────────────── */
.sub-tabs {
  display: flex;
  gap: 6px;
  padding: 0 16px 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.sub-tabs::-webkit-scrollbar { display: none; }

.sub-tab {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.sub-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 0 16px 12px;
  overflow: hidden;
}

.card-body { padding: 14px; }

.card-thumb {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: var(--bg);
  display: block;
}

.card-thumb-placeholder {
  width: 100%;
  height: 140px;
  background: linear-gradient(135deg, var(--accent-soft), var(--border));
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  font-size: 28px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
}

.card-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.card-actions {
  display: flex;
  gap: 8px;
}

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.badge-green { background: var(--green-soft); color: #166534; }
.badge-muted { background: var(--surface2); color: var(--text-muted); }
.badge-red   { background: var(--red-soft); color: #991b1b; }
.badge-blue  { background: #dbeafe; color: #1d4ed8; }

/* ── Buttons ─────────────────────────────────────────────────── */
button, a { font-family: inherit; cursor: pointer; }

.btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  transition: background .2s, transform .1s;
}
.btn-primary:active { background: var(--accent-dark); transform: scale(.98); }

.btn-danger {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  transition: background .2s;
}

.btn-outline {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  transition: all .2s;
  text-decoration: none;
}
.btn-outline:active { background: var(--accent-soft); }

.btn-ghost {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  transition: all .2s;
  text-decoration: none;
}
.btn-ghost:active { background: var(--bg); }

.btn-accent {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
}

.btn-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: var(--text);
  font-size: 18px;
  transition: background .2s;
}
.btn-icon:active { background: var(--bg); }

.btn-sm {
  padding: 8px 14px !important;
  font-size: 12px !important;
}

.btn-xs {
  padding: 6px 10px !important;
  font-size: 11px !important;
}

.btn-full { width: 100%; }

/* ── Bottom Navigation ──────────────────────────────────────── */
.bottom-nav {
  height: var(--nav-h);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  flex-shrink: 0;
  box-shadow: 0 -2px 8px rgba(0,0,0,.06);
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 4px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  transition: color .2s;
  position: relative;
}
.nav-btn i { font-size: 20px; }
.nav-btn.active { color: var(--accent); }
.nav-btn.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%; transform: translateX(-50%);
  width: 24px; height: 3px;
  background: var(--accent);
  border-radius: 0 0 3px 3px;
}
.nav-btn:active { opacity: .7; }

/* ── FAB ─────────────────────────────────────────────────────── */
.fab {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 22px;
  box-shadow: 0 4px 16px rgba(124,58,237,.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 50;
  transition: transform .2s, box-shadow .2s;
}
.fab:active { transform: scale(.93); box-shadow: 0 2px 8px rgba(124,58,237,.3); }

/* ── Login Gate ─────────────────────────────────────────────── */
.login-gate {
  margin: 40px 24px 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.gate-icon { font-size: 40px; color: var(--border); }
.gate-text { font-size: 15px; color: var(--text-muted); }

/* ── Overlay & Bottom Sheet ─────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 200;
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.overlay.show { opacity: 1; pointer-events: all; }

.bottom-sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  padding: 12px 20px 32px;
  z-index: 201;
  box-shadow: 0 -8px 40px rgba(0,0,0,.18);
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  max-height: 90dvh;
  overflow-y: auto;
}
.bottom-sheet.show { transform: translateY(0); }

.sheet-handle {
  width: 36px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 16px;
}

.sheet-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

.sheet-hint {
  font-size: 13px;
  color: var(--text-muted);
  background: var(--surface2);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

/* ── Full Screen Panel ──────────────────────────────────────── */
.full-screen-panel {
  position: fixed;
  inset: 0;
  background: var(--surface);
  z-index: 300;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.full-screen-panel.show { transform: translateX(0); }

.full-panel-header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px 0 8px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}

.full-panel-title {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.full-panel-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── Forms ──────────────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  transition: border-color .2s;
  outline: none;
  -webkit-appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
}

.form-textarea { resize: vertical; min-height: 70px; }

.form-color {
  width: 100%;
  height: 44px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  background: var(--surface);
  cursor: pointer;
  outline: none;
}

/* ── Accordion ──────────────────────────────────────────────── */
.accordion { padding: 0 16px; }

.accordion-item {
  background: var(--surface);
  border-radius: var(--radius);
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 16px;
  border: none;
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  gap: 10px;
}
.accordion-header span { display: flex; align-items: center; gap: 10px; }
.accordion-header i:first-child { color: var(--accent); font-size: 16px; }
.accordion-icon { color: var(--text-muted); transition: transform .25s; font-size: 13px; }
.accordion-icon.open { transform: rotate(180deg); }

.accordion-body {
  padding: 0 16px 16px;
  border-top: 1px solid var(--border);
}
.accordion-body.open { display: block; }

/* ── Section List ───────────────────────────────────────────── */
.section-item {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 0 16px 10px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: box-shadow .2s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}
.section-item:active { transform: scale(.98); box-shadow: var(--shadow-md); }
.section-item.hidden-section { opacity: .45; }

.section-icon {
  width: 42px; height: 42px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.section-info { flex: 1; min-width: 0; }
.section-name { font-size: 14px; font-weight: 700; color: var(--text); }
.section-desc { font-size: 12px; color: var(--text-muted); }

.section-vis-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--green-soft);
  color: #166534;
  flex-shrink: 0;
}
.section-vis-badge.hidden { background: var(--bg); color: var(--text-muted); }

/* ── Blog Post Cards ─────────────────────────────────────────── */
.post-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 0 16px 12px;
  overflow: hidden;
}

.post-card-cover {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}
.post-card-cover-placeholder {
  width: 100%;
  height: 130px;
  background: linear-gradient(135deg, #ede9fe, #dbeafe);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
}

.post-card-body { padding: 12px; }

.post-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.3;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.cat-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.cat-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
}

.post-card-actions { display: flex; gap: 8px; }

/* ── Category List ───────────────────────────────────────────── */
.cat-item {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 0 16px 10px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.cat-item-left { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.cat-color-dot { width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; }
.cat-name { font-size: 14px; font-weight: 700; }
.cat-desc { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ── Media Grid ──────────────────────────────────────────────── */
.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 0 16px;
}
.media-item {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 6px;
  cursor: pointer;
  background: var(--bg);
}
.media-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .2s;
}
.media-item:active img { transform: scale(1.05); }

.media-actions { padding: 0 16px 12px; }

/* ── AI Tools Grid ───────────────────────────────────────────── */
.ai-tools-intro { padding: 0 16px 12px; }

.ai-tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px;
}

.ai-tool-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .15s, box-shadow .2s;
  border: 1.5px solid transparent;
  text-align: center;
}
.ai-tool-card:active {
  transform: scale(.96);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.ai-tool-icon {
  width: 48px; height: 48px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin: 0 auto 10px;
}

.ai-tool-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 4px;
}

.ai-tool-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ── Chat Panel ──────────────────────────────────────────────── */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-welcome {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  color: var(--text-muted);
  padding: 40px 24px;
}
.chat-welcome-icon { font-size: 48px; color: var(--border); }

.msg {
  display: flex;
  flex-direction: column;
  max-width: 85%;
}
.msg-user { align-self: flex-end; align-items: flex-end; }
.msg-ai   { align-self: flex-start; align-items: flex-start; }

.msg-bubble {
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}
.msg-user .msg-bubble {
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.msg-ai .msg-bubble {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.msg-bubble p { margin-bottom: 6px; }
.msg-bubble p:last-child { margin-bottom: 0; }
.msg-bubble strong { font-weight: 700; }

.msg-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 3px;
  padding: 0 4px;
}

.msg-demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  padding: 4px 9px;
  border-radius: 5px;
  margin-bottom: 5px;
  line-height: 1.4;
  max-width: 85vw;
  white-space: normal;
}
.msg-demo-badge i { font-size: 10px; flex-shrink: 0; margin-top: 1px; }

.msg-typing {
  display: flex; gap: 4px; align-items: center;
  padding: 12px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 18px 18px 18px 4px;
  width: fit-content;
}
.msg-typing span {
  width: 7px; height: 7px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typing-dot .9s infinite;
}
.msg-typing span:nth-child(2) { animation-delay: .2s; }
.msg-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes typing-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: .5; }
  30% { transform: translateY(-5px); opacity: 1; }
}

.chat-input-bar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding-bottom: max(10px, env(safe-area-inset-bottom));
}

.chat-textarea {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 22px;
  background: var(--surface2);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  resize: none;
  overflow: hidden;
  max-height: 120px;
  line-height: 1.5;
  transition: border-color .2s;
}
.chat-textarea:focus { border-color: var(--accent); }

.btn-send {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  transition: background .2s, transform .1s;
}
.btn-send:active { background: var(--accent-dark); transform: scale(.93); }

.model-select {
  padding: 6px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface2);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  outline: none;
  max-width: 100px;
  -webkit-appearance: none;
}

/* ── Lena Tab ─────────────────────────────────────────────────── */
.lena-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px 16px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-value { font-size: 26px; font-weight: 800; color: var(--accent); }
.stat-label { font-size: 11px; color: var(--text-muted); font-weight: 600; margin-top: 3px; }

.lena-features {
  background: var(--surface);
  border-radius: var(--radius);
  margin: 0 16px 16px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.feature-item:last-child { border-bottom: none; padding-bottom: 0; }
.feature-icon {
  width: 36px; height: 36px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.feature-info { flex: 1; }
.feature-name { font-size: 13px; font-weight: 700; }
.feature-desc { font-size: 12px; color: var(--text-muted); margin-top: 1px; }

.lena-actions { padding: 0 16px; display: flex; flex-direction: column; gap: 10px; }

/* ── Settings ─────────────────────────────────────────────────── */
.settings-logout {
  padding: 16px 0;
}

.page-item, .menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.page-item:last-of-type, .menu-item:last-of-type { border-bottom: none; }

.page-name, .menu-label { font-size: 14px; font-weight: 600; flex: 1; min-width: 0; }
.page-slug, .menu-url { font-size: 11px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-actions { display: flex; gap: 5px; flex-shrink: 0; }

/* ── Blog Editor — zakładki (widok mobile) ───────────────────── */
.editor-tabs {
  display: flex;
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  flex-shrink: 0;
}

.editor-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 8px;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.editor-tab i { font-size: 13px; }
.editor-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.editor-tab-panel {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
}

.editor-settings-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ── Blog Editor ─────────────────────────────────────────────── */
.blog-title-input {
  width: 100%;
  border: none;
  border-bottom: 2px solid var(--border);
  padding: 16px;
  font-family: inherit;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  background: transparent;
  outline: none;
  transition: border-color .2s;
}
.blog-title-input:focus { border-bottom-color: var(--accent); }

.blog-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 5;
}
.blog-toolbar::-webkit-scrollbar { display: none; }

.tool-btn {
  min-width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  cursor: pointer;
  transition: background .15s;
  padding: 0 8px;
}
.tool-btn:active { background: var(--border); }

.tool-sep {
  width: 1px; height: 22px;
  background: var(--border);
  flex-shrink: 0;
  margin: 0 3px;
}

.blog-content-editable {
  padding: 16px;
  min-height: 200px;
  outline: none;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-2);
}
.blog-content-editable h2 { font-size: 20px; margin: 1em 0 .4em; color: var(--text); }
.blog-content-editable h3 { font-size: 17px; margin: 1em 0 .4em; color: var(--text); }
.blog-content-editable p { margin-bottom: .7em; }
.blog-content-editable ul { padding-left: 20px; }
.blog-content-editable img { max-width: 100%; border-radius: 10px; margin: 10px 0; }
.blog-content-editable:empty::before {
  content: 'Zacznij pisać treść artykułu...';
  color: var(--text-muted);
  pointer-events: none;
}

.blog-meta-toggle-wrap {
  padding: 0 16px;
  border-top: 1px solid var(--border);
  margin-top: 10px;
}

.blog-meta-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  gap: 8px;
}
.blog-meta-toggle i:first-child { font-size: 16px; }
#blog-meta-chevron { transition: transform .25s; margin-left: auto; color: var(--text-muted); }
#blog-meta-chevron.open { transform: rotate(180deg); }

.blog-meta-section {
  padding: 0 16px 16px;
}

.cover-preview {
  width: 100%;
  aspect-ratio: 1.7;
  background: var(--bg);
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  background-size: cover;
  background-position: center;
  transition: border-color .2s;
}
.cover-preview i { font-size: 28px; }
.cover-preview:active { border-color: var(--accent); }

/* ── Section Sheet Actions ───────────────────────────────────── */
.sheet-section-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.sheet-action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  width: 100%;
  cursor: pointer;
  transition: background .15s;
}
.sheet-action-btn i { color: var(--accent); width: 18px; }
.sheet-action-btn:active { background: var(--surface2); }

.section-note {
  font-size: 13px;
  color: var(--text-muted);
  background: var(--surface2);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
  margin-bottom: 14px;
}
.section-note i { color: var(--amber); margin-top: 2px; flex-shrink: 0; }

/* ── Toast ───────────────────────────────────────────────────── */
.toast {
  position: fixed;
  top: calc(var(--header-h) + 10px);
  left: 50%; transform: translateX(-50%);
  background: #1e293b;
  color: #fff;
  padding: 11px 20px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  z-index: 9999;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
  max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; }
.toast.success { background: var(--green); }
.toast.error   { background: var(--red); }
.toast.info    { background: var(--accent); }

/* ── Utility ─────────────────────────────────────────────────── */
.hidden { display: none !important; }
.text-muted { color: var(--text-muted); font-size: 13px; }
.empty-state {
  text-align: center;
  padding: 40px 24px;
  color: var(--text-muted);
}
.empty-state i { font-size: 36px; margin-bottom: 10px; display: block; color: var(--border); }
.list-gap { display: flex; flex-direction: column; }

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

/* ── Loading skeleton ────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--bg) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: skeleton-wave 1.5s infinite;
  border-radius: 6px;
}
@keyframes skeleton-wave {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Demo Block Banner ───────────────────────────────────────── */
.demo-banner {
  background: linear-gradient(135deg, #fef3c7, #fff);
  border: 1.5px solid #fcd34d;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12px;
  color: #92400e;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 16px 12px;
}
.demo-banner i { color: #d97706; }
