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

:root {
  --bg:          #08090c;
  --surface:     #0e1016;
  --surface-2:   #151821;
  --surface-3:   #1c2030;
  --border:      #1f2333;
  --border-hi:   #2a2f42;
  --accent:      #6366f1;
  --accent-dim:  #4f46e5;
  --accent-glow: rgba(99, 102, 241, .15);
  --success:     #22c55e;
  --success-dim: rgba(34, 197, 94, .12);
  --warning:     #f59e0b;
  --warning-dim: rgba(245, 158, 11, .12);
  --danger:      #ef4444;
  --danger-dim:  rgba(239, 68, 68, .12);
  --text:        #e2e8f0;
  --text-sec:    #94a3b8;
  --text-muted:  #475569;
  --radius:      10px;
  --radius-lg:   14px;
  --radius-sm:   6px;
  --sidebar-w:   220px;
  --global-w:    280px;
  --font:        -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
  --mono:        "SF Mono", "JetBrains Mono", "Fira Code", "Cascadia Code", monospace;
  --transition:  .18s cubic-bezier(.4,0,.2,1);
}

html, body { height: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════ */
.header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  height: 52px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
}
.header-left { display: flex; align-items: center; }
.header-center { flex: 1; display: flex; justify-content: center; }
.header-right { display: flex; align-items: center; gap: 10px; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border-radius: 8px;
  color: var(--accent);
}
.brand-icon svg { width: 16px; height: 16px; }
.brand-text {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .02em;
  color: var(--text);
}

.status-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
  letter-spacing: .02em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
}
.status-pill::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-idle { background: var(--surface-2); color: var(--text-muted); }
.status-idle::before { background: var(--text-muted); }
.status-connecting { background: var(--warning-dim); color: var(--warning); }
.status-connecting::before { background: var(--warning); animation: pulse-dot 1.5s infinite; }
.status-connected { background: var(--success-dim); color: var(--success); }
.status-connected::before { background: var(--success); box-shadow: 0 0 6px var(--success); }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}

.device-count {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* ══════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  font-family: var(--font);
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-dim); box-shadow: 0 0 16px var(--accent-glow); }
.btn-danger {
  background: var(--danger-dim);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, .2);
}
.btn-danger:hover { background: rgba(239, 68, 68, .2); }
.btn-ghost {
  background: transparent;
  color: var(--text-sec);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-hi); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-xs { padding: 3px 8px; font-size: 11px; }
.btn-icon { padding: 7px 10px; }

/* ══════════════════════════════════════════
   APP LAYOUT
   ══════════════════════════════════════════ */
.app {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ══════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.sidebar-title { font-weight: 700; font-size: 13px; }

.online-pill {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--success-dim);
  color: var(--success);
}

.device-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}
.device-list::-webkit-scrollbar { width: 3px; }
.device-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.device-list-empty {
  padding: 32px 16px;
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
}

.device-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all var(--transition);
}
.device-item:hover { background: var(--surface-2); }
.device-item.selected {
  background: rgba(99, 102, 241, .08);
  border-left-color: var(--accent);
}

.device-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.device-dot.online { background: var(--success); box-shadow: 0 0 8px rgba(34, 197, 94, .4); }
.device-dot.offline { background: var(--text-muted); }

.device-info { min-width: 0; flex: 1; }
.device-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.device-meta { font-size: 10px; color: var(--text-muted); margin-top: 1px; }

.sidebar-targets {
  font-size: 9px;
  font-weight: 700;
  color: var(--danger);
  background: var(--danger-dim);
  padding: 1px 6px;
  border-radius: 10px;
  flex-shrink: 0;
}

.device-screen-mini {
  width: 26px;
  height: 46px;
  border-radius: 5px;
  background: #000;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.device-screen-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ══════════════════════════════════════════
   VIEWPORT
   ══════════════════════════════════════════ */
.viewport {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 20px;
  background: var(--bg);
}

/* ── Grid ────────────────────────── */
.grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  align-content: start;
}

