/* ==========================================================================
   VETUM 2.0 - Tactical OpSec Design System (OLED Dark Theme)
   ========================================================================== */

:root {
  --bg-core: #06080d;
  --bg-surface: #0c1017;
  --bg-surface-elevated: #131822;
  --bg-surface-hover: #19202e;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(56, 189, 248, 0.4);
  --border-danger: rgba(244, 63, 94, 0.5);
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-faint: #475569;
  
  --accent-cyan: #38bdf8;
  --accent-blue: #2563eb;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --accent-amber: #f59e0b;
  --accent-purple: #a855f7;

  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-full: 4px;
  
  --shadow-glow: 0 0 25px rgba(56, 189, 248, 0.15);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body, html {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-core);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-font-smoothing: antialiased;
}

/* Base App Layout */
#app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 68px 16px 120px 16px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  transition: opacity 0.15s ease;
}

body.locked #app-container,
body.locked #spyder-main-header {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Global Top Header (Fixed Top - Everywhere & Always Accessible Across All Modals) */
header.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  z-index: 50000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  background: rgba(8, 11, 18, 0.94);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.7);
  gap: 12px;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-shrink: 0;
}

.brand-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #fff;
  white-space: nowrap;
}

.header-slot-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--accent-cyan);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.header-slot-pill:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--accent-cyan);
}

.badge-count {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Quick OFF Killswitch Button (Header next to SPYDER) */
.quick-off-btn {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fb7185;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  margin-left: 2px;
  flex-shrink: 0;
}

.quick-off-btn:hover {
  background: var(--accent-rose);
  border-color: var(--accent-rose);
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 0 14px rgba(244, 63, 94, 0.6);
}

.quick-off-btn:active {
  transform: scale(0.92);
}

/* Burger Button */
.burger-btn {
  width: 42px;
  height: 42px;
  background: var(--bg-surface-elevated);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.burger-btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.burger-bar {
  width: 20px;
  height: 2px;
  background-color: var(--accent-cyan);
  border-radius: 2px;
}

/* Burger Menu Drawer Overlay */
.burger-drawer-backdrop {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  z-index: 20000;
  display: flex;
  justify-content: flex-end;
}

.burger-drawer-card {
  background: #080d1a;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  width: 320px;
  max-width: 85vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.9);
  overflow-y: auto;
}

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

.drawer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  color: #fff;
  transition: all 0.15s ease;
}

.drawer-nav-item:hover {
  background: var(--bg-surface-hover);
  border-color: var(--accent-cyan);
}

.drawer-nav-item .nav-icon {
  font-size: 20px;
}

.drawer-nav-item .nav-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.drawer-nav-item .nav-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.vault-mode-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.vault-mode-pill.master {
  background: rgba(244, 63, 94, 0.12);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.vault-mode-pill.decoy {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  animation: pulse-kf 2s infinite;
}

@keyframes pulse-kf {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Action Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-primary {
  background: var(--accent-cyan);
  color: #06080d;
}
.btn-primary:hover {
  background: #7dd3fc;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  color: var(--text-main);
  border-color: var(--border-subtle);
}
.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: rgba(255, 255, 255, 0.18);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border-color: rgba(244, 63, 94, 0.3);
}
.btn-danger:hover {
  background: var(--accent-rose);
  color: #fff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* Compact Micro-Status Bar */
.status-micro-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 6px 12px;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.status-micro-bar::-webkit-scrollbar {
  display: none;
}

.micro-stat-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.03);
}

.micro-stat-item.clickable {
  cursor: pointer;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #38bdf8;
  transition: all 0.15s ease;
}

.micro-stat-item.clickable:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: var(--accent-cyan);
}

.micro-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.micro-dot.green {
  background: #34d399;
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.6);
}

/* Main Content Grid */
.main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* Settings Accordion Container (100% Vertical, Zero Horizontal Scroll) */
.settings-accordion-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 100%;
}

