:root {
  /* Clean, High-Contrast Light Theme Only */
  --bg-primary: #f4f6fa;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-input: #ffffff;
  --border-color: #e2e8f0;
  --border-focus: #0056b3;
  
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  
  --accent-blue: #0056b3;
  --accent-cyan: #0891b2;
  --accent-amber: #d97706;
  --accent-orange: #ea580c;
  --accent-emerald: #059669;
  --accent-rose: #e11d48;
  
  /* High-Contrast Alert Tokens */
  --alert-info-bg: #eff6ff;
  --alert-info-border: #93c5fd;
  --alert-info-text: #1e40af;
  
  --alert-warning-bg: #fffbeb;
  --alert-warning-border: #f59e0b;
  --alert-warning-text: #854d0e;
  
  --alert-success-bg: #ecfdf5;
  --alert-success-border: #6ee7b7;
  --alert-success-text: #065f46;

  /* Badges Tokens */
  --badge-recommended-bg: #dcfce7;
  --badge-recommended-border: #86efac;
  --badge-recommended-text: #14532d;

  --badge-prohibited-bg: #ffe4e6;
  --badge-prohibited-border: #fca5a5;
  --badge-prohibited-text: #9f1239;

  --badge-caution-bg: #fef3c7;
  --badge-caution-border: #fcd34d;
  --badge-caution-text: #78350f;

  --badge-safe-bg: #dbeafe;
  --badge-safe-border: #93c5fd;
  --badge-safe-text: #1e3a8a;

  --badge-exempt-bg: #dcfce7;
  --badge-exempt-border: #86efac;
  --badge-exempt-text: #14532d;

  --cta-bg: linear-gradient(135deg, #f0fdfa, #eff6ff);
  --cta-border: #bfdbfe;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.09);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  padding: 24px 16px 60px;
  background-image: 
    radial-gradient(at 0% 0%, rgba(0, 86, 179, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(5, 150, 105, 0.04) 0px, transparent 50%);
  background-attachment: fixed;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
}

/* Header with Brand Logo */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--border-color);
  flex-wrap: wrap;
  gap: 16px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  height: 50px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.brand-details {
  display: flex;
  flex-direction: column;
}

.brand-tagline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.brand-name {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0056b3;
}

.standard-badge {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.app-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.app-subtitle {
  font-size: 0.88rem;
  color: #475569;
}

.header-actions {
  display: flex;
  gap: 10px;
}

.btn-secondary {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #0f172a;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  border-color: #0056b3;
  color: #0056b3;
  background: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 86, 179, 0.12);
}

/* Grid Layout */
.main-grid {
  display: grid;
  grid-template-columns: 410px 1fr;
  gap: 24px;
  align-items: start;
}

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

/* Input Panel Card - Prominently Highlighted Data Entry Area */
.input-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid #2563eb;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.12), 0 4px 12px rgba(15, 23, 42, 0.05);
  position: relative;
}

/* Data Entry Header Badge */
.data-entry-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 18px;
}

.data-entry-badge-tag {
  font-size: 0.75rem;
  font-weight: 800;
  color: #1d4ed8;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
}

.data-entry-badge-tag .badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2563eb;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}

.data-entry-step {
  font-size: 0.75rem;
  font-weight: 700;
  color: #3b82f6;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.panel-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1.5px solid #e2e8f0;
}

.panel-title-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

.form-label span {
  color: #dc2626;
  font-weight: 800;
}

