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

html, body {
  height: 100%;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #fafafa;
  color: #1a1a2e;
}

body {
  display: flex;
  flex-direction: column;
}

.container {
  display: flex;
  flex: 1;
  min-height: 0;
  width: 100vw;
  background: #fff;
}

.disclaimer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 24px;
  background: #f5f5f7;
  border-bottom: 1px solid #e8e8ec;
  font-size: 11px;
  color: #8e8e98;
  line-height: 1;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}

.disclaimer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,0.03), transparent);
  background-size: 200% 100%;
  animation: shimmer 3s ease-in-out infinite;
  pointer-events: none;
}

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

.disclaimer-icon {
  font-size: 12px;
  flex-shrink: 0;
  animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}

.cat-icon {
  height: 24px;
  width: auto;
  flex-shrink: 0;
}

.disclaimer p {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.left-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
  min-height: 0;
  overflow: hidden;
}

.right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.panel-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 32px;
  height: 56px;
  background: #fff;
  border-bottom: 1px solid #f0f0f2;
  flex-shrink: 0;
}

.panel-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
  white-space: nowrap;
}

.left-panel .panel-bar {
  justify-content: center;
}

.right-panel .panel-bar {
  justify-content: flex-start;
}

.select-wrapper {
  flex: 1;
  max-width: 280px;
}

.panel-bar select {
  width: 100%;
  padding: 4px 12px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  color: #1a1a2e;
  background: #f8f8fa;
  border: 1.5px solid #e8e8ec;
  border-radius: 6px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.panel-bar select:hover {
  border-color: #c8c8d0;
  background-color: #fcfcfd;
}

.panel-bar select:focus {
  outline: none;
  border-color: #1a1a2e;
  box-shadow: 0 0 0 3px rgba(26, 26, 46, 0.06);
}

.panel-bar select option:disabled {
  color: #bbb;
}

.divider {
  width: 1px;
  background: #e8e8ec;
  flex-shrink: 0;
}

.image-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  min-height: 0;
  background: #fafafa;
}

.image-wrapper img {
  max-width: 100%;
  max-height: 100%;
  height: 100%;
  width: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.pdf-viewer {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: #fafafa;
}

.placeholder {
  text-align: center;
}

.placeholder-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 16px;
  opacity: 0.4;
}

.placeholder p {
  font-size: 15px;
  color: #aaa;
  font-weight: 400;
}

.pdf-viewer embed {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.mobile-tabs {
  display: none;
}

.action-bar {
  display: none;
}

@media (max-width: 768px) {
  .disclaimer {
    display: none;
  }

  .container {
    flex-direction: column;
    position: relative;
  }

  .mobile-tabs {
    display: flex;
    flex-shrink: 0;
  }

  .tab {
    flex: 1;
    padding: 14px 16px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: none;
    background: #f0f0f2;
    color: #999;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
  }

  .tab.active {
    background: #fff;
    color: #1a1a2e;
  }

  .divider {
    display: none;
  }

  .left-panel,
  .right-panel {
    flex: none;
    height: 0;
    overflow: hidden;
    padding: 0;
  }

  .left-panel.active,
  .right-panel.active {
    flex: 1;
    height: auto;
    overflow: auto;
    padding: 20px;
  }

  .left-panel.active {
    display: flex;
  }

  .right-panel.active {
    display: flex;
  }

  .left-panel {
    display: none;
  }

  .right-panel {
    display: none;
  }

  .panel-bar {
    padding: 0 20px;
    height: 48px;
  }

  .right-panel .panel-bar {
    gap: 10px;
  }

  .select-wrapper {
    max-width: none;
  }

  .image-wrapper {
    padding: 16px;
  }

  .action-bar {
    display: flex;
    gap: 8px;
    padding: 10px 20px;
    background: #fff;
    border-bottom: 1px solid #f0f0f2;
    flex-shrink: 0;
  }

  .action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    color: #1a1a2e;
    background: #f5f5f7;
    border: 1px solid #e8e8ec;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
  }

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

  .action-btn:not(:disabled):hover {
    background: #eeeef0;
  }

  .action-btn:not(:disabled):active {
    background: #e5e5e7;
  }

  .pdf-viewer {
    padding: 16px;
  }

  .placeholder-icon {
    font-size: 36px;
    margin-bottom: 12px;
  }
}