.settings-acc-item {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.settings-acc-item[open] {
  border-color: rgba(56, 189, 248, 0.4);
  background: #080c16;
}

.settings-acc-header {
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  font-size: 13px;
  list-style: none;
}

.settings-acc-header::-webkit-details-marker {
  display: none;
}

.acc-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.settings-acc-body {
  padding: 12px 14px 16px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-inner-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.settings-inner-card p {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

/* Device Sub-Accordion & Mobile Device Cards */
.device-sub-acc {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.device-sub-acc[open] {
  border-color: rgba(56, 189, 248, 0.45);
}

.device-sub-acc-header {
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  list-style: none;
}

.device-sub-acc-header::-webkit-details-marker {
  display: none;
}

.device-sub-acc-body {
  padding: 10px 12px 14px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.device-slots-vertical-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.device-item-card {
  background: #060913;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.device-item-card.current {
  border-left: 3px solid #34d399;
  background: rgba(52, 211, 153, 0.03);
}

.device-card-row-top {
  display: flex;
  align-items: flex-start;
  width: 100%;
}

.device-title-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
}

.device-icon {
  font-size: 20px;
  line-height: 1;
  margin-top: 2px;
  flex-shrink: 0;
}

.device-text-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.device-name {
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  line-height: 1.3;
  word-break: break-word;
}

.device-status-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.device-status-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  width: fit-content;
}

.device-status-badge.current {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.device-status-badge.active {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.device-card-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: #94a3b8;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.meta-tag {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
}

.dev-action-btn {
  width: 100%;
  margin-top: 2px;
  font-size: 11px;
  padding: 7px 10px;
  justify-content: center;
}

.free-slots-summary-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: #64748b;
  font-size: 12px;
  width: 100%;
  box-sizing: border-box;
}

/* Case List Section */
.section-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
}

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

.panel-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Case Cards */
.case-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.case-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.case-card:hover {
  background: var(--bg-surface-hover);
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateY(-1px);
}

.case-card.sensitive {
  border-left: 4px solid var(--accent-rose);
}

.case-card.standard {
  border-left: 4px solid var(--accent-emerald);
}

.tier-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.tier-badge.sensitive {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fb7185;
}

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

.case-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.case-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  word-break: break-word;
}

.accordion-arrow {
  font-size: 11px;
  color: var(--accent-cyan);
  display: inline-block;
  transition: transform 0.2s ease;
}

.case-summary-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 6px;
  cursor: pointer;
}

.case-details-drawer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.case-desc-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: #cbd5e1;
  word-break: break-word;
}

.case-ids-box {
  font-size: 12px;
  color: var(--text-muted);
}

.case-id-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.id-tag {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #38bdf8;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-family: var(--font-mono);
  word-break: break-all;
}

.case-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  justify-content: flex-end;
}

/* Sidebar Tool Panels */
.sidebar-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tool-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.tool-box h4 {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-box p {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.4;
}

/* Panic Lock Overlay */
#panic-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  z-index: 999999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
}

#panic-overlay.active {
  display: flex;
}

/* Modal Dialogues (Opens under the permanent global header) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 68px 16px 120px 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  padding: 24px 24px 48px 24px;
  box-shadow: var(--shadow-card);
  margin: 20px auto 60px auto;
  flex-shrink: 0;
}

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

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

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

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease;
  user-select: text;
}

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

.seed-box {
  background: #020408;
  border: 1px dashed var(--accent-cyan);
  border-radius: var(--radius-md);
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #7dd3fc;
  line-height: 1.8;
  word-break: break-all;
  user-select: text;
  margin: 10px 0;
}

.alert-banner {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  margin-bottom: 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.alert-banner.warning {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.alert-banner.info {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   MOBILE & SAMSUNG Z FOLD 5 (Narrow screen <= 480px) ADAPTATIONS
   ========================================================================== */
