:root{
  --blue:#003d99;
  --blue-600:#0056d6;
  --white:#ffffff;
  --muted:#5f6e82;
  --surface:#f7fbff;
  --surface-strong:#eef6ff;
  --border:#dbe7f5;
  --shadow:0 20px 60px rgba(4,16,46,0.08);
  --max-width:1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  min-height: 100%;
}

body{
  margin:0;
  font-family: 'Inter', 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  color:#14233c;
  background: radial-gradient(circle at top left, rgba(0,61,153,0.14), transparent 24%), #f7fbff;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

.container {
  width: min(92%, var(--max-width));
  margin: 0 auto;
}

button, input, select, textarea {
  font: inherit;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,61,153,0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo img {
  height: 96px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
}

.brand {
  color: var(--blue);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.3px;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.nav-list a {
  display: inline-flex;
  align-items: center;
  padding: 10px 12px;
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
  border-radius: 12px;
  transition: transform .18s ease, background .18s ease;
}

.nav-list a:hover,
.nav-list a:focus {
  background: rgba(0,86,179,0.12);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  border-radius: 8px;
}

.hamburger {
  width: 24px;
  height: 2px;
  background: var(--blue);
  display: block;
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background: var(--blue);
}

.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

/* Hero */
.hero {
  padding: 96px 0 72px;
  background: linear-gradient(180deg, rgba(0,61,153,0.14), rgba(247,251,255,0.98));
  border-bottom: 1px solid rgba(0,61,153,0.08);
}

.hero-inner {
  text-align: left;
  max-width: 900px;
}

.hero h1 {
  font-size: clamp(2.8rem, 5vw, 4rem);
  margin: 0;
  color: var(--blue);
  font-weight: 800;
  line-height: 1.02;
}

.lead {
  color: #4f637b;
  font-size: 1.1rem;
  margin-top: 18px;
  max-width: 720px;
  line-height: 1.7;
}

.hero-cta {
  margin-top: 32px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-cta input {
  flex: 1 1 420px;
  min-width: 240px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid rgba(0,61,153,0.16);
  background: #ffffff;
  color: #14233c;
  font-size: 1rem;
}

.hero-cta input:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(0,61,153,0.08);
  border-color: rgba(0,61,153,0.28);
}

.hero-cta button {
  min-width: 170px;
  padding: 18px 24px;
  border-radius: 16px;
  font-size: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  border-radius: 14px;
  background: transparent;
  border: 1px solid rgba(0,61,153,0.18);
  color: var(--blue);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(0,61,153,0.1);
}

.btn.primary {
  background: var(--blue);
  color: var(--white);
  border-color: transparent;
  box-shadow: 0 18px 36px rgba(0,61,153,0.22);
}

.btn.ghost {
  background: rgba(255,255,255,0.96);
  border-color: rgba(0,61,153,0.16);
}

.section{padding:56px 0}
.section.alt{background:var(--surface)}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
}

.section-header h2 {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 1.65rem;
}

.section-sub {
  color: #5f6e82;
  margin: 0;
  max-width: 580px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 28px;
}

.cards.small {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  background: #ffffff;
  border: 1px solid rgba(13,64,167,0.12);
  border-radius: 26px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(8,33,89,0.05);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform .18s ease, box-shadow .18s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 64px rgba(8,33,89,0.1);
}

.card .icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(200px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.stat-card {
  padding: 26px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(0,61,153,0.08), #ffffff);
  box-shadow: 0 24px 48px rgba(8,33,89,0.04);
}

.stat-card small {
  display: block;
  color: #5f6e82;
  margin-bottom: 12px;
}

.stat-card strong {
  font-size: 2.2rem;
  color: var(--blue);
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.filters-grid label {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--blue);
  font-weight: 700;
}

.filters-grid input,
.filters-grid select {
  width: 100%;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(13,64,167,0.12);
  background: #ffffff;
  color: #14233c;
  font-size: 0.98rem;
}

.filters-grid input:focus,
.filters-grid select:focus {
  outline: none;
  border-color: rgba(0,61,153,0.28);
  box-shadow: 0 0 0 4px rgba(0,61,153,0.08);
}

.panel {
  flex: 1;
  background: #ffffff;
  padding: 28px;
  border-radius: 26px;
  border: 1px solid rgba(13,64,167,0.08);
  box-shadow: 0 24px 48px rgba(8,33,89,0.04);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
}

.badge-info,
.badge-success,
.badge-danger,
.badge-warning {
  display: inline-flex;
}

.badge-info {
  background: rgba(0,61,153,0.12);
  color: var(--blue);
}

.badge-success {
  background: #d1fae5;
  color: #065f46;
}

.badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.book-card {
  min-height: 360px;
  justify-content: space-between;
}

.book-card-header {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.book-cover {
  width: 140px;
  min-height: 220px;
  border-radius: 22px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  border: 1px solid rgba(13,64,167,0.12);
}

.book-info h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  color: #0b294c;
}

.book-info p {
  margin: 8px 0;
  color: #5f6e82;
  line-height: 1.75;
}

.book-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.book-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.paginacao {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 36px;
}

.paginacao span {
  font-weight: 700;
  color: #2b3c63;
}

.estado-vazio {
  text-align: center;
  padding: 64px 24px;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, #eff6ff);
  color: #2b3c63;
}

.estado-vazio h2 {
  margin: 0;
  font-size: 1.8rem;
}

.estado-vazio p {
  margin-top: 12px;
  color: #57677d;
}

.alert {
  border-radius: 18px;
  padding: 20px 22px;
  margin-bottom: 28px;
  border: 1px solid rgba(222,114,112,0.15);
  background: #fff0f0;
}

.alert-error {
  background: #fff5f5;
  color: #93232f;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8,31,70,0.55);
  backdrop-filter: blur(5px);
  z-index: 999;
}

.modal-panel {
  width: min(1100px, 100%);
  background: #ffffff;
  border-radius: 26px;
  box-shadow: 0 28px 80px rgba(8,33,89,0.18);
  overflow: hidden;
  position: relative;
}

.modal-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
}

.modal-cover {
  min-height: 460px;
  background-size: cover;
  background-position: center;
}

.modal-content {
  padding: 38px;
}

.modal-content h2 {
  margin-top: 0;
  font-size: clamp(1.9rem, 2.4vw, 2.6rem);
  color: #0b294c;
}

.modal-content p {
  color: #5f6e82;
  line-height: 1.85;
}

.modal-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin: 22px 0;
}

.modal-meta span {
  color: #5f6e82;
  font-size: 0.95rem;
}

.modal-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.modal-message {
  margin-top: 20px;
  color: #0b294c;
  font-weight: 700;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: 0;
  background: #f8fbff;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 16px 32px rgba(8,33,89,0.08);
}

.hidden { display: none !important; }

.card h3 {
  margin: 0;
  color: #08304e;
}

.card p,
.muted {
  margin: 0;
  color: #5f6e82;
  font-size: 0.95rem;
}

.form-actions {
  grid-column: span 2;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  align-items: center;
}

.flex {
  display: flex;
  gap: 18px;
  margin-top: 12px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.box {
  background: #fff;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(13,64,167,0.08);
}

@media (max-width: 960px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats-grid,
  .filters-grid,
  .grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .hero {
    padding: 72px 0 48px;
  }
  .hero-cta {
    flex-direction: column;
  }
  .nav {
    position: fixed;
    inset: 64px 0 0 auto;
    background: linear-gradient(180deg, #fff, rgba(255,255,255,0.98));
    backdrop-filter: blur(6px);
    transform: translateX(100%);
    transition: transform .28s;
    box-shadow: -6px 0 30px rgba(4,16,46,0.06);
    padding: 20px;
  }
  .nav.open {
    transform: translateX(0);
  }
  .nav-list {
    flex-direction: column;
    gap: 12px;
  }
  .nav-toggle {
    display: inline-block;
  }
  .header-inner {
    gap: 8px;
  }
  .book-card-header,
  .modal-grid {
    display: grid;
    grid-template-columns: 1fr;
  }
  .book-cover {
    width: 100%;
    min-height: 220px;
  }
  .modal-panel {
    width: calc(100% - 32px);
  }
  .modal-cover {
    min-height: 240px;
  }
  .footer-inner {
    flex-direction: column;
  }
}

.contact-form {
  max-width: 720px;
  margin-top: 12px;
}

.contact-form .row {
  display: flex;
  gap: 12px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #dfe7f3;
}

.about {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.6;
}

/* footer */
.site-footer {
  background: #f8fbff;
  border-top: 1px solid #eef4fb;
  padding: 28px 0 12px;
  margin-top: 28px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 12px;
}

.contacts p {
  margin: 6px 0;
  color: var(--muted);
}

.social-links {
  display: flex;
  gap: 10px;
}

.social-link {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e6eef9;
  text-decoration: none;
}

.social-link svg {
  width: 18px;
  height: 18px;
}

.copyright {
  border-top: 1px solid #eef4fb;
  padding-top: 12px;
  margin-top: 12px;
}

/* pesponsiveness */
@media (max-width: 900px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .filters-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 1.9rem;
  }
}

@media (max-width: 700px) {
  .nav {
    position: fixed;
    inset: 64px 0 0 auto;
    background: linear-gradient(180deg, #fff, rgba(255,255,255,0.98));
    backdrop-filter: blur(6px);
    transform: translateX(100%);
    transition: transform .28s;
    box-shadow: -6px 0 30px rgba(4,16,46,0.06);
    padding: 20px;
  }

  .nav.open {
    transform: translateX(0);
  }

  .nav-list {
    flex-direction: column;
    gap: 12px;
  }

  .nav-toggle {
    display: inline-block;
  }

  .header-inner {
    gap: 8px;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .cards.small {
    grid-template-columns: 1fr;
  }

  .filters-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .modal-panel {
    width: calc(100% - 32px);
    margin: 0 16px;
  }

  .modal-grid {
    grid-template-columns: 1fr;
  }

  .modal-cover {
    min-height: 240px;
  }

  .flex {
    flex-direction: column;
  }

  .footer-inner {
    flex-direction: column;
  }
}

/* Biblioteca premium page */
.biblioteca-page {
  background: #eef4ff;
}

.biblioteca-page .hero {
  padding: 100px 0 72px;
  background: radial-gradient(circle at top left, rgba(56,189,248,0.20), transparent 28%), linear-gradient(180deg, #0f172a 0%, #1e293b 100%) !important;
  color: #f8fafc;
  position: relative;
  overflow: hidden;
  min-height: 520px;
}

.biblioteca-page .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 30%, rgba(96,165,250,0.18), transparent 0 40%), radial-gradient(circle at 82% 18%, rgba(59,130,246,0.12), transparent 0 30%);
  pointer-events: none;
}

.biblioteca-page .hero-inner {
  max-width: 860px;
}

.biblioteca-page .hero h1 {
  font-size: clamp(3rem, 5vw, 4.6rem);
  margin-bottom: 20px;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.biblioteca-page .lead {
  color: rgba(248,250,252,0.88);
  font-size: 1.08rem;
  line-height: 1.8;
  max-width: 700px;
  margin-bottom: 34px;
}

.biblioteca-page .hero-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.biblioteca-page .search-input {
  flex: 1 1 420px;
  min-width: 240px;
  padding: 18px 20px 18px 52px;
  border-radius: 999px;
  border: 1px solid rgba(248,250,252,0.35);
  background: rgba(255,255,255,0.12);
  color: #f8fafc;
  backdrop-filter: blur(12px);
  box-shadow: 0 24px 80px rgba(15,23,42,0.18);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3Ccircle cx='10' cy='10' r='7.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 18px center;
  transition: transform .3s ease, border-color .3s ease, background .3s ease;
}

.biblioteca-page .search-input::placeholder {
  color: rgba(248,250,252,0.75);
}

.biblioteca-page .search-input:focus {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(59,130,246,0.65);
  background: rgba(255,255,255,0.18);
}

.biblioteca-page .hero-cta .btn.primary {
  min-width: 190px;
  padding: 18px 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1e40af, #2563eb);
  color: #fff;
  border: none;
  box-shadow: 0 20px 50px rgba(59,130,246,0.28);
}

.biblioteca-page .hero-cta .btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 26px 80px rgba(59,130,246,0.34);
}

.biblioteca-page .section {
  padding: 72px 0;
}

.biblioteca-page .section.alt {
  background: transparent;
}

.biblioteca-page .section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.biblioteca-page .section-header h2 {
  font-size: 2.25rem;
  color: #0f172a;
  margin-bottom: 0;
}

.biblioteca-page .section-sub {
  color: #475569;
  font-size: 1rem;
  max-width: 680px;
}

.biblioteca-page .stats-grid {
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 28px;
}

.biblioteca-page .stat-card {
  padding: 28px 26px;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border: 1px solid rgba(99,102,241,0.14);
  box-shadow: 0 18px 45px rgba(15,23,42,0.06);
  transition: transform .28s ease, box-shadow .28s ease;
}

.biblioteca-page .stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 60px rgba(15,23,42,0.1);
}

.biblioteca-page .stat-card small {
  color: #64748b;
}

.biblioteca-page .stat-card strong {
  font-size: 2.5rem;
  color: #1e3a8a;
}

.biblioteca-page .panel {
  border-radius: 28px;
  border: 1px solid rgba(148,163,184,0.18);
  box-shadow: 0 24px 70px rgba(15,23,42,0.08);
  padding: 36px;
}

.biblioteca-page .panel-header {
  gap: 18px;
}

.biblioteca-page .panel-header h2 {
  font-size: 1.7rem;
  margin-bottom: 6px;
}

.biblioteca-page .filters-grid {
  margin-top: 28px;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 20px;
}

.biblioteca-page .filters-grid label {
  background: #f8fafc;
  border: 1px solid rgba(148,163,184,0.18);
  border-radius: 18px;
  padding: 16px 18px;
  color: #0f172a;
}

.biblioteca-page .filters-grid input,
.biblioteca-page .filters-grid select {
  width: 100%;
  border: none;
  background: transparent;
  padding: 14px 10px;
  border-radius: 12px;
  color: #0f172a;
  font-size: 1rem;
}

.biblioteca-page .filters-grid select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2364748b'%3E%3Cpath d='M5.23 7.21a.75.75 0 011.06.02L10 11.22l3.71-3.99a.75.75 0 111.08 1.04l-4.25 4.57a.75.75 0 01-1.08 0L5.25 8.27a.75.75 0 01-.02-1.06z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.biblioteca-page .filters-grid input:focus,
.biblioteca-page .filters-grid select:focus {
  outline: none;
  border-color: rgba(59,130,246,0.55);
  box-shadow: 0 0 0 4px rgba(59,130,246,0.08);
}

.biblioteca-page .form-actions {
  justify-content: flex-end;
}

.biblioteca-page .btn.ghost {
  border-color: rgba(59,130,246,0.24);
  color: #1e40af;
}

.biblioteca-page .btn.ghost:hover {
  background: rgba(59,130,246,0.08);
}

.biblioteca-page .cards {
  display: grid !important;
  margin-top: 32px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
}

.biblioteca-page .book-card {
  border-radius: 24px;
  border: 1px solid rgba(148,163,184,0.2);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 25px 60px rgba(15,23,42,0.08);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
  padding: 26px;
}

.biblioteca-page .book-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 70px rgba(15,23,42,0.14);
  border-color: rgba(59,130,246,0.28);
}

.biblioteca-page .book-card-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.biblioteca-page .book-cover {
  width: 140px;
  min-height: 220px;
  border-radius: 24px;
  background-color: #e2e8f0;
  box-shadow: 0 18px 40px rgba(15,23,42,0.08);
  border: none;
}

.biblioteca-page .book-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.biblioteca-page .book-info h3 {
  margin: 0;
  font-size: 1.2rem;
  color: #0f172a;
  line-height: 1.25;
}

.biblioteca-page .book-info p {
  margin: 0;
  color: #475569;
}

.biblioteca-page .book-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: auto;
}

