/* ============================================================
   BuscarPDF Web - Estilos Globais e Componentes de Base
   Padrão: Apple / Linear Luxury (Glassmorphism Pro)
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--duration-normal) var(--ease-apple),
              color var(--duration-normal) var(--ease-apple);
}

/* Fundo com iluminação sutil ambiente */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 450px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

/* Scrollbar fluida e elegante */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-pill);
}

a {
  color: inherit;
  text-decoration: none;
}

/* Navbar de Luxo Apple / Civic Glass */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 2.5rem;
  background: var(--bg-surface);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: var(--glass-border);
  transition: all var(--duration-normal) var(--ease-apple);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transition: transform var(--duration-fast) var(--ease-spring);
  overflow: hidden;
  padding: 4px;
}

.nav-brand:hover .brand-icon {
  transform: scale(1.05) rotate(-2deg);
}

.brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-icon svg {
  width: 20px;
  height: 20px;
}

.hero-brand-logo {
  width: 76px;
  height: 76px;
  object-fit: contain;
  margin-bottom: 1rem;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.22));
  animation: dynamicIslandEntrance 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-hero.compact .hero-brand-logo {
  display: none;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--accent-light);
  color: var(--accent-primary);
  border: 1px solid rgba(37, 99, 235, 0.25);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  transition: all var(--duration-fast) var(--ease-apple);
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--badge-bg);
  transform: translateY(-1px);
}

.nav-link.active {
  color: var(--accent-primary);
  background: var(--accent-light);
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* ============================================================
   Navbar User Profile Trigger (id.castelandia.com luxury pill)
   ============================================================ */
.user-profile-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.user-profile-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 4px 12px 4px 5px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-apple);
  outline: none;
  font-family: inherit;
  color: inherit;
}

.user-profile-trigger:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.22);
  transform: translateY(-1px);
}

.user-nav-avatar {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.78rem;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #0f172a);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.user-nav-details {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  line-height: 1;
}

.user-nav-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.user-nav-role {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #10b981;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.user-nav-chevron {
  color: var(--text-muted);
  transition: transform var(--duration-fast);
}

.user-profile-trigger:hover .user-nav-chevron {
  color: var(--text-primary);
  transform: translateY(1px);
}

/* Botões do Sistema Apple Luxury */
.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  border: var(--glass-border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-apple);
}

.btn-icon:hover {
  color: var(--text-primary);
  background: var(--badge-bg);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.btn-icon:active {
  transform: scale(0.95);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-apple);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-gradient-hover);
  box-shadow: 0 8px 24px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: var(--glass-border);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.btn-secondary:hover {
  background: var(--badge-bg);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: scale(0.97);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--badge-bg);
  color: var(--text-primary);
}

.btn-sm {
  font-size: 0.82rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
}

/* Cards Glassmorphism Pro com Brilho Superior */
.glass-card {
  position: relative;
  background: var(--bg-surface);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: var(--glass-border);
  box-shadow: var(--card-shadow), var(--glass-inner-glow);
  border-radius: var(--radius-lg);
  transition: all var(--duration-normal) var(--ease-apple);
}

/* Brilho superior de iluminação física */
.glass-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.85) 25%, rgba(255,255,255,0.85) 75%, transparent);
  opacity: 0.6;
  pointer-events: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Destaques (Highlights) */
mark.highlight {
  background-color: var(--highlight-bg);
  color: var(--highlight-text);
  font-weight: 700;
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
}

/* Modais Universais */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-apple);
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-container {
  background: var(--bg-surface-elevated);
  border: var(--glass-border);
  box-shadow: 0 28px 60px -12px rgba(0, 0, 0, 0.45);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 920px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalEnter var(--duration-normal) var(--ease-spring);
}

