/* ============================================================
   STT El-Shadday E-Library — Custom CSS
   Brand: Gold (#efbb20) + Dark Slate (#2c353d)
   ============================================================ */

:root {
  --stt-gold:        #efbb20;
  --stt-gold-dark:   #cd9900;
  --stt-gold-light:  #ffdd42;
  --stt-slate:       #2c353d;
  --stt-slate-mid:   #454e57;
  --stt-slate-muted: #5b646b;

  --bs-primary:      #efbb20;
  --bs-primary-rgb:  239, 187, 32;
  --bs-dark:         #2c353d;
  --bs-dark-rgb:     44, 53, 61;
  --bs-body-color:   #444444;
  --bs-border-color: #e1e1e1;
}

/* ─── Typography ─────────────────────────────────── */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: 'Kreon', serif;
  color: var(--stt-slate);
}

/* ─── Buttons ────────────────────────────────────── */
.btn-primary {
  background-color: var(--stt-gold);
  border-color: var(--stt-gold-dark);
  color: var(--stt-slate);
  font-weight: 600;
}
.btn-primary:hover, .btn-primary:focus {
  background-color: var(--stt-gold-dark);
  border-color: var(--stt-gold-dark);
  color: #fff;
}
.btn-dark {
  background-color: var(--stt-slate);
  border-color: var(--stt-slate);
}
.btn-dark:hover {
  background-color: var(--stt-slate-mid);
  border-color: var(--stt-slate-mid);
}

