/* ==========================================================================
   STT El-Shadday Digital Repository — Custom Styles
   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:    #444;
  --bs-heading-color: #2c353d;
  --bs-border-color:  #e1e1e1;
  --bs-body-bg:       #f8f9fa;
  --bs-heading-font-family: 'Kreon', serif;
}

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

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary {
  background-color: var(--stt-gold);
  border-color: var(--stt-gold-dark);
  color: #2c353d;
  font-weight: 600;
}
.btn-primary:hover, .btn-primary:focus {
  background-color: var(--stt-gold-dark);
  border-color: var(--stt-gold-dark);
  color: #fff;
}
.btn-outline-primary {
  border-color: var(--stt-gold);
  color: var(--stt-slate);
}
.btn-outline-primary:hover {
  background-color: var(--stt-gold);
  border-color: var(--stt-gold);
  color: var(--stt-slate);
}
.bg-gold { background-color: var(--stt-gold) !important; }
.text-gold { color: var(--stt-gold) !important; }

/* ── Navbar ──────────────────────────────────────────────────────────────── */
.stt-navbar {
  background-color: var(--stt-slate) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.stt-navbar .navbar-brand span { font-family: 'Kreon', serif; font-size: 1rem; }
.stt-navbar .nav-link { color: #cdd3d8 !important; font-size: 0.9rem; }
.stt-navbar .nav-link:hover,
.stt-navbar .nav-link.active { color: var(--stt-gold) !important; }
.stt-navbar .dropdown-menu {
  border: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

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

/* ── Admin sidebar ───────────────────────────────────────────────────────── */
.admin-body { background: #f4f5f7; min-height: 100vh; }
#adminWrapper { min-height: 100vh; }

.stt-sidebar {
  width: 240px;
  min-height: 100vh;
  background: var(--stt-slate);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-brand { border-bottom: 1px solid var(--stt-slate-mid); }
.sidebar-divider { border-color: var(--stt-slate-mid); }
.sidebar-link {
  color: #cdd3d8 !important;
  font-size: 0.875rem;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: background 0.15s, color 0.15s;
}
.sidebar-link:hover { background: rgba(255,255,255,0.07); color: #fff !important; }
.sidebar-link.active { background: var(--stt-gold) !important; color: var(--stt-slate) !important; font-weight: 600; }
.text-danger-soft { color: #f87171 !important; }
.text-danger-soft:hover { color: #fff !important; background: rgba(239,68,68,0.15) !important; }

.admin-topbar {
  background: #fff;
  border-bottom: 1px solid #e1e1e1;
  min-height: 52px;
  position: sticky;
  top: 0;
  z-index: 100;
}

@media (max-width: 991px) {
  .stt-sidebar {
    position: fixed;
    left: -240px;
    z-index: 1050;
    transition: left 0.25s ease;
    height: 100vh;
  }
  .stt-sidebar.show { left: 0; }
}

/* ── Document cards ──────────────────────────────────────────────────────── */
.doc-card {
  background: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  transition: box-shadow 0.2s, transform 0.2s;
  height: 100%;
}
.doc-card:hover {
  box-shadow: 0 4px 18px rgba(44,53,61,0.12);
  transform: translateY(-2px);
}
.doc-card .doc-cover {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
  background: #eee;
}
.doc-cover-placeholder {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, var(--stt-slate) 0%, var(--stt-slate-mid) 100%);
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.3);
  font-size: 2.5rem;
}
.doc-type-badge {
  background: var(--stt-gold);
  color: var(--stt-slate);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ── Status badges ───────────────────────────────────────────────────────── */
.status-draft      { background:#6c757d; color:#fff; }
.status-submitted  { background:#0693e3; color:#fff; }
.status-review     { background:#7c4dff; color:#fff; }
.status-revision   { background:#ff9800; color:#fff; }
.status-published  { background:#357b49; color:#fff; }
.status-rejected   { background:#cf2e2e; color:#fff; }
.status-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table-stt thead th {
  background: var(--stt-slate);
  color: #e1e1e1;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
}
.table-stt tbody tr:hover { background: #f8f9fa; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.stt-footer {
  background: var(--stt-slate);
  color: #cdd3d8;
}
.stt-footer a { color: var(--stt-gold); text-decoration: none; }
.stt-footer a:hover { color: var(--stt-gold-light); }

/* ── PDF Viewer ──────────────────────────────────────────────────────────── */
#pdfViewerWrap {
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}
#pdfWatermark {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 10;
  opacity: 0.15;
}

/* ── Utility ─────────────────────────────────────────────────────────────── */
.border-top-gold { border-top: 3px solid var(--stt-gold) !important; }
.card-stt { border: 1px solid #e1e1e1; border-radius: 8px; background: #fff; }
.section-title { font-family: 'Kreon', serif; color: var(--stt-slate); font-size: 1.4rem; margin-bottom: 1.25rem; }