.biblioteca-page .book-card-footer strong {
  font-size: 1.5rem;
  color: #0f172a;
}

.biblioteca-page .book-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.biblioteca-page .modal-backdrop {
  background: rgba(15,23,42,0.80);
  backdrop-filter: blur(4px);
}

.biblioteca-page .modal-panel {
  border-radius: 28px;
  box-shadow: 0 45px 120px rgba(15,23,42,0.35);
  border: 1px solid rgba(148,163,184,0.18);
  overflow: hidden;
  animation: modal-pop .32s ease-out;
}

.biblioteca-page .modal-grid {
  grid-template-columns: 380px 1fr;
}

.biblioteca-page .modal-cover {
  min-height: 100%;
  background-size: cover;
  background-position: center;
}

.biblioteca-page .modal-content {
  padding: 42px;
}

.biblioteca-page .modal-content h2 {
  color: #0f172a;
  font-size: clamp(2rem, 2.2vw, 2.4rem);
  margin-bottom: 18px;
}

.biblioteca-page .modal-content p {
  color: #475569;
}

.biblioteca-page .modal-meta {
  gap: 16px;
  margin: 24px 0;
}

.biblioteca-page .modal-actions {
  gap: 16px;
}

.biblioteca-page .modal-close {
  width: 44px;
  height: 44px;
  background: #0f172a;
  color: #f8fafc;
  box-shadow: 0 18px 40px rgba(15,23,42,0.2);
}

