/* ═══════════════════════════════════════════════════════════════════════════
   USSD Phone Simulator — Styles
   Enterprise Light Theme (Solid Colors, Zero Gradients, Modern SaaS)
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Phone hardware colors (realistic virtual smartphone hardware) */
  --phone-bg: #000;
  --phone-bezel: #1a1a1a;
  --dialog-bg: #2d2d2d;
  --key-bg: #1e1e1e;
  --key-active: #3a3a3a;

  /* Enterprise Palette (matching Studio design system) */
  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --panel-bg: #ffffff;
  --panel-surface: #ffffff;
  --panel-border: #e2e8f0;
  --console-bg: #f8fafc;
  --border-input: #cbd5e1;

  /* Typography */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  /* Solid Enterprise Brand & Accents (Zero Gradients) */
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-subtle: #eff6ff;
  --accent-green: #059669;
  --accent-red: #dc2626;
  --accent-amber: #d97706;
  --accent-purple: #7c3aed;

  /* Keyboard on touch phone */
  --kb-bg: #2c2c2e;
  --kb-key: #4a4a4c;
  --kb-key-text: #ffffff;

  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-font-smoothing: antialiased;
}

/* ════════════════════ ENTERPRISE TOP NAVIGATION BAR ════════════════════ */
.sim-enterprise-header {
  background: #ffffff;
  border-bottom: 1px solid var(--panel-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  width: 100%;
}

.sim-header-inner {
  max-width: 1360px;
  margin: 0 auto;
  height: 58px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;
}

.sim-brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.sim-brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
}

.sim-brand-badge {
  background: var(--accent);
  color: #ffffff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.sim-brand-info {
  display: flex;
  flex-direction: column;
  white-space: nowrap;
}

.sim-brand-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
  white-space: nowrap;
}

.sim-brand-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.sim-main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.sim-nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.sim-nav-link svg {
  flex-shrink: 0;
  opacity: 0.75;
}

.sim-nav-link:hover {
  color: var(--accent);
  background: var(--accent-subtle);
}

.sim-nav-link:hover svg {
  opacity: 1;
}

.sim-nav-link.active {
  color: var(--accent);
  background: var(--accent-subtle);
  font-weight: 700;
}

.sim-nav-link.active svg {
  opacity: 1;
}

.sim-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.sim-ws-dropdown-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid var(--panel-border);
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

.sim-ws-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #059669;
  flex-shrink: 0;
}

.sim-ws-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.sim-ws-select {
  background: transparent;
  border: none;
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  outline: none;
  max-width: 155px;
  font-family: inherit;
}

.sim-status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  white-space: nowrap;
}

.sim-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #059669;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.2);
  flex-shrink: 0;
}

.btn-topbar-studio {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--accent);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid var(--accent);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-topbar-studio:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.sim-menu-toggle {
  display: none;
  background: #ffffff;
  border: 1px solid var(--panel-border);
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
}

.sim-menu-toggle:hover {
  background: #f1f5f9;
}

.sim-mobile-nav {
  background: #ffffff;
  border-bottom: 1px solid var(--panel-border);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sim-mobile-nav-link {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
}

.sim-mobile-nav-link:hover,
.sim-mobile-nav-link.active {
  background: var(--accent-subtle);
  color: var(--accent);
}

/* ════════════════════ SUB-HEADER CONTROL TOOLBAR ════════════════════ */
.sim-control-toolbar {
  background: #ffffff;
  border-bottom: 1px solid var(--panel-border);
  padding: 8px 20px;
  width: 100%;
}

.sim-toolbar-inner {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sim-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.sim-carrier-info-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #f8fafc;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
}

.ews-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}

.ews-badge.momo-badge {
  background: #ede9fe;
  color: #5b21b6;
  border-color: #ddd6fe;
}

#ewsCurrencyBadge {
  background: #ecfdf5;
  color: var(--accent-green);
  border-color: #a7f3d0;
}

.btn-toolbar-tool {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.btn-toolbar-tool:hover {
  background: #f1f5f9;
  color: var(--accent);
  border-color: #cbd5e1;
}

.sim-toolbar-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.device-switcher-bar {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid var(--panel-border);
  padding: 3px;
  border-radius: 8px;
  gap: 3px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.03);
}

.device-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.15s ease;
  font-family: inherit;
  white-space: nowrap;
}

