:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-tertiary: #1f2937;
  --bg-card: #141c2e;
  --border-color: #27354f;
  --border-light: #374151;
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --accent-primary: #3b82f6;
  --accent-hover: #2563eb;
  --accent-indigo: #6366f1;
  --color-pass: #10b981;
  --color-warn: #f59e0b;
  --color-fail: #ef4444;
  --color-info: #06b6d4;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.app-header {
  background-color: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-icon {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

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

.brand-title span {
  color: var(--accent-primary);
}

.header-badge {
  font-size: 0.75rem;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-weight: 600;
}

.header-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.header-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s ease;
}

.header-link:hover {
  color: var(--text-primary);
}

/* Main Container */
.main-content {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

/* Hero Section */
.hero-section {
  text-align: center;
  margin-bottom: 2.5rem;
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #ffffff 40%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-features-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 auto 1.25rem;
  max-width: 860px;
}

.hero-sub {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 860px;
  line-height: 1.6;
  margin: 0 auto 1.75rem;
}

.feature-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #94a3b8;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
}

.feature-chip:hover {
  border-color: rgba(96, 165, 250, 0.4);
  color: #e2e8f0;
}

.feature-chip.highlight {
  color: #38bdf8;
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
  font-weight: 600;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.15);
}

/* Search Box */
.search-wrapper {
  max-width: 760px;
  margin: 0 auto 1rem;
}

.search-form {
  display: flex;
  gap: 0.5rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.4rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-form:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 1.05rem;
  padding: 0.6rem 1rem;
  font-family: inherit;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.btn-search {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-indigo));
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.1s ease, filter 0.15s ease;
}

.btn-search:hover {
  filter: brightness(1.1);
}

.btn-search:active {
  transform: scale(0.98);
}

/* Quick Pills */
.quick-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.quick-pill {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 0.25rem 0.7rem;
  border-radius: 9999px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.15s ease;
}

.quick-pill:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--accent-primary);
}

/* Tool Navigation Tabs */
.tool-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.tool-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.15s ease;
}

.tool-tab:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

.tool-tab.active {
  color: #ffffff;
  background: var(--bg-tertiary);
  border-color: var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Main Grid Layout (Results + History Sidebar) */
.layout-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .layout-grid {
    grid-template-columns: 1fr;
  }
}

