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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #f5f7fa;
  padding: 0 20px;
  color: #2c3e50;
  line-height: 1.6;
}

.header {
  display: flex;
  align-items: baseline;
  gap: 15px;
  margin-bottom: 10px;
}

.header .data-source {
  margin-left: auto;
  margin-top: 0;
  font-size: 0.75rem;
  color: #9ca3af;
  font-style: normal;
}

.header h2 {
  font-size: 1rem;
  color: #9ca3af;
  font-style: normal;
}

.header .data-source a {
  color: #6b7280;
  text-decoration: none;
}

.header .data-source a:hover {
  color: #3b82f6;
  text-decoration: underline;
}

h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 30px 0 15px;
  color: #374151;
}

h3 {
  font-size: 1rem;
  font-weight: 500;
  margin: 20px 0 10px;
  color: #4b5563;
}

h4 {
  margin: 0 0 1em 0;
}

nav {
  background: white;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 25px;
  display: flex;
  gap: 10px;
  align-items: center;
  border-bottom: 2px solid #e5e7eb;
}

nav::before {
  content: 'View:';
  font-weight: 600;
  color: #6b7280;
  font-size: 0.875rem;
  margin-right: 5px;
}

nav a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 6px;
  transition: all 0.2s;
  border: 1px solid transparent;
}

nav a:hover {
  background: #eff6ff;
  color: #2563eb;
}

nav a.active {
  background: #3b82f6;
  color: white;
  border-color: #2563eb;
}

nav a.active:hover {
  background: #2563eb;
}

nav a.reset {
  margin-left: auto;
  background: transparent;
  color: #9ca3af;
  border-color: #d1d5db;
  font-size: 0.8125rem;
}

nav a.reset:hover {
  background: #f9fafb;
  color: #6b7280;
  border-color: #9ca3af;
}

nav a.source {
  color: #6b7280;
  font-size: 0.8125rem;
}

nav a.source:hover {
  background: #f3f4f6;
  color: #374151;
}

.container {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}

.pdf-container {
  flex: 1;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

form {
  margin-bottom: 15px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.previous-page form {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 25px;
}

select {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.875rem;
  background: white;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
}

select.previous-dates {
  max-width: 150px;
}

select:hover {
  border-color: #9ca3af;
}

select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

button,
input[type="submit"] {
  padding: 10px 20px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

button:hover,
input[type="submit"]:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

button:active,
input[type="submit"]:active {
  transform: translateY(0);
}

.iframe-wrapper {
  position: relative;
  width: 100%;
  height: 700px;
}

.loading-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
  z-index: 10;
}

.loading-spinner::after {
  content: '';
  display: block;
  width: 50px;
  height: 50px;
  border: 4px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.iframe-wrapper iframe {
  position: relative;
  z-index: 1;
}

iframe {
  width: 100%;
  height: 700px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: white;
}

.previous-page iframe {
  max-width: 1100px;
  height: 780px;
  display: block;
}

.chart-container {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

p {
  color: #6b7280;
  font-style: italic;
}

@media (max-width: 1024px) {
  .container {
    flex-direction: column;
  }
}
