/* ============================================================
   Horizon Studio – Design System
   ============================================================ */

:root {
  --hz-bg:            #f4f7fa;
  --hz-bg-subtle:     #ffffff;
  --hz-bg-card:       #ffffff;
  --hz-primary:       #3b82f6;
  --hz-primary-light: #eff6ff;
  --hz-primary-hover: #1d4ed8;
  --hz-text:          #0f172a;
  --hz-text-muted:    #64748b;
  --hz-border:        rgba(226,232,240,0.8);
  --hz-radius-md:     16px;
  --hz-radius-lg:     24px;
  --hz-transition:    all 0.3s cubic-bezier(0.16,1,0.3,1);
  --hz-font:          'Plus Jakarta Sans', sans-serif;
  --hz-shadow-sm:     0 4px 12px rgba(15,23,42,0.03);
  --hz-shadow-md:     0 10px 30px -10px rgba(15,23,42,0.08), 0 1px 3px rgba(15,23,42,0.02);
  --hz-shadow-lg:     0 20px 40px -15px rgba(15,23,42,0.12), 0 4px 12px rgba(15,23,42,0.04);
  --hz-shadow-hover:  0 30px 60px -15px rgba(37,99,235,0.18), 0 10px 20px -10px rgba(15,23,42,0.05);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--hz-font);
  background-color: var(--hz-bg);
  color: var(--hz-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { text-decoration: none; color: inherit; }

i {
  margin-right: 0.5rem;
}
/* ── Buttons ── */
.hz-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.9rem 2.2rem; font-size: 0.95rem; font-weight: 600;
  border-radius: var(--hz-radius-md); transition: var(--hz-transition);
  cursor: pointer; border: 1px solid transparent; font-family: var(--hz-font);
}
.hz-btn--primary {
  background: var(--hz-primary); color: #ffffff;
  box-shadow: 0 8px 20px -4px rgba(59,130,246,0.4);
}
.hz-btn--primary:hover {
  background: var(--hz-primary-hover); transform: translateY(-2px);
  box-shadow: 0 12px 28px -4px rgba(59,130,246,0.5);
}
.hz-btn--secondary {
  background: #ffffff; color: var(--hz-text);
  border-color: var(--hz-border); box-shadow: var(--hz-shadow-sm);
}
.hz-btn--secondary:hover { background: #f8fafc; transform: translateY(-2px); box-shadow: var(--hz-shadow-md); }
.hz-btn--danger { background: #ef4444; color: #fff; box-shadow: 0 4px 12px rgba(239,68,68,0.3); }
.hz-btn--danger:hover { background: #dc2626; transform: translateY(-1px); }
.hz-btn--ghost { background: none; border: none; color: var(--hz-text-muted); box-shadow: none; }
.hz-btn--ghost:hover { color: var(--hz-primary); }
.hz-btn--sm { padding: 0.5rem 1.1rem; font-size: 0.82rem; border-radius: 10px; }
.hz-btn--lg { padding: 1.1rem 3rem; font-size: 1.05rem; }
.hz-btn--block { width: 100%; }
.hz-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ── Header ── */
.hz-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.85); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--hz-border);
  box-shadow: 0 4px 30px rgba(15,23,242,0.02);
  flex-shrink: 0;
}
.hz-header__inner {
  max-width: 1200px; margin: 0 auto; padding: 1.2rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
}
.hz-logo {
  display: flex; align-items: center; gap: 0.6rem;
  font-weight: 800; font-size: 1.3rem; color: var(--hz-text); letter-spacing: -0.02em;
}
.hz-logo__icon { color: var(--hz-primary); font-size: 1.5rem; filter: drop-shadow(0 2px 8px rgba(59,130,246,0.4)); }
.hz-logo__text { color: var(--hz-text); }
.hz-nav { display: flex; align-items: center; gap: 1.5rem; }
.hz-nav__link { font-size: 0.95rem; font-weight: 500; color: var(--hz-text-muted); transition: var(--hz-transition); }
.hz-nav__link:hover { color: var(--hz-primary); }
.hz-nav__link--logout { color: #ef4444 !important; }
.hz-nav__btn {
  background: var(--hz-primary-light); color: var(--hz-primary);
  padding: 0.6rem 1.4rem; border-radius: 10px; font-weight: 600;
  box-shadow: 0 4px 12px rgba(59,130,246,0.1);
}
.hz-nav__btn:hover { background: var(--hz-primary); color: #ffffff; box-shadow: 0 6px 16px rgba(59,130,246,0.25); }

/* ── Hero ── */
.hz-hero {
  text-align: center; padding: 9rem 1.5rem 7rem;
  background: radial-gradient(100% 50% at 50% 0%, rgba(59,130,246,0.12) 0%, transparent 60%),
              radial-gradient(60% 40% at 80% 20%, rgba(59,130,246,0.05) 0%, transparent 50%);
}
.hz-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: #ffffff; color: var(--hz-primary);
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.5rem 1.2rem; border-radius: 99px; margin-bottom: 2rem;
  box-shadow: var(--hz-shadow-sm), inset 0 0 0 1px rgba(59,130,246,0.1);
}
.hz-hero__title {
  font-size: clamp(2.6rem, 6.5vw, 4.5rem); font-weight: 800; line-height: 1.15;
  margin-bottom: 1.5rem; letter-spacing: -0.03em; color: var(--hz-text);
}
.hz-hero__title em {
  font-style: normal;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hz-hero__sub { font-size: 1.25rem; color: var(--hz-text-muted); max-width: 640px; margin: 0 auto 3.5rem; line-height: 1.65; }
.hz-hero__actions { display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap; }

/* ── Section Labels ── */
.hz-section-label { text-align: center; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--hz-primary); margin-bottom: 0.8rem; }
.hz-section-title { text-align: center; font-size: clamp(2rem,4vw,2.6rem); font-weight: 800; margin-bottom: 0.8rem; letter-spacing: -0.02em; }
.hz-section-sub { text-align: center; color: var(--hz-text-muted); font-size: 1.1rem; margin-bottom: 5rem; }

/* ── Features ── */
.hz-features { max-width: 1240px; margin: 0 auto; padding: 6rem 1.5rem; }
.hz-features__grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(340px,1fr)); gap: 2rem; }
.hz-feature {
  background: var(--hz-bg-card); border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius-lg); padding: 2.5rem;
  box-shadow: var(--hz-shadow-md); transition: var(--hz-transition);
}
.hz-feature:hover { border-color: rgba(59,130,246,0.2); transform: translateY(-6px); box-shadow: var(--hz-shadow-hover); }
.hz-feature__icon {
  width: 52px; height: 52px; background: var(--hz-primary-light); color: var(--hz-primary);
  border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 1.8rem; box-shadow: 0 8px 16px -4px rgba(59,130,246,0.15);
}
.hz-feature__title { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.7rem; letter-spacing: -0.01em; }
.hz-feature__desc { font-size: 0.98rem; color: var(--hz-text-muted); line-height: 1.65; }

