/* =============================================
   eReader Digital Books – Modern Professional Theme
   ============================================= */

/* Google Fonts: Inter is loaded via _Layout.cshtml */

/* Self-hosted brand typeface (landing page): menu = Medium, headings = Bold, body copy = Regular */
@font-face {
  font-family: 'Montserrat';
  src: url('/fonts/Montserrat-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('/fonts/Montserrat-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('/fonts/Montserrat-SemiBold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('/fonts/Montserrat-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('/fonts/Montserrat-ExtraBold.otf') format('opentype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'KG Blank Space Solid';
  src: url('/fonts/KGBlankSpaceSolid.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy:       #5c5c5c;   /* brand gray (primary dark) */
  --navy-dark:  #3a3a3a;   /* deeper gray */
  --accent:     #ee9100;   /* brand orange (fills / highlights) */
  --accent2:    #bf5100;   /* burnt orange (gradient depth) */
  --accent-ink: #1d1d1b;   /* text/icons that sit on orange — stays near-black for contrast regardless of --navy */
  --gold-deep:  #b8501a;   /* readable burnt orange for accent text on light bg */
  --accent-tint: #fff1de;  /* light orange tint behind icon badges */
  --accent-hover: #ffde1a; /* brighter fill on hover for accent buttons */
  --accent-deep: #d9b400;  /* deep-gold gradient stop (feature icons, page headers) */
  --accent-glow-rgb: 246,209,0; /* nav/dropdown hover glow and focus rings, as an rgba() triple */
  --danger:      #d9362b;  /* needs-attention alerts (distinct from --accent) */
  --danger-tint: #fdece9;
  --success:     #1f9d55;  /* status badges, e.g. Active */
  --success-tint:#e8f8ee;
  --bg:         #f6f5f1;
  --surface:    #ffffff;
  --shelf-black:      #1d1d1b; /* EReader shelf: welcome-banner-bottom fill */
  --shelf-card-black:  #2a2a25; /* EReader shelf: book-card / meta-bubble fill */
  --text:       #1d1d1b;
  --text-muted: #6e6e66;
  --border:     #e6e3da;
  --shadow-sm:  0 2px 8px rgba(0,0,0,.08);
  --shadow-md:  0 6px 24px rgba(0,0,0,.14);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.20);
  --radius:     10px;
  --transition: .22s ease;
}

/* ---- Reset / Base ---- */
html { font-size: 15px; position: relative; min-height: 100%; }

@media (min-width: 768px) { html { font-size: 16px; } }

body {
  font-family: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin-bottom: 70px;
}

/* ---- Navbar ---- */
.navbar {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%) !important;
  border-bottom: none !important;
  box-shadow: 0 2px 16px rgba(0,0,0,.30) !important;
  padding: .65rem 1.25rem;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -.3px;
  display: flex;
  align-items: center;
  gap: .55rem;
  color: #fff !important;
}

.navbar-brand .brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  border-radius: 8px;
  font-size: .85rem;
  color: #fff;
  flex-shrink: 0;
}

.navbar-brand .brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
}