@media (max-width: 600px) {
  #app-container {
    padding: 58px 10px 80px 10px;
  }

  header.app-header {
    height: 52px;
    padding: 0 10px;
    gap: 6px;
  }

  .brand-badge {
    gap: 6px;
    flex-shrink: 0;
  }

  .brand-badge img {
    width: 24px !important;
    height: 24px !important;
  }

  .brand-title {
    font-size: 14px;
    letter-spacing: 1px;
  }

  #vault-mode-indicator {
    display: none !important; /* Hide on mobile so it never collides with SPYDER logo or workspace */
  }

  .workspace-selector-box {
    margin-right: 6px;
    flex-shrink: 1;
    min-width: 0;
  }

  .ws-switcher-btn {
    height: 38px;
    padding: 0 8px;
    font-size: 11px;
    max-width: 140px;
    gap: 4px;
    border-radius: var(--radius-sm);
  }

  .ws-dropdown-menu {
    width: 260px;
    right: 0;
  }

  .burger-btn {
    width: 38px;
    height: 38px;
    gap: 4px;
    border-radius: var(--radius-sm);
  }

  .burger-bar {
    width: 18px;
  }

  .modal-backdrop {
    padding: 58px 10px 80px 10px;
  }

  .status-micro-bar {
    padding: 4px 8px;
    gap: 6px;
    margin-bottom: 12px;
  }

  .micro-stat-item {
    font-size: 11px;
    padding: 2px 7px;
  }

  .panel-header {
    flex-wrap: wrap;
    gap: 10px;
  }

  .modal-card {
    padding: 14px 10px 28px 10px;
    margin: 8px auto 30px auto;
    width: 98% !important;
  }

  .settings-acc-header, .device-sub-acc-header {
    padding: 10px 10px;
  }

  .settings-acc-body, .device-sub-acc-body {
    padding: 8px 6px 12px 6px;
  }

  .settings-inner-card {
    padding: 10px 8px;
  }

  .device-item-card {
    padding: 8px 10px;
    gap: 6px;
  }

  .quick-off-btn {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 380px) {
  /* Ultra-narrow / Samsung Z Fold narrow cover screen */
  .brand-title {
    font-size: 13px;
    letter-spacing: 0.5px;
  }

  .ws-switcher-btn {
    max-width: 105px;
    padding: 0 6px;
    font-size: 10px;
  }

  .workspace-selector-box {
    margin-right: 4px;
  }
}

/* ==========================================================================
   MULTI-TENANT WORKSPACE & TEAM SELECTOR STYLES
   ========================================================================== */

.workspace-selector-box {
  position: relative;
  display: flex;
  align-items: center;
  margin-right: 14px;
}

.ws-switcher-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  background: var(--bg-surface-elevated);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #fff;
  padding: 0 14px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  max-width: 240px;
  letter-spacing: 0.3px;
  box-sizing: border-box;
}

.ws-switcher-btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.ws-arrow {
  font-size: 9px;
  opacity: 0.8;
  margin-left: 2px;
}

.ws-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  width: 280px;
  background: #080c14;
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9);
  padding: 6px;
  z-index: 50005;
}

.ws-dropdown-header {
  font-size: 10px;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.8px;
  padding: 6px 10px;
  text-transform: uppercase;
}

.ws-options-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ws-option-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 3px;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  width: 100%;
  text-align: left;
  color: #cbd5e1;
  font-size: 12px;
  transition: all 0.15s ease;
}

.ws-option-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.ws-option-item.active {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  font-weight: 700;
}

.ws-dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 6px 0;
}

.ws-action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.ws-action-btn:hover {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.25);
  color: #38bdf8;
}

/* Team Management Cards */
.teams-vertical-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.team-card-box {
  background: #060910;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 12px 14px;
}

.team-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.team-card-title {
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.team-member-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 11px;
  margin: 2px 4px 2px 0;
}