.device-btn.active {
  background: #ffffff;
  color: var(--accent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.device-btn:hover:not(.active) {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.5);
}

.sim-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.responsive-view-switcher {
  display: none;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 8px;
  gap: 4px;
  border: 1px solid var(--panel-border);
}

.view-switch-btn {
  border: none;
  background: transparent;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.view-switch-btn.active {
  background: #ffffff;
  color: var(--accent);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.mobile-sms-badge {
  background: var(--accent);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
}

/* ── App Layout ── */
.app-layout {
  display: flex;
  min-height: calc(100vh - 120px);
  gap: 32px;
  padding: 24px 20px 48px;
  align-items: flex-start;
  justify-content: center;
  background-color: var(--bg-base);
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
}

/* ── Phone Frame ── */
/* ── Device Switcher Header ── */
.phone-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.emulator-workspace-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid var(--panel-border);
  padding: 7px 14px;
  border-radius: 8px;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  width: 100%;
  max-width: 360px;
}

.ews-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.ews-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.ews-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.ews-select {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  font-family: inherit;
  max-width: 160px;
}

.ews-select option {
  background: #ffffff;
  color: var(--text-primary);
}

.ews-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ews-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: #f1f5f9;
  border: 1px solid var(--panel-border);
  color: var(--text-secondary);
}

#ewsCurrencyBadge {
  background: #ecfdf5;
  color: var(--accent-green);
  border-color: #a7f3d0;
}

.device-switcher-bar {
  display: flex;
  background: #ffffff;
  border: 1px solid var(--panel-border);
  padding: 4px;
  border-radius: 8px;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  width: 100%;
  max-width: 360px;
}

.device-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
  font-family: inherit;
}

.device-btn.active {
  background: var(--accent);
  color: #ffffff;
  box-shadow: var(--shadow-xs);
}

.device-btn:hover:not(.active) {
  color: var(--text-primary);
  background: #f1f5f9;
}

/* ── Live Inactivity Timeout Visual Countdown Pill ── */
.session-countdown-pill {
  width: 100%;
  max-width: 360px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #b45309;
  border-radius: 8px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  animation: pulseTimeout 1s infinite alternate;
}

@keyframes pulseTimeout {
  from { opacity: 0.9; }
  to { opacity: 1; }
}

.session-countdown-pill strong {
  color: #92400e;
  font-weight: 700;
}

/* ── SMS Inbox Card UI ── */
.sms-card {
  background: #ffffff;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.sms-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
}