.navbar-brand span { color: #fff; }

.nav-link {
  color: rgba(255,255,255,.80) !important;
  font-size: .875rem;
  font-weight: 500;
  padding: .42rem .75rem !important;
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.nav-link:hover,
.nav-link:focus {
  color: var(--accent) !important;
  background: rgba(var(--accent-glow-rgb),.14);
}
.nav-link.active {
  color: var(--accent) !important;
  background: rgba(var(--accent-glow-rgb),.20);
}

/* dropdown */
.dropdown-menu {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: .4rem;
  min-width: 180px;
}
.dropdown-item {
  border-radius: 6px;
  font-size: .875rem;
  padding: .45rem .85rem;
  color: var(--text);
  transition: background var(--transition);
}
.dropdown-item:hover { background: rgba(var(--accent-glow-rgb),.16); color: var(--navy); }

/* ---- Left sidebar navigation (_Layout) ----
   xl+ : docked on the left; html.sidebar-collapsed shrinks it to an icon rail.
   <xl : a slim top bar; html.sidebar-open slides the sidebar in as a drawer.
   --sidebar-offset is how much of the viewport's left edge the sidebar covers,
   so other fixed left-anchored UI (chatbot, reader panels) can sit beside it. */
body.with-sidebar {
  --sidebar-w: 256px;
  --sidebar-rail-w: 72px;
  --sidebar-offset: 0px;
}

.app-topbar {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem 1rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  box-shadow: 0 2px 16px rgba(0,0,0,.30);
  position: sticky;
  top: 0;
  z-index: 1030;
}
.app-topbar .navbar-brand { font-size: 1.05rem; margin: 0; min-width: 0; }
.app-topbar .navbar-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-topbar-btn,
.sidebar-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font-size: 1.2rem;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.app-topbar-btn:hover,
.sidebar-close-btn:hover { background: rgba(var(--accent-glow-rgb),.14); color: var(--accent); }

.app-sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 280px;
  max-width: 86vw;
  z-index: 1045;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--navy-dark) 0%, var(--navy) 100%);
  box-shadow: 2px 0 16px rgba(0,0,0,.30);
  transform: translateX(-100%);
  visibility: hidden;
  transition: transform .25s ease, visibility .25s;
}
html.sidebar-open .app-sidebar { transform: none; visibility: visible; }

.app-sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1044;
  background: rgba(0,0,0,.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s;
}
html.sidebar-open .app-sidebar-backdrop { opacity: 1; visibility: visible; }

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .85rem .9rem .6rem 1rem;
  flex-shrink: 0;
}
.sidebar-top .navbar-brand { margin: 0; min-width: 0; font-size: 1.08rem; line-height: 1.2; }

.sidebar-collapse-btn {
  display: none; /* xl+ only */
  align-items: center;
  gap: .7rem;
  margin: 0 .75rem .35rem;
  padding: .42rem .75rem;
  border: none;
  border-radius: 6px;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.70);
  font-size: .8rem;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}
.sidebar-collapse-btn i { width: 1.25rem; text-align: center; transition: transform .25s ease; }
.sidebar-collapse-btn:hover { background: rgba(var(--accent-glow-rgb),.14); color: var(--accent); }

