/* ==========================================================================
   EBOOK ADMIN — valentinborsan.art
   CSS pentru paginile admin: detail, edit, chapter-edit
   Naming: .ead- (ebook admin)
   Paleta: dark gray-900/950, violet accents, terra accents, gold subtle
   ========================================================================== */

:root {
  --ead-bg:         #0b0b12;
  --ead-surface:    #111118;
  --ead-card:       #141420;
  --ead-card-h:     #1a1a2a;
  --ead-border:     rgba(255, 255, 255, 0.07);
  --ead-border-h:   rgba(255, 255, 255, 0.12);
  --ead-violet:     #7c3aed;
  --ead-violet-r:   124, 58, 237;
  --ead-green:      rgba(74, 222, 128, 1);
  --ead-yellow:     rgba(251, 191, 36, 1);
  --ead-terra:      #c4602a;
  --ead-terra-r:    196, 96, 42;
  --ead-gold:       #c9a96e;
  --ead-gold-r:     201, 169, 110;
  --ead-blue:       #60a5fa;
  --ead-text:       #e5e7eb;
  --ead-muted:      rgba(229, 231, 235, 0.45);
  --ead-mono:       'IBM Plex Mono', 'Courier New', monospace;
  --ead-serif:      'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --ead-sans:       'Montserrat', sans-serif;
  --ead-r:          6px;
}

/* ── ROOT ── */
.ead-root {
  background: var(--ead-bg);
  min-height: 100vh;
  color: var(--ead-text);
  font-family: var(--ead-sans);
  font-size: 0.875rem;
}

/* ── TOPBAR ── */
.ead-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--ead-border);
  flex-wrap: wrap;
}

.ead-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--ead-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: var(--ead-muted);
}

.ead-breadcrumb a {
  color: var(--ead-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.ead-breadcrumb a:hover { color: #fff; }
.ead-bc-sep { color: rgba(255,255,255,0.12); }
.ead-bc-current { color: rgba(255,255,255,0.7); }

.ead-topbar-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* ── BUTTONS ── */
.ead-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--ead-r);
  font-family: var(--ead-sans);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  line-height: 1;
}

.ead-btn-violet {
  background: rgba(var(--ead-violet-r), 0.15);
  border-color: rgba(var(--ead-violet-r), 0.4);
  color: #a78bfa;
}

.ead-btn-violet:hover {
  background: rgba(var(--ead-violet-r), 0.25);
  border-color: rgba(var(--ead-violet-r), 0.6);
  color: #c4b5fd;
}

.ead-btn-ghost {
  background: transparent;
  border-color: var(--ead-border-h);
  color: var(--ead-muted);
}

.ead-btn-ghost:hover {
  border-color: rgba(255,255,255,0.25);
  color: #fff;
}

.ead-btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.68rem;
}

/* ── ALERTS ── */
.ead-alert {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 2rem;
  font-family: var(--ead-mono);
  font-size: 0.62rem;
  letter-spacing: 0.05em;
}

.ead-alert-success {
  background: rgba(74,222,128,0.06);
  border-bottom: 1px solid rgba(74,222,128,0.15);
  color: rgba(74,222,128,0.85);
}

.ead-alert-error {
  background: rgba(239,68,68,0.06);
  border-bottom: 1px solid rgba(239,68,68,0.15);
  color: rgba(239,68,68,0.85);
}

/* ── MAIN GRID ── */
.ead-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* ── SIDEBAR ── */
.ead-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ── COVER CARD ── */
.ead-cover-card {
  position: relative;
  border-radius: var(--ead-r);
  overflow: hidden;
  aspect-ratio: 2/3;
  max-height: 360px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}

.ead-cover-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.ead-cover-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(145deg, #1a1a2e 0%, #16213e 40%, #0f3460 70%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
  min-height: 220px;
}

.ead-cover-orb {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #7c3aed, #4f46e5 40%, #1a0a3e 80%);
  box-shadow: 0 0 30px rgba(79,70,229,0.5);
}

.ead-cover-title {
  font-family: var(--ead-serif);
  font-size: 0.8rem;
  font-style: italic;
  color: rgba(var(--ead-gold-r), 0.7);
  text-align: center;
  line-height: 1.35;
}