.sms-badge.receipt {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.sms-badge.win {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.sms-time {
  font-size: 10.5px;
  color: var(--text-muted);
}

.sms-msg {
  font-size: 12px;
  color: var(--text-primary);
  line-height: 1.4;
  word-break: break-word;
}

.sms-phone {
  font-size: 10.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ═══════════════════════════════════════════════════════════════════════════
   HEADS-UP ON-DEVICE SMS NOTIFICATION BANNERS
   ═══════════════════════════════════════════════════════════════════════════ */

/* 1. Android Heads-up SMS Banner (Samsung Galaxy) */
.phone-sms-banner.android-banner {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  background: #ffffff;
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  z-index: 100;
  border: 1px solid rgba(0, 0, 0, 0.08);
  animation: bannerSlideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes bannerSlideDown {
  from { transform: translateY(-120%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.banner-icon {
  font-size: 20px;
  line-height: 1;
}

.banner-content {
  flex: 1;
  min-width: 0;
}

.banner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.banner-sender {
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
}

.banner-time {
  font-size: 10px;
  color: #94a3b8;
}

.banner-body {
  font-size: 11.5px;
  color: #475569;
  line-height: 1.35;
  word-break: break-word;
}

.banner-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 12px;
  cursor: pointer;
  padding: 0 4px;
}

/* 2. iOS Dynamic Island Expanded Notification (Apple iPhone 15 Pro) */
.ios-di-notification {
  position: absolute;
  top: 6px;
  left: 12px;
  right: 12px;
  background: #000000;
  border-radius: 26px;
  padding: 12px 16px;
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 0 1px #222;
  z-index: 100;
  animation: diPop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

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

.di-noti-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #38bdf8;
}

.di-noti-sender {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.di-noti-text {
  font-size: 11.5px;
  color: #e2e8f0;
  line-height: 1.35;
  word-break: break-word;
}

/* 3. Nokia 3310 Monospace LCD SMS Toast */
.feat-sms-toast {
  position: absolute;
  inset: 20px 8px;
  background: #9cad86;
  border: 2px solid #2b3a20;
  color: #1a2612;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 40;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.25);
  font-family: 'JetBrains Mono', monospace;
}

.f-toast-title {
  font-size: 12px;
  font-weight: 700;
  border-bottom: 1px dashed #2b3a20;
  padding-bottom: 3px;
  text-transform: uppercase;
}

.f-toast-text {
  font-size: 10px;
  line-height: 1.3;
  word-break: break-word;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FEATURE PHONE (REALISTIC NOKIA / ITEL BUTTON PHONE)
   ═══════════════════════════════════════════════════════════════════════════ */
.feature-phone-frame {
  width: 320px;
  height: 740px;
  background: linear-gradient(165deg, #2b3542 0%, #1a222c 50%, #121820 100%);
  border-radius: 46px 46px 54px 54px;
  padding: 16px 14px 22px;
  box-shadow:
    0 0 0 4px #425266,
    0 0 0 6px #1a222c,
    0 25px 65px rgba(0,0,0,0.85),
    inset 0 2px 6px rgba(255,255,255,0.25),
    inset 0 -3px 8px rgba(0,0,0,0.7);
  display: flex;
  flex-direction: column;
  position: relative;
  user-select: none;
}

.feature-body {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.feature-brand {
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 3px;
  color: #c4d1db;
  margin-bottom: 8px;
  text-shadow: 0 1px 2px #000;
}

.feature-screen-bezel {
  background: #0d1014;
  border: 4px solid #202733;
  border-radius: 18px;
  padding: 8px;
  box-shadow:
    inset 0 3px 10px rgba(0,0,0,0.9),
    0 2px 5px rgba(255,255,255,0.05);
  margin-bottom: 12px;
}

.feature-screen {
  background: #9ab491; /* Authentic monochrome LCD matrix green */
  color: #121d0e;
  font-family: 'Courier New', Courier, monospace;
  height: 255px;
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow:
    inset 0 0 12px rgba(0,0,0,0.25),
    inset 0 1px 2px rgba(0,0,0,0.3);
  overflow: hidden;
  position: relative;
}

/* Subtle scanlines effect on LCD screen */
.feature-screen::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.03),
    rgba(0, 0, 0, 0.03) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
}

.feature-status {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 800;
  border-bottom: 1px dashed #6f8666;
  padding-bottom: 3px;
  letter-spacing: 0.5px;
}

.feature-idle-view {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding-top: 14px;
}

.feat-clock {
  font-size: 32px;
  font-weight: 900;
  text-align: center;
  letter-spacing: 2px;
  color: #0b1408;
  text-shadow: 0 1px 0 rgba(255,255,255,0.3);
}

.feat-dial-display {
  font-size: 22px;
  font-weight: 900;
  text-align: center;
  min-height: 32px;
  word-break: break-all;
  margin: 12px 0;
  color: #0b1408;
  letter-spacing: 1px;
}

.feat-softkeys {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 900;
  border-top: 1px dashed #6f8666;
  padding-top: 4px;
}

.feature-ussd-view {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.feature-ussd-content {
  font-size: 12.5px;
  line-height: 1.35;
  white-space: pre-wrap;
  overflow-y: auto;
  max-height: 175px;
  padding-right: 2px;
  font-weight: 800;
  color: #0d1609;
}

.feature-input-row {
  display: flex;
  align-items: center;
  background: rgba(0,0,0,0.12);
  border: 1.5px solid #485c41;
  border-radius: 4px;
  padding: 3px 6px;
  margin: 4px 0;
}

.feat-input-prompt {
  font-weight: 900;
  margin-right: 5px;
  font-size: 14px;
}

.feature-input {
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  font-weight: 900;
  font-size: 16px;
  color: #0b1408;
  width: 100%;
}

.feature-loading-view {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 1px;
  animation: featPulse 0.9s infinite alternate;
}

@keyframes featPulse {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

/* ── Feature Phone Keypad ── */
.feature-keypad {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.feat-top-keys {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 6px;
}

.feat-soft {
  width: 58px;
  height: 32px;
  background: #2c3644;
  border: 1px solid #4a596e;
  border-radius: 12px;
  color: #adbccc;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 3px 0 #18202a;
}

.feat-soft:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #18202a;
}

.feat-nav-dpad {
  width: 52px;
  height: 44px;
  background: #252e3b;
  border: 2px solid #4f6178;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

.feat-dpad-center {
  width: 32px;
  height: 26px;
  background: #39475a;
  border: 1px solid #6b7f99;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
}

.feat-call-keys {
  display: flex;
  justify-content: space-between;
  padding: 0 6px;
}

.feat-call {
  width: 80px;
  height: 36px;
  background: #1e4620;
  border: 1px solid #3fb950;
  border-radius: 14px;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 3px 0 #0f2410;
}

.feat-call:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #0f2410;
}

.feat-end {
  width: 80px;
  height: 36px;
  background: #501d1d;
  border: 1px solid #f85149;
  border-radius: 14px;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 3px 0 #2c0f0f;
}

.feat-end:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #2c0f0f;
}

.feat-num-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 4px;
}

.feat-key {
  height: 48px;
  background: linear-gradient(180deg, #2a3442, #1f2733);
  border: 1px solid #435266;
  border-radius: 12px;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 0 #121820;
  transition: all 0.1s ease;
}

.feat-key:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #121820;
  background: #1b222d;
}

.feat-key .f-num {
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}

.feat-key .f-sub {
  font-size: 9px;
  color: #8c9ba5;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   APPLE IPHONE 15 PRO / iOS SIMULATOR STYLING
   ═══════════════════════════════════════════════════════════════════════════ */
.iphone-frame {
  width: 360px;
  height: 780px;
  background: #000;
  border-radius: 54px;
  padding: 10px;
  box-shadow:
    0 0 0 4px #434448, /* Natural Titanium border */
    0 0 0 5px #1c1c1e,
    0 25px 65px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  user-select: none;
}

/* iOS Hardware Buttons */
.ios-action-btn,
.ios-vol-up,
.ios-vol-down,
.ios-power-btn {
  position: absolute;
  background: #3a3b3f;
  border-radius: 2px;
  pointer-events: none;
}
.ios-action-btn { left: -7px; top: 110px; width: 4px; height: 26px; }
.ios-vol-up     { left: -7px; top: 155px; width: 4px; height: 48px; }
.ios-vol-down   { left: -7px; top: 215px; width: 4px; height: 48px; }
.ios-power-btn  { right: -7px; top: 165px; width: 4px; height: 68px; }

/* iOS Status Bar & Dynamic Island */
.ios-status-bar {
  height: 48px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #000;
  color: #fff;
  z-index: 20;
  position: relative;
}

.ios-status-left {
  width: 60px;
}

.ios-time {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
}

.ios-dynamic-island {
  width: 110px;
  height: 30px;
  background: #000;
  border-radius: 20px;
  border: 1px solid #1a1a1c;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 12px;
  box-shadow: 0 1px 3px rgba(255,255,255,0.05);
}

.di-camera-lens {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #152238 20%, #03060c 80%);
  border: 1px solid #0e121a;
}

.di-sensor {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0d1117;
  margin-left: 8px;
}

.ios-status-right {
  width: 65px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.ios-signal {
  display: inline-flex;
  align-items: flex-end;
  gap: 1.5px;
  height: 11px;
}

.ios-signal .bar {
  width: 3px;
  background: #fff;
  border-radius: 0.5px;
}
.ios-signal .b1 { height: 3px; }
.ios-signal .b2 { height: 5px; }
.ios-signal .b3 { height: 8px; }
.ios-signal .b4 { height: 11px; }

.ios-net {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.ios-battery {
  width: 20px;
  height: 10px;
  border: 1px solid #fff;
  border-radius: 3px;
  padding: 1px;
  position: relative;
  display: flex;
  align-items: center;
}
.ios-battery::after {
  content: '';
  position: absolute;
  right: -3px;
  top: 2px;
  width: 2px;
  height: 4px;
  background: #fff;
  border-radius: 0 1px 1px 0;
}
.ios-battery-level {
  width: 78%;
  height: 100%;
  background: #fff;
  border-radius: 1.5px;
}

/* iOS Screen Body */
.ios-screen {
  flex: 1;
  background: #000;
  display: flex;
  flex-direction: column;
  position: relative;
  border-radius: 0 0 44px 44px;
  overflow: hidden;
}

.ios-dialer-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px 16px 8px;
}

.ios-carrier-pill {
  align-self: center;
  font-size: 11px;
  font-weight: 500;
  color: #8e8e93;
  background: #1c1c1e;
  padding: 3px 12px;
  border-radius: 12px;
  margin-top: 2px;
}

.ios-number-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 55px;
  padding: 4px 0;
}

.ios-dialed-number {
  font-size: 32px;
  font-weight: 400;
  color: #fff;
  letter-spacing: 1px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  text-align: center;
  min-height: 38px;
  word-break: break-all;
}

.ios-add-number-btn {
  background: none;
  border: none;
  color: #007aff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 2px;
}

/* iOS 12-key Grid */
.ios-keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 16px;
  justify-items: center;
  padding: 4px 10px;
}

.ios-key {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #2c2c2e;
  border: none;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.05s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.ios-key:active {
  background: #48484a;
  transform: scale(0.96);
}

.ios-key .k-num {
  font-size: 27px;
  font-weight: 400;
  line-height: 1;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
}

.ios-key .k-sub {
  font-size: 9px;
  font-weight: 600;
  color: #aeaeb2;
  letter-spacing: 1.5px;
  margin-top: 2px;
}

/* Call Button Row */
.ios-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 28px;
}

.ios-action-spacer {
  width: 44px;
}

.ios-call-btn {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #34c759;
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(52, 199, 89, 0.4);
  transition: transform 0.1s ease, background 0.15s ease;
}

.ios-call-btn:active {
  transform: scale(0.94);
  background: #28a745;
}

.ios-backspace-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: #8e8e93;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s ease;
}

.ios-backspace-btn:active {
  color: #fff;
}

/* iOS Phone App Bottom Tab Bar */
.ios-tab-bar {
  display: flex;
  justify-content: space-around;
  padding: 8px 6px 2px;
  border-top: 1px solid #1c1c1e;
  margin-top: 4px;
}

.ios-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #8e8e93;
  font-size: 10px;
  cursor: default;
}

.ios-tab-icon {
  font-size: 18px;
  margin-bottom: 2px;
}

.ios-tab.active {
  color: #007aff;
}

/* iOS Home Indicator Bar */
.ios-home-indicator {
  width: 120px;
  height: 4px;
  background: #fff;
  border-radius: 2px;
  align-self: center;
  margin-bottom: 6px;
  opacity: 0.8;
}

/* ── Native iOS USSD Modal Alert Sheet ── */
.ios-ussd-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 12px 10px;
  z-index: 50;
  animation: iosAlertFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes iosAlertFade {
  from { opacity: 0; transform: scale(1.04); }
  to { opacity: 1; transform: scale(1); }
}

.ios-ussd-card {
  width: 100%;
  max-width: 320px;
  margin: 10px auto 0;
  background: rgba(36, 36, 38, 0.96);
  border-radius: 14px;
  text-align: center;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.ios-ussd-header {
  padding: 14px 16px 4px;
}

.ios-ussd-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
}

.ios-ussd-body {
  padding: 4px 16px 10px;
  font-size: 12.5px;
  line-height: 1.4;
  color: #e5e5ea;
  white-space: pre-wrap;
  text-align: left;
  max-height: 180px;
  overflow-y: auto;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
}

.ios-ussd-input-wrap {
  padding: 0 14px 12px;
}

.ios-ussd-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 8px 12px;
  color: #fff;
  font-size: 14px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.ios-ussd-input:focus {
  border-color: #007aff;
  box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.3);
}

.ios-ussd-buttons {
  display: flex;
  border-top: 1px solid rgba(84, 84, 88, 0.65);
}

.ios-btn-dialog {
  flex: 1;
  background: transparent;
  border: none;
  color: #007aff;
  font-size: 15px;
  font-weight: 500;
  padding: 11px 6px;
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  transition: background-color 0.1s ease;
}

.ios-btn-dialog:active {
  background: rgba(255, 255, 255, 0.08);
}

.ios-btn-dialog.cancel {
  border-right: 1px solid rgba(84, 84, 88, 0.65);
  font-weight: 400;
}

.ios-btn-dialog.send {
  font-weight: 600;
}

/* ── Authentic iOS Virtual Keyboard ── */
.ios-keyboard {
  background: #1c1c1e;
  border-radius: 12px;
  padding: 6px 4px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.4);
  user-select: none;
}

.ios-kb-row {
  display: flex;
  justify-content: center;
  gap: 5px;
}

.ios-kb-key {
  flex: 1;
  height: 38px;
  background: #48484a;
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 17px;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  transition: background-color 0.1s ease, transform 0.05s ease;
}

.ios-kb-key:active {
  background: #636366;
  transform: translateY(1px);
}

.ios-kb-shift,
.ios-kb-delete {
  flex: 1.4;
  background: #3a3a3c;
  font-size: 15px;
}

.ios-kb-sym,
.ios-kb-globe {
  flex: 1.2;
  background: #3a3a3c;
  font-size: 14px;
}

.ios-kb-space {
  flex: 4;
  font-size: 14px;
  color: #aeaeb2;
}

.ios-kb-return {
  flex: 2;
  background: #007aff;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.ios-kb-return:active {
  background: #0062cc;
}

/* iOS Loading Spinner */
.ios-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 45;
}

.ios-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: iosSpin 0.75s linear infinite;
}

@keyframes iosSpin {
  to { transform: rotate(360deg); }
}

.ios-loading-text {
  font-size: 13px;
  color: #8e8e93;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
}

.phone-frame {
  width: 360px;
  height: 780px;
  background: var(--phone-bezel);
  border-radius: 40px;
  padding: 8px;
  box-shadow:
    0 0 0 2px #333,
    0 20px 60px rgba(0,0,0,0.6),
    inset 0 0 0 1px #222;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* ── Status Bar ── */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px 4px;
  font-size: 12px;
  font-weight: 600;
  background: var(--phone-bg);
  border-radius: 32px 32px 0 0;
  z-index: 10;
  flex-shrink: 0;
}

.status-time { font-size: 13px; }

.status-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-icon { opacity: 0.9; }

.signal-bars {
  display: flex;
  align-items: flex-end;
  gap: 1px;
  height: 14px;
}

.signal-bar {
  width: 3px;
  background: white;
  border-radius: 1px;
}

.battery {
  display: flex;
  align-items: center;
  gap: 3px;
}

.battery-body {
  width: 20px;
  height: 10px;
  border: 1.5px solid white;
  border-radius: 2px;
  padding: 1px;
  position: relative;
}

.battery-level {
  width: 19%;
  height: 100%;
  background: #ef5350;
  border-radius: 1px;
}

.battery-tip {
  width: 2px;
  height: 5px;
  background: white;
  border-radius: 0 1px 1px 0;
}

.battery-text {
  font-size: 11px;
  margin-left: 1px;
}

/* ── Phone Screen ── */
.phone-screen {
  flex: 1;
  background: var(--phone-bg);
  position: relative;
  overflow: hidden;
}

/* ── Navigation Bar ── */
.nav-bar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 40px;
  background: var(--phone-bg);
  border-radius: 0 0 32px 32px;
  flex-shrink: 0;
}

.nav-btn {
  font-size: 16px;
  opacity: 0.6;
  cursor: pointer;
  color: white;
  padding: 4px 8px;
}

/* ── Dialer View ── */
.dialer-view {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.dialer-top-bar {
  display: flex;
  justify-content: flex-end;
  padding: 8px 16px;
}

.dialer-actions {
  display: flex;
  gap: 16px;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 18px;
  cursor: pointer;
  opacity: 0.9;
}

.dialer-display {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  padding: 0 20px;
}

.dialer-number {
  font-size: 36px;
  font-weight: 300;
  letter-spacing: 2px;
  color: white;
  text-align: center;
  word-break: break-all;
}

/* ── Dial Pad ── */
.dialer-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 0 24px;
}

.dial-key {
  background: none;
  border: none;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 0;
  cursor: pointer;
  border-radius: 50%;
  width: 72px;
  height: 72px;
  margin: 0 auto;
  transition: background 0.15s;
}

.dial-key:active {
  background: var(--key-active);
}

.key-num {
  font-size: 28px;
  font-weight: 300;
  line-height: 1.1;
}

.key-letters {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ── Dialer Bottom ── */
.dialer-bottom {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 16px 32px 8px;
}

.call-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent-green);
  border: none;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s, background 0.15s;
}