/* ── Steps ── */
.hz-steps {
  background: linear-gradient(180deg,#f4f7fa 0%,#ffffff 50%,#f4f7fa 100%);
  border-top: 1px solid var(--hz-border); border-bottom: 1px solid var(--hz-border);
  padding: 7rem 1.5rem;
}
.hz-steps__inner { max-width: 1100px; margin: 0 auto; }
.hz-steps__grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 2.5rem; margin-top: 5rem; }
.hz-step {
  background: #ffffff; padding: 2.5rem 2rem;
  border-radius: var(--hz-radius-lg); border: 1px solid var(--hz-border);
  box-shadow: var(--hz-shadow-md); transition: var(--hz-transition);
}
.hz-step:hover { transform: translateY(-4px); box-shadow: var(--hz-shadow-lg); }
.hz-step__num { font-size: 3.8rem; font-weight: 800; color: rgba(59,130,246,0.18); line-height: 1; margin-bottom: 1rem; letter-spacing: -0.04em; }
.hz-step__title { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.7rem; }
.hz-step__desc { font-size: 0.98rem; color: var(--hz-text-muted); line-height: 1.65; }
.hz-step code { background: #f1f5f9; border: 1px solid rgba(15,23,42,0.05); padding: 0.2rem 0.5rem; border-radius: 6px; font-size: 0.85rem; color: #2563eb; font-family: monospace; font-weight: 600; }

/* ── CTA ── */
.hz-cta { text-align: center; padding: 9rem 1.5rem; background: radial-gradient(80% 50% at 50% 100%, rgba(59,130,246,0.08) 0%, transparent 70%); }
.hz-cta__card {
  max-width: 900px; margin: 0 auto; background: #ffffff; padding: 4.5rem 2rem;
  border-radius: calc(var(--hz-radius-lg) * 1.5); border: 1px solid var(--hz-border);
  box-shadow: var(--hz-shadow-lg); position: relative; overflow: hidden;
}
.hz-cta__card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at top right, rgba(59,130,246,0.03), transparent 40%); }
.hz-cta__title { font-size: clamp(2.2rem,5vw,3.2rem); font-weight: 800; margin-bottom: 1.2rem; letter-spacing: -0.03em; }
.hz-cta__sub { color: var(--hz-text-muted); margin-bottom: 3rem; font-size: 1.15rem; max-width: 540px; margin-left: auto; margin-right: auto; }
.hz-cta .hz-btn { padding: 1.1rem 3.5rem; font-size: 1.05rem; }

