/* =========================================================
   APOTEKER COZY : FARMASI RS (2D TOP-DOWN SIMULATION)
   Ultra-Cozy Casual Aesthetic (Overcooked / Diner Dash Inspired)
   ========================================================= */

:root {
  --bg-dark: #0a1f24;
  --teal-primary: #00a896;
  --teal-dark: #028090;
  --teal-light: #e0f4f1;
  --amber-gold: #f59e0b;
  --amber-dark: #d97706;
  --coral-red: #ff5a5f;
  --oak-wood: #c48b59;
  --oak-dark: #8c5932;
  --mint-floor: #e2f1ec;
  --card-cream: #fffdf9;
  --ink-main: #132a2f;
  --ink-muted: #52737c;
  --white: #ffffff;
  --shadow-soft: 0 4px 14px rgba(10, 31, 36, 0.18);
  --shadow-card: 0 12px 30px rgba(0, 0, 0, 0.25);
  --border-radius-lg: 1rem;
  --border-radius-md: 0.75rem;
  --border-radius-sm: 0.4rem;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  min-height: -webkit-fill-available;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-overscroll-behavior: none;
  -webkit-touch-callout: none;
  background-color: var(--bg-dark);
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--ink-main);
}

#game-container {
  position: relative;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  min-height: -webkit-fill-available;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  overflow: hidden;
  padding: 0;
}

#gameCanvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: fill !important;
  background-color: var(--mint-floor);
  border-radius: 0;
  box-shadow: none;
  touch-action: none;
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
  z-index: 1;
}

/* ================= HOSPITAL WINGS (THEMATIC ENVIRONMENT FOR ULTRA-WIDE MOBILE SCREENS - OPSI 1) ================= */
.hospital-wing {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 6;
  pointer-events: none;
  overflow: hidden;
  display: none !important;
  background: linear-gradient(180deg, #edf7f5 0%, #e0f2fe 55%, #f1f5f9 100%);
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

/* Aktifkan sayap saat layar lebih lebar dari 16:9 atau saat variabel offset kanvas aktif */
@media (min-aspect-ratio: 16/9) {
  .hospital-wing {
    display: flex;
    flex-direction: column;
  }
}

.hospital-wing-left {
  left: 0;
  width: var(--canvas-offset-x, max(0px, calc((100vw - min(100vw, 100vh * 16 / 9)) / 2)));
  border-right: 2.5px solid #0d9488;
  box-shadow: inset -8px 0 16px rgba(13, 148, 136, 0.12), 4px 0 12px rgba(15, 23, 42, 0.08);
}

.hospital-wing-right {
  right: 0;
  width: var(--canvas-offset-x, max(0px, calc((100vw - min(100vw, 100vh * 16 / 9)) / 2)));
  border-left: 2.5px solid #0d9488;
  box-shadow: inset 8px 0 16px rgba(13, 148, 136, 0.12), -4px 0 12px rgba(15, 23, 42, 0.08);
}

/* Sembunyikan sayap di layar judul */
.in-title-screen .hospital-wing,
#game-container:has(#title-screen:not(.hidden)) .hospital-wing {
  display: none !important;
}

.wing-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px 6px 12px 6px;
  box-sizing: border-box;
  position: relative;
}

/* --- LEFT WING: PINTU DARURAT K3 RS & TAMAN APOTEK HIDUP --- */
.wing-exit-door-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin-top: 4px;
}

.wing-exit-sign {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #15803d;
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.60rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.5), 0 2px 4px rgba(0, 0, 0, 0.15);
  border: 1px solid #4ade80;
  animation: exitPulse 2.5s infinite ease-in-out;
  white-space: nowrap;
}

@keyframes exitPulse {
  0%, 100% { opacity: 1; filter: drop-shadow(0 0 2px #22c55e); }
  50% { opacity: 0.85; filter: drop-shadow(0 0 6px #4ade80); }
}

.wing-door-frame {
  width: min(100%, 85px);
  height: 52px;
  background: #0f172a;
  border: 2px solid #334155;
  border-radius: 4px 4px 0 0;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

.wing-door-panel {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 6px;
}

.wing-door-handle {
  width: 14px;
  height: 3px;
  background: #94a3b8;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.wing-hazard-line {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: repeating-linear-gradient(45deg, #eab308, #eab308 6px, #1e293b 6px, #1e293b 12px);
}

/* Taman Apotek Hidup */
.wing-herbal-garden {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(180deg, rgba(240, 253, 250, 0.9) 0%, rgba(204, 251, 241, 0.95) 100%);
  border: 1.5px solid #99f6e4;
  border-radius: 10px;
  padding: 6px 4px;
  margin: 6px 0;
  box-shadow: 0 3px 10px rgba(13, 148, 136, 0.08);
}

.wing-garden-header {
  margin-bottom: 4px;
}

.wing-garden-badge {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.54rem;
  font-weight: 800;
  color: #0f766e;
  background: #ffffff;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid #5eead4;
  white-space: nowrap;
}

.wing-plant-cluster {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  align-items: center;
}

.wing-plant-item {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #ffffff;
  border: 1px solid #ccfbf1;
  border-radius: 6px;
  padding: 2px 5px;
  width: min(100%, 110px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.wing-plant-leaf {
  font-size: 1rem;
  line-height: 1;
  animation: leafSway 3s infinite ease-in-out;
}

.wing-plant-item.p2 .wing-plant-leaf {
  animation-delay: 1s;
}

.wing-plant-item.p3 .wing-plant-leaf {
  animation-delay: 2s;
}

@keyframes leafSway {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(6deg) scale(1.05); }
}

.wing-plant-tag {
  font-size: 0.52rem;
  font-weight: 700;
  color: #134e4a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wing-floor-decor {
  display: flex;
  justify-content: center;
  padding-bottom: 2px;
}

.wing-sanitizer-box {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #cbd5e1;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.52rem;
  font-weight: 700;
  color: #0369a1;
  white-space: nowrap;
}

/* --- RIGHT WING: PINTU OTOMATIS BANGSAL & MADING PIO --- */
.wing-corridor-header {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

.wing-sign-glow {
  display: flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  padding: 3px 7px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
  border: 1px solid #38bdf8;
  max-width: 100%;
}

.wing-sign-arrow {
  font-size: 0.85rem;
  animation: arrowPulse 2s infinite ease-in-out;
}

@keyframes arrowPulse {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(3px); }
}

.wing-sign-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.wing-sign-title {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.wing-sign-sub {
  font-size: 0.44rem;
  color: #bae6fd;
  font-weight: 600;
  white-space: nowrap;
}

/* Pintu Kaca Otomatis */
.wing-glass-door-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.7);
  border: 1.5px solid #bae6fd;
  border-radius: 8px;
  padding: 4px;
  margin: 6px 0;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.06);
}

.wing-door-sensor {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 3px;
}

.wing-sensor-light {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 6px #0284c7;
  animation: sensorBlink 1.8s infinite;
}

@keyframes sensorBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.wing-sensor-label {
  font-size: 0.46rem;
  font-weight: 800;
  color: #0369a1;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.wing-sliding-doors {
  display: flex;
  gap: 2px;
  width: min(100%, 100px);
  height: 55px;
  background: #f0f9ff;
  border: 2px solid #93c5fd;
  border-radius: 4px;
  padding: 2px;
  box-sizing: border-box;
}

.wing-glass-pane {
  flex: 1;
  height: 100%;
  background: linear-gradient(135deg, rgba(224, 242, 254, 0.8) 0%, rgba(186, 230, 253, 0.5) 100%);
  border: 1px solid #bfdbfe;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.wing-frosted-stripes {
  width: 100%;
  height: 14px;
  background: rgba(14, 165, 233, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.wing-medical-cross {
  font-size: 0.60rem;
  color: #0284c7;
  line-height: 1;
}

/* Mading Brosur PIO */
.wing-pio-display-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 4px 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.wing-pio-header {
  margin-bottom: 3px;
}

.wing-pio-badge {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.50rem;
  font-weight: 800;
  color: #0f766e;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
}

.wing-brochure-row {
  display: flex;
  gap: 4px;
  justify-content: center;
}

.wing-brochure {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #cbd5e1;
  border-top: 2px solid #0d9488;
  border-radius: 3px;
  padding: 2px 4px;
  font-size: 0.44rem;
  font-weight: 800;
  color: #334155;
  white-space: nowrap;
}

.wing-brochure.b2 {
  border-top-color: #ef4444;
}

/* ================= BUBBLY CANDY HUD TOP (GAYA CASUAL GAME RESTAURANT CITY) ================= */
#hud-top {
  position: absolute;
  top: max(8px, env(safe-area-inset-top, 8px));
  left: 0;
  width: 100%;
  height: auto;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 max(var(--canvas-right, 14px), env(safe-area-inset-right, 14px)) 0 max(var(--canvas-left, 14px), env(safe-area-inset-left, 14px));
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  pointer-events: none;
  z-index: 25;
}

.hud-cluster-left,
.hud-cluster-right {
  display: flex !important;
  align-items: center !important;
  gap: 0.45rem;
  pointer-events: none;
}

.hud-cluster-left > *,
.hud-cluster-right > * {
  pointer-events: auto;
}

/* Candy Pill Styling */
.hud-card {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.45rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(240, 253, 250, 0.94) 100%);
  padding: 0.25rem 0.65rem;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  border-radius: 999px;
  border: 2px solid #0d9488;
  border-bottom: 3px solid #0f766e;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.22), 0 2px 4px rgba(0, 0, 0, 0.08);
  pointer-events: auto;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.15s ease;
}

.hud-card:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 18px rgba(13, 148, 136, 0.32);
}

.hud-card.hud-rank,
.hud-card.hud-chaos {
  cursor: pointer;
}

/* Avatar Bubble (Restaurant City Style) */
.hud-avatar-bubble {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fef08a, #f59e0b);
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.hud-avatar-bubble .hud-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.hud-rank-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 90px;
}

.hud-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.hud-label {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  text-transform: uppercase;
  line-height: 1;
}

.hud-val {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f766e;
  line-height: 1;
}

.hud-shift-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 95px;
}

#hudShiftName {
  white-space: nowrap;
  letter-spacing: 0.03em;
}

.hud-prog-bar {
  width: 100%;
  height: 6px;
  background: #1e293b;
  border-radius: 999px;
  border: 1px solid #475569;
  overflow: hidden;
  margin-top: 0.15rem;
}

.hud-prog-bar i {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #0d9488, #f59e0b);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.hud-stars {
  font-size: 0.85rem;
  color: #f59e0b;
  letter-spacing: 0.08em;
  line-height: 1;
}

.hud-stamina-bar {
  width: 60px;
  height: 8px;
  background: #1e293b;
  border-radius: 999px;
  border: 1.2px solid #475569;
  overflow: hidden;
  padding: 1px;
  margin-top: 0.15rem;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hud-stamina-bar i {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #34d399 70%, #6ee7b7 100%);
  border-radius: 999px;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
  transition: width 0.2s ease;
}

.hud-chaos-bar {
  width: 60px;
  height: 8px;
  background: #1e293b;
  border-radius: 999px;
  border: 1.2px solid #475569;
  overflow: hidden;
  padding: 1px;
  margin-top: 0.15rem;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hud-chaos-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f59e0b 0%, #ef4444 100%);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.7);
  transition: width 0.3s ease;
}

/* Circular Candy Menu Action Buttons */
.hud-actions {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  pointer-events: auto;
}

.btn-icon {
  width: 38px;
  height: 38px;
  min-height: 38px;
  max-height: 38px;
  box-sizing: border-box !important;
  margin: 0 !important;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid #ffffff;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.16);
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.15s ease;
}

#btnJobs { background: linear-gradient(180deg, #fef08a, #f59e0b); border-color: #fef08a; }
#btnStaff { background: linear-gradient(180deg, #ccfbf1, #0d9488); border-color: #99f6e4; color: #fff; }
#btnBadges { background: linear-gradient(180deg, #fde68a, #d97706); border-color: #fef3c7; }
#btnLeaderboard { background: linear-gradient(180deg, #e0f2fe, #0284c7); border-color: #bae6fd; }
#btnSettings { background: linear-gradient(180deg, #f1f5f9, #64748b); border-color: #e2e8f0; }
#btnPause,
.hud-actions #btnPause {
  background: linear-gradient(180deg, #f43f5e, #e11d48) !important;
  border-color: #ffe4e6 !important;
  box-shadow: 0 2px 6px rgba(225, 29, 72, 0.4) !important;
  color: #ffffff !important;
  display: grid !important;
  place-items: center !important;
  padding: 0;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.15s ease, background 0.25s ease;
}

#btnPause.is-paused,
.hud-actions #btnPause.is-paused {
  background: linear-gradient(180deg, #34d399, #059669) !important;
  border-color: #a7f3d0 !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.6), 0 3px 8px rgba(0, 0, 0, 0.2) !important;
  animation: pulse-pause-btn 1.4s infinite ease-in-out;
}

#btnPause svg {
  display: block;
  fill: #ffffff !important;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
  transition: transform 0.15s ease;
  pointer-events: none;
}

#btnPause:hover svg {
  transform: scale(1.12);
}

@keyframes pulse-pause-btn {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4), 0 3px 8px rgba(0, 0, 0, 0.2);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.75), 0 4px 10px rgba(0, 0, 0, 0.25);
  }
}

.btn-icon:hover {
  transform: translateY(-2.5px) scale(1.1);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

.btn-icon:active {
  transform: translateY(1px) scale(0.95);
}

/* ================= OVERCOOKED ULTRA-COMPACT ORDER TICKETS RACK ================= */
.order-tickets-rack {
  display: none !important;
}

.order-ticket-card {
  flex: 0 0 auto;
  width: 96px;
  height: 40px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-radius: 8px;
  border: 1.5px solid #cbd5e1;
  border-bottom: 2.5px solid #94a3b8;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.12);
  padding: 0.18rem 0.35rem 0.2rem 0.35rem;
  position: relative;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.15s ease;
  user-select: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.order-ticket-card:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.2);
  z-index: 30;
}

.order-ticket-card.ticket-active {
  border-color: #0284c7;
  border-bottom-color: #0369a1;
  background: #f0f9ff;
  box-shadow: 0 0 0 1.5px rgba(2, 132, 199, 0.4), 0 4px 12px rgba(2, 132, 199, 0.25);
}

.order-ticket-card.ticket-cito {
  border-color: #ef4444;
  border-bottom-color: #b91c1c;
  background: #fff1f2;
}

.order-ticket-card.ticket-critical {
  animation: ticketPanicJitter 0.18s infinite alternate;
  border-color: #ef4444;
}

@keyframes ticketPanicJitter {
  0% { transform: translate(-1.5px, 0) rotate(-0.8deg); }
  100% { transform: translate(1.5px, 1px) rotate(0.8deg); }
}

.ticket-clip {
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 6px;
  background: linear-gradient(180deg, #94a3b8 0%, #475569 100%);
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  border: 1px solid #334155;
}

.ticket-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  line-height: 1;
  margin-top: 1px;
}

.ticket-cat-badge {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.54rem;
  font-weight: 700;
  padding: 0.08rem 0.28rem;
  border-radius: 3px;
  color: #ffffff;
  background: #0284c7;
  letter-spacing: 0.02em;
  line-height: 1;
}

.ticket-cat-badge.cito {
  background: #ef4444;
}

.ticket-no-badge {
  font-family: 'Silkscreen', monospace;
  font-size: 0.58rem;
  font-weight: 700;
  color: #475569;
  line-height: 1;
}

.ticket-patience-wrap {
  width: 100%;
  height: 3px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin: 1px 0;
}

.ticket-patience-bar {
  height: 100%;
  border-radius: 999px;
  transition: width 0.2s linear, background 0.3s ease;
}

/* Horizontal Medicine Chips Row (Overcooked Icon Row) */
.ticket-meds-chips {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 16px;
}

.med-chip {
  width: 18px;
  height: 16px;
  border-radius: 4px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  line-height: 1;
  position: relative;
}

.med-chip.chip-done {
  background: #ecfdf5;
  border-color: #10b981;
  color: #065f46;
}

.med-chip .chip-check {
  position: absolute;
  right: -2px;
  bottom: -2px;
  font-size: 0.45rem;
  font-weight: 900;
  color: #ffffff;
  background: #10b981;
  border-radius: 50%;
  width: 8px;
  height: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.btn-rack-toggle {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 0.55rem;
  background: rgba(255, 255, 255, 0.95);
  border: 1.5px solid #cbd5e1;
  border-radius: 999px;
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  color: #0f766e;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1);
  transition: all 0.15s ease;
  user-select: none;
}

.btn-rack-toggle:hover {
  background: #f0fdfa;
  border-color: #0f766e;
  transform: scale(1.03);
}

.ticket-empty-banner {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.7);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  border: 1px dashed rgba(15, 23, 42, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* ================= STACK INSTRUKSI KIRI ATAS: KERTAS MEMO DI BAWAH LEVEL ================= */
.hud-left-stack {
  position: absolute !important;
  top: 52px !important; /* top: 54px; legacy desktop fallback */
  left: max(var(--canvas-left, 14px), 14px) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  z-index: 24 !important;
  pointer-events: auto !important;
}

.hud-cluster-left .hud-left-stack {
  position: absolute !important;
  top: 52px !important;
  left: max(var(--canvas-left, 14px), 14px) !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: auto !important;
  max-width: none !important;
  z-index: 24 !important;
}

.hud-left-stack > * {
  pointer-events: auto;
  position: relative !important;
  top: auto !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
}

/* ================= OVERCOOKED COLLAPSIBLE RECIPE TICKET ================= */
/* ================= COMPACT OVERCOOKED RECIPE TICKET (POJOK KIRI BAWAH) ================= */
#order-clipboard {
  position: absolute !important;
  bottom: 12px !important;
  left: var(--canvas-left, 14px) !important;
  top: auto !important;
  width: 210px !important;
  max-width: 225px !important;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border: 2px solid #d97706;
  border-bottom: 3px solid #b45309;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
  padding: 0.42rem 0.6rem;
  z-index: 24;
  animation: slideUp 0.25s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#order-clipboard::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 9px;
  background: linear-gradient(180deg, #fde68a 0%, #f59e0b 100%);
  border-radius: 3px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  border: 1.2px solid #d97706;
  z-index: 2;
}

.clip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.2px dashed rgba(217, 119, 6, 0.35);
  padding-bottom: 0.22rem;
  margin-bottom: 0.25rem;
}

.clip-tag {
  font-family: 'Fredoka', cursive, sans-serif;
  font-weight: 700;
  font-size: 0.58rem;
  color: #ffffff;
  background: #0d9488;
  padding: 0.1rem 0.38rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.clip-no {
  font-family: 'Silkscreen', monospace;
  font-weight: 700;
  font-size: 0.78rem;
  color: #92400e;
}

.btn-clip-toggle {
  background: #fef3c7;
  color: #92400e;
  border: 1.2px solid #fde68a;
  border-radius: 999px;
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 1px 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.btn-clip-toggle:hover {
  background: #fde68a;
  transform: scale(1.08);
}

.btn-clip-toggle:active {
  transform: scale(0.95);
}

/* SAAT RESEP DILIPAT (MINIMIZED TAB DI POJOK KIRI BAWAH) */
#order-clipboard.collapsed {
  width: auto !important;
  max-width: 140px !important;
  padding: 3px 8px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.96);
  border: 2px solid #f59e0b;
  border-bottom: 3px solid #d97706;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

#order-clipboard.collapsed::before {
  display: none;
}

#order-clipboard.collapsed .clip-header {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

#order-clipboard.collapsed .clip-foldable-body {
  display: none !important;
}

.clip-patient {
  font-weight: 700;
  font-size: 0.68rem;
  color: var(--ink-main);
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  line-height: 1.28;
  margin-bottom: 0.25rem;
}

.clip-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
  margin-bottom: 0.25rem;
  max-height: 85px;
  overflow-y: auto;
}

.clip-items li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  border-radius: var(--border-radius-sm);
  padding: 0.15rem 0.35rem;
  font-size: 0.64rem;
  font-weight: 600;
  color: #1e3a40;
  border: 1px solid #e2e8f0;
}

.clip-items li.item-done {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
  text-decoration: line-through;
}

.item-check {
  font-size: 0.62rem;
  font-weight: 700;
}

.clip-status {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.18rem 0.42rem;
  border-radius: 6px;
  line-height: 1.2;
}

.status-warn {
  background: #fef3c7;
  color: #92400e;
}

.status-process {
  background: #e0f2fe;
  color: #075985;
}

.status-label {
  background: #ffedd5;
  color: #c2410c;
}

.status-ready {
  background: #dcfce7;
  color: #166534;
  animation: pulseGreen 1.5s infinite;
}

@keyframes pulseGreen {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

/* ================= CASUAL GAME ITEM TRAY DOCK ================= */
#carry-indicator {
  position: absolute;
  bottom: 12px;
  right: var(--canvas-right, 18px);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(240, 253, 250, 0.94));
  backdrop-filter: blur(8px);
  border: 2px solid #0d9488;
  border-bottom: 3px solid #0f766e;
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.25);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

#carry-indicator.is-empty {
  opacity: 0.45;
}

#carry-indicator:hover {
  opacity: 1;
  transform: translateY(-1.5px);
}

.carry-label {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}

.carry-box {
  display: flex;
  align-items: center;
}

.carry-empty {
  font-size: 0.74rem;
  color: #94a3b8;
  font-weight: 600;
  font-style: italic;
}

.carry-item-view {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.carry-icon {
  font-size: 1.1rem;
}

.carry-info b {
  font-size: 0.78rem;
  color: var(--teal-dark);
}

.carry-info small {
  display: none;
}

/* ================= TOAST NOTIFIKASI DI KANAN BAWAH (SELASAR PASIEN) ================= */
#toast-container {
  position: absolute;
  bottom: 50px;
  right: var(--canvas-right, 18px);
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 0.35rem;
  pointer-events: none;
  z-index: 120;
  max-width: 360px;
}

.toast-msg {
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(6px);
  animation: popInBottom 0.22s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  transition: opacity 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
}

.toast-info { background: rgba(15, 118, 110, 0.94); color: #ffffff; }
.toast-success { background: rgba(21, 128, 61, 0.94); color: #ffffff; }
.toast-warn { background: rgba(180, 83, 9, 0.94); color: #ffffff; }
.toast-error { background: rgba(220, 38, 38, 0.94); color: #ffffff; }
.toast-fade { opacity: 0; transform: translateY(12px) scale(0.95); }

@keyframes popInBottom {
  0% { transform: translateY(16px) scale(0.95); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes slideUp {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* ================= KONTROL MOBILE ================= */
#mobile-controls {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 30;
  display: none !important;
}

#btnMobileMenu {
  display: none !important;
}

/* Hanya aktif pada perangkat mobile sentuh sesungguhnya, BUKAN pada versi komputer / desktop */
body.touch-device:not(.desktop-mode) #mobile-controls {
  display: block !important;
}

body.touch-device:not(.desktop-mode) #btnMobileMenu {
  display: flex !important;
}

body.touch-device:not(.desktop-mode) #btnPause {
  display: none !important;
}

body.touch-device:not(.desktop-mode) .hud-card.hud-reputation,
body.touch-device:not(.desktop-mode) .hud-card.hud-chaos,
body.touch-device:not(.desktop-mode) #hudReputationCard,
body.touch-device:not(.desktop-mode) #hudChaosCard {
  display: none !important;
}

body.touch-device:not(.desktop-mode) #order-clipboard {
    display: none !important;
  }

@media (max-width: 640px) {
  body.touch-device:not(.desktop-mode) #btnMobileMenu {
    display: flex !important;
  }
}

/* Optimasi Tata Letak Mobile Landscape (Gaya Farmasi Jona: max-width 900px / max-height 540px) */
@media (max-width: 900px), (max-height: 540px) {
  #hud-top {
    top: max(2px, env(safe-area-inset-top, 2px));
    padding: 0 max(8px, env(safe-area-inset-right, 8px)) 0 max(8px, env(safe-area-inset-left, 8px));
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
  .hud-cluster-left,
  .hud-cluster-right {
    gap: 0.25rem;
    display: flex !important;
    align-items: center !important;
  }
  .hud-card {
    height: 25px !important;
    min-height: 25px !important;
    max-height: 25px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    padding: 0.1rem 0.4rem !important;
    font-size: 0.72rem !important;
    gap: 0.2rem !important;
    background: rgba(255, 255, 255, 0.78) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1.5px solid rgba(13, 148, 136, 0.55) !important;
    border-bottom: 2px solid rgba(15, 118, 110, 0.65) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  }
  .hud-card.hud-rank,
  .hud-rank {
    height: 25px !important;
    min-height: 25px !important;
    max-height: 25px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    border: 1.5px solid #f59e0b !important;
    border-bottom: 2px solid #d97706 !important;
  }
  .hud-avatar-bubble {
    width: 20px !important;
    height: 20px !important;
    font-size: 0.75rem !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    display: grid !important;
    place-items: center !important;
  }
  /* Sembunyikan label teks panjang & tombol aksi sekunder di layar HP */
  #hudRankLabel,
  .hud-card.hud-reputation .hud-label,
  .hud-card.hud-shift .hud-label,
  #hudShiftName,
  .hud-card.hud-energy .hud-label,
  .hud-card.hud-chaos .hud-label,
  .hud-card.hud-quota .hud-label,
  #btnStaff,
  #btnBadges,
  #btnSettings,
  #order-clipboard,
  body.touch-device #btnPause {
    display: none !important;
  }
  #hudAmbienceTicker {
    display: none !important;
  }
  .hud-rank-meta { min-width: 44px !important; }
  .hud-xp-bar { width: 28px !important; height: 4px !important; }

  /* Penyesuaian Lebar Kartu Shift / Waktu (Kompak, Menghilangkan Ruang Kosong Sesuai Permintaan) */
  .hud-card.hud-shift {
    flex-shrink: 1 !important;
    min-width: 0 !important;
    padding: 0.1rem 0.35rem !important;
  }
  .hud-shift-meta {
    min-width: 0 !important;
    width: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .hud-shift-meta > div:first-child {
    justify-content: center !important;
    gap: 0 !important;
  }
  #hudClock {
    font-size: 0.76rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }
  .hud-prog-bar {
    width: 28px !important;
    height: 3.5px !important;
    margin-top: 1px !important;
  }

  /* Reputasi & Chaos Dihilangkan pada Sistem Mobile Sesuai Permintaan User */
  .hud-card.hud-reputation,
  .hud-card.hud-chaos,
  #hudReputationCard,
  #hudChaosCard {
    display: none !important;
  }

  /* Stamina Bar Mobile (Ramping & Proporsional) */
  .hud-stamina-bar {
    width: 28px !important;
    height: 4px !important;
  }

  .hud-actions {
    display: flex !important;
    align-items: center !important;
    gap: 0.2rem !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .hud-actions .btn-icon:not(#btnPause) {
    background: rgba(255, 255, 255, 0.78) !important;
    backdrop-filter: blur(6px) !important;
  }
  .hud-actions .btn-icon {
    width: 25px !important;
    height: 25px !important;
    min-height: 25px !important;
    max-height: 25px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    display: grid !important;
    place-items: center !important;
    font-size: 0.75rem !important;
    padding: 0 !important;
  }
  .btn-jinx-sepi {
    height: 25px !important;
    min-height: 25px !important;
    max-height: 25px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    padding: 0.1rem 0.5rem !important;
    font-size: 0.68rem !important;
    gap: 3px !important;
    border: 1.5px solid #fdba74 !important;
    border-bottom: 2px solid #ea580c !important;
  }
  .btn-explore-mode {
    height: 25px !important;
    min-height: 25px !important;
    max-height: 25px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    padding: 0.1rem 0.5rem !important;
    font-size: 0.68rem !important;
    gap: 3px !important;
    border: 1.5px solid #5eead4 !important;
    border-bottom: 2px solid #0f766e !important;
  }
  body.touch-device:not(.desktop-mode) #btnMobileMenu {
    display: flex !important;
  }

  /* Toasts dipindahkan ke atas tengah di bawah HUD (Kompak & Non-Intrusif) */
  #toast-container {
    top: max(32px, calc(28px + env(safe-area-inset-top, 0px))) !important;
    bottom: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    pointer-events: none !important;
    z-index: 9999 !important;
    max-width: 80vw !important;
  }
  .toast-msg, .toast {
    padding: 3px 12px !important;
    font-size: 0.7rem !important;
    max-width: min(440px, 80vw) !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28) !important;
  }

  /* Modals Mobile Adaptation */
  .modal-overlay {
    padding: calc(4px + env(safe-area-inset-top, 0px)) calc(8px + env(safe-area-inset-right, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) calc(8px + env(safe-area-inset-left, 0px));
  }
  .modal-card {
    max-height: 94vh !important;
    padding: 0.55rem 0.85rem !important;
    border-radius: 16px !important;
  }
  .modal-card h2 {
    font-size: 1rem !important;
    margin-bottom: 2px !important;
  }
  .modal-subtitle {
    font-size: 0.7rem !important;
    margin-bottom: 0.3rem !important;
  }
  .pause-modal {
    padding: 0 !important;
    max-width: 360px !important;
    width: min(360px, 92vw) !important;
    max-height: 98vh !important;
    overflow-y: hidden !important;
    border-radius: 14px !important;
  }
  .pause-modal .btn-close-modal-icon {
    top: 5px !important;
    right: 8px !important;
    width: 24px !important;
    height: 24px !important;
    font-size: 0.78rem !important;
  }
  .pause-header {
    padding: 5px 12px 4px 12px !important;
    margin-bottom: 0 !important;
    justify-content: flex-start !important;
    text-align: left !important;
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
  }
  .pause-header h2 {
    font-family: 'Fredoka', cursive, sans-serif !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 !important;
    text-align: left !important;
    letter-spacing: 0.3px !important;
  }
  .pause-icon-badge {
    width: 22px !important;
    height: 22px !important;
    margin-bottom: 0 !important;
    background: linear-gradient(135deg, #0d9488, #0f766e) !important;
    border: 1.5px solid #14b8a6 !important;
    box-shadow: 0 1px 4px rgba(13, 148, 136, 0.3) !important;
    flex-shrink: 0 !important;
  }
  .pause-icon-badge svg {
    width: 12px !important;
    height: 12px !important;
    fill: #ffffff !important;
    display: block !important;
  }
  .pause-stage-badge {
    display: none !important;
  }
  .pause-body {
    padding: 3px 10px 4px !important;
  }
  .pause-hub-section {
    margin-bottom: 3px !important;
    text-align: left !important;
  }
  .pause-section-title {
    font-size: 0.58rem !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 2px !important;
  }
  .pause-hub-grid {
    gap: 3px !important;
  }
  .pause-hub-card {
    padding: 3px 6px !important;
    gap: 5px !important;
    border-radius: 8px !important;
    min-height: 26px !important;
  }
  .hub-card-icon {
    font-size: 0.95rem !important;
    width: 20px !important;
    height: 20px !important;
    border-radius: 6px !important;
  }
  .hub-card-title {
    font-size: 0.70rem !important;
    line-height: 1.15 !important;
  }
  .hub-card-desc {
    display: none !important;
  }
  .pause-settings-card {
    padding: 3px 8px !important;
    margin-bottom: 3px !important;
    border-radius: 8px !important;
  }
  .pause-control-row {
    padding: 1px 0 !important;
  }
  .pause-control-label {
    gap: 5px !important;
  }
  .pause-label-icon {
    font-size: 0.88rem !important;
  }
  .pause-control-label b {
    font-size: 0.68rem !important;
    line-height: 1.15 !important;
  }
  .pause-control-label small {
    font-size: 0.54rem !important;
    line-height: 1 !important;
    margin-top: 0 !important;
  }
  .toggle-switch {
    width: 28px !important;
    height: 15px !important;
  }
  .toggle-slider {
    border-radius: 15px !important;
  }
  .toggle-slider:before {
    height: 11px !important;
    width: 11px !important;
    left: 2px !important;
    bottom: 2px !important;
  }
  .toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(13px) !important;
  }
  .pause-action-buttons {
    padding: 4px 10px max(4px, env(safe-area-inset-bottom, 4px)) !important;
    gap: 3px !important;
  }
  .btn-pause-resume {
    padding: 4px 8px !important;
    font-size: 0.76rem !important;
    min-height: 28px !important;
    border-radius: 999px !important;
  }
  .pause-secondary-row {
    gap: 4px !important;
  }
  .btn-pause-retry,
  .btn-pause-quit {
    padding: 3px 6px !important;
    font-size: 0.68rem !important;
    min-height: 24px !important;
    border-radius: 999px !important;
  }
  .jobs-modal {
    max-width: 95vw !important;
    width: 95% !important;
  }
  .jobs-header {
    padding: 8px 10px !important;
  }
  .jobs-header-icon {
    width: 30px !important;
    height: 30px !important;
    font-size: 1.15rem !important;
  }
  .jobs-header-title-wrap h2 {
    font-size: 0.95rem !important;
  }
  .jobs-body {
    padding: 6px 8px !important;
  }
  .jobs-table th,
  .jobs-table td {
    padding: 4px 6px !important;
    font-size: 0.7rem !important;
  }
  .jobs-stage-pill {
    font-size: 0.62rem !important;
    padding: 2px 6px !important;
  }
  .btn-job-pick {
    padding: 2px 6px !important;
    font-size: 0.68rem !important;
    min-height: 26px !important;
  }
  .triage-modal {
    max-width: min(96vw, 680px) !important;
    width: 96% !important;
    max-height: 94vh !important;
  }
  .triage-body {
    padding: 3px 8px 5px !important;
  }
  .triage-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
  }
  .triage-card {
    padding: 2.5px 6px !important;
    gap: 4px !important;
  }
  .triage-btn-pick {
    padding: 2px 6px !important;
    font-size: 0.62rem !important;
    min-height: 20px !important;
  }
  .mortar-arena {
    gap: 8px !important;
    padding: 6px !important;
  }
  .mortar-bowl {
    width: 90px !important;
    height: 90px !important;
  }

  /* Compact Joystick (Subtle & Ergonomis, Tidak Menutupi Lantai RS) */
  #joystick-zone {
    width: 84px !important;
    height: 84px !important;
    bottom: max(10px, calc(8px + env(safe-area-inset-bottom, 0px))) !important;
    left: max(10px, calc(8px + env(safe-area-inset-left, 0px))) !important;
    opacity: 0.65 !important;
    border-width: 2px !important;
    touch-action: none !important;
    -webkit-touch-callout: none !important;
  }
  #joystick-zone.active,
  #joystick-zone:active {
    opacity: 0.95 !important;
  }
  #joystick-knob {
    width: 38px !important;
    height: 38px !important;
  }

  /* Action Buttons Kompak di Kanan Bawah */
  #action-buttons {
    bottom: max(10px, calc(8px + env(safe-area-inset-bottom, 0px))) !important;
    right: max(10px, calc(8px + env(safe-area-inset-right, 0px))) !important;
    flex-direction: row !important;
    gap: 6px !important;
    touch-action: none !important;
  }
  .btn-action, .btn-drop {
    min-height: 40px !important;
    min-width: 90px !important;
    padding: 6px 12px !important;
    font-size: 0.76rem !important;
    border-radius: 999px !important;
    touch-action: none !important;
    -webkit-touch-callout: none !important;
  }
  .btn-talk {
    min-height: 38px !important;
    min-width: auto !important;
    padding: 5px 11px !important;
    font-size: 0.74rem !important;
    border-radius: 999px !important;
    border-width: 1.8px !important;
    touch-action: none !important;
    -webkit-touch-callout: none !important;
  }

  /* Carry Box Diposisikan Mengambang di Tengah Bawah (Ergonomis, Bebas dari Area Joystick & Tombol Kanan) */
  #carry-indicator {
    bottom: max(10px, calc(8px + env(safe-area-inset-bottom, 0px))) !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    max-width: 180px !important;
    height: 26px !important;
    min-height: 26px !important;
    padding: 2px 10px !important;
    font-size: 0.7rem !important;
    border-radius: 999px !important;
    border: 1.5px solid #0d9488 !important;
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2) !important;
    z-index: 28 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  #carry-indicator.is-empty {
    display: none !important;
  }
  #carry-indicator .carry-label {
    display: none !important; /* Hapus kata MEMBAWA: agar tidak memanjang horizontal */
  }
  #carry-indicator .carry-box {
    max-width: 155px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
  }
  #carry-indicator .carry-item-view {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    max-width: 155px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  #carry-indicator .carry-icon {
    font-size: 0.75rem !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
  }
  #carry-indicator .carry-info {
    display: inline-flex !important;
    align-items: center !important;
    max-width: 135px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  #carry-indicator .carry-info b {
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    max-width: 135px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  #carry-indicator .carry-info small {
    display: none !important;
  }
  #carry-indicator .carry-empty {
    display: none !important;
  }

  /* Stack Kiri Atas: Widget Tugas Tepat di Bawah Level (Kertas Memo Tertempel Mobile) */
  .hud-cluster-left .hud-left-stack,
  .hud-left-stack {
    position: absolute !important;
    top: 34px !important;
    left: max(var(--canvas-left, 10px), 10px) !important;
    max-width: 195px !important;
    gap: 4px !important;
    z-index: 25 !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: auto !important;
  }
  #hud-top #taskMini,
  .hud-cluster-left #taskMini,
  #hud-left-stack #taskMini,
  #taskMini {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    flex-direction: row !important;
    gap: 5px !important;
    width: auto !important;
    max-width: 145px !important;
    min-width: 95px !important;
    min-height: 25px !important;
    height: 25px !important;
    max-height: 25px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 2px 7px 2px 5px !important;
    border-radius: 5px !important;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdfc 85%, #f2f7f5 100%) !important;
    border: 1px solid #cbd5e1 !important;
    border-left: 3.5px solid #0d9488 !important;
    border-bottom: 2px solid #94a3b8 !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.16) !important;
    pointer-events: auto !important;
    cursor: pointer !important;
  }
  #hud-top #taskMini::before,
  .hud-cluster-left #taskMini::before,
  #hud-left-stack #taskMini::before,
  #taskMini::before {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    top: -4px !important;
    left: 10px !important;
    width: 22px !important;
    height: 5px !important;
    background: rgba(13, 148, 136, 0.45) !important;
    border-radius: 1px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12) !important;
    z-index: 2 !important;
    pointer-events: none !important;
  }
  #hud-top #taskMini.urgent,
  .hud-cluster-left #taskMini.urgent,
  #hud-left-stack #taskMini.urgent,
  #taskMini.urgent {
    height: 25px !important;
    min-height: 25px !important;
    max-height: 25px !important;
    padding: 2px 7px 2px 5px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    border-left-color: #ef4444 !important;
    border-color: #f87171 !important;
    background: linear-gradient(180deg, #ffffff 0%, #fef2f2 100%) !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.28) !important;
  }
  #hud-top #taskMini.urgent::before,
  .hud-cluster-left #taskMini.urgent::before,
  #hud-left-stack #taskMini.urgent::before,
  #taskMini.urgent::before {
    background: rgba(239, 68, 68, 0.5) !important;
  }
  #hud-top #taskMini .task-icon-wrap,
  .hud-cluster-left #taskMini .task-icon-wrap,
  #hud-left-stack #taskMini .task-icon-wrap,
  #taskMini .task-icon-wrap {
    width: 17px !important;
    height: 17px !important;
    min-width: 17px !important;
    max-width: 17px !important;
    font-size: 0.65rem !important;
    border-radius: 3px !important;
    background: #ccfbf1 !important;
    border: 1px solid #99f6e4 !important;
    color: #0f766e !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }
  #taskMini .task-body {
    overflow: hidden !important;
    white-space: nowrap !important;
    display: flex !important;
    align-items: center !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }
  #taskMini .task-title {
    font-family: 'Fredoka', cursive, sans-serif !important;
    font-size: 0.62rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 95px !important;
    line-height: 1.1 !important;
    margin: 0 !important;
  }
  #taskMini .task-sub,
  #taskMini .task-header,
  #taskMini .task-depo-tag,
  #taskMini .task-badge {
    display: none !important;
  }
  #taskMini .task-action-hint {
    display: none !important;
  }
  #taskMini .task-chev {
    display: none !important;
  }
  #taskMini .btn-dismiss-task {
    display: none !important;
  }

  /* Resep Clipboard Dihilangkan di Layar Mobile Sentuh Agar Ruang Kerja Luas (Tetap Ada di PC) */
  body.touch-device:not(.desktop-mode) #order-clipboard {
    display: none !important;
  }

  body.touch-device:not(.desktop-mode):not(.in-title-screen) #mobile-controls {
    display: block !important;
  }
  #order-clipboard::-webkit-scrollbar {
    width: 3px;
  }
  #order-clipboard::-webkit-scrollbar-thumb {
    background: rgba(217, 119, 6, 0.5);
    border-radius: 999px;
  }
  #order-clipboard .clip-patient {
    font-size: 0.68rem !important;
  }
  #order-clipboard .clip-items li {
    font-size: 0.65rem !important;
    padding: 1px 0 !important;
  }
  #order-clipboard .clip-status {
    font-size: 0.62rem !important;
    margin-top: 2px !important;
  }
}

.touch-device:not(.desktop-mode) #mobile-controls {
  display: block !important;
}

#joystick-zone {
  position: absolute;
  bottom: max(1.25rem, calc(1rem + env(safe-area-inset-bottom, 0px)));
  left: max(1.25rem, calc(1rem + env(safe-area-inset-left, 0px)));
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
  display: grid;
  place-items: center;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

#joystick-zone.active {
  border-color: #2dd4bf;
  box-shadow: 0 0 20px rgba(45, 212, 191, 0.45), 0 8px 24px rgba(0, 0, 0, 0.5);
}

#joystick-knob {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2dd4bf 0%, #0d9488 70%, #0f766e 100%);
  border: 2.5px solid #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  transition: transform 0.04s ease;
}

#action-buttons {
  position: absolute;
  bottom: max(1.25rem, calc(1rem + env(safe-area-inset-bottom, 0px)));
  right: max(1.25rem, calc(1rem + env(safe-area-inset-right, 0px)));
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: auto;
  z-index: 35;
}

.btn-action, .btn-drop, .btn-talk {
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  min-width: 135px;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.1s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.1s ease;
}

.btn-action:active, .btn-drop:active, .btn-talk:active {
  transform: scale(0.92);
}

.btn-action {
  background: linear-gradient(135deg, #0d9488, #0f766e);
  color: #ffffff;
  border: 2.5px solid #5eead4;
}

.btn-talk {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #ffffff;
  border: 2px solid #a5b4fc;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.45), 0 4px 12px rgba(0, 0, 0, 0.25);
  animation: pulseTalkBtn 2.2s infinite ease-in-out;
  padding: 0.5rem 0.95rem;
  min-height: 40px;
  min-width: auto;
  font-size: 0.82rem;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

@keyframes pulseTalkBtn {
  0%, 100% { transform: scale(1); box-shadow: 0 0 14px rgba(99, 102, 241, 0.5), 0 6px 18px rgba(0,0,0,0.35); }
  50% { transform: scale(1.03); box-shadow: 0 0 20px rgba(129, 140, 248, 0.8), 0 6px 18px rgba(0,0,0,0.35); }
}

.btn-drop {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  border: 2.5px solid #fca5a5;
}

/* ================= QUICK STATION SHORTCUTS (GAYA FARMASI JONA) ================= */
.mobile-quick-nav {
  position: absolute;
  right: max(6px, calc(4px + env(safe-area-inset-right, 0px)));
  bottom: max(42px, calc(38px + env(safe-area-inset-bottom, 0px)));
  display: flex;
  flex-direction: row;
  gap: 4px;
  pointer-events: auto;
  z-index: 34;
  opacity: 0.75;
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.mobile-quick-nav:hover,
.mobile-quick-nav:active,
.mobile-quick-nav:focus-within {
  opacity: 1;
}

@media (orientation: portrait) and (max-width: 900px) {
  body.touch-device:not(.desktop-mode) #mobile-controls {
    display: block !important;
  }
  #joystick-zone {
    width: 96px !important;
    height: 96px !important;
    bottom: max(16px, calc(12px + env(safe-area-inset-bottom, 0px))) !important;
    left: max(16px, calc(12px + env(safe-area-inset-left, 0px))) !important;
    opacity: 0.75 !important;
    touch-action: none !important;
    -webkit-touch-callout: none !important;
  }
  #joystick-knob {
    width: 44px !important;
    height: 44px !important;
  }
  #action-buttons {
    bottom: max(16px, calc(12px + env(safe-area-inset-bottom, 0px))) !important;
    right: max(16px, calc(12px + env(safe-area-inset-right, 0px))) !important;
    flex-direction: column !important;
    gap: 8px !important;
    touch-action: none !important;
  }
  .btn-action, .btn-drop {
    min-height: 44px !important;
    min-width: 120px !important;
    padding: 8px 14px !important;
    font-size: 0.82rem !important;
    border-radius: 999px !important;
    touch-action: none !important;
    -webkit-touch-callout: none !important;
  }
  .btn-talk {
    min-height: 38px !important;
    min-width: auto !important;
    padding: 6px 12px !important;
    font-size: 0.76rem !important;
    border-radius: 999px !important;
    border-width: 1.8px !important;
    touch-action: none !important;
    -webkit-touch-callout: none !important;
  }
  .mobile-quick-nav {
    display: flex !important;
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: max(128px, calc(120px + env(safe-area-inset-bottom, 0px))) !important;
    flex-direction: row !important;
    justify-content: center !important;
    gap: 8px !important;
    pointer-events: auto !important;
    z-index: 34 !important;
  }
  .btn-quick-nav {
    min-height: 36px !important;
    padding: 6px 12px !important;
    font-size: 0.76rem !important;
    touch-action: none !important;
    -webkit-touch-callout: none !important;
  }
  #carry-indicator {
    bottom: max(10px, calc(8px + env(safe-area-inset-bottom, 0px))) !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
  }
}

.btn-quick-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.78);
  color: #0f172a;
  border: 1.5px solid #0d9488;
  border-radius: 999px;
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  min-height: 26px;
  height: 26px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  touch-action: none !important;
  -webkit-touch-callout: none !important;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.1s ease, filter 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
}

.btn-quick-nav:active {
  transform: scale(0.92);
  filter: brightness(0.95);
}

.btn-quick-nav[data-target="counter_in"] { border-color: #0284c7; color: #0369a1; background: #f0f9ff; }
.btn-quick-nav[data-target="counter_review"] { border-color: #059669; color: #047857; background: #ecfdf5; }
.btn-quick-nav[data-target="shelf_tablet"] { border-color: #0d9488; color: #0f766e; background: #f0fdfa; }
.btn-quick-nav[data-target="bench_mortar"] { border-color: #9333ea; color: #7e22ce; background: #faf5ff; }
.btn-quick-nav[data-target="desk_label"] { border-color: #ea580c; color: #c2410c; background: #fff7ed; }
.btn-quick-nav[data-target="counter_out"] { border-color: #ca8a04; color: #a16207; background: #fefce8; }

/* ================= MODAL & DIALOG ================= */
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 21, 25, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: max(10px, env(safe-area-inset-top, 10px)) max(10px, env(safe-area-inset-right, 10px)) max(10px, env(safe-area-inset-bottom, 10px)) max(10px, env(safe-area-inset-left, 10px));
  box-sizing: border-box;
  z-index: 100;
  animation: fadeIn 0.2s ease;
}

#modal-intercom {
  z-index: 250;
}

.modal-card,
.review-modal-card {
  margin: auto;
  background: #fffdf9 !important;
  opacity: 1 !important;
  border: 2.5px solid #0f172a !important;
  border-radius: 18px !important;
  box-shadow: 0 8px 0 rgba(15, 23, 42, 0.22), 0 20px 40px rgba(0, 0, 0, 0.35) !important;
  padding: 0 !important;
  max-width: min(92vw, 760px);
  width: 90%;
  max-height: min(90vh, 540px) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  position: relative !important;
  animation: modalPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes modalPopIn {
  0% { opacity: 0; transform: scale(0.95) translateY(10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes modalAttentionPulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.modal-attention {
  animation: modalAttentionPulse 0.22s ease-in-out !important;
}

@media (max-width: 640px) {
  .modal-overlay {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: max(8px, env(safe-area-inset-top, 8px)) max(8px, env(safe-area-inset-right, 8px)) max(8px, env(safe-area-inset-bottom, 8px)) max(8px, env(safe-area-inset-left, 8px)) !important;
  }
  .modal-card,
  .review-modal-card {
    width: 92% !important;
    max-width: min(92vw, 760px) !important;
    max-height: min(88vh, 350px) !important;
    border-radius: 18px !important;
    border: 2.5px solid #0f172a !important;
    box-shadow: 0 8px 0 rgba(15, 23, 42, 0.22), 0 20px 40px rgba(0, 0, 0, 0.35) !important;
    padding: 0 !important;
    animation: modalPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  .modal-card::before {
    display: none !important;
  }
}

.modal-card::-webkit-scrollbar {
  width: 6px;
}
.modal-card::-webkit-scrollbar-thumb {
  background: rgba(13, 148, 136, 0.35);
  border-radius: 999px;
}

.modal-header h2 {
  font-family: 'Fredoka', cursive, sans-serif;
  color: var(--teal-dark);
  font-size: 1.35rem;
}

.modal-subtitle {
  font-size: 0.82rem;
  color: var(--ink-muted);
  display: block;
  margin-top: 0.2rem;
}

.modal-footer {
  margin-top: 1.2rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

.btn-pri, .btn-sec, .btn-warn {
  font-family: 'Fredoka', cursive, sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-pri { background: var(--teal-primary); color: #ffffff; }
.btn-pri:hover { background: var(--teal-dark); }
.btn-sec { background: #e2e8f0; color: #334155; }
.btn-warn { background: #f59e0b; color: #ffffff; }

.btn-disabled {
  opacity: 0.55;
  pointer-events: none;
}

/* ================= MODAL MORTIR ================= */
.mortar-arena {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 1.4rem 0;
}

.mortar-bowl {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #cbd5e1 75%, #94a3b8 100%);
  border: 6px solid #e2e8f0;
  box-shadow: inset 0 8px 16px rgba(0,0,0,0.2), 0 8px 18px rgba(0,0,0,0.15);
  position: relative;
  display: grid;
  place-items: center;
}

.mortar-pestle {
  width: 24px;
  height: 70px;
  background: linear-gradient(135deg, #f8fafc 0%, #94a3b8 100%);
  border-radius: 12px;
  box-shadow: 2px 4px 10px rgba(0,0,0,0.25);
  transform-origin: bottom center;
  transition: transform 0.1s ease;
  z-index: 5;
  pointer-events: none;
}

.pestle-hit {
  transform: rotate(-28deg) translateY(10px) scale(0.92);
}

.pestle-swirling {
  animation: pestleSwirl 0.28s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes pestleSwirl {
  0% { transform: rotate(0deg) translate(0, 0) scale(1); }
  25% { transform: rotate(-24deg) translate(-10px, 6px) scale(0.94); }
  50% { transform: rotate(20deg) translate(12px, 8px) scale(0.92); }
  75% { transform: rotate(-14deg) translate(-6px, 12px) scale(0.96); }
  100% { transform: rotate(0deg) translate(0, 0) scale(1); }
}

/* Serbuk Puyer Berevolusi Visual (Chunky Tablets -> Fine Silky Powder) */
.mortar-powder {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 66px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle at 45% 45%, #fbcfe8 0%, #f472b6 55%, #db2777 100%);
  box-shadow: 0 0 10px rgba(244, 114, 182, 0.35);
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
  pointer-events: none;
}

/* Tahap 1: Butiran tablet kasar (0 - 30%) */
.mortar-powder.coarse {
  width: 58px;
  height: 26px;
  background: radial-gradient(circle at 40% 40%, #fbcfe8 0%, #f472b6 45%, #be185d 100%);
  filter: contrast(125%);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.22), 0 0 6px rgba(244, 114, 182, 0.3);
}

/* Tahap 2: Granul terpecah & merata (31 - 70%) */
.mortar-powder.medium {
  width: 76px;
  height: 38px;
  background: radial-gradient(circle at 50% 45%, #fdf2f8 0%, #fbcfe8 45%, #f472b6 100%);
  filter: contrast(108%);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.12), 0 0 12px rgba(244, 114, 182, 0.45);
}

/* Tahap 3: Serbuk ultra halus homogen & berkilau (71 - 100%) */
.mortar-powder.fine {
  width: 88px;
  height: 44px;
  background: radial-gradient(circle at 50% 40%, #ffffff 0%, #fdf2f8 35%, #fce7f3 70%, #f472b6 100%);
  box-shadow: inset 0 0 8px rgba(255,255,255,0.8), 0 0 18px rgba(236, 72, 153, 0.6);
  animation: powderSparkle 1.6s ease-in-out infinite alternate;
}

@keyframes powderSparkle {
  0% { filter: drop-shadow(0 0 4px rgba(236, 72, 153, 0.4)); }
  100% { filter: drop-shadow(0 0 12px rgba(244, 114, 182, 0.85)) brightness(1.08); }
}

/* Percikan Serbuk Halus Melayang */
.powder-puff {
  position: absolute;
  width: 8px;
  height: 8px;
  background: radial-gradient(circle, #fce7f3 30%, #f472b6 80%, transparent 100%);
  border-radius: 50%;
  pointer-events: none;
  animation: powderPuffFloat 0.42s ease-out forwards;
  z-index: 10;
}

@keyframes powderPuffFloat {
  0% { opacity: 0.95; transform: translate(0, 0) scale(0.6); }
  50% { opacity: 0.8; transform: translate(var(--dx, 0px), -18px) scale(1.4); }
  100% { opacity: 0; transform: translate(var(--dx, 0px), -36px) scale(0.3); }
}

.mortar-bowl.bowl-rattle {
  animation: bowlRattle 0.14s ease-in-out;
}

@keyframes bowlRattle {
  0% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(-3.5px, 2px) rotate(-1.5deg) scale(0.98); }
  50% { transform: translate(3.5px, -2px) rotate(1.5deg) scale(1.02); }
  75% { transform: translate(-2px, -1px) scale(0.99); }
  100% { transform: translate(0, 0) scale(1); }
}

.mortar-bar-wrap {
  width: 100%;
  height: 14px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin: 0.5rem 0;
}

.mortar-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #a855f7, #ec4899);
  border-radius: 999px;
  transition: width 0.12s ease;
}

.mortar-pct {
  font-family: 'Silkscreen', monospace;
  font-size: 0.92rem;
  color: var(--teal-dark);
}

/* ================= MODAL TELAAH RESEP ================= */
.review-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem;
  background: #f1f8f6;
  border-radius: var(--border-radius-sm);
  padding: 0.6rem 0.8rem;
  font-size: 0.82rem;
  margin: 0.8rem 0;
}

.review-section {
  margin: 0.6rem 0;
  padding: 0.5rem 0.7rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--border-radius-sm);
}

.review-section h3 {
  font-size: 0.78rem;
  color: var(--teal-dark);
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}

.checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: #334155;
}

.review-rx-box {
  margin-top: 0.8rem;
  border-top: 2px dashed #cbd5e1;
  padding-top: 0.6rem;
}

.review-rx-box h3 {
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-bottom: 0.4rem;
}

.review-med-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  padding: 0.4rem 0.6rem;
  border-radius: var(--border-radius-sm);
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
}

.med-num {
  font-family: 'Fredoka', cursive, sans-serif;
  font-weight: 700;
  color: var(--teal-primary);
  margin-right: 0.5rem;
}

.med-sig {
  font-size: 0.72rem;
  color: #64748b;
}

.med-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.badge-white { background: #e2e8f0; color: #1e293b; border: 1px solid #94a3b8; }
.badge-blue { background: #0284c7; color: #ffffff; }

.review-alert {
  padding: 0.6rem 0.8rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.8rem;
  margin-bottom: 0.8rem;
}

.alert-danger { background: #fee2e2; color: #991b1b; border: 1.5px solid #f87171; }
.alert-success { background: #dcfce7; color: #166534; border: 1.5px solid #4ade80; }

/* ================= MODAL TOKO RENOVASI ================= */
.shop-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0;
}

.shop-item-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--border-radius-md);
  padding: 0.8rem 1rem;
}

.shop-item-card.item-owned {
  background: #f0fdf4;
  border-color: #86efac;
}

.shop-item-icon {
  font-size: 2rem;
}

.shop-item-body {
  flex: 1;
}

.shop-item-body h4 {
  font-size: 0.95rem;
  color: var(--ink-main);
}

.shop-item-body p {
  font-size: 0.75rem;
  color: #64748b;
  margin: 0.15rem 0;
}

.shop-item-price {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--amber-dark);
}

.btn-buy {
  font-family: 'Fredoka', cursive, sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background: var(--teal-primary);
  color: #ffffff;
  border: none;
  cursor: pointer;
}

/* ================= MODAL SHIFT END (CELEBRATORY JUICY LEVEL CLEAR & COMPACT FIT) ================= */
.shift-end-modal {
  text-align: center;
  max-width: min(94vw, 720px) !important;
  width: 94% !important;
  max-height: min(94dvh, calc(100vh - 14px)) !important;
  padding: 0 !important;
  background: var(--card-cream, #fffdf9) !important;
  border: 3px solid #0f172a !important;
  border-radius: 20px !important;
  box-shadow: 0 10px 0 rgba(15, 23, 42, 0.25), 0 20px 40px rgba(0, 0, 0, 0.4) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.shift-end-header-box {
  flex-shrink: 0 !important;
  background: linear-gradient(180deg, #f0fdfa 0%, #e6f7f4 100%) !important;
  border-bottom: 2px solid #cbd5e1 !important;
  padding: 6px 14px !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: left !important;
  gap: 0.5rem !important;
  box-sizing: border-box !important;
}

.shift-end-trophy {
  font-size: 2.85rem !important;
  line-height: 1 !important;
  animation: bounceTrophy 1.5s ease-in-out infinite;
  filter: drop-shadow(0 4px 10px rgba(245, 158, 11, 0.45));
  margin: 0 0 3px 0 !important;
  display: inline-block !important;
}

@keyframes bounceTrophy {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.1); }
}

.shift-end-title-wrap {
  text-align: left !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
}

.shift-end-title-wrap h2 {
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  color: #0f766e !important;
  margin: 0 !important;
  line-height: 1.2 !important;
  text-align: left !important;
}

.shift-end-title-wrap .modal-subtitle {
  font-size: 0.68rem !important;
  color: #64748b !important;
  margin-top: 1px !important;
  font-weight: 600 !important;
  text-align: left !important;
}

.shift-end-body {
  display: grid !important;
  grid-template-columns: 0.85fr 1.15fr !important;
  gap: 8px !important;
  align-items: center !important;
  padding: 8px 14px !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
}

.end-stars-container {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 0 4px !important;
}

.end-stars {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.end-stars-strip {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.25rem !important;
}

.end-star-badge {
  font-size: 1.25rem !important;
  line-height: 1 !important;
  display: inline-block;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.end-star-badge.earned {
  color: #f59e0b;
  filter: drop-shadow(0 2px 5px rgba(245, 158, 11, 0.5));
}

.end-star-badge.empty {
  color: #cbd5e1;
  opacity: 0.45;
}

.end-star-caption {
  display: inline-block !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
  font-size: 0.66rem !important;
  font-weight: 800 !important;
  font-family: 'Fredoka', cursive !important;
  background: #ccfbf1 !important;
  color: #0f766e !important;
  border: 1px solid #99f6e4 !important;
  margin: 2px 0 3px 0 !important;
}

.end-accolade-box {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  margin: 2px 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.end-accolade-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
  border: 1.5px solid #f59e0b !important;
  color: #92400e !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-weight: 800 !important;
  font-size: 0.68rem !important;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.18) !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  animation: popInAccolade 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.end-accolade-pill .end-accolade-text {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.end-accolade-badge-icon {
  font-size: 0.85rem !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
}

@keyframes popInAccolade {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.end-xp-bar-container {
  width: 100% !important;
  box-sizing: border-box !important;
  background: #ffffff !important;
  border: 1.5px solid #ccfbf1 !important;
  border-radius: 10px !important;
  padding: 3px 8px !important;
  margin: 2px 0 0 0 !important;
  box-shadow: 0 1px 4px rgba(13, 148, 136, 0.08) !important;
}

.end-xp-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  font-size: 0.66rem !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  margin-bottom: 2px !important;
}

.end-xp-badge-gain {
  background: linear-gradient(135deg, #0284c7, #06b6d4) !important;
  color: #ffffff !important;
  padding: 1px 6px !important;
  border-radius: 999px !important;
  font-size: 0.62rem !important;
  font-weight: 800 !important;
}

.end-xp-track {
  width: 100% !important;
  height: 6px !important;
  background: #e2e8f0 !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  position: relative !important;
}

.end-xp-fill {
  height: 100% !important;
  background: linear-gradient(90deg, #10b981, #06b6d4) !important;
  border-radius: 999px !important;
  transition: width 0.8s ease !important;
}

.end-stats-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 4px !important;
  margin: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.end-stat-pill {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 3px 6px !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  text-align: left !important;
  box-sizing: border-box !important;
}

.end-stat-pill-icon {
  font-size: 1rem !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
}

.end-stat-pill-val {
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
}

.end-stat-pill-lbl {
  font-size: 0.58rem !important;
  color: #64748b !important;
  font-weight: 600 !important;
  line-height: 1.1 !important;
}

.end-spm-banner {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 6px !important;
  padding: 2px 6px !important;
  font-size: 0.65rem !important;
  margin-top: 3px !important;
}

.shift-end-footer {
  flex-shrink: 0 !important;
  position: static !important;
  margin-top: auto !important;
  background: #ffffff !important;
  border-top: 2px solid #cbd5e1 !important;
  padding: 6px 14px !important;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.04) !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  box-sizing: border-box !important;
}

.btn-next-shift-main {
  flex: 1.2 !important;
  min-height: 36px !important;
  padding: 4px 12px !important;
  font-size: 0.88rem !important;
  border-radius: 10px !important;
  border: 2px solid #0f172a !important;
  box-shadow: 0 3px 0 #047857 !important;
  background: linear-gradient(180deg, #34d399 0%, #059669 100%) !important;
  color: #ffffff !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-weight: 700 !important;
  transition: all 0.12s ease !important;
}

.btn-next-shift-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 0 #047857 !important;
}

.btn-next-shift-main:active {
  transform: translateY(2px) !important;
  box-shadow: none !important;
}

.shift-end-sub-row {
  flex: 1.5 !important;
  display: flex !important;
  gap: 6px !important;
}

.btn-share-report-sub {
  flex: 1.3 !important;
  min-height: 36px !important;
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%) !important;
  color: #ffffff !important;
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-weight: 700 !important;
  font-size: 0.76rem !important;
  padding: 4px 8px !important;
  border-radius: 10px !important;
  border: 2px solid #0f172a !important;
  box-shadow: 0 3px 0 #0369a1 !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap !important;
  transition: all 0.12s ease !important;
}

.btn-share-report-sub:active {
  transform: translateY(2px) !important;
  box-shadow: none !important;
}

.btn-shift-sec {
  flex: 1 !important;
  min-height: 36px !important;
  background: #f1f5f9 !important;
  color: #475569 !important;
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-weight: 700 !important;
  font-size: 0.76rem !important;
  padding: 4px 8px !important;
  border-radius: 10px !important;
  border: 2px solid #0f172a !important;
  box-shadow: 0 3px 0 #64748b !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap !important;
  transition: all 0.12s ease !important;
}

.btn-shift-sec:active {
  transform: translateY(2px) !important;
  box-shadow: none !important;
}

/* ================= START SCREEN (ARCADE VIDEO GAME TITLE - BRIGHT MEDICAL MINT THEME) ================= */
#title-screen {
  position: absolute;
  inset: 0;
  background-color: #f0fdfa;
  background: 
    radial-gradient(rgba(13, 148, 136, 0.13) 1.5px, transparent 1.5px),
    radial-gradient(circle at 50% 30%, #ffffff 0%, #f0fdfa 25%, #ccfbf1 55%, #99f6e4 80%, #5eead4 100%);
  background-size: 26px 26px, 100% 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 60;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* Sembunyikan elemen gameplay HUD saat berada di Layar Judul / Menu Utama */
.in-title-screen #hud-top,
.in-title-screen #hud-left-stack,
.in-title-screen #order-clipboard,
.in-title-screen #hudAmbienceTicker,
.in-title-screen #banner-critical-stock,
.in-title-screen #carry-indicator,
.in-title-screen #mobile-controls,
#game-container:has(#title-screen:not(.hidden)) #hud-top,
#game-container:has(#title-screen:not(.hidden)) #hud-left-stack,
#game-container:has(#title-screen:not(.hidden)) #order-clipboard,
#game-container:has(#title-screen:not(.hidden)) #hudAmbienceTicker,
#game-container:has(#title-screen:not(.hidden)) #banner-critical-stock,
#game-container:has(#title-screen:not(.hidden)) #carry-indicator,
#game-container:has(#title-screen:not(.hidden)) #mobile-controls {
  display: none !important;
}

#title-screen::-webkit-scrollbar {
  display: none;
}

/* Dekorasi Balon / Ikon Melayang di Layar Judul (8 Elemen Game Cerah) */
.title-bubble {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.9) 0%, rgba(204, 251, 241, 0.5) 60%, rgba(94, 234, 212, 0.4) 100%);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255, 255, 255, 0.95);
  display: grid;
  place-items: center;
  font-size: 1.55rem;
  box-shadow: 0 8px 20px rgba(13, 148, 136, 0.16), inset 0 2px 4px rgba(255, 255, 255, 0.8);
  pointer-events: auto !important;
  cursor: pointer !important;
  user-select: none !important;
  -webkit-tap-highlight-color: transparent !important;
  animation: floatBubble 3.8s ease-in-out infinite alternate;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
  z-index: 12 !important;
}

.title-bubble:hover {
  transform: scale(1.15) !important;
  filter: brightness(1.12);
  box-shadow: 0 10px 24px rgba(13, 148, 136, 0.28), inset 0 2px 6px rgba(255, 255, 255, 0.95);
}

.title-bubble:active {
  transform: scale(0.92) !important;
}

/* Animasi Meletus / Pecah (Bubble Pop) */
.title-bubble.popping {
  animation: bubblePop 0.28s cubic-bezier(0.1, 0.8, 0.3, 1) forwards !important;
  pointer-events: none !important;
}

@keyframes bubblePop {
  0% {
    transform: scale(1);
    opacity: 1;
    filter: brightness(1);
  }
  35% {
    transform: scale(1.35);
    opacity: 0.95;
    filter: brightness(1.3) drop-shadow(0 0 10px rgba(94, 234, 212, 0.8));
  }
  100% {
    transform: scale(1.85);
    opacity: 0;
    filter: blur(5px);
  }
}

/* Animasi Muncul Kembali (Bubble Spawn) */
.title-bubble.spawning {
  animation: bubbleSpawn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
  pointer-events: none !important;
}

@keyframes bubbleSpawn {
  0% {
    transform: scale(0) rotate(-20deg);
    opacity: 0;
  }
  65% {
    transform: scale(1.22) rotate(6deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.title-bubble.hidden-bubble {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: scale(0) !important;
}

/* Percikan Partikel Pecahan Gelembung */
.bubble-burst-particle {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 30%, #5eead4 100%);
  box-shadow: 0 0 6px rgba(94, 234, 212, 0.8);
  z-index: 13;
  animation: particleFly 0.38s ease-out forwards;
}

@keyframes particleFly {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx, 0), var(--ty, 0)) scale(0);
    opacity: 0;
  }
}

.title-bubble.b1 { top: 8%; left: 8%; animation-delay: 0s; }
.title-bubble.b2 { top: 10%; right: 8%; animation-delay: 1.2s; }
.title-bubble.b3 { bottom: 10%; left: 10%; animation-delay: 2.1s; }
.title-bubble.b4 { bottom: 12%; right: 10%; animation-delay: 0.8s; }
.title-bubble.b5 { top: 48%; left: 4%; font-size: 1.45rem; width: 44px; height: 44px; animation-delay: 1.6s; }
.title-bubble.b6 { top: 46%; right: 4%; font-size: 1.45rem; width: 44px; height: 44px; animation-delay: 2.7s; }
.title-bubble.b7 { top: 22%; left: 20%; font-size: 1.35rem; width: 40px; height: 40px; animation-delay: 0.5s; opacity: 0.9; }
.title-bubble.b8 { top: 20%; right: 20%; font-size: 1.35rem; width: 40px; height: 40px; animation-delay: 1.9s; opacity: 0.9; }

@keyframes floatBubble {
  0% { transform: translateY(0) rotate(0deg) scale(1); }
  50% { transform: translateY(-10px) rotate(5deg) scale(1.04); }
  100% { transform: translateY(-18px) rotate(-6deg) scale(0.98); }
}

.title-box {
  background: transparent !important;
  border: none !important;
  border-radius: 0;
  box-shadow: none !important;
  padding: 0.4rem 0.8rem;
  max-width: min(94vw, 860px);
  width: 94%;
  text-align: center;
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
}

/* Logo Hero Aura & Floating Effect */
.title-logo-hero {
  position: relative;
  display: inline-block;
  margin-bottom: 2px;
}

.title-logo-halo {
  position: absolute;
  inset: -10px;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.55) 0%, rgba(13, 148, 136, 0.2) 50%, transparent 75%);
  border-radius: 50%;
  animation: haloPulse 2.8s ease-in-out infinite alternate;
  pointer-events: none;
}

.title-logo-img {
  position: relative;
  width: 62px;
  height: auto;
  filter: drop-shadow(0 6px 14px rgba(13, 148, 136, 0.35));
  animation: logoFloat 3s ease-in-out infinite alternate;
}

@keyframes haloPulse {
  0% { transform: scale(0.92); opacity: 0.6; }
  100% { transform: scale(1.18); opacity: 1; }
}

@keyframes logoFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-5px); }
}

/* Arcade Genre Badge */
.title-badge.arcade-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Fredoka', cursive, sans-serif;
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.95), rgba(15, 118, 110, 0.95));
  border: 1.5px solid #5eead4;
  color: #ffffff;
  padding: 0.22rem 0.95rem;
  border-radius: 999px;
  margin-bottom: 0.2rem;
  box-shadow: 0 0 14px rgba(94, 234, 212, 0.35), 0 3px 8px rgba(13, 148, 136, 0.2);
}

.arcade-badge-star {
  font-size: 0.72rem;
  color: #fde047;
  filter: drop-shadow(0 0 4px #facc15);
}

/* ================= RECTANGULAR GAME BUTTON: PORTAL FARMASIDRUGGIST.ID ================= */
.title-portal-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  padding: 6px 18px;
  border-radius: 10px;
  background: linear-gradient(180deg, #14b8a6 0%, #0d9488 45%, #0f766e 100%);
  border: 2px solid #5eead4;
  border-bottom: 4px solid #134e4a;
  box-shadow: 
    0 4px 0 #134e4a,
    0 8px 18px rgba(13, 148, 136, 0.35),
    0 0 16px rgba(94, 234, 212, 0.25);
  color: #ffffff;
  font-family: 'Fredoka', cursive, sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  margin: 0 0 4px 0;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, filter 0.15s ease, border-color 0.15s ease;
  user-select: none;
  z-index: 15;
  animation: portalBtnFloat 3s ease-in-out infinite alternate;
}

.portal-btn-icon {
  font-size: 1rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
  display: inline-block;
  transform-origin: center;
}

.portal-btn-tag {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid #fef08a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  text-shadow: 0 1px 1px rgba(120, 53, 15, 0.6);
  white-space: nowrap;
}

.portal-btn-text {
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 3px rgba(15, 23, 42, 0.6);
  white-space: nowrap;
}

.portal-btn-arrow {
  color: #fef08a;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1;
  transition: transform 0.18s ease;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.portal-btn-shine {
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-25deg);
  animation: portalBtnShine 3.8s ease-in-out infinite;
  pointer-events: none;
}

.title-portal-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  border-color: #99f6e4;
  box-shadow: 
    0 6px 0 #134e4a,
    0 12px 24px rgba(13, 148, 136, 0.45),
    0 0 25px rgba(94, 234, 212, 0.4);
}

.title-portal-btn:hover .portal-btn-arrow {
  transform: translate(2px, -2px);
}

.title-portal-btn:active {
  transform: translateY(3px);
  border-bottom-width: 2px;
  box-shadow: 
    0 1px 0 #134e4a,
    0 3px 8px rgba(13, 148, 136, 0.3);
}

@keyframes portalBtnFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-3px); }
}

@keyframes portalBtnShine {
  0%, 65% { left: -120%; }
  100% { left: 160%; }
}

/* 3D JUICY ARCADE CARTOON GAME TITLE (FD Adventure : RS) */
.main-title {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: clamp(2.2rem, 4.8vw, 3.1rem);
  font-weight: 800;
  line-height: 1.08;
  color: #fffbdf;
  letter-spacing: 0.04em;
  text-align: center;
  margin: 0.4rem 0 0.2rem;
  text-shadow:
    0 1px 0 #ffffff,
    0 2px 0 #fef08a,
    0 3px 0 #fde047,
    0 4px 0 #f59e0b,
    0 5px 0 #d97706,
    0 6px 0 #0d9488,
    0 7px 0 #0f766e,
    0 8px 18px rgba(13, 148, 136, 0.45),
    0 0 25px rgba(250, 204, 21, 0.55),
    0 0 45px rgba(45, 212, 191, 0.4);
  -webkit-text-stroke: 1.5px #0f766e;
  filter: drop-shadow(0 6px 14px rgba(13, 148, 136, 0.35));
  animation: splashTitlePopFloat 3.2s ease-in-out infinite alternate;
  user-select: none;
}

@keyframes titleArcadeFloat {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-5px) scale(1.02); }
  100% { transform: translateY(0) scale(1); }
}

.main-sub {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: #0f766e;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
  margin-top: 0.1rem;
}

.main-tagline {
  font-size: 0.74rem;
  color: #115e59 !important;
  font-weight: 600;
  margin-bottom: 6px;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* ================= TITLE STATS ROW (TOTAL KUNJUNGAN & LIVE PRESENCE - FRAMELESS CLEAN) ================= */
.title-stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 auto 10px;
  max-width: 95%;
}

.title-visitor-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  border-bottom: none;
  border-radius: 999px;
  padding: 2px 8px;
  margin: 0;
  cursor: default;
  box-shadow: none;
  transition: all 0.18s ease;
  user-select: none;
}

.title-visitor-badge:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.45);
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.08);
}

.visitor-badge-icon {
  font-size: 0.92rem;
  line-height: 1;
  display: inline-block;
  filter: drop-shadow(0 1px 2px rgba(2, 132, 199, 0.25));
}

.visitor-badge-label {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  color: #0369a1;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
}

.visitor-badge-label b {
  color: #0284c7;
  font-weight: 900;
  font-size: 0.82rem;
  letter-spacing: 0.2px;
}

/* ================= TITLE LIVE PRESENCE INDICATOR (FRAMELESS CLEAN) ================= */
.title-live-presence {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: none;
  border-bottom: none;
  border-radius: 999px;
  padding: 2px 8px;
  margin: 0;
  cursor: pointer;
  box-shadow: none;
  transition: all 0.18s ease;
  user-select: none;
}

.title-live-presence:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.45);
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.08);
}

.title-live-presence:active {
  transform: translateY(1px);
}

.presence-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 rgba(16, 185, 129, 0.7);
  animation: presencePulseDot 1.8s infinite;
  display: inline-block;
  flex-shrink: 0;
}

@keyframes presencePulseDot {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.presence-label {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  color: #0f766e;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
}

.presence-chip {
  font-size: 0.62rem;
  font-weight: 800;
  color: #0f766e;
  background: rgba(13, 148, 136, 0.12);
  border: 1px solid rgba(13, 148, 136, 0.28);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: none;
  transition: all 0.18s ease;
}

.title-live-presence:hover .presence-chip {
  background: #0d9488;
  color: #ffffff;
  border-color: #0d9488;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.25);
}

/* ================= ROSTER MODAL (DAFTAR FARMASIS LIVE) ================= */
.roster-modal {
  background: linear-gradient(180deg, #ffffff 0%, #f0fdfa 100%) !important;
  border: 2px solid #0d9488 !important;
  border-radius: 16px !important;
  box-shadow: 0 16px 40px rgba(13, 148, 136, 0.22) !important;
}

/* ================= FULL SCREEN STUDIO VIEW: DAFTAR STAF DINAS AKTIF (IDENTIK DENGAN RUANG LOKER & MENU CUSTOM KARAKTER) ================= */
.roster-screen-view,
#modal-active-roster.roster-screen-view {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  max-height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  z-index: 12500 !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  /* Background cerah segar khas game simulasi farmasi rumah sakit (Bright Medical Mint & Sky Glow - IDENTIK DENGAN RUANG GANTI/LOKER & LOADING SCREEN) */
  background: radial-gradient(circle at 50% 30%, #ffffff 0%, #f0fdfa 25%, #ccfbf1 55%, #99f6e4 80%, #5eead4 100%) !important;
  background-image: 
    radial-gradient(rgba(13, 148, 136, 0.13) 1.5px, transparent 1.5px),
    radial-gradient(circle at 50% 30%, #ffffff 0%, #f0fdfa 25%, #ccfbf1 55%, #99f6e4 80%, #5eead4 100%) !important;
  background-size: 26px 26px, 100% 100% !important;
  overflow: hidden !important;
  animation: lockerScreenFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#modal-active-roster.hidden,
.roster-screen-view.hidden {
  display: none !important;
}

.roster-screen-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 6px 12px 8px;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.roster-screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid #99f6e4;
  border-radius: 9px;
  margin-bottom: 5px;
  box-shadow: 0 3px 12px rgba(13, 148, 136, 0.10);
  flex-shrink: 0;
  gap: 8px;
}

.roster-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-locker-back {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: #f0fdfa;
  border: 1.5px solid #99f6e4;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.66rem;
  font-weight: 800;
  color: #0f766e;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.btn-locker-back:hover {
  background: #ccfbf1;
  border-color: #0d9488;
  color: #115e59;
  transform: translateX(-1px);
}

.btn-locker-back .back-arrow {
  font-size: 0.78rem;
  line-height: 1;
}

.roster-header-titles {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.roster-tag {
  font-size: 0.46rem;
  font-weight: 800;
  color: #0f766e;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  padding: 1px 5px;
  border-radius: 4px;
  display: inline-block;
  width: fit-content;
  letter-spacing: 0.3px;
}

.roster-title {
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-size: 0.88rem !important;
  color: #0f172a !important;
  margin: 1px 0 0 !important;
  line-height: 1.15;
}

.roster-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.roster-status-banner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0fdfa;
  border: 1.5px solid #99f6e4;
  border-radius: 999px;
  padding: 3px 10px;
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.66rem;
  font-weight: 700;
  color: #0f766e;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.08);
  white-space: nowrap;
}

.roster-controls-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 4px;
  flex-shrink: 0;
}

.roster-filter-tabs {
  display: flex;
  gap: 5px;
  margin: 0;
  border-bottom: none;
  padding-bottom: 0;
  overflow-x: auto;
  flex-shrink: 0;
}

.roster-tab-btn {
  background: rgba(255, 255, 255, 0.95);
  border: 1.5px solid #99f6e4;
  border-radius: 999px;
  padding: 3px 9px;
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.66rem;
  font-weight: 700;
  color: #0f766e;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
  box-shadow: 0 1px 4px rgba(13, 148, 136, 0.08);
}

.roster-tab-btn:hover {
  background: #f0fdfa;
  border-color: #0d9488;
}

.roster-tab-btn.active {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  border-color: #0f766e;
  color: #ffffff;
  box-shadow: 0 2px 7px rgba(13, 148, 136, 0.28);
}

.roster-rule-notice {
  background: rgba(255, 255, 255, 0.94);
  border: 1.2px solid #99f6e4;
  border-left: 3.5px solid #0d9488;
  border-radius: 7px;
  padding: 4px 8px;
  font-size: 0.62rem;
  color: #0f766e;
  line-height: 1.35;
  margin-bottom: 5px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 6px rgba(13, 148, 136, 0.06);
  flex-shrink: 0;
}

.roster-rule-notice .notice-icon {
  font-size: 0.95rem;
  flex-shrink: 0;
}

.roster-rule-notice .notice-text {
  flex: 1;
}

/* Grid Kartu Staf Aktif - Responsive Compact Scale (Ukuran Mobile Cocok & Terlihat Rapi) */
.roster-grid-body,
#rosterListContainer {
  flex: 1;
  overflow-y: auto;
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
  gap: 6px 8px !important;
  padding: 2px 4px 8px 2px !important;
  align-content: start;
}

/* Custom Sleek Mint Scrollbar */
.roster-grid-body::-webkit-scrollbar,
#rosterListContainer::-webkit-scrollbar {
  width: 5px;
}
.roster-grid-body::-webkit-scrollbar-track,
#rosterListContainer::-webkit-scrollbar-track {
  background: rgba(204, 251, 241, 0.3);
  border-radius: 6px;
}
.roster-grid-body::-webkit-scrollbar-thumb,
#rosterListContainer::-webkit-scrollbar-thumb {
  background: #5eead4;
  border-radius: 6px;
}
.roster-grid-body::-webkit-scrollbar-thumb:hover,
#rosterListContainer::-webkit-scrollbar-thumb:hover {
  background: #0d9488;
}

.roster-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(255, 255, 255, 0.96);
  border: 1.5px solid #99f6e4;
  border-radius: 11px;
  padding: 6px 10px;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.06), 0 1px 2px rgba(0, 0, 0, 0.03);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.roster-card:hover {
  border-color: #0d9488;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.15);
}

.roster-card.self-card {
  border-color: #0d9488;
  border-width: 1.8px;
  background: linear-gradient(135deg, #f0fdfa 0%, #ffffff 100%);
  box-shadow: 0 0 0 1.5px rgba(13, 148, 136, 0.20), 0 3px 10px rgba(13, 148, 136, 0.12);
}

.roster-card-main {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.roster-avatar-box {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #ccfbf1 0%, #99f6e4 100%);
  border: 1.5px solid #0d9488;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.14);
  margin-top: 1px;
}

.roster-info-box {
  flex: 1;
  text-align: left;
  min-width: 0;
}

.roster-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 1px;
}

.roster-name {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  color: #0f172a;
  white-space: normal;
  overflow: visible;
  line-height: 1.2;
}

.roster-role-tag {
  font-size: 0.52rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 999px;
  background: #ccfbf1;
  color: #0f766e;
  border: 1px solid #99f6e4;
  white-space: nowrap;
}

.roster-status-row {
  margin: 1px 0 2px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.roster-stage-status {
  font-size: 0.60rem;
  color: #475569;
  font-weight: 600;
  white-space: normal;
  line-height: 1.25;
}

.roster-card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.roster-action-group {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.btn-roster-visit {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: linear-gradient(135deg, #0d9488, #0f766e);
  border: 1.5px solid #14b8a6;
  border-radius: 999px;
  padding: 3px 8px;
  font-family: inherit;
  font-size: 0.64rem;
  font-weight: 800;
  color: #ffffff;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1.5px 5px rgba(13, 148, 136, 0.22);
  transition: all 0.18s ease;
}

.btn-roster-visit:hover {
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  transform: translateY(-1px);
}

.btn-roster-visit.can-visit {
  background: linear-gradient(135deg, #0d9488, #059669);
  border-color: #34d399;
  box-shadow: 0 2px 7px rgba(16, 185, 129, 0.35);
  animation: pulseVisitBtn 2.2s infinite ease-in-out;
}

.btn-roster-locked {
  background: #f1f5f9 !important;
  border: 1.2px solid #cbd5e1 !important;
  color: #94a3b8 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  transform: none !important;
  padding: 3px 8px !important;
  font-size: 0.64rem !important;
  opacity: 0.88;
}

.btn-roster-cheer {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1.4px solid #f59e0b;
  border-radius: 999px;
  padding: 3px 8px;
  font-family: inherit;
  font-size: 0.64rem;
  font-weight: 800;
  color: #92400e;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.18s ease;
  box-shadow: 0 1.5px 5px rgba(245, 158, 11, 0.16);
}

.btn-roster-cheer:hover {
  background: #fde68a;
  transform: translateY(-1px);
}

.roster-self-pill {
  font-size: 0.60rem;
  font-weight: 800;
  color: #0d9488;
  background: #ccfbf1;
  border: 1.2px solid #0d9488;
  padding: 2.5px 7px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 1.5px 4px rgba(13, 148, 136, 0.10);
}

.roster-badge-explore {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.54rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.roster-badge-shift {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.54rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 999px;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.roster-badge-lobby {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.54rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 999px;
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

/* Responsif Mobile untuk Roster Screen */
@media (max-width: 680px) {
  .roster-screen-container {
    padding: 4px 6px 6px;
  }
  .roster-screen-header {
    flex-wrap: wrap;
    gap: 5px;
    padding: 3px 7px;
    margin-bottom: 4px;
  }
  .roster-header-left {
    gap: 6px;
  }
  .roster-title {
    font-size: 0.78rem !important;
  }
  .roster-tag {
    font-size: 0.42rem;
  }
  .roster-status-banner {
    font-size: 0.58rem;
    padding: 2px 7px;
  }
  .roster-tab-btn {
    font-size: 0.58rem;
    padding: 2.5px 7px;
  }
  .roster-rule-notice {
    font-size: 0.55rem;
    padding: 3px 6px;
    margin-bottom: 4px;
  }
  .roster-grid-body,
  #rosterListContainer {
    grid-template-columns: 1fr !important;
    gap: 5px !important;
  }
  .roster-card {
    padding: 5px 8px;
    border-radius: 9px;
  }
  .roster-avatar-box {
    width: 30px;
    height: 30px;
    font-size: 1.05rem;
  }
  .roster-name {
    font-size: 0.76rem;
  }
  .roster-stage-status {
    font-size: 0.56rem;
  }
}

@media (max-height: 500px) {
  .roster-screen-container {
    padding: 3px 8px 5px;
  }
  .roster-screen-header {
    padding: 2px 8px;
    margin-bottom: 3px;
  }
  .roster-controls-bar {
    margin-bottom: 3px;
  }
  .roster-rule-notice {
    padding: 2px 6px;
    font-size: 0.54rem;
    margin-bottom: 3px;
  }
  .roster-card {
    padding: 4px 8px;
  }
}

/* ================= BANNER OVERLAY: MODE KUNJUNGAN DINAS (CANDY ARCADE GAME THEME) ================= */
.visiting-hud-overlay {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(92%, 840px);
  z-index: 1000;
  pointer-events: auto;
  animation: visitingSlideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@keyframes visitingSlideDown {
  from {
    opacity: 0;
    transform: translate(-50%, -22px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

.visiting-hud-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 253, 250, 0.96) 100%);
  border: 2.5px solid #0d9488;
  border-bottom: 5px solid #0f766e;
  border-radius: 22px;
  padding: 10px 18px;
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.22), 0 3px 6px rgba(0, 0, 0, 0.08);
  color: #0f172a;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.visiting-hud-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.visiting-hud-icon-badge {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ccfbf1 0%, #99f6e4 100%);
  border: 2px solid #0d9488;
  border-bottom: 3.5px solid #0f766e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(13, 148, 136, 0.22);
  animation: badgeBop 2.5s infinite ease-in-out;
}

@keyframes badgeBop {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

.visiting-hud-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  min-width: 0;
}

.visiting-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 2px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0d9488, #0f766e);
  color: #ffffff;
  border-bottom: 2px solid #042f2e;
  box-shadow: 0 2px 4px rgba(13, 148, 136, 0.3);
}

.visiting-host-title {
  margin: 0;
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f766e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.2px;
}

.visiting-sub-desc {
  margin: 0;
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.74rem;
  color: #475569;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}

.game-keycap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-bottom: 2.5px solid #94a3b8;
  border-radius: 5px;
  padding: 0 5px;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.68rem;
  color: #0f766e;
  line-height: 1.35;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

body.in-visiting-mode #hud-top {
  display: none !important;
}

.visiting-hud-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-visiting-photo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
  border: 2px solid #bae6fd;
  border-bottom: 4px solid #0369a1;
  border-radius: 999px;
  padding: 8px 15px;
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: all 0.12s ease;
}

.btn-visiting-photo:hover {
  background: linear-gradient(180deg, #7dd3fc 0%, #0284c7 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.45);
}

.btn-visiting-photo:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.35);
}

.btn-exit-visiting {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(180deg, #f87171 0%, #dc2626 100%);
  border: 2px solid #fecaca;
  border-bottom: 4px solid #991b1b;
  border-radius: 999px;
  padding: 8px 16px;
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: all 0.12s ease;
}

.btn-exit-visiting:hover {
  background: linear-gradient(180deg, #fca5a5 0%, #dc2626 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.45);
}

.btn-exit-visiting:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.35);
}

.btn-exit-icon {
  font-size: 1.05rem;
}

.visiting-quick-chat-tray {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 253, 250, 0.95) 100%);
  border: 2px solid #99f6e4;
  border-bottom: 3.5px solid #0d9488;
  border-radius: 16px;
  padding: 6px 14px;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.15);
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 100%;
}

.visiting-quick-chat-tray::-webkit-scrollbar {
  display: none;
}

.quick-chat-label {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  color: #0f766e;
  white-space: nowrap;
  margin-right: 2px;
}

.btn-quick-emote {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ffffff;
  border: 1.5px solid #99f6e4;
  border-bottom: 2.5px solid #0d9488;
  border-radius: 999px;
  padding: 4px 12px;
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  color: #0f766e;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 5px rgba(13, 148, 136, 0.12);
  transition: all 0.12s ease;
}

.btn-quick-emote:hover {
  background: #ccfbf1;
  color: #042f2e;
  border-color: #5eead4;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(13, 148, 136, 0.22);
}

.btn-quick-emote:active {
  transform: translateY(1px);
  border-bottom-width: 1.5px;
}

/* RESPONSIVE SCALED-DOWN SIZING FOR MOBILE (PORTRAIT & LANDSCAPE) */
@media (max-width: 960px), (max-height: 540px) {
  .visiting-hud-overlay {
    top: 6px;
    width: min(96%, 680px);
    gap: 3px;
  }
  .visiting-hud-content {
    padding: 3px 8px;
    gap: 6px;
    border-radius: 12px;
    border-width: 1.5px;
    border-bottom-width: 3px;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.16);
  }
  .visiting-hud-left {
    gap: 6px;
    flex: 1;
    min-width: 0;
  }
  .visiting-hud-icon-badge {
    width: 26px;
    height: 26px;
    font-size: 0.95rem;
    border-radius: 7px;
    border-width: 1.2px;
    border-bottom-width: 2px;
    box-shadow: 0 2px 5px rgba(13, 148, 136, 0.16);
  }
  .visiting-hud-titles {
    gap: 1px;
    min-width: 0;
    flex: 1;
  }
  .visiting-badge-tag {
    font-size: 0.44rem;
    padding: 1px 5px;
    letter-spacing: 0.2px;
    border-bottom-width: 1px;
  }
  .visiting-host-title {
    font-size: 0.72rem;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .visiting-sub-desc {
    font-size: 0.52rem;
    line-height: 1.1;
    gap: 3px;
  }
  .game-keycap {
    font-size: 0.46rem;
    padding: 0 3px;
    border-width: 1px;
    border-bottom-width: 1.5px;
  }
  .visiting-hud-right {
    gap: 4px;
    flex-shrink: 0;
  }
  .btn-visiting-photo {
    padding: 3px 8px;
    font-size: 0.60rem;
    gap: 4px;
    border-width: 1.2px;
    border-bottom-width: 2px;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
    flex-shrink: 0;
  }
  .btn-exit-visiting {
    padding: 3px 9px;
    font-size: 0.60rem;
    gap: 4px;
    border-width: 1.2px;
    border-bottom-width: 2px;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
    flex-shrink: 0;
  }
  .btn-exit-icon {
    font-size: 0.70rem;
  }
  .visiting-quick-chat-tray {
    padding: 2px 7px;
    gap: 4px;
    border-radius: 10px;
    border-width: 1.2px;
    border-bottom-width: 2px;
    box-shadow: 0 2px 6px rgba(13, 148, 136, 0.10);
  }
  .quick-chat-label {
    font-size: 0.52rem;
    margin-right: 1px;
    flex-shrink: 0;
  }
  .btn-quick-emote {
    padding: 2px 6px;
    font-size: 0.52rem;
    gap: 3px;
    border-width: 1px;
    border-bottom-width: 1.5px;
    flex-shrink: 0;
  }
}

/* ULTRA-COMPACT FOR PHONE LANDSCAPE (HEIGHT <= 440px) */
@media (max-height: 440px) {
  .visiting-hud-overlay {
    top: 4px;
    gap: 2px;
    width: min(96%, 640px);
  }
  .visiting-hud-content {
    padding: 2px 6px;
    gap: 5px;
  }
  .visiting-sub-desc {
    display: none;
  }
  .visiting-host-title {
    font-size: 0.68rem;
  }
  .visiting-badge-tag {
    font-size: 0.40rem;
    padding: 0 4px;
  }
  .visiting-hud-icon-badge {
    width: 22px;
    height: 22px;
    font-size: 0.85rem;
    border-radius: 6px;
  }
  .btn-visiting-photo {
    padding: 2px 6px;
    font-size: 0.56rem;
  }
  .btn-exit-visiting {
    padding: 2px 7px;
    font-size: 0.56rem;
  }
  .visiting-quick-chat-tray {
    padding: 1.5px 5px;
    gap: 3px;
  }
  .quick-chat-label {
    font-size: 0.48rem;
    flex-shrink: 0;
  }
  .btn-quick-emote {
    padding: 1.5px 5px;
    font-size: 0.48rem;
    flex-shrink: 0;
  }
}

/* ================= SETUP SECTION (STAGE & DEPO SELECT) ================= */
.setup-section {
  margin: 0.2rem 0 0.4rem;
  width: 100%;
  text-align: left;
}

.depo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

/* CONTAINER LAYOUT UNTUK LAYAR JUDUL / TITLE SCREEN (WIDESCREEN DASHBOARD) */
.title-landscape-cols {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  max-width: 860px !important;
  gap: 12px !important;
  align-items: center !important;
}

.title-col-left {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 12px !important;
  width: 100% !important;
  max-width: 860px !important;
  align-items: stretch !important;
}

.title-col-right {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  max-width: 860px !important;
  gap: 8px !important;
  align-items: center !important;
}

.setup-section,
.depo-grid {
  margin: 0 !important;
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
}

/* HEADER BARIS ATAS PADA SETIAP KARTU (IKON DI KIRI, BADGE/TOMBOL DI KANAN) */
.title-card-top-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  margin-bottom: 6px !important;
}

.title-card-top-row .depo-icon-box,
.title-card-top-row #titleAvatarBadge,
.title-card-top-row .career-badge-icon {
  width: 38px !important;
  height: 38px !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* TACTILE 3D ARCADE PANELS - FROSTED CLEAN CARDS (3 KOLOM SEJAJAR) */
.depo-card-arcade,
.title-player-card,
.career-progress-card {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(12px) !important;
  border: 2px solid rgba(13, 148, 136, 0.28) !important;
  border-bottom: 4px solid #0f766e !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.12) !important;
  color: #0f172a !important;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  box-sizing: border-box !important;
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  padding: 0.65rem 0.85rem !important;
  min-height: 96px !important;
  margin: 0 !important;
}

.depo-card-arcade:hover,
.title-player-card:hover,
.career-progress-card:hover {
  transform: translateY(-2px) !important;
  border-color: #0d9488 !important;
  box-shadow: 0 8px 20px rgba(13, 148, 136, 0.2) !important;
  background: #ffffff !important;
}

/* 1. Stage Depo Panel */
.depo-card-arcade {
  cursor: pointer !important;
  text-align: left !important;
}

.depo-icon-box {
  width: 38px !important;
  height: 38px !important;
  border-radius: 10px !important;
  background: #ccfbf1 !important;
  border: 1.5px solid #0d9488 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.4rem !important;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.15) !important;
  flex-shrink: 0 !important;
}

.depo-info {
  width: 100% !important;
  text-align: left !important;
}

.depo-info b {
  display: block !important;
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-size: 0.86rem !important;
  color: #0f172a !important;
  line-height: 1.25 !important;
}

.depo-info small,
#titleStageDesc {
  display: none !important;
}

.depo-stage-badge {
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-size: 0.64rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #0d9488, #0f766e) !important;
  border: 1px solid #14b8a6 !important;
  border-radius: 999px !important;
  padding: 0.22rem 0.6rem !important;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.25) !important;
  white-space: nowrap !important;
}

/* 2. Hero / Player Selection Panel */
.title-player-card {
  cursor: pointer !important;
  text-align: left !important;
}

.title-player-info {
  width: 100% !important;
  text-align: left !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
}

#titleAvatarBadge {
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  background: #f0fdfa !important;
  border: 2px solid #0d9488 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.25rem !important;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.2) !important;
  flex-shrink: 0 !important;
  overflow: hidden !important;
}

#titleAvatarBadge svg {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}

#titleRoleBadge {
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-size: 0.64rem !important;
  font-weight: 800 !important;
  color: #0d9488 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  margin-bottom: 1px !important;
}

#titlePlayerName {
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  line-height: 1.2 !important;
}

.btn-kustom-arcade,
#btnTitleChangeName {
  background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
  border: 1.5px solid #7dd3fc !important;
  border-bottom: 3px solid #0369a1 !important;
  color: #ffffff !important;
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-size: 0.74rem !important;
  font-weight: 700 !important;
  padding: 0.28rem 0.65rem !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 0 #0369a1, 0 3px 8px rgba(14, 165, 233, 0.3) !important;
  cursor: pointer !important;
  transition: all 0.12s ease !important;
  white-space: nowrap !important;
}

.btn-kustom-arcade:hover,
#btnTitleChangeName:hover {
  transform: translateY(-2px) !important;
  filter: brightness(1.08) !important;
}

.btn-kustom-arcade:active,
#btnTitleChangeName:active {
  transform: translateY(2px) !important;
  border-bottom: 1.5px solid #0369a1 !important;
  box-shadow: 0 1px 0 #0369a1 !important;
}

/* 3. Career Mastery Progress Panel (Tombol Catatan Skor & Jenjang Karir) */
.career-progress-card {
  cursor: pointer !important;
  user-select: none !important;
  text-align: left !important;
  position: relative !important;
}

.career-badge-icon {
  font-size: 1.35rem !important;
  background: #fef3c7 !important;
  border: 1.5px solid #f59e0b !important;
  border-radius: 10px !important;
  width: 38px !important;
  height: 38px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25) !important;
  flex-shrink: 0 !important;
}

.career-info {
  width: 100% !important;
  text-align: left !important;
  margin-bottom: 2px !important;
}

.career-title {
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  line-height: 1.2 !important;
}

.career-subtitle,
#titleLevelBadge {
  display: none !important;
}

.career-level-number {
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #d97706, #f59e0b) !important;
  border: 1.5px solid #fde047 !important;
  padding: 0.2rem 0.55rem !important;
  border-radius: 999px !important;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3) !important;
  white-space: nowrap !important;
}

.career-xp-bar-wrap {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
}

.career-xp-bar {
  flex: 1 !important;
  height: 8px !important;
  background: #e2e8f0 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  position: relative !important;
}

.career-xp-bar i {
  display: block !important;
  height: 100% !important;
  background: linear-gradient(90deg, #10b981 0%, #06b6d4 50%, #f59e0b 100%) !important;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5) !important;
  border-radius: 999px !important;
  transition: width 0.3s ease !important;
}

.career-xp-label {
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-size: 0.65rem !important;
  font-weight: 700 !important;
  color: #b45309 !important;
  white-space: nowrap !important;
}

/* RESPONSIVE FALLBACK: NARROW PORTRAIT MOBILE ONLY (< 480px) */
@media (max-width: 480px) and (orientation: portrait) {
  .title-box {
    max-width: min(94vw, 480px) !important;
  }
  .title-landscape-cols {
    max-width: 470px !important;
  }
  .title-col-left {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    max-width: 470px !important;
  }
  .depo-card-arcade,
  .title-player-card,
  .career-progress-card {
    min-height: auto !important;
    padding: 0.5rem 0.8rem !important;
  }
}

/* ================= TITLE ACTIONS & 3D ARCADE START BUTTON ================= */
.title-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 0.35rem;
  width: 100%;
  max-width: 660px;
}

.btn-start-arcade {
  position: relative;
  overflow: hidden;
  flex: 1 1 0;
  width: 100%;
  max-width: 360px;
  margin: 0;
  padding: 10px 14px !important;
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-size: 1.02rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase;
  color: #ffffff !important;
  background: linear-gradient(180deg, #34d399 0%, #10b981 50%, #059669 100%) !important;
  border: 2px solid #6ee7b7 !important;
  border-bottom: 5px solid #064e3b !important;
  border-radius: 999px !important;
  box-shadow: 
    0 5px 0 #064e3b,
    0 10px 20px rgba(16, 185, 129, 0.4),
    0 0 22px rgba(52, 211, 153, 0.35) !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-shadow: 0 1px 2px rgba(6, 78, 59, 0.7) !important;
  transition: all 0.12s ease-out;
  animation: startArcadePulse 2.4s ease-in-out infinite;
  white-space: nowrap;
  box-sizing: border-box;
}

@keyframes startArcadePulse {
  0%, 100% {
    box-shadow: 
      0 5px 0 #047857,
      0 10px 20px rgba(16, 185, 129, 0.4),
      0 0 18px rgba(52, 211, 153, 0.3);
    transform: translateY(0);
  }
  50% {
    box-shadow: 
      0 5px 0 #047857,
      0 12px 24px rgba(16, 185, 129, 0.55),
      0 0 30px rgba(52, 211, 153, 0.55);
    transform: translateY(-2px);
  }
}

.btn-start-arcade:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 7px 0 #047857,
    0 14px 26px rgba(16, 185, 129, 0.5),
    0 0 30px rgba(52, 211, 153, 0.5) !important;
  filter: brightness(1.06);
}

.btn-start-arcade:active {
  transform: translateY(3px) !important;
  border-bottom: 2px solid #047857 !important;
  box-shadow: 
    0 2px 0 #047857,
    0 6px 14px rgba(16, 185, 129, 0.3) !important;
}

/* 3D ARCADE MODE JELAJAH (EXPLORE LIVING DIORAMA) */
.btn-start-explore {
  position: relative;
  overflow: hidden;
  flex: 1 1 0;
  width: 100%;
  max-width: 360px;
  margin: 0;
  padding: 10px 14px !important;
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-size: 1.02rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase;
  color: #ffffff !important;
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 50%, #0369a1 100%) !important;
  border: 2px solid #7dd3fc !important;
  border-bottom: 5px solid #075985 !important;
  border-radius: 999px !important;
  box-shadow: 
    0 5px 0 #075985,
    0 10px 20px rgba(2, 132, 199, 0.4),
    0 0 22px rgba(56, 189, 248, 0.35) !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-shadow: 0 1px 2px rgba(7, 89, 133, 0.8) !important;
  transition: all 0.12s ease-out;
  animation: startExplorePulse 2.4s ease-in-out infinite;
  white-space: nowrap;
  box-sizing: border-box;
}

@keyframes startExplorePulse {
  0%, 100% {
    box-shadow: 
      0 6px 0 #075985,
      0 12px 24px rgba(2, 132, 199, 0.4),
      0 0 20px rgba(56, 189, 248, 0.3);
    transform: translateY(0);
  }
  50% {
    box-shadow: 
      0 6px 0 #075985,
      0 14px 28px rgba(2, 132, 199, 0.55),
      0 0 35px rgba(56, 189, 248, 0.55);
    transform: translateY(-2px);
  }
}

.btn-start-explore:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 8px 0 #075985,
    0 16px 30px rgba(2, 132, 199, 0.5),
    0 0 35px rgba(56, 189, 248, 0.5) !important;
  filter: brightness(1.06);
}

.btn-start-explore:active {
  transform: translateY(3px) !important;
  border-bottom: 2px solid #075985 !important;
  box-shadow: 
    0 2px 0 #075985,
    0 6px 14px rgba(2, 132, 199, 0.3) !important;
}

/* Light Sheen Sweep Across Start Button */
.btn-start-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-25deg);
  animation: btnShineSweep 3.5s infinite;
  pointer-events: none;
}

@keyframes btnShineSweep {
  0%, 60% { left: -100%; }
  100% { left: 200%; }
}

.start-hint-arcade {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #0f766e;
  margin-top: 0.35rem;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
  animation: hintBlink 2s ease-in-out infinite;
  user-select: none;
}

@keyframes hintBlink {
  0%, 100% { opacity: 0.95; }
  50% { opacity: 0.4; }
}

/* ================= TITLE EXTRA ACTIONS (ARCADE MINI BUTTONS) ================= */
.title-extra-actions {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  margin-top: 8px !important;
  width: 100% !important;
}

.btn-mini-title {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1.5px solid rgba(13, 148, 136, 0.3) !important;
  border-bottom: 3px solid #0d9488 !important;
  border-radius: 999px !important;
  color: #0f766e !important;
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  padding: 0.25rem 0.55rem !important;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.1) !important;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap !important;
  flex-shrink: 0;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
}

.btn-mini-title:hover {
  transform: translateY(-2px);
  background: #ffffff !important;
  border-color: #0d9488 !important;
  color: #064e3b !important;
  box-shadow: 0 4px 10px rgba(13, 148, 136, 0.2) !important;
}

.btn-mini-title:active {
  transform: translateY(2px) !important;
  border-bottom: 1.5px solid #0d9488 !important;
  box-shadow: 0 1px 0 rgba(13, 148, 136, 0.2) !important;
}

/* Tombol Traktir Kopi / Dukung Developer (Sociabuzz) */
.btn-mini-coffee {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
  border: 1.5px solid #f59e0b !important;
  border-bottom: 3px solid #b45309 !important;
  color: #92400e !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25) !important;
}

.btn-mini-coffee:hover {
  background: linear-gradient(135deg, #fef08a 0%, #fcd34d 100%) !important;
  border-color: #d97706 !important;
  color: #78350f !important;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35) !important;
  transform: translateY(-2px);
}

.btn-mini-coffee:active {
  transform: translateY(2px) !important;
  border-bottom: 1.5px solid #b45309 !important;
  box-shadow: 0 1px 0 rgba(180, 83, 9, 0.2) !important;
}

.title-footer {
  margin-top: 8px !important;
  font-size: 0.7rem !important;
  color: #475569 !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8) !important;
}

.hidden {
  display: none !important;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ========================================================
   MODUL 4: CHAOS METER HUD & ENERGY
   ======================================================== */
.hud-chaos {
  border-color: #f87171 !important;
}

.hud-chaos-bar {
  width: 90px;
  height: 8px;
  background: #334155;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 2px;
}

.hud-chaos-bar i {
  display: block;
  height: 100%;
  width: 10%;
  background: linear-gradient(90deg, #10b981, #f59e0b, #ef4444);
  border-radius: 999px;
  transition: width 0.3s ease, background 0.3s ease;
}

/* ========================================================
   MODUL 5: RESEP CITO DARURAT (IGD)
   ======================================================== */
#order-clipboard.cito {
  border: 2px solid #ef4444;
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.45), 0 8px 24px rgba(0, 0, 0, 0.25);
  animation: citoPulse 1.2s infinite alternate;
}

#order-clipboard.cito .clip-tag {
  background: #ef4444 !important;
  color: #ffffff !important;
  animation: citoBlink 0.6s infinite alternate;
}

@keyframes citoPulse {
  0% { transform: scale(1); box-shadow: 0 0 10px rgba(239, 68, 68, 0.3); }
  100% { transform: scale(1.02); box-shadow: 0 0 24px rgba(239, 68, 68, 0.7); }
}

@keyframes citoBlink {
  0% { opacity: 0.85; }
  100% { opacity: 1; filter: brightness(1.2); }
}

/* ========================================================
   MODUL 1: INTERKOM TELEPON DOKTER & BANGSAL
   ======================================================== */
.intercom-modal {
  display: flex !important;
  flex-direction: column !important;
  max-width: min(88vw, 490px) !important;
  width: 88% !important;
  max-height: min(84vh, 280px) !important;
  background: #ffffff !important;
  opacity: 1 !important;
  border-radius: 12px !important;
  border: 2px solid #0284c7 !important;
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.2), 0 3px 10px rgba(15, 23, 42, 0.08) !important;
  padding: 4px 8px 6px 8px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.intercom-header {
  background: transparent !important;
  color: #0f172a !important;
  padding: 0 0 3px 0 !important;
  border-bottom: 1px solid #e2e8f0 !important;
  border-radius: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
  min-height: 24px !important;
  flex-shrink: 0 !important;
}

.intercom-header h2 {
  font-size: 0.68rem !important;
  margin: 0 !important;
  font-weight: 800 !important;
  color: #0f172a !important;
}

.intercom-badge {
  display: inline-flex !important;
  align-items: center !important;
  background: #0284c7 !important;
  color: #ffffff !important;
  font-size: 0.50rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.2px !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  margin-bottom: 0 !important;
  flex-shrink: 0 !important;
}

.intercom-body {
  padding: 4px 0 0 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) !important;
  gap: 6px !important;
  align-items: stretch !important;
  overflow-y: auto !important;
  flex: 1 1 auto !important;
  box-sizing: border-box !important;
}

.intercom-caller-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 3px !important;
  background: #f0f9ff !important;
  border: 1px solid #bae6fd !important;
  border-radius: 6px !important;
  padding: 4px 6px !important;
  margin-bottom: 0 !important;
  box-sizing: border-box !important;
  height: 100% !important;
}

.intercom-avatar {
  font-size: 1.1rem !important;
  line-height: 1 !important;
}

.intercom-dialog {
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-size: 0.56rem !important;
  color: #0369a1 !important;
  line-height: 1.2 !important;
  font-style: italic !important;
}

.intercom-choices-panel {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  box-sizing: border-box !important;
  height: 100% !important;
}

.intercom-section-title {
  font-size: 0.52rem !important;
  font-weight: 800 !important;
  color: #64748b !important;
  margin-bottom: 1px !important;
  letter-spacing: 0.2px !important;
  text-transform: uppercase !important;
  line-height: 1.15 !important;
}

.intercom-choices {
  display: flex !important;
  flex-direction: column !important;
  gap: 2.5px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.intercom-choice-btn {
  background: #ffffff !important;
  border: 1.2px solid #0f172a !important;
  border-radius: 6px !important;
  padding: 2px 5px !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 0.55rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  text-align: left !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  transition: all 0.12s ease !important;
  box-shadow: 0 1.5px 0 #cbd5e1 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  min-height: 22px !important;
  line-height: 1.15 !important;
}

.intercom-choice-btn:hover {
  background: #f0fdfa !important;
  border-color: #0d9488 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 0 #cbd5e1 !important;
}

.intercom-choice-btn:active {
  transform: translateY(1px) !important;
  box-shadow: 0 0 0 transparent !important;
}

.intercom-choice-num {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 15px !important;
  height: 15px !important;
  background: #e0f2fe !important;
  color: #0284c7 !important;
  border-radius: 50% !important;
  font-size: 0.52rem !important;
  font-weight: 800 !important;
  flex-shrink: 0 !important;
}

.intercom-feedback {
  margin-top: 2px !important;
  padding: 2px 5px !important;
  border-radius: 4px !important;
  font-size: 0.50rem !important;
  line-height: 1.15 !important;
  font-weight: 600 !important;
  animation: fadeIn 0.25s ease !important;
}

.intercom-feedback.success {
  background: #ecfdf5 !important;
  border: 1.2px solid #a7f3d0 !important;
  color: #065f46 !important;
}

.intercom-feedback.fail {
  background: #fef2f2 !important;
  border: 1.2px solid #fecaca !important;
  color: #991b1b !important;
}

.intercom-footer {
  margin-top: 4px !important;
  padding: 3px 0 0 0 !important;
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  min-height: 24px !important;
  border-top: 1px solid #e2e8f0 !important;
  flex-shrink: 0 !important;
}

.btn-end-call {
  min-height: 22px !important;
  height: 24px !important;
  padding: 1px 10px !important;
  font-size: 0.60rem !important;
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border: 1.5px solid #f87171 !important;
  box-shadow: 0 2px 0 #ef4444 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  transition: all 0.12s ease !important;
  white-space: nowrap !important;
}

.btn-end-call:hover {
  background: #fee2e2 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 3px 0 #ef4444 !important;
}

.btn-end-call:active {
  transform: translateY(2px) !important;
  box-shadow: none !important;
}

/* ========================================================
   MODUL 2: KUIS EDUKASI PASIEN / PIO DI LOKET
   ======================================================== */
.pio-modal {
  max-width: min(96vw, 680px) !important;
  max-height: min(94vh, 380px) !important;
  background: #ffffff !important;
  border-radius: 12px !important;
  border: 2px solid #0f172a !important;
  border-top: 4px solid #8b5cf6 !important;
  box-shadow: 0 16px 40px rgba(139, 92, 246, 0.2) !important;
  overflow: hidden !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
}

.pio-header {
  padding: 4px 10px !important;
  min-height: 24px !important;
  background: #ffffff !important;
  border-bottom: 1.5px solid #e2e8f0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

.pio-header-left {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.pio-badge {
  display: inline-flex !important;
  align-items: center !important;
  background: #8b5cf6 !important;
  color: #ffffff !important;
  font-size: 0.62rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.3px !important;
  padding: 1px 6px !important;
  border-radius: 999px !important;
  margin: 0 !important;
  line-height: 1.3 !important;
}

.pio-title {
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  color: #1e1b4b !important;
  margin: 0 !important;
  line-height: 1.2 !important;
}

.pio-body {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) !important;
  gap: 8px !important;
  padding: 6px 8px !important;
  align-items: start !important;
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
}

.pio-col-patient {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

.pio-question-box {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: #f5f3ff !important;
  border: 1.5px solid #ddd6fe !important;
  border-radius: 8px !important;
  padding: 6px 8px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

.pio-asker-icon {
  font-size: 1.5rem !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
}

.pio-question-text {
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-size: 0.72rem !important;
  color: #5b21b6 !important;
  line-height: 1.25 !important;
  font-weight: 700 !important;
}

.pio-col-answers {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  width: 100% !important;
}

.pio-section-title {
  font-size: 0.60rem !important;
  font-weight: 800 !important;
  color: #64748b !important;
  margin: 0 0 2px 0 !important;
  letter-spacing: 0.3px !important;
}

.pio-choices {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  width: 100% !important;
}

.pio-choice-btn {
  background: #ffffff !important;
  border: 1.5px solid #0f172a !important;
  border-radius: 8px !important;
  padding: 4px 8px !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 0.66rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  text-align: left !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  transition: all 0.12s ease !important;
  box-shadow: 0 2px 0 #cbd5e1 !important;
  width: 100% !important;
  min-height: 28px !important;
  box-sizing: border-box !important;
  line-height: 1.2 !important;
}

.pio-choice-btn:hover {
  background: #f5f3ff !important;
  border-color: #8b5cf6 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 3px 0 #cbd5e1 !important;
}

.pio-choice-btn:active {
  transform: translateY(1px) !important;
  box-shadow: none !important;
}

.intercom-choice-num {
  font-size: 0.58rem !important;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  border-radius: 50% !important;
  background: #ede9fe !important;
  color: #6d28d9 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 800 !important;
  flex-shrink: 0 !important;
}

.pio-feedback {
  margin-top: 4px !important;
  padding: 4px 6px !important;
  border-radius: 6px !important;
  font-size: 0.62rem !important;
  line-height: 1.25 !important;
  font-weight: 600 !important;
  animation: fadeIn 0.2s ease !important;
  box-sizing: border-box !important;
}

.pio-feedback.correct {
  background: #ecfdf5 !important;
  border: 1.5px solid #a7f3d0 !important;
  color: #065f46 !important;
}

.pio-feedback.wrong {
  background: #fffbeb !important;
  border: 1.5px solid #fde68a !important;
  color: #92400e !important;
}

.pio-footer {
  padding: 2px 8px !important;
  min-height: 22px !important;
  background: #f8fafc !important;
  border-top: 1px solid #e2e8f0 !important;
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

.pio-footer button {
  padding: 1px 8px !important;
  font-size: 0.62rem !important;
  height: 20px !important;
  min-height: 20px !important;
}

/* ========================================================
   MODUL 6: SISTEM LENCANA PRESTASI (ACHIEVEMENT BADGES)
   ======================================================== */
.badges-modal {
  max-width: 980px !important;
  width: 95% !important;
  max-height: 92vh !important;
  padding: 1.25rem 1.6rem 1.15rem !important;
  background: #ffffff !important;
  border: 2.5px solid #fde68a !important;
  border-top: 6px solid #f59e0b !important;
  border-radius: 20px !important;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.24), 0 0 0 1px rgba(245, 158, 11, 0.15) !important;
  box-sizing: border-box;
}

.badges-modal .modal-header {
  margin-bottom: 0.2rem;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.badges-header-left {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex: 1 !important;
}

.badges-header-icon {
  font-size: 1.6rem;
  margin: 0;
  line-height: 1;
}

.badges-modal .modal-header h2 {
  font-family: 'Fredoka', cursive, sans-serif;
  color: #0f766e;
  font-size: 1.35rem;
  letter-spacing: 0.5px;
  margin: 0;
}

.badges-modal .modal-subtitle {
  display: none !important;
}

.badges-modal .modal-footer {
  display: none !important;
}

.badges-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 0.75rem !important;
  max-height: min(420px, 60vh) !important;
  overflow-y: auto !important;
  padding-right: 0.45rem;
  padding-top: 0.2rem;
  padding-bottom: 0.35rem;
  margin-top: 0.75rem;
  scrollbar-width: thin;
  scrollbar-color: #f59e0b #fef3c7;
}

/* Elegant Amber Scrollbar for Badges */
.badges-grid::-webkit-scrollbar {
  width: 6px;
}
.badges-grid::-webkit-scrollbar-track {
  background: #fef3c7;
  border-radius: 999px;
}
.badges-grid::-webkit-scrollbar-thumb {
  background: #f59e0b;
  border-radius: 999px;
}
.badges-grid::-webkit-scrollbar-thumb:hover {
  background: #d97706;
}

.badge-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 14px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  box-sizing: border-box;
}

.badge-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.badge-card.unlocked {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-color: #f59e0b;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.16);
}

.badge-icon {
  font-size: 1.85rem;
  line-height: 1;
  filter: grayscale(100%);
  opacity: 0.45;
  flex-shrink: 0;
}

.badge-card.unlocked .badge-icon {
  filter: grayscale(0%);
  opacity: 1;
  animation: bounce 2s infinite ease-in-out;
}

.badge-info {
  flex: 1;
  min-width: 0;
}

.badge-name {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.25;
}

.badge-card.unlocked .badge-name {
  color: #b45309;
}

.badge-desc {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.32;
  margin-top: 0.18rem;
}

.badge-prog {
  font-size: 0.68rem;
  font-weight: 700;
  color: #94a3b8;
  margin-top: 0.3rem;
}

.badge-prog-bar {
  width: 100%;
  height: 5px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.2rem;
}

.badge-prog-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  border-radius: 999px;
}

@media (max-width: 860px) {
  .badges-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 540px) {
  .badges-modal {
    padding: 1.1rem 1rem !important;
  }
  .badges-grid {
    grid-template-columns: 1fr !important;
    gap: 0.6rem !important;
  }
}

/* ================= HUD ACTION BADGE ================= */
.hud-action-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: #ef4444;
  color: #ffffff;
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #ffffff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.25);
}

/* ================= WIDGET TUGAS SAAT INI (KERTAS MEMO DI BAWAH LEVEL) ================= */
#taskMini {
  position: relative !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  gap: 7px !important;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfc 85%, #f2f7f5 100%) !important;
  padding: 8px 22px 8px 10px !important;
  border-radius: 8px !important;
  border: 1.5px solid #cbd5e1 !important;
  border-left: 4.5px solid #0d9488 !important;
  border-bottom: 2.5px solid #94a3b8 !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12), 0 1px 3px rgba(0, 0, 0, 0.06) !important;
  z-index: 24 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  transition: transform 0.18s cubic-bezier(0.18, 0.89, 0.32, 1.28), box-shadow 0.18s ease !important;
  width: 185px !important;
  min-width: 175px !important;
  max-width: 205px !important;
  height: auto !important;
  min-height: auto !important;
  max-height: none !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

#taskMini::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 18px;
  width: 30px;
  height: 6px;
  background: rgba(13, 148, 136, 0.35);
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

#taskMini.hidden-by-user {
  display: none !important;
}

#taskMini:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(13, 148, 136, 0.22), 0 2px 4px rgba(0, 0, 0, 0.08) !important;
  background: #ffffff !important;
}

#taskMini:active {
  transform: translateY(1px);
}

.task-icon-wrap {
  width: 26px !important;
  height: 26px !important;
  border-radius: 7px !important;
  background: #ccfbf1 !important;
  border: 1.5px solid #99f6e4 !important;
  color: #0f766e !important;
  font-size: 0.95rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  margin-top: 1px !important;
}

.task-body {
  flex: 1 !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 1px !important;
}

.task-header {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  margin-bottom: 1px !important;
}

.task-badge {
  display: inline-block !important;
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-size: 0.56rem !important;
  font-weight: 800 !important;
  color: #0f766e !important;
  letter-spacing: 0.4px !important;
  text-transform: uppercase !important;
  line-height: 1 !important;
}

.task-depo-tag {
  display: none !important;
}

.task-title {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  line-height: 1.25 !important;
  margin: 0 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: break-word !important;
}

.task-sub {
  display: block !important;
  font-size: 0.64rem !important;
  font-weight: 600 !important;
  color: #0d9488 !important;
  margin: 2px 0 0 0 !important;
  line-height: 1.2 !important;
  white-space: normal !important;
}

.task-action-hint {
  display: none !important;
}

.task-tap-label {
  display: none !important;
}

.btn-dismiss-task {
  position: absolute !important;
  top: 5px !important;
  right: 5px !important;
  width: 16px !important;
  height: 16px !important;
  border-radius: 50% !important;
  border: none !important;
  background: #f1f5f9 !important;
  color: #64748b !important;
  font-size: 0.58rem !important;
  font-weight: bold !important;
  cursor: pointer !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  transition: background 0.15s, color 0.15s !important;
}

.btn-dismiss-task:hover {
  background: #fee2e2 !important;
  color: #ef4444 !important;
}

/* Urgent Mode (CITO / Telepon Berdering) */
#taskMini.urgent {
  border-left-color: #ef4444 !important;
  background: linear-gradient(180deg, #ffffff 0%, #fff5f5 100%) !important;
  animation: pulseUrgent 1.2s infinite !important;
}

#taskMini.urgent .task-icon-wrap {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

#taskMini.urgent .task-badge {
  color: #ef4444;
}

@keyframes pulseUrgent {
  0%, 100% {
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.25), 0 0 0 1px #ef4444;
  }
  50% {
    box-shadow: 0 12px 32px rgba(239, 68, 68, 0.45), 0 0 0 3px #ef4444;
  }
}

/* ================= MODAL JOBS / ANTREAN OVERVIEW ================= */
.jobs-modal {
  max-width: min(94vw, 680px) !important;
  width: 94% !important;
  max-height: 88vh !important;
  border-radius: 16px !important;
  border-top: 4px solid var(--teal-primary, #0d9488) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35) !important;
  overflow: hidden !important;
  padding: 0 !important;
}

.jobs-header {
  padding: 10px 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  background: #ffffff !important;
  border-bottom: 1.5px solid #e2e8f0 !important;
  box-sizing: border-box !important;
}

.jobs-header-left {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  text-align: left !important;
  min-width: 0 !important;
}

.jobs-header-icon {
  width: 36px !important;
  height: 36px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 10px !important;
  background: #ccfbf1 !important;
  border: 1.5px solid #0d9488 !important;
  font-size: 1.35rem !important;
  line-height: 1 !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
}

.jobs-header-title-wrap {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
}

.jobs-header-title-wrap h2 {
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-size: 1.08rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin: 0 !important;
  letter-spacing: 0.3px !important;
  line-height: 1.2 !important;
}

.jobs-header-title-wrap .modal-subtitle {
  font-size: 0.7rem !important;
  color: #64748b !important;
  margin-top: 2px !important;
}

.jobs-header .btn-close-modal {
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  background: #f1f5f9 !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #475569 !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  display: grid !important;
  place-items: center !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}

.jobs-header .btn-close-modal:hover {
  background: #fee2e2 !important;
  border-color: #ef4444 !important;
  color: #dc2626 !important;
  transform: scale(1.06);
}

.jobs-body {
  margin-top: 0 !important;
  padding: 8px 12px !important;
  max-height: min(72vh, 460px) !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
}

.jobs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  min-width: 500px;
}

.jobs-table th {
  text-align: left;
  padding: 6px 8px !important;
  background: #f8fafc !important;
  color: #475569 !important;
  font-weight: 700 !important;
  border-bottom: 2px solid #cbd5e1 !important;
  white-space: nowrap !important;
  font-size: 0.72rem !important;
  letter-spacing: 0.2px;
}

.jobs-table td {
  padding: 6px 8px !important;
  border-bottom: 1px solid #e2e8f0 !important;
  vertical-align: middle !important;
  font-size: 0.75rem !important;
}

.jobs-stage-pill {
  font-size: 0.65rem !important;
  font-weight: 700 !important;
  padding: 2px 7px !important;
  border-radius: 999px !important;
  display: inline-block !important;
  white-space: nowrap !important;
}

.stage-waiting { background: #fef3c7; color: #92400e; }
.stage-review { background: #e0f2fe; color: #075985; }
.stage-prep { background: #f3e8ff; color: #6b21a8; }
.stage-ready { background: #dcfce7; color: #166534; font-weight: 800; }

.jobs-patience-bar {
  width: 56px !important;
  height: 5px !important;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 3px !important;
}

.jobs-patience-bar i {
  display: block;
  height: 100%;
  background: #10b981;
  border-radius: 999px;
}

.btn-job-pick {
  transition: all 0.15s ease-in-out;
  padding: 4px 8px !important;
  font-size: 0.72rem !important;
  border-radius: 6px !important;
  min-height: 28px !important;
  white-space: nowrap !important;
}

.btn-job-pick:hover {
  background: #0d9488 !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(15, 118, 110, 0.35);
}

.btn-job-pick:active {
  transform: translateY(0);
}

/* ================= MODAL RAK OBAT VISUAL & LASA ================= */
.shelf-modal {
  max-width: min(94vw, 760px) !important;
  width: 95% !important;
  max-height: min(92vh, 340px) !important;
  padding: 0 !important;
  background: var(--card-cream, #fffdf9) !important;
  border: 2px solid #0f172a !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 0 rgba(15, 23, 42, 0.22), 0 20px 40px rgba(0, 0, 0, 0.35) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.shelf-modal-header {
  flex-shrink: 0 !important;
  background: linear-gradient(180deg, #f0fdfa 0%, #e6f7f4 100%) !important;
  border-bottom: 1.5px solid #cbd5e1 !important;
  padding: 2px 8px !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  box-sizing: border-box !important;
  min-height: 24px !important;
}

.shelf-modal-header .modal-header-icon-box {
  width: 20px !important;
  height: 20px !important;
  font-size: 0.82rem !important;
  border-radius: 5px !important;
  background: #ccfbf1 !important;
  border: 1px solid #0d9488 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.shelf-modal-header h2 {
  font-size: 0.68rem !important;
  margin: 0 !important;
  line-height: 1.15 !important;
  color: #0f172a !important;
  font-family: 'Fredoka', sans-serif !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.shelf-modal-header .modal-subtitle {
  display: none !important;
}

.shelf-badge {
  display: none !important;
}

.shelf-body {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  align-items: stretch !important;
  padding: 3px 6px !important;
  overflow-y: auto !important;
}

.shelf-rx-summary {
  background: #f8fafc !important;
  border-bottom: 1.5px solid #cbd5e1 !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  border-radius: 0 !important;
  padding: 2px 8px !important;
  margin: 0 !important;
  width: 100% !important;
  min-height: 28px !important;
  height: 28px !important;
  max-height: 28px !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  box-sizing: border-box !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  z-index: 5 !important;
}

.shelf-rx-summary::-webkit-scrollbar {
  display: none !important;
  height: 0 !important;
  width: 0 !important;
}

.shelf-grid-title {
  display: none !important;
}

.shelf-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 5px !important;
  max-height: none !important;
  overflow: visible !important;
  padding-right: 0 !important;
  margin-bottom: 0 !important;
  width: 100% !important;
}

.shelf-item-card {
  background: #ffffff;
  border: 1.5px solid #0f172a;
  border-top: 2.5px solid #0d9488;
  border-radius: 8px;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: all 0.12s ease;
  box-shadow: 0 1px 0 #cbd5e1;
  min-height: 52px;
}

.shelf-item-card * {
  pointer-events: none;
}

.shelf-item-card .btn-shelf-batch {
  pointer-events: auto !important;
}

.shelf-item-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 0 #cbd5e1;
}

.shelf-item-card:active {
  transform: translateY(1px);
  box-shadow: none;
}

.shelf-item-card[data-dosage-form="syrup"],
.shelf-item-card.form-syrup {
  border-top-color: #ea580c !important;
}
.shelf-item-card[data-dosage-form="ampul"],
.shelf-item-card.form-ampul,
.shelf-item-card[data-dosage-form="vial"],
.shelf-item-card.form-vial {
  border-top-color: #9333ea !important;
}
.shelf-item-card[data-dosage-form="infus"],
.shelf-item-card.form-infus {
  border-top-color: #0284c7 !important;
}
.shelf-item-card[data-dosage-form="ointment"],
.shelf-item-card.form-ointment {
  border-top-color: #f59e0b !important;
}
.shelf-item-card.is-lasa-trap {
  border-top-color: #ef4444 !important;
}

.shelf-item-card.lasa-wrong {
  animation: shakeLasa 0.4s ease;
  border-color: #ef4444;
  background: #fef2f2;
}

.shelf-item-card.already-picked {
  opacity: 0.5;
  pointer-events: none;
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.shelf-item-card.selected-for-tray {
  border-color: #10b981 !important;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%) !important;
  box-shadow: 0 0 0 1.5px #10b981, 0 3px 8px rgba(16, 185, 129, 0.2) !important;
  transform: translateY(-1px);
  position: relative;
}

.shelf-item-card.selected-for-tray::after {
  content: "🧺 MASUK BAKI ✔";
  position: absolute;
  top: 1px;
  right: 3px;
  background: #10b981;
  color: #ffffff;
  font-size: 0.44rem;
  font-weight: 800;
  padding: 0 3px;
  border-radius: 999px;
  letter-spacing: 0.2px;
  box-shadow: 0 1px 2px rgba(16, 185, 129, 0.35);
}

.shelf-footer-actions {
  flex-shrink: 0 !important;
  position: static !important;
  margin-top: auto !important;
  background: #ffffff !important;
  border-top: 1.5px solid #cbd5e1 !important;
  padding: 2px 8px !important;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
  box-sizing: border-box !important;
  min-height: 22px !important;
}

.shelf-tray-summary {
  font-size: 0.58rem !important;
  font-weight: 600;
  color: #047857;
  display: flex;
  align-items: center;
  gap: 3px;
  min-height: 0 !important;
}

.shelf-tray-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  padding: 1px 5px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.54rem !important;
}

.shelf-footer-btns {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.shelf-item-icon {
  font-size: 0.82rem !important;
  flex-shrink: 0;
}

.shelf-item-name {
  font-weight: 700;
  font-size: 0.62rem !important;
  color: var(--ink-main);
  line-height: 1.15;
}

.shelf-item-sub {
  display: none !important;
}

.fefo-batch-row {
  margin-top: 3px !important;
  display: flex !important;
  gap: 3px 5px !important;
  flex-wrap: wrap !important;
  align-items: center !important;
}

.fefo-batch-row span,
.fefo-batch-row .fefo-label,
.fefo-batch-row .fefo-batch-title {
  font-size: 0.52rem !important;
  font-weight: 800 !important;
  color: #0f766e !important;
  letter-spacing: 0.2px;
}

.btn-shelf-batch {
  font-size: 0.52rem !important;
  font-weight: 700 !important;
  min-height: 22px !important;
  padding: 2.5px 6px !important;
  border-radius: 4px !important;
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  color: #1e293b !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  transition: all 0.12s ease !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  touch-action: manipulation !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.btn-shelf-batch:hover {
  background: #f0fdfa !important;
  border-color: #0d9488 !important;
  color: #0f766e !important;
  transform: translateY(-1px);
}

.btn-shelf-batch:active {
  transform: scale(0.96) !important;
  background: #e0f2fe !important;
}

.btn-shelf-batch.batch-correct {
  background: #dcfce7 !important;
  border-color: #16a34a !important;
  color: #15803d !important;
  font-weight: 800 !important;
  box-shadow: 0 1px 3px rgba(22, 163, 74, 0.3) !important;
}

.btn-shelf-batch.batch-wrong {
  background: #fef2f2 !important;
  border-color: #ef4444 !important;
  color: #dc2626 !important;
  animation: shakeX 0.3s ease;
}

@keyframes fefoPulseHighlight {
  0% { transform: scale(1); box-shadow: 0 0 0 transparent; }
  50% { transform: scale(1.08); box-shadow: 0 0 8px #f59e0b; border-color: #f59e0b; }
  100% { transform: scale(1); box-shadow: 0 0 0 transparent; }
}

.fefo-pulse .btn-shelf-batch {
  animation: fefoPulseHighlight 0.4s ease 2;
}

.shelf-lasa-alert {
  background: #fef2f2;
  border: 1.5px solid #f87171;
  color: #991b1b;
  padding: 0.5rem 0.75rem;
  border-radius: var(--border-radius-md);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 0.4rem;
}

@keyframes shakeLasa {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

/* Bentuk Sediaan Visual 1: Tablet Standar Bulat Bergaris Bagi (Score Line) */
.tablet-visual-icon {
  display: inline-block;
  width: 26px;
  height: 26px;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #f1f5f9 65%, #cbd5e1 100%);
  border: 2px solid #0284c7;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.2), inset 0 -2px 3px rgba(148, 163, 184, 0.3);
  position: relative;
  vertical-align: middle;
}
.tablet-visual-icon::after {
  content: '';
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 50%;
  width: 1.5px;
  transform: translateX(-50%);
  background: #0284c7;
  border-radius: 1px;
}

/* Bentuk Sediaan Visual 2: Tablet Kunyah Bulat Mint (Antasida DOEN) */
.chewable-visual-icon {
  display: inline-block;
  width: 26px;
  height: 26px;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #dcfce7 65%, #86efac 100%);
  border: 2px solid #16a34a;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(22, 163, 74, 0.25), inset 0 -2px 3px rgba(21, 128, 61, 0.2);
  position: relative;
  vertical-align: middle;
}
.chewable-visual-icon::after {
  content: '';
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 50%;
  width: 1.5px;
  transform: translateX(-50%);
  background: rgba(22, 163, 74, 0.5);
  border-radius: 1px;
}

/* Bentuk Sediaan Visual 3: Kapsul Gelatin 3D Dua Warna */
.capsule-visual-icon {
  display: inline-flex;
  width: 26px;
  height: 14px;
  border-radius: 7px;
  border: 1.5px solid #b45309;
  box-shadow: 0 2px 4px rgba(180, 83, 9, 0.25);
  overflow: hidden;
  vertical-align: middle;
  transform: rotate(-30deg);
}
.capsule-visual-icon .cap-half {
  width: 50%;
  height: 100%;
  background: linear-gradient(180deg, #f87171 0%, #dc2626 100%);
}
.capsule-visual-icon .body-half {
  width: 50%;
  height: 100%;
  background: linear-gradient(180deg, #fef08a 0%, #facc15 100%);
}

/* Bentuk Sediaan Visual 4: Ampul Kaca Steril */
.ampul-visual-icon {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  width: 22px;
  height: 32px;
  position: relative;
  vertical-align: middle;
}
.ampul-visual-icon .ampul-tip {
  width: 6px;
  height: 8px;
  background: rgba(224, 242, 254, 0.95);
  border: 1.2px solid #0284c7;
  border-bottom: none;
  border-radius: 50% 50% 0 0;
}
.ampul-visual-icon .ampul-neck {
  width: 8px;
  height: 3px;
  background: #ef4444; /* ceramic snap ring */
  border-radius: 1px;
  box-shadow: 0 0 3px rgba(239, 68, 68, 0.6);
  z-index: 1;
}
.ampul-visual-icon .ampul-body {
  width: 13px;
  height: 19px;
  background: linear-gradient(180deg, rgba(240, 249, 255, 0.8) 0%, rgba(56, 189, 248, 0.75) 50%, #0284c7 100%);
  border: 1.2px solid #0284c7;
  border-radius: 3px 3px 4px 4px;
  position: relative;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.25);
}
.ampul-visual-icon .ampul-body::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 1px;
  right: 1px;
  height: 6px;
  background: #ffffff;
  border-radius: 1px;
}

/* Bentuk Sediaan Visual 5: Vial Injeksi Kaca Tutup Karet/Aluminium */
.vial-visual-icon {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  width: 22px;
  height: 32px;
  position: relative;
  vertical-align: middle;
}
.vial-visual-icon .vial-stopper {
  width: 14px;
  height: 4px;
  background: #ef4444; /* Tutup karet stopper merah */
  border: 0.8px solid #b91c1c;
  border-radius: 2px 2px 0 0;
  box-shadow: 0 1px 2px rgba(239, 68, 68, 0.4);
}
.vial-visual-icon .vial-crimp {
  width: 10px;
  height: 3px;
  background: #cbd5e1; /* Segel crimp aluminium */
  border: 0.5px solid #94a3b8;
}
.vial-visual-icon .vial-body {
  width: 18px;
  height: 22px;
  background: linear-gradient(180deg, rgba(224, 242, 254, 0.85) 0%, rgba(56, 189, 248, 0.5) 60%, rgba(2, 132, 199, 0.75) 100%);
  border: 1.4px solid #0284c7;
  border-radius: 2px 2px 4px 4px;
  position: relative;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.25);
}
.vial-visual-icon .vial-label {
  position: absolute;
  top: 4px;
  left: 1.5px;
  right: 1.5px;
  height: 9px;
  background: #ffffff;
  border: 0.5px solid #cbd5e1;
  border-radius: 1px;
}

/* Bentuk Sediaan Visual 6: Tube Salep Topikal */
.ointment-visual-icon {
  display: inline-flex;
  align-items: center;
  width: 32px;
  height: 18px;
  position: relative;
  vertical-align: middle;
}
.ointment-visual-icon .tube-nozzle {
  width: 3px;
  height: 4px;
  background: #0284c7;
  border-radius: 1px 0 0 1px;
}
.ointment-visual-icon .tube-cap {
  width: 6px;
  height: 10px;
  background: #ffffff;
  border: 1.2px solid #0284c7;
  border-radius: 2px 0 0 2px;
}
.ointment-visual-icon .tube-body {
  width: 18px;
  height: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  border: 1.2px solid #0284c7;
  border-left: none;
  border-radius: 0 2px 2px 0;
  position: relative;
  overflow: hidden;
}
.ointment-visual-icon .tube-strip {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: 4px;
  background: #ec4899;
  border-radius: 1px;
}
.ointment-visual-icon .tube-crimp {
  width: 3px;
  height: 14px;
  background: #94a3b8;
  border-radius: 0 2px 2px 0;
}

/* Bentuk Sediaan Visual 7: Kantong / Kolf Infus IV 500ml */
.infus-visual-icon {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  width: 22px;
  height: 32px;
  position: relative;
  vertical-align: middle;
}
.infus-visual-icon .infus-loop {
  width: 6px;
  height: 4px;
  border: 1.2px solid #0284c7;
  border-radius: 50%;
  background: transparent;
}
.infus-visual-icon .infus-body {
  width: 18px;
  height: 22px;
  background: linear-gradient(180deg, rgba(240, 249, 255, 0.9) 0%, rgba(56, 189, 248, 0.5) 100%);
  border: 1.4px solid #0284c7;
  border-radius: 3px 3px 5px 5px;
  position: relative;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.2);
}
.infus-visual-icon .infus-lines {
  position: absolute;
  left: 2px;
  top: 4px;
  width: 4px;
  height: 12px;
  border-left: 1.5px solid #0284c7;
}
.infus-visual-icon .infus-port {
  width: 6px;
  height: 4px;
  background: #ef4444;
  border: 1px solid #0284c7;
  border-radius: 1px;
}

/* Bentuk Sediaan Visual 8: Sachet Serbuk Larutan (Oralit) */
.sachet-visual-icon {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
  border: 1.4px solid #0284c7;
  border-radius: 3px;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.2);
  position: relative;
  vertical-align: middle;
}
.sachet-visual-icon .sachet-label {
  font-size: 6px;
  font-weight: 900;
  color: #0369a1;
  letter-spacing: -0.3px;
}

/* Bentuk Sediaan Visual 9: Botol Sirup */
.syrup-visual-icon {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  width: 20px;
  height: 30px;
  position: relative;
  vertical-align: middle;
}
.syrup-visual-icon .syrup-cap {
  width: 8px;
  height: 5px;
  background: #ffffff;
  border: 1.2px solid #64748b;
  border-radius: 2px 2px 0 0;
}
.syrup-visual-icon .syrup-body {
  width: 16px;
  height: 22px;
  background: linear-gradient(180deg, rgba(254, 243, 199, 0.8) 0%, rgba(217, 119, 6, 0.6) 100%);
  border: 1.4px solid #b45309;
  border-radius: 3px;
  position: relative;
}
.syrup-visual-icon .syrup-label {
  position: absolute;
  top: 5px;
  left: 1px;
  right: 1px;
  height: 9px;
  background: #ffffff;
  border-radius: 1px;
}

/* Mini visual icon wrapper for unified medicine icons */
.med-icon-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  vertical-align: middle;
  flex-shrink: 0;
  position: relative;
  overflow: visible;
}
.med-icon-mini > span {
  transform: scale(0.62) !important;
  transform-origin: center center !important;
  margin: 0 !important;
}

/* Badge Edukasi Bentuk Sediaan Obat (Permenkes 72/2016) */
.shelf-dosage-badge {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  white-space: nowrap;
}
.shelf-dosage-badge.badge-chewable {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}
.shelf-dosage-badge.badge-capsule {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}
.shelf-dosage-badge.badge-tablet {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}
.shelf-dosage-badge.badge-ampul {
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}
.shelf-dosage-badge.badge-vial {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}
.shelf-dosage-badge.badge-infus {
  background: #e0f2fe;
  color: #0284c7;
  border: 1px solid #7dd3fc;
}
.shelf-dosage-badge.badge-syrup {
  background: #ccfbf1;
  color: #0f766e;
  border: 1px solid #99f6e4;
}
.shelf-dosage-badge.badge-ointment {
  background: #fef9c3;
  color: #a16207;
  border: 1px solid #fef08a;
}
.shelf-dosage-badge.badge-pen {
  background: #e0e7ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
}
.shelf-dosage-badge.badge-powder {
  background: #fae8ff;
  color: #86198f;
  border: 1px solid #f5d0fe;
}
.shelf-dosage-badge.badge-sachet {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* ================= MODAL TRIAGE RESEP MASUK & PRIORITAS CITO ================= */
.triage-modal {
  max-width: min(96vw, 680px) !important;
  width: 96% !important;
  max-height: min(92vh, 380px) !important;
  border-radius: 10px !important;
  border-top: 3px solid var(--teal-primary, #0d9488) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35) !important;
  overflow: hidden !important;
  padding: 0 !important;
}

.triage-modal .modal-header {
  padding: 4px 10px !important;
  background: #ffffff !important;
  border-bottom: 1.5px solid #e2e8f0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
  box-sizing: border-box !important;
}

.triage-badge {
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-size: 0.56rem !important;
  font-weight: 800 !important;
  color: #0f766e !important;
  background: #f0fdfa !important;
  border: 1px solid #99f6e4 !important;
  padding: 1px 5px !important;
  border-radius: 4px !important;
  display: inline-block !important;
  margin-bottom: 1px !important;
  letter-spacing: 0.2px;
}

.triage-modal .modal-header h2 {
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin: 0 !important;
  line-height: 1.15 !important;
}

.triage-modal .modal-subtitle {
  display: none !important;
}

.triage-modal .btn-close-modal {
  width: 22px !important;
  height: 22px !important;
  border-radius: 50% !important;
  background: #f1f5f9 !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #475569 !important;
  font-size: 0.70rem !important;
  font-weight: 700 !important;
  display: grid !important;
  place-items: center !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}

.triage-modal .btn-close-modal:hover {
  background: #fee2e2 !important;
  border-color: #ef4444 !important;
  color: #dc2626 !important;
  transform: scale(1.06);
}

.triage-body {
  padding: 3px 8px 4px !important;
  max-height: calc(92vh - 38px) !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
}

.triage-stats-row {
  display: flex !important;
  gap: 4px !important;
  margin-bottom: 3px !important;
}

.triage-stat-chip {
  padding: 1px 6px !important;
  border-radius: 999px !important;
  font-size: 0.60rem !important;
  font-weight: 700 !important;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.triage-stat-chip.chip-cito {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fca5a5;
  animation: pulseCitoChip 2s infinite;
}

@keyframes pulseCitoChip {
  0%, 100% { box-shadow: 0 0 0 rgba(239, 68, 68, 0); }
  50% { box-shadow: 0 0 8px rgba(239, 68, 68, 0.45); }
}

/* 1 Baris / Lajur Vertikal Tanpa Restrukturisasi Layout */
.triage-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  padding-right: 2px;
}

.triage-card {
  background: #ffffff;
  border: 1.5px solid #0f172a;
  border-radius: 6px !important;
  padding: 2.5px 7px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
  transition: all 0.12s ease;
  box-shadow: 0 2px 0 #cbd5e1;
  cursor: pointer;
  margin-bottom: 0 !important;
  box-sizing: border-box !important;
}

.triage-card:hover {
  transform: translateY(-1px);
  border-color: #0d9488;
  box-shadow: 0 3px 0 #cbd5e1;
}

.triage-card:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 #cbd5e1;
}

.triage-card.is-cito {
  border: 1.5px solid #ef4444 !important;
  background: linear-gradient(135deg, #fff5f5, #ffffff) !important;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.22) !important;
  animation: citoCardGlow 1.8s infinite;
}

@keyframes citoCardGlow {
  0%, 100% { border-color: #ef4444; box-shadow: 0 0 8px rgba(239, 68, 68, 0.22); }
  50% { border-color: #dc2626; box-shadow: 0 0 14px rgba(239, 68, 68, 0.45); }
}

.triage-info {
  display: flex !important;
  flex-direction: column !important;
  gap: 1px !important;
  min-width: 0 !important;
  flex: 1 !important;
}

.triage-topline {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 4px !important;
  flex-wrap: wrap !important;
  line-height: 1.2 !important;
}

.triage-ticket {
  font-family: 'Silkscreen', monospace;
  font-size: 0.62rem !important;
  font-weight: 700;
  color: #0f172a;
  background: #f1f5f9;
  padding: 1px 4px !important;
  border-radius: 3px !important;
  border: 1px solid #cbd5e1;
  flex-shrink: 0 !important;
}

.triage-type-pill {
  font-size: 0.55rem !important;
  padding: 1px 4px !important;
  border-radius: 99px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  color: #ffffff;
  flex-shrink: 0 !important;
}

.triage-type-pill.type-rj {
  background: #0f766e;
}

.triage-type-pill.type-ri {
  background: #0284c7;
}

.triage-cito-pill {
  background: #ef4444;
  color: #ffffff;
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.55rem !important;
  font-weight: 700;
  padding: 1px 5px !important;
  border-radius: 999px !important;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0 !important;
}

.triage-patient {
  font-weight: 700;
  font-size: 0.68rem !important;
  color: #1e293b;
  line-height: 1.2 !important;
  white-space: normal !important;
  word-break: break-word !important;
}

.triage-clinic {
  font-weight: 500;
  font-size: 0.60rem !important;
  color: #64748b !important;
  white-space: normal !important;
}

.triage-subline {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  flex-wrap: wrap !important;
  margin-top: 1px !important;
  line-height: 1.15 !important;
}

.triage-desc {
  font-size: 0.58rem !important;
  color: #64748b;
  line-height: 1.15 !important;
  white-space: normal !important;
}

.triage-drugs {
  display: inline-flex !important;
  gap: 2px !important;
  flex-wrap: wrap !important;
}

.triage-drug-tag {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #0369a1;
  font-size: 0.54rem !important;
  font-weight: 600;
  padding: 0 3px !important;
  border-radius: 3px !important;
  line-height: 1.25 !important;
  flex-shrink: 0 !important;
}

.triage-actions {
  display: flex !important;
  align-items: center !important;
  flex-shrink: 0 !important;
}

.triage-btn-pick {
  padding: 2px 7px !important;
  border-radius: 5px !important;
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.62rem !important;
  font-weight: 700;
  border: none;
  cursor: pointer;
  background: var(--teal-primary, #0d9488);
  color: #ffffff;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 168, 150, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap !important;
  min-height: 22px !important;
  flex-shrink: 0 !important;
}

.triage-btn-pick:hover {
  transform: translateY(-1px);
  background: var(--teal-dark, #0f766e);
}

.triage-btn-pick.btn-cito {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  box-shadow: 0 1.5px 5px rgba(239, 68, 68, 0.35) !important;
}

.triage-btn-pick.btn-cito:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
  transform: translateY(-1px) scale(1.02);
}

.triage-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: #64748b;
}

.triage-empty-icon {
  font-size: 2.8rem;
  display: block;
  margin-bottom: 0.5rem;
}

.triage-empty p {
  font-size: 0.88rem;
}

/* ================= MODAL REKONSTITUSI IV STERIL ================= */
.sterile-modal {
  max-width: min(88vw, 470px) !important;
  width: 90% !important;
  max-height: min(85vh, 290px) !important;
  padding: 4px 8px 6px 8px !important;
  border: 2px solid #0284c7 !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 0 rgba(2, 132, 199, 0.22), 0 20px 40px rgba(0, 0, 0, 0.35) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.sterile-modal .modal-header {
  flex-shrink: 0 !important;
  padding: 2px 6px !important;
  margin: 0 0 2px 0 !important;
  border-bottom: 1px solid #bae6fd !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
}

.sterile-badge {
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-size: 0.50rem !important;
  font-weight: 800 !important;
  color: #0284c7 !important;
  background: #e0f2fe !important;
  padding: 1px 6px !important;
  border-radius: 999px !important;
  display: inline-block !important;
  margin-bottom: 1px !important;
  letter-spacing: 0.03em !important;
  line-height: 1.2 !important;
}

.sterile-modal .modal-header h2 {
  font-family: 'Fredoka', sans-serif !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin: 0 !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
}

.sterile-modal .modal-subtitle {
  font-size: 0.50rem !important;
  color: #64748b !important;
  margin-top: 1px !important;
  line-height: 1.1 !important;
}

.sterile-arena {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 3px !important;
  margin: 2px 0 !important;
  padding: 0 !important;
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.sterile-hood {
  width: 100% !important;
  height: 80px !important;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%) !important;
  border-radius: 8px !important;
  position: relative !important;
  overflow: hidden !important;
  border: 1.5px solid #38bdf8 !important;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.2) inset !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.sterile-hood-light {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px !important;
  background: #38bdf8;
  box-shadow: 0 0 12px #38bdf8;
}

.sterile-work-tray {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 1.5rem !important;
  z-index: 2 !important;
}

.sterile-vial {
  width: 32px !important;
  height: 52px !important;
  background: rgba(255, 255, 255, 0.15) !important;
  border: 1.5px solid #38bdf8 !important;
  border-radius: 5px !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.3) !important;
}

.vial-cap {
  width: 16px !important;
  height: 6px !important;
  background: #7c3aed !important;
  border-radius: 2px 2px 0 0 !important;
  margin-top: -6px !important;
}

.vial-body {
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 2px !important;
}

#sterileVialLabel {
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-size: 0.48rem !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  background: rgba(0,0,0,0.45) !important;
  padding: 1px 3px !important;
  border-radius: 3px !important;
  white-space: nowrap !important;
}

.vial-fluid {
  width: 90% !important;
  height: 35% !important;
  background: linear-gradient(180deg, #38bdf8, #0284c7) !important;
  border-radius: 0 0 3px 3px !important;
  transition: height 0.15s ease, background 0.2s ease !important;
}

.sterile-syringe {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  position: relative !important;
}

.syringe-needle {
  width: 2px !important;
  height: 15px !important;
  background: #cbd5e1 !important;
  box-shadow: 0 0 3px #ffffff !important;
}

.syringe-barrel {
  width: 18px !important;
  height: 42px !important;
  background: rgba(255, 255, 255, 0.2) !important;
  border: 1.5px solid #94a3b8 !important;
  border-radius: 3px !important;
  position: relative !important;
  overflow: hidden !important;
}

.syringe-plunger {
  display: block !important;
  width: 100% !important;
  height: 40% !important;
  background: #0284c7 !important;
  position: absolute !important;
  top: 0 !important;
  transition: transform 0.1s ease !important;
}

.sterile-syringe.hit .syringe-needle {
  transform: translateY(3px) !important;
}

/* Animasi Injeksi Pelarut ke Vial */
.sterile-syringe.syringe-injecting {
  animation: syringeInject 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

@keyframes syringeInject {
  0% { transform: translate(0, 0) rotate(0deg); }
  35% { transform: translate(-22px, 8px) rotate(-24deg); }
  70% { transform: translate(-20px, 6px) rotate(-22deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

/* Animasi Homogenisasi & Goyang Lembut Vial */
.sterile-vial.vial-swirling {
  animation: vialSwirl 0.42s ease-in-out !important;
}

@keyframes vialSwirl {
  0% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-10deg) scale(1.06); }
  50% { transform: rotate(10deg) scale(1.06); }
  75% { transform: rotate(-5deg) scale(1.03); }
  100% { transform: rotate(0deg) scale(1); }
}

/* Kilau Kejernihan Solusi Bebas Partikel */
.sterile-vial.vial-clarity-glow {
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.9), inset 0 0 10px rgba(255, 255, 255, 0.7) !important;
  border-color: #38bdf8 !important;
  animation: clarityPulse 1.2s ease-in-out infinite alternate !important;
}

@keyframes clarityPulse {
  0% { filter: drop-shadow(0 0 4px #38bdf8); }
  100% { filter: drop-shadow(0 0 12px #38bdf8) brightness(1.15); }
}

/* Gelembung Rekonstitusi Larutan Steril */
.sterile-bubble {
  position: absolute;
  bottom: 6px;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  pointer-events: none;
  animation: sterileBubbleRise 0.45s ease-out forwards;
  z-index: 5;
}

@keyframes sterileBubbleRise {
  0% { transform: translateY(0) scale(0.6); opacity: 1; }
  100% { transform: translateY(-26px) scale(1.2); opacity: 0; }
}

.sterile-guide {
  width: 100% !important;
  text-align: center !important;
  flex-shrink: 0 !important;
}

.sterile-modal .modal-footer {
  padding: 2px 6px !important;
  min-height: 24px !important;
  margin-top: 1px !important;
  gap: 6px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.sterile-modal .modal-footer .btn-pri,
.sterile-modal .modal-footer .btn-sec {
  min-height: 22px !important;
  padding: 2px 10px !important;
  font-size: 0.60rem !important;
}

/* ================= MODAL ETIKET ================= */
.etiket-modal {
  display: flex !important;
  flex-direction: column !important;
  max-width: min(94vw, 540px) !important;
  width: 94% !important;
  max-height: min(94vh, 380px) !important;
  background: #ffffff !important;
  border-radius: 10px !important;
  border: 2px solid #0f172a !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25) !important;
  overflow: hidden !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

.etiket-header {
  flex-shrink: 0 !important;
  background: #ffffff !important;
  padding: 3px 8px !important;
  border-bottom: 1.5px solid #e2e8f0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
  min-height: 24px !important;
  box-sizing: border-box !important;
}

.etiket-header h2 {
  font-size: 0.76rem !important;
  margin: 0 !important;
  font-weight: 800 !important;
  color: #0f172a !important;
}

.etiket-body {
  padding: 3px 6px !important;
  overflow-y: auto !important;
  flex: 1 1 auto !important;
  box-sizing: border-box !important;
}

.etiket-item-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 3px !important;
}

.etiket-item {
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 5px !important;
  padding: 2.5px 6px !important;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.etiket-item.etiket-error-highlight {
  border-color: #ef4444 !important;
  background: #fef2f2 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
  animation: shake 0.35s ease;
}

.etiket-item-title {
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 1px !important;
  font-size: 0.66rem !important;
  line-height: 1.2 !important;
}

.etiket-options {
  display: flex;
  gap: 2px !important;
}

.btn-etiket {
  flex: 1;
  padding: 1.5px 5px !important;
  font-size: 0.58rem !important;
  font-weight: 700;
  border-radius: 4px !important;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.15s;
  background: #fff;
  min-height: 20px !important;
  height: 20px !important;
  line-height: 1.15 !important;
}

.btn-etiket.white {
  color: #475569;
  border-color: #cbd5e1;
}
.btn-etiket.white.selected {
  color: #0f172a;
  background: #f1f5f9;
  border-color: #334155;
  box-shadow: 0 0 0 1.5px rgba(51,65,85,0.2);
}

.btn-etiket.blue {
  color: #475569;
  border-color: #cbd5e1;
}
.btn-etiket.blue.selected {
  color: #0369a1;
  background: #e0f2fe;
  border-color: #0284c7;
  box-shadow: 0 0 0 1.5px rgba(2,132,199,0.2);
}

.btn-etiket.red {
  color: #b91c1c;
  border-color: #fca5a5;
}
.btn-etiket.red.selected {
  background: #fee2e2;
  border-color: #ef4444;
  box-shadow: 0 0 0 1.5px rgba(239,68,68,0.2);
}

.etiket-footer {
  flex-shrink: 0 !important;
  background: #ffffff !important;
  padding: 3px 8px !important;
  border-top: 1.5px solid #e2e8f0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
  min-height: 26px !important;
  box-sizing: border-box !important;
}

.etiket-footer button {
  height: 22px !important;
  min-height: 22px !important;
  font-size: 0.62rem !important;
  padding: 1px 8px !important;
  border-radius: 4px !important;
}

/* ================= MODAL SKRINING (RESEP KERTAS) ================= */
.review-split-layout {
  display: flex;
  gap: 20px;
  margin-top: 15px;
}

/* ================= OFFICIAL RSUD CIRACOS PRESCRIPTION & REVIEW WORKSTATION (COMPACT MOBILE FIT) ================= */
.review-modal-card {
  margin: auto !important;
  box-sizing: border-box !important;
  background: #fffdf9 !important;
  opacity: 1 !important;
  border: 2.5px solid #0f172a !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 0 rgba(15, 23, 42, 0.22), 0 20px 40px rgba(0, 0, 0, 0.35) !important;
  padding: 0 !important;
  max-width: min(90vw, 700px) !important;
  width: min(90vw, 700px) !important;
  max-height: min(88vh, 325px) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  color: #0f172a !important;
}

.review-modal-header {
  flex-shrink: 0 !important;
  background: linear-gradient(180deg, #f0fdfa 0%, #e6f7f4 100%) !important;
  border-bottom: 1.5px solid #cbd5e1 !important;
  padding: 4px 10px !important;
  min-height: 28px !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  box-sizing: border-box !important;
}

.review-modal-header h2 {
  font-size: 0.82rem !important;
  margin: 0 !important;
  font-weight: 700 !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  color: #0f172a !important;
}

.review-layout-grid {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  padding: 4px 8px !important;
  box-sizing: border-box !important;
  display: block !important;
}

.review-col-main {
  display: grid !important;
  grid-template-columns: 1fr 1.12fr !important;
  gap: 6px !important;
  align-items: stretch !important;
}

/* 1. KERTAS RESEP RESMI RSUD CIRACOS */
.rx-official-paper {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 6px !important;
  padding: 5px 8px !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05) !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
}

.rx-paper-kop {
  text-align: center !important;
  border-bottom: 1.5px solid #0f172a !important;
  padding-bottom: 2px !important;
  margin-bottom: 2px !important;
}

.rx-hospital-name {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 0.70rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  letter-spacing: 0.02em !important;
  line-height: 1.1 !important;
  margin: 0 !important;
  text-transform: uppercase !important;
}

.rx-hospital-sub {
  font-size: 0.44rem !important;
  color: #64748b !important;
  font-weight: 600 !important;
  margin-top: 1px !important;
}

.rx-doc-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  border-bottom: 1px solid #e2e8f0 !important;
  padding-bottom: 2px !important;
  margin-bottom: 2px !important;
  font-size: 0.54rem !important;
}

.rx-doc-name {
  font-weight: 700 !important;
  font-size: 0.54rem !important;
  color: #0f172a !important;
}

.rx-doc-sip {
  font-size: 0.46rem !important;
  color: #64748b !important;
  font-weight: 600 !important;
}

.rx-clinic-badge {
  font-size: 0.48rem !important;
  font-weight: 700 !important;
  padding: 1px 4px !important;
  border-radius: 999px !important;
  background: #ecfdf5 !important;
  color: #047857 !important;
  border: 1px solid #a7f3d0 !important;
}

/* 4-Kolom Demografi Pasien */
.rx-patient-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 1px 4px !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 4px !important;
  padding: 2px 5px !important;
  margin-bottom: 2px !important;
}

.rx-patient-cell {
  display: flex !important;
  flex-direction: column !important;
  gap: 1px !important;
}

.rx-patient-label {
  font-size: 0.42rem !important;
  font-weight: 700 !important;
  color: #94a3b8 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.02em !important;
}

.rx-patient-val {
  font-size: 0.54rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Baris Diagnosis & Riwayat Alergi */
.rx-diag-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 4px !important;
  padding: 2px 5px !important;
  font-size: 0.52rem !important;
  color: #334155 !important;
  margin-bottom: 2px !important;
}

.rx-diag-title {
  font-weight: 600 !important;
}

.rx-allergy-clean {
  color: #16a34a !important;
  font-weight: 700 !important;
}

.rx-allergy-alert {
  color: #dc2626 !important;
  font-weight: 700 !important;
  background: #fee2e2 !important;
  padding: 1px 4px !important;
  border-radius: 3px !important;
  border: 1px solid #fca5a5 !important;
}

/* Daftar Obat R/ */
.rx-items-container {
  display: flex !important;
  flex-direction: column !important;
  gap: 1px !important;
  margin-bottom: 2px !important;
  min-height: 0 !important;
}

.rx-item-entry {
  border-bottom: 1px solid #f1f5f9 !important;
  padding-bottom: 1px !important;
}

.rx-item-main {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

.rx-item-title-row {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.rx-r-symbol {
  font-family: Georgia, 'Times New Roman', serif !important;
  font-size: 0.74rem !important;
  font-weight: 700 !important;
  font-style: italic !important;
  color: #0f172a !important;
  line-height: 1 !important;
}

.rx-item-name {
  font-weight: 700 !important;
  font-size: 0.60rem !important;
  color: #0f172a !important;
  line-height: 1.1 !important;
}

.rx-form-badge {
  font-size: 0.46rem !important;
  font-weight: 700 !important;
  background: #f1f5f9 !important;
  color: #475569 !important;
  padding: 0 3px !important;
  border-radius: 3px !important;
  border: 1px solid #e2e8f0 !important;
}

.rx-item-sig-row {
  padding-left: 12px !important;
  margin-top: 1px !important;
}

.rx-item-sig {
  font-size: 0.50rem !important;
  color: #475569 !important;
  font-style: italic !important;
  line-height: 1.1 !important;
}

/* Footer Lembar Resep */
.rx-paper-footer {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-end !important;
  border-top: 1px dashed #cbd5e1 !important;
  padding-top: 2px !important;
  font-size: 0.50rem !important;
  color: #64748b !important;
  margin-top: auto !important;
}

.rx-footer-reg {
  font-weight: 600 !important;
  font-size: 0.50rem !important;
}

.rx-paraf-wrap {
  text-align: right !important;
}

.rx-paraf-label {
  font-size: 0.44rem !important;
  color: #64748b !important;
  font-style: italic !important;
  display: block !important;
  margin-bottom: 1px !important;
}

.rx-paraf-sign {
  font-size: 0.50rem !important;
  font-weight: 700 !important;
  color: #059669 !important;
}

.rx-corrected-stamp {
  margin: 2px 0 4px 0 !important;
  padding: 3px 6px !important;
  background: #f0fdf4 !important;
  border: 1.5px dashed #10b981 !important;
  border-radius: 5px !important;
  color: #065f46 !important;
  font-size: 0.52rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
}

/* 2. LEMBAR TELAAH PENGKAJIAN RESEP (3 ASPEK) */
.rx-telaah-panel {
  background: #f0fdfa !important;
  border: 1.5px solid #99f6e4 !important;
  border-radius: 6px !important;
  padding: 4px 6px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.rx-telaah-header {
  display: flex !important;
  align-items: center !important;
  gap: 3px !important;
  margin-bottom: 1px !important;
}

.rx-telaah-icon {
  font-size: 0.70rem !important;
}

.rx-telaah-title {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-weight: 800 !important;
  font-size: 0.58rem !important;
  color: #0f766e !important;
  letter-spacing: 0.02em !important;
}

.rx-telaah-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  margin-bottom: 2px !important;
}

.review-aspect-card {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 4px !important;
  padding: 2px 5px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 1px !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03) !important;
}

.review-aspect-card.aspect-pass {
  border-color: #cbd5e1 !important;
}

.review-aspect-card.aspect-alert {
  border-color: #ef4444 !important;
  background: #fef2f2 !important;
}

.review-aspect-card.aspect-confirmed {
  border-color: #10b981 !important;
  background: #ecfdf5 !important;
}

.aspect-card-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

.aspect-card-title {
  font-size: 0.56rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
}

.aspect-status-pill {
  font-size: 0.46rem !important;
  font-weight: 800 !important;
  padding: 0 3px !important;
  border-radius: 3px !important;
}

.aspect-pass .aspect-status-pill {
  background: #ecfdf5 !important;
  color: #059669 !important;
  border: 1px solid #a7f3d0 !important;
}

.aspect-alert .aspect-status-pill {
  background: #fee2e2 !important;
  color: #dc2626 !important;
  border: 1px solid #fca5a5 !important;
}

.aspect-confirmed .aspect-status-pill {
  background: #ecfdf5 !important;
  color: #059669 !important;
  border: 1px solid #a7f3d0 !important;
}

.aspect-checklist {
  display: flex !important;
  flex-direction: column !important;
  gap: 1px !important;
  font-size: 0.48rem !important;
  color: #475569 !important;
}

.chk-item {
  display: flex !important;
  align-items: center !important;
  gap: 2px !important;
}

.chk-icon-ok {
  color: #10b981 !important;
  font-weight: 800 !important;
  font-size: 0.54rem !important;
}

.chk-icon-alert {
  color: #ef4444 !important;
  font-weight: 800 !important;
  font-size: 0.54rem !important;
}

.aspect-issue-note {
  font-size: 0.48rem !important;
  color: #dc2626 !important;
  background: #fee2e2 !important;
  padding: 1px 3px !important;
  border-radius: 3px !important;
  border-left: 2px solid #ef4444 !important;
  margin-top: 1px !important;
  line-height: 1.15 !important;
}

.aspect-recom-note {
  font-size: 0.48rem !important;
  color: #047857 !important;
  background: #ecfdf5 !important;
  padding: 1px 3px !important;
  border-radius: 3px !important;
  border-left: 2px solid #10b981 !important;
  margin-top: 1px !important;
  line-height: 1.15 !important;
}

/* Tombol Aksi Telaah Resep di Bagian Bawah Modal */
.rx-telaah-actions {
  display: flex !important;
  flex-direction: row !important;
  gap: 8px !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 4px 12px 6px !important;
  margin-top: auto !important;
  background: #ffffff !important;
  border-top: 1.5px solid #e2e8f0 !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

.btn-rx-pass {
  flex: 1 !important;
  max-width: 240px !important;
  min-height: 24px !important;
  height: 26px !important;
  background: linear-gradient(180deg, #34d399 0%, #059669 100%) !important;
  color: #ffffff !important;
  border: 1.5px solid #0f172a !important;
  border-radius: 6px !important;
  box-shadow: 0 2px 0 #047857 !important;
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-weight: 700 !important;
  font-size: 0.66rem !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  white-space: nowrap !important;
  transition: all 0.12s ease !important;
}

.btn-rx-pass:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 3px 0 #047857 !important;
}

.btn-rx-pass:active {
  transform: translateY(2px) !important;
  box-shadow: none !important;
}

.btn-rx-call {
  flex: 1 !important;
  max-width: 240px !important;
  min-height: 24px !important;
  height: 26px !important;
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%) !important;
  color: #ffffff !important;
  border: 1.5px solid #0f172a !important;
  border-radius: 6px !important;
  box-shadow: 0 2px 0 #92400e !important;
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-weight: 700 !important;
  font-size: 0.66rem !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  white-space: nowrap !important;
  transition: all 0.12s ease !important;
}

.btn-rx-call:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 3px 0 #92400e !important;
}

.btn-rx-call:active {
  transform: translateY(2px) !important;
  box-shadow: none !important;
}

.btn-rx-call.btn-disabled {
  opacity: 0.65 !important;
  cursor: not-allowed !important;
  background: #94a3b8 !important;
  box-shadow: none !important;
}

.btn-rx-close {
  flex: 0.8 !important;
  min-height: 24px !important;
  height: 26px !important;
  background: transparent !important;
  color: #0f172a !important;
  border: 1.5px dashed #0f172a !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-weight: 700 !important;
  font-size: 0.66rem !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  white-space: nowrap !important;
  transition: all 0.12s ease !important;
}

.btn-rx-close:hover {
  background: rgba(15, 23, 42, 0.04) !important;
}

.btn-rx-close:active {
  transform: translateY(1px) !important;
  background: rgba(15, 23, 42, 0.08) !important;
}

/* 3. SIDEBAR ANTREAN RESEP & STANDAR APOTEKER */
.review-col-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rx-sidebar-card {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
}

.rx-sidebar-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: #475569;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.rx-queue-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.rx-queue-item {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px;
  transition: all 0.15s ease;
}

.rx-queue-item.active {
  border: 1.5px solid #0d9488;
  background: #ecfdf5;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.15);
}

.rx-q-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
}

.rx-q-sub {
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 2px;
}

.rx-standards-card {
  border-left: 3.5px solid #0d9488;
}

.rx-standards-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.rx-standards-icon {
  font-size: 1rem;
}

.rx-standards-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #2dd4bf;
}

.rx-standards-body {
  font-size: 0.74rem;
  color: #94a3b8;
  line-height: 1.45;
}

/* Animasi getar darurat */
.btn-pulse-alert {
  animation: pulseAlert 0.4s ease-in-out 3;
}

@keyframes pulseAlert {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); box-shadow: 0 0 15px #ef4444; }
}

@media (max-width: 900px) {
  .review-layout-grid {
    grid-template-columns: 1fr;
  }
  .rx-patient-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .rx-telaah-grid {
    grid-template-columns: 1fr;
  }
}

/* Responsif: Jika layar kecil, jadikan tumpuk (stack) */
@media (max-width: 768px) {
  .review-split-layout {
    flex-direction: column;
  }
  .review-split-layout > .review-split-left {
    flex: none;
    width: 100%;
  }
}

/* ================= FD ADVENTURE STYLES & MODALS ================= */

/* 1. Mobile Orientation Banner (Gaya Farmasi Jona) */
.orientation-banner {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999998;
  background: rgba(6, 21, 25, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  place-items: center;
  text-align: center;
  padding: 1.5rem;
}

@media (orientation: portrait) and (max-width: 820px) {
  .orientation-banner:not(.dismissed):not(.hidden) {
    display: grid !important;
  }
}

.orientation-banner.dismissed,
.orientation-banner.hidden {
  display: none !important;
}

.orientation-card {
  background: #ffffff;
  color: #0f172a;
  padding: 1.8rem 1.6rem;
  max-width: 340px;
  width: 90%;
  border-radius: 24px;
  border: 3px solid var(--teal-primary);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 25px rgba(13, 148, 136, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.orientation-icon-bounce {
  font-size: 3.2rem;
  animation: phoneRotate 2.5s ease-in-out infinite alternate;
}

@keyframes phoneRotate {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(-25deg) scale(1.08); }
  100% { transform: rotate(90deg) scale(1); }
}

.orientation-title {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f766e;
  margin: 0;
  letter-spacing: 0.5px;
}

.orientation-msg {
  font-size: 0.88rem;
  color: #334155;
  line-height: 1.4;
  margin: 0;
}

.orientation-msg b {
  color: #0d9488;
  font-size: 0.95rem;
}

.btn-orientation-dismiss {
  background: linear-gradient(135deg, #0d9488, #0f766e);
  color: #ffffff;
  border: none;
  padding: 10px 22px;
  border-radius: 999px;
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
  transition: transform 0.15s ease;
  margin-top: 6px;
}

.btn-orientation-dismiss:active {
  transform: scale(0.95);
}

/* 2. HUD Rank Card (Warna Cerah, Bersih, Kontras Tinggi Selaras Tema Rumah Sakit) */
.hud-card.hud-rank,
.hud-rank {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(254, 252, 232, 0.96) 100%) !important;
  border: 2px solid #f59e0b !important;
  border-bottom: 3px solid #d97706 !important;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.22), 0 2px 4px rgba(0, 0, 0, 0.06) !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}
.hud-rank .hud-label {
  color: #92400e !important;
  font-weight: 700 !important;
}
.hud-rank .hud-val {
  color: #b45309 !important;
  font-weight: 800 !important;
}
.hud-rank .hud-xp-bar {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
}

/* 3. Small Buttons on Title Screen */
.btn-mini-title {
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid #cbd5e1;
  color: #334155;
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.btn-mini-title:hover {
  background: #ffffff;
  border-color: var(--teal-primary);
  color: var(--teal-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,168,150,0.2);
}

/* 4. Staff Modal Styles (Ultra-Responsive & Mobile-Friendly) */
.staff-modal {
  max-width: 980px !important;
  width: 96% !important;
  max-height: min(92vh, 620px) !important;
  padding: 0.85rem 1rem 0.65rem !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box;
  overflow: hidden !important;
}
.staff-modal .modal-header {
  margin-bottom: 0.25rem !important;
  flex-shrink: 0;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}
.staff-header-left {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex: 1 !important;
}
.staff-modal .modal-header h2 {
  font-size: 1.15rem !important;
  margin: 0 !important;
}
.staff-header-icon {
  font-size: 1.5rem;
  margin: 0;
  line-height: 1;
}
.staff-stage-notice {
  display: none !important;
}
.staff-morale-bar-wrap {
  background: #f8fafc;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  margin-bottom: 4px;
  flex-shrink: 0;
}
.staff-morale-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: #475569;
}
.staff-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 8px;
  margin-top: 4px;
  flex: 1;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  padding: 2px 4px 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(13, 148, 136, 0.4) transparent;
}
.staff-grid::-webkit-scrollbar {
  width: 5px;
}
.staff-grid::-webkit-scrollbar-thumb {
  background: rgba(13, 148, 136, 0.35);
  border-radius: 999px;
}
.staff-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 6px 8px !important;
  text-align: center;
  box-shadow: 0 3px 10px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.staff-card-avatar {
  font-size: 1.6rem;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.staff-card-avatar svg {
  display: block;
}
.staff-card-name {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.85rem !important;
  font-weight: 700;
  color: #0f172a;
}
.staff-card-role {
  font-size: 0.65rem !important;
  color: #0284c7;
  font-weight: 700;
  margin-bottom: 2px;
}
.staff-card-skill {
  font-size: 0.64rem !important;
  color: #64748b;
  margin-bottom: 4px;
  line-height: 1.2;
}
.staff-status-badge {
  font-size: 0.62rem !important;
  padding: 2px 6px !important;
  border-radius: 999px;
  display: inline-block;
  font-weight: 700;
  margin-bottom: 4px;
}
.status-ready { background: #dcfce7; color: #15803d; }
.status-busy { background: #fef3c7; color: #b45309; }

.staff-modal .modal-footer {
  display: none !important;
}

@media (max-width: 860px) {
  .staff-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .staff-grid {
    grid-template-columns: 1fr !important;
    gap: 8px;
  }
}

/* 5. Leaderboard & Stats Modal (Cozy Arcade Pharmacy Game Theme) */
.leaderboard-modal {
  max-width: 740px;
  width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: var(--card-cream, #fffdf9);
  border: 3.5px solid var(--teal-primary, #00a896);
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(10, 31, 36, 0.35);
  padding: 1.25rem 1.4rem;
  box-sizing: border-box;
}

.leaderboard-modal-header {
  text-align: center;
  margin-bottom: 12px;
}

.lb-header-title-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 2px;
}

.leaderboard-header-icon {
  font-size: 1.6rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.leaderboard-modal-header h2 {
  font-family: 'Fredoka', sans-serif;
  color: #0f766e;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin: 0;
  text-shadow: 0 1px 2px rgba(15, 118, 110, 0.1);
}

.leaderboard-modal .modal-subtitle,
.leaderboard-modal .leaderboard-live-badge-wrap {
  display: none !important;
}

.leaderboard-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 14px;
  border-radius: 999px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.leaderboard-live-badge.online {
  background: #dcfce7;
  color: #15803d;
  border: 1.5px solid #86efac;
}

.leaderboard-live-badge.offline {
  background: #fef3c7;
  color: #b45309;
  border: 1.5px solid #fde68a;
}

.leaderboard-live-badge .live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.leaderboard-live-badge.online .live-dot {
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: pulseLiveDot 1.5s infinite;
}

.leaderboard-live-badge.offline .live-dot {
  background: #f59e0b;
}

/* Kartu Profil Karir Pemain (Game Hero Profile) */
.leaderboard-career-card {
  margin-bottom: 12px;
}

.career-game-card {
  background: linear-gradient(135deg, #e6f7f4 0%, #d8f3ec 50%, #c4ece3 100%);
  border: 2px solid #0d9488;
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 3px 10px rgba(13, 148, 136, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.career-avatar-badge {
  position: relative;
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #0d9488;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.2);
}

.career-avatar-icon {
  font-size: 1.5rem;
}

.career-avatar-lvl {
  position: absolute;
  bottom: -4px;
  right: -6px;
  background: #f59e0b;
  color: #ffffff;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 999px;
  border: 1.5px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.career-details-box {
  flex: 1;
  min-width: 0;
}

.career-name-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.career-name-text {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.career-role-pill {
  font-size: 0.65rem;
  background: #0d9488;
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 700;
}

.career-rank-title {
  font-size: 0.72rem;
  color: #0f766e;
  font-weight: 700;
  margin-top: 2px;
}

.career-stats-pills {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.career-pill {
  background: #ffffff;
  border: 1.5px solid #bbf7d0;
  border-radius: 10px;
  padding: 5px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.career-pill.xp-pill {
  border-color: #bae6fd;
}

.career-pill .pill-label {
  font-size: 0.58rem;
  color: #64748b;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.career-pill .pill-value {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
}

/* Container & List Peringkat (Tanpa Scroll Horizontal) */
.leaderboard-body {
  overflow-y: auto;
  overflow-x: hidden !important;
  max-height: 50vh;
  margin-bottom: 12px;
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #0d9488 transparent;
}

.leaderboard-body::-webkit-scrollbar {
  width: 6px;
}

.leaderboard-body::-webkit-scrollbar-thumb {
  background: #0d9488;
  border-radius: 999px;
}

.leaderboard-body::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.lb-cards-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
  box-sizing: border-box;
}

/* Setiap Baris Kartu Game Leaderboard */
.lb-game-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.lb-game-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Top 3 Tiers (Emas, Perak, Perunggu) */
.lb-game-card.top-tier.rank-1 {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%) !important;
  border: 2px solid #f59e0b !important;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.2) !important;
}

.lb-game-card.top-tier.rank-2 {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
  border: 2px solid #94a3b8 !important;
  box-shadow: 0 3px 10px rgba(148, 163, 184, 0.18) !important;
}

.lb-game-card.top-tier.rank-3 {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%) !important;
  border: 2px solid #f97316 !important;
  box-shadow: 0 3px 10px rgba(249, 115, 22, 0.18) !important;
}

/* Rekor Pemain Sendiri */
.lb-game-card.my-record {
  border: 2.5px solid #0d9488 !important;
  background: linear-gradient(135deg, #f0fdfa 0%, #e6f7f4 100%) !important;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.28) !important;
}

/* Kolom Peringkat */
.lb-card-rank {
  width: 44px;
  min-width: 44px;
  text-align: center;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  color: #475569;
}

.lb-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  white-space: nowrap;
}

/* Kolom Avatar */
.lb-card-avatar {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

/* Kolom Detail Utama */
.lb-card-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lb-name-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.lb-player-name {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  color: #0f172a;
}

.badge-anda {
  font-size: 0.62rem;
  background: #0d9488;
  color: #ffffff;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 800;
  letter-spacing: 0.4px;
  display: inline-block;
  vertical-align: middle;
}

.lb-player-role {
  font-size: 0.68rem;
  color: #64748b;
  font-weight: 600;
}

.lb-accolade-line {
  margin: 1px 0;
}

.table-accolade-badge {
  display: inline-block;
  padding: 2px 8px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-meta-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.66rem;
  color: #94a3b8;
  font-weight: 600;
}

.meta-sep {
  color: #cbd5e1;
}

/* Kolom Skor & Performa */
.lb-card-score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  flex-shrink: 0;
  min-width: 90px;
}

.lb-score-val {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0284c7;
  line-height: 1;
}

.lb-xp-tag {
  font-size: 0.65rem;
  color: #0284c7;
  font-weight: 800;
  margin-left: 2px;
}

.lb-stats-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.lb-star-rating {
  color: #f59e0b;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.lb-safety-tag {
  font-size: 0.68rem;
  font-weight: 800;
  color: #059669;
  background: #d1fae5;
  padding: 1px 5px;
  border-radius: 4px;
}

/* Empty State Bergaya Game */
.lb-state-empty {
  text-align: center;
  padding: 36px 16px;
  color: #64748b;
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
}

.lb-state-icon {
  font-size: 2.2rem;
  margin-bottom: 6px;
}

.lb-state-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #334155;
}

.lb-state-desc {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 4px;
}

/* Tombol Tutup Game Modal */
.btn-close-leaderboard {
  background: linear-gradient(180deg, #14b8a6 0%, #0d9488 100%) !important;
  border: 2px solid #0f766e !important;
  border-radius: 12px !important;
  padding: 9px 26px !important;
  font-family: 'Fredoka', sans-serif !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(13, 148, 136, 0.25) !important;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-close-leaderboard:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(13, 148, 136, 0.35) !important;
}

@media (max-width: 540px) {
  .career-game-card {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .career-stats-pills {
    justify-content: space-between;
  }
  .career-pill {
    flex: 1;
  }
  .lb-game-card {
    padding: 7px 10px;
  }
  .lb-card-score {
    min-width: 75px;
  }
  .lb-score-val {
    font-size: 1rem;
  }
}

/* 6. Settings Modal */
.settings-modal {
  max-width: 480px;
  width: 95%;
}
.settings-modal .modal-header {
  margin-bottom: 0.25rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}
.settings-header-left {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex: 1 !important;
}
.settings-modal .modal-header h2 {
  margin: 0 !important;
  font-size: 1.15rem !important;
}
.settings-modal .modal-subtitle {
  display: none !important;
}
.settings-modal .modal-footer {
  display: none !important;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

/* 7. FEFO Batch Modal */
.fefo-modal {
  max-width: 620px;
  width: 95%;
}
.fefo-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.fefo-batch-card {
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.fefo-batch-card:hover {
  border-color: #38bdf8;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(56, 189, 248, 0.2);
}
.fefo-batch-no {
  font-family: 'Courier New', monospace;
  font-weight: 800;
  font-size: 1.1rem;
  color: #0f172a;
}
.fefo-batch-ed {
  font-size: 0.88rem;
  font-weight: 700;
  color: #e11d48;
  margin-top: 4px;
}

/* FEFO Educational Feedback Cards */
.fefo-edu-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  padding: 8px 4px;
}
.fefo-edu-header {
  text-align: center;
}
.fefo-edu-badge {
  display: inline-block;
  background: #fee2e2;
  color: #b91c1c;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.fefo-edu-card {
  border-radius: 10px;
  padding: 12px 14px;
  border-left: 4px solid;
}
.fefo-edu-card.what {
  background: #fef2f2;
  border-left-color: #ef4444;
  color: #991b1b;
}
.fefo-edu-card.why {
  background: #fffbeb;
  border-left-color: #f59e0b;
  color: #92400e;
}
.fefo-edu-card.how {
  background: #f0fdf4;
  border-left-color: #10b981;
  color: #166534;
}

/* Critical Stock Banner */
.critical-stock-banner {
  position: absolute;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 900px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.95), rgba(185, 28, 28, 0.95));
  border: 2px solid #fca5a5;
  box-shadow: 0 10px 25px rgba(239, 68, 68, 0.35);
  border-radius: 14px;
  z-index: 85;
  padding: 10px 18px;
  animation: pulse-critical 2s infinite ease-in-out;
  backdrop-filter: blur(8px);
}
@keyframes pulse-critical {
  0%, 100% { box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3); }
  50% { box-shadow: 0 12px 30px rgba(239, 68, 68, 0.6); }
}
.critical-stock-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #ffffff;
}
.critical-icon {
  font-size: 1.8rem;
  animation: bounce-subtle 1.2s infinite;
}
@keyframes bounce-subtle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.critical-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.critical-text b {
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  color: #ffffff;
}
.critical-text span {
  font-size: 0.82rem;
  color: #fee2e2;
}
.btn-amprah-action {
  background: #ffffff;
  color: #b91c1c;
  border: none;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}
.btn-amprah-action:hover {
  background: #fef2f2;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* 8. Briefing Modal (Arcade Casual Game Styling) */
.briefing-modal {
  max-width: 560px;
  width: 95%;
  background: linear-gradient(180deg, #ffffff 0%, #f0fdfa 100%) !important;
  border: 2.5px solid #0d9488 !important;
  border-radius: 20px !important;
  box-shadow: 0 8px 0 #0f766e, 0 20px 40px rgba(13, 148, 136, 0.28) !important;
  padding: 16px 20px !important;
}
.briefing-modal-header,
.briefing-modal .modal-header,
#modal-briefing .modal-header {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: left !important;
  padding: 6px 12px 10px !important;
  border-bottom: 2px solid #ccfbf1 !important;
  background: transparent !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
.briefing-modal h2,
#briefingShiftTitle {
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  letter-spacing: 0.3px !important;
  margin: 0 !important;
  text-align: left !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
}
.briefing-modal h2 span,
#briefingShiftTitle span {
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
}
.briefing-subtitle,
#briefingModifierSubtitle {
  display: none !important;
}
.briefing-situation-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%) !important;
  border: 2px solid #f59e0b !important;
  box-shadow: 0 4px 0 #d97706, 0 8px 16px rgba(245, 158, 11, 0.15) !important;
  border-radius: 14px !important;
  padding: 10px 14px !important;
  margin: 10px 0 !important;
}
.briefing-icon {
  font-size: 1.8rem !important;
  background: #ffffff !important;
  border: 2px solid #f59e0b !important;
  border-radius: 12px !important;
  width: 44px !important;
  height: 44px !important;
  display: grid !important;
  place-items: center !important;
  box-shadow: 0 2px 0 #d97706 !important;
  flex-shrink: 0;
}
.briefing-info h3 {
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  color: #b45309 !important;
  margin: 0 0 2px 0 !important;
}
.briefing-info p {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 0.76rem !important;
  font-weight: 600 !important;
  color: #78350f !important;
  line-height: 1.35 !important;
  margin: 0 !important;
}
.briefing-checklist {
  background: linear-gradient(135deg, #f0fdfa 0%, #e6fffa 100%) !important;
  border: 2px solid #0d9488 !important;
  box-shadow: 0 4px 0 #0f766e, 0 8px 18px rgba(13, 148, 136, 0.15) !important;
  border-radius: 14px !important;
  padding: 10px 14px !important;
  margin-bottom: 12px !important;
}
.briefing-checklist h4 {
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-size: 0.85rem !important;
  font-weight: 800 !important;
  color: #0f766e !important;
  letter-spacing: 0.5px !important;
  margin: 0 0 6px 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}
.briefing-checklist ul {
  margin: 0 !important;
  padding-left: 0 !important;
  list-style: none !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
}
.briefing-checklist li {
  background: #ffffff !important;
  border: 1px solid #ccfbf1 !important;
  border-radius: 8px !important;
  padding: 5px 10px !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  color: #134e4a !important;
  line-height: 1.35 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}
#btnStartBriefingShift {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.8px !important;
  padding: 10px 28px !important;
  border-radius: 999px !important;
  border: 2px solid #34d399 !important;
  box-shadow: 0 5px 0 #047857, 0 10px 20px rgba(16, 185, 129, 0.45) !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  transition: transform 0.1s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.1s ease !important;
}
#btnStartBriefingShift:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 7px 0 #047857, 0 14px 26px rgba(16, 185, 129, 0.55) !important;
}
#btnStartBriefingShift:active {
  transform: translateY(3px) !important;
  box-shadow: 0 1px 0 #047857 !important;
}

/* 9. Developer Debug Panel (F3 Hotkey) */
.debug-overlay {
  position: fixed;
  top: 15px;
  right: 15px;
  width: 320px;
  max-height: 90vh;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(8px);
  border: 1.5px solid #38bdf8;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  color: #f8fafc;
  font-family: 'Plus Jakarta Sans', monospace, sans-serif;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.debug-overlay.hidden {
  display: none !important;
}

.debug-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #1e293b;
  border-bottom: 1px solid #334155;
  font-size: 0.72rem;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.5px;
}

.debug-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
}
.debug-close-btn:hover {
  color: #ef4444;
}

.debug-content {
  padding: 10px 12px;
  overflow-y: auto;
  font-size: 0.78rem;
}

.debug-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  border-bottom: 1px dashed rgba(51, 65, 85, 0.5);
}

.debug-metric-row span {
  color: #94a3b8;
}

.debug-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 6px;
}

.dbg-btn {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #475569;
  border-radius: 6px;
  padding: 6px 4px;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.dbg-btn:hover {
  background: #38bdf8;
  color: #0f172a;
  border-color: #38bdf8;
  transform: translateY(-1px);
}

/* ================= MODAL DIALOGUE STAF RUMAH SAKIT ================= */
.dialogue-modal {
  max-width: min(94vw, 560px) !important;
  width: 94% !important;
  max-height: min(92vh, 320px) !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  background: #ffffff !important;
  border-radius: 12px !important;
  border: 2px solid #0f172a !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25) !important;
  overflow: hidden !important;
}

.dialogue-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
  border-bottom: 1.5px solid #e2e8f0 !important;
  padding: 3px 8px !important;
  min-height: 26px !important;
  flex-shrink: 0 !important;
  background: #ffffff !important;
  box-sizing: border-box !important;
}

.dialogue-header-left {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-width: 0 !important;
}

.dialogue-avatar {
  font-size: 0.95rem !important;
  background: #f0f9ff !important;
  border: 1.5px solid #38bdf8 !important;
  width: 24px !important;
  height: 24px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 2px 6px rgba(56, 189, 248, 0.2) !important;
  flex-shrink: 0 !important;
  overflow: hidden !important;
}

.dialogue-avatar svg {
  display: block;
  width: 100%;
  height: 100%;
}

.dialogue-header-text {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
  min-width: 0 !important;
}

.dialogue-header-text h2 {
  margin: 0 !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  line-height: 1.2 !important;
}

.dialogue-staff-meta {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  margin-top: 0 !important;
}

.dialogue-badge-role {
  font-size: 0.52rem !important;
  background: #0284c7 !important;
  color: #ffffff !important;
  padding: 1px 5px !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
}

.dialogue-badge-dept {
  font-size: 0.52rem !important;
  background: #0f766e !important;
  color: #ffffff !important;
  padding: 1px 5px !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
}

.dialogue-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  padding: 4px 8px 6px !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.5) transparent;
}

.dialogue-body::-webkit-scrollbar {
  width: 4px;
}
.dialogue-body::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.4);
  border-radius: 999px;
}

.dialogue-info-grid {
  display: grid !important;
  grid-template-columns: 1.05fr 1fr !important;
  gap: 6px !important;
  margin-bottom: 2px !important;
  align-items: stretch !important;
}

.dialogue-speech-bubble {
  background: #f8fafc !important;
  border: 1.5px solid #cbd5e1 !important;
  border-left: 3.5px solid #00a896 !important;
  border-radius: 6px !important;
  padding: 4px 6px !important;
  font-size: 0.60rem !important;
  line-height: 1.25 !important;
  color: #1e293b !important;
  font-style: italic !important;
  margin-bottom: 0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
  display: flex !important;
  align-items: center !important;
}

.dialogue-status-strip {
  display: flex !important;
  flex-direction: column !important;
  gap: 1.5px !important;
  background: #f1f5f9 !important;
  padding: 4px 6px !important;
  border-radius: 6px !important;
  font-size: 0.56rem !important;
  color: #475569 !important;
  margin-bottom: 0 !important;
  border: 1px solid #e2e8f0 !important;
  justify-content: center !important;
  line-height: 1.2 !important;
}

.dialogue-status-strip b {
  color: #0f172a !important;
}

.dialogue-action-section {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  margin-top: 1px !important;
}

.dialogue-choices-title {
  font-size: 0.56rem !important;
  font-weight: 800 !important;
  color: #64748b !important;
  letter-spacing: 0.3px !important;
  margin-bottom: 2px !important;
}

.dialogue-options {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}

.dialogue-choice-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 5px !important;
  padding: 3px 8px !important;
  font-size: 0.62rem !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  cursor: pointer !important;
  transition: all 0.12s ease !important;
  text-align: left !important;
  gap: 6px !important;
  min-height: 24px !important;
  box-sizing: border-box !important;
}

.dialogue-choice-btn:hover {
  background: #f0fdf4 !important;
  border-color: #10b981 !important;
  color: #065f46 !important;
  transform: translateX(2px) !important;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.12) !important;
}

.dialogue-choice-btn.primary {
  background: #f0f9ff !important;
  border-color: #38bdf8 !important;
  color: #0369a1 !important;
}

.dialogue-choice-btn.primary:hover {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
}

.dialogue-modal .modal-footer {
  display: none !important;
}

@media (max-width: 640px) {
  .dialogue-modal {
    width: 94% !important;
    max-width: min(94vw, 560px) !important;
    max-height: min(90vh, 360px) !important;
    border-radius: 12px !important;
    padding: 0 !important;
  }
}

/* Staf Grid Filter Tabs */
.staff-filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.staff-tab-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.staff-tab-btn.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

/* ================= MAIN MENU (FASE 3) ================= */
.main-menu-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.menu-content {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  padding: 40px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
.game-logo {
  font-family: 'Fredoka', sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 5px;
  text-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.game-subtitle {
  font-size: 1.2rem;
  color: #94a3b8;
  margin-bottom: 30px;
  letter-spacing: 1px;
}
.menu-options {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 300px;
  margin: 0 auto 30px auto;
}
.btn-menu-primary {
  background: #10b981;
  color: white;
  border: none;
  padding: 15px;
  font-size: 1.2rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.btn-menu-primary:hover {
  background: #059669;
  transform: translateY(-2px);
}
.btn-menu-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 12px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.btn-menu-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}
.menu-footer {
  font-size: 0.8rem;
  color: #64748b;
}

/* ================= FASE 3: MODAL PAUSE & AKSESIBILITAS ================= */
.pause-modal {
  position: relative;
  max-width: 360px !important;
  width: min(360px, 92vw) !important;
  max-height: 98vh !important;
  overflow-y: hidden !important;
  text-align: left;
  border-top: 4px solid var(--teal-primary, #0d9488) !important;
  border-radius: 14px !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45) !important;
  animation: scaleUp 0.22s ease-out;
  padding: 0 !important;
}

.pause-modal .btn-close-modal-icon {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 25 !important;
}

.pause-modal .btn-close-modal-icon:hover {
  background: #fee2e2;
  border-color: #ef4444;
  color: #dc2626;
  transform: scale(1.06);
}

.pause-header {
  padding: 6px 12px 5px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: left !important;
  gap: 8px !important;
  border-bottom: 1.5px solid #f1f5f9 !important;
  background: #ffffff !important;
  position: relative !important;
  margin-bottom: 0 !important;
}

.pause-header h2 {
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin: 0 !important;
  text-align: left !important;
  letter-spacing: 0.3px;
}

.pause-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #0d9488, #0f766e);
  color: #ffffff;
  border-radius: 50%;
  margin-bottom: 0;
  box-shadow: 0 1px 4px rgba(13, 148, 136, 0.3);
  border: 1.5px solid #14b8a6;
  flex-shrink: 0;
}

.pause-icon-badge svg {
  width: 13px;
  height: 13px;
  fill: #ffffff;
  display: block;
}

.pause-stage-badge {
  display: none !important;
}

.pause-body {
  padding: 6px 12px !important;
  box-sizing: border-box !important;
}

/* 1. Hub Section (2x2 Grid) */
.pause-hub-section {
  text-align: left;
  margin-bottom: 6px;
}

.pause-section-title {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.6px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.pause-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  margin-top: 0;
}

.pause-hub-card {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 10px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  text-align: left;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
}

.pause-hub-card:hover {
  background: #f0fdfa;
  border-color: #0d9488;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(13, 148, 136, 0.14);
}

.pause-hub-card:active {
  transform: translateY(0);
}

.hub-card-icon {
  font-size: 1.15rem;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #edf2f7;
  flex-shrink: 0;
}

.hub-card-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hub-card-title {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.15;
}

.hub-card-desc {
  display: none !important;
}

/* 2. Settings Section */
.pause-settings-card {
  text-align: left;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 5px 10px;
  margin-bottom: 6px;
}

.pause-control-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  border-bottom: 1px solid #edf2f7;
}

.pause-control-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.pause-control-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pause-label-icon {
  font-size: 1.05rem;
  line-height: 1;
}

.pause-control-label b {
  display: block;
  font-size: 0.75rem;
  color: #1e293b;
  line-height: 1.15;
}

.pause-control-label small {
  display: block;
  font-size: 0.62rem;
  color: #64748b;
  margin-top: 1px;
}

/* Modern Compact Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 18px;
  flex-shrink: 0;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  transition: 0.25s;
  border-radius: 18px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--teal-primary, #0d9488);
}

.toggle-switch input:focus + .toggle-slider {
  box-shadow: 0 0 1px var(--teal-primary, #0d9488);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(16px);
}

/* Pause Buttons */
.pause-action-buttons {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
  padding: 6px 12px max(6px, env(safe-area-inset-bottom, 6px)) !important;
  background: #ffffff !important;
  border-top: 1.5px solid #f1f5f9 !important;
  box-shadow: none !important;
  position: static !important;
  margin-top: 0 !important;
}

.btn-pause-resume {
  width: 100% !important;
  min-height: 36px !important;
  padding: 7px 10px !important;
  font-size: 0.88rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  box-shadow: 0 3px 0 #0f766e, 0 4px 10px rgba(13, 148, 136, 0.25) !important;
  border-radius: 999px !important;
}

.pause-secondary-row {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 5px !important;
  width: 100% !important;
}

.btn-pause-retry {
  width: 100% !important;
  min-height: 32px !important;
  padding: 5px 8px !important;
  font-size: 0.78rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  background: #f8fafc !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #334155 !important;
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-weight: 700 !important;
  border-radius: 999px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.btn-pause-retry:hover {
  background: #eff6ff !important;
  border-color: #3b82f6 !important;
  color: #1d4ed8 !important;
  transform: translateY(-1px) !important;
}

.btn-pause-retry:active {
  transform: translateY(0) !important;
}

.btn-pause-quit {
  width: 100% !important;
  min-height: 32px !important;
  padding: 5px 8px !important;
  font-size: 0.78rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  border-radius: 999px !important;
}

.btn-danger-outline {
  background: transparent;
  color: #ef4444;
  border: 2px solid #ef4444;
  font-family: 'Fredoka', cursive, sans-serif;
  font-weight: 700;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-danger-outline:hover {
  background: #fef2f2;
  border-color: #dc2626;
  color: #dc2626;
  transform: translateY(-1px);
}

/* ================= FASE 6: TELAAH KLINIS 3 ASPEK & DPJP DIALOG ================= */
.modal-card.review-modal {
  max-width: 820px;
  width: 95%;
}

.review-aspect-card {
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.review-aspect-card.aspect-alert {
  border-left: 6px solid #ef4444 !important;
  animation: aspectAlertGlow 1.8s infinite alternate;
}

@keyframes aspectAlertGlow {
  0% { box-shadow: 0 0 0 rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 12px rgba(239, 68, 68, 0.25); }
}

.review-aspect-card.aspect-confirmed {
  border-left: 6px solid #10b981 !important;
}

.btn-pulse-alert {
  animation: btnPulseAlertAnim 0.35s ease-in-out 3;
}

@keyframes btnPulseAlertAnim {
  0% { transform: scale(1); box-shadow: 0 0 0 rgba(239, 68, 68, 0); }
  50% { transform: scale(1.04); box-shadow: 0 0 16px rgba(239, 68, 68, 0.6); }
  100% { transform: scale(1); box-shadow: 0 0 0 rgba(239, 68, 68, 0); }
}

/* Accessibility: Reduce Motion */
body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}

/* ================= 6-STEP EXPANSIONS (FARMASI JONA INSPIRED) ================= */

/* --- LANGKAH 1: KUSTOMISASI KARAKTER MODAL (Game-Modal No-Scroll) --- */
/* --- LANGKAH 1: LOKER STAF FARMASI & WARDROBE (WARDRUN STYLE - DEDICATED FULL SCREEN STUDIO) --- */
#modal-change-name.hidden,
.locker-screen-view.hidden {
  display: none !important;
}

.locker-modal,
.customizer-modal,
.locker-screen-view,
#modal-change-name.locker-screen-view {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  max-height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  z-index: 12500 !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  /* Background cerah segar khas game simulasi farmasi rumah sakit (Bright Medical Mint & Sky Glow - IDENTIK DENGAN LOADING SCREEN) */
  background: radial-gradient(circle at 50% 30%, #ffffff 0%, #f0fdfa 25%, #ccfbf1 55%, #99f6e4 80%, #5eead4 100%) !important;
  background-image: 
    radial-gradient(rgba(13, 148, 136, 0.13) 1.5px, transparent 1.5px),
    radial-gradient(circle at 50% 30%, #ffffff 0%, #f0fdfa 25%, #ccfbf1 55%, #99f6e4 80%, #5eead4 100%) !important;
  background-size: 26px 26px, 100% 100% !important;
  overflow: hidden !important;
  animation: lockerScreenFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#modal-change-name.hidden,
.locker-screen-view.hidden {
  display: none !important;
}

.locker-ambient-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

@keyframes lockerScreenFadeIn {
  from {
    opacity: 0;
    transform: scale(0.985);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.locker-screen-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 8px 14px 8px;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

/* Header Layar Studio Loker (Bright Clean Medical Style - Kompak & Terlihat Jelas) */
.locker-screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid #99f6e4;
  border-radius: 10px;
  margin-bottom: 7px;
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.12);
  flex-shrink: 0;
}

.locker-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-locker-back {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  background: #f0fdfa;
  border: 1.5px solid #99f6e4;
  border-radius: 7px;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 800;
  color: #0f766e;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.btn-locker-back:hover {
  background: #ccfbf1;
  border-color: #0d9488;
  color: #115e59;
  transform: translateX(-2px);
}

.btn-locker-back .back-arrow {
  font-size: 0.9rem;
  line-height: 1;
}

.locker-header-titles {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.locker-tag {
  font-size: 0.52rem;
  font-weight: 800;
  color: #0f766e;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-block;
  width: fit-content;
  letter-spacing: 0.4px;
}

.locker-title {
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-size: 1.05rem !important;
  color: #0f172a !important;
  margin: 1px 0 0 !important;
  line-height: 1.2;
  text-shadow: none !important;
}

.locker-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.locker-currency-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #fefce8;
  border: 1.5px solid #ca8a04;
  padding: 3.5px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #854d0e;
  box-shadow: 0 2px 6px rgba(202, 138, 4, 0.15);
}

.locker-currency-chip .chip-label {
  color: #a16207;
  font-size: 0.64rem;
}

.btn-locker-top-save {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4.5px 12px;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  border: 1.5px solid #0d9488;
  border-radius: 7px;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(13, 148, 136, 0.3);
  transition: all 0.18s ease;
  user-select: none;
}

.btn-locker-top-save:hover {
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(13, 148, 136, 0.4);
}

.locker-screen-header .btn-close-modal-icon {
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  color: #475569;
  font-size: 0.95rem;
  padding: 3px 8px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.locker-screen-header .btn-close-modal-icon:hover {
  background: #fee2e2;
  border-color: #ef4444;
  color: #dc2626;
}

/* Tata Letak Utama: 2 Kolom Panel Kaca Sejajar (Tanpa Restrukturisasi Layout) */
.locker-main-layout {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

/* Kolom Kiri: Katalog Loker & Identitas (Sleek Scrollable) */
.locker-catalog-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto !important;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(13, 148, 136, 0.45) transparent;
}

.locker-identity-card {
  background: linear-gradient(135deg, #f8fafc 0%, #f0fdfa 100%);
  border: 1.5px solid #cbd5e1;
  border-left: 3.5px solid #0d9488;
  border-radius: 8px;
  padding: 5px 8px;
  margin-bottom: 5px;
  text-align: left;
}

.locker-id-header {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 3px;
}

.id-badge-icon {
  font-size: 0.8rem;
}

.id-badge-title {
  font-size: 0.58rem;
  font-weight: 800;
  color: #0f766e;
  letter-spacing: 0.4px;
}

.locker-name-input-wrap {
  margin-bottom: 4px;
}

.customizer-input-label {
  font-size: 0.56rem !important;
  font-weight: 800;
  color: #475569;
  margin-bottom: 1px !important;
  display: block;
}

.locker-name-input-wrap input,
.customizer-input-row input {
  width: 100%;
  padding: 3px 7px !important;
  border-radius: 6px;
  border: 1.5px solid #cbd5e1;
  font-size: 0.76rem !important;
  font-weight: 700;
  font-family: inherit;
  color: #0f172a;
  box-sizing: border-box;
  background: #ffffff;
  height: 26px !important;
  min-height: 26px !important;
}

.locker-name-input-wrap input:focus,
.customizer-input-row input:focus {
  border-color: #0d9488;
  outline: none;
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.2);
}

.locker-identity-selectors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.id-selector-group .group-label {
  display: block;
  font-size: 0.52rem;
  font-weight: 800;
  color: #64748b;
  margin-bottom: 1.5px;
}

.customizer-choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5px;
}

.btn-customizer-choice {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 5px !important;
  padding: 2.5px 4px !important;
  font-size: 0.62rem !important;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 2.5px !important;
  justify-content: center;
  transition: all 0.15s ease;
  white-space: nowrap;
  height: 23px !important;
  min-height: 23px !important;
}

.btn-customizer-choice.active {
  background: #ccfbf1;
  border-color: #0d9488;
  color: #0f766e;
  box-shadow: 0 2px 4px rgba(13, 148, 136, 0.18);
}

/* Nav Tabs Wardrun */
.locker-nav-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 5px;
  border-bottom: 1.5px solid #e2e8f0;
  padding-bottom: 3px;
}

.locker-tab-btn {
  flex: 1;
  padding: 3.5px 6px;
  border-radius: 7px;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: all 0.15s ease;
  height: 25px;
  min-height: 25px;
}

.locker-tab-btn.active {
  background: #0d9488;
  border-color: #0d9488;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.25);
}

.locker-tab-content {
  display: none;
}

.locker-tab-content.active {
  display: block;
}

.catalog-section-label {
  font-size: 0.60rem;
  font-weight: 800;
  color: #0d9488;
  letter-spacing: 0.35px;
  margin-bottom: 4px;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-hint {
  font-size: 0.52rem;
  font-weight: 600;
  color: #64748b;
}

/* Grid Kartu Item Wardrun (Kompak & Elegan) */
.locker-items-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.locker-item-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 4px 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  min-height: 60px;
  max-height: 68px;
  box-sizing: border-box;
}

.locker-item-card:hover {
  transform: translateY(-1px);
  border-color: #0d9488;
  background: #f0fdfa;
}

.locker-item-card.wearing {
  border-color: #0d9488 !important;
  background: #f0fdfa !important;
  box-shadow: 0 0 0 2px #0d9488, 0 2px 6px rgba(13, 148, 136, 0.18) !important;
}

.locker-item-card.dimmed-item {
  opacity: 0.45;
  filter: grayscale(0.5);
  cursor: not-allowed;
  pointer-events: none;
}

.locker-item-icon-wrap {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  margin-bottom: 1px;
  border: 1px solid #e2e8f0;
}

.locker-item-icon-wrap svg {
  width: 17px;
  height: 17px;
  display: block;
}

.locker-item-title {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.15;
}

.locker-item-sub {
  font-size: 0.50rem;
  color: #64748b;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 78px;
}

.locker-item-status-pill {
  font-size: 0.48rem;
  font-weight: 800;
  padding: 0.5px 5px;
  border-radius: 999px;
  margin-top: 1px;
  background: #f1f5f9;
  color: #475569;
  line-height: 1.2;
}

.locker-item-card.wearing .locker-item-status-pill {
  background: #0d9488;
  color: #ffffff;
}

/* Row Warna Rambut (Salon Sub-Section 3) */
.locker-haircolor-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 5px;
}

.haircolor-swatch-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.62rem;
  font-weight: 700;
  color: #334155;
  transition: all 0.15s ease;
  user-select: none;
}

.haircolor-swatch-btn:hover {
  border-color: #0d9488;
  background: #f0fdfa;
}

.haircolor-swatch-btn.active {
  border-color: #0d9488;
  background: #f0fdfa;
  box-shadow: 0 0 0 2px #0d9488, 0 2px 6px rgba(13, 148, 136, 0.2);
}

.haircolor-swatch-btn .color-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.25);
  display: inline-block;
  flex-shrink: 0;
}

/* Kolom Kanan: Fitting Room & Podium (Kompak & Elegan) */
.locker-preview-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto !important;
  background: #ffffff;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  padding: 7px;
}

.fitting-room-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: radial-gradient(circle at center, #f0fdfa 0%, #e2e8f0 100%);
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 6px 8px;
  height: 100%;
  box-sizing: border-box;
}

.stage-spin-hint {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  font-size: 0.56rem;
  font-weight: 800;
  color: #0f766e;
  margin-bottom: 2px;
}

.stage-spin-hint .facing-pill {
  background: #ffffff;
  border: 1.5px solid #99f6e4;
  padding: 1.5px 6px;
  border-radius: 999px;
  color: #0f766e;
}

.btn-spin-stage {
  padding: 2px 7px;
  border-radius: 5px;
  border: 1.5px solid #0d9488;
  background: #ffffff;
  color: #0d9488;
  font-weight: 800;
  font-size: 0.60rem;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-spin-stage:hover {
  background: #0d9488;
  color: #ffffff;
  transform: rotate(15deg);
}

/* Panggung Podium Berputar (Tinggi Dikecilkan Proporsional) */
.podium-platform {
  position: relative;
  width: 130px;
  height: 115px;
  min-height: 115px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-bottom: 3px;
  user-select: none;
}

.podium-canvas {
  position: relative;
  z-index: 2;
  transform: scale(0.68) !important;
  transform-origin: center center !important;
  margin-top: -10px !important;
  filter: drop-shadow(0 6px 12px rgba(15, 23, 42, 0.28));
}

.podium-base-ring {
  position: absolute;
  bottom: 4px;
  width: 95px;
  height: 20px;
  background: linear-gradient(180deg, #fef08a 0%, #eab308 100%);
  border: 2px solid #ca8a04;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

/* Kartu "Your Look" (Kompak & Jelas) */
.your-look-card {
  width: 100%;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 9px;
  padding: 5px 8px;
  box-sizing: border-box;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.your-look-header {
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px dashed #e2e8f0;
  padding-bottom: 3px;
}

.your-look-avatar-mini,
.customizer-preview-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ccfbf1;
  border: 1.5px solid #0d9488;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.90rem;
  flex-shrink: 0;
}

.your-look-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.your-look-badge {
  font-size: 0.46rem;
  font-weight: 800;
  color: #0d9488;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.your-look-name {
  font-size: 0.72rem;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.your-look-outfit {
  font-size: 0.54rem;
  color: #64748b;
  font-weight: 700;
}

.your-look-lore {
  font-size: 0.54rem;
  color: #334155;
  font-style: italic;
  line-height: 1.25;
  background: #f8fafc;
  border-left: 2.5px solid #f59e0b;
  padding: 2.5px 6px;
  border-radius: 4px;
}

.your-look-note {
  font-size: 0.50rem;
  color: #94a3b8;
  line-height: 1.2;
}

.btn-save-look {
  width: 100%;
  padding: 5px 10px !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  border-radius: 7px !important;
  cursor: pointer;
  margin-top: 1px !important;
}

/* Responsive Mobile Layout (Kompak Tanpa Restrukturisasi Layout - Tetap 2 Kolom Sejajar) */
@media (max-height: 720px), (max-width: 1024px) {
  .locker-screen-view,
  #modal-change-name.locker-screen-view {
    padding: 0 !important;
  }
  .locker-screen-container {
    padding: 6px 12px 6px !important;
    height: 100% !important;
    box-sizing: border-box !important;
  }
  .locker-screen-header {
    padding: 4px 10px !important;
    margin-bottom: 6px !important;
    border-radius: 9px !important;
  }
  .locker-header-left {
    gap: 8px !important;
  }
  .btn-locker-back {
    padding: 3px 9px !important;
    font-size: 0.70rem !important;
    border-radius: 6px !important;
    gap: 4px !important;
  }
  .btn-locker-back .back-arrow {
    font-size: 0.85rem !important;
  }
  .locker-tag {
    font-size: 0.48rem !important;
    padding: 1px 5px !important;
    margin-bottom: 1px !important;
  }
  .locker-title {
    font-size: 0.90rem !important;
    margin: 0 !important;
    line-height: 1.15 !important;
  }
  .locker-header-right {
    gap: 6px !important;
  }
  .locker-currency-chip {
    padding: 2.5px 7px !important;
    font-size: 0.68rem !important;
    gap: 3px !important;
  }
  .locker-currency-chip .chip-label {
    font-size: 0.60rem !important;
  }
  .btn-locker-top-save {
    padding: 3.5px 9px !important;
    font-size: 0.68rem !important;
    border-radius: 6px !important;
    gap: 4px !important;
  }
  .locker-screen-header .btn-close-modal-icon {
    padding: 2px 7px !important;
    font-size: 0.85rem !important;
    border-radius: 6px !important;
  }

  /* Tetap 2 Kolom Sejajar (Tidak Berubah Tata Letak) */
  .locker-main-layout {
    display: grid !important;
    grid-template-columns: 1.25fr 0.95fr !important;
    gap: 8px !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  /* Kolom Kiri: Katalog & Identitas */
  .locker-catalog-panel {
    padding-right: 4px !important;
    min-height: 0 !important;
    overflow-y: auto !important;
  }
  .locker-identity-card {
    padding: 4px 7px !important;
    margin-bottom: 5px !important;
    border-radius: 8px !important;
  }
  .locker-id-header {
    margin-bottom: 2px !important;
    gap: 4px !important;
  }
  .id-badge-icon {
    font-size: 0.75rem !important;
  }
  .id-badge-title {
    font-size: 0.52rem !important;
  }
  .locker-name-input-wrap {
    margin-bottom: 3px !important;
  }
  .customizer-input-label {
    font-size: 0.50rem !important;
    margin-bottom: 1px !important;
  }
  .locker-name-input-wrap input {
    padding: 2px 6px !important;
    font-size: 0.72rem !important;
    height: 24px !important;
    min-height: 24px !important;
    border-radius: 5px !important;
  }
  .locker-identity-selectors {
    gap: 4px !important;
  }
  .id-selector-group .group-label {
    font-size: 0.48rem !important;
    margin-bottom: 1px !important;
  }
  .customizer-choice-row {
    gap: 3px !important;
  }
  .btn-customizer-choice {
    padding: 2px 4px !important;
    font-size: 0.58rem !important;
    height: 21px !important;
    min-height: 21px !important;
    border-radius: 5px !important;
    gap: 2px !important;
  }

  /* Nav Tabs */
  .locker-nav-tabs {
    gap: 4px !important;
    margin-bottom: 4px !important;
    padding-bottom: 2px !important;
  }
  .locker-tab-btn {
    padding: 2.5px 5px !important;
    font-size: 0.62rem !important;
    height: 23px !important;
    min-height: 23px !important;
    border-radius: 6px !important;
    gap: 3px !important;
  }

  /* Catalog Section Label & Grid */
  .catalog-section-label {
    font-size: 0.54rem !important;
    margin-bottom: 3px !important;
  }
  .section-hint {
    font-size: 0.48rem !important;
  }
  .locker-items-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 5px !important;
  }
  .locker-item-card {
    padding: 3px 2px !important;
    min-height: 56px !important;
    max-height: 64px !important;
    border-radius: 7px !important;
    gap: 1px !important;
  }
  .locker-item-card:hover {
    transform: none !important;
  }
  .locker-item-icon-wrap {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    font-size: 0.80rem !important;
    margin-bottom: 1px !important;
    border-width: 1px !important;
  }
  .locker-item-icon-wrap svg {
    width: 15px !important;
    height: 15px !important;
  }
  .locker-item-title {
    font-size: 0.56rem !important;
    line-height: 1.1 !important;
  }
  .locker-item-sub {
    font-size: 0.46rem !important;
    max-width: 72px !important;
  }
  .locker-item-status-pill {
    font-size: 0.46rem !important;
    padding: 0 4px !important;
    margin-top: 1px !important;
    line-height: 1.15 !important;
  }
  .locker-haircolor-row {
    gap: 4px !important;
    margin-bottom: 4px !important;
  }
  .haircolor-swatch-btn {
    padding: 2px 5px !important;
    font-size: 0.58rem !important;
    border-radius: 6px !important;
    gap: 3px !important;
  }
  .haircolor-swatch-btn .color-dot {
    width: 10px !important;
    height: 10px !important;
  }

  /* Kolom Kanan: Fitting Room & Preview */
  .locker-preview-panel {
    padding: 5px 6px !important;
    border-radius: 12px !important;
    min-height: 0 !important;
    overflow-y: auto !important;
  }
  .fitting-room-stage {
    padding: 5px 6px !important;
    border-radius: 10px !important;
    height: 100% !important;
  }
  .stage-spin-hint {
    font-size: 0.52rem !important;
    margin-bottom: 2px !important;
  }
  .stage-spin-hint .facing-pill {
    padding: 1px 6px !important;
    font-size: 0.52rem !important;
  }
  .btn-spin-stage {
    padding: 1px 6px !important;
    font-size: 0.56rem !important;
    border-radius: 5px !important;
  }
  .podium-platform {
    width: 120px !important;
    height: 102px !important;
    min-height: 102px !important;
    margin-bottom: 2px !important;
  }
  .podium-canvas {
    transform: scale(0.60) !important;
    transform-origin: center center !important;
    margin-top: -14px !important;
  }
  .podium-base-ring {
    width: 86px !important;
    height: 18px !important;
    bottom: 2px !important;
    border-width: 1.5px !important;
  }
  .your-look-card {
    padding: 4px 6px !important;
    gap: 2px !important;
    border-radius: 8px !important;
  }
  .your-look-header {
    padding-bottom: 2px !important;
    gap: 5px !important;
  }
  .customizer-preview-avatar,
  .your-look-avatar-mini {
    width: 22px !important;
    height: 22px !important;
    font-size: 0.80rem !important;
    border-width: 1px !important;
  }
  .your-look-badge {
    font-size: 0.44rem !important;
    letter-spacing: 0.3px !important;
  }
  .your-look-name {
    font-size: 0.66rem !important;
    line-height: 1.1 !important;
  }
  .your-look-outfit {
    font-size: 0.48rem !important;
    line-height: 1.1 !important;
  }
  .your-look-lore {
    font-size: 0.50rem !important;
    padding: 2px 5px !important;
    line-height: 1.2 !important;
    border-left-width: 2px !important;
    border-radius: 4px !important;
    margin: 0 !important;
  }
  .your-look-note {
    font-size: 0.46rem !important;
    line-height: 1.15 !important;
  }
  .btn-save-look {
    padding: 3.5px 8px !important;
    font-size: 0.66rem !important;
    border-radius: 6px !important;
    margin-top: 1px !important;
  }
}

/* Penyesuaian Ekstra untuk Layar Ultra Pendek (Contoh: height <= 380px) */
@media (max-height: 380px) {
  .locker-screen-container {
    padding: 3px 6px 3px !important;
  }
  .locker-screen-header {
    padding: 2.5px 6px !important;
    margin-bottom: 3px !important;
  }
  .locker-identity-card {
    padding: 3px 5px !important;
    margin-bottom: 3px !important;
  }
  .podium-platform {
    height: 88px !important;
    min-height: 88px !important;
  }
  .podium-canvas {
    transform: scale(0.52) !important;
    margin-top: -20px !important;
  }
  .your-look-note {
    display: none !important;
  }
}


/* --- LANGKAH 2: KARTU RAPOR DINAS 1080x1920 MODAL (CLEAN BRIGHT MEDICAL THEME) --- */
.share-card-modal {
  max-width: 520px !important;
  width: 95%;
  background: linear-gradient(180deg, #ffffff 0%, #f0fdfa 100%) !important;
  border: 3px solid #0d9488 !important;
  border-radius: 20px !important;
  box-shadow: 0 16px 40px rgba(13, 148, 136, 0.22) !important;
}

.share-card-preview-wrap {
  position: relative;
  width: 100%;
  max-height: 54vh;
  overflow-y: auto;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 30%, #ffffff 0%, #f0fdfa 40%, #ccfbf1 100%);
  border: 2px solid #99f6e4;
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.15);
  display: flex;
  justify-content: center;
  padding: 12px;
  margin-bottom: 14px;
}

.share-card-preview-wrap img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.2);
}

.share-card-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

/* --- LANGKAH 4: INTERCOM PHONE DARURAT CALL BADGE --- */
.phone-intercom-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fee2e2;
  border: 1.5px solid #ef4444;
  color: #b91c1c;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  animation: intercomRingPulse 0.8s infinite alternate;
}

@keyframes intercomRingPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 rgba(239, 68, 68, 0); }
  100% { transform: scale(1.05); box-shadow: 0 0 10px rgba(239, 68, 68, 0.5); }
}

.counseling-bubble {
  background: #f8fafc;
  border-left: 4px solid #0d9488;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 10px;
}

/* ==========================================================================
   LEVELING SYSTEM & MODALS: LEVEL UP, DE-ESCALATE, COLD CHAIN (Permenkes 72/2016)
   ========================================================================== */

/* 1. MODAL LEVEL UP & PROMOSI JABATAN */
.level-up-modal {
  display: flex !important;
  flex-direction: column !important;
  max-width: 520px !important;
  width: 92% !important;
  max-height: min(92vh, 640px) !important;
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden !important;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.35);
  border: 2px solid #5eead4;
  animation: modalPopIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  padding: 0 !important;
  box-sizing: border-box;
}

.level-up-header {
  flex-shrink: 0;
  background: linear-gradient(135deg, #0d9488, #0284c7);
  color: #ffffff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.level-up-icon-wrap {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  animation: pulseIcon 1.5s infinite alternate ease-in-out;
}

@keyframes pulseIcon {
  0% { transform: scale(1); }
  100% { transform: scale(1.08) rotate(3deg); }
}

.level-up-badge {
  display: inline-block;
  background: #fef08a;
  color: #854d0e;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 99px;
  margin-bottom: 4px;
}

.level-up-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(13, 148, 136, 0.4) transparent;
  padding: 18px 20px;
}

.level-up-modal .modal-footer {
  flex-shrink: 0;
  margin-top: 0 !important;
  padding: 10px 20px 14px !important;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
}

.level-up-card-banner {
  background: linear-gradient(135deg, #f0fdfa, #e0f2fe);
  border: 1.5px solid #99f6e4;
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 18px;
  text-align: center;
}

.level-up-rank-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  color: #0f766e;
  letter-spacing: 0.5px;
  background: #ccfbf1;
  padding: 3px 10px;
  border-radius: 99px;
  margin-bottom: 6px;
}

.level-up-card-banner h3 {
  margin: 4px 0 6px;
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
}

.level-up-card-banner p {
  margin: 0;
  font-size: 0.84rem;
  color: #475569;
  line-height: 1.4;
}

.level-up-perks-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: #334155;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.level-up-perks-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.level-up-perk-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.86rem;
  font-weight: 700;
  color: #1e293b;
  transition: all 0.2s;
}

.level-up-perk-item:hover {
  background: #f0fdf4;
  border-color: #86efac;
  transform: translateX(3px);
}

.level-up-perk-icon {
  font-size: 1.25rem;
}

/* 2. MODAL DE-ESKALASI PASIEN MARAH (SERVICE RECOVERY) */
.deescalate-modal {
  display: flex !important;
  flex-direction: column !important;
  max-width: 540px !important;
  width: 92% !important;
  max-height: min(92vh, 640px) !important;
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden !important;
  box-shadow: 0 20px 45px rgba(220, 38, 38, 0.25);
  border: 2px solid #fca5a5;
  animation: shakeShort 0.35s ease;
  padding: 0 !important;
  box-sizing: border-box;
}

@keyframes shakeShort {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.deescalate-header {
  flex-shrink: 0;
  background: linear-gradient(135deg, #b91c1c, #ea580c);
  color: #ffffff;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.deescalate-avatar {
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  animation: wobbleAnger 0.6s infinite alternate ease-in-out;
}

@keyframes wobbleAnger {
  0% { transform: rotate(-5deg); }
  100% { transform: rotate(5deg); }
}

.deescalate-badge {
  display: inline-block;
  background: #fef08a;
  color: #991b1b;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 99px;
  margin-bottom: 2px;
}

.deescalate-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(239, 68, 68, 0.4) transparent;
  padding: 16px 18px;
}

.deescalate-patience-wrap {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 8px 14px;
  margin-bottom: 14px;
}

.deescalate-patience-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 800;
  color: #b91c1c;
  margin-bottom: 5px;
}

.deescalate-patience-bar-bg {
  width: 100%;
  height: 8px;
  background: #fee2e2;
  border-radius: 99px;
  overflow: hidden;
}

.deescalate-patience-bar {
  height: 100%;
  background: linear-gradient(90deg, #ef4444, #f97316);
  transition: width 0.3s ease;
}

.deescalate-speech-bubble {
  background: #fff1f2;
  border-left: 4px solid #ef4444;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.45;
  margin-bottom: 16px;
  font-style: italic;
  position: relative;
}

.deescalate-options-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: #475569;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.deescalate-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.deescalate-option-btn {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.deescalate-option-btn:hover {
  background: #f0fdfa;
  border-color: #0d9488;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.15);
}

.deescalate-opt-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #334155;
  font-weight: 800;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.deescalate-option-btn:hover .deescalate-opt-num {
  background: #0d9488;
  color: #ffffff;
}

.deescalate-opt-content {
  flex: 1;
}

.deescalate-opt-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
}

.deescalate-opt-desc {
  font-size: 0.76rem;
  color: #64748b;
  line-height: 1.35;
}

.deescalate-modal .modal-footer {
  flex-shrink: 0;
  margin-top: 0 !important;
  padding: 10px 18px 14px !important;
  background: #ffffff;
  border-top: 1px solid #fee2e2;
  display: flex;
  justify-content: flex-end;
}

/* 3. MODAL ALARM RANTAI DINGIN KULKAS (COLD CHAIN BREAKDOWN) */
/* 3. MODAL ALARM RANTAI DINGIN KULKAS (COLD CHAIN BREAKDOWN) */
.cold-chain-modal {
  display: flex !important;
  flex-direction: column !important;
  max-width: 660px !important;
  width: 95% !important;
  max-height: min(94vh, 480px) !important;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden !important;
  box-shadow: 0 16px 40px rgba(2, 132, 199, 0.28);
  border: 2px solid #38bdf8;
  animation: modalPopIn 0.35s ease;
  padding: 0 !important;
  box-sizing: border-box;
}

.cold-chain-header {
  flex-shrink: 0;
  background: linear-gradient(135deg, #0284c7, #0f766e) !important;
  color: #ffffff !important;
  padding: 10px 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
}

.cold-chain-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.cold-chain-icon-wrap {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.2);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  animation: coldChainPulse 1s infinite alternate;
}

@keyframes coldChainPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 rgba(239, 68, 68, 0); }
  100% { transform: scale(1.05); box-shadow: 0 0 12px rgba(239, 68, 68, 0.5); }
}

.cold-chain-titles {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.cold-chain-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cold-chain-title-row h2 {
  margin: 0 !important;
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-size: 1.05rem !important;
  color: #ffffff !important;
  line-height: 1.2 !important;
}

.cold-chain-badge {
  display: inline-block;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 99px;
  letter-spacing: 0.3px;
}

.cold-chain-header .modal-subtitle {
  font-size: 0.70rem !important;
  color: rgba(255, 255, 255, 0.9) !important;
  display: block !important;
  margin-top: 1px !important;
  line-height: 1.2 !important;
}

.cold-chain-header .btn-close-modal {
  background: #f1f5f9 !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #475569 !important;
  border-radius: 8px !important;
  width: 28px !important;
  height: 28px !important;
  font-size: 0.85rem !important;
  font-weight: 800 !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.cold-chain-header .btn-close-modal:hover {
  background: #fee2e2 !important;
  border-color: #ef4444 !important;
  color: #dc2626 !important;
  transform: scale(1.05);
}

.cold-chain-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(2, 132, 199, 0.4) transparent;
  padding: 12px 16px !important;
  display: grid !important;
  grid-template-columns: 1fr 1.15fr !important;
  gap: 12px !important;
  align-items: stretch !important;
}

.cold-chain-col-status {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

.cold-chain-temp-display {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 0;
}

.temp-gauge {
  background: #fee2e2;
  border: 2px solid #ef4444;
  border-radius: 10px;
  padding: 6px 10px;
  text-align: center;
}

.temp-val {
  display: block;
  font-size: 1.35rem;
  font-weight: 900;
  color: #b91c1c;
  font-family: monospace;
  line-height: 1.1;
}

.temp-status {
  display: block;
  font-size: 0.65rem;
  font-weight: 800;
  color: #dc2626;
  margin-top: 2px;
}

.temp-info b {
  display: block;
  font-size: 0.72rem;
  color: #0369a1;
  margin-bottom: 3px;
}

.temp-info p {
  margin: 0;
  font-size: 0.70rem;
  color: #475569;
  line-height: 1.35;
}

.cold-chain-col-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
}

.cold-chain-steps-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: #334155;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.cold-chain-action-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cold-action-btn {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.cold-action-btn:hover {
  background: #f0fdf4;
  border-color: #10b981;
  transform: translateY(-1px);
}

.cold-action-btn.completed {
  background: #f0fdf4;
  border-color: #86efac;
  opacity: 0.88;
  pointer-events: none;
}

.cold-act-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.cold-act-text {
  flex: 1;
  min-width: 0;
}

.cold-act-text b {
  display: block;
  font-size: 0.76rem;
  color: #0f172a;
  line-height: 1.25;
}

.cold-act-text small {
  display: block;
  font-size: 0.65rem;
  color: #64748b;
  margin-top: 1px;
  line-height: 1.2;
}

.cold-act-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 99px;
  background: #e2e8f0;
  color: #475569;
  flex-shrink: 0;
}

.cold-action-btn.completed .cold-act-badge {
  background: #dcfce7;
  color: #15803d;
}

.cold-chain-modal .modal-footer {
  flex-shrink: 0;
  margin-top: 0 !important;
  padding: 8px 16px 10px !important;
  background: #ffffff;
  border-top: 1px solid #e0f2fe;
  display: flex;
  justify-content: flex-end;
}

.cold-chain-modal .modal-footer .btn-sec {
  height: 30px !important;
  min-height: 30px !important;
  font-size: 0.74rem !important;
  padding: 0 14px !important;
  border-radius: 8px !important;
}

/* ==========================================================================
   FARMASI JONA EXPANSION: 6 CORE FEATURE STYLES
   ========================================================================== */

/* 1. Feed Ticker Ambience Apotek RSUD Ciracos (Informasi: Bawah Tengah) */
.ambience-ticker-bar {
  position: absolute;
  bottom: 0.65rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  pointer-events: none;
  z-index: 23;
  width: auto;
  max-width: 90%;
}

.ticker-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 5px 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  max-width: 90vw;
  width: auto;
  animation: tickerFadeIn 0.4s ease;
}

.ticker-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDot 1.8s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.4; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.2); }
}

.ticker-icon {
  font-size: 0.95rem;
}

.ticker-text {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: #f1f5f9;
  letter-spacing: 0.2px;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  line-height: 1.35;
  transition: opacity 0.3s ease;
}

@keyframes tickerFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 2. Modal Verifikasi 2 Identitas Pasien (SKP 1) */
.verify-identity-modal {
  display: flex !important;
  flex-direction: column !important;
  max-width: min(92vw, 540px) !important;
  width: 92% !important;
  max-height: min(90vh, 325px) !important;
  background: #ffffff !important;
  border-radius: 14px !important;
  border: 2.5px solid #0d9488 !important;
  box-shadow: 0 10px 30px rgba(13, 148, 136, 0.22), 0 4px 14px rgba(15, 23, 42, 0.08) !important;
  padding: 6px 12px 8px 12px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.verify-header {
  background: transparent !important;
  color: #0f172a !important;
  padding: 0 0 5px 0 !important;
  border-bottom: 1.5px solid #e2e8f0 !important;
  border-radius: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  min-height: 32px !important;
  flex-shrink: 0 !important;
}

.verify-header h2 {
  font-size: 0.86rem !important;
  margin: 0 !important;
  font-weight: 800 !important;
  color: #0f172a !important;
}

.verify-icon-wrap {
  width: 26px !important;
  height: 26px !important;
  border-radius: 6px !important;
  background: #ccfbf1 !important;
  border: 1.5px solid #0d9488 !important;
  color: #0f766e !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1rem !important;
  flex-shrink: 0 !important;
}

.verify-badge {
  display: none !important;
}

.verify-body {
  padding: 5px 0 0 0 !important;
  overflow-y: auto !important;
  flex: 1 1 auto !important;
  box-sizing: border-box !important;
}

.verify-columns {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
  margin-bottom: 5px !important;
  align-items: stretch !important;
}

.verify-col-title {
  font-size: 0.70rem !important;
  font-weight: 800 !important;
  color: #475569 !important;
  margin-bottom: 3px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.3px !important;
  line-height: 1.2 !important;
}

.verify-patient-bubble {
  background: #eff6ff !important;
  border: 1.5px solid #93c5fd !important;
  border-radius: 8px !important;
  padding: 5px 8px !important;
  font-size: 0.73rem !important;
  font-weight: 700 !important;
  color: #1e3a8a !important;
  line-height: 1.3 !important;
  box-shadow: 0 2px 6px rgba(30, 58, 138, 0.05) !important;
  position: relative !important;
}

.verify-patient-bubble::before {
  content: "💬 ";
  margin-right: 2px;
}

.verify-patient-hint {
  font-size: 0.62rem !important;
  color: #64748b !important;
  margin-top: 3px !important;
  line-height: 1.2 !important;
}

.verify-doc-card {
  background: #f8fafc !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 4px 8px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.verify-doc-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  font-size: 0.68rem !important;
  color: #334155 !important;
  border-bottom: 1px dashed #e2e8f0 !important;
  padding-bottom: 1px !important;
  line-height: 1.2 !important;
}

.verify-doc-row:last-child {
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

.verify-doc-row b {
  color: #0f172a !important;
}

.allergy-tag {
  background: #fee2e2 !important;
  color: #b91c1c !important;
  font-weight: 700 !important;
  padding: 1px 4px !important;
  border-radius: 4px !important;
  font-size: 0.64rem !important;
}

.verify-question-banner {
  text-align: center !important;
  font-size: 0.74rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  background: #f1f5f9 !important;
  border-radius: 6px !important;
  padding: 4px 8px !important;
  margin-bottom: 5px !important;
  line-height: 1.2 !important;
}

.verify-actions-row {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
}

.btn-verify-match,
.btn-verify-mismatch,
.verify-actions-row button {
  border-radius: 8px !important;
  padding: 3px 8px !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  cursor: pointer !important;
  min-height: 30px !important;
  height: 30px !important;
  box-sizing: border-box !important;
}

.btn-verify-match {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: #fff !important;
  border: 1.5px solid #0f172a !important;
  box-shadow: 0 3px 0 #0f766e, 0 4px 10px rgba(13, 148, 136, 0.25) !important;
}

.btn-verify-mismatch {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #fff !important;
  border: 1.5px solid #0f172a !important;
  box-shadow: 0 3px 0 #991b1b, 0 4px 10px rgba(220, 38, 38, 0.25) !important;
}

.act-btn-icon {
  font-size: 0.9rem !important;
  width: 22px !important;
  height: 22px !important;
  background: rgba(255, 255, 255, 0.25) !important;
  border-radius: 6px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.btn-verify-match b, .btn-verify-mismatch b {
  display: block !important;
  font-size: 0.70rem !important;
  line-height: 1.1 !important;
  letter-spacing: 0.2px !important;
}

.btn-verify-match small, .btn-verify-mismatch small {
  display: block !important;
  font-size: 0.58rem !important;
  line-height: 1.1 !important;
  opacity: 0.9 !important;
  margin-top: 1px !important;
}

/* 3. Modal Lemari Narkotika & Psikotropika Kunci Ganda */
.narcotics-modal {
  display: flex !important;
  flex-direction: column !important;
  max-width: min(94vw, 520px) !important;
  width: 95% !important;
  max-height: min(92vh, 340px) !important;
  background: #ffffff;
  border-radius: 16px;
  border: 2px solid #b45309;
  box-shadow: 0 16px 36px rgba(180, 83, 9, 0.22);
  overflow: hidden !important;
  padding: 0 !important;
  box-sizing: border-box;
}

.narcotics-header {
  flex-shrink: 0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
  color: #0f172a !important;
  padding: 8px 14px !important;
  border-bottom: 2px solid #e2e8f0 !important;
  border-radius: 14px 14px 0 0;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
}

.narcotics-icon-wrap {
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
  background: #fef3c7 !important;
  border: 1.5px solid #d97706 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.15rem !important;
  flex-shrink: 0 !important;
}

.narcotics-header h2 {
  margin: 0 !important;
  font-family: 'Fredoka', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 0.95rem !important;
  color: #0f172a !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
}

.narcotics-badge {
  display: none !important;
}

.narcotics-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(180, 83, 9, 0.4) transparent;
  padding: 8px 12px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.narcotics-cabinet-visual {
  display: flex;
  width: 100%;
  height: 80px;
  background: #334155;
  border: 3px solid #1e293b;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.4);
  margin-bottom: 0 !important;
  position: relative;
}

.narc-steel-door {
  flex: 1;
  background: linear-gradient(135deg, #475569, #334155);
  border: 1px solid #64748b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #f8fafc;
  font-size: 0.68rem;
  font-weight: 700;
  gap: 3px;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.narc-steel-door small {
  font-size: 0.6rem;
  opacity: 0.9;
  white-space: nowrap;
}

.narc-steel-door.left-door {
  border-right: 2px solid #1e293b;
  transform-origin: left center;
}

.narc-steel-door.right-door {
  transform-origin: right center;
}

.narc-steel-door.open-left {
  transform: perspective(600px) rotateY(-85deg);
}

.narc-steel-door.open-right {
  transform: perspective(600px) rotateY(85deg);
}

.narc-lock-icon {
  font-size: 1.35rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
  transition: transform 0.3s ease;
}

.narcotics-locked-notice {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: 10px;
  padding: 6px 12px !important;
}

.narcotics-locked-notice p {
  font-size: 0.72rem;
  color: #92400e;
  margin: 0 !important;
  line-height: 1.3;
  text-align: left;
  flex: 1;
}

.narcotics-locked-notice #btnUnlockNarcotics {
  flex-shrink: 0;
  white-space: nowrap;
}

.narcotics-open-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.narcotics-register-card {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 6px 10px;
}

.narcotics-register-card h4 {
  font-size: 0.68rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
  border-bottom: 1px dashed #cbd5e1;
  padding-bottom: 3px;
  letter-spacing: 0.2px;
}

.narc-reg-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 3px 6px;
  font-size: 0.62rem;
  line-height: 1.2;
  align-items: center;
}

.narc-reg-grid > div {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.narc-reg-grid span {
  color: #64748b;
  margin-right: 3px;
  font-weight: 600;
}

.narc-reg-grid b {
  color: #0f172a;
  font-weight: 700;
}

#btnTakeNarcotics,
#btnUnlockNarcotics {
  height: 32px !important;
  min-height: 32px !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  padding: 4px 10px !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.2) !important;
  cursor: pointer !important;
}

.narcotics-modal .modal-footer {
  display: none !important;
}

/* Modal Ruang Pantry: 4 Kolom Responsive & Compact Sizing */
#modal-pantry .modal-footer {
  display: none !important;
}

.pantry-modal {
  max-width: min(96vw, 740px) !important;
  max-height: min(94vh, 320px) !important;
}

.pantry-menu-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 6px !important;
}

.pantry-item-card {
  padding: 6px 4px !important;
  border-radius: 10px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  gap: 2px !important;
}

/* 4. Modal Lembar Kertas Resep Fisik RSUD Ciracos */
.rx-sheet-modal {
  display: flex !important;
  flex-direction: column !important;
  max-width: 580px !important;
  width: 95% !important;
  max-height: min(92vh, 680px) !important;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  border: 1px solid #cbd5e1;
  overflow: hidden !important;
  padding: 0 !important;
  box-sizing: border-box;
}

.rx-paper-container {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(13, 148, 136, 0.4) transparent;
  background: #fafafa;
  background-image: radial-gradient(#e2e8f0 1px, transparent 0);
  background-size: 20px 20px;
  padding: 20px 22px;
  position: relative;
}

.rx-sheet-modal .modal-footer {
  flex-shrink: 0;
  margin-top: 0 !important;
}

.rx-paper-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.rx-paper-logo {
  font-size: 2.4rem;
  background: #f1f5f9;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0d9488;
  flex-shrink: 0;
}

.rx-paper-institution h4 {
  font-size: 0.68rem;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.rx-paper-institution h3 {
  font-size: 1rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}

.rx-paper-institution p {
  font-size: 0.68rem;
  color: #64748b;
}

.rx-paper-divider {
  height: 3px;
  background: linear-gradient(90deg, #0d9488, #0284c7);
  border-radius: 2px;
  margin: 10px 0 14px 0;
}

.rx-paper-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.78rem;
  margin-bottom: 14px;
}

.rx-meta-full {
  grid-column: span 2;
}

.rx-meta-lbl {
  color: #64748b;
  font-weight: 600;
  margin-right: 4px;
}

.rx-allergy-val {
  font-weight: 800;
  color: #b91c1c;
}

.rx-paper-recipe-body {
  position: relative;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 14px 18px 14px 48px;
  min-height: 120px;
  margin-bottom: 14px;
}

.rx-symbol {
  position: absolute;
  top: 8px;
  left: 12px;
  font-family: 'Times New Roman', serif;
  font-size: 2.2rem;
  font-weight: 900;
  color: #0d9488;
  line-height: 1;
}

.rx-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rx-item-entry {
  border-bottom: 1px dashed #e2e8f0;
  padding-bottom: 8px;
}

.rx-item-entry:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.rx-item-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
}

.rx-item-sig {
  font-size: 0.76rem;
  color: #475569;
  font-style: italic;
  margin-top: 2px;
}

.rx-paper-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 14px;
}

.rx-screening-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rx-screening-title {
  font-size: 0.68rem;
  font-weight: 800;
  color: #0d9488;
  letter-spacing: 0.3px;
}

.rx-screening-box small {
  font-size: 0.74rem;
  font-weight: 700;
  color: #334155;
}

.rx-doctor-stamp-wrap {
  position: relative;
}

.rx-stamp-circle {
  width: 90px;
  height: 90px;
  border: 2px dashed #0284c7;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #0369a1;
  padding: 6px;
  transform: rotate(-7deg);
  background: rgba(2, 132, 199, 0.05);
}

.rx-stamp-circle span {
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #0284c7;
  padding-bottom: 1px;
}

.rx-stamp-circle b {
  font-size: 0.66rem;
  line-height: 1.15;
  margin: 3px 0;
}

.rx-stamp-circle small {
  font-size: 0.54rem;
  opacity: 0.85;
}

/* 5. Rating Bintang & SPM Waktu Tunggu di Akhir Shift */
.shift-stars-banner {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 2.2rem;
  margin: 8px 0;
}

.star-rating-icon {
  display: inline-block;
  animation: starPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.star-rating-icon.star-1 { animation-delay: 0.15s; }
.star-rating-icon.star-2 { animation-delay: 0.35s; }
.star-rating-icon.star-3 { animation-delay: 0.55s; }

@keyframes starPop {
  0% { transform: scale(0) rotate(-45deg); opacity: 0; }
  70% { transform: scale(1.3) rotate(10deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.spm-metric-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.78rem;
  color: #166534;
  margin-top: 6px;
}

/* ================= REALISTIC GAME LOADING SPLASH SCREEN & BRIEFING ================= */
.splash-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  /* Background cerah segar khas game simulasi farmasi rumah sakit (Bright Medical Mint & Sky Glow) */
  background: radial-gradient(circle at 50% 30%, #ffffff 0%, #f0fdfa 25%, #ccfbf1 55%, #99f6e4 80%, #5eead4 100%);
  background-image: 
    radial-gradient(rgba(13, 148, 136, 0.13) 1.5px, transparent 1.5px),
    radial-gradient(circle at 50% 30%, #ffffff 0%, #f0fdfa 25%, #ccfbf1 55%, #99f6e4 80%, #5eead4 100%);
  background-size: 26px 26px, 100% 100%;
  opacity: 1;
  visibility: visible;
  overflow: hidden;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s ease;
}

.splash-overlay::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.85) 0%, rgba(204, 251, 241, 0.45) 50%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.splash-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Ambient Floating Hospital/Game Atmosphere in Background */
.splash-ambient-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.amb-cross, .amb-sparkle, .amb-pill, .amb-orb {
  position: absolute;
  user-select: none;
  font-weight: 900;
}

.amb-cross {
  color: #0d9488;
  opacity: 0.18;
  font-size: 2.2rem;
  animation: floatAmbUp 14s infinite linear;
}

.amb-cross.c1 { left: 10%; bottom: -10%; animation-delay: 0s; }
.amb-cross.c2 { left: 86%; bottom: -10%; animation-delay: 4.5s; font-size: 3rem; }
.amb-cross.c3 { left: 22%; bottom: -10%; animation-delay: 7s; font-size: 1.6rem; }
.amb-cross.c4 { left: 74%; bottom: -10%; animation-delay: 11s; font-size: 2.4rem; }

.amb-sparkle {
  color: #0284c7;
  opacity: 0.24;
  font-size: 1.8rem;
  animation: floatAmbUp 18s infinite linear;
}
.amb-sparkle.s1 { left: 18%; bottom: -10%; animation-delay: 2s; }
.amb-sparkle.s2 { left: 80%; bottom: -10%; animation-delay: 9s; font-size: 2.5rem; }

.amb-pill {
  opacity: 0.28;
  font-size: 2.2rem;
  animation: floatAmbUp 16s infinite linear;
}
.amb-pill.p1 { left: 32%; bottom: -10%; animation-delay: 5s; }
.amb-pill.p2 { left: 66%; bottom: -10%; animation-delay: 12.5s; }

.amb-orb {
  border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 234, 212, 0.4) 0%, transparent 70%);
  position: absolute;
  pointer-events: none;
}
.amb-orb.o1 { width: 320px; height: 320px; left: -80px; top: -60px; }
.amb-orb.o2 { width: 380px; height: 380px; right: -100px; bottom: -80px; }

@keyframes floatAmbUp {
  0% { transform: translateY(0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.25; }
  90% { opacity: 0.25; }
  100% { transform: translateY(-115vh) rotate(360deg); opacity: 0; }
}

/* 1. Loading Dinamis - Tampilan Menyatu Tanpa Kotak (Unboxed & Floating) */
#splashLoadingView,
.splash-loading-view {
  position: relative;
  z-index: 2;
  max-width: 620px;
  width: 100%;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: splashAppear 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.splash-card {
  max-width: 680px;
  width: 100%;
  position: relative;
}

@keyframes splashAppear {
  0% { transform: scale(0.92) translateY(16px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* Logo Wrap & Aura */
.splash-logo-wrap {
  position: relative;
  width: 130px;
  height: 130px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
}

.splash-logo-aura {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.65) 0%, rgba(13, 148, 136, 0.25) 50%, transparent 75%);
  animation: splashAuraPulse 2.8s infinite ease-in-out;
}

@keyframes splashAuraPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.15); opacity: 1; }
}

.splash-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
  filter: drop-shadow(0 14px 28px rgba(13, 148, 136, 0.35));
  animation: splashLogoFloat 3.2s infinite ease-in-out;
  position: relative;
  z-index: 2;
}

@keyframes splashLogoFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-7px) scale(1.02); }
}

/* Titles */
.splash-title-wrap {
  text-align: center;
  margin-bottom: 24px;
}

.splash-title-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.92);
  color: #0f766e;
  border: 2px solid #14b8a6;
  border-radius: 999px;
  padding: 4px 16px;
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.16);
}

.splash-main-title {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: clamp(2.6rem, 6.2vw, 3.8rem);
  font-weight: 800;
  margin: 0.15rem 0 0.4rem;
  line-height: 1.08;
  letter-spacing: 0.04em;
  color: #fffbdf;
  text-align: center;
  text-shadow:
    0 1px 0 #ffffff,
    0 2px 0 #fef08a,
    0 3px 0 #fde047,
    0 4px 0 #f59e0b,
    0 5px 0 #d97706,
    0 6px 0 #0d9488,
    0 7px 0 #0f766e,
    0 8px 18px rgba(13, 148, 136, 0.45),
    0 0 25px rgba(250, 204, 21, 0.55),
    0 0 45px rgba(45, 212, 191, 0.4);
  -webkit-text-stroke: 1.5px #0f766e;
  filter: drop-shadow(0 6px 14px rgba(13, 148, 136, 0.35));
  animation: splashTitlePopFloat 3.2s ease-in-out infinite alternate;
  user-select: none;
}

@keyframes splashTitlePopFloat {
  0% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 6px 14px rgba(13, 148, 136, 0.35));
  }
  50% {
    transform: translateY(-5px) scale(1.02);
    filter: drop-shadow(0 10px 22px rgba(13, 148, 136, 0.5)) drop-shadow(0 0 22px rgba(250, 204, 21, 0.4));
  }
  100% {
    transform: translateY(-7px) scale(1.015);
    filter: drop-shadow(0 12px 24px rgba(13, 148, 136, 0.45));
  }
}

.splash-sub-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  color: #0f766e;
  letter-spacing: 0.8px;
  margin-bottom: 0;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
}

/* Progress Bar */
.splash-loading-box {
  width: 100%;
  max-width: 520px;
  margin: 0 auto 20px;
}

.splash-progress-track {
  width: 100%;
  height: 18px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  overflow: hidden;
  border: 2.5px solid #0d9488;
  position: relative;
  box-shadow: 0 6px 18px rgba(13, 148, 136, 0.18), inset 0 2px 4px rgba(0, 0, 0, 0.06);
  margin-bottom: 8px;
  padding: 2px;
}

.splash-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0d9488 0%, #10b981 50%, #38bdf8 100%);
  border-radius: 999px;
  transition: width 0.15s ease-out;
  position: relative;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.splash-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  animation: progressSheen 1.8s infinite linear;
}

@keyframes progressSheen {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.splash-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
}

.splash-pct {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f766e;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.splash-state {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: #065f46;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* Tips Floating Frosted Capsule */
.splash-tips-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border: 2px solid rgba(13, 148, 136, 0.35);
  border-radius: 999px;
  padding: 10px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  box-shadow: 0 10px 28px rgba(13, 148, 136, 0.15);
  max-width: 540px;
  width: 100%;
  margin: 0 auto;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.splash-tips-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(13, 148, 136, 0.22);
}

.splash-tips-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
  animation: tipIconBounce 2s infinite ease-in-out;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

@keyframes tipIconBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15) rotate(6deg); }
}

.splash-tips-content {
  flex: 1;
  min-width: 0;
}

.splash-tips-tag {
  font-size: 0.65rem;
  font-weight: 800;
  color: #0d9488;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 2px;
}

.splash-tips-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: #115e59;
  line-height: 1.35;
  transition: opacity 0.2s ease;
}

/* ================= SCALE-DOWN KHUSUS MOBILE LANDSCAPE (GALAXY S25, IPHONE LANDSCAPE <= 540px TINGGI) ================= */
@media (max-height: 540px), (orientation: landscape) and (max-width: 950px) {
  .splash-overlay {
    padding: max(8px, env(safe-area-inset-top, 8px)) max(16px, env(safe-area-inset-right, 16px)) max(8px, env(safe-area-inset-bottom, 8px)) max(16px, env(safe-area-inset-left, 16px)) !important;
  }

  #splashLoadingView,
  .splash-loading-view {
    max-width: min(92vw, 540px) !important;
    padding: 0 !important;
  }

  .splash-logo-wrap {
    width: 68px !important;
    height: 68px !important;
    margin: 0 auto 6px !important;
  }

  .splash-logo-aura {
    inset: -8px !important;
  }

  .splash-title-wrap {
    margin-bottom: 8px !important;
  }

  .splash-title-badge {
    font-size: 0.65rem !important;
    padding: 2px 10px !important;
    margin-bottom: 4px !important;
  }

  .splash-main-title {
    font-size: clamp(1.4rem, 4.2vw, 1.85rem) !important;
    margin: 0.1rem 0 0.2rem !important;
    text-shadow:
      0 1px 0 #ffffff,
      0 2px 0 #fde047,
      0 3px 0 #f59e0b,
      0 4px 0 #0d9488,
      0 6px 14px rgba(13, 148, 136, 0.4) !important;
    -webkit-text-stroke: 1px #0f766e !important;
  }

  .splash-sub-title {
    font-size: 0.64rem !important;
    letter-spacing: 0.4px !important;
  }

  .splash-loading-box {
    max-width: 440px !important;
    margin: 0 auto 8px !important;
  }

  .splash-progress-track {
    height: 12px !important;
    border-width: 2px !important;
    margin-bottom: 4px !important;
    padding: 1px !important;
  }

  .splash-pct {
    font-size: 0.82rem !important;
  }

  .splash-state {
    font-size: 0.68rem !important;
  }

  .splash-tips-card {
    max-width: 460px !important;
    padding: 4px 14px !important;
    gap: 8px !important;
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.12) !important;
  }

  .splash-tips-icon {
    font-size: 1.25rem !important;
  }

  .splash-tips-tag {
    font-size: 0.58rem !important;
    margin-bottom: 1px !important;
  }

  .splash-tips-text {
    font-size: 0.72rem !important;
    line-height: 1.25 !important;
  }
}

/* ================= SCALE-DOWN KHUSUS MOBILE PORTRAIT (<= 540px LEBAR) ================= */
@media (max-width: 540px) and (min-height: 541px) {
  .splash-logo-wrap {
    width: 90px !important;
    height: 90px !important;
    margin: 0 auto 10px !important;
  }

  .splash-title-wrap {
    margin-bottom: 14px !important;
  }

  .splash-title-badge {
    font-size: 0.72rem !important;
    padding: 3px 12px !important;
  }

  .splash-main-title {
    font-size: 2.1rem !important;
  }

  .splash-sub-title {
    font-size: 0.7rem !important;
  }

  .splash-loading-box {
    max-width: 90vw !important;
    margin-bottom: 12px !important;
  }

  .splash-progress-track {
    height: 14px !important;
  }

  .splash-pct {
    font-size: 0.9rem !important;
  }

  .splash-state {
    font-size: 0.72rem !important;
  }

  .splash-tips-card {
    max-width: 90vw !important;
    padding: 8px 14px !important;
    gap: 10px !important;
  }

  .splash-tips-icon {
    font-size: 1.5rem !important;
  }

  .splash-tips-text {
    font-size: 0.78rem !important;
  }
}

/* 2. TAHAP BRIEFING (CARA BERMAIN - SEAMLESS FLOATING MISSION BOARD) */
.briefing-card {
  max-width: 860px;
  width: 95%;
  max-height: 94vh;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0 4px !important;
  text-align: left;
  background: transparent !important;
  backdrop-filter: none !important;
  border: none !important;
  box-shadow: none !important;
  position: relative;
  z-index: 2;
  box-sizing: border-box;
}

.briefing-card::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.briefing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 2px dashed rgba(13, 148, 136, 0.25);
  margin-bottom: 12px;
}

.briefing-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.briefing-tag {
  display: inline-block;
  background: #ccfbf1;
  color: #0f766e;
  border: 1.5px solid #5eead4;
  border-radius: 999px;
  padding: 2px 10px;
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  margin-bottom: 3px;
}

.briefing-header-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #0d9488, #0f766e);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 12px;
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(13, 148, 136, 0.3);
  flex-shrink: 0;
}

.briefing-mini-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 0;
  filter: drop-shadow(0 6px 14px rgba(13, 148, 136, 0.3));
  flex-shrink: 0;
}

.briefing-title {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  font-weight: 900;
  margin: 0;
  line-height: 1.15;
  background: linear-gradient(135deg, #064e3b 0%, #0d9488 60%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(13, 148, 136, 0.15));
}

.briefing-subtitle {
  font-size: 0.74rem;
  font-weight: 700;
  color: #115e59;
  display: block;
  margin-top: 2px;
}

/* 2-Column Game Quest Steps Grid */
.briefing-steps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

@media (max-width: 700px) {
  .briefing-steps-grid {
    grid-template-columns: 1fr;
  }
}

.briefing-step-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 10px 14px;
  position: relative;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 18px rgba(13, 148, 136, 0.1);
}

.briefing-step-item:hover {
  transform: translateY(-2px);
  border-color: #0d9488;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(13, 148, 136, 0.18);
}

.step-num-pill {
  position: absolute;
  top: -8px;
  right: 10px;
  background: linear-gradient(135deg, #0d9488, #10b981);
  color: #ffffff;
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.briefing-step-icon {
  font-size: 1.45rem;
  line-height: 1;
  background: #f0fdfa;
  padding: 7px;
  border-radius: 12px;
  border: 1.5px solid rgba(13, 148, 136, 0.3);
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.12);
  flex-shrink: 0;
}

.briefing-step-info {
  flex: 1;
  min-width: 0;
}

.step-tag-pill {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  color: #0d9488;
  background: #ccfbf1;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.step-tag-pill.tag-ctrl {
  color: #0284c7;
  background: #e0f2fe;
}

.briefing-step-info b {
  font-size: 0.85rem;
  color: #0f172a;
  display: block;
  margin-bottom: 2px;
  line-height: 1.2;
}

.briefing-step-info p {
  font-size: 0.75rem;
  color: #334155;
  margin: 0;
  line-height: 1.32;
}

.step-ctrl-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.ctrl-k {
  font-size: 0.72rem;
  color: #0f766e;
  background: #ffffff;
  border: 1px solid #99f6e4;
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 600;
}

.ctrl-k b {
  display: inline;
  color: #0f172a;
}

.briefing-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.briefing-skip-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #0f766e;
  cursor: pointer;
  user-select: none;
}

.briefing-skip-toggle input {
  cursor: pointer;
  width: 17px;
  height: 17px;
  accent-color: #0d9488;
}

.btn-start-game {
  width: 100%;
  padding: 14px 28px;
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981 0%, #0d9488 100%);
  border: none;
  border-bottom: 5px solid #047857;
  border-radius: 18px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.45);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  animation: pulsePlayBtn 2s infinite ease-in-out;
}

.btn-start-game:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.55);
  background: linear-gradient(135deg, #059669 0%, #0f766e 100%);
}

.btn-start-game:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
}

@keyframes pulsePlayBtn {
  0%, 100% { box-shadow: 0 8px 24px rgba(16, 185, 129, 0.45); }
  50% { box-shadow: 0 10px 32px rgba(16, 185, 129, 0.7); }
}

/* =========================================================
   STAGE SELECTOR MODAL & 50-STAGE PROGRESSION SYSTEM
   ========================================================= */
.stage-select-modal {
  max-width: 1100px !important;
  width: 95% !important;
  max-height: min(92dvh, 760px) !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(13, 148, 136, 0.4) transparent;
  background: #ffffff !important;
  border: 2.5px solid #0d9488 !important;
  border-radius: 20px !important;
  box-shadow: 0 20px 50px rgba(13, 148, 136, 0.22), 0 4px 16px rgba(15, 23, 42, 0.08) !important;
  padding: 16px 20px !important;
  box-sizing: border-box !important;
}

/* ================== ARCADE GAME STAGE SELECT STYLING ================== */
.stage-cards-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-height: none;
  overflow: visible;
  padding: 14px 6px 14px 2px;
}

@media (max-width: 860px) and (min-width: 541px) {
  .stage-cards-container {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 540px) {
  .stage-cards-container {
    grid-template-columns: 1fr !important;
  }
}

.stage-card {
  position: relative;
  border-radius: 14px;
  padding: 10px 12px 10px;
  border: 2px solid #cbd5e1;
  background: linear-gradient(155deg, #ffffff 0%, #f8fafc 100%);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 4px;
  box-shadow: 0 4px 0 #94a3b8, 0 6px 14px rgba(15, 23, 42, 0.07);
  text-align: left;
  user-select: none;
  overflow: hidden;
  min-width: 0;
  box-sizing: border-box;
}

.stage-card:hover {
  transform: translateY(-3px);
  border-color: #0d9488;
  background: linear-gradient(155deg, #ffffff 0%, #f0fdfa 100%);
  box-shadow: 0 7px 0 #0f766e, 0 14px 22px rgba(13, 148, 136, 0.22);
}

.stage-card:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #0f766e, 0 4px 10px rgba(13, 148, 136, 0.2);
}

.stage-card.active {
  border-color: #0d9488 !important;
  background: linear-gradient(155deg, #f0fdfa 0%, #e6fffa 100%) !important;
  box-shadow: 0 5px 0 #0f766e, 0 0 20px rgba(13, 148, 136, 0.35) !important;
  overflow: visible !important;
  padding-top: 13px !important;
  animation: selectCardPop 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes selectCardPop {
  0% { transform: scale(0.96); }
  60% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.stage-ribbon-active {
  position: absolute;
  top: -9px;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #14b8a6 0%, #0d9488 100%);
  color: #ffffff;
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 2px 9px;
  border-radius: 999px;
  box-shadow: 0 2px 0 #0f766e, 0 3px 8px rgba(13, 148, 136, 0.45);
  border: 1.5px solid #5eead4;
  white-space: nowrap;
  animation: ribbonPulse 2s infinite ease-in-out;
  z-index: 10;
}

@keyframes ribbonPulse {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.05); }
}

.stage-card.milestone-10,
.stage-card.milestone-card {
  border-color: #f59e0b !important;
  background: linear-gradient(155deg, #fffbeb 0%, #fef3c7 100%) !important;
  box-shadow: 0 5px 0 #d97706, 0 8px 18px rgba(245, 158, 11, 0.22) !important;
}

.stage-card.locked {
  background: linear-gradient(155deg, #f8fafc 0%, #f1f5f9 100%) !important;
  border: 2px dashed #cbd5e1 !important;
  box-shadow: 0 3px 0 #cbd5e1 !important;
  cursor: not-allowed !important;
}

.stage-card.locked:hover {
  transform: none !important;
  box-shadow: 0 3px 0 #cbd5e1 !important;
}

.stage-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
  gap: 4px;
}

.stage-card-num-badge {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2.5px 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.stage-card-num-badge.phase-1 {
  background: #ccfbf1;
  color: #0f766e;
  border: 1.5px solid #99f6e4;
}

.stage-card-num-badge.phase-2 {
  background: #fef3c7;
  color: #b45309;
  border: 1.5px solid #fde68a;
}

.stage-card-num-badge.phase-3 {
  background: #fee2e2;
  color: #b91c1c;
  border: 1.5px solid #fca5a5;
}

.stage-card-num-badge.phase-4 {
  background: #f3e8ff;
  color: #7e22ce;
  border: 1.5px solid #d8b4fe;
}

.stage-card-num-badge.phase-5 {
  background: linear-gradient(135deg, #fef3c7, #fef08a);
  color: #854d0e;
  border: 1.5px solid #facc15;
}

.stage-diff-chip {
  font-size: 0.58rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.stage-diff-chip.diff-mudah,
.stage-diff-chip.diff-sangat-mudah {
  background: #dcfce7;
  color: #15803d;
}

.stage-diff-chip.diff-normal {
  background: #e0f2fe;
  color: #0369a1;
}

.stage-diff-chip.diff-menantang {
  background: #fef3c7;
  color: #b45309;
}

.stage-diff-chip.diff-sukar,
.stage-diff-chip.diff-ahli {
  background: #fee2e2;
  color: #b91c1c;
}

.stage-card-title {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  margin-top: 1px;
  min-height: 2.15em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stage-card-sub {
  font-size: 0.67rem;
  font-weight: 700;
  color: #0d9488;
  margin-bottom: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stage-card-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 2px 0 4px;
}

.stage-chip {
  font-size: 0.60rem;
  font-weight: 700;
  background: #f1f5f9;
  color: #475569;
  padding: 1.5px 6px;
  border-radius: 5px;
  border: 1px solid #e2e8f0;
  white-space: nowrap;
}

.stage-chip.chip-team {
  background: #fef3c7;
  color: #b45309;
  border-color: #fde68a;
}

.stage-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1.5px dashed #e2e8f0;
  padding-top: 5px;
  margin-top: auto;
  gap: 4px;
}

.stage-stars-row {
  display: inline-flex;
  gap: 2px;
  align-items: center;
}

.star-pill {
  font-size: 0.88rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.star-pill.earned {
  color: #f59e0b;
  text-shadow: 0 1px 2px rgba(245, 158, 11, 0.4), 0 0 8px rgba(251, 191, 36, 0.7);
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.15));
}

.star-pill.empty {
  color: #cbd5e1;
  opacity: 0.55;
}

.stage-status-text {
  font-size: 0.62rem;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap;
}

.star-locked-label {
  font-size: 0.64rem;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.4px;
}

.stage-lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(248, 250, 252, 0.90);
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  border-radius: 12px;
  padding: 8px;
  text-align: center;
  pointer-events: none;
}

.stage-lock-icon {
  font-size: 1.3rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.stage-lock-hint {
  font-size: 0.66rem;
  font-weight: 800;
  color: #64748b;
  line-height: 1.25;
}

/* ================= MODAL PANDUAN / MISSION BRIEFING (TITLE & PAUSE MENU) ================= */
.howto-modal {
  max-width: 860px !important;
  width: 95% !important;
  max-height: 88vh !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  background: linear-gradient(180deg, #ffffff 0%, #f0fdfa 100%) !important;
  border: 3px solid #0d9488 !important;
  border-radius: 24px !important;
  box-shadow: 0 20px 50px rgba(13, 148, 136, 0.3), 0 10px 20px rgba(0, 0, 0, 0.2) !important;
  padding: 16px 20px 12px !important;
  position: relative;
  box-sizing: border-box !important;
}

.howto-modal::-webkit-scrollbar {
  width: 8px;
}

.howto-modal::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 8px;
}

.howto-modal::-webkit-scrollbar-thumb {
  background: #14b8a6;
  border-radius: 8px;
}

.howto-modal::-webkit-scrollbar-thumb:hover {
  background: #0d9488;
}

.btn-close-modal-icon {
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.15rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.18s ease;
  color: #475569;
  font-weight: 700;
  flex-shrink: 0;
}

.btn-close-modal-icon:hover {
  background: #fee2e2 !important;
  color: #ef4444 !important;
  border-color: #fca5a5 !important;
  transform: rotate(90deg) scale(1.05);
}

/* ================= TAB NAVIGASI MODAL PANDUAN (COZY ARCADE GAME TRACK) ================= */
.howto-tab-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #e6f6f4;
  border: 2px solid #99f6e4;
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  box-shadow: inset 0 2px 4px rgba(13, 148, 136, 0.08);
  flex-shrink: 0;
}
.howto-tab-nav::-webkit-scrollbar {
  display: none;
}
.howto-tab-btn {
  flex: 1;
  min-width: max-content;
  padding: 6px 14px;
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f766e;
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  user-select: none;
}
.howto-tab-btn:hover {
  background: rgba(255, 255, 255, 0.75);
  color: #0d9488;
  transform: translateY(-1px);
}
.howto-tab-btn.active {
  background: linear-gradient(180deg, #14b8a6 0%, #0d9488 100%) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  border: none !important;
  border-radius: 999px !important;
  box-shadow: 0 3px 0 #0f766e, 0 4px 10px rgba(13, 148, 136, 0.35) !important;
  transform: translateY(-1px);
}

.howto-tab-panel {
  display: none;
  animation: howtoTabFade 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.howto-tab-panel.active {
  display: block;
}

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

/* CARDS UNTUK TAB STAGES (1-15) */
.howto-stages-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.howto-tier-card {
  background: #ffffff;
  border: 1.5px solid #ccfbf1;
  border-left: 5px solid #0d9488;
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.howto-tier-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(13, 148, 136, 0.14);
}
.howto-tier-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.howto-tier-title {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f766e;
  display: flex;
  align-items: center;
  gap: 8px;
}
.howto-tier-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f0fdfa;
  border: 1px solid #5eead4;
  color: #0f766e;
}
.howto-tier-desc {
  font-size: 0.8rem;
  color: #334155;
  line-height: 1.45;
  margin-bottom: 6px;
}
.howto-tier-meta {
  display: flex;
  gap: 8px;
  font-size: 0.72rem;
  color: #64748b;
  flex-wrap: wrap;
}
.howto-tier-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f8fafc;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

/* CARDS UNTUK TAB RANKS (1-10) */
.howto-ranks-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
@media (max-width: 600px) {
  .howto-ranks-grid {
    grid-template-columns: 1fr;
  }
}
.howto-rank-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.howto-rank-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f0fdfa;
  border: 1.5px solid #99f6e4;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.howto-rank-info {
  flex: 1;
  min-width: 0;
}
.howto-rank-name {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.84rem;
  font-weight: 800;
  color: #0f766e;
  line-height: 1.2;
}
.howto-rank-req {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
}

/* CARDS UNTUK TAB SOP & PROSEDUR KHUSUS */
.howto-sop-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (max-width: 650px) {
  .howto-sop-grid {
    grid-template-columns: 1fr;
  }
}
.howto-sop-card {
  background: #ffffff;
  border: 1.5px solid #ccfbf1;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.08);
}
.howto-sop-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.howto-sop-icon {
  font-size: 1.4rem;
  line-height: 1;
}
.howto-sop-title {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f766e;
  line-height: 1.2;
}
.howto-sop-desc {
  font-size: 0.78rem;
  color: #334155;
  line-height: 1.4;
}
.howto-sop-desc b {
  color: #0f766e;
}
.howto-sop-alert {
  border-left: 4px solid #ef4444;
  background: #fff5f5;
  border-color: #fca5a5;
}
.howto-sop-alert .howto-sop-title {
  color: #b91c1c;
}

.howto-modal .briefing-header {
  border-bottom: none !important;
  padding-bottom: 4px !important;
  margin-bottom: 8px !important;
}

.howto-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  padding: 4px 8px 26px !important;
  box-sizing: border-box !important;
  scrollbar-width: thin !important;
  scrollbar-color: #14b8a6 #e6f6f4 !important;
}

.howto-body::-webkit-scrollbar {
  width: 6px !important;
}
.howto-body::-webkit-scrollbar-track {
  background: #e6f6f4 !important;
  border-radius: 999px !important;
}
.howto-body::-webkit-scrollbar-thumb {
  background: #14b8a6 !important;
  border-radius: 999px !important;
}
.howto-body::-webkit-scrollbar-thumb:hover {
  background: #0d9488 !important;
}

.etiket-guide-legend {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-top: 2px;
  font-size: 0.70rem;
  font-weight: 700;
  color: #0f766e;
}
.etiket-guide-legend span {
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: 4px;
  padding: 1px 5px;
}

.howto-footer {
  flex-shrink: 0 !important;
  margin-top: 8px !important;
  padding-top: 4px !important;
  display: flex !important;
  justify-content: flex-end !important;
}

#btnCloseHowTo {
  padding: 10px 24px;
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  border-radius: 999px;
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 0 #047857, 0 6px 14px rgba(5, 150, 105, 0.35);
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box !important;
}

#btnCloseHowTo:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #047857, 0 8px 18px rgba(5, 150, 105, 0.4);
}

#btnCloseHowTo:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #047857;
}


/* ==========================================================================
   MOBILE LANDSCAPE (480x320 & ALL COMPACT DEVICES) OVERRIDES (GAYA FARMASI JONA)
   ========================================================================== */
@media (max-height: 540px), (max-width: 960px) and (orientation: landscape) {
  /* 1. LAYAR JUDUL / TITLE SCREEN (SKALA PROPOSIONAL MOBILE, TIDAK ADA TOMBOL TERPOTONG) */
  #title-screen {
    justify-content: center !important;
    padding: max(6px, env(safe-area-inset-top, 6px)) max(12px, env(safe-area-inset-right, 12px)) max(6px, env(safe-area-inset-bottom, 6px)) max(12px, env(safe-area-inset-left, 12px)) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  /* Gelembung Dekoratif Mobile Landscape: Ditata Melengkung Rapi di Margin Layar (Tidak Menghalangi Kartu) */
  .title-bubble {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px !important;
    height: 34px !important;
    font-size: 1.05rem !important;
    position: absolute !important;
    z-index: 5 !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    background: rgba(255, 255, 255, 0.92) !important;
    border: 2px solid #5eead4 !important;
    box-shadow: 0 4px 10px rgba(13, 148, 136, 0.22) !important;
  }
  /* Margin Sisi Kiri (Lengkungan Busur Dekoratif) */
  .title-bubble.b1 { top: 9% !important; left: 3.2% !important; }
  .title-bubble.b7 { top: 33% !important; left: 1.4% !important; }
  .title-bubble.b5 { top: 57% !important; left: 1.4% !important; }
  .title-bubble.b3 { top: 81% !important; left: 3.2% !important; }

  /* Margin Sisi Kanan (Lengkungan Busur Dekoratif) */
  .title-bubble.b2 { top: 9% !important; right: 3.2% !important; }
  .title-bubble.b8 { top: 33% !important; right: 1.4% !important; }
  .title-bubble.b6 { top: 57% !important; right: 1.4% !important; }
  .title-bubble.b4 { top: 81% !important; right: 3.2% !important; }

  .title-box {
    max-width: min(85vw, 680px) !important;
    width: 85% !important;
    padding: 0.15rem 0.4rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    margin: 0 auto !important;
  }
  .title-header-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    margin-bottom: 2px !important;
    width: 100% !important;
  }
  .title-header-titles {
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }
  .title-logo-hero {
    margin-bottom: 1px !important;
  }
  .title-logo-img {
    width: 44px !important;
    height: auto !important;
  }
  .title-landscape-cols {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 680px !important;
    gap: 6px !important;
    align-items: center !important;
  }
  .title-col-left {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: 680px !important;
    align-items: stretch !important;
  }
  .title-col-right {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 680px !important;
    gap: 4px !important;
    align-items: center !important;
  }
  .setup-section {
    margin: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }
  .main-title {
    font-size: clamp(1.75rem, 5.2vw, 2.35rem) !important;
    margin: 0.1rem 0 0.15rem !important;
    line-height: 1.08 !important;
    letter-spacing: 0.03em !important;
    text-shadow:
      0 1px 0 #ffffff,
      0 2px 0 #fde047,
      0 3px 0 #f59e0b,
      0 4px 0 #0d9488,
      0 6px 14px rgba(13, 148, 136, 0.4) !important;
    -webkit-text-stroke: 1.2px #0f766e !important;
  }
  .main-sub {
    font-size: 0.62rem !important;
    margin-top: 0 !important;
    letter-spacing: 0.04em !important;
  }
  .main-tagline {
    font-size: 0.60rem !important;
    margin-bottom: 4px !important;
    display: block !important;
    line-height: 1.2 !important;
  }

  /* Subtitle yang dicoret: Hapus/sembunyikan agar kartu ringkas & proporsional */
  #titleStageDesc,
  .depo-info small,
  #titleLevelBadge,
  .career-subtitle {
    display: none !important;
  }

  /* 3 KARTU UTAMA SEJAJAR MENJADI 3 KOLOM PROPORSIONAL DI MOBILE LANDSCAPE */
  .depo-card-arcade,
  .title-player-card,
  .career-progress-card {
    padding: 6px 10px !important;
    border-radius: 12px !important;
    border-width: 1.5px !important;
    border-bottom-width: 3.5px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    min-height: 64px !important;
    height: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    width: 100% !important;
  }

  .title-card-top-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    margin-bottom: 4px !important;
  }

  /* Ikon-Ikon Kartu Utama */
  .depo-icon-box,
  #titleAvatarBadge,
  .career-badge-icon,
  #titleRankIcon {
    width: 26px !important;
    height: 26px !important;
    font-size: 1.05rem !important;
    border-radius: 6px !important;
    flex-shrink: 0 !important;
  }

  /* Kartu 1: Stage */
  .depo-info {
    flex: 1 !important;
    min-width: 0 !important;
  }
  .depo-info b {
    font-size: 0.74rem !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
  }
  .depo-stage-badge {
    font-size: 0.58rem !important;
    font-weight: 800 !important;
    padding: 2.5px 6px !important;
    border-radius: 5px !important;
    flex-shrink: 0 !important;
  }

  /* Kartu 2: Hero Farmasis */
  #titleRoleBadge {
    font-size: 0.52rem !important;
    font-weight: 800 !important;
    color: #0d9488 !important;
    letter-spacing: 0.4px !important;
    line-height: 1 !important;
  }
  #titlePlayerName {
    font-size: 0.76rem !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .btn-kustom-arcade,
  #btnTitleChangeName {
    font-size: 0.62rem !important;
    font-weight: 800 !important;
    padding: 2.5px 8px !important;
    min-height: 22px !important;
    border-radius: 6px !important;
    flex-shrink: 0 !important;
  }

  /* Kartu 3: Jenjang Karir & XP */
  .career-title,
  #titleRankName {
    font-size: 0.74rem !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .career-level-number,
  #titleLevelNum {
    font-size: 0.62rem !important;
    font-weight: 800 !important;
    padding: 2px 6px !important;
    border-radius: 5px !important;
    flex-shrink: 0 !important;
  }
  .career-xp-bar-wrap {
    width: 100% !important;
    margin-top: 2px !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
  }
  .career-xp-bar {
    flex: 1 !important;
    height: 4px !important;
    border-radius: 2px !important;
  }
  .career-xp-label,
  #titleXpText {
    font-size: 0.58rem !important;
    font-weight: 700 !important;
    color: #64748b !important;
    white-space: nowrap !important;
  }


  /* Tombol Mulai Dinas & Ekstra Actions */
  .title-actions {
    margin: 2px 0 0 !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    gap: 8px !important;
  }
  .btn-start-arcade,
  .btn-start-explore {
    flex: 1 1 0 !important;
    width: 100% !important;
    max-width: 340px !important;
    min-height: 33px !important;
    font-size: 0.78rem !important;
    padding: 5px 8px !important;
    border-radius: 999px !important;
    margin: 0 !important;
    white-space: nowrap !important;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.4) !important;
  }
  .btn-start-explore {
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4) !important;
  }
  .btn-start-icon {
    font-size: 0.82rem !important;
  }
  .title-extra-actions {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    margin-top: 4px !important;
    width: 100% !important;
  }
  .btn-mini-title {
    padding: 2px 5px !important;
    font-size: 0.58rem !important;
    border-radius: 999px !important;
    min-height: 22px !important;
    white-space: nowrap !important;
    flex-shrink: 0;
    gap: 2px !important;
  }

  /* 2. BRIEFING MODAL (Kompak & Gaya Arcade Game di Layar Mobile) */
  .briefing-modal {
    max-height: 96vh !important;
    max-width: 480px !important;
    width: 94% !important;
    padding: 8px 14px !important;
    border-radius: 16px !important;
    background: linear-gradient(180deg, #ffffff 0%, #f0fdfa 100%) !important;
    border: 2px solid #0d9488 !important;
    box-shadow: 0 6px 0 #0f766e, 0 12px 28px rgba(13, 148, 136, 0.28) !important;
  }
  .briefing-modal-header,
  .briefing-modal .modal-header,
  #modal-briefing .modal-header {
    padding-bottom: 4px !important;
    margin-bottom: 4px !important;
    text-align: left !important;
    justify-content: flex-start !important;
    display: flex !important;
    align-items: center !important;
  }
  .briefing-modal h2,
  #briefingShiftTitle {
    font-family: 'Fredoka', cursive, sans-serif !important;
    font-size: 1.02rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    letter-spacing: 0.3px !important;
    margin: 0 !important;
    text-align: left !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
  }
  .briefing-situation-card {
    padding: 4px 8px !important;
    margin: 3px 0 5px 0 !important;
    gap: 8px !important;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%) !important;
    border: 1.5px solid #f59e0b !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 0 #d97706 !important;
  }
  .briefing-icon {
    font-size: 1.3rem !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    border: 1.5px solid #f59e0b !important;
    display: grid !important;
    place-items: center !important;
    box-shadow: 0 1.5px 0 #d97706 !important;
    flex-shrink: 0 !important;
  }
  .briefing-info h3 {
    font-family: 'Fredoka', cursive, sans-serif !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    color: #b45309 !important;
    margin: 0 !important;
  }
  .briefing-info p {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: 0.64rem !important;
    font-weight: 600 !important;
    color: #78350f !important;
    margin: 0 !important;
    line-height: 1.2 !important;
  }
  .briefing-checklist {
    padding: 5px 8px !important;
    margin-bottom: 5px !important;
    background: linear-gradient(135deg, #f0fdfa 0%, #e6fffa 100%) !important;
    border: 1.5px solid #0d9488 !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 0 #0f766e !important;
  }
  .briefing-checklist h4 {
    font-family: 'Fredoka', cursive, sans-serif !important;
    font-size: 0.74rem !important;
    font-weight: 800 !important;
    color: #0f766e !important;
    letter-spacing: 0.5px !important;
    margin: 0 0 3px 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
  }
  .briefing-checklist ul {
    gap: 3px !important;
    margin: 0 !important;
    padding-left: 0 !important;
    list-style: none !important;
    display: flex !important;
    flex-direction: column !important;
  }
  .briefing-checklist li {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    color: #134e4a !important;
    line-height: 1.2 !important;
    padding: 3px 6px !important;
    border-radius: 6px !important;
    background: #ffffff !important;
    border: 1px solid #ccfbf1 !important;
    margin-bottom: 0 !important;
  }
  #btnStartBriefingShift {
    padding: 6px 22px !important;
    font-family: 'Fredoka', cursive, sans-serif !important;
    font-size: 0.92rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.6px !important;
    min-height: 34px !important;
    border-radius: 999px !important;
    background: linear-gradient(180deg, #10b981 0%, #059669 100%) !important;
    border: 2px solid #34d399 !important;
    box-shadow: 0 3px 0 #047857, 0 6px 14px rgba(16, 185, 129, 0.4) !important;
  }
  .briefing-modal .modal-footer {
    margin-top: 4px !important;
    padding-top: 0 !important;
  }

  /* 3. GAMEPLAY CANVAS & CONTROLS CLEARANCE (Compact Mobile Landscape) */
  #joystick-zone {
    width: 76px !important;
    height: 76px !important;
    bottom: max(10px, calc(8px + env(safe-area-inset-bottom, 0px))) !important;
    left: max(10px, calc(8px + env(safe-area-inset-left, 0px))) !important;
    opacity: 0.75 !important;
    border-width: 2px !important;
    touch-action: none !important;
    -webkit-touch-callout: none !important;
  }
  #joystick-knob {
    width: 32px !important;
    height: 32px !important;
  }
  #action-buttons {
    bottom: max(10px, calc(8px + env(safe-area-inset-bottom, 0px))) !important;
    right: max(10px, calc(8px + env(safe-area-inset-right, 0px))) !important;
    flex-direction: row !important;
    gap: 6px !important;
    touch-action: none !important;
    opacity: 0.92 !important;
    transition: opacity 0.2s ease !important;
  }
  #action-buttons:hover,
  #action-buttons:active {
    opacity: 1 !important;
  }
  .btn-action, .btn-drop {
    min-height: 44px !important;
    height: 44px !important;
    min-width: 90px !important;
    padding: 6px 14px !important;
    font-size: 0.76rem !important;
    font-weight: 800 !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.92), rgba(15, 118, 110, 0.92)) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    border: 2px solid #5eead4 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
    touch-action: none !important;
    -webkit-touch-callout: none !important;
  }
  .mobile-quick-nav {
    right: max(10px, calc(8px + env(safe-area-inset-right, 0px))) !important;
    bottom: max(58px, calc(56px + env(safe-area-inset-bottom, 0px))) !important;
    flex-direction: row !important;
    gap: 4px !important;
    opacity: 0.82 !important;
    transition: opacity 0.2s ease, transform 0.15s ease !important;
  }
  .mobile-quick-nav:hover,
  .mobile-quick-nav:active,
  .mobile-quick-nav:focus-within {
    opacity: 1 !important;
  }
  .btn-quick-nav {
    min-height: 30px !important;
    height: 30px !important;
    padding: 3px 10px !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    border: 1.5px solid rgba(13, 148, 136, 0.7) !important;
  }
  #carry-indicator {
    bottom: max(10px, calc(8px + env(safe-area-inset-bottom, 0px))) !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    padding: 2px 10px !important;
    font-size: 0.7rem !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(6px) !important;
  }

  /* 4. PANDUAN HOW-TO BRIEFING MODAL & MINIGAME BUTTONS (Compact Landscape Fit & Arcade Game Aesthetic) */
  .howto-modal {
    max-height: min(92vh, 390px) !important;
    padding: 6px 12px 6px !important;
    border-radius: 16px !important;
    max-width: min(94vw, 840px) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }
  .howto-modal .briefing-header {
    margin-bottom: 4px !important;
    padding: 2px 4px !important;
    border-bottom: none !important;
    flex-shrink: 0 !important;
  }
  .briefing-mini-logo {
    width: 22px !important;
    height: 22px !important;
  }
  .briefing-tag {
    display: none !important;
  }
  .briefing-title {
    font-size: 0.84rem !important;
    margin: 0 !important;
  }
  .briefing-subtitle {
    display: none !important;
  }
  .briefing-header-badge {
    display: none !important;
  }
  .howto-tab-nav {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    background: #e6f6f4 !important;
    border: 1.5px solid #99f6e4 !important;
    border-radius: 999px !important;
    padding: 2px 4px !important;
    margin-bottom: 5px !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    box-shadow: inset 0 2px 4px rgba(13, 148, 136, 0.08) !important;
    flex-shrink: 0 !important;
  }
  .howto-tab-btn {
    flex: 1 !important;
    padding: 3px 8px !important;
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    border-radius: 999px !important;
    background: transparent !important;
    color: #0f766e !important;
    border: none !important;
    box-shadow: none !important;
    white-space: nowrap !important;
    min-height: 24px !important;
    gap: 4px !important;
    transition: all 0.15s ease !important;
  }
  .howto-tab-btn:hover {
    background: rgba(255, 255, 255, 0.8) !important;
    color: #0d9488 !important;
  }
  .howto-tab-btn.active {
    background: linear-gradient(180deg, #14b8a6 0%, #0d9488 100%) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    border: none !important;
    border-radius: 999px !important;
    box-shadow: 0 2px 0 #0f766e, 0 3px 6px rgba(13, 148, 136, 0.3) !important;
    transform: translateY(-1px) !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25) !important;
  }
  .howto-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    padding: 2px 4px 22px !important;
    box-sizing: border-box !important;
  }
  .briefing-steps-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 4px !important;
  }
  .briefing-step-item {
    padding: 3px 6px !important;
    border-radius: 8px !important;
    gap: 4px !important;
    box-sizing: border-box !important;
  }
  .step-num-pill {
    width: 15px !important;
    height: 15px !important;
    font-size: 0.55rem !important;
    top: -4px !important;
    right: 5px !important;
  }
  .briefing-step-icon {
    font-size: 0.95rem !important;
    padding: 2px !important;
    border-radius: 6px !important;
  }
  .step-tag-pill {
    font-size: 0.50rem !important;
    padding: 1px 4px !important;
    margin-bottom: 1px !important;
  }
  .briefing-step-info b {
    font-size: 0.70rem !important;
    line-height: 1.15 !important;
    display: block !important;
  }
  .briefing-step-info p {
    font-size: 0.58rem !important;
    line-height: 1.2 !important;
    margin: 1px 0 0 0 !important;
  }
  .step-ctrl-keys {
    gap: 3px !important;
    margin-top: 1px !important;
  }
  .ctrl-k {
    font-size: 0.52rem !important;
    padding: 1px 3px !important;
  }
  .howto-tier-card {
    padding: 5px 8px !important;
    border-radius: 8px !important;
    margin-bottom: 4px !important;
  }
  .howto-tier-title {
    font-size: 0.74rem !important;
  }
  .howto-tier-badge {
    font-size: 0.54rem !important;
    padding: 1px 5px !important;
  }
  .howto-tier-desc {
    font-size: 0.62rem !important;
    margin-bottom: 2px !important;
    line-height: 1.3 !important;
  }
  .howto-tier-meta {
    font-size: 0.56rem !important;
    gap: 4px !important;
  }
  .howto-tier-meta span {
    padding: 2px 5px !important;
  }
  .howto-ranks-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 4px !important;
    margin-bottom: 4px !important;
  }
  .howto-rank-card {
    padding: 3px 6px !important;
    border-radius: 8px !important;
    gap: 5px !important;
  }
  .howto-rank-badge {
    width: 22px !important;
    height: 22px !important;
    font-size: 0.80rem !important;
    border-radius: 6px !important;
  }
  .howto-rank-name {
    font-size: 0.68rem !important;
  }
  .howto-rank-req {
    font-size: 0.56rem !important;
  }
  .xp-guide-box {
    padding: 5px 8px !important;
    border-radius: 8px !important;
    margin-top: 4px !important;
  }
  .howto-sop-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 5px !important;
  }
  .howto-sop-card {
    padding: 5px 8px !important;
    border-radius: 8px !important;
  }
  .howto-sop-icon {
    font-size: 1.1rem !important;
  }
  .howto-sop-title {
    font-size: 0.70rem !important;
  }
  .howto-sop-desc {
    font-size: 0.60rem !important;
    line-height: 1.3 !important;
  }
  .howto-modal .modal-footer,
  .howto-modal .howto-footer {
    flex-shrink: 0 !important;
    margin-top: 3px !important;
    padding: 2px 0 0 !important;
    display: flex !important;
    justify-content: flex-end !important;
  }
  #btnCloseHowTo {
    padding: 3px 16px !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    border-radius: 999px !important;
    min-height: 26px !important;
  }
  #btnGrind {
    min-height: 44px !important;
    font-size: 0.92rem !important;
    font-weight: 800 !important;
    border-radius: 999px !important;
  }
  #btnSterileAction {
    min-height: 42px !important;
    font-size: 0.85rem !important;
    font-weight: 800 !important;
    border-radius: 999px !important;
  }
}

/* ==========================================================================
   UNIFIED COZY HOSPITAL MODAL SYSTEM & MOBILE / HANDPHONE RESPONSIVENESS
   ========================================================================== */

/* 1. Standard Header Elements */
.modal-header-icon-box,
.stage-map-trophy,
.verify-icon-wrap {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  background: #ccfbf1 !important;
  border: 1.5px solid #0d9488 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.5rem !important;
  color: #0f766e !important;
  flex-shrink: 0 !important;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.15) !important;
}

.modal-category-badge,
.stage-modal-badge,
.verify-badge,
.shelf-badge {
  display: inline-block !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  color: #0f766e !important;
  background: #f0fdfa !important;
  border: 1px solid #99f6e4 !important;
  padding: 2px 8px !important;
  border-radius: 6px !important;
  margin-bottom: 3px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}

.btn-close-modal {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #64748b !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  flex-shrink: 0 !important;
  line-height: 1 !important;
  padding: 0 !important;
}

.btn-close-modal:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
  transform: scale(1.05);
}

.btn-close-modal:active {
  transform: scale(0.95);
}

/* ==========================================================================
   UNIVERSAL FARMASI JONA RESPONSIVE MODAL SYSTEM (MOBILE, TABLET & LANDSCAPE)
   Mencegah Pemotongan Tombol, Menjamin Fixed Header, Scrollable Body, & Sticky Footer
   ========================================================================== */

/* 1. Universal Pinned Header (Layer 1) */
.modal-header,
.review-modal-header,
.shift-end-header-box,
.pause-header,
.briefing-header,
.rx-paper-header,
.verify-header,
.dialogue-header,
.narcotics-header,
.stage-modal-header,
.leaderboard-modal-header,
.level-up-header,
.deescalate-header {
  flex-shrink: 0 !important;
  padding: 12px 18px !important;
  border-bottom: 2px solid #e2e8f0 !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
  position: relative !important;
  z-index: 10 !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
}

.pause-header {
  padding: 6px 12px 5px !important;
  border-bottom: 1.5px solid #f1f5f9 !important;
  background: #ffffff !important;
  justify-content: flex-start !important;
  text-align: left !important;
  gap: 8px !important;
}

.shift-end-header-box {
  padding: 6px 14px !important;
  justify-content: flex-start !important;
  text-align: left !important;
  gap: 8px !important;
}

.modal-header h2,
.shift-end-title-wrap h2,
.pause-header h2,
.verify-header h2,
.narcotics-header h2,
.dialogue-header-text h2,
.stage-modal-header h2,
.leaderboard-modal-header h2,
.level-up-header h2,
.deescalate-header h2,
.briefing-title {
  margin: 0 !important;
  font-family: 'Fredoka', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 1.2rem !important;
  color: #0f172a !important;
  line-height: 1.25 !important;
}

.modal-subtitle {
  font-size: 0.75rem !important;
  color: #64748b !important;
  display: block !important;
  margin-top: 2px !important;
}

/* 2. Universal Scrollable Body (Layer 2) */
.modal-body,
.shift-end-body,
.review-layout-grid,
.verify-body,
.narcotics-body,
.intercom-body,
.pio-body,
.jobs-body,
.triage-body,
.fefo-body,
.briefing-body,
.settings-body,
.customizer-body,
.stage-select-body,
.staff-body,
.howto-body,
.dialogue-body,
.deescalate-body,
.cold-chain-body,
.level-up-body,
.mortar-arena,
.badges-grid,
.leaderboard-body,
.share-card-preview-wrap,
.pause-body,
.rx-paper-container {
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  padding: 14px 18px !important;
  box-sizing: border-box !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(13, 148, 136, 0.4) transparent !important;
}

.pause-body {
  padding: 6px 12px !important;
}

.modal-body::-webkit-scrollbar,
.shift-end-body::-webkit-scrollbar,
.review-layout-grid::-webkit-scrollbar,
.verify-body::-webkit-scrollbar,
.narcotics-body::-webkit-scrollbar,
.intercom-body::-webkit-scrollbar,
.pio-body::-webkit-scrollbar,
.jobs-body::-webkit-scrollbar,
.triage-body::-webkit-scrollbar,
.fefo-body::-webkit-scrollbar,
.briefing-body::-webkit-scrollbar,
.settings-body::-webkit-scrollbar,
.customizer-body::-webkit-scrollbar,
.shelf-body::-webkit-scrollbar,
.stage-select-body::-webkit-scrollbar,
.staff-body::-webkit-scrollbar,
.howto-body::-webkit-scrollbar,
.dialogue-body::-webkit-scrollbar,
.deescalate-body::-webkit-scrollbar,
.cold-chain-body::-webkit-scrollbar,
.level-up-body::-webkit-scrollbar,
.sterile-arena::-webkit-scrollbar,
.mortar-arena::-webkit-scrollbar,
.badges-grid::-webkit-scrollbar,
.leaderboard-body::-webkit-scrollbar,
.rx-paper-container::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-thumb,
.shift-end-body::-webkit-scrollbar-thumb,
.review-layout-grid::-webkit-scrollbar-thumb,
.verify-body::-webkit-scrollbar-thumb,
.narcotics-body::-webkit-scrollbar-thumb,
.intercom-body::-webkit-scrollbar-thumb,
.pio-body::-webkit-scrollbar-thumb,
.jobs-body::-webkit-scrollbar-thumb,
.triage-body::-webkit-scrollbar-thumb,
.fefo-body::-webkit-scrollbar-thumb,
.briefing-body::-webkit-scrollbar-thumb,
.settings-body::-webkit-scrollbar-thumb,
.customizer-body::-webkit-scrollbar-thumb,
.shelf-body::-webkit-scrollbar-thumb,
.stage-select-body::-webkit-scrollbar-thumb,
.staff-body::-webkit-scrollbar-thumb,
.howto-body::-webkit-scrollbar-thumb,
.dialogue-body::-webkit-scrollbar-thumb,
.deescalate-body::-webkit-scrollbar-thumb,
.cold-chain-body::-webkit-scrollbar-thumb,
.level-up-body::-webkit-scrollbar-thumb,
.badges-grid::-webkit-scrollbar-thumb,
.leaderboard-body::-webkit-scrollbar-thumb,
.rx-paper-container::-webkit-scrollbar-thumb {
  background: rgba(13, 148, 136, 0.35);
  border-radius: 999px;
}

/* 3. Universal Sticky Pinned Footer (Layer 3) */
.modal-footer,
.shift-end-footer,
.rx-telaah-actions,
.verify-actions-row,
.share-card-actions,
.pause-action-buttons,
.shelf-footer-actions {
  flex-shrink: 0 !important;
  position: sticky !important;
  bottom: 0 !important;
  z-index: 20 !important;
  margin-top: auto !important;
  padding: 10px 18px max(10px, env(safe-area-inset-bottom, 10px)) !important;
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border-top: 2px solid #e2e8f0 !important;
  box-shadow: 0 -4px 14px rgba(15, 23, 42, 0.06) !important;
  display: flex !important;
  gap: 10px !important;
  align-items: center !important;
  justify-content: flex-end !important;
  box-sizing: border-box !important;
}

.shift-end-footer {
  justify-content: space-between !important;
  flex-direction: row !important;
}

.shelf-footer-actions {
  justify-content: space-between !important;
  flex-direction: row !important;
}

.verify-actions-row,
.pause-action-buttons {
  position: static !important;
  background: transparent !important;
  border-top: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.pause-action-buttons {
  padding: 4px 12px 6px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
  margin-top: 0 !important;
}

/* 4. Farmasi Jona Tactile 3D Buttons & Click Feedback */
.modal-footer button,
.shift-end-footer button,
.rx-telaah-actions button,
.verify-actions-row button,
.pause-action-buttons button,
.share-card-actions button,
.btn-dialogue-close,
.btn-next-shift-main,
.btn-start-game,
.btn-rx-pass,
.btn-rx-close,
.btn-rx-call,
.btn-verify-match,
.btn-verify-mismatch,
.btn-confirm-name,
.btn-customizer-choice {
  min-height: 42px !important;
  font-family: 'Fredoka', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.15s ease !important;
  touch-action: manipulation !important;
  box-sizing: border-box !important;
}

/* Tactile 3D Button Shadows */
.btn-pri,
.btn-next-shift-main,
.btn-rx-pass,
.btn-verify-match,
.btn-start-game,
#btnConfirmShelfTray {
  background: linear-gradient(135deg, #10b981 0%, #0d9488 100%) !important;
  border: 2px solid #0f172a !important;
  color: #ffffff !important;
  box-shadow: 0 4px 0 #0f766e, 0 6px 14px rgba(13, 148, 136, 0.3) !important;
}

.btn-pri:active,
.btn-next-shift-main:active,
.btn-rx-pass:active,
.btn-verify-match:active,
.btn-start-game:active,
#btnConfirmShelfTray:active {
  transform: translateY(2px) !important;
  box-shadow: 0 2px 0 #0f766e, 0 3px 8px rgba(13, 148, 136, 0.2) !important;
}

.btn-sec,
.btn-shift-sec,
.btn-rx-close,
.btn-dialogue-close,
.btn-pause-howto,
.btn-close-leaderboard,
#btnCloseShelf,
#btnCloseTriage,
#btnCloseIntercom,
#btnClosePio,
#btnCloseColdChain,
#btnCloseEtiket {
  background: transparent !important;
  border: 2px dashed #0f172a !important;
  color: #0f172a !important;
  box-shadow: none !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
}

.btn-sec:active,
.btn-shift-sec:active,
.btn-rx-close:active,
.btn-dialogue-close:active,
.btn-pause-howto:active,
.btn-close-leaderboard:active,
#btnCloseShelf:active,
#btnCloseTriage:active,
#btnCloseIntercom:active,
#btnClosePio:active,
#btnCloseColdChain:active,
#btnCloseEtiket:active {
  transform: translateY(2px) !important;
  box-shadow: 0 1px 0 #94a3b8 !important;
  background: rgba(15, 23, 42, 0.05) !important;
}

.btn-verify-mismatch,
.btn-danger,
.btn-danger-outline,
.btn-pause-quit {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  border: 2px solid #0f172a !important;
  color: #ffffff !important;
  box-shadow: 0 4px 0 #991b1b, 0 6px 12px rgba(220, 38, 38, 0.25) !important;
}

.btn-verify-mismatch:active,
.btn-danger:active,
.btn-danger-outline:active,
.btn-pause-quit:active {
  transform: translateY(2px) !important;
  box-shadow: 0 2px 0 #991b1b !important;
}

/* Floating Circular Close Buttons (✕) */
.btn-close-modal,
.btn-close-modal-icon,
.btn-dismiss-task,
#btnCloseNarcotics,
#btnCloseShelfX,
#btnCloseReviewX,
#btnCloseVerifyIdentityX,
#btnCloseHowToX,
#btnCloseStageSelectX,
#btnCloseCustomizerX,
#btnCloseStaffX,
#btnCloseBadgesX,
#btnCloseSettingsX,
#btnCloseEtiketX,
#btnCloseJobs,
#btnCloseJobsX {
  background: #fffdf9 !important;
  border: 2px solid #0f172a !important;
  border-radius: 50% !important;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 800 !important;
  font-size: 0.85rem !important;
  color: #0f172a !important;
  cursor: pointer !important;
  box-shadow: 0 2px 0 #cbd5e1 !important;
  transition: all 0.12s ease !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
}

.btn-close-modal:hover,
.btn-close-modal-icon:hover,
.btn-dismiss-task:hover,
#btnCloseNarcotics:hover,
#btnCloseEtiketX:hover,
#btnCloseJobs:hover,
#btnCloseJobsX:hover {
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
  color: #ef4444 !important;
  box-shadow: 0 2px 0 #f87171 !important;
}

.btn-close-modal:active,
.btn-close-modal-icon:active,
.btn-dismiss-task:active,
#btnCloseNarcotics:active,
#btnCloseEtiketX:active,
#btnCloseJobs:active,
#btnCloseJobsX:active {
  transform: translateY(2px) !important;
  box-shadow: 0 0 0 transparent !important;
}

/* 5. Mobile Portrait Responsiveness (< 768px) */
@media (max-width: 768px) {
  .modal-card {
    max-height: min(94dvh, calc(100vh - 14px)) !important;
    width: 96% !important;
    border-radius: 18px !important;
  }

  .review-modal-card {
    max-height: min(88dvh, 325px) !important;
    width: min(92vw, 700px) !important;
    max-width: min(92vw, 700px) !important;
    border-radius: 14px !important;
  }

  .etiket-modal,
  .verify-identity-modal,
  .intercom-modal {
    max-width: min(94vw, 500px) !important;
    max-height: min(92dvh, calc(100vh - 16px)) !important;
    border-radius: 14px !important;
    padding: 6px 10px 8px 10px !important;
  }

  .intercom-modal {
    max-width: min(88vw, 490px) !important;
    max-height: min(84dvh, 275px) !important;
    border-radius: 12px !important;
    padding: 4px 8px 6px 8px !important;
  }

  .modal-header,
  .review-modal-header,
  .shift-end-header-box,
  .pause-header,
  .briefing-header,
  .verify-header,
  .dialogue-header,
  .narcotics-header,
  .stage-modal-header,
  .leaderboard-modal-header {
    padding: 10px 14px !important;
  }

  .modal-header h2,
  .verify-header h2,
  .stage-select-modal h2 {
    font-size: 1.05rem !important;
  }

  .modal-subtitle {
    font-size: 0.68rem !important;
  }

  #order-clipboard {
    display: none !important;
  }

  .modal-body,
  .shift-end-body,
  .review-layout-grid,
  .verify-body,
  .narcotics-body,
  .intercom-body,
  .pio-body,
  .dialogue-body,
  .stage-select-body,
  .staff-body,
  .howto-body {
    padding: 10px 14px !important;
  }

  .modal-footer,
  .shift-end-footer,
  .rx-telaah-actions,
  .verify-actions-row,
  .shelf-footer-actions {
    padding: 8px 14px max(8px, env(safe-area-inset-bottom, 8px)) !important;
  }

  .modal-header-icon-box,
  .stage-map-trophy,
  .verify-icon-wrap,
  .dialogue-avatar {
    width: 36px !important;
    height: 36px !important;
    font-size: 1.2rem !important;
  }

  .verify-actions-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
  }

  .verify-actions-row button {
    flex: 1 !important;
    min-height: 44px !important;
    padding: 6px 8px !important;
  }

  .stage-cards-container {
    grid-template-columns: 1fr !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 12px 4px 6px !important;
  }

  .shelf-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 4px !important;
    max-height: none !important;
  }

  .review-col-main {
    display: grid !important;
    grid-template-columns: 1fr 1.12fr !important;
    gap: 8px !important;
    align-items: stretch !important;
  }

  .rx-official-paper {
    padding: 6px 10px !important;
    border-radius: 8px !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .rx-paper-kop {
    padding-bottom: 2px !important;
    margin-bottom: 4px !important;
    border-bottom: 1.5px solid #0f172a !important;
    text-align: center !important;
  }

  .rx-hospital-name {
    font-size: 0.76rem !important;
    letter-spacing: 0.02em !important;
    line-height: 1.1 !important;
    font-weight: 800 !important;
    margin: 0 !important;
  }

  .rx-hospital-sub {
    font-size: 0.50rem !important;
    margin-top: 1px !important;
    color: #64748b !important;
  }

  .rx-doc-row {
    padding-bottom: 2px !important;
    margin-bottom: 4px !important;
    font-size: 0.62rem !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .rx-doc-name {
    font-size: 0.62rem !important;
    font-weight: 700 !important;
  }

  .rx-doc-sip {
    font-size: 0.52rem !important;
    color: #64748b !important;
  }

  .rx-clinic-badge {
    font-size: 0.55rem !important;
    padding: 1px 5px !important;
    border-radius: 999px !important;
  }

  .rx-patient-grid {
    padding: 2px 6px !important;
    gap: 2px 6px !important;
    margin-bottom: 4px !important;
    border-radius: 4px !important;
    grid-template-columns: repeat(2, 1fr) !important;
    background: #f8fafc !important;
  }

  .rx-patient-cell {
    gap: 1px !important;
  }

  .rx-patient-label {
    font-size: 0.46rem !important;
    color: #94a3b8 !important;
  }

  .rx-patient-val {
    font-size: 0.60rem !important;
    color: #0f172a !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .rx-diag-row {
    padding: 2px 6px !important;
    font-size: 0.58rem !important;
    margin-bottom: 4px !important;
    border-radius: 4px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .rx-items-container {
    gap: 2px !important;
    margin-bottom: 4px !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .rx-item-entry {
    padding-bottom: 2px !important;
    border-bottom: 1px solid #f1f5f9 !important;
  }

  .rx-item-main {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .rx-item-title-row {
    gap: 4px !important;
    display: flex !important;
    align-items: center !important;
  }

  .rx-r-symbol {
    font-size: 0.85rem !important;
    line-height: 1 !important;
  }

  .rx-item-name {
    font-size: 0.66rem !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
  }

  .rx-form-badge {
    font-size: 0.50rem !important;
    padding: 1px 4px !important;
  }

  .rx-item-sig-row {
    padding-left: 12px !important;
    margin-top: 1px !important;
  }

  .rx-item-sig {
    font-size: 0.56rem !important;
    line-height: 1.1 !important;
    color: #475569 !important;
  }

  .rx-paper-footer {
    padding-top: 3px !important;
    font-size: 0.56rem !important;
    margin-top: auto !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-end !important;
    border-top: 1px dashed #cbd5e1 !important;
  }

  .rx-footer-reg {
    font-size: 0.56rem !important;
  }

  .rx-paraf-label {
    font-size: 0.48rem !important;
    margin-bottom: 1px !important;
  }

  .rx-paraf-sign {
    font-size: 0.56rem !important;
  }

  .rx-telaah-panel {
    padding: 6px 8px !important;
    border-radius: 8px !important;
    gap: 3px !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .rx-telaah-header {
    margin-bottom: 1px !important;
    gap: 4px !important;
    display: flex !important;
    align-items: center !important;
  }

  .rx-telaah-icon {
    font-size: 0.76rem !important;
  }

  .rx-telaah-title {
    font-size: 0.64rem !important;
    letter-spacing: 0.02em !important;
    font-weight: 800 !important;
  }

  .rx-telaah-grid {
    gap: 3px !important;
    margin-bottom: 3px !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .review-aspect-card {
    padding: 3px 6px !important;
    gap: 2px !important;
    border-radius: 5px !important;
    border-width: 1px !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03) !important;
  }

  .aspect-card-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .aspect-card-title {
    font-size: 0.62rem !important;
    font-weight: 700 !important;
  }

  .aspect-status-pill {
    font-size: 0.50rem !important;
    padding: 1px 4px !important;
    border-radius: 3px !important;
  }

  .aspect-checklist {
    gap: 1px !important;
    font-size: 0.54rem !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .chk-item {
    gap: 3px !important;
    display: flex !important;
    align-items: center !important;
  }

  .chk-icon-ok,
  .chk-icon-alert {
    font-size: 0.60rem !important;
  }

  .aspect-issue-note,
  .aspect-recom-note {
    padding: 2px 4px !important;
    font-size: 0.52rem !important;
    margin-top: 1px !important;
    line-height: 1.15 !important;
    border-radius: 3px !important;
  }

  .rx-telaah-actions {
    gap: 8px !important;
    margin-top: auto !important;
    padding: 3px 10px 4px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ffffff !important;
    border-top: 1.5px solid #e2e8f0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .btn-rx-pass,
  .btn-rx-call,
  .btn-rx-close {
    min-height: 28px !important;
    height: 30px !important;
    padding: 2px 6px !important;
    font-size: 0.68rem !important;
    border-radius: 6px !important;
    border-width: 1.5px !important;
    box-shadow: 0 2px 0 #047857 !important;
    white-space: nowrap !important;
    letter-spacing: 0.01em !important;
    gap: 4px !important;
  }

  .btn-rx-close {
    box-shadow: none !important;
  }

  .btn-rx-call {
    box-shadow: 0 2px 0 #92400e !important;
  }

  /* Skala Kompak Mobile Lemari Narkotika (< 768px) */
  .narcotics-modal {
    max-width: min(94vw, 480px) !important;
    max-height: min(94vh, 300px) !important;
    border-radius: 14px !important;
  }

  .narcotics-header {
    padding: 6px 12px !important;
    gap: 8px !important;
  }

  .narcotics-icon-wrap {
    width: 28px !important;
    height: 28px !important;
    font-size: 1.05rem !important;
    border-radius: 6px !important;
  }

  .narcotics-header h2 {
    font-size: 0.85rem !important;
  }

  #btnCloseNarcotics.btn-close-modal {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    min-height: 26px !important;
    font-size: 0.78rem !important;
  }

  .narcotics-body {
    padding: 6px 10px !important;
    gap: 6px !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .narcotics-cabinet-visual {
    width: 100% !important;
    height: 70px !important;
    border-width: 2.5px !important;
    border-radius: 8px !important;
  }

  .narc-steel-door {
    font-size: 0.62rem !important;
    gap: 2px !important;
  }

  .narc-steel-door small {
    font-size: 0.56rem !important;
  }

  .narc-lock-icon {
    font-size: 1.2rem !important;
  }

  .narcotics-locked-notice {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    padding: 5px 8px !important;
    border-radius: 8px !important;
  }

  .narcotics-locked-notice p {
    font-size: 0.68rem !important;
    margin: 0 !important;
    line-height: 1.25 !important;
    text-align: left !important;
    flex: 1 !important;
  }

  .narcotics-register-card {
    padding: 5px 8px !important;
    border-radius: 8px !important;
  }

  .narcotics-register-card h4 {
    font-size: 0.65rem !important;
    margin-bottom: 3px !important;
    padding-bottom: 2px !important;
  }

  .narc-reg-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 2px 4px !important;
    font-size: 0.58rem !important;
    line-height: 1.15 !important;
    align-items: center !important;
  }

  #btnTakeNarcotics,
  #btnUnlockNarcotics {
    height: 28px !important;
    min-height: 28px !important;
    font-size: 0.72rem !important;
    padding: 2px 8px !important;
    margin-top: 3px !important;
    border-radius: 6px !important;
  }
}

/* 6. Farmasi Jona Landscape & Short Screen System (< 540px Height) */
@media (max-height: 540px), (orientation: landscape) and (max-width: 920px) {
  .modal-card {
    max-height: min(88vh, 350px) !important;
    width: min(90vw, 760px) !important;
    border-radius: 16px !important;
  }

  .review-modal-card {
    max-height: min(88vh, 315px) !important;
    width: min(92vw, 700px) !important;
    max-width: min(92vw, 700px) !important;
    border-radius: 12px !important;
  }

  .intercom-modal,
  .pio-modal,
  .triage-modal,
  .etiket-modal,
  .verify-identity-modal {
    max-width: min(90vw, 520px) !important;
    max-height: min(88vh, 320px) !important;
  }

  .intercom-modal {
    max-width: min(88vw, 490px) !important;
    max-height: min(88vh, 300px) !important;
  }

  .verify-identity-modal {
    padding: 5px 8px 6px 8px !important;
  }
  .verify-identity-modal .verify-header {
    padding: 0 0 4px 0 !important;
    min-height: 28px !important;
  }
  .verify-identity-modal .verify-header h2 {
    font-size: 0.84rem !important;
  }
  .verify-identity-modal .verify-icon-wrap {
    width: 24px !important;
    height: 24px !important;
    font-size: 0.9rem !important;
  }
  .verify-identity-modal .verify-body {
    padding: 4px 0 0 0 !important;
  }
  .verify-columns {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
    margin-bottom: 4px !important;
  }
  .verify-patient-bubble {
    padding: 4px 6px !important;
    font-size: 0.68rem !important;
  }
  .verify-patient-hint {
    font-size: 0.56rem !important;
    margin-top: 2px !important;
  }
  .verify-doc-card {
    padding: 3px 6px !important;
    gap: 1px !important;
  }
  .verify-doc-row {
    font-size: 0.64rem !important;
    padding-bottom: 1px !important;
  }
  .verify-question-banner {
    font-size: 0.68rem !important;
    padding: 3px 6px !important;
    margin-bottom: 4px !important;
  }
  .verify-actions-row {
    padding: 0 !important;
    gap: 6px !important;
  }
  .verify-actions-row button,
  .btn-verify-match,
  .btn-verify-mismatch {
    min-height: 28px !important;
    height: 28px !important;
    padding: 2px 6px !important;
  }
  .btn-verify-match b,
  .btn-verify-mismatch b {
    font-size: 0.66rem !important;
  }
  .btn-verify-match small,
  .btn-verify-mismatch small {
    font-size: 0.54rem !important;
  }

  .etiket-header {
    padding: 3px 8px !important;
    min-height: 24px !important;
  }
  .etiket-body {
    padding: 3px 6px !important;
  }
  .etiket-item-list {
    gap: 3px !important;
  }
  .etiket-item {
    padding: 2.5px 6px !important;
  }
  .btn-etiket {
    padding: 1.5px 5px !important;
    font-size: 0.58rem !important;
    min-height: 20px !important;
    height: 20px !important;
  }
  .etiket-footer {
    padding: 3px 8px !important;
    min-height: 26px !important;
  }
  .etiket-footer button {
    height: 22px !important;
    min-height: 22px !important;
    font-size: 0.62rem !important;
    padding: 1px 8px !important;
  }

  .shelf-modal {
    max-width: min(96vw, 840px) !important;
    max-height: min(94vh, 330px) !important;
    border-radius: 12px !important;
  }

  .shelf-body {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    padding: 3px 6px !important;
  }

  .modal-header,
  .review-modal-header,
  .shift-end-header-box,
  .pause-header,
  .briefing-header,
  .verify-header,
  .dialogue-header,
  .narcotics-header,
  .stage-modal-header,
  .leaderboard-modal-header,
  .staff-modal-header,
  .badges-modal-header,
  .settings-modal-header {
    padding: 6px 14px !important;
  }

  .modal-subtitle,
  .dialogue-staff-meta,
  .stage-select-modal .modal-subtitle,
  .stage-modal-badge,
  .stage-select-modal .stage-modal-badge,
  .stage-select-modal .modal-footer,
  .briefing-subtitle,
  .howto-modal .briefing-subtitle,
  .leaderboard-live-badge-wrap,
  .leaderboard-modal .modal-footer,
  .staff-modal .modal-subtitle,
  .staff-modal .modal-footer,
  .staff-stage-notice,
  .badges-modal .modal-subtitle,
  .badges-modal .modal-footer,
  .settings-modal .modal-subtitle,
  .settings-modal .modal-footer,
  #order-clipboard {
    display: none !important;
  }

  .modal-header-icon-box,
  .stage-map-trophy,
  .verify-icon-wrap,
  .dialogue-avatar {
    width: 30px !important;
    height: 30px !important;
    font-size: 1rem !important;
  }

  .modal-header h2,
  .verify-header h2,
  .stage-select-modal h2 {
    font-size: 0.95rem !important;
  }

  .modal-body,
  .shift-end-body,
  .review-layout-grid,
  .verify-body,
  .narcotics-body,
  .intercom-body,
  .pio-body,
  .dialogue-body,
  .stage-select-body,
  .shelf-body,
  .staff-body,
  .howto-body {
    padding: 8px 12px !important;
  }

  .modal-footer,
  .shift-end-footer,
  .rx-telaah-actions,
  .verify-actions-row,
  .pause-action-buttons,
  .shelf-footer-actions {
    padding: 6px 14px max(6px, env(safe-area-inset-bottom, 6px)) !important;
  }

  .modal-footer button,
  .shift-end-footer button,
  .rx-telaah-actions button,
  .verify-actions-row button,
  .pause-action-buttons button {
    min-height: 36px !important;
    padding: 4px 12px !important;
    font-size: 0.85rem !important;
  }

  .pause-action-buttons {
    position: static !important;
    background: transparent !important;
    border-top: none !important;
    box-shadow: none !important;
    padding: 4px 12px 6px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
    margin-top: 0 !important;
  }

  /* 2-Column Side-by-Side Split View for Landscape Modals */
  .review-layout-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    align-items: start !important;
  }

  .review-layout-grid {
    display: block !important;
  }

  .review-col-main {
    display: grid !important;
    grid-template-columns: 1fr 1.12fr !important;
    gap: 8px !important;
    align-items: stretch !important;
  }

  /* Kertas Resep Kiri - Proporsional Kompak Mobile */
  .rx-official-paper {
    padding: 6px 10px !important;
    border-radius: 8px !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05) !important;
  }

  .rx-paper-kop {
    padding-bottom: 2px !important;
    margin-bottom: 4px !important;
    border-bottom: 1.5px solid #0f172a !important;
    text-align: center !important;
  }

  .rx-hospital-name {
    font-size: 0.76rem !important;
    letter-spacing: 0.02em !important;
    line-height: 1.1 !important;
    font-weight: 800 !important;
    margin: 0 !important;
  }

  .rx-hospital-sub {
    font-size: 0.50rem !important;
    margin-top: 1px !important;
    color: #64748b !important;
  }

  .rx-doc-row {
    padding-bottom: 2px !important;
    margin-bottom: 4px !important;
    font-size: 0.62rem !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .rx-doc-name {
    font-size: 0.62rem !important;
    font-weight: 700 !important;
  }

  .rx-doc-sip {
    font-size: 0.52rem !important;
    color: #64748b !important;
  }

  .rx-clinic-badge {
    font-size: 0.55rem !important;
    padding: 1px 5px !important;
    border-radius: 999px !important;
  }

  .rx-patient-grid {
    padding: 2px 6px !important;
    gap: 2px 6px !important;
    margin-bottom: 4px !important;
    border-radius: 4px !important;
    grid-template-columns: repeat(4, 1fr) !important;
    background: #f8fafc !important;
  }

  .rx-patient-cell {
    gap: 1px !important;
  }

  .rx-patient-label {
    font-size: 0.46rem !important;
    color: #94a3b8 !important;
  }

  .rx-patient-val {
    font-size: 0.60rem !important;
    color: #0f172a !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .rx-diag-row {
    padding: 2px 6px !important;
    font-size: 0.58rem !important;
    margin-bottom: 4px !important;
    border-radius: 4px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .rx-items-container {
    gap: 2px !important;
    margin-bottom: 4px !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .rx-item-entry {
    padding-bottom: 2px !important;
    border-bottom: 1px solid #f1f5f9 !important;
  }

  .rx-item-main {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .rx-item-title-row {
    gap: 4px !important;
    display: flex !important;
    align-items: center !important;
  }

  .rx-r-symbol {
    font-size: 0.85rem !important;
    line-height: 1 !important;
  }

  .rx-item-name {
    font-size: 0.66rem !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
  }

  .rx-form-badge {
    font-size: 0.50rem !important;
    padding: 1px 4px !important;
  }

  .rx-item-sig-row {
    padding-left: 12px !important;
    margin-top: 1px !important;
  }

  .rx-item-sig {
    font-size: 0.56rem !important;
    line-height: 1.1 !important;
    color: #475569 !important;
  }

  .rx-paper-footer {
    padding-top: 3px !important;
    font-size: 0.56rem !important;
    margin-top: auto !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-end !important;
    border-top: 1px dashed #cbd5e1 !important;
  }

  .rx-footer-reg {
    font-size: 0.56rem !important;
  }

  .rx-paraf-label {
    font-size: 0.48rem !important;
    margin-bottom: 1px !important;
  }

  .rx-paraf-sign {
    font-size: 0.56rem !important;
  }

  /* Lembar Telaah Kanan - Proporsional Kompak Mobile */
  .rx-telaah-panel {
    padding: 6px 8px !important;
    border-radius: 8px !important;
    gap: 3px !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .rx-telaah-header {
    margin-bottom: 1px !important;
    gap: 4px !important;
    display: flex !important;
    align-items: center !important;
  }

  .rx-telaah-icon {
    font-size: 0.76rem !important;
  }

  .rx-telaah-title {
    font-size: 0.64rem !important;
    letter-spacing: 0.02em !important;
    font-weight: 800 !important;
  }

  .rx-telaah-grid {
    gap: 3px !important;
    margin-bottom: 3px !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .review-aspect-card {
    padding: 3px 6px !important;
    gap: 2px !important;
    border-radius: 5px !important;
    border-width: 1px !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03) !important;
  }

  .aspect-card-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .aspect-card-title {
    font-size: 0.62rem !important;
    font-weight: 700 !important;
  }

  .aspect-status-pill {
    font-size: 0.50rem !important;
    padding: 1px 4px !important;
    border-radius: 3px !important;
  }

  .aspect-checklist {
    gap: 1px !important;
    font-size: 0.54rem !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .chk-item {
    gap: 3px !important;
    display: flex !important;
    align-items: center !important;
  }

  .chk-icon-ok,
  .chk-icon-alert {
    font-size: 0.60rem !important;
  }

  .aspect-issue-note,
  .aspect-recom-note {
    padding: 2px 4px !important;
    font-size: 0.52rem !important;
    margin-top: 1px !important;
    line-height: 1.15 !important;
    border-radius: 3px !important;
  }

  /* Tombol Aksi di Bawah Lembar Telaah */
  .rx-telaah-actions {
    gap: 8px !important;
    margin-top: auto !important;
    padding: 3px 10px 4px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ffffff !important;
    border-top: 1.5px solid #e2e8f0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .btn-rx-pass,
  .btn-rx-call,
  .btn-rx-close {
    min-height: 28px !important;
    height: 30px !important;
    padding: 2px 6px !important;
    font-size: 0.68rem !important;
    border-radius: 6px !important;
    border-width: 1.5px !important;
    box-shadow: 0 2px 0 #047857 !important;
    white-space: nowrap !important;
    letter-spacing: 0.01em !important;
    gap: 4px !important;
  }

  .btn-rx-close {
    box-shadow: none !important;
  }

  .btn-rx-call {
    box-shadow: 0 2px 0 #92400e !important;
  }

  .shift-end-modal {
    max-width: min(94vw, 760px) !important;
  }

  .verify-columns {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    align-items: start !important;
  }

  .verify-actions-row {
    flex-direction: row !important;
    gap: 10px !important;
  }

  .intercom-body {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) !important;
    gap: 8px !important;
    align-items: stretch !important;
  }

  .pio-modal {
    max-width: min(96vw, 680px) !important;
    max-height: min(94vh, 310px) !important;
  }

  .pio-body {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) !important;
    gap: 8px !important;
    align-items: start !important;
    padding: 5px 8px !important;
  }

  .dialogue-modal {
    max-width: min(94vw, 560px) !important;
    max-height: min(92vh, 320px) !important;
  }

  .dialogue-body {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    padding: 3px 6px !important;
  }

  .dialogue-info-grid {
    display: grid !important;
    grid-template-columns: 1.05fr 1fr !important;
    gap: 5px !important;
    margin-bottom: 2px !important;
  }

  /* Skala Kompak Mobile Landscape Lemari Narkotika (< 540px Height) */
  .narcotics-modal {
    max-width: min(94vw, 500px) !important;
    max-height: min(94vh, 260px) !important;
    border-radius: 12px !important;
  }

  .narcotics-header {
    padding: 5px 12px !important;
    gap: 8px !important;
  }

  .narcotics-icon-wrap {
    width: 26px !important;
    height: 26px !important;
    font-size: 1rem !important;
    border-radius: 6px !important;
  }

  .narcotics-header h2 {
    font-size: 0.82rem !important;
  }

  #btnCloseNarcotics.btn-close-modal {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    font-size: 0.75rem !important;
  }

  .narcotics-body {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    padding: 4px 10px !important;
  }

  .narcotics-cabinet-visual {
    width: 100% !important;
    height: 60px !important;
    border-width: 2px !important;
    border-radius: 8px !important;
    margin-bottom: 0 !important;
  }

  .narc-steel-door {
    font-size: 0.6rem !important;
    gap: 2px !important;
  }

  .narc-steel-door small {
    font-size: 0.54rem !important;
  }

  .narc-lock-icon {
    font-size: 1.15rem !important;
  }

  .narcotics-locked-notice {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    padding: 4px 8px !important;
    border-radius: 8px !important;
  }

  .narcotics-locked-notice p {
    font-size: 0.65rem !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    text-align: left !important;
    flex: 1 !important;
  }

  .narcotics-register-card {
    padding: 4px 8px !important;
    border-radius: 8px !important;
  }

  .narcotics-register-card h4 {
    font-size: 0.62rem !important;
    margin-bottom: 2px !important;
    padding-bottom: 2px !important;
  }

  .narc-reg-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 2px 4px !important;
    font-size: 0.58rem !important;
    line-height: 1.15 !important;
    align-items: center !important;
  }

  #btnTakeNarcotics,
  #btnUnlockNarcotics {
    height: 26px !important;
    min-height: 26px !important;
    font-size: 0.7rem !important;
    padding: 2px 6px !important;
    margin-top: 2px !important;
    border-radius: 6px !important;
  }

  .shift-end-body {
    display: grid !important;
    grid-template-columns: 0.85fr 1.15fr !important;
    gap: 10px !important;
    align-items: center !important;
  }

  /* ================= MODAL ALARM KULKAS OVERHEAT (COLD CHAIN) MOBILE FIT ================= */
  .cold-chain-modal {
    max-width: min(94vw, 760px) !important;
    max-height: min(94vh, 370px) !important;
    border-radius: 14px !important;
  }
  .cold-chain-header {
    padding: 6px 12px !important;
    gap: 8px !important;
  }
  .cold-chain-icon-wrap {
    width: 28px !important;
    height: 28px !important;
    font-size: 1.05rem !important;
    border-radius: 8px !important;
  }
  .cold-chain-title-row {
    gap: 6px !important;
  }
  .cold-chain-title-row h2 {
    font-size: 0.88rem !important;
    line-height: 1.15 !important;
  }
  .cold-chain-badge {
    font-size: 0.58rem !important;
    padding: 1px 6px !important;
  }
  .cold-chain-header .modal-subtitle {
    display: none !important;
  }
  .cold-chain-header .btn-close-modal {
    width: 24px !important;
    height: 24px !important;
    font-size: 0.78rem !important;
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #475569 !important;
  }
  .cold-chain-body {
    display: grid !important;
    grid-template-columns: 0.9fr 1.25fr !important;
    gap: 8px !important;
    padding: 6px 12px !important;
    align-items: stretch !important;
  }
  .cold-chain-col-status {
    gap: 5px !important;
    justify-content: center !important;
  }
  .cold-chain-temp-display {
    padding: 6px 8px !important;
    gap: 5px !important;
    border-radius: 10px !important;
  }
  .temp-gauge {
    padding: 4px 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
  }
  .temp-val {
    font-size: 1.15rem !important;
    line-height: 1 !important;
  }
  .temp-status {
    font-size: 0.58rem !important;
    margin: 0 !important;
  }
  .temp-info b {
    font-size: 0.65rem !important;
    margin-bottom: 2px !important;
  }
  .temp-info p {
    font-size: 0.60rem !important;
    line-height: 1.22 !important;
  }
  .cold-chain-col-actions {
    gap: 4px !important;
    justify-content: center !important;
  }
  .cold-chain-steps-title {
    font-size: 0.65rem !important;
    margin-bottom: 2px !important;
  }
  .cold-chain-action-list {
    gap: 4px !important;
  }
  .cold-action-btn {
    padding: 4px 8px !important;
    border-radius: 8px !important;
    gap: 6px !important;
  }
  .cold-act-icon {
    font-size: 1.05rem !important;
  }
  .cold-act-text b {
    font-size: 0.68rem !important;
    line-height: 1.15 !important;
  }
  .cold-act-text small {
    font-size: 0.56rem !important;
    line-height: 1.1 !important;
    margin-top: 1px !important;
  }
  .cold-act-badge {
    font-size: 0.58rem !important;
    padding: 1px 5px !important;
  }
  .cold-chain-modal .modal-footer {
    padding: 4px 12px 6px !important;
  }
  .cold-chain-modal .modal-footer .btn-sec {
    height: 26px !important;
    min-height: 26px !important;
    font-size: 0.68rem !important;
    padding: 0 10px !important;
  }

  /* ================= MODAL DE-ESKALASI PASIEN MARAH MOBILE FIT ================= */
  .deescalate-modal {
    max-width: min(94vw, 720px) !important;
    max-height: min(94vh, 370px) !important;
    border-radius: 14px !important;
  }
  .deescalate-header {
    padding: 6px 12px !important;
    gap: 8px !important;
  }
  .deescalate-avatar {
    width: 28px !important;
    height: 28px !important;
    font-size: 1.1rem !important;
  }
  .deescalate-header h2 {
    font-size: 0.88rem !important;
  }
  .deescalate-badge {
    font-size: 0.58rem !important;
    padding: 1px 6px !important;
  }
  .deescalate-header .modal-subtitle {
    display: none !important;
  }
  .deescalate-body {
    display: grid !important;
    grid-template-columns: 0.95fr 1.2fr !important;
    gap: 8px !important;
    padding: 6px 12px !important;
    align-items: stretch !important;
  }
  .deescalate-col-patient {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    justify-content: center !important;
  }
  .deescalate-col-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    justify-content: center !important;
  }
  .deescalate-patience-wrap {
    padding: 4px 8px !important;
  }
  .deescalate-speech-bubble {
    padding: 6px 8px !important;
    font-size: 0.68rem !important;
    line-height: 1.25 !important;
  }
  .deescalate-options-title {
    font-size: 0.65rem !important;
    margin-bottom: 2px !important;
  }
  .deescalate-options {
    gap: 4px !important;
  }
  .deescalate-option-btn {
    padding: 5px 8px !important;
    font-size: 0.68rem !important;
    border-radius: 8px !important;
  }
  .deescalate-modal .modal-footer {
    padding: 4px 12px 6px !important;
  }
  .deescalate-modal .modal-footer .btn-sec {
    height: 26px !important;
    min-height: 26px !important;
    font-size: 0.68rem !important;
    padding: 0 10px !important;
  }

  /* Sembunyikan notifikasi toast agar tidak menimpa header modal saat terbuka */
  body:has(.modal-overlay:not(.hidden)) #toast-container,
  #game-container:has(.modal-overlay:not(.hidden)) #toast-container {
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
  }

  /* Peta Tahapan Dinas (Stage Map): Skala Proposional Mobile 4-5 Stage per Baris */
  .stage-select-modal {
    max-width: min(94vw, 860px) !important;
    max-height: min(92vh, 390px) !important;
    padding: 6px 12px !important;
  }
  .stage-modal-header {
    padding: 6px 10px !important;
    margin-bottom: 4px !important;
  }
  .stage-select-body {
    padding: 4px 6px !important;
    margin-top: 0 !important;
  }
  .stage-progress-summary {
    padding: 4px 10px !important;
    margin-bottom: 12px !important;
    border-radius: 8px !important;
    gap: 8px !important;
  }
  .stage-progress-summary > div {
    gap: 5px !important;
  }
  .stage-progress-summary span {
    font-size: 0.64rem !important;
  }
  .stage-progress-summary b {
    font-size: 0.76rem !important;
  }
  .stage-phase-tabs {
    display: none !important;
  }
  .stage-cards-container {
    max-height: none !important;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
    gap: 8px !important;
    padding: 12px 4px 6px !important;
    overflow: visible !important;
  }
  .stage-card {
    padding: 6px 8px 6px !important;
    border-radius: 12px !important;
    border-width: 1.5px !important;
    border-bottom-width: 3px !important;
    position: relative !important;
  }
  .stage-card:hover {
    transform: translateY(-2px) !important;
  }
  .stage-card.active {
    overflow: visible !important;
    padding-top: 10px !important;
    border-color: #0d9488 !important;
  }
  .stage-ribbon-active {
    font-size: 0.54rem !important;
    padding: 2px 8px !important;
    top: -9px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    border-radius: 999px !important;
    border: 1.5px solid #5eead4 !important;
    box-shadow: 0 2px 0 #0f766e, 0 3px 8px rgba(13, 148, 136, 0.45) !important;
    z-index: 10 !important;
    white-space: nowrap !important;
  }
  .stage-card-header {
    margin-bottom: 2px !important;
  }
  .stage-card-num-badge {
    font-size: 0.60rem !important;
    padding: 1px 6px !important;
  }
  .stage-diff-chip {
    font-size: 0.54rem !important;
    padding: 1px 5px !important;
  }
  .stage-card-title {
    font-size: 0.72rem !important;
    line-height: 1.15 !important;
    margin: 2px 0 1px 0 !important;
  }
  .stage-card-sub {
    font-size: 0.58rem !important;
    margin-bottom: 2px !important;
    line-height: 1.1 !important;
  }
  .stage-card-chips {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 3px !important;
    margin: 2px 0 4px !important;
    overflow: hidden !important;
  }
  .stage-chip {
    font-size: 0.50rem !important;
    padding: 1px 3px !important;
    border-radius: 4px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
  .stage-card-footer {
    padding-top: 4px !important;
    border-top: 1px dashed #e2e8f0 !important;
  }
  .stage-stars-row {
    font-size: 0.66rem !important;
    gap: 1px !important;
  }
  .star-pill {
    font-size: 0.66rem !important;
  }
  .stage-status-text {
    font-size: 0.54rem !important;
  }
  .stage-lock-overlay {
    border-radius: 12px !important;
  }
  .stage-lock-icon {
    font-size: 1.1rem !important;
  }
  .stage-lock-hint {
    font-size: 0.55rem !important;
    padding: 2px 6px !important;
  }

  .shelf-grid {
    max-height: none !important;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 4px !important;
  }

  .pantry-modal {
    max-width: min(96vw, 760px) !important;
    max-height: min(94vh, 310px) !important;
    padding: 0 !important;
  }

  .pantry-menu-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 4px !important;
  }

  .pantry-item-card {
    padding: 5px 3px !important;
    border-radius: 8px !important;
    flex-direction: column !important;
    text-align: center !important;
    gap: 2px !important;
  }

  .pantry-item-card span[style*="font-size:2.5rem"],
  .pantry-item-card > span:first-child {
    font-size: 1.4rem !important;
    margin-bottom: 1px !important;
  }

  .pantry-item-card div[style*="font-weight:800"] {
    font-size: 0.68rem !important;
    line-height: 1.15 !important;
  }

  .pantry-item-card div[style*="font-size:0.75rem"],
  .pantry-item-card div[style*="font-size:0.54rem"] {
    font-size: 0.52rem !important;
    line-height: 1.15 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  .pantry-item-card span[style*="border-radius:999px"] {
    font-size: 0.50rem !important;
    padding: 1px 4px !important;
    line-height: 1.1 !important;
    white-space: normal !important;
  }

  /* MODAL KUSTOMISASI KARAKTER & IDENTITAS: SKALA PROPOSIONAL MOBILE */
  .customizer-modal {
    max-width: min(92vw, 560px) !important;
    max-height: min(92vh, 390px) !important;
    padding: 6px 12px !important;
  }
  .customizer-modal .modal-header {
    padding: 5px 8px !important;
    margin-bottom: 3px !important;
    gap: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
  .customizer-header-left {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 1 !important;
  }
  .customizer-modal .settings-header-icon {
    width: 26px !important;
    height: 26px !important;
    font-size: 0.95rem !important;
    flex-shrink: 0 !important;
  }
  .customizer-modal .modal-header h2 {
    font-size: 0.85rem !important;
    line-height: 1.15 !important;
    margin: 0 !important;
  }
  .customizer-modal .modal-subtitle {
    display: none !important;
  }
  .customizer-body {
    padding: 4px 6px !important;
  }
  .customizer-preview-box {
    padding: 3px 8px !important;
    margin-bottom: 4px !important;
    border-radius: 8px !important;
    gap: 8px !important;
  }
  .customizer-preview-avatar {
    width: 30px !important;
    height: 30px !important;
    font-size: 0.95rem !important;
  }
  .customizer-preview-meta b {
    font-size: 0.78rem !important;
  }
  .customizer-preview-meta small {
    font-size: 0.58rem !important;
    padding: 1px 6px !important;
  }
  .customizer-input-label {
    font-size: 0.60rem !important;
    margin-bottom: 1px !important;
  }
  .customizer-input-row {
    margin-bottom: 3px !important;
  }
  .customizer-input-row input {
    padding: 3px 8px !important;
    font-size: 0.75rem !important;
    height: 26px !important;
  }
  .customizer-section-title {
    font-size: 0.60rem !important;
    margin: 3px 0 2px 0 !important;
  }
  .customizer-choice-row {
    gap: 5px !important;
    margin-bottom: 3px !important;
  }
  .btn-customizer-choice {
    min-height: 28px !important;
    padding: 3px 6px !important;
    font-size: 0.68rem !important;
    border-radius: 8px !important;
    gap: 4px !important;
  }
  .btn-customizer-choice .choice-icon {
    font-size: 0.85rem !important;
  }
  .customizer-note {
    display: none !important;
  }
  .customizer-modal .modal-footer {
    padding: 4px 8px !important;
    margin-top: 4px !important;
    gap: 8px !important;
    display: flex !important;
    justify-content: flex-end !important;
  }
  .customizer-modal .modal-footer #btnCancelChangeName,
  #btnCancelChangeName {
    display: none !important;
  }
  .customizer-modal .modal-footer button {
    min-height: 28px !important;
    padding: 3px 12px !important;
    font-size: 0.74rem !important;
  }

  /* MODAL CATATAN KINERJA & SKOR (LEADERBOARD): SKALA PROPOSIONAL MOBILE */
  .leaderboard-modal {
    max-width: min(94vw, 840px) !important;
    max-height: min(92vh, 390px) !important;
    padding: 6px 12px !important;
  }
  .leaderboard-modal-header {
    padding: 5px 8px !important;
    margin-bottom: 4px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }
  .lb-header-title-box {
    gap: 6px !important;
    margin-bottom: 0 !important;
  }
  .leaderboard-header-icon {
    font-size: 1.15rem !important;
  }
  .leaderboard-modal-header h2 {
    font-size: 0.88rem !important;
    line-height: 1.15 !important;
  }
  .leaderboard-live-badge-wrap {
    display: none !important;
  }
  .leaderboard-modal .modal-footer {
    display: none !important;
  }
  .leaderboard-career-card {
    margin-bottom: 4px !important;
  }
  .career-game-card {
    padding: 4px 8px !important;
    border-radius: 10px !important;
    gap: 8px !important;
  }
  .career-avatar-badge {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
  }
  .career-avatar-icon {
    font-size: 1rem !important;
  }
  .career-avatar-lvl {
    font-size: 0.50rem !important;
    padding: 0 4px !important;
    bottom: -3px !important;
    right: -4px !important;
  }
  .career-name-text {
    font-size: 0.78rem !important;
  }
  .career-role-pill {
    font-size: 0.55rem !important;
    padding: 1px 5px !important;
  }
  .career-rank-title {
    font-size: 0.60rem !important;
    margin-top: 0 !important;
  }
  .career-stats-pills {
    gap: 5px !important;
  }
  .career-pill {
    padding: 2px 8px !important;
    min-width: 62px !important;
    border-radius: 8px !important;
  }
  .career-pill .pill-label {
    font-size: 0.50rem !important;
  }
  .career-pill .pill-value {
    font-size: 0.74rem !important;
  }
  .leaderboard-body {
    padding: 4px 4px !important;
    margin-bottom: 0 !important;
    max-height: none !important;
  }
  .lb-cards-list {
    gap: 4px !important;
  }
  .lb-game-card {
    padding: 4px 8px !important;
    border-radius: 8px !important;
    gap: 6px !important;
  }
  .lb-rank-badge,
  .lb-rank-num {
    font-size: 0.72rem !important;
    min-width: 26px !important;
  }
  .lb-player-avatar {
    width: 24px !important;
    height: 24px !important;
    font-size: 0.85rem !important;
  }
  .lb-player-name {
    font-size: 0.72rem !important;
  }
  .lb-player-role {
    font-size: 0.54rem !important;
  }
  .lb-title-badge {
    font-size: 0.54rem !important;
    padding: 1px 4px !important;
  }
  .lb-meta-row {
    font-size: 0.52rem !important;
  }
  .lb-score-xp {
    font-size: 0.74rem !important;
  }
  .lb-stars {
    font-size: 0.56rem !important;
  }
  .howto-tab-nav {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    background: #e6f6f4 !important;
    border: 1.5px solid #99f6e4 !important;
    border-radius: 999px !important;
    padding: 2px 4px !important;
    margin-bottom: 5px !important;
    box-shadow: inset 0 2px 4px rgba(13, 148, 136, 0.08) !important;
    flex-shrink: 0 !important;
  }
  .howto-tab-btn {
    flex: 1 !important;
    padding: 3px 8px !important;
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    border-radius: 999px !important;
    background: transparent !important;
    color: #0f766e !important;
    border: none !important;
    box-shadow: none !important;
    white-space: nowrap !important;
    min-height: 24px !important;
    gap: 4px !important;
  }
  .howto-tab-btn:hover {
    background: rgba(255, 255, 255, 0.8) !important;
    color: #0d9488 !important;
  }
  .howto-tab-btn.active {
    background: linear-gradient(180deg, #14b8a6 0%, #0d9488 100%) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    border: none !important;
    border-radius: 999px !important;
    box-shadow: 0 2px 0 #0f766e, 0 3px 6px rgba(13, 148, 136, 0.3) !important;
    transform: translateY(-1px) !important;
  }

  /* MODAL TIM STAF FARMASI: SKALA PROPOSIONAL MOBILE (LANDSCAPE COMPACT) */
  .staff-modal {
    max-width: min(94vw, 840px) !important;
    max-height: min(92vh, 390px) !important;
    padding: 6px 12px 6px !important;
    border-radius: 14px !important;
  }
  .staff-modal-header {
    padding: 4px 6px !important;
    margin-bottom: 3px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
  .staff-header-left {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 1 !important;
  }
  .staff-header-icon {
    font-size: 1.15rem !important;
    margin: 0 !important;
    line-height: 1 !important;
  }
  .staff-modal .modal-header h2 {
    font-size: 0.88rem !important;
    line-height: 1.15 !important;
    margin: 0 !important;
  }
  .staff-modal .modal-subtitle {
    display: none !important;
  }
  .staff-body {
    padding: 2px 4px !important;
    overflow-y: auto !important;
  }
  .staff-morale-bar-wrap {
    padding: 2px 8px !important;
    margin-bottom: 3px !important;
    border-radius: 6px !important;
  }
  .staff-morale-header {
    font-size: 0.62rem !important;
  }
  .staff-morale-header small {
    font-size: 0.54rem !important;
  }
  .mortar-bar-wrap {
    height: 4px !important;
    margin: 2px 0 2px !important;
  }
  .staff-stage-notice {
    display: none !important;
  }
  .staff-auto-routine-bar {
    padding: 3px 8px !important;
    margin-bottom: 4px !important;
    border-radius: 6px !important;
    gap: 4px !important;
  }
  .staff-auto-routine-bar div {
    font-size: 0.64rem !important;
  }
  .staff-auto-routine-bar div span {
    font-size: 0.60rem !important;
  }
  .staff-auto-routine-bar button {
    font-size: 0.58rem !important;
    padding: 2px 6px !important;
    min-height: 22px !important;
    border-radius: 6px !important;
  }
  .staff-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 5px !important;
    padding: 2px !important;
    margin-top: 2px !important;
  }
  .staff-card {
    padding: 4px 5px !important;
    border-radius: 8px !important;
    border-width: 1.5px !important;
  }
  .staff-card-avatar {
    font-size: 1.05rem !important;
    margin-bottom: 1px !important;
  }
  .staff-card-avatar svg {
    width: 22px !important;
    height: 22px !important;
  }
  .staff-card-name {
    font-size: 0.68rem !important;
    line-height: 1.15 !important;
    margin-top: 2px !important;
  }
  .staff-card-name span {
    font-size: 0.62rem !important;
  }
  .staff-card-role {
    font-size: 0.54rem !important;
    margin-bottom: 1px !important;
  }
  .staff-card-skill {
    font-size: 0.52rem !important;
    margin-bottom: 2px !important;
    line-height: 1.1 !important;
  }
  .staff-status-badge {
    font-size: 0.50rem !important;
    padding: 1px 4px !important;
    margin-bottom: 2px !important;
  }
  .staff-card button {
    font-size: 0.58rem !important;
    padding: 2px 4px !important;
    min-height: 22px !important;
    border-radius: 5px !important;
    margin-top: 2px !important;
  }
  .staff-card [style*="font-size:0.68rem"],
  .staff-card [style*="font-size:0.7rem"],
  .staff-card [style*="font-size:0.72rem"],
  .staff-card [style*="font-size:0.75rem"] {
    font-size: 0.52rem !important;
  }
  .staff-card [style*="margin:6px 0"],
  .staff-card [style*="margin:8px 0"] {
    margin: 2px 0 !important;
    font-size: 0.52rem !important;
  }
  .staff-card [style*="height:5px"] {
    height: 3px !important;
  }
  .staff-card [style*="min-height:16px"],
  .staff-card [style*="min-height:18px"] {
    min-height: 0 !important;
    margin: 1px 0 2px !important;
    font-size: 0.52rem !important;
  }
  .staff-card [style*="padding:2px 7px"],
  .staff-card [style*="padding:2px 8px"],
  .staff-card [style*="padding:1px 5px"] {
    padding: 1px 4px !important;
    font-size: 0.50rem !important;
  }
  .staff-modal .modal-footer {
    display: none !important;
  }

  /* MODAL LENCANA PRESTASI: SKALA PROPOSIONAL MOBILE (5 KOTAK PER BARIS) */
  .badges-modal {
    max-width: min(96vw, 880px) !important;
    max-height: min(92vh, 390px) !important;
    padding: 6px 12px 6px !important;
    border-radius: 14px !important;
  }
  .badges-modal-header {
    padding: 4px 6px !important;
    margin-bottom: 3px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
  .badges-header-left {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 1 !important;
  }
  .badges-header-icon {
    font-size: 1.15rem !important;
    margin: 0 !important;
    line-height: 1 !important;
  }
  .badges-modal .modal-header h2 {
    font-size: 0.88rem !important;
    line-height: 1.15 !important;
    margin: 0 !important;
  }
  .badges-modal .modal-subtitle {
    display: none !important;
  }
  .badges-grid {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 5px !important;
    max-height: min(290px, 72vh) !important;
    padding: 2px 4px 4px !important;
    margin-top: 3px !important;
    scrollbar-width: thin !important;
  }
  .badge-card {
    padding: 4px 5px !important;
    border-radius: 8px !important;
    border-width: 1.5px !important;
    gap: 4px !important;
    align-items: flex-start !important;
  }
  .badge-icon {
    font-size: 1.05rem !important;
    line-height: 1 !important;
    margin-top: 1px !important;
    flex-shrink: 0 !important;
  }
  .badge-info {
    flex: 1 !important;
    min-width: 0 !important;
  }
  .badge-name {
    font-size: 0.62rem !important;
    line-height: 1.15 !important;
    font-weight: 700 !important;
    word-break: break-word !important;
  }
  .badge-desc {
    font-size: 0.50rem !important;
    line-height: 1.15 !important;
    margin-top: 1px !important;
    word-break: break-word !important;
  }
  .badge-prog {
    font-size: 0.48rem !important;
    margin-top: 2px !important;
    line-height: 1.1 !important;
  }
  .badge-prog-bar {
    height: 3px !important;
    margin-top: 2px !important;
    border-radius: 999px !important;
  }
  .badges-modal .modal-footer {
    display: none !important;
  }

  /* MODAL PENGATURAN: SKALA PROPOSIONAL MOBILE */
  .settings-modal {
    max-width: min(92vw, 420px) !important;
    max-height: min(92vh, 360px) !important;
    padding: 6px 14px 6px !important;
    border-radius: 14px !important;
  }
  .settings-modal-header {
    padding: 4px 6px !important;
    margin-bottom: 3px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
  .settings-header-left {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 1 !important;
  }
  .settings-header-icon {
    font-size: 1.15rem !important;
    margin: 0 !important;
    line-height: 1 !important;
  }
  .settings-modal .modal-header h2 {
    font-size: 0.88rem !important;
    line-height: 1.15 !important;
    margin: 0 !important;
  }
  .settings-modal .modal-subtitle {
    display: none !important;
  }
  .settings-body {
    padding: 6px 8px !important;
    overflow-y: auto !important;
  }
  .settings-row {
    margin-bottom: 6px !important;
    gap: 8px !important;
  }
  .settings-row label {
    font-size: 0.72rem !important;
  }
  .settings-row button {
    min-height: 24px !important;
    padding: 2px 8px !important;
    font-size: 0.68rem !important;
    border-radius: 6px !important;
  }
  .settings-row[style*="border-top"] {
    margin-top: 8px !important;
    padding-top: 8px !important;
  }
  .settings-modal .modal-footer {
    display: none !important;
  }
}

/* ================= VERSI KOMPUTER / DESKTOP (BERSIH DARI ELEMEN KONTROL SENTUH & MENU DUPLIKAT) ================= */
.desktop-mode #mobile-controls,
.desktop-mode #joystick-zone,
.desktop-mode #action-buttons,
.desktop-mode #btnAction,
.desktop-mode #btnDrop,
.desktop-mode #mobile-quick-nav,
.desktop-mode #btnMobileMenu,
body:not(.touch-device) #mobile-controls,
body:not(.touch-device) #joystick-zone,
body:not(.touch-device) #action-buttons,
body:not(.touch-device) #btnAction,
body:not(.touch-device) #btnDrop,
body:not(.touch-device) #mobile-quick-nav,
body:not(.touch-device) #btnMobileMenu {
  display: none !important;
}

.desktop-mode #btnPause,
body:not(.touch-device) #btnPause {
  display: grid !important;
  place-items: center !important;
}

/* ================= TOMBOL MITOS RS: "KOK SEPI YA?" (RUSH HOUR TRIGGER) ================= */
.btn-jinx-sepi {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px;
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 2px solid #fdba74;
  border-bottom: 3px solid #ea580c;
  color: #9a3412;
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0 10px;
  height: 38px;
  min-height: 38px;
  max-height: 38px;
  box-sizing: border-box !important;
  margin: 0 !important;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.15);
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
  white-space: nowrap;
  vertical-align: middle;
}
.btn-jinx-sepi:hover {
  transform: translateY(-1.5px) scale(1.03);
  background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
  border-color: #f97316;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.25);
  color: #7c2d12;
}
.btn-jinx-sepi:active {
  transform: translateY(1.5px);
  border-bottom-width: 1.5px;
  box-shadow: 0 1px 3px rgba(234, 88, 12, 0.2);
}
.btn-jinx-sepi.rush-active {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important;
  border-color: #fca5a5 !important;
  border-bottom: 3px solid #7f1d1d !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.6) !important;
  animation: pulseRush 1.5s infinite;
  pointer-events: none;
}
@keyframes pulseRush {
  0%, 100% { transform: scale(1); box-shadow: 0 0 10px rgba(239, 68, 68, 0.5); }
  50% { transform: scale(1.04); box-shadow: 0 0 18px rgba(239, 68, 68, 0.8); }
}

/* ================= TOMBOL MODE JELAJAH (EXPLORE MODE - LIVING DIORAMA) ================= */
.btn-explore-mode {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px;
  background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
  border: 2px solid #5eead4;
  border-bottom: 3px solid #0f766e;
  color: #0f766e;
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0 10px;
  height: 38px;
  min-height: 38px;
  max-height: 38px;
  box-sizing: border-box !important;
  margin: 0 !important;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.15);
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
  white-space: nowrap;
  vertical-align: middle;
}
.btn-explore-mode:hover {
  transform: translateY(-1.5px) scale(1.03);
  background: linear-gradient(135deg, #ccfbf1 0%, #99f6e4 100%);
  border-color: #2dd4bf;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.28);
  color: #042f2e;
}
.btn-explore-mode:active {
  transform: translateY(1.5px);
  border-bottom-width: 1.5px;
  box-shadow: 0 1px 3px rgba(13, 148, 136, 0.2);
}
.btn-explore-mode.explore-active {
  background: linear-gradient(135deg, #0d9488 0%, #042f2e 100%) !important;
  border-color: #2dd4bf !important;
  border-bottom: 3px solid #134e4a !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(20, 184, 166, 0.6) !important;
  animation: pulseExplore 2.2s infinite ease-in-out;
}
@keyframes pulseExplore {
  0%, 100% { transform: scale(1); box-shadow: 0 0 8px rgba(45, 212, 191, 0.4); }
  50% { transform: scale(1.03); box-shadow: 0 0 16px rgba(45, 212, 191, 0.7); }
}

/* ==========================================================================
   PANDUAN HOW-TO / MISSION BRIEFING GUARANTEED GAME STYLING & ZERO BORDER COLLISION
   ========================================================================== */
.howto-modal {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.howto-modal .briefing-header {
  border-bottom: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

.howto-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
}

.howto-footer,
.howto-modal .modal-footer {
  flex-shrink: 0 !important;
  margin-top: auto !important;
}

@media (max-width: 640px) {
  .howto-modal {
    max-height: 94vh !important;
    width: 96% !important;
    padding: 8px 10px 8px !important;
    border-radius: 16px !important;
  }
  .howto-modal .briefing-header {
    padding: 2px 4px !important;
    margin-bottom: 4px !important;
    border-bottom: none !important;
  }
  .briefing-title {
    font-size: 0.82rem !important;
  }
  .briefing-mini-logo {
    width: 20px !important;
    height: 20px !important;
  }
  .briefing-tag,
  .briefing-subtitle,
  .briefing-header-badge {
    display: none !important;
  }
  .howto-tab-nav {
    padding: 2px 3px !important;
    gap: 3px !important;
    margin-bottom: 6px !important;
  }
  .howto-tab-btn {
    font-size: 0.62rem !important;
    padding: 3px 6px !important;
    min-height: 22px !important;
  }
  .briefing-steps-grid,
  .howto-ranks-grid,
  .howto-sop-grid {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }
  .howto-footer,
  .howto-modal .modal-footer {
    padding-top: 3px !important;
    margin-top: 3px !important;
  }
  #btnCloseHowTo {
    min-height: 26px !important;
    padding: 3px 14px !important;
    font-size: 0.72rem !important;
  }
}

/* ==========================================================================
   FINAL OVERRIDES: COMPACT SHELF & STERILE MODALS (PREVENT OVERFLOW ON MOBILE)
   ========================================================================== */
@media (max-width: 768px), (max-height: 500px) {
  .shelf-modal {
    max-width: min(96vw, 760px) !important;
    max-height: min(92vh, 320px) !important;
    border-radius: 10px !important;
  }
  .shelf-modal-header {
    padding: 2px 8px !important;
    min-height: 24px !important;
  }
  .shelf-modal-header h2 {
    font-size: 0.66rem !important;
  }
  .shelf-body {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    padding: 2px 5px !important;
  }
  .shelf-rx-summary {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    min-height: 28px !important;
    height: 28px !important;
    max-height: 28px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    padding: 2px 6px !important;
    margin: 0 !important;
    border-bottom: 1.5px solid #cbd5e1 !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    z-index: 5 !important;
  }
  .shelf-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 3px 4px !important;
    width: 100% !important;
    max-height: none !important;
  }
  .shelf-item-card {
    padding: 3px 5px !important;
    min-height: 48px !important;
  }
  .shelf-item-name {
    font-size: 0.58rem !important;
  }
  .btn-shelf-batch {
    font-size: 0.50rem !important;
    padding: 2px 5px !important;
    min-height: 20px !important;
    border-radius: 4px !important;
  }

  .sterile-modal {
    max-width: min(92vw, 480px) !important;
    max-height: min(88vh, 295px) !important;
    padding: 3px 6px 4px 6px !important;
  }
  .sterile-modal .modal-header {
    padding: 2px 4px !important;
    margin-bottom: 2px !important;
  }
  .sterile-modal .modal-header h2 {
    font-size: 0.66rem !important;
  }
  .sterile-arena {
    gap: 2px !important;
    margin: 2px 0 !important;
    padding: 0 !important;
  }
  .sterile-hood {
    height: 75px !important;
  }
  .sterile-vial {
    width: 30px !important;
    height: 48px !important;
  }
  .sterile-syringe .syringe-barrel {
    width: 16px !important;
    height: 38px !important;
  }
  .sterile-step-pill {
    font-size: 0.48rem !important;
    padding: 1px !important;
  }
  #sterileStepDescCard {
    font-size: 0.54rem !important;
    padding: 2px 5px !important;
    margin-bottom: 2px !important;
  }
  .sterile-modal .modal-footer {
    padding: 2px 4px !important;
    min-height: 22px !important;
  }
  #btnSterileAction {
    font-size: 0.58rem !important;
    min-height: 20px !important;
    padding: 1px 8px !important;
  }
  #btnCloseSterile {
    font-size: 0.56rem !important;
    min-height: 20px !important;
    padding: 1px 6px !important;
  }
}

/* ==========================================================================
   FINAL OVERRIDES: COMPACT REVIEW WORKSTATION (TELAAH RESEP 3 ASPEK)
   - Layout 2-Kolom Berdampingan Dipertahankan 100% (Tanpa Restrukturisasi)
   - Tombol Tutup Tindih Dihilangkan (Hanya Gunakan Close Circular ✕ Header)
   - Ukuran & Tipografi Kompak Proporsional Pas Mobile Tanpa Terpotong
   - Kalimat Efektif & Ringkas Sesuai Kebutuhan Workstation Mobile
   ========================================================================== */
.btn-rx-close {
  display: none !important;
}

.rx-telaah-header {
  display: none !important;
}

@media (max-width: 900px), (max-height: 540px) {
  .review-modal-card {
    max-width: min(94vw, 730px) !important;
    width: min(94vw, 730px) !important;
    max-height: min(94vh, 320px) !important;
    border-radius: 12px !important;
  }

  .review-modal-header {
    padding: 2px 8px !important;
    min-height: 24px !important;
  }

  .review-modal-header h2 {
    font-size: 0.72rem !important;
  }

  .review-layout-grid {
    padding: 2px 6px !important;
    overflow-y: auto !important;
    display: block !important;
  }

  .review-col-main {
    display: grid !important;
    grid-template-columns: 1fr 1.12fr !important;
    gap: 6px !important;
    align-items: stretch !important;
  }

  /* Kolom Kiri: Kertas Resep Resmi */
  .rx-official-paper {
    padding: 3px 6px !important;
    border-radius: 6px !important;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05) !important;
  }

  .rx-paper-kop {
    padding-bottom: 1px !important;
    margin-bottom: 2px !important;
    border-bottom: 1px solid #0f172a !important;
  }

  .rx-hospital-name {
    font-size: 0.58rem !important;
    line-height: 1.08 !important;
    letter-spacing: 0.01em !important;
  }

  .rx-hospital-sub {
    font-size: 0.40rem !important;
    margin-top: 0 !important;
    line-height: 1 !important;
  }

  .rx-doc-row {
    padding-bottom: 1px !important;
    margin-bottom: 2px !important;
    font-size: 0.50rem !important;
  }

  .rx-doc-name {
    font-size: 0.50rem !important;
  }

  .rx-doc-sip {
    font-size: 0.42rem !important;
  }

  .rx-clinic-badge {
    font-size: 0.44rem !important;
    padding: 0 3px !important;
  }

  .rx-patient-grid {
    padding: 1px 4px !important;
    gap: 1px 4px !important;
    margin-bottom: 2px !important;
    grid-template-columns: repeat(4, 1fr) !important;
  }

  .rx-patient-label {
    font-size: 0.38rem !important;
    line-height: 1 !important;
  }

  .rx-patient-val {
    font-size: 0.48rem !important;
    line-height: 1.1 !important;
  }

  .rx-diag-row {
    padding: 1px 4px !important;
    font-size: 0.46rem !important;
    margin-bottom: 2px !important;
    line-height: 1.1 !important;
  }

  .rx-items-container {
    gap: 1px !important;
    margin-bottom: 2px !important;
  }

  .rx-item-entry {
    padding-bottom: 1px !important;
  }

  .rx-r-symbol {
    font-size: 0.64rem !important;
    line-height: 1 !important;
  }

  .rx-item-name {
    font-size: 0.52rem !important;
    line-height: 1.1 !important;
  }

  .rx-form-badge {
    font-size: 0.42rem !important;
    padding: 0 2px !important;
  }

  .rx-item-sig-row {
    padding-left: 8px !important;
    margin-top: 0 !important;
  }

  .rx-item-sig {
    font-size: 0.44rem !important;
    line-height: 1.1 !important;
  }

  .rx-paper-footer {
    padding-top: 1px !important;
    font-size: 0.44rem !important;
    margin-top: auto !important;
    border-top: 1px dashed #cbd5e1 !important;
  }

  .rx-footer-reg {
    font-size: 0.44rem !important;
  }

  .rx-paraf-sign {
    font-size: 0.44rem !important;
  }

  /* Kolom Kanan: Lembar Telaah 3 Aspek */
  .rx-telaah-panel {
    padding: 3px 5px !important;
    border-radius: 6px !important;
    gap: 2px !important;
    background: #f0fdfa !important;
    border: 1.5px solid #99f6e4 !important;
  }

  .rx-telaah-grid {
    gap: 2px !important;
    margin-bottom: 2px !important;
  }

  .review-aspect-card {
    padding: 2px 4px !important;
    gap: 1px !important;
    border-radius: 4px !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03) !important;
  }

  .aspect-card-title {
    font-size: 0.52rem !important;
    line-height: 1.1 !important;
  }

  .aspect-status-pill {
    font-size: 0.42rem !important;
    padding: 0 3px !important;
    white-space: nowrap !important;
    letter-spacing: 0 !important;
  }

  .aspect-checklist {
    font-size: 0.46rem !important;
    gap: 0 !important;
    line-height: 1.15 !important;
  }

  .chk-item {
    gap: 2px !important;
    line-height: 1.15 !important;
  }

  .chk-icon-ok,
  .chk-icon-alert {
    font-size: 0.48rem !important;
  }

  .aspect-issue-note,
  .aspect-recom-note {
    font-size: 0.44rem !important;
    padding: 1px 3px !important;
    line-height: 1.1 !important;
  }

  /* Aksi Tombol Telaah */
  .rx-telaah-actions {
    margin-top: auto !important;
    gap: 6px !important;
    padding: 2px 8px 3px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ffffff !important;
    border-top: 1.5px solid #e2e8f0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .btn-rx-pass,
  .btn-rx-call {
    min-height: 22px !important;
    height: 24px !important;
    padding: 1px 8px !important;
    font-size: 0.60rem !important;
    border-radius: 5px !important;
    box-shadow: 0 2px 0 #047857 !important;
    white-space: nowrap !important;
  }

  .btn-rx-call {
    box-shadow: 0 2px 0 #92400e !important;
  }

  /* Strict Uniform Height & Paper Note Styling for taskMini in Mobile Landscape */
  .hud-cluster-left .hud-left-stack,
  .hud-left-stack {
    top: 34px !important;
    left: max(var(--canvas-left, 10px), 10px) !important;
  }
  #hud-top #taskMini,
  .hud-cluster-left #taskMini,
  #hud-left-stack #taskMini,
  #taskMini,
  #taskMini.urgent {
    height: 25px !important;
    min-height: 25px !important;
    max-height: 25px !important;
    padding: 2px 7px 2px 5px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    border-radius: 5px !important;
    max-width: 145px !important;
  }
  #taskMini .task-icon-wrap {
    width: 17px !important;
    height: 17px !important;
    min-width: 17px !important;
    max-width: 17px !important;
    border-radius: 3px !important;
  }
}

/* ================= TRAILER MODAL HIGH-CONTRAST ENHANCEMENTS ================= */
.trailer-modal {
  max-width: min(92vw, 760px) !important;
  max-height: min(94vh, 620px) !important;
}

.trailer-modal .modal-body {
  overflow-y: auto !important;
  max-height: calc(94vh - 75px) !important;
  display: flex !important;
  flex-direction: column !important;
}

.trailer-modal .trailer-video-wrapper {
  position: relative !important;
  width: 100% !important;
  max-height: min(48vh, 380px) !important;
  aspect-ratio: 16 / 9 !important;
  background: #000 !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8) !important;
  border: 1.5px solid rgba(20, 184, 166, 0.4) !important;
  margin: 0 auto !important;
}

.trailer-modal .briefing-header {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
  border-bottom: 2px solid #e2e8f0 !important;
}

.trailer-modal .briefing-tag {
  background: #ccfbf1 !important;
  color: #0f766e !important;
  border: 1.5px solid #0d9488 !important;
  font-weight: 800 !important;
  display: inline-block !important;
}

.trailer-modal .briefing-subtitle {
  color: #0f766e !important;
  font-weight: 700 !important;
  font-size: 0.78rem !important;
}

.trailer-modal .btn-trailer-close {
  background: #1e293b !important;
  color: #f8fafc !important;
  border: 1.5px solid #475569 !important;
  border-radius: 999px !important;
  padding: 7px 18px !important;
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-weight: 700 !important;
  font-size: 0.82rem !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

.trailer-modal .btn-trailer-close:hover {
  background: #334155 !important;
  border-color: #94a3b8 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45) !important;
  transform: translateY(-1px);
}

/* ==========================================================================
   PHOTO MODE & STUDIO KAMERA FARMASI RS (WARDRUN STYLE)
   ========================================================================== */

/* 1. Tombol Floating Kamera (Kanan Bawah Layar) */
.btn-floating-camera {
  position: absolute;
  right: 18px;
  bottom: 112px; /* Diposisikan di atas tombol aksi & quick nav agar tidak bertumpukan */
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d9488 0%, #0284c7 100%);
  border: 2.5px solid #ffffff;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(13, 148, 136, 0.45), 0 2px 6px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 95;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, background 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-floating-camera:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 10px 24px rgba(13, 148, 136, 0.6), 0 4px 10px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, #0f766e 0%, #0369a1 100%);
}

.btn-floating-camera:active {
  transform: scale(0.94);
  box-shadow: 0 3px 10px rgba(13, 148, 136, 0.35);
}

.camera-btn-icon {
  font-size: 1.45rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  transition: transform 0.2s ease;
}

.btn-floating-camera:hover .camera-btn-icon {
  transform: rotate(-8deg) scale(1.05);
}

.camera-btn-tooltip {
  position: absolute;
  right: 58px;
  background: rgba(15, 23, 42, 0.88);
  color: #f8fafc;
  padding: 5px 10px;
  border-radius: 8px;
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-floating-camera:hover .camera-btn-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* Sembunyikan floating camera di title screen atau loading screen */
body.in-title-screen .btn-floating-camera,
body.loading .btn-floating-camera {
  display: none !important;
}

/* 2. Modal Studio Foto */
.photo-studio-card {
  max-width: min(94vw, 860px) !important;
  width: 94% !important;
  max-height: 92vh !important;
  border-radius: 20px !important;
  border: 2px solid rgba(20, 184, 166, 0.4) !important;
  background: #ffffff !important;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.8) inset !important;
  padding: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

.photo-modal-header {
  padding: 14px 20px !important;
  background: linear-gradient(135deg, #f0fdfa 0%, #ecfeff 100%) !important;
  border-bottom: 1.5px solid #ccfbf1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.photo-header-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.photo-badge-cam {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  color: #0f766e;
  background: #ccfbf1;
  border: 1px solid #99f6e4;
  padding: 2px 8px;
  border-radius: 999px;
  width: fit-content;
  letter-spacing: 0.5px;
}

.photo-title {
  margin: 2px 0 0 0 !important;
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
}

.photo-subtitle {
  font-size: 0.76rem !important;
  color: #64748b !important;
  font-weight: 600 !important;
}

.photo-studio-body {
  display: grid !important;
  grid-template-columns: 1.15fr 1fr !important;
  gap: 18px !important;
  padding: 16px 20px !important;
  overflow-y: auto !important;
  max-height: calc(92vh - 80px) !important;
}

/* Kolom Kiri: Pratinjau Kanvas */
.photo-preview-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  padding: 12px;
  border-radius: 16px;
  border: 1.5px solid #e2e8f0;
}

.photo-pause-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.pause-indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f59e0b;
  animation: photoBlinkDot 1.2s infinite ease-in-out;
}

@keyframes photoBlinkDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.75); }
}

.photo-preview-viewport {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  max-height: 380px;
  overflow: hidden;
}

#photoPreviewCanvas {
  max-width: 100%;
  max-height: 360px;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16), 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s ease;
}

.photo-preview-hint {
  font-size: 0.68rem;
  color: #94a3b8;
  font-style: italic;
  text-align: center;
}

/* Kolom Kanan: Panel Kontrol */
.photo-controls-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.photo-control-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.photo-section-label {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  color: #475569;
  letter-spacing: 0.5px;
}

/* Tab Pilihan Bingkai */
.photo-frames-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.btn-frame-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  cursor: pointer;
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
  transition: all 0.18s ease;
  user-select: none;
}

.btn-frame-tab:hover {
  background: #f0fdfa;
  border-color: #5eead4;
  color: #0f766e;
  transform: translateY(-1px);
}

.btn-frame-tab.active {
  background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
  border-color: #0d9488;
  color: #0f766e;
  box-shadow: 0 3px 10px rgba(13, 148, 136, 0.2);
}

.frame-tab-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.frame-tab-text {
  flex: 1;
  text-align: left;
}

/* Input Tulisan Kustom */
.photo-caption-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.photo-caption-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.85rem;
  color: #0f172a;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.photo-caption-input:focus {
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.photo-caption-hint {
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 500;
}

/* Kotak Tips */
.photo-tips-box {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
}

.photo-tips-title {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  color: #475569;
  margin-bottom: 4px;
}

.photo-tips-list {
  margin: 0;
  padding-left: 16px;
  font-size: 0.7rem;
  color: #64748b;
  line-height: 1.35;
}

.photo-tips-list li {
  margin-bottom: 3px;
}

/* Tombol Aksi */
.photo-actions-row {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}

.photo-actions-row .btn-sec {
  flex: 1;
  padding: 10px 14px !important;
  border-radius: 12px !important;
  font-size: 0.84rem !important;
}

.btn-save-photo {
  flex: 2;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 10px 16px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #0d9488 0%, #0284c7 100%) !important;
  border: none !important;
  color: #ffffff !important;
  font-family: 'Fredoka', cursive, sans-serif !important;
  font-size: 0.86rem !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35) !important;
  transition: all 0.2s ease !important;
}

.btn-save-photo:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(13, 148, 136, 0.5) !important;
  background: linear-gradient(135deg, #0f766e 0%, #0369a1 100%) !important;
}

.btn-save-photo:active {
  transform: translateY(0);
}

/* 3. Penyesuaian Mobile & Layar Kecil */
@media (max-width: 768px) {
  .photo-studio-card {
    max-width: 96vw !important;
    width: 96% !important;
  }

  .photo-studio-body {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding: 12px 14px !important;
  }

  .photo-preview-viewport {
    min-height: 200px;
    max-height: 260px;
  }

  #photoPreviewCanvas {
    max-height: 240px;
  }

  .btn-floating-camera {
    right: 14px;
    bottom: 104px; /* Naik di atas tombol quick nav [🤝 Serah] */
    width: 44px;
    height: 44px;
  }

  .camera-btn-icon {
    font-size: 1.3rem;
  }

  .camera-btn-tooltip {
    display: none;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .btn-floating-camera {
    right: max(14px, calc(10px + env(safe-area-inset-right, 0px))) !important;
    bottom: max(96px, calc(90px + env(safe-area-inset-bottom, 0px))) !important; /* Terangkat aman dari tombol quick nav & action */
    width: 42px !important;
    height: 42px !important;
  }

  .photo-studio-card {
    max-height: 96vh !important;
  }

  .photo-modal-header {
    padding: 8px 16px !important;
  }

  .photo-title {
    font-size: 1.05rem !important;
  }

  .photo-studio-body {
    padding: 10px 16px !important;
    gap: 14px !important;
    max-height: calc(96vh - 54px) !important;
  }

  .photo-preview-viewport {
    min-height: 180px;
    max-height: 220px;
  }

  #photoPreviewCanvas {
    max-height: 210px;
  }

  .btn-frame-tab {
    padding: 6px 10px;
    font-size: 0.72rem;
  }

  .photo-caption-input {
    padding: 6px 10px;
    font-size: 0.78rem;
  }

  .photo-tips-box {
    display: none;
  }
}


