:root {
  --bg-main: #0b0e14;
  --bg-toolbar: #131722;
  --border-color: #232936;
  --accent-color: #d4894c;
  --accent-hover: #b86e35;
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --zoom-scale: 0.8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  height: 100vh;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Browser mode warning banner (hidden) */
.browser-mode-banner {
  display: none !important;
}

/* Floating restore pill when toolbar is collapsed (Top Left - Ergonomic Anchor) */
.floating-expand-btn {
  position: fixed;
  top: 8px;
  left: 8px;
  right: auto;
  transform: none;
  background: #182030;
  border: 1px solid var(--accent-color);
  color: #f7d294;
  font-size: 13px;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 6px;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.floating-expand-btn:hover {
  background: var(--accent-color);
  color: #1a0f07;
  transform: scale(1.05);
}

body.toolbar-collapsed .floating-expand-btn {
  display: flex;
}

body.toolbar-collapsed .main-toolbar {
  display: none !important;
}

body.toolbar-collapsed .floating-recording-pill {
  top: 14px;
  right: 20px;
}

/* Floating scroll helper buttons (bottom right) */
.floating-scroll-helper {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 999;
  pointer-events: none;
}

.floating-scroll-btn {
  pointer-events: auto;
  background: #182030;
  border: 1px solid var(--accent-color);
  color: #f7d294;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  opacity: 0.9;
}

.floating-scroll-btn:hover {
  opacity: 1;
  background: var(--accent-color);
  color: #1a0f07;
  transform: scale(1.05);
}

/* Header & Global Toolbar (Organized Two-Tier Architecture) */
.main-toolbar {
  background-color: var(--bg-toolbar);
  border-bottom: 1px solid var(--border-color);
  padding: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}

/* TIER 1: Navigation, Brand, Project & Global Actions */
.toolbar-tier-primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px;
  gap: 8px;
  max-width: 100vw;
  overflow-x: auto;
  scrollbar-width: none;
}

.toolbar-tier-primary::-webkit-scrollbar {
  display: none;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 5px;
}

.toolbar-group-left {
  flex-shrink: 0;
}

.toolbar-group-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 0 0 auto;
}

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

.toolbar-divider {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 2px;
}

.toolbar-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.toolbar-icon {
  font-size: 16px;
}

.toolbar-title {
  font-size: 13px;
  font-weight: 800;
  color: #f7d294;
  letter-spacing: -0.3px;
  line-height: 1.1;
}

.toolbar-subtitle {
  font-size: 9px;
  color: var(--text-muted);
}

/* Project & Multi-App Profiles Selector */
.project-selector-container {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.project-dropdown-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #181d29;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 0 6px;
  height: 28px;
  transition: all 0.2s;
}

.project-dropdown-wrapper:hover,
.project-dropdown-wrapper:focus-within {
  border-color: var(--accent-color);
}

.project-icon {
  font-size: 12px;
}

.project-dropdown {
  background: transparent;
  border: none;
  color: #f7d294;
  font-size: 12px;
  font-weight: 700;
  outline: none;
  cursor: pointer;
  max-width: 185px;
}

.project-dropdown option {
  background: #131722;
  color: var(--text-main);
  font-size: 11px;
  font-weight: normal;
}

.btn-save-project {
  border-color: #234e35 !important;
  color: #86efac !important;
}

.btn-save-project:hover {
  background: #153322 !important;
  border-color: #4ade80 !important;
  color: #bbf7d0 !important;
}

.btn-autologin-all {
  background: #2b2210 !important;
  border-color: #d97706 !important;
  color: #fbbf24 !important;
  font-weight: 700 !important;
  height: 28px;
  padding: 0 8px;
  font-size: 11px;
  border-radius: 5px;
  flex-shrink: 0;
}

.btn-autologin-all:hover {
  background: #423012 !important;
  border-color: #f59e0b !important;
  color: #fef08a !important;
}

.btn-autologin-all.is-logged-in {
  background: rgba(239, 68, 68, 0.18) !important;
  border-color: rgba(239, 68, 68, 0.6) !important;
  color: #fca5a5 !important;
}

.btn-autologin-all.is-logged-in:hover {
  background: rgba(239, 68, 68, 0.35) !important;
  border-color: #ef4444 !important;
  color: #fee2e2 !important;
}

