
:root {
  --chem-cobalt: #1e3a8a;
  --chem-blue: #2563eb;
  --chem-teal: #0d9488;
  --chem-teal-light: #ccfbf1;
  --chem-bg: #f8fafc;
  --chem-surface: #ffffff;
  --chem-border: #e2e8f0;
  --chem-dark: #0f172a;
  --chem-text: #1e293b;
  --chem-muted: #64748b;
}
body.theme-chemicals {
  background-color: var(--chem-bg);
  color: var(--chem-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.chem-topbar {
  background-color: #0f172a;
  color: #94a3b8;
  font-size: 0.78rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem 0;
}
.chem-header {
  background-color: #ffffff;
  border-bottom: 2px solid var(--chem-teal);
  padding: 0.85rem 0;
  position: sticky;
  top: 36px;
  z-index: 999;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.chem-brand-mark {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #1e3a8a 0%, #0d9488 100%);
  color: #ffffff;
  font-weight: 900;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}
.btn-chem-primary {
  background-color: var(--chem-teal);
  color: #ffffff;
  font-weight: 700;
  border: none;
  padding: 0.65rem 1.35rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.btn-chem-primary:hover {
  background-color: #0f766e;
  transform: translateY(-1px);
}
.cas-search-panel {
  background: #ffffff;
  border: 1px solid var(--chem-border);
  border-radius: 8px;
  padding: 1.75rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}
.cas-input-group {
  display: flex;
  gap: 0.5rem;
}
.cas-input {
  flex-grow: 1;
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 0.75rem 1rem;
  font-family: ui-monospace, monospace;
  font-size: 0.95rem;
  outline: none;
}
.cas-input:focus {
  border-color: var(--chem-teal);
  background: #ffffff;
}
.chem-card {
  background: #ffffff;
  border: 1px solid var(--chem-border);
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}
.chem-card:hover {
  border-color: var(--chem-teal);
  box-shadow: 0 10px 25px rgba(13, 148, 136, 0.1);
  transform: translateY(-3px);
}
.chem-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}
.cas-badge {
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  color: #0d9488;
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}
.purity-badge {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}
.chem-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--chem-dark);
  margin-bottom: 0.35rem;
}
.chem-formula {
  font-family: ui-monospace, monospace;
  font-size: 0.84rem;
  color: var(--chem-muted);
  margin-bottom: 1rem;
}
.chem-specs-table {
  width: 100%;
  font-size: 0.8rem;
  border-collapse: collapse;
  margin-bottom: 1.25rem;
}
.chem-specs-table td {
  padding: 0.35rem 0;
  border-bottom: 1px solid #f1f5f9;
}
.chem-specs-table td:first-child {
  color: var(--chem-muted);
}
.chem-specs-table td:last-child {
  text-align: right;
  font-weight: 600;
  color: var(--chem-dark);
  font-family: ui-monospace, monospace;
}
.doc-download-btn {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: var(--chem-dark);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}
.doc-download-btn:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}
.un-pack-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 1.25rem;
  text-align: center;
}