.sidebar-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: .25rem .75rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.25) transparent;
}
.sidebar-bottom {
  flex-shrink: 0;
  padding: .6rem .75rem .9rem;
  border-top: 1px solid rgba(255,255,255,.10);
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.sidebar-nav { gap: 2px; }
.sidebar-nav .nav-link,
.sidebar-account .sidebar-user {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-size: .9rem;
  padding: .55rem .75rem !important;
}
.sidebar-nav .nav-link > i:first-child,
.sidebar-user > i:first-child,
.sidebar-logout > i:first-child { width: 1.25rem; text-align: center; flex-shrink: 0; font-size: 1rem; }
.nav-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-caret { margin-left: auto; font-size: .7rem; transition: transform .2s ease; }
.sidebar-group-toggle:not(.collapsed) .sidebar-caret { transform: rotate(180deg); }
.sidebar-group-toggle:not(.collapsed) { color: #fff !important; }

.sidebar-submenu {
  list-style: none;
  margin: 2px 0 4px;
  padding: 0 0 0 1.55rem;
}
.sidebar-sublink {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .38rem .75rem;
  border-radius: 6px;
  color: rgba(255,255,255,.72);
  font-size: .84rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}
.sidebar-sublink i { width: 1rem; text-align: center; font-size: .8rem; opacity: .85; }
.sidebar-sublink:hover,
.sidebar-sublink:focus { color: var(--accent); background: rgba(var(--accent-glow-rgb),.14); }
.sidebar-sublink.active { color: var(--accent); background: rgba(var(--accent-glow-rgb),.20); }
.sidebar-subheader {
  padding: .55rem .75rem .2rem;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
}
.sidebar-subdivider { height: 1px; margin: .35rem .75rem; background: rgba(255,255,255,.12); }

.sidebar-account { display: flex; flex-direction: column; gap: .5rem; }
.sidebar-account .sidebar-user {
  color: #fff !important;
  font-weight: 600;
  border-radius: 6px;
  min-width: 0;
}
.sidebar-account .dropdown-toggle::after { margin-left: auto; }
.sidebar-account .dropdown-menu { min-width: 200px; }
.sidebar-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
}

@media (min-width: 1200px) {
  body.with-sidebar { --sidebar-offset: var(--sidebar-w); padding-left: var(--sidebar-w); }
  html.sidebar-collapsed body.with-sidebar { --sidebar-w: var(--sidebar-rail-w); }
  body.with-sidebar .footer { left: var(--sidebar-w); right: 0; width: auto; }
  body.with-sidebar .app-content { padding-top: 1.25rem; }

  .app-topbar,
  .app-sidebar-backdrop,
  .sidebar-close-btn { display: none; }
  .app-sidebar {
    width: var(--sidebar-w);
    max-width: none;
    transform: none;
    visibility: visible;
    z-index: 1035;
  }
  .sidebar-collapse-btn { display: flex; }

  /* Only animate once the page has settled, so a remembered collapsed state
     doesn't visibly animate on every page load. */
  html.sidebar-animate body.with-sidebar,
  html.sidebar-animate .app-sidebar,
  html.sidebar-animate .footer { transition: padding-left .25s ease, width .25s ease, left .25s ease; }

  /* Collapsed icon rail */
  html.sidebar-collapsed .app-sidebar .nav-label,
  html.sidebar-collapsed .app-sidebar .sidebar-caret,
  html.sidebar-collapsed .app-sidebar .sidebar-submenu,
  html.sidebar-collapsed .sidebar-account .dropdown-toggle::after { display: none !important; }
  html.sidebar-collapsed .sidebar-top { justify-content: center; padding-left: 0; padding-right: 0; }
  html.sidebar-collapsed .sidebar-scroll,
  html.sidebar-collapsed .sidebar-bottom { padding-left: .6rem; padding-right: .6rem; }
  html.sidebar-collapsed .sidebar-collapse-btn { margin-left: .6rem; margin-right: .6rem; justify-content: center; padding-left: 0; padding-right: 0; }
  html.sidebar-collapsed .sidebar-collapse-btn i { transform: rotate(180deg); }
  html.sidebar-collapsed .sidebar-nav .nav-link,
  html.sidebar-collapsed .sidebar-account .sidebar-user { justify-content: center; padding-left: 0 !important; padding-right: 0 !important; }
  html.sidebar-collapsed .sidebar-logout { padding-left: 0; padding-right: 0; }
}

/* ---- Alerts ---- */
.alert {
  border: none;
  border-radius: var(--radius);
  font-size: .9rem;
  box-shadow: var(--shadow-sm);
}

/* ---- Cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 1rem;
}

/* ---- Buttons ---- */
.btn {
  font-weight: 500;
  border-radius: 8px;
  transition: all var(--transition);
  font-size: .875rem;
}
.btn:focus, .btn:active:focus,
.form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(var(--accent-glow-rgb),.45);
}