.biblioteca-page .modal-close:hover {
  transform: translateY(-1px);
  background: #1e40af;
}

.biblioteca-page .btn.primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.biblioteca-page .paginacao {
  margin-top: 42px;
  gap: 16px;
  justify-content: center;
}

.biblioteca-page .paginacao a.btn {
  min-width: 140px;
}

.biblioteca-page .estado-vazio {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  color: #334155;
  border: 1px solid rgba(148,163,184,0.2);
  box-shadow: 0 20px 50px rgba(15,23,42,0.06);
  padding: 56px 32px;
  border-radius: 24px;
}

.biblioteca-page .estado-vazio h2 {
  margin-bottom: 12px;
  color: #0f172a;
}

.biblioteca-page .alert {
  background: #fef3f4;
  border-color: rgba(239,68,68,0.22);
}

.biblioteca-page .site-footer {
  background: #f8fafc;
  border-top: 1px solid rgba(148,163,184,0.18);
}

.biblioteca-page .footer-inner {
  border-top: 1px solid rgba(148,163,184,0.16);
  padding-top: 18px;
}

@keyframes modal-pop {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1120px) {
  .biblioteca-page .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .biblioteca-page .stats-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
  .biblioteca-page .modal-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .biblioteca-page .filters-grid {
    grid-template-columns: 1fr;
  }
  .biblioteca-page .book-card-header {
    flex-direction: column;
  }
  .biblioteca-page .book-cover {
    width: 100%;
    min-height: 260px;
  }
}

@media (max-width: 720px) {
  .biblioteca-page .hero {
    padding: 72px 0 48px;
  }
  .biblioteca-page .hero-cta {
    flex-direction: column;
  }
  .biblioteca-page .cards {
    grid-template-columns: 1fr;
  }
  .biblioteca-page .stats-grid {
    grid-template-columns: 1fr;
  }
  .biblioteca-page .panel {
    padding: 24px;
  }
  .biblioteca-page .modal-panel {
    width: calc(100% - 32px);
  }
  .biblioteca-page .hero-inner {
    max-width: 100%;
  }
}

.active-link{background:rgba(0,86,179,0.12)}

/* subtle focus */
a:focus{outline-offset:3px}