.btn-logout-all {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  color: #fca5a5 !important;
  font-weight: 700 !important;
  height: 28px;
  padding: 0 8px;
  font-size: 11px;
  border-radius: 5px;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.btn-logout-all:hover {
  background: rgba(239, 68, 68, 0.35) !important;
  border-color: #ef4444 !important;
  color: #fee2e2 !important;
}

/* Nav arrows group */
.nav-arrows {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.tool-btn {
  background: #1c2230;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 5px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.15s;
  flex-shrink: 0;
}

.tool-btn:hover {
  background: #283042;
  border-color: #3b4760;
}

.url-input-wrapper {
  display: flex;
  align-items: center;
  background: #181d29;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  flex: 1;
  padding: 0 4px 0 6px;
  height: 28px;
  transition: border-color 0.2s;
  min-width: 0;
  gap: 3px;
}

.url-input-wrapper:focus-within {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(212, 137, 76, 0.25);
}

.url-icon {
  font-size: 13px;
  margin-right: 2px;
  flex-shrink: 0;
}

#globalUrlInput {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 11.5px;
  flex: 1;
  min-width: 60px;
}

.preset-select {
  background: #222938;
  border: 1px solid var(--border-color);
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 600;
  border-radius: 4px;
  padding: 2px 4px;
  outline: none;
  cursor: pointer;
  flex-shrink: 0;
  max-width: 85px;
}

.btn-primary {
  background: var(--accent-color);
  border: none;
  color: #1a0f07;
  font-weight: 700;
  font-size: 10.5px;
  padding: 0 8px;
  height: 22px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
  flex-shrink: 0;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: white;
}

.tool-btn-action {
  background: #1c2230;
  border: 1px solid #3b4760;
  color: #cbd5e1;
  border-radius: 5px;
  padding: 0 7px;
  height: 28px;
  min-width: 28px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.tool-btn-action:hover {
  background: #2b354b;
  color: #fff;
  border-color: var(--accent-color);
}

.btn-collapse-action {
  background: #182030;
  border-color: rgba(255, 255, 255, 0.15);
  color: #f7d294;
  font-weight: 700;
  padding: 0 8px;
}

.btn-collapse-action:hover {
  background: #253147;
  border-color: var(--accent-color);
  color: #fff;
}

/* ==========================================================================
   TIER 2: Workspace & Device Canvas Controls Strip
   ========================================================================== */
.toolbar-tier-secondary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 10px;
  background: #10141d;
  gap: 8px;
  font-size: 10.5px;
  max-width: 100vw;
  overflow-x: auto;
  scrollbar-width: none;
}

.toolbar-tier-secondary::-webkit-scrollbar {
  display: none;
}

.secondary-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

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

.secondary-divider {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0 2px;
}

/* Control Pills in Secondary Bar */
.control-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #161b26;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 5px;
  transition: all 0.15s;
}

.control-pill:hover {
  border-color: rgba(212, 137, 76, 0.4);
}

.pill-label {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 10px;
  white-space: nowrap;
}

.control-pill select {
  background: #1c2230;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 10px;
  font-weight: 600;
  border-radius: 4px;
  padding: 1px 4px;
  height: 22px;
  outline: none;
  cursor: pointer;
}

.control-pill select:hover {
  border-color: var(--accent-color);
}

/* Zoom pill */
.zoom-control-pill {
  gap: 5px;
}

.zoom-control-pill input[type="range"] {
  width: 55px;
  accent-color: var(--accent-color);
  cursor: pointer;
}

.btn-zoom-step {
  display: none;
  background: #1c2230;
  border: 1px solid #3b4760;
  color: #cbd5e1;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  width: 24px;
  height: 22px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: all 0.15s ease;
  user-select: none;
  touch-action: manipulation;
}

.btn-zoom-step:hover {
  background: #2b354b;
  color: #fff;
  border-color: var(--accent-color);
}

.btn-zoom-step:active {
  background: var(--accent-color);
  color: #1a0f07;
}

@media (max-width: 768px), (pointer: coarse) {
  .btn-zoom-step {
    display: inline-flex;
  }
}

.zoom-value-badge {
  font-family: monospace;
  font-weight: 700;
  color: #f7d294;
  background: #1c2230;
  padding: 1px 4px;
  border-radius: 4px;
  font-size: 10px;
  min-width: 28px;
  text-align: center;
}

.tool-btn-pill {
  background: #242c3d;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.tool-btn-pill:hover {
  background: #323d54;
  color: #fff;
  border-color: var(--accent-color);
}

/* Sync Scroll Pill */
.sync-pill {
  cursor: pointer;
  user-select: none;
}

.sync-pill input[type="checkbox"] {
  accent-color: var(--accent-color);
  cursor: pointer;
}

.sync-pill span {
  color: #cbd5e1;
  font-weight: 600;
  font-size: 10px;
}

