/* ==========================================================================
   CONVERSI-MATERIAL - INDUSTRIAL ROLL CALCULATOR
   Modern Dark-Tech Glassmorphism Design System
   ========================================================================== */

:root {
  --bg-main: #0a0e17;
  --bg-card: rgba(18, 24, 38, 0.85);
  --bg-card-hover: rgba(24, 32, 50, 0.95);
  --bg-input: rgba(12, 17, 29, 0.9);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #06b6d4;
  --border-hover: rgba(255, 255, 255, 0.18);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.35);
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.35);
  --accent-amber: #f59e0b;
  --accent-indigo: #6366f1;
  --accent-rose: #f43f5e;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  --shadow-glow: 0 0 25px -5px var(--accent-cyan-glow);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(6, 182, 212, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(99, 102, 241, 0.08) 0%, transparent 45%),
    linear-gradient(to bottom, #070a10, #0a0e17 60%, #070a12);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Navbar */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(10, 14, 23, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4);
}

.brand-icon svg {
  width: 24px;
  height: 24px;
  color: #fff;
}

.brand-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, #ffffff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Container */
.main-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem 1.5rem;
}

/* Header Banner */
.hero-header {
  margin-bottom: 2rem;
}

.hero-header h1 {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
}

.hero-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 750px;
}

/* Two-Column Grid */
.calculator-grid {
  display: grid;
  grid-template-columns: 1.05fr 1.25fr;
  gap: 1.75rem;
  align-items: start;
}

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

/* Glass Card */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  position: relative;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.glass-card:hover {
  border-color: var(--border-hover);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.card-title-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Form Styles */
.form-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  margin: 1rem 0 0.65rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, rgba(6, 182, 212, 0.3), transparent);
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.form-label-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 0.85rem;
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.input-suffix {
  position: absolute;
  right: 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  pointer-events: none;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.form-control {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font-size: 0.92rem;
  font-family: var(--font-sans);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
}

.form-control.has-icon {
  padding-left: 2.6rem;
}

.form-control.has-suffix {
  padding-right: 3.5rem;
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
  background: rgba(15, 23, 42, 0.95);
}

.form-control::placeholder {
  color: var(--text-muted);
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.5l-5-5h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.5rem;
}

select.form-control option {
  background: #0f172a;
  color: #fff;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.85rem;
}

@media (max-width: 600px) {
  .form-row-2, .form-row-3 {
    grid-template-columns: 1fr;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--font-sans);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  color: #fff;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0891b2, #1d4ed8);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-hover);
}

.btn-danger-subtle {
  background: rgba(244, 63, 94, 0.1);
  color: #fb7185;
  border-color: rgba(244, 63, 94, 0.25);
}

.btn-danger-subtle:hover {
  background: rgba(244, 63, 94, 0.2);
  color: #fff;
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
}

.btn-block {
  width: 100%;
}

/* Quick Material Select Row */
.material-quick-bar {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}

.material-quick-bar select {
  flex: 1;
}

/* Visualizer Container */
.visualizer-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.svg-display-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 460px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.8) 0%, rgba(10, 14, 23, 0.95) 75%);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 50px -10px rgba(0, 0, 0, 0.8), inset 0 0 40px rgba(0, 0, 0, 0.6);
  padding: 1rem;
}

.svg-roll-canvas {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* SVG Elements Styling */
.svg-bg-circle {
  fill: rgba(15, 23, 42, 0.4);
  stroke: rgba(255, 255, 255, 0.1);
  stroke-dasharray: 4, 4;
}

.svg-scale-circle {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 1;
  stroke-dasharray: 2, 4;
  transition: stroke 0.2s ease;
}

.svg-scale-circle.scale-major {
  stroke: rgba(255, 255, 255, 0.25);
  stroke-dasharray: 4, 4;
}

.svg-scale-circle:hover {
  stroke: var(--accent-cyan);
}

.svg-scale-label {
  font-family: var(--font-mono);
  font-size: 8px;
  fill: #64748b;
  font-weight: 600;
  text-anchor: middle;
  pointer-events: none;
}

.svg-material-ring {
  fill: url(#rollMaterialGradient);
  filter: drop-shadow(0 0 14px rgba(6, 182, 212, 0.45));
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.svg-current-mark-circle {
  fill: none;
  stroke: #22d3ee;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 6px #22d3ee);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.svg-core-outer {
  fill: #1e293b;
  stroke: #475569;
  stroke-width: 2;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.8));
}

.svg-core-inner {
  fill: #090d16;
  stroke: #334155;
  stroke-width: 1.5;
}

.svg-core-cross {
  stroke: #475569;
  stroke-width: 1.2;
  stroke-dasharray: 2, 2;
}

.svg-core-label {
  font-family: var(--font-sans);
  font-size: 7.5px;
  fill: #94a3b8;
  font-weight: 700;
  text-anchor: middle;
}

/* Floating Readout Badge in Center */
.center-readout {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  background: rgba(9, 13, 22, 0.88);
  border: 1px solid rgba(6, 182, 212, 0.4);
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.3);
  border-radius: 50%;
  width: 110px;
  height: 110px;
  text-align: center;
  backdrop-filter: blur(8px);
}

