/* ==========================================================================
   EBOOK SYSTEM — valentinborsan.art
   Stiluri pentru pagini: list, public (detail), chapter, admin (edit + detail)
   Naming: .eb- (ebook pages), .el- (ebook list), .ec- (chapter), .ea- (admin)
   Fonturi importate în main.ejs (Cormorant Garamond, IBM Plex Mono, Playfair)
   ========================================================================== */

/* ─── VARIABILE ──────────────────────────────────────────────────────────── */
:root {
  --eb-bg:       #0d0d14;
  --eb-surface:  #111118;
  --eb-card:     #16161f;
  --eb-card-h:   #1c1c28;
  --eb-terra:    #c4602a;
  --eb-terra-r:  196, 96, 42;
  --eb-gold:     #c9a96e;
  --eb-gold-r:   201, 169, 110;
  --eb-violet:   #4f46e5;
  --eb-text:     #e8e0d4;
  --eb-muted:    rgba(232, 224, 212, 0.45);
  --eb-line:     rgba(232, 224, 212, 0.07);
  --eb-line-h:   rgba(232, 224, 212, 0.14);
  --eb-fog:      rgba(255, 255, 255, 0.03);
  --eb-shadow:   0 8px 40px rgba(0, 0, 0, 0.6);
  --eb-radius:   4px;
  --eb-mono:     'IBM Plex Mono', 'Courier New', monospace;
  --eb-serif:    'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --eb-sans:     'Montserrat', sans-serif;
}

/* ─── RESET DE BAZĂ ──────────────────────────────────────────────────────── */
.eb-root,
.el-root,
.ec-root,
.ea-root {
  font-family: var(--eb-serif);
  color: var(--eb-text);
  background: var(--eb-bg);
  min-height: 100vh;
}

/* ═══════════════════════════════════════════════════════════════════════════
   1. PAGINA DE LISTARE — .el-
   ═══════════════════════════════════════════════════════════════════════════ */

.el-root {
  background: var(--eb-bg);
  overflow-x: hidden;
}

/* ── HERO (listare) ── */
.el-hero {
  position: relative;
  padding: 7rem 2rem 5rem;
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid var(--eb-line);
}

.el-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.el-hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.el-hero-glow-1 {
  width: 600px; height: 400px;
  background: radial-gradient(circle, rgba(var(--eb-terra-r), 0.12), transparent 70%);
  top: -80px; left: 50%; transform: translateX(-60%);
}

.el-hero-glow-2 {
  width: 400px; height: 300px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.08), transparent 70%);
  bottom: 0; right: 10%;
}

.el-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}

.el-hero-eyebrow {
  font-family: var(--eb-mono);
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--eb-terra);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.el-hero-eyebrow::before,
.el-hero-eyebrow::after {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--eb-terra);
  opacity: 0.4;
  display: block;
}

.el-hero-title {
  font-family: var(--eb-serif);
  font-size: clamp(3.5rem, 8vw, 6rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1;
  color: #fff;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.el-hero-title em {
  color: var(--eb-gold);
  font-style: italic;
}

.el-hero-sub {
  font-family: var(--eb-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--eb-muted);
  margin: 1.5rem 0 0;
}

/* ── ADMIN BANNER ── */
.el-banner {
  background: rgba(var(--eb-gold-r), 0.04);
  border-bottom: 1px solid rgba(var(--eb-gold-r), 0.12);
  padding: 0.75rem 2rem;
  font-family: var(--eb-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: rgba(var(--eb-gold-r), 0.65);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
}

/* ── STATS BAR ── */
.el-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  border-bottom: 1px solid var(--eb-line);
  overflow-x: auto;
}

.el-stat {
  padding: 1.5rem 2.5rem;
  text-align: center;
  border-right: 1px solid var(--eb-line);
  flex-shrink: 0;
}

.el-stat:last-child { border-right: none; }

.el-stat-val {
  font-family: var(--eb-serif);
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  display: block;
}

.el-stat-label {
  font-family: var(--eb-mono);
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--eb-muted);
  margin-top: 0.3rem;
  display: block;
}

/* ── FILTER BAR ── */
.el-filters {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--eb-line);
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.el-filter-search {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.el-filter-search input {
  width: 100%;
  background: var(--eb-fog);
  border: 1px solid var(--eb-line-h);
  border-radius: var(--eb-radius);
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  font-family: var(--eb-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--eb-text);
  outline: none;
  transition: border-color 0.2s;
}

.el-filter-search input:focus {
  border-color: rgba(var(--eb-terra-r), 0.4);
}

.el-filter-search input::placeholder { color: var(--eb-muted); }

.el-filter-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--eb-muted);
  font-size: 0.9rem;
  pointer-events: none;
}

