/* EbookHub — premium digital bookstore theme */
:root {
  --ebh-navy: #0a1830;
  --ebh-navy-2: #0e2140;
  --ebh-navy-3: #132c52;
  --ebh-electric: #2f7bff;
  --ebh-electric-dark: #1a5fe0;
  --ebh-electric-light: #7fb0ff;
  --ebh-gray: #f4f6fa;
  --ebh-gray-dark: #e6ebf3;
  --ebh-text: #1c2740;
  --ebh-muted: #64748b;
  --ebh-radius: 14px;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ebh-text);
  background: #fff;
}

.text-electric { color: var(--ebh-electric) !important; }
.bg-navy { background: var(--ebh-navy) !important; }

.btn-electric {
  background: var(--ebh-electric);
  border-color: var(--ebh-electric);
  color: #fff;
  font-weight: 600;
}
.btn-electric:hover, .btn-electric:focus {
  background: var(--ebh-electric-dark);
  border-color: var(--ebh-electric-dark);
  color: #fff;
}
.btn-outline-electric {
  border: 1.5px solid var(--ebh-electric);
  color: var(--ebh-electric);
  font-weight: 600;
}
.btn-outline-electric:hover {
  background: var(--ebh-electric);
  color: #fff;
}

/* ---------- Navbar / footer ---------- */
.ebh-nav {
  background: linear-gradient(135deg, var(--ebh-navy) 0%, var(--ebh-navy-2) 100%);
  box-shadow: 0 2px 18px rgba(10, 24, 48, .35);
}
.ebh-nav .nav-link { color: rgba(255,255,255,.82); font-weight: 500; }
.ebh-nav .nav-link:hover { color: #fff; }
.ebh-logo {
  height: 38px; width: 38px; object-fit: cover; border-radius: 10px;
  background: #fff;
}
.ebh-footer { background: var(--ebh-navy); }
.ebh-footer a { color: rgba(255,255,255,.65); text-decoration: none; }
.ebh-footer a:hover { color: #fff; }

.ebh-main { min-height: 60vh; }

/* ---------- Hero ---------- */
.ebh-hero {
  background: radial-gradient(1200px 500px at 80% -10%, rgba(47,123,255,.35), transparent),
              linear-gradient(135deg, var(--ebh-navy) 0%, var(--ebh-navy-3) 100%);
  color: #fff;
  border-radius: 22px;
  overflow: hidden;
}
.ebh-hero h1 { font-weight: 800; letter-spacing: -.5px; }
.ebh-stat { background: rgba(255,255,255,.08); border-radius: var(--ebh-radius); }

/* ---------- Ebook cards ---------- */
.ebh-card {
  border: 1px solid var(--ebh-gray-dark);
  border-radius: var(--ebh-radius);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
  background: #fff;
  height: 100%;
}
.ebh-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(10,24,48,.14); }
.ebh-cover {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  width: 100%;
  background: var(--ebh-gray);
}
.ebh-cover-fallback {
  aspect-ratio: 3 / 4;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--ebh-navy-2), var(--ebh-electric-dark));
  color: #fff; font-size: 2.4rem; font-weight: 800; text-align: center; padding: 1rem;
}
.ebh-price { font-size: 1.15rem; font-weight: 800; color: var(--ebh-navy); }
.ebh-price-old { text-decoration: line-through; color: var(--ebh-muted); font-size: .9rem; }
.ebh-discount {
  background: #e8f5e9; color: #1b7a3d; font-weight: 700; font-size: .78rem;
  border-radius: 999px; padding: .15rem .6rem;
}

/* ---------- Dashboard cards ---------- */
.ebh-dash-card {
  border: none; border-radius: var(--ebh-radius); color: #fff;
  background: linear-gradient(135deg, var(--ebh-navy-2), var(--ebh-navy-3));
  overflow: hidden; position: relative;
}
.ebh-dash-card.accent { background: linear-gradient(135deg, var(--ebh-electric-dark), var(--ebh-electric)); }
.ebh-dash-card .display-6 { font-weight: 800; }
.ebh-dash-card .bi { opacity: .9; }

/* ---------- Admin ---------- */
.ebh-admin { background: var(--ebh-gray); }
.ebh-sidebar {
  width: 250px; min-height: 100vh;
  background: linear-gradient(180deg, var(--ebh-navy), var(--ebh-navy-2));
  position: sticky; top: 0; height: 100vh;
}
.ebh-sidebar .nav-link { color: rgba(255,255,255,.72); border-radius: 10px; margin-bottom: 2px; }
.ebh-sidebar .nav-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.ebh-sidebar .nav-link.active { background: var(--ebh-electric); color: #fff; font-weight: 600; }
.ebh-admin-main { min-height: 100vh; }
.ebh-table-card { border-radius: var(--ebh-radius); overflow: hidden; border: 1px solid var(--ebh-gray-dark); }

/* ---------- Misc ---------- */
.ebh-section-title { font-weight: 800; letter-spacing: -.3px; color: var(--ebh-navy); }
.ebh-badge-soft { background: rgba(47,123,255,.12); color: var(--ebh-electric-dark); font-weight: 600; }

.form-control:focus, .form-select:focus {
  border-color: var(--ebh-electric);
  box-shadow: 0 0 0 .2rem rgba(47,123,255,.18);
}
.invalid-feedback { display: block; }

.ebh-spinner-overlay {
  position: fixed; inset: 0; background: rgba(10,24,48,.45);
  display: none; align-items: center; justify-content: center; z-index: 2000;
}
.ebh-spinner-overlay.show { display: flex; }

.ebh-payment-hero { border-radius: 22px; }
.ebh-check { font-size: 4rem; }

@media (max-width: 991.98px) {
  .ebh-sidebar { width: 100%; height: auto; position: static; min-height: auto; }
  .ebh-admin > .d-flex { flex-direction: column; }
}