.readout-fraction {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 800;
  color: #22d3ee;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.readout-unit {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
}

.readout-meters {
  font-size: 0.75rem;
  font-weight: 600;
  color: #f1f5f9;
  margin-top: 2px;
}

.readout-pcs {
  font-size: 0.68rem;
  color: var(--accent-emerald);
  font-weight: 600;
}

/* Visualizer Controls / Legends */
.visualizer-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-dot.cyan {
  background: #06b6d4;
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.6);
}

.legend-dot.gray {
  background: #475569;
}

.legend-dot.dashed {
  background: transparent;
  border: 1px dashed #94a3b8;
}

/* Stats Metric Cards Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-top: 0.5rem;
}

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

.stat-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
}

.stat-card.highlight {
  border-color: rgba(6, 182, 212, 0.4);
  background: linear-gradient(145deg, rgba(6, 182, 212, 0.08), rgba(15, 23, 42, 0.85));
}

.stat-card.highlight::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, #06b6d4, #3b82f6);
}

.stat-card.highlight-emerald {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.08), rgba(15, 23, 42, 0.85));
}

.stat-card.highlight-emerald::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, #10b981, #06b6d4);
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.stat-value.cyan {
  color: #22d3ee;
}

.stat-value.emerald {
  color: #34d399;
}

.stat-value.amber {
  color: #fbbf24;
}

.stat-subtext {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* History Section */
.history-section {
  margin-top: 2.5rem;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

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

.custom-table th {
  background: rgba(15, 23, 42, 0.9);
  padding: 0.85rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.custom-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  vertical-align: middle;
}

.custom-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
}