.ead-cover-badges {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* ── CARD ── */
.ead-card {
  background: var(--ead-card);
  border: 1px solid var(--ead-border);
  border-radius: var(--ead-r);
  padding: 1.25rem;
}

.ead-card-mono {
  background: rgba(255,255,255,0.015);
  border-style: dashed;
}

.ead-card-tips {
  background: rgba(var(--ead-gold-r), 0.025);
  border-color: rgba(var(--ead-gold-r), 0.1);
}

.ead-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-family: var(--ead-mono);
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  gap: 0.5rem;
}

.ead-card-header span { display: flex; align-items: center; gap: 0.4rem; }
.ead-card-header i { color: rgba(var(--ead-violet-r), 0.6); }

/* ── BADGES ── */
.ead-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-family: var(--ead-mono);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid;
}

.ead-badge-violet {
  background: rgba(var(--ead-violet-r), 0.1);
  border-color: rgba(var(--ead-violet-r), 0.3);
  color: #a78bfa;
}

.ead-badge-green {
  background: rgba(74,222,128,0.06);
  border-color: rgba(74,222,128,0.2);
  color: rgba(74,222,128,0.8);
}

.ead-badge-yellow {
  background: rgba(251,191,36,0.06);
  border-color: rgba(251,191,36,0.2);
  color: rgba(251,191,36,0.75);
}

.ead-badge-gray {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.4);
}

.ead-badge-terra {
  background: rgba(var(--ead-terra-r), 0.08);
  border-color: rgba(var(--ead-terra-r), 0.25);
  color: rgba(var(--ead-terra-r), 0.85);
}

.ead-badge-mono {
  background: transparent;
  border-color: transparent;
  color: rgba(255,255,255,0.3);
  font-size: 0.55rem;
}

/* ── META LIST ── */
.ead-meta-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.ead-meta-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
}

.ead-meta-row > i {
  color: rgba(var(--ead-violet-r), 0.6);
  font-size: 0.85rem;
  flex-shrink: 0;
  width: 16px;
}

.ead-meta-label {
  color: var(--ead-muted);
  min-width: 68px;
  flex-shrink: 0;
  font-size: 0.72rem;
}

.ead-meta-val {
  color: rgba(255,255,255,0.85);
  font-weight: 500;
}

.ead-meta-green { color: rgba(74,222,128,0.8); }
.ead-meta-yellow { color: rgba(251,191,36,0.75); }
.ead-mono { font-family: var(--ead-mono); font-size: 0.68rem; }

/* ── LINK ── */
.ead-link {
  color: rgba(var(--ead-violet-r), 0.8);
  text-decoration: none;
  transition: color 0.2s;
}

.ead-link:hover { color: #a78bfa; }

.ead-link-sm {
  font-family: var(--ead-mono);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  color: rgba(var(--ead-violet-r), 0.6);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.2s;
}

.ead-link-sm:hover { color: #a78bfa; }

/* ── DISTRIBUTION BUTTONS ── */
.ead-dist-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.65rem 1rem;
  border-radius: calc(var(--ead-r) - 2px);
  font-family: var(--ead-sans);
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid;
  cursor: pointer;
  transition: all 0.2s;
}

.ead-dist-amazon {
  background: rgba(251,191,36,0.07);
  border-color: rgba(251,191,36,0.2);
  color: rgba(251,191,36,0.85);
}

.ead-dist-amazon:hover {
  background: rgba(251,191,36,0.12);
  border-color: rgba(251,191,36,0.35);
}

.ead-dist-preview {
  background: rgba(255,255,255,0.03);
  border-color: var(--ead-border-h);
  color: var(--ead-muted);
}

.ead-dist-preview:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.2);
  color: #fff;
}

.ead-dist-disabled {
  background: transparent;
  border: 1px dashed rgba(251,191,36,0.15);
  color: rgba(251,191,36,0.3);
  cursor: not-allowed;
}

.ead-dist-soon {
  margin-left: auto;
  font-family: var(--ead-mono);
  font-size: 0.5rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.6;
}

.ead-hint-text {
  font-family: var(--ead-mono);
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.2);
  margin-top: 0.4rem;
  line-height: 1.5;
}

/* ── ACTIONS LIST ── */
.ead-actions-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ead-action-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.85rem;
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--ead-muted);
  text-decoration: none;
  transition: all 0.2s;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: var(--ead-sans);
}