.grid-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
}
.empty-icon svg { width: 56px; opacity: .25; margin-bottom: 20px; }
.empty-title { font-size: 15px; font-weight: 600; color: var(--text-sec); margin-bottom: 6px; }
.empty-sub { font-size: 12px; color: var(--text-muted); max-width: 260px; }

.grid-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all .25s cubic-bezier(.4,0,.2,1);
}
.grid-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,.5), 0 0 0 1px var(--accent-glow);
}

.grid-card-screen {
  width: 100%;
  aspect-ratio: 9/16;
  background: #000;
  position: relative;
  overflow: hidden;
}
.grid-card-screen img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.grid-card-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 11px;
}

.grid-card-info {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--border);
}
.grid-card-info .device-dot { width: 6px; height: 6px; }
.grid-card-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.grid-card-android { font-size: 10px; color: var(--text-muted); }
.grid-card-targets {
  font-size: 10px;
  color: var(--danger);
  font-weight: 700;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════
   DEVICE VIEW (SELECTED)
   ══════════════════════════════════════════ */
.device-view {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.device-view-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.device-view-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.device-view-body {
  display: flex;
  gap: 20px;
  flex: 1;
  min-height: 0;
}

/* ── Phone Column ────────────── */
.phone-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex-shrink: 0;
  width: var(--phone-w, 290px);
}

.phone-frame {
  position: relative;
  width: 100%;
  background: linear-gradient(145deg, #1a1c24, #12141a);
  border-radius: 36px;
  border: 2px solid #2a2e3c;
  box-shadow:
    0 24px 48px rgba(0,0,0,.6),
    0 0 0 1px rgba(255,255,255,.03),
    inset 0 1px 0 rgba(255,255,255,.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.phone-punch-hole {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #0a0b0e;
  border: 1px solid #222;
  z-index: 2;
}

.phone-screen-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 9/19.5;
  background: #000;
  overflow: hidden;
  margin: 4px;
  margin-bottom: 0;
  border-radius: 32px 32px 0 0;
  width: calc(100% - 8px);
}

.phone-screen {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  cursor: crosshair;
  image-rendering: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
}

.screen-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-muted);
  pointer-events: none;
}
.placeholder-pulse {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border-hi);
  border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.screen-placeholder p { font-size: 12px; opacity: .6; }

.phone-nav-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 8px 0 14px;
}
.nav-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.nav-btn svg { width: 14px; height: 14px; }
.nav-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-hi); }
.nav-btn-home { width: 36px; height: 36px; border-radius: 50%; }

/* ── Toolbar ─────────────────── */
.toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.toolbar-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.toolbar-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  padding-left: 2px;
}

.input-row {
  display: flex;
  gap: 6px;
}

.input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  font-family: var(--font);
  transition: border-color var(--transition);
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.input::placeholder { color: var(--text-muted); }

.btn-stealth {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-sec);
  transition: all .25s;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
}
.btn-stealth:hover { background: var(--surface-3); border-color: var(--border-hi); }
.btn-stealth.active {
  background: linear-gradient(135deg, #7f1d1d, #991b1b);
  color: #fff;
  border-color: var(--danger);
  animation: stealth-glow 2.5s ease-in-out infinite;
}
@keyframes stealth-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,.3); }
  50% { box-shadow: 0 0 20px 4px rgba(239,68,68,.2); }
}
.stealth-icon { font-size: 15px; }
.stealth-label { flex: 1; text-align: left; }

.file-pick {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  transition: all var(--transition);
  overflow: hidden;
}
.file-pick:hover { border-color: var(--accent); color: var(--text-sec); }
.file-pick input { display: none; }
.file-pick-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ══════════════════════════════════════════
   INTEL PANEL (TABS)
   ══════════════════════════════════════════ */
.intel {
  flex: 1;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.intel-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 0 4px;
  flex-shrink: 0;
}
.intel-tab {
  flex: 1;
  padding: 10px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}