/* ── Footer ── */
.hz-footer { border-top: 1px solid var(--hz-border); background: #ffffff; box-shadow: 0 -4px 20px rgba(15,23,42,0.02); flex-shrink: 0; }
.hz-footer__inner {
  max-width: 1200px; margin: 0 auto; padding: 2.5rem 1.5rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 1.5rem; font-size: 0.92rem; color: var(--hz-text-muted);
}
.hz-footer__brand { font-weight: 600; color: var(--hz-text); }
.hz-footer__nav { display: flex; gap: 1.8rem; }
.hz-footer__nav a:hover { color: var(--hz-primary); }

/* ── Forms ── */
.hz-form-group { margin-bottom: 1.1rem; }
.hz-form-group label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--hz-text-muted); margin-bottom: 0.4rem; letter-spacing: 0.04em; text-transform: uppercase; }
.hz-input {
  width: 100%; padding: 0.75rem 1rem;
  background: #ffffff; border: 1.5px solid rgba(226,232,240,0.9);
  border-radius: 12px; color: var(--hz-text); font-family: var(--hz-font); font-size: 0.95rem;
  outline: none; appearance: none; transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: var(--hz-shadow-sm);
}
.hz-input:focus { border-color: var(--hz-primary); box-shadow: 0 0 0 4px rgba(59,130,246,0.1); }
.hz-input::placeholder { color: var(--hz-text-muted); }
select.hz-input { cursor: pointer; }
textarea.hz-input { resize: vertical; line-height: 1.6; }

/* ── Alerts ── */
.hz-alert { padding: 0.8rem 1.1rem; border-radius: 12px; font-size: 0.9rem; margin-bottom: 1rem; line-height: 1.5; font-weight: 500; }
.hz-alert--error   { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; }
.hz-alert--success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #16a34a; }
.hz-alert--info    { background: var(--hz-primary-light); border: 1px solid rgba(59,130,246,0.2); color: var(--hz-primary-hover); }
.hz-alert--warning { background: #fffbeb; border: 1px solid #fde68a; color: #d97706; }

/* ── Auth Card ── */
.hz-auth-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2.5rem 1rem; background: var(--hz-bg); }
.hz-auth-card {
  background: #ffffff; border: 1px solid var(--hz-border); border-radius: var(--hz-radius-lg);
  padding: 3rem 2.5rem; width: 100%; max-width: 440px; box-shadow: var(--hz-shadow-lg);
}
.hz-auth-card__logo { text-align: center; margin-bottom: 1.5rem; font-size: 2rem; color: var(--hz-primary); filter: drop-shadow(0 2px 8px rgba(59,130,246,0.4)); }
.hz-auth-card__title { text-align: center; font-size: 1.5rem; font-weight: 800; margin-bottom: 0.4rem; letter-spacing: -0.02em; }
.hz-auth-card__sub { text-align: center; color: var(--hz-text-muted); font-size: 0.9rem; margin-bottom: 2rem; }
.hz-auth-card .hz-btn--primary { width: 100%; }
.hz-divider { display: flex; align-items: center; gap: 0.8rem; color: var(--hz-text-muted); font-size: 0.82rem; margin: 1.3rem 0; }
.hz-divider::before, .hz-divider::after { content: ''; flex: 1; height: 1px; background: var(--hz-border); }