.ead-action-item:hover {
  background: rgba(255,255,255,0.04);
  color: #fff;
}

.ead-action-item > i { font-size: 0.9rem; opacity: 0.7; }

.ead-action-item-btn { cursor: pointer; }

.ead-action-green { color: rgba(74,222,128,0.7); }
.ead-action-green:hover { color: rgba(74,222,128,1); background: rgba(74,222,128,0.05); }
.ead-action-warn { color: rgba(251,191,36,0.65); }
.ead-action-warn:hover { color: rgba(251,191,36,0.9); background: rgba(251,191,36,0.05); }

/* ── MAIN COLUMN ── */
.ead-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* ── BOOK HEADER ── */
.ead-book-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.ead-book-title {
  font-family: 'Playfair Display', var(--ead-serif);
  font-size: 2.25rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  margin: 0 0 0.3rem;
}

.ead-book-subtitle {
  font-family: var(--ead-serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--ead-muted);
  margin: 0;
}

.ead-book-desc {
  font-family: var(--ead-serif);
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(229,231,235,0.65);
  margin: 0;
}

/* ── STATUS PILL ── */
.ead-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-family: var(--ead-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.ead-status-live {
  background: rgba(74,222,128,0.07);
  border: 1px solid rgba(74,222,128,0.2);
  color: rgba(74,222,128,0.85);
}

.ead-status-draft {
  background: rgba(251,191,36,0.06);
  border: 1px solid rgba(251,191,36,0.18);
  color: rgba(251,191,36,0.8);
}

.ead-status-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* ── STATS GRID ── */
.ead-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
}

.ead-stat-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--ead-border);
  border-radius: var(--ead-r);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ead-stat-icon { font-size: 1rem; }
.ead-stat-label {
  font-family: var(--ead-mono);
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}

.ead-stat-val {
  font-family: 'Playfair Display', var(--ead-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.ead-violet  { color: #a78bfa; }
.ead-green   { color: rgba(74,222,128,0.8); }
.ead-terra   { color: rgba(var(--ead-terra-r),0.85); }
.ead-blue    { color: var(--ead-blue); }
.ead-muted   { color: var(--ead-muted); }

/* ── SECTION ── */
.ead-section {
  background: var(--ead-card);
  border: 1px solid var(--ead-border);
  border-radius: var(--ead-r);
  overflow: hidden;
}

.ead-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--ead-border);
  gap: 0.75rem;
}

.ead-section-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.ead-count-badge {
  background: rgba(var(--ead-violet-r),0.15);
  border: 1px solid rgba(var(--ead-violet-r),0.25);
  color: #a78bfa;
  font-family: var(--ead-mono);
  font-size: 0.55rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
}

.ead-empty {
  padding: 3.5rem 1.25rem;
  text-align: center;
  color: var(--ead-muted);
  font-size: 0.85rem;
}

/* ── CHAPTER CARDS ── */
.ead-chapters-list {
  display: flex;
  flex-direction: column;
}

.ead-chapter-card {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--ead-border);
  align-items: start;
  transition: background 0.2s;
}

.ead-chapter-card:last-child { border-bottom: none; }
.ead-chapter-card:hover { background: var(--ead-card-h); }