@keyframes modalEnter {
  from {
    transform: scale(0.92) translateY(16px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.modal-header {
  padding: 1.25rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: var(--glass-border);
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.modal-body {
  padding: 1.5rem 1.75rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 1rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  border-top: var(--glass-border);
  background: var(--bg-surface);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 0.8rem 1.35rem;
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border: var(--glass-border);
  border-radius: var(--radius-pill);
  box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.25);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: toastIn 0.25s var(--ease-spring);
}

@keyframes toastIn {
  from { transform: translateY(24px) scale(0.9); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0.75rem 1.25rem;
  }
  .nav-link span {
    display: none;
  }
  .nav-link {
    padding: 0.5rem;
  }
}

/* ============================================================
   Shimmer Skeleton Loaders (Padrão Apple / Linear)
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.05) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite;
  border-radius: var(--radius-sm);
  display: inline-block;
}

[data-theme="light"] .skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
}

@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 14px;
  width: 100%;
  margin-bottom: 0.45rem;
  border-radius: 4px;
}

.skeleton-title {
  height: 22px;
  width: 65%;
  margin-bottom: 0.75rem;
  border-radius: 6px;
}

.skeleton-number {
  height: 38px;
  width: 120px;
  margin-bottom: 0.35rem;
  border-radius: 8px;
}

.skeleton-chip {
  height: 22px;
  width: 80px;
  border-radius: var(--radius-pill);
}

.skeleton-card {
  padding: 1.5rem;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

/* ============================================================
   Loading Overlay Elegante ao Carregar PDF (Padrão Apple)
   ============================================================ */
.viewer-pdf-loading {
  position: absolute;
  inset: 0;
  background: var(--bg-surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.viewer-loading-card,
.viewer-pdf-loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.2rem 2.5rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
  max-width: 320px;
  animation: dynamicIslandEntrance 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.viewer-pdf-pulse-icon,
.viewer-pdf-icon-pulse {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.12);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  animation: pulseGlow 1.8s infinite ease-in-out;
}

.viewer-pdf-logo-pulse {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: 1.1rem;
  filter: drop-shadow(0 4px 14px rgba(199, 179, 134, 0.35));
  animation: logoBreath 2.2s infinite ease-in-out;
}

@keyframes logoBreath {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 4px 12px rgba(199, 179, 134, 0.3));
  }
  50% {
    transform: scale(1.08);
    filter: drop-shadow(0 8px 22px rgba(199, 179, 134, 0.7));
  }
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.35); }
  50% { transform: scale(1.06); box-shadow: 0 0 0 14px rgba(37, 99, 235, 0); }
}

.viewer-loading-text,
.viewer-pdf-loading-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.viewer-loading-sub,
.viewer-pdf-loading-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.viewer-loading-bar-track,
.viewer-pdf-shimmer-track {
  width: 100%;
  height: 5px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

html[data-theme="dark"] .viewer-loading-bar-track,
html[data-theme="dark"] .viewer-pdf-shimmer-track {
  background: rgba(255, 255, 255, 0.12);
}

.viewer-loading-bar-fill,
.viewer-pdf-shimmer-bar {
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #38bdf8);
  border-radius: 9999px;
  position: absolute;
  animation: loadingBarSlide 1.2s infinite ease-in-out;
}

@keyframes loadingBarSlide {
  0% { left: -50%; }
  100% { left: 100%; }
}

/* ==========================================================================
   Transições Suaves de Página e Anti-Flicker (Apple / Linear)
   ========================================================================== */
@keyframes pageFadeIn {
  0% {
    opacity: 0;
    transform: translateY(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

main.search-container,
main.scanner-container,
main.dashboard-container {
  animation: pageFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform, opacity;
}

body.page-exiting {
  opacity: 0.82;
  transition: opacity 0.12s ease-out;
}

/* ==========================================================================
   Skeleton Shimmer Loaders Globais
   ========================================================================== */
@keyframes skeletonShimmerAnim {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton-shimmer,
.skeleton-pulse,
.pdf-skeleton-pulse,
.skeleton-card .skeleton-line,
.skeleton-card .skeleton-pill,
.skeleton-card .skeleton-chip {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.04) 75%);
  background-size: 300% 100%;
  animation: skeletonShimmerAnim 1.6s ease-in-out infinite;
  border-radius: 6px;
}

html[data-theme="light"] .skeleton-shimmer,
html[data-theme="light"] .skeleton-pulse,
html[data-theme="light"] .pdf-skeleton-pulse,
html[data-theme="light"] .skeleton-card .skeleton-line,
html[data-theme="light"] .skeleton-card .skeleton-pill,
html[data-theme="light"] .skeleton-card .skeleton-chip {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.04) 25%, rgba(0, 0, 0, 0.10) 50%, rgba(0, 0, 0, 0.04) 75%);
  background-size: 300% 100%;
  animation: skeletonShimmerAnim 1.6s ease-in-out infinite;
}

/* Cards Skeleton de Resultados */
.result-deck-card.skeleton-card {
  pointer-events: none;
  border-color: var(--border-subtle);
  background: var(--bg-surface);
  min-height: 140px;
}

/* ==========================================================================
   Custom Native PDF Viewer (Apple / Linear Aesthetic)
   ========================================================================== */
.custom-pdf-container {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.custom-pdf-root {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  background: #090d16;
  overflow: hidden;
}

html[data-theme="light"] .custom-pdf-root {
  background: #e9eef5;
}

/* Viewport com scroll suave e estético */
.custom-pdf-viewport {
  flex: 1;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: auto;
  position: relative;
  outline: none;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.custom-pdf-viewport::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

.custom-pdf-viewport::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 9999px;
}

.custom-pdf-viewport::-webkit-scrollbar-track {
  background: transparent;
}

/* Estágio Centralizador */
.custom-pdf-stage {
  min-height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 14px 72px 14px;
  box-sizing: border-box;
}

/* Container de Folhas */
.custom-pdf-pages {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}

/* Folha Individual do Documento */
.pdf-page-sheet {
  position: relative;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
  max-width: 100%;
}

html[data-theme="light"] .pdf-page-sheet {
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12), 0 1px 4px rgba(15, 23, 42, 0.08);
}

.pdf-page-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  color: #f1f5f9;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
  z-index: 5;
  letter-spacing: 0.02em;
}