/* ── Dashboard Layout ── */
.hz-layout { display: flex; flex: 1; overflow: hidden; min-height: 0; }
.hz-sidebar {
  width: 250px; flex-shrink: 0;
  background: #ffffff; border-right: 1px solid var(--hz-border);
  padding: 1.5rem 0; display: flex; flex-direction: column; overflow-y: auto;
  box-shadow: 4px 0 20px rgba(15,23,42,0.03);
}
.hz-sidebar__section { margin-bottom: 1.5rem; }
.hz-sidebar__label { padding: 0.3rem 1.3rem; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--hz-text-muted); margin-bottom: 0.3rem; }
.hz-sidebar__link {
  display: flex; align-items: center; gap: 0.7rem; padding: 0.65rem 1.3rem;
  color: var(--hz-text-muted); font-size: 0.9rem; font-weight: 500;
  border-left: 3px solid transparent; text-decoration: none; transition: var(--hz-transition);
}
.hz-sidebar__link:hover { background: var(--hz-primary-light); color: var(--hz-primary); }
.hz-sidebar__link.active { background: var(--hz-primary-light); color: var(--hz-primary); border-left-color: var(--hz-primary); font-weight: 600; }
.hz-sidebar__icon { font-size: 0.95rem; width: 1.1rem; text-align: center; flex-shrink: 0; }
.hz-content { flex: 1; padding: 2.5rem; overflow-y: auto; min-width: 0; background: var(--hz-bg); }
.hz-page-title { font-size: 1.6rem; font-weight: 800; margin-bottom: 0.3rem; letter-spacing: -0.02em; }
.hz-page-sub { color: var(--hz-text-muted); font-size: 0.9rem; margin-bottom: 2rem; }

/* ── Cards / Stats ── */
.hz-card { background: #ffffff; border: 1px solid var(--hz-border); border-radius: var(--hz-radius-md); padding: 1.5rem; box-shadow: var(--hz-shadow-sm); }
.hz-card__title { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--hz-text-muted); margin-bottom: 0.5rem; }
.hz-card__value { font-size: 2rem; font-weight: 800; color: var(--hz-text); letter-spacing: -0.02em; }
.hz-stats-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(160px,1fr)); gap: 1rem; margin-bottom: 2rem; }