.el-filter-select {
  background: var(--eb-fog);
  border: 1px solid var(--eb-line-h);
  border-radius: var(--eb-radius);
  padding: 0.65rem 1rem;
  font-family: var(--eb-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: var(--eb-text);
  outline: none;
  cursor: pointer;
  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(232,224,212,0.4)' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  padding-right: 2.2rem;
}

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

.el-view-toggle {
  display: flex;
  gap: 0.25rem;
}

.el-view-btn {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: var(--eb-fog);
  border: 1px solid var(--eb-line-h);
  border-radius: var(--eb-radius);
  color: var(--eb-muted);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.95rem;
}

.el-view-btn.active,
.el-view-btn:hover {
  border-color: rgba(var(--eb-terra-r), 0.4);
  color: var(--eb-terra);
}

/* ── GRID VIEW ── */
.el-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
}

/* Card — Grid mode */
.el-card-grid {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  animation: eb-fadeUp 0.5s ease both;
}

.el-card-grid:nth-child(1) { animation-delay: 0.05s; }
.el-card-grid:nth-child(2) { animation-delay: 0.1s; }
.el-card-grid:nth-child(3) { animation-delay: 0.15s; }
.el-card-grid:nth-child(4) { animation-delay: 0.2s; }
.el-card-grid:nth-child(5) { animation-delay: 0.25s; }
.el-card-grid:nth-child(6) { animation-delay: 0.3s; }

.el-cover-wrap {
  aspect-ratio: 2/3;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 4px 4px 0 rgba(0,0,0,0.3);
  transform: rotate(-0.5deg);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  margin-bottom: 1.2rem;
}

.el-card-grid:hover .el-cover-wrap {
  transform: rotate(0deg) scale(1.02) translateY(-4px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(var(--eb-terra-r), 0.2);
}

.el-cover-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.el-card-grid:hover .el-cover-wrap img { transform: scale(1.03); }

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

.el-cover-orb {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(var(--eb-terra-r), 0.8), #1a0a3e 80%);
  box-shadow: 0 0 20px rgba(var(--eb-terra-r), 0.4);
}

.el-cover-text {
  font-family: var(--eb-serif);
  font-size: 0.65rem;
  font-weight: 700;
  font-style: italic;
  color: rgba(var(--eb-gold-r), 0.8);
  text-align: center;
  line-height: 1.3;
}

.el-cover-badge {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 2px;
  padding: 0.15rem 0.45rem;
  font-family: var(--eb-mono);
  font-size: 0.45rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

.el-cover-badge.free {
  border-color: rgba(var(--eb-terra-r), 0.3);
  color: var(--eb-terra);
  background: rgba(var(--eb-terra-r), 0.08);
}

.el-card-meta {
  font-family: var(--eb-mono);
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--eb-terra);
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.el-card-meta-sep { color: var(--eb-line-h); }

.el-card-title {
  font-family: var(--eb-serif);
  font-size: 1.25rem;
  font-weight: 600;
  font-style: italic;
  line-height: 1.25;
  color: rgba(255,255,255,0.9);
  margin: 0 0 0.2rem;
  transition: color 0.3s;
}

.el-card-grid:hover .el-card-title { color: #fff; }

.el-card-author {
  font-family: var(--eb-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: var(--eb-muted);
  margin-bottom: 0.75rem;
}

.el-card-pills {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.el-pill {
  font-family: var(--eb-mono);
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--eb-line-h);
  color: var(--eb-muted);
  background: var(--eb-fog);
}

.el-pill-published {
  border-color: rgba(74, 222, 128, 0.2);
  color: rgba(74, 222, 128, 0.7);
  background: rgba(74, 222, 128, 0.05);
}

.el-pill-draft {
  border-color: rgba(251, 191, 36, 0.2);
  color: rgba(251, 191, 36, 0.6);
  background: rgba(251, 191, 36, 0.04);
}

.el-pill-admin {
  border-color: rgba(167, 139, 250, 0.2);
  color: rgba(167, 139, 250, 0.6);
  background: rgba(167, 139, 250, 0.05);
}

/* ── LIST VIEW ── */
.el-list-view {
  display: flex;
  flex-direction: column;
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 2rem 6rem;
}

.el-card-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 1.75rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--eb-line);
  text-decoration: none;
  color: inherit;
  align-items: center;
  transition: background 0.3s;
  position: relative;
  animation: eb-fadeUp 0.5s ease both;
}

.el-card-row:first-child { border-top: 1px solid var(--eb-line); }

.el-card-row:hover { background: rgba(255,255,255,0.015); }
.el-card-row:hover .el-card-title { color: #fff; }
.el-card-row:hover .el-row-arrow { transform: translateX(4px); opacity: 1; }

.el-row-cover {
  aspect-ratio: 2/3;
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  transform: rotate(-1deg);
  transition: transform 0.3s, box-shadow 0.3s;
}

.el-card-row:hover .el-row-cover {
  transform: rotate(0deg) scale(1.04);
  box-shadow: 0 8px 28px rgba(0,0,0,0.6);
}

.el-row-cover img, .el-row-cover .el-cover-placeholder {
  width: 100%; height: 100%; object-fit: cover;
}

.el-row-body { min-width: 0; }

.el-row-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
}

.el-row-date {
  font-family: var(--eb-mono);
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.18);
}

.el-row-chapters {
  font-family: var(--eb-mono);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  color: var(--eb-muted);
}

.el-row-arrow {
  font-size: 1rem;
  color: var(--eb-terra);
  opacity: 0.35;
  transition: all 0.3s;
}

/* ── EMPTY STATE ── */
.el-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem;
  text-align: center;
  grid-column: 1 / -1;
}