/* Result Cards */
.result-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.header-left h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.sub-target {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-family: monospace;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.badge-sub {
  font-size: 0.8rem;
  font-weight: 500;
}

.latency-pill {
  font-size: 0.75rem;
  background: var(--bg-secondary);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-family: monospace;
}

.score-pill {
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
}

/* Raw Record Box */
.raw-record-box {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.raw-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  width: 100%;
}

.raw-value {
  color: #38bdf8;
  font-size: 0.9rem;
  word-break: break-all;
  flex: 1;
}

/* Tables */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.data-table th {
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.data-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

.data-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem !important;
}

/* Callouts & Alerts */
.callout {
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  margin-bottom: 1rem;
  align-items: flex-start;
}

.callout-warn {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.callout-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.callout-info {
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: #22d3ee;
}

/* Buttons */
.btn-copy {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

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

/* Tags & Chips */
.tag-pill {
  display: inline-block;
  font-family: monospace;
  font-size: 0.78rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.tag-ip {
  color: #7dd3fc;
  background: rgba(125, 211, 252, 0.08);
  border-color: rgba(125, 211, 252, 0.2);
}

/* Meter / Lookup Limit Progress Bar */
.meter-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.meter-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.meter-track {
  width: 100%;
  height: 8px;
  background-color: var(--bg-primary);
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 0.4rem;
}

.meter-bar {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.3s ease;
}

.bar-emerald { background-color: var(--color-pass); }
.bar-amber { background-color: var(--color-warn); }
.bar-rose { background-color: var(--color-fail); }

.meter-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Mechanisms Grid */
.section-title {
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
  margin: 1.25rem 0 0.75rem;
}

.mechanisms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.mechanism-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}

.mech-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.mech-token {
  font-size: 0.85rem;
  font-weight: 700;
  color: #38bdf8;
}

.tag-dns {
  font-size: 0.7rem;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.mech-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Recommendations Box */
.recommendations-box {
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-top: 1.25rem;
}

.recommendations-box h4 {
  font-size: 0.9rem;
  color: #a5b4fc;
  margin-bottom: 0.5rem;
}

.recommendations-box ul {
  padding-left: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.recommendations-box li {
  margin-bottom: 0.35rem;
}

/* DMARC Summary Grid */
.dmarc-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.metric-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
}

.metric-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.metric-value {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.metric-sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* Domain Health Banner */
.health-banner-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.95));
  border-color: rgba(99, 102, 241, 0.3);
}

.health-overview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.health-score-container {
  text-align: center;
}

.score-dial {
  font-size: 2.75rem;
  font-weight: 900;
  line-height: 1;
}

.score-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.health-badges-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.health-badge-item {
  cursor: pointer;
  transition: transform 0.15s ease;
}

.health-badge-item:hover {
  transform: translateY(-2px);
}

.health-badge-item .badge {
  width: 100%;
  justify-content: center;
  padding: 0.6rem;
  font-size: 0.85rem;
}

/* History Sidebar */
.history-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.history-header h4 {
  font-size: 0.95rem;
  font-weight: 700;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.history-item:hover {
  border-color: var(--accent-primary);
  background: var(--bg-tertiary);
}

.hist-left {
  display: flex;
  flex-direction: column;
}

.hist-target {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.hist-type {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.history-empty {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  padding: 1.5rem 0;
}

/* Loading & Error States */
.loading-card {
  text-align: center;
  padding: 3rem 1.5rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(59, 130, 246, 0.2);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

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

.loading-text {
  font-size: 1.1rem;
  font-weight: 600;
}

.loading-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.error-card {
  display: flex;
  gap: 1rem;
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.3);
}

.alert-icon {
  font-size: 1.75rem;
}

.alert-body h4 {
  color: #f87171;
  margin-bottom: 0.25rem;
}

.alert-body p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Footer */
.app-footer {
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: auto;
}

.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.break-all { word-break: break-all; }
.text-slate-100 { color: #f1f5f9; }
.text-slate-200 { color: #e2e8f0; }
.text-slate-400 { color: #94a3b8; }
.text-slate-500 { color: #64748b; }
.text-sky-400 { color: #38bdf8; }
.text-emerald-400 { color: #34d399; }
.text-amber-400 { color: #fbbf24; }
.text-rose-400 { color: #f87171; }
.text-indigo-400 { color: #818cf8; }
.font-bold { font-weight: 700; }

/* DNSBL Blacklist Specific Styles */
.dnsbl-filter-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 0.3rem 0.8rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent-primary);
}

.filter-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  font-weight: 600;
}

.btn-delist {
  display: inline-block;
  font-size: 0.75rem;
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.15s ease;
}

.btn-delist:hover {
  background: rgba(59, 130, 246, 0.25);
  color: #93c5fd;
  border-color: #60a5fa;
}

.listed-row {
  background-color: rgba(239, 68, 68, 0.08) !important;
}

.listed-row:hover {
  background-color: rgba(239, 68, 68, 0.14) !important;
}

/* Action Toolbar (Share Audit & Print/PDF) */
.card-action-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.action-btn {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
}

.action-btn:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
  border-color: var(--accent-primary);
}

.action-btn.btn-copied {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}

.action-btn.action-btn-email {
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.08);
}

.action-btn.action-btn-email:hover {
  background: rgba(59, 130, 246, 0.18);
  border-color: #3b82f6;
}

/* Remediation Records & Disclaimer Styles */
.remediation-container {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--border-color);
}

.remediation-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.rem-banner-left h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f3f4f6;
  margin-bottom: 0.2rem;
}

.rem-banner-sub {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.disclaimer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fde68a;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  max-width: 480px;
}

.remediation-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.remediation-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  transition: border-color 0.15s ease;
}

.remediation-card:hover {
  border-color: rgba(99, 102, 241, 0.5);
}

.rem-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.rem-title {
  font-size: 0.95rem;
}

.rem-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 0.85rem;
}

.rem-record-grid {
  display: grid;
  grid-template-columns: 80px 180px 1fr;
  gap: 0.75rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  align-items: center;
}

@media (max-width: 768px) {
  .rem-record-grid {
    grid-template-columns: 1fr;
  }
}

.rem-field {
  display: flex;
  flex-direction: column;
}

.rem-field-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.rem-field-val {
  font-size: 0.85rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.rem-val-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.rem-value-text {
  font-size: 0.85rem;
  color: #38bdf8;
  word-break: break-all;
  flex: 1;
}

/* Print / PDF Export Styling */
@media print {
  body {
    background-color: #ffffff !important;
    color: #000000 !important;
  }
  .app-header,
  .hero-section,
  .tool-nav,
  .history-sidebar,
  .card-action-bar,
  .app-footer,
  .btn-copy {
    display: none !important;
  }
  .layout-grid {
    display: block !important;
  }
  .result-card {
    border: 1px solid #cccccc !important;
    background: #ffffff !important;
    box-shadow: none !important;
    color: #000000 !important;
    page-break-inside: avoid;
  }
  .data-table th {
    background: #f1f5f9 !important;
    color: #000000 !important;
  }
  .data-table td {
    color: #111827 !important;
    border-color: #e2e8f0 !important;
  }
  .metric-card {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
  }
  .text-slate-100, .text-slate-200 {
    color: #000000 !important;
  }
}
