/* ==========================================================================
   PATENT SYSTEM 88i CONVENTIONAL FIRE ALARM CONTROL PANEL FASCIA
   Singapore Standard SS 645 / British Standard BS 5839 Pt 2 & 4
   ========================================================================== */

:root {
  --patent-cabinet-bg: #e7e2d6;
  --patent-cabinet-border: #b8b1a3;
  --patent-frame-blue: #182c58;
  --patent-pill-blue: #1b2f5d;
  --patent-label-dark: #142345;
  
  --patent-led-red: #ff2222;
  --patent-led-yellow: #ffb800;
  --patent-led-green: #1fd63e;
  --patent-led-amber: #ff9d00;
  
  --patent-led-off-red: #3d1414;
  --patent-led-off-yellow: #3a3214;
  --patent-led-off-green: #132e18;
  --patent-led-off-amber: #38250f;
}

/* Master Outer Cabinet */
.patent-cabinet {
  position: relative;
  width: 1040px;
  max-width: 100%;
  margin: 0 auto;
  background: var(--patent-cabinet-bg);
  background-image: 
    linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(0,0,0,0.04) 100%),
    radial-gradient(circle at 50% 30%, #eee9de 0%, #ded7c9 100%);
  border: 4px solid var(--patent-cabinet-border);
  border-radius: 12px;
  box-shadow: 
    0 18px 45px rgba(0, 0, 0, 0.65),
    inset 0 2px 3px rgba(255, 255, 255, 0.6),
    inset 0 -3px 4px rgba(0, 0, 0, 0.25);
  padding: 22px 24px;
  box-sizing: border-box;
  user-select: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #142345;
}

/* --------------------------------------------------------------------------
   UPPER SECTION: DUAL ZONE ANNUNCIATOR MODULES (ZONES 1-4 & 5-8)
   -------------------------------------------------------------------------- */
.patent-upper-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.patent-zone-module {
  flex: 1;
  background: #eae5da;
  border: 2px solid var(--patent-frame-blue);
  border-radius: 8px;
  padding: 10px 14px 14px 14px;
  box-shadow: 
    inset 0 1px 3px rgba(255,255,255,0.7),
    0 2px 6px rgba(0, 0, 0, 0.12);
}

.patent-zone-header-row {
  display: grid;
  grid-template-columns: 88px 56px 54px 62px 1fr;
  align-items: center;
  text-align: center;
  padding-bottom: 8px;
  margin-bottom: 6px;
  border-bottom: 1.5px solid rgba(24, 44, 88, 0.25);
}

.patent-zone-th {
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 0.6px;
  color: var(--patent-frame-blue);
  text-transform: uppercase;
}

.patent-zone-row {
  display: grid;
  grid-template-columns: 148px 54px 62px 1fr;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
}

/* Dark Blue Pill containing FIRE (2 Red LEDs) and FAULT (1 Yellow LED) */
.patent-zone-led-pill {
  background: var(--patent-pill-blue);
  border-radius: 6px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  box-shadow: 
    inset 0 1px 3px rgba(0,0,0,0.5),
    0 1px 2px rgba(255,255,255,0.4);
}

.patent-fire-leds-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Zone Number Box */
.patent-zone-num-box {
  width: 48px;
  height: 34px;
  background: #ffffff;
  border: 1.5px solid var(--patent-frame-blue);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  color: var(--patent-frame-blue);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
  margin: 0 auto;
}