.el-empty-glyph {
  font-family: var(--eb-serif);
  font-size: 5rem;
  font-style: italic;
  color: rgba(255,255,255,0.05);
  margin-bottom: 2rem;
}

.el-empty-title {
  font-family: var(--eb-serif);
  font-size: 1.5rem;
  font-style: italic;
  color: rgba(255,255,255,0.25);
  margin-bottom: 0.5rem;
}

.el-empty-sub {
  font-family: var(--eb-mono);
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.12);
}

/* ── ADMIN NEW BTN ── */
.el-new-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: rgba(var(--eb-terra-r), 0.1);
  border: 1px solid rgba(var(--eb-terra-r), 0.3);
  border-radius: var(--eb-radius);
  color: var(--eb-terra);
  font-family: var(--eb-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
}

.el-new-btn:hover:not(:disabled) {
  background: rgba(var(--eb-terra-r), 0.18);
  border-color: rgba(var(--eb-terra-r), 0.5);
}

.el-new-btn:disabled { opacity: 0.4; cursor: not-allowed; }


/* ═══════════════════════════════════════════════════════════════════════════
   2. PAGINA PUBLICĂ (DETALIU) — .eb-
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── HERO ── */
.eb-hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--eb-line);
}

.eb-hero-blur-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.eb-hero-blur-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: blur(60px) brightness(0.15) saturate(1.5);
  transform: scale(1.1);
}

.eb-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(13,13,20,0.95) 0%,
    rgba(13,13,20,0.7) 50%,
    rgba(13,13,20,0.85) 100%
  );
  z-index: 1;
}

.eb-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 2rem 4rem;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
}

.eb-hero-cover-wrap {
  position: relative;
  flex-shrink: 0;
}

.eb-cover-img {
  width: 200px;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7), 6px 6px 0 rgba(0,0,0,0.4);
  display: block;
}

.eb-cover-placeholder {
  width: 200px;
  aspect-ratio: 2/3;
  background: linear-gradient(145deg, #1a1a2e 0%, #16213e 40%, #0f3460 70%);
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  box-shadow: var(--eb-shadow);
}

.eb-cover-orb {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(var(--eb-terra-r), 0.9), #1a0a3e);
  box-shadow: 0 0 30px rgba(var(--eb-terra-r), 0.4);
}

.eb-cover-title {
  font-family: var(--eb-serif);
  font-size: 0.7rem;
  font-style: italic;
  color: rgba(var(--eb-gold-r), 0.7);
  text-align: center;
  padding: 0 0.5rem;
  line-height: 1.4;
}

.eb-hero-content { min-width: 0; }

.eb-hero-eyebrow {
  font-family: var(--eb-mono);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--eb-terra);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.eb-hero-title {
  font-family: var(--eb-serif);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.1;
  color: #fff;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}

.eb-hero-subtitle {
  font-family: var(--eb-serif);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--eb-muted);
  margin: 0 0 1.5rem;
}

.eb-hero-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.eb-meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--eb-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--eb-muted);
}