.badge-roll {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 8, 15, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

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

.modal-container {
  background: #111827;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 30px rgba(6, 182, 212, 0.15);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 1.75rem;
}

.modal-overlay.active .modal-container {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: #fff;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 2000;
}

.toast {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
  animation: toastSlide 0.3s ease;
}

.toast.toast-success {
  border-color: rgba(16, 185, 129, 0.4);
}

.toast.toast-error {
  border-color: rgba(244, 63, 94, 0.4);
}

@keyframes toastSlide {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Info Box / Physics Explainer */
.info-box {
  background: rgba(6, 182, 212, 0.08);
  border-left: 3px solid var(--accent-cyan);
  padding: 0.85rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.82rem;
  color: #cbd5e1;
  margin-top: 1rem;
  line-height: 1.6;
}

.info-box strong {
  color: #22d3ee;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}

/* Mode Switcher Tabs */
.calc-mode-switcher {
  display: flex;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.25rem;
  margin-bottom: 1.25rem;
  gap: 0.25rem;
}

.mode-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.mode-tab-btn.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(37, 99, 235, 0.2));
  border: 1px solid rgba(6, 182, 212, 0.4);
  box-shadow: 0 2px 10px rgba(6, 182, 212, 0.2);
}

/* Ruler Input Visual */
.ruler-input-card {
  background: rgba(6, 182, 212, 0.05);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  margin-bottom: 1rem;
}

.ruler-graphic-bar {
  position: relative;
  height: 28px;
  background: #1e293b;
  border-radius: 4px;
  margin: 0.75rem 0 0.25rem 0;
  border: 1px solid #475569;
  overflow: hidden;
}

.ruler-fill-bar {
  height: 100%;
  background: linear-gradient(to right, #0284c7, #06b6d4, #10b981);
  width: 50%;
  transition: width 0.3s ease;
}

/* Operator Quick Conversion Table */
.operator-table-section {
  margin-top: 2rem;
}

.table-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
  background: rgba(15, 23, 42, 0.5);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.table-filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.table-filter-btn {
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.table-filter-btn.active {
  background: rgba(6, 182, 212, 0.2);
  color: #22d3ee;
  border-color: rgba(6, 182, 212, 0.4);
}

.row-highlight-active td {
  background: rgba(6, 182, 212, 0.12) !important;
  color: #fff !important;
  font-weight: 700;
}

/* Print Styles for Shop Floor */
@media print {
  @page {
    margin: 1.2cm;
    size: auto;
  }

  * {
    font-family: 'Times New Roman', Times, Georgia, serif !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
    font-family: 'Times New Roman', Times, Georgia, serif !important;
  }

  /* Hide screen-only components and unwanted website headers */
  .navbar,
  .hero-header,
  .calculator-grid,
  .history-section,
  .btn,
  .table-filter-bar,
  .modal-overlay,
  #toastContainer,
  .card-header,
  .card-title-group,
  .print-hide,
  #operatorConversionTable th.print-hide,
  #operatorConversionTable td.print-hide {
    display: none !important;
  }

  .operator-table-section {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .operator-table-section .glass-card {
    background: #fff !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .table-responsive {
    max-height: none !important;
    overflow: visible !important;
    border: none !important;
    width: 100% !important;
  }

  /* Print Header */
  .print-header-only {
    display: block !important;
    margin-bottom: 18px !important;
    text-align: center !important;
    font-family: 'Times New Roman', Times, Georgia, serif !important;
  }

  .print-header-only h2 {
    font-size: 15pt !important;
    font-weight: bold !important;
    margin-bottom: 6px !important;
    color: #000 !important;
    font-family: 'Times New Roman', Times, Georgia, serif !important;
  }

  #printMaterialSpecs {
    font-size: 11pt !important;
    margin-bottom: 8px !important;
    border-bottom: 1.5px solid #000 !important;
    padding-bottom: 6px !important;
    color: #000 !important;
    font-family: 'Times New Roman', Times, Georgia, serif !important;
  }

  .print-header-only p {
    font-size: 10pt !important;
    color: #222 !important;
    margin: 0 !important;
    font-style: italic !important;
    font-family: 'Times New Roman', Times, Georgia, serif !important;
  }

  /* Table Layout & Cells */
  #operatorConversionTable {
    display: table !important;
    width: 100% !important;
    max-width: 580px !important;
    margin: 0 auto !important;
    border: 1.5px solid #000 !important;
    border-collapse: collapse !important;
    font-family: 'Times New Roman', Times, Georgia, serif !important;
  }

  #operatorConversionTable thead {
    display: table-header-group !important;
  }

  #operatorConversionTable tbody {
    display: table-row-group !important;
  }

  #operatorConversionTable tr {
    display: table-row !important;
    page-break-inside: avoid !important;
  }

  #operatorConversionTable th {
    display: table-cell !important;
    background: #f1f5f9 !important;
    color: #000 !important;
    border: 1px solid #000 !important;
    padding: 8px 12px !important;
    font-size: 11.5pt !important;
    font-weight: bold !important;
    text-align: center !important;
    font-family: 'Times New Roman', Times, Georgia, serif !important;
  }

  #operatorConversionTable th.col-ruler {
    width: 50% !important;
  }

  #operatorConversionTable th.col-roll {
    width: 50% !important;
  }

  #operatorConversionTable td {
    display: table-cell !important;
    color: #000 !important;
    border: 1px solid #000 !important;
    padding: 5px 12px !important;
    font-size: 11pt !important;
    text-align: center !important;
    font-family: 'Times New Roman', Times, Georgia, serif !important;
    vertical-align: middle !important;
  }

  #operatorConversionTable td.col-ruler {
    width: 50% !important;
    text-align: center !important;
  }

  #operatorConversionTable td.col-roll {
    width: 50% !important;
    text-align: center !important;
  }

  #operatorConversionTable td.col-ruler strong,
  #operatorConversionTable td.col-roll .badge-roll {
    display: inline-block !important;
    color: #000 !important;
    font-size: 11pt !important;
    font-family: 'Times New Roman', Times, Georgia, serif !important;
    font-weight: bold !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  #operatorConversionTable td.col-ruler .badge-roll {
    font-size: 9pt !important;
    font-weight: normal !important;
    color: #444 !important;
    border: 1px solid #444 !important;
    padding: 1px 4px !important;
    border-radius: 3px !important;
    margin-left: 4px !important;
  }
}

.print-header-only {
  display: none;
}

