/* ==========================================================================
   PROGRAM ELECTRONIC CONVENTIONAL FIRE ALARM PANEL FASCIA STYLES
   Authentic matte black industrial steel enclosure with analog meters,
   red lever toggle switches, and 12-zone rotary selector knobs
   ========================================================================== */

:root {
  --prog-cabinet-bg: #151619;
  --prog-cabinet-border: #2d3036;
  --prog-card-bg: #1b1d22;
  --prog-white-line: rgba(255, 255, 255, 0.85);
  --prog-text-color: #ffffff;
  
  --prog-led-red: #ff2222;
  --prog-led-yellow: #ffb800;
  --prog-led-green: #1fd63e;
  
  --prog-led-off-red: #3a1212;
  --prog-led-off-yellow: #352e12;
  --prog-led-off-green: #102d15;
}

/* Outer Cabinet */
.prog-cabinet {
  position: relative;
  width: 1040px;
  max-width: 100%;
  margin: 0 auto;
  background: var(--prog-cabinet-bg);
  background-image: 
    linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(0,0,0,0.4) 100%),
    radial-gradient(circle at 50% 20%, #202329 0%, #111215 100%);
  border: 4px solid var(--prog-cabinet-border);
  border-radius: 10px;
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.85),
    inset 0 1px 2px rgba(255, 255, 255, 0.2),
    inset 0 -2px 3px rgba(0, 0, 0, 0.6);
  padding: 22px 20px;
  box-sizing: border-box;
  user-select: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--prog-text-color);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* --------------------------------------------------------------------------
   UPPER DECK: ANALOG METERS | 6x4 CONTROL MATRIX | ANCILLARY SERVICES
   -------------------------------------------------------------------------- */