.btn-primary {
  background: var(--accent);
  border: none;
  color: var(--accent-ink);
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--accent-ink);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-success {
  background: linear-gradient(135deg, #1b7a4e, #26a869);
  border: none;
}
.btn-success:hover {
  background: linear-gradient(135deg, #155f3e, #1e9458);
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, #b91c1c, #e4574c);
  border: none;
}
.btn-danger:hover {
  background: linear-gradient(135deg, #991b1b, #c73652);
  transform: translateY(-1px);
}

.btn-outline-primary {
  border-color: var(--navy);
  color: var(--navy);
}
.btn-outline-primary:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.btn-outline-secondary {
  border-color: var(--border);
  color: var(--text-muted);
}
.btn-outline-secondary:hover {
  background: var(--bg);
  color: var(--text);
  border-color: #c5cdd8;
}

/* ---- Forms ---- */
.form-control, .form-select {
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: .9rem;
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  padding: .5rem .85rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-glow-rgb),.30);
}
.form-label {
  font-weight: 500;
  font-size: .875rem;
  color: var(--text);
  margin-bottom: .35rem;
}

/* Password visibility toggle — injected around every input[type=password]
   by js/site.js so individual forms don't need to opt in. */
.password-field-wrapper {
  position: relative;
}
.password-field-wrapper .form-control {
  padding-right: 2.6rem;
}
.password-toggle-btn {
  position: absolute;
  top: 50%;
  right: .35rem;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: .3rem .55rem;
  color: var(--text-muted);
  font-size: .95rem;
  line-height: 1;
  cursor: pointer;
}
.password-toggle-btn:hover,
.password-toggle-btn:focus {
  color: var(--accent);
}

/* ---- Tables ---- */
.table {
  font-size: .875rem;
  color: var(--text);
}
.table thead th {
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .4px;
  text-transform: uppercase;
  border: none;
  padding: .75rem 1rem;
}
.table thead th:first-child { border-radius: 8px 0 0 0; }
.table thead th:last-child  { border-radius: 0 8px 0 0; }
.table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.table tbody tr:hover { background: rgba(var(--accent-glow-rgb),.10); }
.table tbody td { padding: .7rem 1rem; vertical-align: middle; }
.table-striped > tbody > tr:nth-of-type(odd) > * { background: rgba(0,0,0,.025); }

/* ---- Page titles ---- */
.page-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -.4px;
}
.page-subtitle {
  color: var(--text-muted);
  font-size: .92rem;
}

/* ---- Hero (homepage) ---- */
.hero-section {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 55%, var(--accent2) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 3rem 2.5rem 2.5rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 280px; height: 280px;
  background: rgba(255,255,255,.05);
  border-radius: 50%;
}
.hero-section::after {
  content: '';
  position: absolute;
  bottom: -80px; left: 30%;
  width: 200px; height: 200px;
  background: rgba(255,255,255,.04);
  border-radius: 50%;
}
.hero-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.5px;
  margin-bottom: .5rem;
}
.hero-lead {
  font-size: 1rem;
  opacity: .80;
  margin-bottom: 1.75rem;
}
.hero-btn {
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
  font-weight: 600;
  padding: .65rem 1.6rem;
  border-radius: 50px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  transition: background var(--transition), transform var(--transition);
  font-size: .9rem;
}
.hero-btn:hover {
  background: rgba(255,255,255,.28);
  color: #fff;
  transform: translateY(-2px);
}
.hero-btn-solid {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-ink);
}
.hero-btn-solid:hover {
  background: var(--accent-hover);
  color: var(--accent-ink);
}

