/* =========================================================
   Student Digital Library Portal — Sabeel Us Salaam Online
   Extends main site tokens from style.css
   ========================================================= */

:root {
  --lib-emerald: #198754;
  --lib-emerald-dark: #146c43;
  --lib-gold: #D4AF37;
  --lib-blue: #0B5ED7;
  --lib-navy: #0A3D91;
  --lib-pattern: rgba(11, 94, 215, 0.04);
}

/* Ensure [hidden] wins over display:flex / grid rules below */
[hidden] {
  display: none !important;
}

/* ----- Page shell ----- */
.library-page {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(25, 135, 84, 0.08), transparent 55%),
    radial-gradient(ellipse 70% 45% at 90% 10%, rgba(11, 94, 215, 0.1), transparent 50%),
    linear-gradient(180deg, var(--bg-soft) 0%, var(--bg-light) 40%, var(--bg) 100%);
}

.library-page main,
.library-page main:not(:has(.hero)) {
  padding-top: calc(var(--header-h) + 1.5rem);
  padding-bottom: 4rem;
  min-height: calc(100vh - var(--header-h));
}

/* Subtle geometric atmosphere */
.library-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
  background-image:
    linear-gradient(30deg, var(--lib-pattern) 12%, transparent 12.5%, transparent 87%, var(--lib-pattern) 87.5%),
    linear-gradient(150deg, var(--lib-pattern) 12%, transparent 12.5%, transparent 87%, var(--lib-pattern) 87.5%);
  background-size: 48px 84px;
}

.library-page .site-header,
.library-page main,
.library-page .site-footer,
.library-page .float-actions {
  position: relative;
  z-index: 1;
}

/* Active Library nav */
.library-page .nav-link.is-active-lib {
  color: var(--accent);
}

/* ----- Access / Denied screens ----- */
.lib-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-h) - 6rem);
  padding: 1.5rem 1rem 3rem;
}

.lib-card {
  width: min(440px, 100%);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-lg);
  padding: 2.25rem 1.85rem 2rem;
  text-align: center;
  animation: libFadeUp 0.55s var(--ease) both;
}

.lib-card-denied {
  width: min(480px, 100%);
}

.lib-lock {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(11, 94, 215, 0.12), rgba(25, 135, 84, 0.12));
  color: var(--lib-navy);
  box-shadow: inset 0 0 0 1px rgba(11, 94, 215, 0.12);
}

.lib-lock-denied {
  background: linear-gradient(145deg, rgba(212, 175, 55, 0.18), rgba(11, 94, 215, 0.1));
  color: var(--lib-gold);
}

.lib-card h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  font-weight: 700;
  color: var(--lib-navy);
  margin: 0 0 0.65rem;
  letter-spacing: -0.02em;
}

.lib-card .lib-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 0 0 1.75rem;
}

.lib-form {
  text-align: left;
}

.lib-form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.lib-form input[type="password"],
.lib-form input[type="text"],
.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.lib-form input:focus,
.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11, 94, 215, 0.15);
}

.lib-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1.15rem;
}

.lib-actions .btn {
  justify-content: center;
}

.lib-inline-error {
  margin-top: 0.75rem;
  color: #b42318;
  font-size: 0.85rem;
}

.lib-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.25rem;
}

/* ----- Dashboard ----- */
.lib-dash {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem 2rem;
  animation: libFadeUp 0.45s var(--ease) both;
}

.lib-hero-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  padding: 1.35rem 1.5rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--lib-navy) 0%, var(--lib-blue) 55%, var(--lib-emerald) 140%);
  color: var(--white);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.lib-hero-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 90% 20%, rgba(212, 175, 55, 0.25), transparent 40%),
    radial-gradient(circle at 10% 80%, rgba(255, 255, 255, 0.08), transparent 35%);
  pointer-events: none;
}

.lib-hero-bar > * {
  position: relative;
  z-index: 1;
}

.lib-hero-bar h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: var(--white);
}

.lib-hero-bar p {
  margin: 0;
  opacity: 0.9;
  font-size: 0.92rem;
}

.lib-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.lib-hero-actions .btn {
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.lib-hero-actions .btn:hover {
  background: rgba(255, 255, 255, 0.22);
  color: var(--white);
}

.lib-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.22);
  border: 1px solid rgba(212, 175, 55, 0.45);
  font-size: 0.8rem;
  font-weight: 600;
}