/* ── Connect Banner ── */
.hz-connect-banner {
  background: linear-gradient(135deg, var(--hz-primary-light), #ffffff);
  border: 1.5px solid rgba(59,130,246,0.2); border-radius: var(--hz-radius-md);
  padding: 1.3rem 1.8rem; display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  margin-bottom: 2rem; box-shadow: var(--hz-shadow-sm);
}
.hz-connect-banner__label {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--hz-text-muted); margin-bottom: 0.25rem;
}
.hz-connect-banner__id {
  font-size: 1.3rem; font-weight: 800; letter-spacing: 0.14em;
  color: var(--hz-primary); font-family: monospace;
}
/* FIX: status dot + label NIEMALS übereinander */
.hz-connect-banner__status {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.88rem; font-weight: 500; white-space: nowrap;
}
.hz-status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0; display: inline-block; background: #d1d5db;
}
.hz-status-dot--online  { background: #22c55e; box-shadow: 0 0 8px rgba(34,197,94,0.5); }
.hz-status-dot--offline { background: #ef4444; }

/* ── Table ── */
.hz-table-wrap { background: #ffffff; border: 1px solid var(--hz-border); border-radius: var(--hz-radius-md); overflow: hidden; box-shadow: var(--hz-shadow-sm); }
.hz-table { width: 100%; border-collapse: collapse; }
.hz-table th { padding: 0.85rem 1.2rem; text-align: left; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--hz-text-muted); background: #f8fafc; border-bottom: 1px solid var(--hz-border); white-space: nowrap; }
.hz-table td { padding: 0.9rem 1.2rem; font-size: 0.9rem; border-bottom: 1px solid rgba(226,232,240,0.5); vertical-align: middle; }
.hz-table tr:last-child td { border-bottom: none; }
.hz-table tr:hover td { background: #f8fafc; }
.hz-table__actions { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }

/* ── Badge ── */
.hz-badge { display: inline-block; padding: 0.22rem 0.65rem; border-radius: 99px; font-size: 0.72rem; font-weight: 600; white-space: nowrap; }
.hz-badge--green  { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.hz-badge--red    { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.hz-badge--gray   { background: #f8fafc; color: var(--hz-text-muted); border: 1px solid var(--hz-border); }
.hz-badge--blue   { background: var(--hz-primary-light); color: var(--hz-primary); border: 1px solid rgba(59,130,246,0.2); }
.hz-badge--yellow { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }

/* ── Modal ── */
.hz-modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15,23,42,0.4); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.hz-modal-overlay.open { opacity: 1; pointer-events: all; }
.hz-modal {
  background: #ffffff; border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius-lg); padding: 2rem;
  width: 100%; max-width: 520px; box-shadow: var(--hz-shadow-lg);
  max-height: 90vh; overflow-y: auto;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1);
}
.hz-modal-overlay.open .hz-modal { transform: translateY(0) scale(1); }
.hz-modal__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.hz-modal__title { font-size: 1.1rem; font-weight: 700; }
.hz-modal__close {
  background: #f8fafc; border: 1px solid var(--hz-border); color: var(--hz-text-muted);
  width: 32px; height: 32px; border-radius: 8px; cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center; transition: var(--hz-transition);
}
.hz-modal__close:hover { background: #f1f5f9; color: var(--hz-text); }

/* ── Toolbar Row ── */
.hz-toolbar-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; gap: 1rem; flex-wrap: wrap; }
.hz-toolbar-row__left  { display: flex; flex-direction: column; gap: 0.2rem; }
.hz-toolbar-row__right { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.hz-filter-bar { display: flex; gap: 0.7rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.hz-filter-bar .hz-input { max-width: 260px; }

/* ── Editor Topbar ── */
.hz-editor-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1.5rem; background: #ffffff;
  border-bottom: 1px solid var(--hz-border); flex-shrink: 0;
  gap: 1rem; flex-wrap: wrap; box-shadow: var(--hz-shadow-sm);
}
.hz-editor-topbar__left  { display: flex; align-items: center; gap: 0.8rem; flex: 1; min-width: 0; }
.hz-editor-topbar__right { display: flex; align-items: center; gap: 0.6rem; }
.hz-editor-title-input {
  background: transparent; border: none; outline: none;
  color: var(--hz-text); font-family: var(--hz-font);
  font-size: 1.05rem; font-weight: 700; flex: 1; min-width: 0;
}
.hz-editor-title-input::placeholder { color: var(--hz-text-muted); }
.hz-editor-status { font-size: 0.75rem; color: var(--hz-text-muted); white-space: nowrap; }
.hz-editor-status--saved  { color: #16a34a; }
.hz-editor-status--saving { color: #d97706; }

/* ── Markdown Editor ── */
.hz-editor-body { display: flex; flex: 1; overflow: hidden; }
.hz-editor-pane { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.hz-editor-pane + .hz-editor-pane { border-left: 1px solid var(--hz-border); }
.hz-editor-pane__label {
  padding: 0.35rem 1rem; font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--hz-text-muted);
  background: #f8fafc; border-bottom: 1px solid var(--hz-border); flex-shrink: 0;
}
.hz-md-textarea {
  flex: 1; resize: none; outline: none; border: none;
  background: #ffffff; color: var(--hz-text);
  font-family: 'JetBrains Mono','Fira Code',monospace;
  font-size: 0.92rem; line-height: 1.75; padding: 1.5rem; tab-size: 2; overflow-y: auto;
}
.hz-md-textarea::placeholder { color: var(--hz-text-muted); }
.hz-md-preview {
  flex: 1; overflow-y: auto; padding: 1.5rem 2rem;
  background: #ffffff; font-size: 0.95rem; line-height: 1.8;
}
.hz-md-preview h1 { font-size: 1.9rem; font-weight: 800; margin: 1.5rem 0 0.6rem; }
.hz-md-preview h2 { font-size: 1.45rem; font-weight: 700; margin: 1.4rem 0 0.5rem; border-bottom: 1px solid var(--hz-border); padding-bottom: 0.4rem; }
.hz-md-preview h3 { font-size: 1.15rem; font-weight: 700; margin: 1.2rem 0 0.4rem; }
.hz-md-preview p  { margin-bottom: 1rem; }
.hz-md-preview ul, .hz-md-preview ol { margin: 0.8rem 0 1rem 1.5rem; }
.hz-md-preview li { margin-bottom: 0.3rem; }
.hz-md-preview blockquote { border-left: 3px solid var(--hz-primary); padding: 0.5rem 1rem; margin: 1rem 0; background: var(--hz-primary-light); border-radius: 0 8px 8px 0; color: var(--hz-text-muted); }
.hz-md-preview code { background: #f1f5f9; padding: 0.15rem 0.4rem; border-radius: 4px; font-family: monospace; font-size: 0.88em; color: #2563eb; }
.hz-md-preview pre { background: #f1f5f9; border: 1px solid var(--hz-border); border-radius: 12px; padding: 1rem 1.2rem; overflow-x: auto; margin: 1rem 0; }
.hz-md-preview pre code { background: none; padding: 0; color: var(--hz-text); }
.hz-md-preview a { color: var(--hz-primary); }
.hz-md-preview img { max-width: 100%; border-radius: 12px; margin: 0.5rem 0; }
.hz-md-preview hr { border: none; border-top: 1px solid var(--hz-border); margin: 1.5rem 0; }
.hz-md-preview strong { font-weight: 700; }
.hz-md-preview table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.hz-md-preview th, .hz-md-preview td { padding: 0.5rem 0.8rem; border: 1px solid var(--hz-border); }
.hz-md-preview th { background: #f8fafc; font-weight: 700; }

/* ── Editor Toolbar ── */
.hz-toolbar {
  display: flex; align-items: center; gap: 0.2rem;
  padding: 0.5rem 1rem; background: #f8fafc;
  border-bottom: 1px solid var(--hz-border); flex-shrink: 0; flex-wrap: wrap;
}
.hz-toolbar__sep { width: 1px; height: 18px; background: var(--hz-border); margin: 0 0.3rem; }
.hz-toolbar__btn {
  background: none; border: none; color: var(--hz-text-muted);
  padding: 0.35rem 0.55rem; border-radius: 8px; cursor: pointer;
  font-size: 0.85rem; font-family: var(--hz-font);
  transition: var(--hz-transition); line-height: 1;
}
.hz-toolbar__btn:hover { background: var(--hz-primary-light); color: var(--hz-primary); }

/* ── View Toggle ── */
.hz-view-toggle { display: flex; background: #f1f5f9; border: 1px solid var(--hz-border); border-radius: 10px; overflow: hidden; }
.hz-view-toggle__btn { background: none; border: none; color: var(--hz-text-muted); padding: 0.35rem 0.7rem; cursor: pointer; font-size: 0.82rem; font-family: var(--hz-font); transition: var(--hz-transition); }
.hz-view-toggle__btn.active { background: var(--hz-primary); color: #fff; }

/* ── Editor Sidebar ── */
.hz-editor-sidebar {
  width: 270px; flex-shrink: 0; background: #ffffff;
  border-left: 1px solid var(--hz-border); overflow-y: auto;
}
.hz-editor-sidebar__section { padding: 1.2rem; border-bottom: 1px solid var(--hz-border); }
.hz-editor-sidebar__title { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--hz-text-muted); margin-bottom: 0.8rem; }

/* ── Page Builder ── */
.hz-builder-wrap { display: flex; height: calc(100vh - 60px); overflow: hidden; }
.hz-builder-blocks {
  width: 220px; flex-shrink: 0; background: #ffffff;
  border-right: 1px solid var(--hz-border); padding: 1rem 0; overflow-y: auto;
}
.hz-builder-blocks__label { padding: 0.3rem 1rem; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--hz-text-muted); margin-bottom: 0.3rem; }
.hz-block-btn {
  display: flex; align-items: center; gap: 0.7rem;
  width: 100%; padding: 0.6rem 1rem; background: none; border: none;
  color: var(--hz-text-muted); font-family: var(--hz-font); font-size: 0.88rem;
  cursor: pointer; text-align: left; transition: var(--hz-transition);
}
.hz-block-btn:hover { background: var(--hz-primary-light); color: var(--hz-primary); }
.hz-block-btn__icon { font-size: 1rem; width: 1.2rem; text-align: center; }
.hz-builder-canvas { flex: 1; overflow-y: auto; padding: 2rem; background: var(--hz-bg); }
.hz-builder-canvas__empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--hz-text-muted); text-align: center; gap: 0.8rem; }
.hz-builder-canvas__empty-icon { font-size: 3rem; opacity: 0.2; }
.hz-block {
  background: #ffffff; border: 1.5px solid var(--hz-border);
  border-radius: var(--hz-radius-md); margin-bottom: 1rem;
  transition: var(--hz-transition); position: relative; box-shadow: var(--hz-shadow-sm);
}
.hz-block:hover { border-color: rgba(59,130,246,0.3); }
.hz-block.selected { border-color: var(--hz-primary); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.hz-block__header { display: flex; align-items: center; justify-content: space-between; padding: 0.6rem 0.8rem; background: #f8fafc; border-bottom: 1px solid var(--hz-border); border-radius: var(--hz-radius-md) var(--hz-radius-md) 0 0; }
.hz-block__type { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--hz-text-muted); }
.hz-block__actions { display: flex; gap: 0.3rem; }
.hz-block__action-btn { background: none; border: none; color: var(--hz-text-muted); cursor: pointer; padding: 0.2rem 0.4rem; border-radius: 6px; font-size: 0.82rem; transition: var(--hz-transition); }
.hz-block__action-btn:hover { background: var(--hz-primary-light); color: var(--hz-primary); }
.hz-block__action-btn--danger:hover { background: #fef2f2; color: #dc2626; }
.hz-block-preview { padding: 1rem; font-size: 0.9rem; line-height: 1.6; color: var(--hz-text-muted); }
.hz-builder-sidebar { width: 260px; flex-shrink: 0; background: #ffffff; border-left: 1px solid var(--hz-border); overflow-y: auto; }
.hz-builder-sidebar__section { padding: 1.2rem; border-bottom: 1px solid var(--hz-border); }
.hz-builder-sidebar__title { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--hz-text-muted); margin-bottom: 0.8rem; }

/* ── Responsive ── */
@media (max-width: 900px) { .hz-sidebar { width: 210px; } }
@media (max-width: 700px) {
  .hz-sidebar { display: none; }
  .hz-content { padding: 1.2rem; }
  .hz-auth-card { padding: 2rem 1.3rem; }
  .hz-connect-banner { flex-direction: column; align-items: flex-start; }
  .hz-stats-grid { grid-template-columns: 1fr 1fr; }
  .hz-header__inner { flex-wrap: wrap; gap: 0.8rem; }
  .hz-footer__inner { flex-direction: column; text-align: center; }
  .hz-editor-sidebar, .hz-builder-sidebar { display: none; }
  .hz-builder-blocks { width: 180px; }
}