.pdf-canvas-holder {
  position: relative;
  width: 100%;
  height: 100%;
}

.pdf-page-canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

.pdf-sheet-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.6) 25%, rgba(240, 243, 248, 0.9) 50%, rgba(255, 255, 255, 0.6) 75%);
  background-size: 300% 100%;
  animation: skeletonShimmerAnim 1.4s ease-in-out infinite;
  z-index: 2;
  border-radius: 8px;
}

/* Skeleton Placeholder Completo */
.pdf-skeleton-wrapper {
  width: 100%;
  max-width: 580px;
  display: flex;
  justify-content: center;
}

.pdf-skeleton-sheet {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 24px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.pdf-skeleton-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.pdf-skeleton-footer {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

.pdf-skeleton-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(199, 179, 134, 0.12);
  border: 1px solid rgba(199, 179, 134, 0.3);
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #c7b386;
}

.pdf-skeleton-spin {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(199, 179, 134, 0.3);
  border-top-color: #c7b386;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

/* ==========================================================================
   Floating Dynamic Island Toolbar (Padrão Apple Glassmorphism)
   ========================================================================== */
.pdf-dynamic-island {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px 8px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(255, 255, 255, 0.08);
  user-select: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-theme="light"] .pdf-dynamic-island {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.14), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.pdf-dynamic-island:hover {
  background: rgba(15, 23, 42, 0.94);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.52);
}

html[data-theme="light"] .pdf-dynamic-island:hover {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(15, 23, 42, 0.2);
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.18);
}

.island-group {
  display: flex;
  align-items: center;
  gap: 2px;
}

.island-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.14s ease;
  padding: 0;
}

html[data-theme="light"] .island-btn {
  color: #334155;
}

.island-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

html[data-theme="light"] .island-btn:hover:not(:disabled) {
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

.island-btn:active:not(:disabled) {
  transform: scale(0.92);
}

.island-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.island-page-indicator {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #f8fafc;
  padding: 0 4px;
  font-family: ui-monospace, SFMono-Regular, monospace;
}

html[data-theme="light"] .island-page-indicator {
  color: #0f172a;
}

.sep-text {
  opacity: 0.5;
  font-weight: 400;
}

.island-divider {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.14);
  margin: 0 3px;
}

html[data-theme="light"] .island-divider {
  background: rgba(15, 23, 42, 0.12);
}

.island-btn-text {
  width: auto;
  height: 24px;
  padding: 0 7px;
  border-radius: 9999px;
  font-size: 0.70rem;
  font-weight: 700;
  color: #c7b386;
  font-family: var(--font-sans);
  letter-spacing: 0.02em;
}

.island-btn-text:hover {
  background: rgba(199, 179, 134, 0.16);
  color: #dfceaa;
}

.pdf-viewer-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-primary);
}

.pdf-error-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}