.call-btn:active {
  transform: scale(0.93);
  background: #388e3c;
}

.action-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  opacity: 0.7;
  padding: 10px;
}

.sim-selector {
  display: flex;
  justify-content: center;
  padding: 8px 0 4px;
}

.sim-pill {
  background: #2a2a2a;
  color: var(--text-secondary);
  font-size: 12px;
  padding: 4px 16px;
  border-radius: 16px;
}

.bottom-tabs {
  display: flex;
  justify-content: space-around;
  padding: 4px 0;
  border-top: 1px solid #222;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 12px;
  padding: 8px 16px;
  cursor: pointer;
}

.tab-btn.active {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}

/* ── USSD Overlay ── */
.ussd-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  z-index: 20;
  animation: fadeIn 0.2s ease;
}

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

.ussd-dialog {
  background: var(--dialog-bg);
  margin: 0 12px;
  border-radius: 16px;
  padding: 24px 24px 0;
  box-shadow: 0 -4px 30px rgba(0,0,0,0.5);
  max-height: 60%;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0.5; }
  to { transform: translateY(0); opacity: 1; }
}

.ussd-message {
  font-size: 15px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-y: auto;
  flex: 1;
  padding-bottom: 12px;
  color: var(--text-primary);
}

.ussd-input-wrapper {
  padding: 8px 0;
}