/* Shortcut tips on the right */
.shortcut-tip {
  color: var(--text-muted);
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.shortcut-tip kbd {
  background: #1c2230;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  padding: 1px 4px;
  font-family: monospace;
  font-size: 9px;
  color: #f7d294;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.session-badge {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.2);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* Devices Canvas Area */
.devices-canvas {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 28px 22px;
  padding: 20px 24px 80px 24px;
  align-items: flex-start;
  justify-content: center;
  background-image: radial-gradient(#182030 1px, transparent 1px);
  background-size: 24px 24px;
  scroll-behavior: smooth;
}

/* Custom Visible Scrollbars so scrolling down to other devices is effortless */
.devices-canvas::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
.devices-canvas::-webkit-scrollbar-track {
  background: #0d111a;
  border-left: 1px solid var(--border-color);
}
.devices-canvas::-webkit-scrollbar-thumb {
  background: #2b354b;
  border-radius: 6px;
  border: 2px solid #0d111a;
}
.devices-canvas::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}

/* Force 1 row mode */
.devices-canvas.layout-row {
  flex-wrap: nowrap !important;
  justify-content: flex-start !important;
}

/* Force 2 columns grid mode */
.devices-canvas.layout-grid {
  flex-wrap: wrap !important;
  justify-content: center !important;
  max-width: calc(2 * (420px + 24px) * var(--zoom-scale) + 80px);
  margin: 0 auto;
}

/* Individual Device Slot - sized proportionally so phones are always 100% complete */
.device-slot {
  position: relative;
  width: calc((var(--phone-w, 393px) + 24px) * var(--zoom-scale));
  height: calc((var(--phone-h, 852px) + 55px) * var(--zoom-scale));
  flex-shrink: 0;
  transition: width 0.15s ease-out, height 0.15s ease-out;
  margin-bottom: 6px;
}

/* Slot Control Box (Single Compact Row) */
.slot-header {
  background: #151923;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}

.slot-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.role-tag-input,
.slot-role-select {
  background: #1f2533;
  border: 1px solid #3b4760;
  color: #f7d294;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 6px;
  outline: none;
  cursor: pointer;
  max-width: 130px;
  min-width: 85px;
  text-align: left;
  flex-shrink: 0;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.slot-role-select option {
  background: #181d28;
  color: #f1f5f9;
  font-weight: 500;
  padding: 4px;
}

.role-tag-input:focus,
.slot-role-select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

.device-preset-select {
  background: #181d28;
  border: 1px solid #3b4760;
  color: var(--text-main);
  font-size: 10px;
  border-radius: 6px;
  padding: 3px 4px;
  outline: none;
  cursor: pointer;
  flex: 1;
  min-width: 0;
  max-width: 140px;
}

.slot-actions {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.slot-btn {
  background: #222938;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: 5px;
  padding: 2px 5px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.slot-btn:hover {
  background: #313b52;
  color: #fff;
}

.slot-btn-clear {
  color: #f87171;
}

.slot-btn-clear:hover {
  background: #451a1a;
  border-color: #ef4444;
}

.slot-btn-key {
  color: #94a3b8;
}

.slot-btn-key.has-credentials {
  border-color: var(--accent-color) !important;
  color: #f7d294 !important;
  background: rgba(212, 137, 76, 0.16) !important;
  box-shadow: 0 0 8px rgba(212, 137, 76, 0.28);
}

.slot-btn-key.has-credentials:hover {
  background: var(--accent-color) !important;
  color: #1a0f07 !important;
}

/* Slot Individual URL Row */
.slot-url-row {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #0f131a;
  border: 1px solid #283244;
  border-radius: 6px;
  padding: 2px 4px;
}

.slot-url-input {
  background: transparent;
  border: none;
  outline: none;
  color: #93c5fd;
  font-size: 11px;
  flex: 1;
  font-family: monospace;
}

.slot-url-btn {
  background: #2563eb;
  border: none;
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
}

.slot-url-btn:hover {
  background: #1d4ed8;
}

/* Scaled Device Frame Container */
.device-scaler-box {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(var(--phone-w, 393px) + 24px);
  transform: scale(var(--zoom-scale));
  transform-origin: top left;
  transition: transform 0.15s ease-out;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Smartphone Shell */
.phone-frame {
  position: relative;
  background: #161b24;
  border: 12px solid #2a3344;
  border-radius: 46px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75), 0 0 0 2px #44526b inset;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Top Loading Progress Line */
.phone-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #f59e0b, #3b82f6);
  z-index: 50;
  transition: width 0.3s ease;
}

/* iPhone Dynamic Island / Punch Hole */
.phone-island {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 105px;
  height: 25px;
  background: #000;
  border-radius: 20px;
  z-index: 40;
  pointer-events: none;
  box-shadow: 0 0 0 1px #222;
}

.phone-camera-punch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 13px;
  height: 13px;
  background: #000;
  border-radius: 50%;
  z-index: 40;
  pointer-events: none;
  box-shadow: 0 0 0 2px #222 inset;
}

/* Webview container & Element */
.webview-container {
  width: 100%;
  height: 100%;
  background: #ffffff;
  display: flex;
  position: relative;
}

webview {
  display: flex !important;
  flex: 1 1 100% !important;
  width: 100% !important;
  height: 100% !important;
  border: none;
  background: #ffffff;
}

/* Phone Home Bottom Bar */
.phone-home-indicator {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 4px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 3px;
  z-index: 40;
  pointer-events: none;
}

/* ==========================================================================
   Project & Profiles Manager Modal Styles
   ========================================================================== */
body.modal-open #devicesCanvas {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 9, 15, 0.92);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  animation: modalFadeIn 0.2s ease-out;
}

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

.modal-card {
  background: #141b29;
  border: 1px solid #32405d;
  border-radius: 16px;
  max-width: 780px;
  width: 92%;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  animation: modalSlideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-card-sm {
  max-width: 460px;
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-input-wrapper input {
  width: 100%;
  padding-right: 36px;
}

.btn-toggle-pw {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
  color: #94a3b8;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-toggle-pw:hover {
  color: #fff;
}

@keyframes modalSlideUp {
  from { transform: translateY(20px) scale(0.97); }
  to { transform: translateY(0) scale(1); }
}

.modal-header {
  padding: 16px 22px;
  border-bottom: 1px solid #1e2638;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #151a28;
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-icon {
  font-size: 26px;
}

.modal-title {
  font-size: 17px;
  font-weight: 800;
  color: #f7d294;
}

.modal-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.modal-close-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 0 6px;
  border-radius: 6px;
  transition: all 0.15s;
}

.modal-close-btn:hover {
  color: #fff;
  background: #232c3f;
}

.modal-body {
  padding: 18px 22px;
  overflow-y: auto;
  flex: 1;
}

.modal-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

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

.btn-primary-action {
  background: var(--accent-color);
  color: #1a0f07;
  font-weight: 700;
  font-size: 12px;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

.modal-tool-btn {
  background: #1c2333;
  border: 1px solid #2d384e;
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
  user-select: none;
}

.modal-tool-btn:hover {
  background: #2a354c;
  border-color: #3f4e6d;
}

.file-upload-label {
  cursor: pointer;
}

/* Form for New / Edit Project */
.project-form-container {
  background: #161c28;
  border: 1px solid #2c374c;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 18px;
  animation: modalFadeIn 0.2s ease;
}

.project-form-container h3 {
  font-size: 14px;
  font-weight: 700;
  color: #f7d294;
  margin-bottom: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group input,
.form-group select {
  background: #0f131c;
  border: 1px solid #283348;
  color: #f1f5f9;
  font-size: 12px;
  border-radius: 6px;
  padding: 8px 10px;
  outline: none;
  transition: border-color 0.15s;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--accent-color);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.btn-secondary {
  background: #1f2738;
  border: 1px solid #2e3b52;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-secondary:hover {
  background: #283349;
}

/* Project List */
.project-list-header {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.project-list-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.project-card {
  background: #151a26;
  border: 1px solid #232c3f;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  transition: all 0.18s;
}

.project-card:hover {
  border-color: #3b4966;
  background: #192030;
}

.project-card.active-project {
  border-color: var(--accent-color);
  background: rgba(212, 137, 76, 0.08);
}

.project-card-info {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.project-card-icon {
  font-size: 26px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1d2434;
  border-radius: 10px;
  border: 1px solid #2b364c;
}

.project-card-details {
  min-width: 0;
}

.project-card-name {
  font-size: 14px;
  font-weight: 700;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.project-card-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 8px;
  background: #252f44;
  color: #94a3b8;
}

.badge-active {
  background: #234e35;
  color: #86efac;
  border: 1px solid #3b7c55;
}

.project-card-url {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 380px;
}

.project-card-roles-preview {
  display: flex;
  gap: 4px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.role-pill {
  font-size: 10px;
  background: #1c2436;
  color: #cbd5e1;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid #2a364d;
}

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

.card-action-btn {
  background: #1c2333;
  border: 1px solid #2b354c;
  color: #cbd5e1;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.card-action-btn:hover {
  background: #28334b;
  color: #fff;
  border-color: #3f4e6e;
}

.card-action-btn.btn-load-active {
  background: var(--accent-color);
  color: #1a0f07;
  border-color: var(--accent-color);
  font-weight: 700;
}

.card-action-btn.btn-load-active:hover {
  background: var(--accent-hover);
  color: #fff;
}

.card-action-btn.btn-delete:hover {
  background: #451a1a;
  border-color: #ef4444;
  color: #fca5a5;
}

/* Toast Feedback Notification */
.toast-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #151c2a;
  border: 1px solid var(--accent-color);
  color: #f8fafc;
  padding: 10px 22px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
  z-index: 3000;
  opacity: 0;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Responsive adjustments for toolbar */
@media (max-width: 1400px) {
  .shortcut-tip {
    display: none;
  }
  .btn-fullscreen-text {
    display: none;
  }
}

@media (max-width: 1250px) {
  .secondary-right {
    display: none;
  }
  .btn-save-project .btn-text,
  .btn-roles-text,
  .toolbar-subtitle {
    display: none;
  }
  .toolbar-group-center {
    max-width: 400px;
  }
}

@media (max-width: 1080px) {
  .btn-omnisprite-text,
  .btn-collapse-action .btn-collapse-text {
    display: none;
  }
  .project-dropdown {
    max-width: 110px;
  }
  .toolbar-group-center {
    max-width: 320px;
  }
}

@media (max-width: 880px) {
  .btn-autologin-text,
  .btn-record-text {
    display: none;
  }
  .btn-autologin-all {
    padding: 0 6px;
    font-size: 10px;
  }
  .preset-select {
    display: none;
  }
  .project-dropdown-wrapper {
    max-width: 85px;
  }
}

/* ==========================================================================
   Video Recording Controls & Floating Indicator
   ========================================================================== */
.btn-record-video {
  border-color: #ef4444 !important;
  color: #f87171 !important;
  background: rgba(239, 68, 68, 0.08) !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-record-video:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: #f87171 !important;
  color: #fff !important;
}

.btn-record-video.is-recording {
  background: #dc2626 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.6);
  animation: pulse-recording 1.6s infinite ease-in-out;
}

.record-timer {
  font-variant-numeric: tabular-nums;
  font-family: monospace;
  font-weight: 700;
  font-size: 11px;
  background: rgba(0, 0, 0, 0.35);
  padding: 1px 5px;
  border-radius: 4px;
}

@keyframes pulse-recording {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

/* Floating recording indicator in corner (presentation mode or collapsed) */
.floating-recording-pill {
  position: fixed;
  top: 14px;
  right: 18px;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid #ef4444;
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 5000;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7), 0 0 10px rgba(239, 68, 68, 0.35);
  backdrop-filter: blur(8px);
}

.recording-pulsing-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  background: #ef4444;
  border-radius: 50%;
  animation: pulse-dot 1s infinite alternate;
}

@keyframes pulse-dot {
  from { opacity: 0.3; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1.25); }
}

.btn-stop-floating-record {
  background: #dc2626;
  border: none;
  color: #fff;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-stop-floating-record:hover {
  background: #ef4444;
}

/* ==========================================================================
   OmniSprite Button & Side Drawer (Auto-QA Testing Module)
   ========================================================================== */

.btn-omnisprite {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(59, 130, 246, 0.15)) !important;
  border-color: rgba(168, 85, 247, 0.45) !important;
  color: #c084fc !important;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-omnisprite:hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(59, 130, 246, 0.3)) !important;
  border-color: #a855f7 !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.4);
}

.slot-btn-screenshot:hover {
  background: rgba(56, 189, 248, 0.2) !important;
  border-color: #38bdf8 !important;
  color: #38bdf8 !important;
}

/* OmniSprite Backdrop (Desactivado para vista nítida y despejada de los simuladores) */
.omnisprite-backdrop {
  display: none !important;
}

/* OmniSprite Drawer Panel */
.omnisprite-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 460px;
  max-width: 92vw;
  height: 100vh;
  background: #0d1322;
  border-left: 1px solid rgba(168, 85, 247, 0.3);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.85);
  z-index: 6001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideInDrawer 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInDrawer {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.omnisprite-header {
  padding: 16px 20px;
  background: #11182c;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.omnisprite-title-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.omnisprite-logo-icon {
  font-size: 26px;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.35);
  padding: 6px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.omnisprite-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-ai-pill {
  font-size: 10px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: #fff;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.omnisprite-subtitle {
  margin: 2px 0 0 0;
  font-size: 11px;
  color: #94a3b8;
}

.omnisprite-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.omnisprite-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.omnisprite-body {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 20px 40px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.omnisprite-body::-webkit-scrollbar {
  width: 8px;
}
.omnisprite-body::-webkit-scrollbar-track {
  background: #0d1322;
}
.omnisprite-body::-webkit-scrollbar-thumb {
  background: #232d42;
  border-radius: 4px;
}

/* Section styling inside drawer */
.os-section {
  background: #141c2e;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.os-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
}

.os-sec-icon {
  font-size: 15px;
}

.os-flex-between {
  justify-content: space-between;
  width: 100%;
}

.os-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.os-form-row {
  display: flex;
  gap: 10px;
}

.os-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.os-label-row label,
.os-form-group label {
  font-size: 11px;
  font-weight: 600;
  color: #cbd5e1;
}

.os-link {
  font-size: 10px;
  color: #a855f7;
  text-decoration: none;
  font-weight: 600;
}

.os-link:hover {
  text-decoration: underline;
  color: #c084fc;
}

.os-input-with-btn {
  display: flex;
  position: relative;
  align-items: center;
}

.os-input-with-btn input {
  flex: 1;
  padding-right: 36px !important;
}

.os-form-group input,
.os-form-group select,
.os-form-group textarea {
  background: #0b101c;
  border: 1px solid #28354d;
  color: #f1f5f9;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.os-form-group input:focus,
.os-form-group select:focus,
.os-form-group textarea:focus {
  outline: none;
  border-color: #a855f7;
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.2);
}

.os-hint {
  font-size: 10px;
  color: #64748b;
}

/* Preset Chips */
.os-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.os-chip {
  background: #1b253b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.os-chip:hover {
  background: rgba(168, 85, 247, 0.2);
  border-color: #a855f7;
  color: #ffffff;
}

.os-actions-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.os-btn-primary {
  flex: 1;
  background: linear-gradient(135deg, #9333ea, #4f46e5);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(147, 51, 234, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.os-btn-primary:hover {
  background: linear-gradient(135deg, #a855f7, #6366f1);
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.5);
}

.os-btn-secondary {
  background: #dc2626;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.os-mini-btn {
  background: #1e293b;
  border: 1px solid #334155;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.os-mini-btn:hover {
  color: #fff;
  border-color: #64748b;
}

.os-mini-btn.copied {
  background: #064e3b !important;
  color: #34d399 !important;
  border-color: #059669 !important;
}

/* Status Badges */
.os-status-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-idle {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.badge-running {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid #a855f7;
  animation: pulse-border 1.5s infinite;
}

.badge-success {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid #22c55e;
}

/* Live execution feed */
.os-live-feed {
  background: #090e1a;
  border: 1px solid #1a2336;
  border-radius: 6px;
  padding: 10px;
  min-height: 120px;
  max-height: 200px;
  overflow-y: auto;
  font-family: monospace;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.os-feed-empty {
  color: #64748b;
  font-style: italic;
  font-family: inherit;
  font-size: 11px;
  text-align: center;
  padding: 24px 8px;
}

.os-feed-item {
  display: flex;
  gap: 8px;
  line-height: 1.4;
}

.os-feed-time {
  color: #64748b;
  flex-shrink: 0;
}

.os-feed-text {
  color: #cbd5e1;
  word-break: break-word;
}

.os-feed-action {
  color: #38bdf8;
  font-weight: 600;
}

.os-feed-gemini {
  color: #c084fc;
}

/* Stats summary */
.os-report-summary {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.os-stat-card {
  padding: 8px;
  border-radius: 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-pass {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
}
.stat-pass .os-stat-num { color: #4ade80; }

.stat-warn {
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.25);
}
.stat-warn .os-stat-num { color: #facc15; }

.stat-bug {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.stat-bug .os-stat-num { color: #f87171; }

.os-stat-num {
  font-size: 16px;
  font-weight: 800;
}

.os-stat-label {
  font-size: 9px;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 700;
}

/* Findings list */
.os-findings-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
}

.os-finding-empty {
  color: #64748b;
  font-size: 11px;
  font-style: italic;
  text-align: center;
  padding: 12px 0;
}

.os-finding-card {
  background: #0d1424;
  border-radius: 6px;
  padding: 8px 10px;
  border-left: 3px solid #64748b;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.os-finding-card.finding-bug {
  border-left-color: #ef4444;
  background: rgba(239, 68, 68, 0.05);
}

.os-finding-card.finding-warn {
  border-left-color: #eab308;
  background: rgba(234, 179, 8, 0.05);
}

.os-finding-card.finding-pass {
  border-left-color: #22c55e;
  background: rgba(34, 197, 94, 0.05);
}

.os-finding-title {
  font-size: 11px;
  font-weight: 700;
  color: #f1f5f9;
}

.os-finding-desc {
  font-size: 10px;
  color: #94a3b8;
  line-height: 1.3;
}

/* Custom steps input */
#inputCustomSteps {
  background: #0f172a;
  border: 1px solid #334155;
  color: #38bdf8;
  font-weight: 700;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 11px;
}

/* Continue button */
.os-btn-accent {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #fff;
  border: none;
  font-weight: 600;
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.os-btn-accent:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

/* Test Suite Matrix */
.os-matrix-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}

.os-matrix-card {
  background: #0b1120;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.2s ease;
}

.os-matrix-card:hover {
  border-color: #38bdf8;
}

.os-matrix-card.running {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.05);
}

.os-matrix-card.passed {
  border-color: #10b981;
}

.os-matrix-card.failed {
  border-color: #ef4444;
}

.os-matrix-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.os-matrix-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #f1f5f9;
  cursor: pointer;
}

.os-step-stepper {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 5px;
  padding: 2px 6px;
  font-size: 10px;
  color: #94a3b8;
  font-weight: 600;
}

.btn-step-dec, .btn-step-inc {
  background: #0f172a;
  border: 1px solid #475569;
  color: #e2e8f0;
  border-radius: 3px;
  width: 18px;
  height: 18px;
  font-weight: 800;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-step-dec:hover, .btn-step-inc:hover {
  background: #38bdf8;
  color: #000;
  border-color: #38bdf8;
}

.step-count-val {
  color: #38bdf8;
  font-weight: 700;
  min-width: 14px;
  text-align: center;
}

.os-matrix-desc {
  font-size: 10px;
  color: #64748b;
  line-height: 1.3;
}

.os-matrix-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2px;
}

.os-case-status {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-pending {
  background: #334155;
  color: #94a3b8;
}

.badge-passed {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-failed {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.badge-running {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.btn-suite-run {
  background: #064e3b;
  color: #34d399;
  border-color: #059669;
}

.btn-suite-run:hover {
  background: #059669;
  color: #fff;
}

.os-matrix-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.os-matrix-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.os-case-checkbox {
  width: 15px;
  height: 15px;
  accent-color: #38bdf8;
  cursor: pointer;
}

.os-case-title {
  font-size: 11.5px;
  color: #f1f5f9;
}

.os-badge-time {
  font-size: 10px;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.os-btn-accent {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(139, 92, 246, 0.25);
}

.os-btn-accent:hover {
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
}

/* AI Steps Editor & Custom Flows */
.os-step-item-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11.5px;
  color: #e2e8f0;
}

.os-step-item-card .step-idx {
  background: rgba(168, 85, 247, 0.25);
  color: #d8b4fe;
  font-weight: 700;
  font-size: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.os-step-item-card .step-action-tag {
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  font-family: monospace;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.os-step-item-card .step-desc {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.os-step-item-card .step-remove-btn {
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 12px;
  padding: 2px 4px;
  border-radius: 4px;
  opacity: 0.7;
}

.os-step-item-card .step-remove-btn:hover {
  opacity: 1;
  background: rgba(239, 68, 68, 0.2);
}

.os-custom-flow-del-btn {
  background: transparent;
  border: none;
  color: #f87171;
  cursor: pointer;
  font-size: 12px;
  padding: 3px 6px;
  border-radius: 4px;
  opacity: 0.7;
  transition: all 0.15s ease;
}

.os-custom-flow-del-btn:hover {
  opacity: 1;
  background: rgba(239, 68, 68, 0.25);
}

.os-custom-flows-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

/* Virtual Touch Pointer & In-Simulator Visual Feedback */
.virtual-touch-pointer {
  position: absolute;
  width: 28px;
  height: 28px;
  background: rgba(168, 85, 247, 0.5);
  border: 2px solid #e9d5ff;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.9), inset 0 0 8px rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(1);
  transition: transform 0.2s ease, left 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), top 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 999999;
}

.virtual-touch-pointer.touch-active {
  animation: touchPulseAnim 0.38s ease-out;
}

@keyframes touchPulseAnim {
  0% { transform: translate(-50%, -50%) scale(0.6); opacity: 1; }
  50% { transform: translate(-50%, -50%) scale(1.4); opacity: 0.85; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0.95; }
}

.virtual-touch-badge {
  position: absolute;
  background: rgba(15, 23, 42, 0.94);
  color: #f1f5f9;
  border: 1px solid rgba(168, 85, 247, 0.7);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  pointer-events: none;
  z-index: 1000000;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  transition: all 0.25s ease;
  transform: translateY(-100%);
}

/* Step Editor Enhanced Controls */
.os-step-item-card {
  transition: all 0.15s ease;
}

.os-step-item-card.step-disabled {
  opacity: 0.4;
  background: rgba(0, 0, 0, 0.2);
  filter: grayscale(0.5);
}

.step-enable-chk {
  width: 14px;
  height: 14px;
  accent-color: #a855f7;
  cursor: pointer;
  flex-shrink: 0;
}

.step-tool-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 11px;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.step-tool-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.os-step-inline-edit {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 6px;
  padding: 8px 10px;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.os-step-inline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(75px, 1fr));
  gap: 6px;
}

.os-step-input {
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 11px;
  width: 100%;
  box-sizing: border-box;
}

.os-case-action-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.15s ease;
}

.os-case-action-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  transform: translateY(-1px);
}

.os-case-action-btn.btn-del-case:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

.os-case-action-btn.btn-edit-case:hover {
  background: rgba(168, 85, 247, 0.25);
  border-color: rgba(168, 85, 247, 0.5);
  color: #e9d5ff;
}

.os-matrix-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  justify-content: flex-end;
}

.coord-capture-banner {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  animation: pulseCapture 1.5s infinite alternate;
}

@keyframes pulseCapture {
  0% { box-shadow: 0 0 4px rgba(2, 132, 199, 0.5); }
  100% { box-shadow: 0 0 12px rgba(56, 189, 248, 0.9); }
}

/* Modo de Ejecución: Segmented Pills (Simulador, Chrome Visible, Headless) */
.os-mode-pill-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 8px 6px;
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: all 0.18s ease;
  text-align: center;
}

.os-mode-pill-btn:hover {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.4);
  color: #fff;
  transform: translateY(-1px);
}

.os-mode-pill-btn.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3) 0%, rgba(126, 34, 206, 0.4) 100%);
  border-color: #a855f7;
  color: #f3e8ff;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.35);
}

/* Tabbed Feedback (Consola en Vivo vs Reporte de Calidad) */
.os-tabs-header {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.3);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 8px;
}

.os-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.15s ease;
}

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

.os-tab-btn.active {
  background: rgba(168, 85, 247, 0.25);
  color: #f3e8ff;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

/* Multi-Device Screen Recording Indicators */
.phone-rec-badge {
  position: absolute;
  top: 12px;
  right: 14px;
  background: #ef4444;
  color: #ffffff;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 600;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.8);
  animation: recPulse 1s infinite alternate ease-in-out;
  pointer-events: none;
}

@keyframes recPulse {
  from { opacity: 0.85; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1.05); }
}

.device-slot.slot-recording .phone-frame {
  border-color: rgba(239, 68, 68, 0.85) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.65), 0 12px 36px rgba(239, 68, 68, 0.35) !important;
  transition: all 0.25s ease;
}

.step-device-tag {
  font-size: 9.5px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #7dd3fc;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
  white-space: nowrap;
}

/* Floating Minimized OmniSuite Capsule */
.omnisuite-floating-pill {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(13, 19, 34, 0.94);
  border: 1px solid rgba(168, 85, 247, 0.45);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.65), 0 0 16px rgba(168, 85, 247, 0.3);
  backdrop-filter: blur(12px);
  padding: 8px 14px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 6005;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  animation: slideInPill 0.25s ease-out;
  user-select: none;
}

.omnisuite-floating-pill:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: #c084fc;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.8), 0 0 20px rgba(168, 85, 247, 0.5);
}

.omnisuite-floating-pill.is-recording {
  border-color: #ef4444;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.75), 0 0 20px rgba(239, 68, 68, 0.55);
}

.os-pill-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.os-pill-icon {
  font-size: 18px;
}

.os-pill-title {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
}

.os-pill-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  background: rgba(168, 85, 247, 0.25);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.os-pill-badge.rec-active {
  background: #ef4444;
  color: #ffffff;
  border-color: #dc2626;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.7);
  animation: recPulse 1s infinite alternate ease-in-out;
}

.os-pill-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.os-pill-stop-btn {
  background: #dc2626;
  border: none;
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.os-pill-stop-btn:hover {
  background: #ef4444;
}

.os-pill-restore-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #cbd5e1;
  font-size: 12px;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.os-pill-restore-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

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