.stat-card {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  text-align: center;
  backdrop-filter: blur(4px);
}
.stat-card .stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: .15rem;
}
.stat-card .stat-label {
  font-size: .78rem;
  opacity: .75;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ---- Search bar ---- */
.search-bar-wrapper {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  margin-bottom: 1.75rem;
}

/* ---- Book cards ---- */
.book-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.book-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.book-card-cover {
  background: linear-gradient(135deg, var(--navy) 0%, var(--accent2) 100%);
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: rgba(255,255,255,.55);
}
.book-card-body {
  padding: 1rem 1.1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.book-card-title {
  font-weight: 700;
  font-size: .95rem;
  color: var(--navy);
  margin-bottom: .3rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.book-card-author {
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: .6rem;
}
.book-card-meta {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: .6rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

/* ---- Empty state ---- */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.empty-state-icon {
  width: 80px; height: 80px;
  background: linear-gradient(135deg, var(--navy), var(--accent2));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 1.8rem;
  color: rgba(255,255,255,.6);
}
.empty-state h5 {
  font-weight: 700;
  color: var(--text);
  margin-bottom: .4rem;
}
.empty-state p { font-size: .9rem; margin-bottom: 1.25rem; }

/* ---- Badge ---- */
.badge {
  font-weight: 500;
  border-radius: 50px;
  padding: .3em .75em;
  font-size: .74rem;
}

/* ---- Footer ---- */
.footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,.55);
  font-size: .82rem;
  padding: 1rem 0;
  position: absolute;
  bottom: 0;
  width: 100%;
}
.footer a { color: rgba(255,255,255,.7); }
.footer a:hover { color: #fff; }

/* ---- Pagination ---- */
.page-link {
  border-radius: 6px !important;
  margin: 0 2px;
  border: 1px solid var(--border);
  color: var(--navy);
  font-size: .85rem;
  transition: all var(--transition);
}
.page-link:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.page-item.active .page-link { background: var(--navy); border-color: var(--navy); }

/* ---- Misc utilities ---- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.section-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
}
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

/* ---- Scroll fade in ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .45s ease both; }

/* =============================================
   Landing Page
   ============================================= */

/* --- Hero --- */
.lp-hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 55%, var(--accent2) 100%);
  border-radius: 16px;
  padding: 3.5rem 2.75rem 3rem;
  margin-bottom: 2.5rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.lp-hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}
.lp-hero-glow-1 {
  width: 320px; height: 320px;
  background: rgba(var(--accent-glow-rgb),.25);
  top: -80px; right: -60px;
}
.lp-hero-glow-2 {
  width: 240px; height: 240px;
  background: rgba(217,180,0,.28);
  bottom: -80px; left: 20%;
}
.lp-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.9);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: .3rem .9rem;
  border-radius: 50px;
}
.lp-hero-title {
  font-family: 'KG Blank Space Solid', 'Montserrat', 'Inter', sans-serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -.5px;
  margin-bottom: .75rem;
}
.lp-gradient-text {
  background: linear-gradient(90deg, var(--accent), #ffe569);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.lp-hero-lead {
  font-size: 1.05rem;
  opacity: .8;
  max-width: 460px;
  line-height: 1.6;
}

/* --- Hero buttons --- */
.lp-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.75rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}
.lp-btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.lp-btn-primary:hover {
  color: var(--accent-ink);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(var(--accent-glow-rgb),.45);
}
.lp-btn-ghost {
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
}
.lp-btn-ghost:hover {
  background: rgba(255,255,255,.24);
  color: #fff;
  transform: translateY(-2px);
}

/* --- Hero feature cards --- */
.lp-hero-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.lp-hcard {
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: .85rem;
  backdrop-filter: blur(6px);
  transition: background var(--transition), transform var(--transition);
}
.lp-hcard:hover {
  background: rgba(255,255,255,.16);
  transform: translateY(-3px);
}
.lp-hcard i { opacity: .85; flex-shrink: 0; }
.lp-hcard-label { font-weight: 700; font-size: .92rem; }
.lp-hcard-sub   { font-size: .75rem; opacity: .65; margin-top: .1rem; }

/* card accent colours */
.lp-hcard-1 { border-top: 2px solid rgba(var(--accent-glow-rgb),.6); }
.lp-hcard-2 { border-top: 2px solid rgba(217,180,0,.6); }
.lp-hcard-3 { border-top: 2px solid rgba(var(--accent-glow-rgb),.4); }
.lp-hcard-4 { border-top: 2px solid rgba(255,255,255,.35); }

/* --- Section header --- */
.lp-section { margin-bottom: 2.5rem; }
.lp-section-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: .35rem;
}
.lp-section-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -.3px;
  margin: 0;
}

/* --- Feature cards --- */
.lp-feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.6rem 1.5rem;
  height: 100%;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.lp-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.lp-feature-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}
.lp-feature-card h5 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .5rem;
}
.lp-feature-card p {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
  margin-bottom: 1rem;
}
.lp-feature-link {
  font-size: .82rem;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  transition: gap var(--transition), color var(--transition);
}
.lp-feature-link:hover { color: var(--gold-deep); gap: .55rem; }

/* --- Quick tiles --- */
.lp-quick-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.4rem .75rem;
  text-decoration: none;
  color: var(--navy);
  font-weight: 600;
  font-size: .82rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}
.lp-quick-tile i {
  font-size: 1.4rem;
  color: var(--navy);
  opacity: .75;
  transition: opacity var(--transition);
}
.lp-quick-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  color: #fff;
  border-color: transparent;
}
.lp-quick-tile:hover i { opacity: 1; color: #fff; }

/* --- CTA banner --- */
.lp-cta {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 60%, var(--accent2) 100%);
  border-radius: 16px;
  padding: 2.5rem 2.75rem;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
}
.lp-cta-glow {
  position: absolute;
  width: 300px; height: 300px;
  background: rgba(var(--accent-glow-rgb),.2);
  border-radius: 50%;
  filter: blur(60px);
  right: -60px; top: -60px;
  pointer-events: none;
}
.lp-cta-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.3px;
  margin-bottom: .4rem;
}