.ussd-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--accent);
  color: white;
  font-size: 16px;
  padding: 8px 0;
  outline: none;
  font-family: inherit;
}

.ussd-buttons {
  display: flex;
  align-items: center;
  padding: 16px 0;
}

.ussd-btn {
  flex: 1;
  background: none;
  border: none;
  color: white;
  font-size: 16px;
  font-weight: 500;
  padding: 12px;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s;
}

.ussd-btn:active {
  background: rgba(255,255,255,0.1);
}

.ussd-btn.send {
  color: var(--accent);
}

.ussd-divider {
  width: 1px;
  height: 24px;
  background: #555;
}

/* ── Phone Keyboard ── */
.phone-keyboard {
  background: var(--kb-bg);
  padding: 4px 2px 8px;
  flex-shrink: 0;
}

.kb-toolbar {
  display: flex;
  justify-content: space-around;
  padding: 6px 12px;
  border-bottom: 1px solid #3a3a3c;
  margin-bottom: 4px;
}

.kb-tool {
  background: none;
  border: none;
  color: #8e8e93;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
}

.kb-row {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 2px 4px;
}

.kb-key {
  background: var(--kb-key);
  border: none;
  color: var(--kb-key-text);
  font-size: 16px;
  padding: 10px 0;
  min-width: 30px;
  border-radius: 6px;
  cursor: pointer;
  flex: 1;
  max-width: 36px;
  transition: background 0.1s;
  font-family: inherit;
}