/* Breadcrumb */
.lib-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.15rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
}

.crumb,
.crumb-btn {
  color: var(--lib-navy);
  font-weight: 500;
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

.crumb:hover,
.crumb-btn:hover {
  background: var(--bg-soft);
  color: var(--lib-blue);
}

.crumb.is-current {
  color: var(--text-muted);
  font-weight: 600;
  cursor: default;
}

.crumb-sep {
  color: var(--text-muted);
  margin: 0 0.15rem;
  opacity: 0.7;
}

/* Explorer toolbar */
.lib-explorer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.lib-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.lib-search-wrap-inline {
  flex: 1;
}

.lib-search-wrap svg {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.lib-search-wrap input {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.95);
}

.lib-search-wrap input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11, 94, 215, 0.12);
}

.lib-folder-head {
  margin-bottom: 1.35rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.lib-folder-head h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.35rem, 2.6vw, 1.65rem);
  font-weight: 700;
  color: var(--lib-navy);
  margin: 0 0 0.4rem;
  letter-spacing: -0.02em;
}

.lib-folder-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* Modern folder cards — Course → Subject → Book */
.folder-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
  align-items: stretch;
}

.folder-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  gap: 1.05rem;
  min-height: 188px;
  padding: 1.2rem 1.2rem 1.15rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  cursor: pointer;
  font-family: inherit;
  transition:
    transform 0.24s var(--ease),
    box-shadow 0.24s var(--ease),
    border-color 0.24s var(--ease);
  position: relative;
  overflow: hidden;
}

.folder-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: var(--folder-accent, var(--lib-blue));
}

.folder-card::after {
  display: none;
}

.folder-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.1);
  border-color: rgba(11, 94, 215, 0.18);
}

.folder-card:active {
  transform: translateY(-2px);
}

.folder-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
}

.folder-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  transition: transform 0.24s var(--ease);
}

.folder-icon svg {
  width: 34px;
  height: 34px;
}

.folder-card:hover .folder-icon {
  transform: translateY(-2px);
}

.folder-card-open {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--folder-accent, var(--lib-blue));
  background: rgba(11, 94, 215, 0.08);
  border: 1px solid rgba(11, 94, 215, 0.14);
  border-radius: 999px;
  padding: 0.32rem 0.7rem;
  line-height: 1;
}

.folder-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
  flex: 1;
  position: relative;
  z-index: 1;
}

.folder-card-title {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--lib-navy);
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.folder-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.folder-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--lib-blue);
  background: rgba(11, 94, 215, 0.08);
  border: 1px solid rgba(11, 94, 215, 0.12);
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  white-space: nowrap;
  margin: 0;
}

.folder-badge-soft {
  color: var(--lib-emerald-dark);
  background: rgba(25, 135, 84, 0.08);
  border-color: rgba(25, 135, 84, 0.12);
}

.folder-anim {
  animation: folderOpen 0.4s var(--ease) both;
}

.folder-anim-item {
  animation: folderOpen 0.45s var(--ease) both;
}

.folder-anim-item:nth-child(2) { animation-delay: 0.04s; }
.folder-anim-item:nth-child(3) { animation-delay: 0.08s; }
.folder-anim-item:nth-child(4) { animation-delay: 0.12s; }
.folder-anim-item:nth-child(5) { animation-delay: 0.16s; }
.folder-anim-item:nth-child(6) { animation-delay: 0.2s; }

@keyframes folderOpen {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Resource cards */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.resource-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  height: 100%;
}

.resource-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.resource-card-media {
  position: relative;
  height: 200px;
  background: linear-gradient(145deg, var(--bg-soft), #e8f0fa);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.res-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.res-cover-fallback {
  color: var(--lib-blue);
  opacity: 0.55;
}

.admin-hint {
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.cover-preview {
  margin-top: 0.75rem;
  width: 120px;
  height: 160px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  background: var(--bg-soft);
}

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

.res-pdf-icon {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(185, 28, 28, 0.92);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.resource-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1rem 1.05rem 1.1rem;
  flex: 1;
}

.resource-title {
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 650;
  color: var(--text);
  margin: 0;
  line-height: 1.35;
}

.resource-desc {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.resource-sub {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.resource-card-body .btn-download {
  margin-top: auto;
  width: 100%;
  justify-content: center;
  gap: 0.35rem;
}

.results-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.results-head h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--lib-navy);
}

.results-meta {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.6);
}

/* Toast */
.library-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 100;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  background: var(--lib-navy);
  color: var(--white);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
  pointer-events: none;
  max-width: min(92vw, 420px);
  text-align: center;
}

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