.ead-chapter-num {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(var(--ead-violet-r),0.1);
  border: 1px solid rgba(var(--ead-violet-r),0.2);
  border-radius: 6px;
  font-family: var(--ead-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: #a78bfa;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.ead-chapter-body { min-width: 0; }

.ead-chapter-top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.ead-chapter-title {
  font-family: var(--ead-serif);
  font-style: italic;
  font-size: 1rem;
  color: rgba(255,255,255,0.88);
  font-weight: 400;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

.ead-chapter-badges {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  align-items: center;
}

.ead-chapter-preview {
  font-family: var(--ead-serif);
  font-style: italic;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
  line-height: 1.5;
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ead-chapter-actions {
  display: flex;
  gap: 0.35rem;
  opacity: 0;
  transition: opacity 0.2s;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.ead-chapter-card:hover .ead-chapter-actions { opacity: 1; }

.ead-icon-btn {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--ead-border-h);
  border-radius: 4px;
  color: var(--ead-muted);
  text-decoration: none;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.ead-icon-btn:hover {
  background: rgba(var(--ead-violet-r),0.12);
  border-color: rgba(var(--ead-violet-r),0.3);
  color: #a78bfa;
}

.ead-icon-btn-danger:hover {
  background: rgba(239,68,68,0.08);
  border-color: rgba(239,68,68,0.25);
  color: rgba(239,68,68,0.8);
}

/* ── TECH GRID ── */
.ead-tech-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ead-tech-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.65rem 1.25rem;
  border-bottom: 1px solid var(--ead-border);
}

.ead-tech-row:last-child { border-bottom: none; }

.ead-tech-label {
  font-family: var(--ead-mono);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  min-width: 90px;
  flex-shrink: 0;
  padding-top: 0.1rem;
}

.ead-tech-val {
  font-family: var(--ead-mono);
  font-size: 0.65rem;
  color: rgba(255,255,255,0.5);
  word-break: break-all;
}

.ead-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 400px;
  display: block;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FORM — ebook-edit.ejs & ebook-chapter-edit.ejs
   ═══════════════════════════════════════════════════════════════════════════ */

.ead-form-layout,
.ead-chapter-form-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
}

.ead-form-main { min-width: 0; }
.ead-form-sidebar { flex-shrink: 0; }

/* Fields */
.ead-field { margin-bottom: 1.1rem; }
.ead-field:last-child { margin-bottom: 0; }

.ead-label {
  display: block;
  font-family: var(--ead-mono);
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 0.45rem;
}

.ead-label-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.ead-req { color: rgba(var(--ead-terra-r),0.8); font-style: normal; margin-left: 0.2rem; }

.ead-input,
.ead-textarea,
.ead-select {
  width: 100%;
  background: rgba(255,255,255,0.035);
  border: 1px solid var(--ead-border-h);
  border-radius: 4px;
  padding: 0.7rem 0.9rem;
  font-family: var(--ead-serif);
  font-size: 0.95rem;
  color: var(--ead-text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.ead-input:focus,
.ead-textarea:focus,
.ead-select:focus {
  border-color: rgba(var(--ead-violet-r),0.5);
  box-shadow: 0 0 0 3px rgba(var(--ead-violet-r),0.08);
}

.ead-input::placeholder,
.ead-textarea::placeholder { color: rgba(255,255,255,0.15); }

.ead-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.65;
}

.ead-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='rgba(255,255,255,0.3)' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.4rem;
  cursor: pointer;
}

.ead-select option { background: #1a1a2e; }

.ead-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.ead-hint {
  font-family: var(--ead-mono);
  font-size: 0.52rem;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.18);
  margin-top: 0.35rem;
  line-height: 1.5;
}

.ead-form-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

/* Cover preview box */
.ead-cover-preview-box {
  aspect-ratio: 2/3;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--ead-border-h);
  background: rgba(255,255,255,0.02);
  margin-bottom: 1rem;
  position: relative;
  max-height: 280px;
}

.ead-cover-preview-box img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.ead-cover-preview-empty {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(145deg, #1a1a2e, #0f1329);
  min-height: 120px;
}

.ead-cover-preview-empty i { font-size: 1.75rem; color: rgba(255,255,255,0.08); }
.ead-cover-preview-empty span { font-family: var(--ead-mono); font-size: 0.52rem; letter-spacing: 0.1em; color: rgba(255,255,255,0.12); text-transform: uppercase; }

/* Tips list */
.ead-tips-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.ead-tips-list li {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-family: var(--ead-mono);
  font-size: 0.58rem;
  letter-spacing: 0.03em;
  color: rgba(255,255,255,0.3);
  line-height: 1.5;
}

.ead-tips-list li > i { color: rgba(var(--ead-gold-r),.55); flex-shrink: 0; margin-top: 0.05em; }

/* Toggle switch */
.ead-toggle {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 20px;
  flex-shrink: 0;
}

.ead-toggle input { opacity: 0; width: 0; height: 0; }

.ead-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--ead-border-h);
  border-radius: 999px;
  transition: all 0.25s;
}

.ead-toggle-slider::before {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  left: 2px; bottom: 2px;
  background: rgba(255,255,255,0.4);
  border-radius: 50%;
  transition: all 0.25s;
}

.ead-toggle input:checked + .ead-toggle-slider {
  background: rgba(var(--ead-violet-r),0.3);
  border-color: rgba(var(--ead-violet-r),0.5);
}

.ead-toggle input:checked + .ead-toggle-slider::before {
  transform: translateX(18px);
  background: #a78bfa;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CHAPTER EDITOR
   ═══════════════════════════════════════════════════════════════════════════ */

.ead-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.6rem 0.75rem;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--ead-border);
  flex-wrap: wrap;
}