/* Zone Isolate Rocker Switch Assembly */
.patent-zone-switch-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.patent-rocker-housing {
  width: 42px;
  height: 34px;
  background: linear-gradient(180deg, #d8d4c8 0%, #b8b2a3 100%);
  border: 1px solid #7c776c;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 2px 0 2px 0;
  box-sizing: border-box;
  box-shadow: 
    0 1px 3px rgba(0,0,0,0.3),
    inset 0 1px 1px rgba(255,255,255,0.5);
  cursor: pointer;
  transition: transform 0.08s ease;
}

.patent-rocker-housing:active {
  transform: translateY(1px);
}

/* Indicator LED above switch */
.patent-switch-ind-led {
  width: 14px;
  height: 4px;
  border-radius: 1.5px;
  background: var(--patent-led-off-amber);
  border: 1px solid #473215;
  transition: all 0.15s ease;
}

.patent-switch-ind-led.active {
  background: var(--patent-led-amber);
  box-shadow: 0 0 6px #ff9d00, 0 0 10px #ffb300;
  border-color: #ffe39b;
}

/* Rocker Paddle */
.patent-rocker-paddle {
  width: 32px;
  height: 18px;
  border-radius: 3px;
  background: linear-gradient(180deg, #32b564 0%, #1d8243 100%);
  border: 1px solid #14592e;
  box-shadow: 
    inset 0 1px 2px rgba(255,255,255,0.4),
    0 2px 3px rgba(0,0,0,0.4);
  position: relative;
  transition: all 0.12s ease;
}

.patent-rocker-housing.isolated .patent-rocker-paddle {
  transform: perspective(60px) rotateX(15deg);
  background: linear-gradient(180deg, #1d8243 0%, #156232 100%);
  box-shadow: 
    inset 0 2px 4px rgba(0,0,0,0.4),
    0 1px 1px rgba(0,0,0,0.3);
}

/* Location Card Slot */
.patent-location-slot {
  height: 34px;
  background: #ffffff;
  border: 1.5px solid var(--patent-frame-blue);
  border-radius: 5px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #1e293b;
  text-transform: uppercase;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  outline: none;
}

.patent-location-slot:focus {
  border-color: #0284c7;
  box-shadow: 0 0 5px rgba(2, 132, 199, 0.4);
}

/* --------------------------------------------------------------------------
   LOWER SECTION: ALARM IDENTIFICATION & PATENT SYSTEM 88i CONTROL DECK
   -------------------------------------------------------------------------- */
.patent-lower-row {
  display: flex;
  gap: 16px;
  align-items: stretch;
}

/* Left Lower Module: Alarm Identification & IMF */
.patent-alarm-id-card {
  width: 220px;
  background: #eae5da;
  border: 2px solid var(--patent-frame-blue);
  border-radius: 8px;
  padding: 10px 12px 14px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 
    inset 0 1px 3px rgba(255,255,255,0.7),
    0 2px 6px rgba(0, 0, 0, 0.12);
}

.patent-sub-header-bar {
  background: var(--patent-frame-blue);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-align: center;
  padding: 4px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* 7-Segment Digital Display */
.patent-display-bezel {
  background: #0d0606;
  border: 2px solid #331515;
  border-radius: 6px;
  padding: 6px 10px;
  text-align: center;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.8);
}

.patent-display-screen {
  font-family: 'Courier New', Courier, monospace;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 4px;
  color: #ff2222;
  text-shadow: 
    0 0 6px rgba(255, 34, 34, 0.8),
    0 0 14px rgba(255, 0, 0, 0.5);
  line-height: 1;
}

.patent-display-subtext {
  font-size: 9.5px;
  font-weight: 800;
  color: var(--patent-frame-blue);
  text-align: center;
  letter-spacing: 0.5px;
  margin-top: 4px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

/* IMF State Indicators Inner Box */
.patent-imf-box {
  background: #eae5da;
  border: 1.5px solid var(--patent-frame-blue);
  border-radius: 6px;
  padding: 8px;
}

.patent-imf-title {
  font-size: 9px;
  font-weight: 900;
  color: var(--patent-frame-blue);
  text-align: center;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}

.patent-imf-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.patent-imf-item:last-child {
  margin-bottom: 0;
}

.patent-imf-label {
  font-size: 9.5px;
  font-weight: 800;
  color: var(--patent-frame-blue);
  letter-spacing: 0.2px;
}

/* Right Lower Module: Patent System 88i Main Deck */
.patent-main-card {
  flex: 1;
  background: #eae5da;
  border: 2px solid var(--patent-frame-blue);
  border-radius: 8px;
  padding: 10px 14px 14px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 
    inset 0 1px 3px rgba(255,255,255,0.7),
    0 2px 6px rgba(0, 0, 0, 0.12);
}

/* Header with Brand Logo & Standards text */
.patent-brand-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  padding-bottom: 4px;
}

.patent-brand-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.patent-brand-logo {
  font-family: 'Times New Roman', Times, Georgia, serif;
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #132752;
  text-shadow: 0 1px 1px rgba(255,255,255,0.8);
}

.patent-brand-model {
  font-family: 'Brush Script MT', 'Dancing Script', 'Caveat', cursive, serif;
  font-size: 28px;
  font-style: italic;
  font-weight: bold;
  color: #c92a2a;
}

.patent-standards-text {
  font-size: 9px;
  font-weight: 700;
  color: #132752;
  line-height: 1.25;
  text-align: right;
}

/* 3 Main Deck Sub-sections Grid */
.patent-sections-grid {
  display: grid;
  grid-template-columns: 215px 215px 1fr;
  gap: 10px;
}

/* Sub-section A & B (Navy Blue Blocks) */
.patent-blue-card {
  background: var(--patent-pill-blue);
  border-radius: 6px;
  padding: 8px 10px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  box-shadow: 
    inset 0 1px 3px rgba(0,0,0,0.5),
    0 1px 2px rgba(255,255,255,0.4);
}

.patent-card-head {
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Status Indicators Grid (2 columns) */
.patent-status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 8px;
}

.patent-status-item {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 20px;
}

.patent-status-label {
  font-size: 9px;
  font-weight: 700;
  line-height: 1.1;
  color: #f1f5f9;
}

/* Sub-section C: System Control Switches */
.patent-switches-card {
  background: #f4efe4;
  border: 1.5px solid var(--patent-frame-blue);
  border-radius: 6px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.06);
}

.patent-switches-head {
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--patent-frame-blue);
  text-align: center;
  margin-bottom: 6px;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(24, 44, 88, 0.25);
}

.patent-switches-columns {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.patent-switch-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Switch + Label Unit */
.patent-control-unit {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.patent-control-unit:hover .patent-ctrl-btn-label {
  background: #f8fafc;
  border-color: #0369a1;
}

.patent-control-unit:active .patent-ctrl-btn-label {
  transform: translateY(1px);
}

/* Rocker Switch unit */
.patent-ctrl-housing {
  width: 28px;
  height: 32px;
  background: linear-gradient(180deg, #d8d4c8 0%, #b8b2a3 100%);
  border: 1px solid #7c776c;
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 2px 0;
  box-sizing: border-box;
  flex-shrink: 0;
  box-shadow: 
    0 1px 2px rgba(0,0,0,0.3),
    inset 0 1px 1px rgba(255,255,255,0.5);
}

.patent-ctrl-paddle {
  width: 22px;
  height: 16px;
  border-radius: 2px;
  box-shadow: 
    inset 0 1px 2px rgba(255,255,255,0.4),
    0 1px 2px rgba(0,0,0,0.4);
  transition: all 0.1s ease;
}

/* Rocker paddle color variations */
.paddle-orange {
  background: linear-gradient(180deg, #f97316 0%, #c2410c 100%);
  border: 1px solid #9a3412;
}
.paddle-yellow {
  background: linear-gradient(180deg, #eab308 0%, #a16207 100%);
  border: 1px solid #854d0e;
}
.paddle-green {
  background: linear-gradient(180deg, #22c55e 0%, #15803d 100%);
  border: 1px solid #166534;
}
.paddle-red {
  background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
  border: 1px solid #991b1b;
}
.paddle-cyan {
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
  border: 1px solid #0369a1;
}
.paddle-brown {
  background: linear-gradient(180deg, #57534e 0%, #292524 100%);
  border: 1px solid #1c1917;
}

/* Pill Label Plate on right */
.patent-ctrl-btn-label {
  flex: 1;
  height: 32px;
  background: #ffffff;
  border: 1.5px solid var(--patent-frame-blue);
  border-radius: 5px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--patent-frame-blue);
  box-shadow: inset 0 1px 1px rgba(0,0,0,0.08);
  transition: all 0.1s ease;
  user-select: none;
}

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

/* Inner specular highlight reflection */
.patent-led::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  pointer-events: none;
}

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

.patent-led.red.active {
  background: var(--patent-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 */
.patent-led.yellow {
  background: var(--patent-led-off-yellow);
  border: 1px solid #4a4014;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.7);
}

.patent-led.yellow.active {
  background: var(--patent-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 */
.patent-led.green {
  background: var(--patent-led-off-green);
  border: 1px solid #14401c;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.7);
}

.patent-led.green.active {
  background: var(--patent-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);
}