/* =============================================
   Admin list pages — search + filter + sortable
   table + pagination. Used by Users, Schools,
   Book Grants, and any future admin list view.
   Pair with the AdminList JS module in site.js.
   ============================================= */
.admin-list .list-title { font-size: 1.6rem; font-weight: 700; margin-bottom: .15rem; }
.admin-list .list-sub { color: var(--text-muted); font-size: .9rem; }

.admin-list .toolbar-card,
.admin-list .admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.admin-list .toolbar-card { padding: .85rem 1rem; }

.admin-list .search-box { position: relative; flex: 1 1 260px; max-width: 340px; }
.admin-list .search-box i {
  position: absolute; left: .8rem; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: .85rem;
}
.admin-list .search-box input { padding-left: 2.1rem; border-radius: 999px; }
.admin-list .filter-select { border-radius: 999px; max-width: 180px; }

.admin-list .admin-card { overflow: hidden; }
.admin-list .admin-table { margin-bottom: 0; }
.admin-list .admin-table thead th {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  color: #fff;
  border-bottom: none;
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  white-space: nowrap;
  vertical-align: middle;
}
.admin-list .admin-table thead th.sortable { cursor: pointer; user-select: none; }
.admin-list .admin-table thead th.sortable i { margin-left: .35rem; opacity: .6; font-size: .75rem; }
.admin-list .admin-table thead th.sortable:hover i { opacity: 1; }
.admin-list .admin-table tbody tr:hover { background: var(--bg); }

.admin-list .entity-cell { display: flex; align-items: center; gap: .65rem; }
.admin-list .avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: .8rem;
}
.admin-list .entity-name { font-weight: 600; }
.admin-list .entity-sub { color: var(--text-muted); font-size: .78rem; }

.admin-list .badge-pill {
  display: inline-block; border-radius: 999px; padding: .3rem .7rem;
  font-size: .72rem; font-weight: 600; white-space: nowrap;
}
.admin-list .status-active   { background: var(--success-tint); color: var(--success); }
.admin-list .status-inactive { background: #ececea; color: var(--text-muted); }
.admin-list .status-locked   { background: var(--danger-tint); color: var(--danger); }

.admin-list .action-btn {
  width: 32px; height: 32px; border-radius: 8px; display: inline-flex;
  align-items: center; justify-content: center; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-muted); transition: var(--transition);
  text-decoration: none;
}
.admin-list .action-btn:hover { background: var(--bg); color: var(--text); }
.admin-list .action-btn.danger:hover { color: var(--danger); border-color: var(--danger); }
.admin-list .action-btn.success:hover { color: var(--success); border-color: var(--success); }

.admin-list .list-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: .65rem 1rem;
}
.admin-list .pagination .page-link { color: var(--text); border-color: var(--border); }
.admin-list .pagination .page-item.active .page-link {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
}
.admin-list .pagination .page-item.disabled .page-link { color: #c7ccd3; }
.lp-cta-sub { font-size: .95rem; opacity: .75; margin: 0; }

/* ---- Scrollbars (site-wide) ----
   "Scrollbar 1" treatment applied globally — rounded track + inset thumb
   (via a transparent border + background-clip) — instead of the browser
   default, on every scrollable element (page body, reader panes, modals,
   etc). scrollbar-color/-width cover Firefox, which doesn't support the
   ::-webkit-scrollbar-* pseudo-elements. */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--navy) #e7e7e7;
}
::-webkit-scrollbar {
  width: 16px;
  height: 16px;
}
::-webkit-scrollbar-track {
  border-radius: 8px;
  background-color: #e7e7e7;
  border: 1px solid #cacaca;
}
::-webkit-scrollbar-thumb {
  border-radius: 8px;
  border: 3px solid transparent;
  background-clip: content-box;
  background-color: var(--navy);
}