/* ----- Admin ----- */
.admin-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3.5rem;
}

.library-admin-page .admin-shell {
  max-width: 1040px;
}

.admin-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.admin-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lib-blue, #0B5ED7);
}

.admin-topbar h1 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
  font-weight: 700;
  color: var(--lib-navy, #0A2E6B);
  line-height: 1.2;
}

.admin-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.admin-lead {
  margin: 0 0 1.35rem;
  max-width: 52ch;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: start;
}

.admin-panel {
  background: #fff;
  border: 1px solid rgba(11, 46, 107, 0.1);
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(10, 46, 107, 0.06);
  padding: 1.25rem 1.3rem 1.35rem;
  margin-bottom: 1rem;
}

.admin-panel--wide {
  margin-bottom: 0;
}

.admin-panel-head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
}

.admin-panel-head--row {
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.admin-panel-head-text {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.admin-panel-head h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--lib-navy, #0A2E6B);
}

.admin-panel-head p {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.admin-step {
  flex: 0 0 auto;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(11, 94, 215, 0.1);
  color: var(--lib-blue, #0B5ED7);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

.admin-subhead {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.admin-divider {
  height: 1px;
  background: rgba(11, 46, 107, 0.08);
  margin: 1.15rem 0 0.9rem;
}

.admin-swatch {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  margin-right: 0.35rem;
  vertical-align: middle;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.admin-form input[type="color"] {
  width: 100%;
  height: 2.55rem;
  padding: 0.25rem;
  cursor: pointer;
}

.admin-form-actions {
  display: flex;
  justify-content: flex-start;
}

.admin-form-actions .btn {
  min-width: 9.5rem;
}

.admin-import-btn {
  cursor: pointer;
  margin: 0;
}

.admin-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.admin-card h2 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--lib-navy);
  margin: 0 0 1rem;
}

.admin-form {
  display: grid;
  gap: 0.85rem;
}

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

.admin-form label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--text);
}

.admin-form input[type="text"],
.admin-form input[type="password"],
.admin-form input[type="file"],
.admin-form select,
.admin-form textarea {
  width: 100%;
  border: 1px solid rgba(11, 46, 107, 0.14);
  border-radius: 10px;
  background: #fbfcfe;
  padding: 0.65rem 0.8rem;
  font: inherit;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
  outline: none;
  border-color: rgba(11, 94, 215, 0.45);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(11, 94, 215, 0.12);
}

.admin-form textarea {
  min-height: 72px;
  resize: vertical;
}

.form-status {
  margin: 0;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  font-size: 0.86rem;
}

.form-status.is-success {
  background: rgba(25, 135, 84, 0.1);
  color: var(--lib-emerald-dark);
}

.form-status.is-error {
  background: rgba(180, 35, 24, 0.08);
  color: #b42318;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.admin-table th,
.admin-table td {
  padding: 0.7rem 0.45rem;
  border-bottom: 1px solid rgba(11, 46, 107, 0.08);
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table .btn-ghost {
  color: #b42318;
}

.admin-empty {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.88rem;
  padding: 0.35rem 0;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
}

.admin-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 0 1rem;
}

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

@media (max-width: 640px) {
  .admin-topbar {
    flex-direction: column;
  }

  .admin-panel-head--row {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-form .field-row {
    grid-template-columns: 1fr;
  }

  .admin-form-actions .btn {
    width: 100%;
  }

  .admin-table {
    display: block;
    overflow-x: auto;
  }
}

@keyframes libFadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ----- Responsive ----- */
@media (max-width: 980px) {
  .folder-grid,
  .resources-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .folder-grid {
    gap: 1rem;
  }
}

@media (max-width: 640px) {
  .lib-card {
    padding: 1.75rem 1.25rem 1.5rem;
  }

  .folder-grid,
  .resources-grid,
  .admin-form .field-row {
    grid-template-columns: 1fr;
  }

  .lib-hero-bar {
    padding: 1.15rem 1.1rem;
  }

  .lib-dash {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .admin-table {
    display: block;
    overflow-x: auto;
  }

  .folder-card {
    min-height: 176px;
    padding: 1.2rem 1.15rem;
  }
}