/* Highlighted Input Fields */
.form-input, .form-select {
  width: 100%;
  background-color: #ffffff;
  border: 2px solid #94a3b8;
  border-radius: 8px;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
  font-family: inherit;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.form-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.form-input:hover, .form-select:hover {
  border-color: #3b82f6;
}

.form-input:focus, .form-select:focus {
  border-color: #2563eb;
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}

/* Preset Section & Tier Selection Buttons */
.preset-section {
  margin-top: 10px;
}

.preset-title {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.preset-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.preset-pill {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 11px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.preset-pill:hover {
  border-color: #2563eb;
  color: #1d4ed8;
  background: #eff6ff;
  transform: translateY(-1px);
}

.preset-pill.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

/* Tier Badge - Highlighted */
.tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1.5px solid #93c5fd;
  transition: all 0.2s ease;
}

.tier-badge.status-active {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #93c5fd;
}

.tier-badge.status-exempt {
  background: #ecfdf5;
  color: #065f46;
  border-color: #6ee7b7;
}

.tier-badge.status-warning {
  background: #fffbeb;
  color: #92400e;
  border-color: #fcd34d;
}

.tier-badge.status-danger {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fca5a5;
}

/* Radio segment control - Highlighted */
.segmented-control {
  display: flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 8px;
  border: 2px solid #cbd5e1;
  gap: 4px;
}

.segmented-control label {
  flex: 1;
  text-align: center;
  padding: 9px 8px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  color: #475569;
  transition: all 0.2s;
}

.segmented-control input[type="radio"] {
  display: none;
}

.segmented-control input[type="radio"]:checked + label {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

/* Input with button - Highlighted */
.input-with-action {
  display: flex;
  gap: 8px;
}

.input-with-action .form-input {
  flex: 1;
}

.btn-inline {
  background: #2563eb;
  border: 1.5px solid #2563eb;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0 16px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-inline:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

/* Results Panel */
.results-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Banner Alert - High Contrast */
.banner-alert {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  font-size: 0.94rem;
  line-height: 1.5;
  border: 1.5px solid transparent;
  box-shadow: var(--shadow-sm);
}

.banner-icon {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
}

.alert-info {
  background: var(--alert-info-bg);
  border-color: var(--alert-info-border);
  color: var(--alert-info-text);
}

.alert-warning {
  background: var(--alert-warning-bg);
  border-color: var(--alert-warning-border);
  color: var(--alert-warning-text);
  font-weight: 600;
}

.alert-success {
  background: var(--alert-success-bg);
  border-color: var(--alert-success-border);
  color: var(--alert-success-text);
}

/* Temperature Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

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

.bake-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  overflow: hidden;
}

.bake-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
}

.card-125::before { background: linear-gradient(90deg, #f59e0b, #ea580c); }
.card-90::before  { background: linear-gradient(90deg, #2563eb, #0891b2); }
.card-40::before  { background: linear-gradient(90deg, #059669, #10b981); }

.bake-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

.bake-card.recommended {
  border-color: #059669;
  box-shadow: 0 0 20px rgba(5, 150, 105, 0.15);
}

.bake-card.danger {
  border-color: #e11d48;
  background: #fff1f2;
}

.bake-card.exempt {
  border-color: #059669;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}

.temp-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.card-125 .temp-title { color: #d97706; }
.card-90 .temp-title  { color: #0056b3; }
.card-40 .temp-title  { color: #059669; }

.temp-subtitle {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
}

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 10px 0 16px;
}

.duration-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  font-weight: 700;
}

.duration-val {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin: 4px 0 14px;
}

.duration-val.text-exempt {
  color: #059669;
  font-size: 1.4rem;
}

.ready-box {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 14px;
}

.ready-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
}

.ready-time {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 2px;
}

.carrier-badge {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 7px 10px;
  border-radius: 6px;
  text-align: center;
  letter-spacing: 0.02em;
  display: block;
}

.badge-recommended {
  background: var(--badge-recommended-bg);
  color: var(--badge-recommended-text);
  border: 1px solid var(--badge-recommended-border);
}

.badge-prohibited {
  background: var(--badge-prohibited-bg);
  color: var(--badge-prohibited-text);
  border: 1px solid var(--badge-prohibited-border);
}

.badge-caution {
  background: var(--badge-caution-bg);
  color: var(--badge-caution-text);
  border: 1px solid var(--badge-caution-border);
}

.badge-safe {
  background: var(--badge-safe-bg);
  color: var(--badge-safe-text);
  border: 1px solid var(--badge-safe-border);
}

.badge-exempt {
  background: var(--badge-exempt-bg);
  color: var(--badge-exempt-text);
  border: 1px solid var(--badge-exempt-border);
}

/* Professional CTA Card for IoT Sensors */
.cta-banner-card {
  background: var(--cta-bg);
  border: 1.5px solid var(--cta-border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 28px;
  box-shadow: var(--shadow-md);
  margin-top: 8px;
  position: relative;
  overflow: hidden;
}

.cta-banner-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(180deg, #0056b3, #ef4444);
}

.cta-image-wrapper {
  flex-shrink: 0;
  width: 150px;
  height: 150px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid #cbd5e1;
  box-shadow: var(--shadow-sm);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cta-device-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.cta-image-wrapper:hover .cta-device-img {
  transform: scale(1.05);
}

.cta-content {
  flex: 1;
}

.cta-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #0056b3;
  background: rgba(0, 86, 179, 0.08);
  border: 1px solid rgba(0, 86, 179, 0.2);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.cta-heading {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.cta-description {
  font-size: 0.92rem;
  color: #334155;
  line-height: 1.5;
  margin-bottom: 14px;
}

.cta-features {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
}

.cta-feature-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cta-feature-icon {
  color: #059669;
}

.cta-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: linear-gradient(135deg, #0056b3, #1e40af);
  color: #ffffff;
  border: none;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 86, 179, 0.35);
  text-decoration: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #004494, #1d4ed8);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 86, 179, 0.45);
}

.cta-contact-text {
  font-size: 0.84rem;
  color: #64748b;
  font-weight: 500;
}

@media (max-width: 680px) {
  .cta-banner-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
  }
  .cta-image-wrapper {
    width: 100%;
    height: 180px;
  }
}

/* Notes & Reference Section */
.notes-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}

.notes-header {
  font-size: 0.98rem;
  font-weight: 800;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0f172a;
}

.notes-content ul {
  padding-left: 18px;
  color: #334155;
  font-size: 0.88rem;
}

.notes-content li {
  margin-bottom: 8px;
}

.notes-content strong {
  color: #0f172a;
}

/* Modal for Table 4-1 Raw View */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  padding: 20px;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-lg);
  max-width: 960px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid #e2e8f0;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: #64748b;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
}

.modal-close:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  margin-bottom: 20px;
}

.data-table th, .data-table td {
  border: 1px solid #cbd5e1;
  padding: 8px 10px;
  text-align: right;
}

.data-table th:first-child, .data-table td:first-child {
  text-align: left;
}

.data-table th {
  background: #f1f5f9;
  font-weight: 800;
  color: #0f172a;
}

.data-table tr:hover {
  background: #f8fafc;
}

/* Contact Modal */
.contact-modal-body {
  padding: 24px;
}

.contact-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px 0;
}

.contact-info-card {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 14px;
}

.contact-info-title {
  font-size: 0.78rem;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 800;
  margin-bottom: 4px;
}

.contact-info-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}