.eb-meta-item i { color: var(--eb-gold); }
.eb-meta-divider { color: var(--eb-line-h); font-size: 0.8rem; }

.eb-hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.eb-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 2rem;
  background: var(--eb-terra);
  color: #fff;
  font-family: var(--eb-serif);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--eb-radius);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
}

.eb-btn-primary:hover {
  background: #d4692f;
  box-shadow: 0 8px 24px rgba(var(--eb-terra-r), 0.35);
  transform: translateY(-1px);
}

.eb-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.75rem;
  background: transparent;
  color: var(--eb-text);
  font-family: var(--eb-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--eb-line-h);
  border-radius: var(--eb-radius);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s;
}

.eb-btn-outline:hover {
  border-color: rgba(255,255,255,0.3);
  color: #fff;
}

/* ── BODY (detaliu public) ── */
.eb-body {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 4rem;
}

.eb-section-label {
  font-family: var(--eb-mono);
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--eb-terra);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.eb-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--eb-line-h);
}

.eb-description {
  font-family: var(--eb-serif);
  font-size: 1.1rem;
  line-height: 1.75;
  color: rgba(232,224,212,0.75);
  margin: 0 0 3rem;
}

/* ── CHAPTERS TABLE ── */
.eb-chapters-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--eb-line);
  border-radius: var(--eb-radius);
  overflow: hidden;
}

.eb-chapter-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--eb-line);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
  gap: 1rem;
}

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

.eb-chapter-row.locked {
  cursor: default;
  opacity: 0.5;
}

.eb-chapter-row.locked:hover { background: transparent; }

.eb-chapter-num {
  font-family: var(--eb-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--eb-muted);
  text-align: center;
}

.eb-chapter-info { min-width: 0; }

.eb-chapter-title {
  font-family: var(--eb-serif);
  font-size: 1rem;
  font-style: italic;
  color: rgba(255,255,255,0.85);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.15rem;
}

.eb-chapter-meta {
  font-family: var(--eb-mono);
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  color: var(--eb-muted);
}

.eb-chapter-action {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.eb-chapter-icon {
  font-size: 0.85rem;
  color: var(--eb-muted);
}

.eb-chapter-row:hover .eb-chapter-icon { color: var(--eb-terra); }

.eb-free-badge {
  font-family: var(--eb-mono);
  font-size: 0.45rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  background: rgba(var(--eb-terra-r), 0.08);
  border: 1px solid rgba(var(--eb-terra-r), 0.2);
  border-radius: 999px;
  color: var(--eb-terra);
}

/* ── SIDEBAR (buy card) ── */
.eb-sidebar { flex-shrink: 0; }

.eb-buy-card {
  background: var(--eb-card);
  border: 1px solid var(--eb-line);
  border-radius: var(--eb-radius);
  padding: 2rem;
  position: sticky;
  top: 2rem;
}

.eb-price-display {
  font-family: var(--eb-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
}

.eb-price-note {
  font-family: var(--eb-mono);
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--eb-muted);
  margin-bottom: 1.5rem;
}

.eb-buy-features {
  list-style: none;
  padding: 0; margin: 0 0 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.eb-buy-feature {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--eb-mono);
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  color: var(--eb-muted);
}

.eb-buy-feature i { color: var(--eb-gold); font-size: 0.9rem; }

.eb-buy-btn {
  display: block;
  width: 100%;
  padding: 1rem;
  background: var(--eb-terra);
  color: #fff;
  font-family: var(--eb-serif);
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border-radius: var(--eb-radius);
  border: none;
  cursor: pointer;
  transition: all 0.25s;
  margin-bottom: 0.75rem;
}

.eb-buy-btn:hover {
  background: #d4692f;
  box-shadow: 0 8px 24px rgba(var(--eb-terra-r), 0.3);
}

.eb-buy-note {
  font-family: var(--eb-mono);
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  text-align: center;
  color: rgba(255,255,255,0.2);
}

/* ── LOCKED TOAST ── */
.eb-locked-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  opacity: 0;
  background: #16100e;
  border: 1px solid rgba(var(--eb-terra-r), 0.5);
  border-radius: var(--eb-radius);
  padding: 1.1rem 1.8rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
  z-index: 200;
  max-width: 92vw;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.eb-locked-toast-label {
  font-family: var(--eb-mono);
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--eb-terra);
  margin: 0 0 0.2rem;
}

.eb-locked-toast-text {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  margin: 0;
  font-family: var(--eb-serif);
}

.eb-locked-toast-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.25);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.2rem;
  flex-shrink: 0;
  line-height: 1;
}