.intel-tab:hover { color: var(--text-sec); }
.intel-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.intel-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.intel-pane {
  display: none;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}
.intel-pane.active {
  display: flex;
}

.pane-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.pane-bar-title { font-size: 11px; font-weight: 600; color: var(--text-sec); }

/* ══════════════════════════════════════════
   GLOBAL PANEL
   ══════════════════════════════════════════ */
.global-panel {
  width: var(--global-w);
  min-width: var(--global-w);
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  background: var(--surface);
  max-height: calc(100vh - 52px);
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.panel-title { font-weight: 700; font-size: 13px; }

/* ══════════════════════════════════════════
   DATA FEED (SHARED STYLES)
   ══════════════════════════════════════════ */
.data-feed {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}
.data-feed::-webkit-scrollbar { width: 3px; }
.data-feed::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.data-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 100px;
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
  padding: 24px;
  line-height: 1.6;
}

.data-item {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  animation: fadeSlide .2s ease;
  transition: background var(--transition);
}
.data-item:hover { background: var(--surface-2); }

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

.data-item-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.icon-password { background: linear-gradient(135deg, #2d1a44, #4c2882); }
.icon-pin      { background: linear-gradient(135deg, #0d2a16, #166534); }
.icon-otp      { background: linear-gradient(135deg, #2a2008, #854d0e); }
.icon-other    { background: linear-gradient(135deg, #151c2e, #1e3a5f); }

.data-item-header { flex: 1; min-width: 0; }
.data-item-device {
  font-size: 10px;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.data-item-app {
  font-size: 12px;
  color: var(--text);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.data-item-time {
  font-size: 9px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  align-self: flex-start;
}

.data-item-tag {
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  margin-bottom: 6px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.data-tag-password   { background: #2d1540; color: #c77dff; }
.data-tag-pin        { background: #0d2a16; color: #4ade80; }
.data-tag-otp        { background: #2a2000; color: #fbbf24; }
.data-tag-seed       { background: #2a0a0a; color: #f87171; }
.data-tag-card       { background: #2a1a10; color: #fb923c; }
.data-tag-credential { background: #1a2040; color: #818cf8; }
.data-tag-other      { background: #1a1e28; color: #64748b; }

.data-item-value-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  margin-bottom: 4px;
}
.data-item-value {
  flex: 1;
  font-family: var(--mono);
  font-size: 13px;
  color: #fde68a;
  font-weight: 600;
  letter-spacing: .03em;
  word-break: break-all;
  user-select: all;
  min-width: 0;
}
.data-item-copy {
  flex-shrink: 0;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all var(--transition);
  line-height: 1;
}
.data-item-copy:hover { color: var(--text); background: var(--surface-3); }
.data-item-copy.copied { color: var(--success); }
.data-item-field {
  font-size: 10px;
  color: var(--text-muted);
  padding-left: 2px;
}

.count-pill-sm {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 20px;
  background: var(--accent);
  color: #fff;
  min-width: 18px;
  text-align: center;
}

/* ══════════════════════════════════════════
   TARGETS
   ══════════════════════════════════════════ */
.targets-list {
  flex: 1;
  overflow-y: auto;
}
.targets-list::-webkit-scrollbar { width: 3px; }
.targets-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.targets-empty {
  padding: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.target-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  animation: fadeSlide .2s ease;
}
.target-card:last-child { border-bottom: none; }
.target-card:hover { background: var(--surface-2); }

.target-cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.target-info { flex: 1; min-width: 0; }
.target-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.target-secure { font-size: 9px; vertical-align: middle; }
.target-meta { font-size: 10px; color: var(--text-muted); margin-top: 1px; }

.target-badge {
  font-size: 9px;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.target-badge-bank    { background: #1a2548; color: #818cf8; }
.target-badge-crypto  { background: #2a2208; color: #fbbf24; }
.target-badge-wallet  { background: #2a1640; color: #c084fc; }
.target-badge-fintech { background: #0d2a16; color: #4ade80; }

/* ══════════════════════════════════════════
   LOG
   ══════════════════════════════════════════ */
.log-view {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--mono);
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.6;
}
.log-view::-webkit-scrollbar { width: 3px; }
.log-view::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ══════════════════════════════════════════
   NOTIFICATIONS
   ══════════════════════════════════════════ */
.notif-container {
  position: fixed;
  top: 60px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-height: calc(100vh - 80px);
  overflow: hidden;
}

.notif-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 300px;
  max-width: 380px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
  backdrop-filter: blur(8px);
  animation: notifIn .3s cubic-bezier(.4,0,.2,1);
  cursor: pointer;
  transition: opacity .3s, transform .3s;
}
.notif-toast.removing {
  animation: notifOut .25s ease-in forwards;
}

.notif-toast-icon { font-size: 20px; flex-shrink: 0; line-height: 1; }
.notif-toast-body { flex: 1; min-width: 0; }
.notif-toast-title {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-toast-msg {
  font-size: 11px;
  color: var(--text-sec);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif-toast-time {
  font-size: 9px;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-top: 2px;
}

.notif-toast.notif-info    { border-left: 3px solid var(--accent); }
.notif-toast.notif-info    .notif-toast-title { color: var(--accent); }
.notif-toast.notif-warning { border-left: 3px solid var(--warning); }
.notif-toast.notif-warning .notif-toast-title { color: var(--warning); }
.notif-toast.notif-danger  { border-left: 3px solid var(--danger); }
.notif-toast.notif-danger  .notif-toast-title { color: var(--danger); }
.notif-toast.notif-success { border-left: 3px solid var(--success); }
.notif-toast.notif-success .notif-toast-title { color: var(--success); }
.notif-toast.notif-critical {
  border-left: 3px solid #dc2626;
  background: linear-gradient(135deg, #1a0808, #2a0f0f);
  animation: notifIn .3s ease-out, critPulse 2s ease-in-out infinite;
}
.notif-toast.notif-critical .notif-toast-title { color: #f87171; }

@keyframes notifIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes notifOut {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(100%); opacity: 0; }
}
@keyframes critPulse {
  0%, 100% { box-shadow: 0 12px 40px rgba(0,0,0,.5); }
  50% { box-shadow: 0 12px 40px rgba(220,38,38,.25); }
}

/* ══════════════════════════════════════════
   RESIZE BAR
   ══════════════════════════════════════════ */
.resize-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 4px;
}
.resize-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
}
.resize-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.resize-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
  box-shadow: 0 0 6px var(--accent-glow);
  cursor: grab;
}
.resize-slider::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(1.15); }

/* ══════════════════════════════════════════
   QUICK APPS
   ══════════════════════════════════════════ */
.quick-apps {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.quick-apps-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.quick-app-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-sec);
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--transition);
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.quick-app-btn:hover {
  background: var(--surface-3);
  border-color: var(--accent);
  color: var(--text);
}
.quick-app-btn .qa-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════
   VIRTUAL KEYBOARD
   ══════════════════════════════════════════ */
.toolbar-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.vkb {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  animation: fadeSlide .15s ease;
}
.vkb-row {
  display: flex;
  justify-content: center;
  gap: 3px;
}
.vkb-key {
  min-width: 22px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all .1s;
  user-select: none;
  -webkit-user-select: none;
}
.vkb-key:active {
  background: var(--accent);
  color: #fff;
  transform: scale(.93);
}
.vkb-key.vkb-wide { min-width: 44px; font-size: 10px; }
.vkb-key.vkb-space { flex: 1; max-width: 160px; }

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */
@media (max-width: 1100px) {
  .global-panel { display: none; }
}

@media (max-width: 860px) {
  .sidebar { display: none; }
}

@media (max-width: 600px) {
  .header {
    padding: 0 12px;
    gap: 8px;
  }
  .brand-text { display: none; }
  .device-view-body {
    flex-direction: column;
    align-items: center;
  }
  .intel { min-width: 0; width: 100%; }
}