.prog-upper-deck {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

/* 1. Left: Analog Meters Column (Voltmeter & Ammeter) */
.prog-meters-col {
  width: 135px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 4px;
}

.prog-meter-unit {
  position: relative;
  width: 130px;
  height: 64px;
  background: linear-gradient(180deg, #fbf9f4 0%, #ede8de 100%);
  border: 3px solid #8c9096;
  border-radius: 6px;
  box-shadow: 
    inset 0 2px 5px rgba(0,0,0,0.5),
    0 2px 4px rgba(0,0,0,0.6);
  overflow: hidden;
  box-sizing: border-box;
}

.prog-meter-glass-reflection {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 45%;
  background: linear-gradient(180deg, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0.05) 100%);
  pointer-events: none;
  z-index: 5;
}

.prog-meter-scale-svg {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

/* The Needle */
.prog-meter-needle-origin {
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 2px;
  height: 48px;
  transform-origin: bottom center;
  transition: transform 0.6s cubic-bezier(0.2, 1.4, 0.4, 1);
  z-index: 3;
}

.prog-meter-needle {
  width: 1.5px;
  height: 100%;
  background: #111111;
  border-radius: 1px;
}

.prog-meter-pivot-cap {
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #2b2b2b;
  border: 1px solid #111;
  z-index: 4;
}

.prog-meter-type-badge {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 900;
  color: #1e293b;
  z-index: 2;
}

/* 2. Center: 6x4 Main Control & Status Grid */
.prog-control-matrix {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prog-matrix-row {
  display: grid;
  grid-template-columns: repeat(6, 76px);
  gap: 6px;
}

/* Individual Cell with White Border */
.prog-matrix-cell {
  height: 52px;
  background: #191b20;
  border: 1.5px solid var(--prog-white-line);
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 4px 2px 3px 2px;
  box-sizing: border-box;
  text-align: center;
}

.prog-cell-label {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #ffffff;
  line-height: 1.1;
  text-transform: uppercase;
  margin-bottom: 2px;
}

/* Miniature Industrial Toggle Switch with Red Bat Handle */
.prog-toggle-housing {
  width: 20px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
}

.prog-toggle-nut {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #e2e8f0 0%, #94a3b8 70%, #475569 100%);
  border: 1px solid #334155;
  box-shadow: 0 1px 2px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.prog-toggle-lever {
  width: 5px;
  height: 16px;
  background: linear-gradient(90deg, #ef4444 0%, #b91c1c 50%, #7f1d1d 100%);
  border-radius: 2.5px;
  box-shadow: 
    0 2px 4px rgba(0,0,0,0.5),
    inset 0 1px 1px rgba(255,255,255,0.4);
  transform-origin: bottom center;
  transform: rotate(-22deg);
  transition: transform 0.12s cubic-bezier(0.3, 1.5, 0.5, 1);
}

.prog-toggle-housing.toggled-up .prog-toggle-lever {
  transform: rotate(22deg);
  background: linear-gradient(90deg, #f87171 0%, #dc2626 50%, #991b1b 100%);
}

/* Large Round Pushbuttons (Battery Test / Master Reset) */
.prog-round-pushbtn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ef4444 0%, #b91c1c 70%, #7f1d1d 100%);
  border: 2px solid #5e1414;
  box-shadow: 
    0 2px 4px rgba(0,0,0,0.6),
    inset 0 1px 2px rgba(255,255,255,0.5);
  cursor: pointer;
  transition: transform 0.08s ease;
}

.prog-round-pushbtn:active {
  transform: translateY(1.5px) scale(0.96);
  box-shadow: 
    0 1px 2px rgba(0,0,0,0.5),
    inset 0 2px 4px rgba(0,0,0,0.6);
}

/* 3. Right: Ancillary Services (Gas & Hose Reel Pumpset) */
.prog-ancillary-col {
  width: 235px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 4px;
}

.prog-ancillary-box {
  background: #191b20;
  border: 1.5px solid var(--prog-white-line);
  border-radius: 6px;
  padding: 6px 8px;
}

.prog-ancillary-subhead {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.6px;
  text-align: center;
  color: #ffffff;
  margin-bottom: 5px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding-bottom: 2px;
}

.prog-ancillary-grid {
  display: flex;
  justify-content: space-between;
  gap: 4px;
}

.prog-ancillary-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
}

.prog-ancillary-label {
  font-size: 6.5px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   BOTTOM DECK: 12-ZONE ANNUNCIATOR & ROTARY SELECTOR SWITCHES
   -------------------------------------------------------------------------- */
.prog-zone-matrix-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prog-zone-header-strip {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 5px;
  text-align: center;
}

.prog-zone-col-head {
  background: #191b20;
  border: 1.5px solid var(--prog-white-line);
  border-radius: 4px;
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.4px;
  color: #ffffff;
  padding: 3px 0;
  text-transform: uppercase;
}

.prog-zone-cards-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 5px;
}

/* Individual Zone Card */
.prog-zone-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.prog-zone-box {
  width: 100%;
  background: #191b20;
  border: 1.5px solid var(--prog-white-line);
  border-radius: 5px;
  padding: 6px 2px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.prog-zone-indicator-pair {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.prog-zone-ind-label {
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.3px;
  color: #ffffff;
  text-transform: uppercase;
}

.prog-dual-led-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* 4-Position Rotary Selector Knob */
.prog-knob-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  position: relative;
  width: 60px;
}

.prog-knob-positions {
  position: relative;
  width: 58px;
  height: 18px;
  margin-bottom: 2px;
}

.prog-knob-pos-label {
  position: absolute;
  font-size: 6.5px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.2px;
}

.pos-iso { left: 4px; top: 8px; }
.pos-nor { left: 50%; transform: translateX(-50%); top: 0px; }
.pos-tf  { right: 14px; top: 0px; }
.pos-ta  { right: 2px; top: 8px; }

/* The Fluted Pointer Knob */
.prog-rotary-knob {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #33363d 0%, #1a1b1e 70%, #0d0e10 100%);
  border: 2px solid #08090a;
  box-shadow: 
    0 4px 8px rgba(0,0,0,0.7),
    inset 0 1px 2px rgba(255,255,255,0.3);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s cubic-bezier(0.25, 1.4, 0.45, 1);
}

/* Pointer line */
.prog-rotary-knob::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 8px;
  background: #ffffff;
  border-radius: 1.5px;
  box-shadow: 0 0 2px rgba(0,0,0,0.8);
}

/* Blue center cap */
.prog-knob-blue-cap {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #38bdf8 0%, #0284c7 70%, #0369a1 100%);
  border: 1px solid #075985;
  box-shadow: 
    inset 0 1px 2px rgba(255,255,255,0.6),
    0 1px 2px rgba(0,0,0,0.5);
}

/* --------------------------------------------------------------------------
   PROGRAM ELECTRONIC HIGH FIDELITY LED INDICATORS
   -------------------------------------------------------------------------- */
.prog-led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-sizing: border-box;
  flex-shrink: 0;
  position: relative;
  transition: all 0.15s ease;
}

.prog-led::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
  pointer-events: none;
}

/* RED LED */
.prog-led.red {
  background: var(--prog-led-off-red);
  border: 1px solid #4a1515;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.7);
}

.prog-led.red.active {
  background: var(--prog-led-red);
  border-color: #ff9999;
  box-shadow: 
    0 0 8px #ff2222,
    0 0 14px rgba(255, 34, 34, 0.8),
    inset 0 1px 1px rgba(255,255,255,0.7);
}

/* YELLOW LED */
.prog-led.yellow {
  background: var(--prog-led-off-yellow);
  border: 1px solid #4a4014;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.7);
}

.prog-led.yellow.active {
  background: var(--prog-led-yellow);
  border-color: #fff1a8;
  box-shadow: 
    0 0 8px #ffb800,
    0 0 14px rgba(255, 184, 0, 0.8),
    inset 0 1px 1px rgba(255,255,255,0.7);
}

/* GREEN LED */
.prog-led.green {
  background: var(--prog-led-off-green);
  border: 1px solid #14401c;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.7);
}

.prog-led.green.active {
  background: var(--prog-led-green);
  border-color: #99ffb2;
  box-shadow: 
    0 0 8px #1fd63e,
    0 0 14px rgba(31, 214, 62, 0.8),
    inset 0 1px 1px rgba(255,255,255,0.7);
}