.kb-key:active {
  background: #666;
  transform: scale(1.15);
}

.kb-key.shift,
.kb-key.backspace-key {
  background: #636366;
  min-width: 40px;
  max-width: 44px;
}

.kb-key.sym {
  font-size: 12px;
  font-weight: 600;
  min-width: 44px;
  max-width: 50px;
  background: #636366;
}

.kb-key.comma,
.kb-key.period {
  max-width: 36px;
}

.kb-key.emoji-key {
  max-width: 36px;
}

.kb-key.space-key {
  flex: 3;
  max-width: 160px;
  background: var(--kb-key);
}

.kb-key.enter-key {
  min-width: 44px;
  max-width: 50px;
  background: var(--accent);
  color: white;
  font-size: 18px;
}

.kb-bottom-row {
  gap: 4px;
}

/* ── Loading ── */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
}

.ussd-loading {
  text-align: center;
  color: var(--text-secondary);
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #333;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Developer Panel (Enterprise Standard Light UI)
   ═══════════════════════════════════════════════════════════════════════════ */

.dev-panel {
  flex: 1;
  max-width: 580px;
  height: 780px;
  background: #ffffff;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

.dev-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 18px;
  background: #ffffff;
  border-bottom: 1px solid var(--panel-border);
}

.dev-header h2 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.dev-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
}

