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

body.preloader-active {
  overflow: hidden;
}

.site-preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #525659;
  opacity: 1;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.site-preloader.preloader-complete {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.site-preloader-card {
  width: min(100%, 390px);
  padding: 36px 28px 30px;
  border: 1px solid #404246;
  border-radius: 12px;
  background: #2b2b2b;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  color: #f1f1f1;
  text-align: center;
}

.preloader-spinner {
  width: 34px;
  height: 34px;
  margin: 0 auto 20px;
  border: 3px solid #4b4d50;
  border-top-color: #1473e6;
  border-radius: 50%;
  animation: preloader-spin 0.9s linear infinite;
}

.preloader-kicker {
  color: #66a8ff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.site-preloader-card h1 {
  margin-top: 8px;
  font-size: 23px;
}

.preloader-copy,
.preloader-status {
  color: #c7c7c7;
  font-size: 13px;
}

.preloader-copy {
  margin: 10px 0 22px;
}

.cf-turnstile {
  display: flex;
  justify-content: center;
  min-height: 65px;
}

.preloader-status {
  margin-top: 14px;
}

@keyframes preloader-spin {
  to {
    transform: rotate(360deg);
  }
}

:root {
  --toolbar-height: 40px;
}

html, body {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden; /* Strict no scroll */
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #525659;
  display: flex;
  flex-direction: column;
  color: #333;
  user-select: none;
}

/* =========================================
   Top Acrobat Toolbar
   ========================================= */
.toolbar {
  height: var(--toolbar-height);
  background-color: #2b2b2b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  z-index: 100;
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none; /* Hide scrollbar for clean UI on mobile */
}

.toolbar::-webkit-scrollbar {
  display: none;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-right: 2px;
  flex-shrink: 0;
}

.adobe-logo {
  width: 20px;
  height: 20px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
}

.brand-title {
  color: #f1f1f1;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.2px;
  white-space: nowrap;
}

.divider {
  width: 1px;
  height: 18px;
  background-color: #444746;
  flex-shrink: 0;
}

.tool-group {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.tool-btn {
  background: transparent;
  border: none;
  outline: none;
  color: #c7c7c7;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}

.tool-btn:hover {
  background-color: #404040;
  color: #ffffff;
}

.tool-btn:active {
  background-color: #4d4d4d;
}

.zoom-level {
  color: #e0e0e0;
  font-size: 11.5px;
  padding: 0 4px;
  min-width: 36px;
  text-align: center;
}

/* Pagination */
.pagination {
  gap: 2px;
}

.nav-btn {
  width: 22px;
  height: 22px;
}

.page-input {
  width: 28px;
  height: 20px;
  background-color: #1a1a1a;
  border: 1px solid #444;
  border-radius: 2px;
  color: #fff;
  font-size: 11px;
  text-align: center;
  outline: none;
}

.page-input:focus {
  border-color: #0b57d0;
}

.page-total {
  color: #aaa;
  font-size: 11.5px;
  margin-left: 3px;
  margin-right: 3px;
}

/* Mode Tools */
.mode-tools {
  gap: 3px;
}

.tool-btn.active-blue {
  background-color: #0078d4;
  color: #ffffff;
}

.tool-btn.active-blue:hover {
  background-color: #106ebe;
}

/* Toolbar Right */
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.search-box {
  display: flex;
  align-items: center;
  background-color: #1e1e1e;
  border: 1px solid #3d3d3d;
  border-radius: 4px;
  padding: 2px 7px;
  width: 150px;
  transition: border-color 0.15s;
}

.search-box:focus-within {
  border-color: #0078d4;
}

.search-icon {
  color: #888;
  margin-right: 5px;
  flex-shrink: 0;
}

.search-input {
  background: transparent;
  border: none;
  outline: none;
  color: #e0e0e0;
  font-size: 11px;
  width: 100%;
}

.search-input::placeholder {
  color: #7b7b7b;
}

.action-icon {
  width: 28px;
  height: 28px;
  color: #bbb;
}

/* =========================================
   Viewer Container - Strict Fit in Viewport
   ========================================= */
.viewer-container {
  height: calc(100vh - var(--toolbar-height));
  height: calc(100dvh - var(--toolbar-height));
  overflow: hidden; /* Guarantee no scroll bars */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px;
  background-color: #525659;
  position: relative;
}

/* Document Container fitted proportionally */
.document-wrapper {
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  background-color: #f7f7f8;
  border-radius: 3px;
  /* Proportional A4 ratio fits within viewport bounds */
  height: 100%;
  max-height: calc(100vh - var(--toolbar-height) - 24px);
  max-height: calc(100dvh - var(--toolbar-height) - 24px);
  aspect-ratio: 1 / 1.38;
  max-width: calc(100vw - 24px);
  overflow: hidden;
  display: flex;
}

/* Blurred document page replica */
.document-page {
  width: 100%;
  height: 100%;
  background-color: #f7f7f8;
  padding: 4% 5%;
  filter: blur(4.5px);
  -webkit-filter: blur(4.5px);
  pointer-events: none;
  opacity: 0.94;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

/* Typography & Layout inside Document */
.doc-header {
  text-align: center;
  margin-bottom: 2%;
}

.doc-title {
  font-size: clamp(12px, 1.8vw, 19px);
  font-weight: 700;
  color: #2b2b2b;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}

.doc-subtitle {
  font-size: clamp(8px, 1vw, 11px);
  color: #666;
  font-style: italic;
}

.doc-divider {
  width: 100%;
  height: 1px;
  background-color: #a8a8a8;
  margin: 1.5% 0 2% 0;
}

.doc-section {
  margin-bottom: 2%;
}

.section-title {
  font-size: clamp(8px, 1vw, 11px);
  font-weight: 700;
  color: #222;
  margin-bottom: 3px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.section-text {
  font-size: clamp(7.5px, 0.95vw, 10.5px);
  color: #444;
  line-height: 1.35;
}

/* Data Tables inside the document */
.doc-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 4px;
  font-size: clamp(7px, 0.9vw, 9.5px);
}

.doc-table th {
  background-color: #eaeaea;
  font-weight: 700;
  text-align: left;
  padding: 4px 6px;
  border: 1px solid #c9c9c9;
  color: #333;
}

.doc-table td {
  padding: 3px 6px;
  border: 1px solid #d4d4d4;
  color: #444;
}

.doc-table tr:nth-child(even) td {
  background-color: #f2f2f3;
}

/* =========================================
   Mobile Responsiveness
   ========================================= */
@media (max-width: 768px) {
  :root {
    --toolbar-height: 44px;
  }

  .toolbar {
    padding: 0 8px;
    gap: 8px;
  }

  .brand-title {
    display: none; /* Keep just the Adobe icon on mobile to save space */
  }

  .divider {
    margin: 0 2px;
  }

  .search-box {
    width: 90px;
    padding: 2px 5px;
  }

  .search-input {
    font-size: 10px;
  }

  .search-input::placeholder {
    content: "Search";
  }

  .action-icon {
    width: 24px;
    height: 24px;
  }

  .viewer-container {
    padding: 6px;
  }

  .document-wrapper {
    max-height: calc(100dvh - var(--toolbar-height) - 12px);
    max-width: calc(100vw - 12px);
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1.35;
  }

  .document-page {
    filter: blur(3.5px);
    -webkit-filter: blur(3.5px);
    padding: 4%;
  }
}

@media (max-width: 480px) {
  /* Ultra-compact phone navbar */
  .zoom-level {
    display: none;
  }

  .search-box {
    display: none; /* Hide search input on very small screens, keep icons */
  }

  .tool-btn {
    width: 26px;
    height: 26px;
  }
}

/* =========================================
   Modal Backdrop & Dialog (Popup)
   ========================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 16px;
}

.modal-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: 530px;
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.38), 0 0 1px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.visible .modal-card {
  transform: translateY(0) scale(1);
}

/* Modal Header */
.modal-header {
  height: 48px;
  background-color: #f6f6f7;
  border-bottom: 1px solid #e5e5e7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.modal-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-logo-box {
  width: 24px;
  height: 24px;
  background-color: #eb1000;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #2c2c2c;
}

.modal-close {
  background: transparent;
  border: none;
  color: #8c8c8c;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.modal-close:hover {
  color: #111;
}

/* Modal Body */
.modal-body {
  padding: 24px 24px 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.notice-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.warning-circle {
  width: 48px;
  height: 48px;
  min-width: 48px;
  background-color: #fef3c7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.notice-content {
  display: flex;
  flex-direction: column;
}

.notice-headline {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 6px;
}

.notice-bold {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
}

.notice-sub {
  font-size: 12.5px;
  color: #4b5563;
  line-height: 1.45;
}

/* Turnstile / Captcha Container Prototype */
.turnstile-container {
  margin-top: 4px;
  display: flex;
  justify-content: center;
}

.captcha-box {
  width: 100%;
  max-width: 360px;
  background-color: #fafbfc;
  border: 1px solid #dcdfe4;
  border-radius: 4px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.captcha-checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.captcha-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.custom-checkbox {
  width: 24px;
  height: 24px;
  border: 2px solid #b4b8be;
  border-radius: 3px;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.2s ease;
}

.captcha-checkbox:hover + .custom-checkbox {
  border-color: #8c9199;
}

.custom-checkbox .spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid #0078d4;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.custom-checkbox .check-icon {
  display: none;
}

.custom-checkbox.verifying .spinner {
  display: block;
}

.custom-checkbox.verified {
  border-color: #0078d4;
}

.custom-checkbox.verified .check-icon {
  display: block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.captcha-text {
  display: flex;
  flex-direction: column;
}

.captcha-label {
  font-size: 13.5px;
  font-weight: 500;
  color: #1f2937;
}

.captcha-subtext {
  font-size: 10px;
  color: #6b7280;
}

.captcha-branding {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding-left: 10px;
  border-left: 1px solid #eaeaea;
}

.recaptcha-text {
  font-size: 9px;
  color: #71717a;
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* Modal Footer */
.modal-footer {
  padding: 12px 20px;
  background-color: #f7f7f8;
  border-top: 1px solid #ebebed;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.btn {
  height: 32px;
  padding: 0 16px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
  transition: all 0.15s ease;
}

.btn-cancel {
  background: #ffffff;
  color: #2e2e2e;
  border: 1px solid #c9c9c9;
}

.btn-cancel:hover {
  background: #f1f1f1;
}

.btn-primary {
  background: #a8c1e3;
  color: #ffffff;
  border: none;
  cursor: not-allowed;
}

.btn-primary.active {
  background: #0078d4;
  cursor: pointer;
}

.btn-primary.active:hover {
  background: #0060aa;
}

/* Modal Responsiveness */
@media (max-width: 480px) {
  .modal-card {
    max-width: 100%;
  }

  .modal-body {
    padding: 16px 14px;
    gap: 14px;
  }

  .warning-circle {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }

  .notice-headline {
    font-size: 14px;
  }

  .notice-bold {
    font-size: 12px;
  }

  .notice-sub {
    font-size: 11.5px;
  }

  .captcha-box {
    padding: 8px 10px;
  }

  .modal-footer {
    padding: 10px 14px;
  }

  .btn {
    height: 30px;
    font-size: 12px;
    padding: 0 12px;
  }
}