/* ═══════════════════════════════════════════════════════════════════════════
   3. PAGINA CAPITOL — .ec-
   ═══════════════════════════════════════════════════════════════════════════ */

.ec-root {
  background: var(--eb-bg);
}

/* ── PROGRESS BAR ── */
.ec-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--eb-terra);
  z-index: 999;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(var(--eb-terra-r), 0.5);
}

/* ── TOPBAR ── */
.ec-topbar {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(13, 13, 20, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--eb-line);
  padding: 0 2rem;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.ec-topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  flex: 1;
}

.ec-back-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--eb-muted);
  text-decoration: none;
  font-family: var(--eb-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  transition: color 0.2s;
  flex-shrink: 0;
}

.ec-back-btn:hover { color: #fff; }

.ec-topbar-divider {
  width: 1px;
  height: 18px;
  background: var(--eb-line-h);
  flex-shrink: 0;
}

.ec-topbar-book {
  font-family: var(--eb-serif);
  font-size: 0.9rem;
  font-style: italic;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ec-topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.ec-chapter-counter {
  font-family: var(--eb-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  color: var(--eb-muted);
  white-space: nowrap;
}

.ec-settings-btn {
  background: var(--eb-fog);
  border: 1px solid var(--eb-line-h);
  border-radius: var(--eb-radius);
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: var(--eb-muted);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.95rem;
}

.ec-settings-btn:hover {
  border-color: rgba(var(--eb-terra-r), 0.3);
  color: var(--eb-terra);
}

/* ── CHAPTER HEADER ── */
.ec-header {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 2rem 3rem;
  text-align: center;
  border-bottom: 1px solid var(--eb-line);
}

.ec-chapter-num {
  font-family: var(--eb-mono);
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--eb-terra);
  margin-bottom: 1rem;
}

.ec-chapter-title {
  font-family: var(--eb-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  font-style: italic;
  color: #fff;
  line-height: 1.15;
  margin: 0 0 1.25rem;
}

.ec-chapter-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-family: var(--eb-mono);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  color: var(--eb-muted);
  flex-wrap: wrap;
}

.ec-meta-sep { color: var(--eb-line-h); }

/* ── READER CONTENT ── */
.ec-reader {
  max-width: 680px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* Settings panel */
.ec-settings-panel {
  background: var(--eb-card);
  border: 1px solid var(--eb-line);
  border-radius: var(--eb-radius);
  padding: 1.25rem;
  margin-bottom: 2.5rem;
  display: none;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  animation: eb-fadeUp 0.2s ease;
}

.ec-settings-panel.open { display: grid; }

.ec-setting-group label {
  font-family: var(--eb-mono);
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--eb-muted);
  display: block;
  margin-bottom: 0.5rem;
}

.ec-setting-btns {
  display: flex;
  gap: 0.25rem;
}

.ec-setting-btn {
  flex: 1;
  padding: 0.4rem 0.6rem;
  background: var(--eb-fog);
  border: 1px solid var(--eb-line-h);
  border-radius: 2px;
  color: var(--eb-muted);
  font-family: var(--eb-mono);
  font-size: 0.6rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.ec-setting-btn.active,
.ec-setting-btn:hover {
  border-color: rgba(var(--eb-terra-r), 0.4);
  color: var(--eb-terra);
  background: rgba(var(--eb-terra-r), 0.06);
}

/* Content typography */
.ec-content {
  font-family: var(--eb-serif);
  font-size: var(--ec-font-size, 1.15rem);
  line-height: var(--ec-line-height, 1.9);
  color: rgba(232, 224, 212, 0.82);
  word-break: break-word;
}

.ec-content p {
  margin: 0 0 1.5em;
  text-indent: 1.5em;
}

.ec-content p:first-child { text-indent: 0; }

.ec-content h2, .ec-content h3 {
  font-family: var(--eb-serif);
  font-style: italic;
  color: rgba(255,255,255,0.9);
  margin: 2.5em 0 0.75em;
  text-indent: 0;
  font-weight: 400;
}

.ec-content h2 { font-size: 1.5rem; }
.ec-content h3 { font-size: 1.2rem; }

.ec-content blockquote {
  border-left: 2px solid var(--eb-terra);
  margin: 2em 0;
  padding: 0.5em 0 0.5em 1.5em;
  font-style: italic;
  color: var(--eb-muted);
  text-indent: 0;
}

.ec-content em { color: rgba(232,224,212,0.95); }
.ec-content strong { color: #fff; font-weight: 600; }

/* Font size variants */
.ec-root[data-font-size="sm"] .ec-content { --ec-font-size: 0.95rem; }
.ec-root[data-font-size="md"] .ec-content { --ec-font-size: 1.15rem; }
.ec-root[data-font-size="lg"] .ec-content { --ec-font-size: 1.35rem; }

/* Line height variants */
.ec-root[data-spacing="compact"] .ec-content { --ec-line-height: 1.65; }
.ec-root[data-spacing="normal"]  .ec-content { --ec-line-height: 1.9; }
.ec-root[data-spacing="loose"]   .ec-content { --ec-line-height: 2.2; }

/* Theme variants */
.ec-root[data-theme="dark"]   { background: #0d0d14; }
.ec-root[data-theme="sepia"]  { background: #1a1508; }
.ec-root[data-theme="sepia"]  .ec-content { color: rgba(220, 200, 160, 0.82); }
.ec-root[data-theme="black"]  { background: #000; }

/* ── CHAPTER NAV ── */
.ec-nav {
  max-width: 680px;
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  border-top: 1px solid var(--eb-line);
}

.ec-nav-btn {
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.5rem;
  background: var(--eb-card);
  border: 1px solid var(--eb-line);
  border-radius: var(--eb-radius);
  text-decoration: none;
  color: inherit;
  transition: all 0.25s;
  gap: 0.3rem;
}

.ec-nav-btn:hover {
  background: var(--eb-card-h);
  border-color: rgba(var(--eb-terra-r), 0.25);
}

.ec-nav-btn.next { text-align: right; }

.ec-nav-direction {
  font-family: var(--eb-mono);
  font-size: 0.52rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--eb-terra);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ec-nav-btn.next .ec-nav-direction { justify-content: flex-end; }

.ec-nav-title {
  font-family: var(--eb-serif);
  font-size: 1rem;
  font-style: italic;
  color: rgba(255,255,255,0.75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ec-nav-placeholder {
  /* Slot gol */
}

/* ── TABLE OF CONTENTS (drawer) ── */
.ec-toc-drawer {
  position: fixed;
  top: 0; right: -360px;
  width: 340px;
  height: 100vh;
  background: var(--eb-surface);
  border-left: 1px solid var(--eb-line);
  z-index: 300;
  overflow-y: auto;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.ec-toc-drawer.open { right: 0; }

.ec-toc-header {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--eb-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.ec-toc-title {
  font-family: var(--eb-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--eb-gold);
}

.ec-toc-close {
  background: none;
  border: none;
  color: var(--eb-muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.2rem;
  transition: color 0.2s;
}

.ec-toc-close:hover { color: #fff; }

.ec-toc-list {
  flex: 1;
  padding: 1rem 0;
  overflow-y: auto;
}

.ec-toc-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  color: var(--eb-muted);
  transition: all 0.2s;
  font-family: var(--eb-serif);
  font-size: 0.95rem;
  font-style: italic;
  border-left: 2px solid transparent;
}

.ec-toc-item:hover {
  color: var(--eb-text);
  background: var(--eb-fog);
}

.ec-toc-item.active {
  color: var(--eb-terra);
  border-left-color: var(--eb-terra);
  background: rgba(var(--eb-terra-r), 0.05);
}

.ec-toc-item-num {
  font-family: var(--eb-mono);
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.2);
  flex-shrink: 0;
  min-width: 20px;
}

.ec-toc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 299;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
}

.ec-toc-overlay.open {
  opacity: 1;
  pointer-events: auto;
}


/* ═══════════════════════════════════════════════════════════════════════════
   4. ADMIN EDIT / DETAIL — .ea-
   ═══════════════════════════════════════════════════════════════════════════ */

.ea-root {
  background: var(--eb-bg);
  min-height: 100vh;
}

/* ── BREADCRUMB ── */
.ea-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 2rem 0;
  max-width: 1100px;
  margin: 0 auto;
  font-family: var(--eb-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: var(--eb-muted);
}

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

.ea-breadcrumb a:hover { color: #fff; }
.ea-breadcrumb-sep { color: var(--eb-line-h); }

/* ── PAGE HEADER ── */
.ea-page-header {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 2rem 2rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--eb-line);
}

.ea-page-title {
  font-family: var(--eb-serif);
  font-size: 2.5rem;
  font-weight: 400;
  font-style: italic;
  color: #fff;
  margin: 0 0 0.25rem;
}

.ea-page-sub {
  font-family: var(--eb-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: var(--eb-muted);
}

.ea-header-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* ── DETAIL LAYOUT (admin view) ── */
.ea-detail-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
}

/* ── EDIT FORM LAYOUT ── */
.ea-form-layout {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 3rem;
}

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

/* ── FORM CARD ── */
.ea-card {
  background: var(--eb-card);
  border: 1px solid var(--eb-line);
  border-radius: var(--eb-radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.ea-card-title {
  font-family: var(--eb-mono);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--eb-gold);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ea-card-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--eb-line-h);
}

/* ── FORM FIELDS ── */
.ea-field {
  margin-bottom: 1.25rem;
}

.ea-field:last-child { margin-bottom: 0; }

.ea-label {
  display: block;
  font-family: var(--eb-mono);
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--eb-muted);
  margin-bottom: 0.5rem;
}

.ea-label em {
  color: var(--eb-terra);
  font-style: normal;
  margin-left: 0.25rem;
}

.ea-input,
.ea-textarea,
.ea-select {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--eb-line-h);
  border-radius: 2px;
  padding: 0.75rem 1rem;
  font-family: var(--eb-serif);
  font-size: 1rem;
  color: var(--eb-text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

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

.ea-input::placeholder,
.ea-textarea::placeholder { color: rgba(255,255,255,0.18); }

.ea-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.ea-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(232,224,212,0.35)' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

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

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

.ea-hint {
  font-family: var(--eb-mono);
  font-size: 0.52rem;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.2);
  margin-top: 0.35rem;
}

/* ── COVER PREVIEW (sidebar) ── */
.ea-cover-preview {
  aspect-ratio: 2/3;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid var(--eb-line-h);
  background: var(--eb-card);
  margin-bottom: 1rem;
  position: relative;
}

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

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

.ea-cover-preview-icon {
  font-size: 2rem;
  color: rgba(255,255,255,0.1);
}

.ea-cover-preview-text {
  font-family: var(--eb-mono);
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.15);
  text-align: center;
}

/* ── STATUS INDICATOR (admin detail) ── */
.ea-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-family: var(--eb-mono);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ea-status-published {
  background: rgba(74,222,128,0.06);
  border: 1px solid rgba(74,222,128,0.2);
  color: rgba(74,222,128,0.8);
}

.ea-status-draft {
  background: rgba(251,191,36,0.05);
  border: 1px solid rgba(251,191,36,0.2);
  color: rgba(251,191,36,0.7);
}

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

/* ── CHAPTERS ADMIN TABLE ── */
.ea-chapters-table {
  border: 1px solid var(--eb-line);
  border-radius: var(--eb-radius);
  overflow: hidden;
}

.ea-table-header {
  display: grid;
  grid-template-columns: 48px 1fr 80px 80px 80px 60px;
  padding: 0.75rem 1.25rem;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--eb-line);
  font-family: var(--eb-mono);
  font-size: 0.5rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.2);
  gap: 1rem;
  align-items: center;
}

.ea-table-row {
  display: grid;
  grid-template-columns: 48px 1fr 80px 80px 80px 60px;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--eb-line);
  align-items: center;
  gap: 1rem;
  transition: background 0.2s;
  text-decoration: none;
  color: inherit;
}

.ea-table-row:last-child { border-bottom: none; }
.ea-table-row:hover { background: var(--eb-fog); }

.ea-table-num {
  font-family: var(--eb-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: var(--eb-muted);
  text-align: center;
}

.ea-table-title {
  font-family: var(--eb-serif);
  font-style: italic;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ea-table-meta {
  font-family: var(--eb-mono);
  font-size: 0.55rem;
  letter-spacing: 0.06em;
  color: var(--eb-muted);
  text-align: center;
}

.ea-table-badge {
  font-family: var(--eb-mono);
  font-size: 0.45rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  text-align: center;
}

.ea-badge-published {
  background: rgba(74,222,128,0.06);
  border: 1px solid rgba(74,222,128,0.18);
  color: rgba(74,222,128,0.7);
}

.ea-badge-draft {
  background: rgba(251,191,36,0.05);
  border: 1px solid rgba(251,191,36,0.18);
  color: rgba(251,191,36,0.6);
}

.ea-badge-free {
  background: rgba(var(--eb-terra-r), 0.06);
  border: 1px solid rgba(var(--eb-terra-r), 0.18);
  color: rgba(var(--eb-terra-r), 0.8);
}

.ea-table-actions {
  display: flex;
  justify-content: center;
}

.ea-table-action-btn {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: var(--eb-fog);
  border: 1px solid var(--eb-line-h);
  border-radius: 2px;
  color: var(--eb-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.ea-table-action-btn:hover {
  border-color: rgba(var(--eb-terra-r), 0.3);
  color: var(--eb-terra);
}

/* ── STAT CARDS (admin detail) ── */
.ea-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.ea-stat-card {
  background: var(--eb-card);
  border: 1px solid var(--eb-line);
  border-radius: var(--eb-radius);
  padding: 1.25rem;
}

.ea-stat-val {
  font-family: var(--eb-serif);
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  display: block;
}

.ea-stat-label {
  font-family: var(--eb-mono);
  font-size: 0.52rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--eb-muted);
  margin-top: 0.3rem;
  display: block;
}

/* ── FORM BUTTONS ── */
.ea-form-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 2rem;
}

.ea-btn-save {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 2rem;
  background: var(--eb-terra);
  color: #fff;
  font-family: var(--eb-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--eb-radius);
  cursor: pointer;
  transition: all 0.25s;
}

.ea-btn-save:hover {
  background: #d4692f;
  box-shadow: 0 6px 20px rgba(var(--eb-terra-r), 0.3);
}

.ea-btn-cancel {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  background: transparent;
  color: var(--eb-muted);
  font-family: var(--eb-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--eb-line-h);
  border-radius: var(--eb-radius);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s;
}

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

/* ── ALERT / FLASH ── */
.ea-alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border-radius: var(--eb-radius);
  font-family: var(--eb-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  margin-bottom: 1.5rem;
}

.ea-alert-success {
  background: rgba(74,222,128,0.05);
  border: 1px solid rgba(74,222,128,0.2);
  color: rgba(74,222,128,0.8);
}

.ea-alert-error {
  background: rgba(239,68,68,0.05);
  border: 1px solid rgba(239,68,68,0.2);
  color: rgba(239,68,68,0.8);
}


/* ═══════════════════════════════════════════════════════════════════════════
   5. ANIMAȚII GLOBALE
   ═══════════════════════════════════════════════════════════════════════════ */

@keyframes eb-fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes eb-spinIn {
  from { transform: rotate(-10deg) scale(0.9); opacity: 0; }
  to   { transform: rotate(0deg) scale(1); opacity: 1; }
}

.eb-anim-up { animation: eb-fadeUp 0.6s ease both; }
.eb-anim-up-2 { animation: eb-fadeUp 0.6s 0.1s ease both; }
.eb-anim-up-3 { animation: eb-fadeUp 0.6s 0.2s ease both; }
.eb-anim-up-4 { animation: eb-fadeUp 0.6s 0.3s ease both; }


/* ═══════════════════════════════════════════════════════════════════════════
   6. RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .eb-body {
    grid-template-columns: 1fr;
  }

  .eb-sidebar {
    order: -1;
  }

  .eb-buy-card {
    position: static;
  }

  .ea-detail-layout,
  .ea-form-layout {
    grid-template-columns: 1fr;
  }

  .ea-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .ea-table-header,
  .ea-table-row {
    grid-template-columns: 40px 1fr 70px 60px;
  }

  .ea-table-header > :nth-child(5),
  .ea-table-row > :nth-child(5),
  .ea-table-header > :last-child,
  .ea-table-row > :last-child {
    display: none;
  }
}

@media (max-width: 768px) {
  .el-hero { padding: 5rem 1.5rem 3.5rem; }
  .el-hero-title { font-size: 3rem; }
  .el-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; padding: 2rem 1.25rem 5rem; }
  .el-filters { padding: 1rem 1.25rem; }
  .el-stat { padding: 1.25rem 1.5rem; }

  .eb-hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .eb-hero-cover-wrap {
    display: flex;
    justify-content: center;
  }

  .eb-cover-img { width: 160px; }

  .eb-hero-meta { justify-content: center; }
  .eb-hero-actions { justify-content: center; }

  .ec-settings-panel { grid-template-columns: 1fr; }

  .ea-field-row { grid-template-columns: 1fr; }
  .ea-page-header { flex-direction: column; align-items: flex-start; }
  .ea-stats-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .el-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .el-card-row { grid-template-columns: 64px 1fr; }
  .el-row-right { display: none; }

  .ec-nav { grid-template-columns: 1fr; }
  .ec-toc-drawer { width: 100%; right: -100%; }

  .eb-hero-title { font-size: 2.25rem; }
}