.status-dot.online {
  background: var(--accent-green);
}

.status-dot.offline {
  background: var(--accent-red);
}

/* ── Dev Tabs ── */
.dev-tabs {
  display: flex;
  border-bottom: 1px solid var(--panel-border);
  background: #f8fafc;
  padding: 6px 12px 0;
  gap: 4px;
  flex-shrink: 0;
}

.dev-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 8px;
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
  font-family: inherit;
  text-align: center;
  white-space: nowrap;
}

.dev-tab:hover {
  color: var(--text-primary);
  background: #f1f5f9;
}

.dev-tab.active {
  color: var(--accent);
  background: #ffffff;
  border-bottom-color: var(--accent);
  box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.02);
}

.dev-tab-content {
  display: none;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
}

.dev-tab-content.active {
  display: flex;
}

/* ── Console ── */
.console-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--panel-border);
  flex-shrink: 0;
}

.console-btn {
  background: #ffffff;
  border: 1px solid var(--border-input);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-xs);
}

.console-btn:hover {
  background: #f8fafc;
  color: var(--text-primary);
  border-color: #94a3b8;
}

.console-btn.danger {
  color: var(--accent-red);
  border-color: #fca5a5;
}

.console-btn.danger:hover {
  background: #fef2f2;
}

.console-btn.full-width {
  width: 100%;
  margin-top: 8px;
  padding: 9px;
}

.console-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 500;
}

.console-output {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  font-family: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', monospace;
  font-size: 12px;
  line-height: 1.6;
  background: #f8fafc;
  color: var(--text-primary);
}

.console-welcome {
  color: var(--text-muted);
  padding: 8px 0;
}

.console-welcome strong {
  color: var(--accent);
}

/* Console entry */
.log-entry {
  padding: 6px 0;
  border-bottom: 1px solid var(--panel-border);
}

.log-entry .log-time {
  color: var(--text-muted);
  font-size: 11px;
}

.log-entry .log-direction {
  font-weight: 600;
  margin: 0 4px;
}

.log-entry .log-direction.request { color: var(--accent-amber); }
.log-entry .log-direction.response { color: var(--accent-green); }
.log-entry .log-direction.error { color: var(--accent-red); }
.log-entry .log-direction.info { color: var(--accent); }

.log-entry .log-body {
  color: var(--text-primary);
  display: block;
  padding-left: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}

.log-entry .log-state {
  color: var(--text-muted);
  font-size: 11px;
  font-style: italic;
}

/* ── Sessions List ── */
.sessions-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: #ffffff;
}

.no-data {
  color: var(--text-muted);
  text-align: center;
  padding: 32px;
  font-size: 13px;
}

.session-card {
  background: #ffffff;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-xs);
}

.session-card h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 4px;
  word-break: break-all;
}

.session-card p {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 3px 0;
}

.session-card .session-state {
  display: inline-block;
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid #bfdbfe;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 4px;
}

/* ── API Docs ── */
.api-docs {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #ffffff;
}

.api-docs h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 18px 0 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--panel-border);
}

.api-docs h3:first-child { margin-top: 0; }

.api-endpoint {
  background: #ffffff;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-xs);
}

.api-endpoint code {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
}

.api-endpoint p {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 6px 0;
}

.api-endpoint pre {
  background: #f8fafc;
  border: 1px solid var(--panel-border);
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 11px;
  color: var(--text-primary);
  overflow-x: auto;
  margin-top: 6px;
  font-family: 'JetBrains Mono', monospace;
}

.method {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 6px;
  font-family: inherit;
  border: 1px solid transparent;
}