/* ─── Navbar ──────────────────────────────────────── */
.navbar-main {
  background-color: var(--stt-slate);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.navbar-main .navbar-brand img {
  height: 44px;
  width: auto;
}
.navbar-main .navbar-brand span {
  color: var(--stt-gold);
  font-family: 'Kreon', serif;
  font-size: 1.1rem;
  font-weight: 700;
}
.navbar-main .nav-link {
  color: #d0d0d0 !important;
  font-size: 0.92rem;
  padding: 0.5rem 0.85rem;
  transition: color 0.2s;
}
.navbar-main .nav-link:hover,
.navbar-main .nav-link.active {
  color: var(--stt-gold) !important;
}
.navbar-main .nav-link.active {
  border-bottom: 2px solid var(--stt-gold);
}
.navbar-toggler {
  border-color: rgba(239,187,32,0.5);
}
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(239, 187, 32, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ─── Sidebar (Admin) ─────────────────────────────── */
.admin-sidebar {
  background-color: var(--stt-slate);
  min-height: 100vh;
  width: 240px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  padding-top: 1rem;
}
.admin-sidebar .sidebar-brand {
  padding: 0.75rem 1.25rem 1.25rem;
  border-bottom: 1px solid var(--stt-slate-mid);
  margin-bottom: 0.5rem;
}
.admin-sidebar .sidebar-brand img { height: 40px; }
.admin-sidebar .sidebar-brand span {
  color: var(--stt-gold);
  font-family: 'Kreon', serif;
  font-weight: 700;
  font-size: 1rem;
  display: block;
  margin-top: 0.35rem;
}
.admin-sidebar .nav-link {
  color: #c8cdd2;
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
  border-left: 3px solid transparent;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
  color: var(--stt-gold);
  background-color: rgba(239,187,32,0.08);
  border-left-color: var(--stt-gold);
}
.admin-sidebar .nav-section {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--stt-slate-muted);
  padding: 1rem 1.25rem 0.25rem;
}
.admin-content {
  margin-left: 240px;
  padding: 1.5rem;
}

/* ─── Cards ───────────────────────────────────────── */
.collection-card {
  border: 1px solid var(--bs-border-color);
  border-radius: 8px;
  transition: box-shadow 0.2s, transform 0.2s;
  overflow: hidden;
}
.collection-card:hover {
  box-shadow: 0 6px 20px rgba(44,53,61,0.15);
  transform: translateY(-2px);
}
.collection-card .card-cover {
  height: 180px;
  object-fit: cover;
  width: 100%;
  background-color: #f0f0f0;
}
.collection-card .cover-placeholder {
  height: 180px;
  background: linear-gradient(135deg, var(--stt-slate) 0%, var(--stt-slate-mid) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--stt-gold);
  font-size: 3rem;
}
.badge-type {
  background-color: var(--stt-gold);
  color: var(--stt-slate);
  font-size: 0.72rem;
  font-weight: 700;
}
.badge-premium {
  background-color: var(--stt-slate);
  color: var(--stt-gold);
  font-size: 0.72rem;
}

/* ─── Search bar ──────────────────────────────────── */
.search-hero {
  background: linear-gradient(135deg, var(--stt-slate) 0%, #3a4754 100%);
  padding: 2.5rem 0;
}
.search-hero h1 {
  color: #fff;
  font-family: 'Kreon', serif;
}
.search-hero p { color: #c8cdd2; }
.search-hero .input-group .form-control {
  border-color: transparent;
  box-shadow: none;
  border-radius: 6px 0 0 6px;
}
.search-hero .btn-search {
  background-color: var(--stt-gold);
  color: var(--stt-slate);
  font-weight: 700;
  border: none;
  border-radius: 0 6px 6px 0;
  padding: 0 1.5rem;
}
.search-hero .btn-search:hover {
  background-color: var(--stt-gold-dark);
}

/* ─── Footer ──────────────────────────────────────── */
footer.main-footer {
  background-color: var(--stt-slate);
  color: #9aa3ab;
  padding: 2rem 0 1rem;
  margin-top: 3rem;
}
footer.main-footer h6 {
  color: #fff;
  font-family: 'Kreon', serif;
  margin-bottom: 0.75rem;
}
footer.main-footer a {
  color: var(--stt-gold);
  text-decoration: none;
}
footer.main-footer a:hover { color: var(--stt-gold-light); }
footer.main-footer .footer-bottom {
  border-top: 1px solid var(--stt-slate-mid);
  margin-top: 1.5rem;
  padding-top: 1rem;
  font-size: 0.83rem;
  color: var(--stt-slate-muted);
}

/* ─── Auth pages ──────────────────────────────────── */
.auth-wrapper {
  min-height: 100vh;
  background-color: #f4f5f7;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(44,53,61,0.1);
  border-top: 4px solid var(--stt-gold);
  width: 100%;
  max-width: 420px;
  padding: 2.5rem 2rem;
}
.auth-card .auth-logo {
  text-align: center;
  margin-bottom: 1.5rem;
}
.auth-card .auth-logo img { height: 64px; }
.auth-card .auth-logo h5 {
  font-family: 'Kreon', serif;
  color: var(--stt-slate);
  margin-top: 0.5rem;
}

/* ─── Stats cards (Admin dashboard) ──────────────── */
.stat-card {
  border: none;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.stat-card .stat-icon {
  font-size: 2rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  color: var(--stt-slate);
}
.stat-card .stat-label {
  font-size: 0.83rem;
  color: #6c757d;
  margin-top: 0.2rem;
}
.stat-gold   { background: linear-gradient(135deg, #fff9e6, #fff3c0); }
.stat-blue   { background: linear-gradient(135deg, #e8f4fd, #cce5ff); }
.stat-green  { background: linear-gradient(135deg, #e8f8f0, #c3e6cb); }
.stat-slate  { background: linear-gradient(135deg, #eef0f2, #dee2e6); }
.icon-gold   { background: rgba(239,187,32,0.15); color: var(--stt-gold-dark); }
.icon-blue   { background: rgba(6,147,227,0.12); color: #0693e3; }
.icon-green  { background: rgba(53,123,73,0.12); color: #357b49; }
.icon-slate  { background: rgba(44,53,61,0.1);   color: var(--stt-slate); }

/* ─── Table ───────────────────────────────────────── */
.table th {
  background-color: #f8f9fa;
  color: var(--stt-slate);
  font-family: 'Kreon', serif;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-top: none;
}

/* ─── Pagination ──────────────────────────────────── */
.page-item.active .page-link {
  background-color: var(--stt-gold);
  border-color: var(--stt-gold-dark);
  color: var(--stt-slate);
  font-weight: 700;
}
.page-link { color: var(--stt-slate); }
.page-link:hover { color: var(--stt-gold-dark); }

/* ─── Alert accent ────────────────────────────────── */
.alert-warning { border-left: 4px solid var(--stt-gold); }
.alert-danger   { border-left: 4px solid #cf2e2e; }
.alert-success  { border-left: 4px solid #357b49; }

/* ─── PDF Viewer ──────────────────────────────────── */
#pdf-viewer-wrapper {
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}
#pdf-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-35deg);
  font-size: 1.5rem;
  color: rgba(44,53,61,0.12);
  pointer-events: none;
  white-space: nowrap;
  font-family: 'Kreon', serif;
  font-weight: 700;
  z-index: 10;
}