.ead-tb-btn {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.55rem;
  border-radius: 3px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--ead-muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-family: var(--ead-mono);
  transition: all 0.15s;
}

.ead-tb-btn:hover {
  background: rgba(var(--ead-violet-r),0.1);
  border-color: rgba(var(--ead-violet-r),0.2);
  color: #a78bfa;
}

.ead-tb-btn.active {
  background: rgba(var(--ead-violet-r),0.15);
  border-color: rgba(var(--ead-violet-r),0.3);
  color: #c4b5fd;
}

.ead-tb-sep {
  width: 1px;
  height: 18px;
  background: var(--ead-border-h);
  margin: 0 0.2rem;
  flex-shrink: 0;
}

.ead-content-editor {
  min-height: 400px;
  padding: 1.5rem;
  outline: none;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.05rem;
  line-height: 1.85;
  color: rgba(229,231,235,0.82);
  caret-color: #a78bfa;
}

.ead-content-editor:empty::before {
  content: attr(data-placeholder);
  color: rgba(255,255,255,0.12);
  pointer-events: none;
  display: block;
}

.ead-content-editor p { margin: 0 0 1em; }
.ead-content-editor h2, .ead-content-editor h3 {
  font-style: italic;
  color: rgba(255,255,255,0.9);
  margin: 1.5em 0 0.5em;
}
.ead-content-editor blockquote {
  border-left: 2px solid rgba(var(--ead-terra-r),0.5);
  padding-left: 1.25rem;
  margin: 1.25em 0;
  font-style: italic;
  color: rgba(255,255,255,0.5);
}
.ead-content-editor hr {
  border: none;
  border-top: 1px solid var(--ead-border-h);
  margin: 2em 0;
  text-align: center;
}
.ead-content-editor hr::after {
  content: '✦';
  font-size: 0.7rem;
  color: rgba(255,255,255,0.2);
  position: relative;
  top: -0.6rem;
  background: var(--ead-card);
  padding: 0 0.5rem;
}

.ead-content-textarea {
  width: 100%;
  min-height: 400px;
  padding: 1.25rem;
  background: transparent;
  border: none;
  color: rgba(229,231,235,0.7);
  font-family: var(--ead-mono);
  font-size: 0.8rem;
  line-height: 1.7;
  outline: none;
  resize: vertical;
  box-sizing: border-box;
}

/* Fullscreen editor */
.ead-fullscreen #ch-editor-wrap,
.ead-fullscreen .ead-editor-toolbar {
  position: fixed;
  left: 0; right: 0; z-index: 500;
}

.ead-preview-pane {
  border-top: 1px solid var(--ead-border);
  padding: 1.5rem;
  max-height: 500px;
  overflow-y: auto;
}

.ead-preview-inner {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  line-height: 1.85;
  color: rgba(229,231,235,0.75);
}

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

@media (max-width: 1100px) {
  .ead-stats-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .ead-grid { grid-template-columns: 1fr; }
  .ead-sidebar { order: 2; }
  .ead-cover-card { max-height: 240px; aspect-ratio: unset; height: 200px; }
  .ead-cover-img { object-position: top; }
  .ead-form-layout,
  .ead-chapter-form-layout { grid-template-columns: 1fr; }
  .ead-form-sidebar { order: -1; }
}

@media (max-width: 640px) {
  .ead-topbar { padding: 1rem; }
  .ead-grid { padding: 1rem; gap: 1.5rem; }
  .ead-form-layout,
  .ead-chapter-form-layout { padding: 1rem; }
  .ead-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .ead-field-row { grid-template-columns: 1fr; }
  .ead-book-header { flex-direction: column; align-items: flex-start; }
  .ead-chapter-card { grid-template-columns: 40px 1fr; }
  .ead-chapter-actions { display: flex; opacity: 1; }
}