.method.get { background: #ecfdf5; color: var(--accent-green); border-color: #a7f3d0; }
.method.post { background: var(--accent-subtle); color: var(--accent); border-color: #bfdbfe; }
.method.put { background: #f5f3ff; color: var(--accent-purple); border-color: #ddd6fe; }
.method.delete { background: #fef2f2; color: var(--accent-red); border-color: #fecaca; }

/* ── Settings ── */
.settings-form {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
  background: #ffffff;
}

.setting-group {
  margin-bottom: 16px;
}

.setting-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.setting-group input[type="text"],
.setting-group input[type="number"] {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-input);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.setting-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.setting-group input[type="range"] {
  width: 100%;
  margin-top: 4px;
}

.setting-group #delayValue {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  margin-left: 8px;
}

.setting-row {
  display: flex;
  gap: 8px;
}

.setting-row input { flex: 1; }

.settings-form hr {
  border: none;
  border-top: 1px solid var(--panel-border);
  margin: 16px 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN BREAKPOINTS
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1240px) {
  .sim-header-inner {
    padding: 0 16px;
    gap: 12px;
  }

  .sim-nav-link {
    padding: 5px 8px;
    font-size: 12px;
    gap: 4px;
  }

  .sim-toolbar-inner {
    flex-wrap: wrap;
    gap: 10px;
  }

  .sim-toolbar-center {
    order: 3;
    width: 100%;
    justify-content: center;
    margin-top: 4px;
  }

  .sim-toolbar-left {
    order: 1;
  }

  .sim-toolbar-right {
    order: 2;
  }
}

@media (max-width: 1080px) {
  .sim-main-nav {
    display: none !important;
  }

  .sim-menu-toggle {
    display: inline-flex !important;
  }

  .responsive-view-switcher {
    display: flex !important;
  }

  .app-layout {
    flex-direction: column !important;
    align-items: center !important;
    gap: 20px !important;
    padding: 16px !important;
  }

  .phone-container.hidden-mobile {
    display: none !important;
  }

  .dev-panel.hidden-mobile {
    display: none !important;
  }

  .phone-container {
    align-items: center;
    width: 100%;
  }

  .dev-panel {
    width: 100% !important;
    max-width: 540px !important;
    height: auto !important;
    min-height: 580px !important;
  }
}

@media (max-width: 768px) {
  .sim-header-inner {
    padding: 0 12px;
  }

  .sim-status-pill {
    display: none;
  }

  .sim-toolbar-left .ews-badge:not(.momo-badge) {
    display: none;
  }

  .sim-toolbar-left .sim-carrier-info-pill {
    padding: 3px 8px;
    font-size: 11px;
  }

  .btn-topbar-studio span {
    display: none;
  }

  .btn-topbar-studio {
    padding: 6px 9px;
  }

  .app-layout {
    padding: 12px 8px;
    gap: 16px;
  }

  .dev-panel {
    max-width: 100% !important;
  }

  .device-switcher-bar {
    max-width: 100%;
  }

  .console-toolbar {
    padding: 6px 10px;
  }

  .dev-header {
    padding: 12px 14px;
  }

  .api-docs, .settings-form, .sessions-list {
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .sim-brand-subtitle {
    display: none;
  }

  .device-btn {
    padding: 4px 8px;
    font-size: 11px;
    gap: 3px;
  }

  .phone-frame {
    transform: scale(0.88);
    transform-origin: top center;
    margin-bottom: -70px;
  }

  .feature-phone-frame {
    transform: scale(0.88);
    transform-origin: top center;
    margin-bottom: -65px;
  }

  .iphone-frame {
    transform: scale(0.88);
    transform-origin: top center;
    margin-bottom: -70px;
  }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ═══════════════════════════════════════════════════════════════════════════
   VISUAL FLOW STORYBOARD MODAL & CANVAS PREVIEW
   ═══════════════════════════════════════════════════════════════════════════ */
.flow-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.flow-modal-container {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 1320px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--panel-border);
}

.flow-modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--panel-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #ffffff;
  flex-wrap: wrap;
}

.flow-modal-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.flow-modal-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
}

.flow-modal-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}

.flow-modal-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.flow-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.flow-select-preset {
  background: #f8fafc;
  border: 1px solid var(--border-input);
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #0f172a;
  outline: none;
}

.btn-flow-action {
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  border: none;
  font-family: inherit;
}

.btn-flow-action.primary {
  background: var(--accent);
  color: #ffffff;
}
.btn-flow-action.primary:hover {
  background: var(--accent-hover);
}

.btn-flow-action.secondary {
  background: #f1f5f9;
  color: var(--text-primary);
  border: 1px solid var(--panel-border);
}
.btn-flow-action.secondary:hover {
  background: #e2e8f0;
}

.flow-modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.flow-modal-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.flow-modal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f8fafc;
}

.flow-preview-toolbar {
  padding: 10px 24px;
  background: #ffffff;
  border-bottom: 1px solid var(--panel-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.preview-mode-switch {
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-mode-switch .toolbar-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.preview-mode-switch .theme-btn {
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 5px;
  border: 1px solid var(--panel-border);
  background: #f8fafc;
  color: var(--text-secondary);
  cursor: pointer;
}
.preview-mode-switch .theme-btn.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.flow-storyboard-stage {
  flex: 1;
  overflow: auto;
  padding: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.flow-mini-select {
  padding: 4px 8px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 5px;
  border: 1px solid var(--panel-border);
  background: #f8fafc;
  color: #0f172a;
  outline: none;
}

.flow-color-pickers {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.color-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px #cbd5e1;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s, box-shadow 0.15s;
}

.color-dot:hover {
  transform: scale(1.15);
}

.color-dot.active {
  transform: scale(1.25);
  box-shadow: 0 0 0 2px #0f172a;
}

.flow-zoom-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.zoom-btn {
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  border: 1px solid var(--panel-border);
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  line-height: 1.2;
}

.zoom-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.zoom-val {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  min-width: 38px;
  text-align: center;
}

.flow-canvas-preview {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  max-width: 100%;
  height: auto;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top center;
}

.btn-toolbar-tool.highlight {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: var(--accent);
  font-weight: 700;
}
.btn-toolbar-tool.highlight:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}

