/* =========================================================================
   FLEET COMMANDO — PIXEL-PERFECT HIGH-CONTRAST DARK THEME
   (PERFECTLY HARMONIZED GEOMETRY ACROSS ALL 5 SCREENS)
========================================================================= */

:root {
  --bg-app: #0d111a;
  --bg-header: #0d111a;
  --bg-card: #141721;
  --bg-bubble: #1c202e;
  --bg-input: #171b26;
  --bg-chip: #1e2230;

  --border-color: rgba(16, 185, 129, 0.3);
  --border-light: rgba(16, 185, 129, 0.18);

  --text-main: #ffffff;
  --text-muted: #cbd5e1;
  --text-dim: #64748b;
  --text-blue: #10b981;

  /* 4 Colorful Action Button Palette */
  --btn-call-forward: #4338ca;
  --btn-call-forward-txt: #ffffff;
  --btn-send-sms: #059669;
  --btn-send-sms-txt: #ffffff;
  --btn-user-details: #92400e;
  --btn-user-details-txt: #ffffff;
  --btn-sms-forward: #be185d;
  --btn-sms-forward-txt: #ffffff;
  --btn-delete-device: #991b1b;
  --btn-delete-device-txt: #ffffff;

  /* Status Colors */
  --status-online-bg: #064e3b;
  --status-online-txt: #34d399;
  --status-offline-bg: #1e293b;
  --status-offline-txt: #94a3b8;
  --status-pinging-bg: #1e3a8a;
  --status-pinging-txt: #60a5fa;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  background-color: var(--bg-app);
  color-scheme: dark;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  background-color: var(--bg-app);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.45;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

/* =========================================================================
   1. Lock Screen (Login View)
========================================================================= */
/* =========================================================================
   1. Lock Screen (Login View - Tactical Command HUD)
========================================================================= */
.lock-screen-overlay {
  position: fixed;
  inset: 0;
  background-color: #06090e;
  background-image:
    radial-gradient(circle at 50% 40%, rgba(16, 185, 129, 0.08) 0%, rgba(6, 9, 14, 0.85) 60%, #06090e 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%3Cg stroke='%2310b981' stroke-width='1.2' fill='none' stroke-linecap='round' stroke-linejoin='round' opacity='0.22'%3E%3Cpath d='M0 55h50l35 35h55l30-30h50'/%3E%3Cpath d='M85 90v50l30 30h55'/%3E%3Cpath d='M110 0v40l30 30v65l-25 25v60'/%3E%3Cpath d='M35 220v-45l35-35H0'/%3E%3Cpath d='M185 220v-35l-35-35v-45'/%3E%3Cpath d='M220 135h-40l-30 30H95'/%3E%3Cpath d='M50 0v25l-25 25H0'/%3E%3C/g%3E%3Cg fill='%2310b981' opacity='0.4'%3E%3Ccircle cx='50' cy='55' r='2.5'/%3E%3Ccircle cx='140' cy='90' r='2.5'/%3E%3Ccircle cx='170' cy='60' r='2.5'/%3E%3Ccircle cx='85' cy='140' r='2.5'/%3E%3Ccircle cx='115' cy='170' r='2.5'/%3E%3Ccircle cx='70' cy='140' r='2.5'/%3E%3Ccircle cx='150' cy='150' r='2.5'/%3E%3Ccircle cx='180' cy='135' r='2.5'/%3E%3Ccircle cx='140' cy='70' r='2.5'/%3E%3Ccircle cx='25' cy='50' r='2.5'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 100% 100%, 220px 220px;
  background-position: center, center;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 16px;
  overflow: hidden;
}

.tactical-login-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: tacticalFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes tacticalFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.tactical-security-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.sec-badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #34d399;
  font-size: 10px;
  font-weight: 800;
  font-family: var(--font-mono);
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all 0.2s ease;
}

.sec-badge-chip:hover {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.45);
}

.tactical-login-card {
  position: relative;
  width: 100%;
  background: rgba(13, 19, 31, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 12px;
  padding: 32px 24px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 0 45px rgba(16, 185, 129, 0.06), 0 25px 60px rgba(0, 0, 0, 0.9);
}

/* Tactical Corner Brackets */
.corner-bracket {
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
  border: 2px solid #10b981;
  opacity: 0.85;
  filter: drop-shadow(0 0 4px rgba(16, 185, 129, 0.65));
}

.corner-tl {
  top: 7px;
  left: 7px;
  border-right: none;
  border-bottom: none;
  border-top-left-radius: 4px;
}

.corner-tr {
  top: 7px;
  right: 7px;
  border-left: none;
  border-bottom: none;
  border-top-right-radius: 4px;
}

.corner-bl {
  bottom: 7px;
  left: 7px;
  border-right: none;
  border-top: none;
  border-bottom-left-radius: 4px;
}

.corner-br {
  bottom: 7px;
  right: 7px;
  border-left: none;
  border-top: none;
  border-bottom-right-radius: 4px;
}

.tactical-title {
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, #ffffff 40%, #a7f3d0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 8px;
  line-height: 1.1;
}

.tactical-badge-wrap {
  display: flex;
  justify-content: center;
}

.tactical-badge-red,
.tactical-badge-green {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 6px;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
}

.tactical-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.25), transparent);
  margin: 18px 0;
}

.tactical-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tactical-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.tactical-label {
  font-size: 11px;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tactical-input-box {
  display: flex;
  align-items: center;
  background: rgba(8, 12, 20, 0.95);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 8px;
  padding: 0 12px;
  height: 46px;
  transition: all 0.2s ease;
}

.tactical-input-box:focus-within {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18), inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.tactical-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 13.5px;
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 10px 6px;
}

.tactical-input::placeholder {
  color: #475569;
  font-family: var(--font-mono);
}

.tactical-icon-left,
.tactical-icon-right {
  color: #10b981;
  opacity: 0.8;
  flex-shrink: 0;
}

.tactical-eye-btn {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.15s ease;
}

.tactical-eye-btn:hover {
  color: #10b981;
}

.tactical-submit-btn {
  position: relative;
  overflow: hidden;
  width: 100%;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #ffffff;
  font-weight: 900;
  font-size: 13.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 13px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.tactical-submit-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: rotate(25deg);
  animation: btnShimmerSweep 4.5s infinite cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

@keyframes btnShimmerSweep {
  0% {
    left: -60%;
  }
  25%, 100% {
    left: 140%;
  }
}

.tactical-submit-btn:hover {
  background: linear-gradient(135deg, #047857 0%, #059669 100%);
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.42);
  transform: translateY(-1px);
}

.tactical-submit-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.tactical-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tactical-bottom-status {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #64748b;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.status-pulse-green {
  position: relative;
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 6px #10b981;
}

.status-pulse-green::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid #10b981;
  animation: sonarRadarPing 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes sonarRadarPing {
  0% {
    transform: scale(0.8);
    opacity: 0.9;
  }
  70% {
    transform: scale(2.2);
    opacity: 0;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.commando-error {
  margin-top: 10px;
  width: 100%;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 6px;
}

/* =========================================================================
   2. Main Mobile Frame Layout (Exact 14px Margins)
========================================================================= */
.mobile-app-container {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg-app);
  display: flex;
  flex-direction: column;
  position: relative;
  margin: 0 auto;
}

/* Top App Header */
.app-header {
  background: var(--bg-header);
  padding: 14px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.brand-name {
  font-size: 14.5px;
  font-weight: 900;
  color: #ffffff;
  white-space: nowrap;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.brand-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #34d399;
  white-space: nowrap;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Header Buttons (Screenshot 2, 3, 4) */
.header-action-btn,
.btn-wake-all,
.btn-logout {
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1;
  border: none;
}

.wake-action-btn,
.btn-wake-all {
  background: #064e3b;
  color: #ffffff;
  border: 1px solid #10b981;
}

.wake-action-btn svg,
.btn-wake-all svg {
  color: #34d399;
}

.lock-action-btn,
.btn-logout {
  background: #7f1d1d;
  color: #ffffff;
  border: 1px solid #991b1b;
}

.lock-action-btn svg,
.btn-logout svg {
  color: #f87171;
}

/* Search & Action Row (Side-by-Side Separate Boxes) */
.search-and-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.search-and-actions-row.hidden,
#main-search-row.hidden {
  display: none !important;
}

.search-and-actions-row .search-bar-wrap {
  flex: 1;
  min-width: 0;
  height: 42px;
  box-sizing: border-box;
  padding: 0 14px;
  border-radius: 14px;
  display: flex;
  align-items: center;
}

.header-separate-clear-btn {
  display: none;
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  box-sizing: border-box;
  padding: 0 16px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 800;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
  white-space: nowrap;
  background: #2a1515;
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.45);
  cursor: pointer;
  line-height: 1;
  font-family: inherit;
  transition: none !important;
}

/* Master Broadcast Alert Strip (Continuous Compact Marquee Ticker) */
.master-broadcast-strip {
  background: #111724;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 10px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.broadcast-icon {
  font-size: 12px;
  flex-shrink: 0;
  line-height: 1;
}

.broadcast-marquee-container {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  display: flex;
  align-items: center;
}

.broadcast-text {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #fbbf24;
  line-height: 1.2;
  white-space: nowrap;
  animation: marqueeScroll 16s linear infinite;
  padding-left: 100%;
}

.broadcast-marquee-container:hover .broadcast-text {
  animation-play-state: paused;
}

@keyframes marqueeScroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-100%);
  }
}

.broadcast-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  flex-shrink: 0;
}

/* Search Bar (Screenshot 2, 4) */
.search-bar-wrap,
.search-container {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #171b26;
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 14px;
  height: 42px;
  box-sizing: border-box;
  padding: 0 14px;
  width: 100%;
}

.search-bar-wrap:focus-within,
.search-container:focus-within {
  border-color: rgba(16, 185, 129, 0.4);
}

.search-bar-wrap svg,
.search-container svg {
  color: #10b981;
  flex-shrink: 0;
}

.search-bar-wrap input,
.search-container input,
.search-input {
  background: transparent !important;
  border: none !important;
  font-size: 13px;
  outline: none !important;
  width: 100%;
  color: #ffffff;
  font-family: inherit;
  font-weight: 600;
  padding: 0;
  margin: 0;
  box-shadow: none !important;
}

.search-bar-wrap input::placeholder,
.search-container input::placeholder,
.search-input::placeholder {
  color: #64748b;
}

/* Main Body & Tab Views (Unified 14px Horizontal Gutter, maximized height) */
.app-content,
.app-body {
  flex: 1;
  padding: 12px 14px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tab-view {
  display: none;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.tab-view.active {
  display: flex;
}

.cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.control-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

/* Section Header Meta Rows (Top Counter & Action) */
.sms-header-actions-row,
.section-meta-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 2px;
  margin-top: 2px;
  margin-bottom: 2px;
  width: 100%;
}

.sms-total-pill,
.count-badge-pill {
  display: none !important;
}

.sms-clear-all-btn {
  background: #3f1d1d;
  color: #ef4444;
  border: 1px solid #7f1d1d;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  line-height: 1;
}

/* =========================================================================
   3. UNIFIED MASTER CARD RULE (Exact Identical Curvature & Border Across All Tabs)
========================================================================= */
.device-card-v2,
.hub-sms-card,
.hub-sub-card,
.control-card {
  background: #131722 !important;
  border: 2px solid rgba(16, 185, 129, 0.45) !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25) !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

.device-card-v2 {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
}

.card-v2-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-v2-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.card-v2-index-badge {
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
  background: transparent;
  border: none;
  padding: 0;
  font-family: var(--font-mono);
}

.card-v2-model-name {
  font-size: 14.5px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-v2-top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.status-badge-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.status-badge-pill.status-online,
.status-badge-pill.status-responded {
  background: var(--status-online-bg);
  color: var(--status-online-txt);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge-pill.status-offline {
  background: var(--status-offline-bg);
  color: var(--status-offline-txt);
  border: 1px solid var(--border-color);
}

.status-badge-pill.status-pinging {
  background: #064e3b;
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.btn-device-ping {
  background: rgba(14, 165, 233, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-device-star {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 3px 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  line-height: 1;
}

.btn-device-star svg {
  transition: all 0.15s ease;
}

.btn-device-star:hover svg {
  stroke: #f59e0b;
}

.btn-device-star.starred svg {
  fill: #f59e0b !important;
  stroke: #f59e0b !important;
}

.device-starred-card {
  border-color: rgba(245, 158, 11, 0.35) !important;
}

/* Dual SIM Grid in Device Card */
.card-v2-sims-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}

.sim-box-chip {
  background: #141925;
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  justify-content: center;
}

.sim-box-carrier {
  font-size: 11px;
  font-weight: 700;
  color: #34d399;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sim-box-number {
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Card Bottom Footer */
.card-v2-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
}

.card-v2-time {
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
}

.card-v2-id-pill {
  font-size: 11px;
  font-weight: 800;
  color: #94a3b8;
  font-family: var(--font-mono);
  background: var(--bg-chip);
  border: 1px solid var(--border-color);
  padding: 2px 8px;
  border-radius: 6px;
}

/* =========================================================================
   4. Tab 2: Live SMS Cards (Screenshot 2 Match)
========================================================================= */
.hub-sms-card {
  background: var(--bg-card);
  border: 2px solid rgba(16, 185, 129, 0.45);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
}

.hub-sms-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hub-sms-date {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
  font-family: inherit;
}

.hub-sms-top-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hub-sms-model-pill {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.hub-sms-copy-btn {
  background: transparent;
  border: none;
  padding: 2px;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.hub-sms-copy-btn:hover {
  color: #38bdf8;
}

.hub-sms-body {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.5;
  word-break: break-word;
  padding: 0;
  margin: 2px 0 4px;
  background: transparent;
  border: none;
  font-weight: 500;
}

.hub-sms-body-sensitive {
  color: #10b981 !important;
}

.hub-sms-bottom {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.hub-sms-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #64748b;
}

.hub-sms-meta-label {
  font-weight: 800;
  color: #64748b;
  font-size: 10px;
  letter-spacing: 0.02em;
}

.hub-sms-meta-val {
  font-weight: 700;
  color: #cbd5e1;
  font-family: 'JetBrains Mono', Consolas, monospace;
}

.hub-sms-meta-copy {
  background: transparent;
  border: none;
  padding: 0;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.hub-sms-meta-copy:hover {
  color: #38bdf8;
}

.btn-load-more-sms {
  width: 100%;
  padding: 12px 14px;
  font-size: 12.5px;
  font-weight: 800;
  background: var(--bg-card);
  color: #34d399;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
  margin-bottom: 8px;
}

/* =========================================================================
   5. Tab 3: Form Submissions (Screenshot 3)
========================================================================= */
.hub-sub-card {
  background: var(--bg-card);
  border: 2px solid rgba(16, 185, 129, 0.45);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
}

.hub-sub-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 2px;
}

.hub-sub-dev-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  cursor: pointer;
}

.hub-sub-dev-name {
  font-size: 12.5px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.hub-sub-dev-badge {
  font-size: 10.5px;
  font-weight: 800;
  color: #94a3b8;
  font-family: var(--font-mono);
  background: var(--bg-chip);
  border: 1px solid var(--border-color);
  padding: 2px 8px;
  border-radius: 6px;
  flex-shrink: 0;
}

.hub-sub-time {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
  flex-shrink: 0;
}

.hub-sub-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 10px;
  padding: 2px 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.sub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0;
  padding: 6px 2px;
  font-size: 11.5px;
}

.sub-row:last-child {
  border-bottom: none;
}

.sub-k {
  color: #94a3b8;
  font-weight: 600;
  font-size: 11px;
}

.sub-v {
  color: #ffffff;
  font-weight: 700;
  font-size: 11.5px;
  font-family: var(--font-sans);
  text-align: right;
  word-break: break-all;
}

.sub-v.highlight {
  color: #34d399;
  font-family: var(--font-mono);
  font-weight: 800;
}

.hub-sub-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
}

.hub-sub-capture-tag {
  font-size: 11.5px;
  color: #64748b;
  font-weight: 600;
}

.hub-sub-delete-btn {
  background: #3f1d1d;
  color: #ef4444;
  border: 1px solid #7f1d1d;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}

/* =========================================================================
   6. Tab 4: Control & Settings Tab (Screenshot 5)
========================================================================= */
.control-card {
  background: var(--bg-card);
  border: 2px solid rgba(16, 185, 129, 0.45);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
}

.control-card-clickable {
  cursor: pointer;
}

.btn-card-action-arrow {
  background: transparent;
  color: #34d399;
  border: none;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.control-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.control-card-title-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
}

.control-card-icon,
.control-icon-circle {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #064e3b;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #34d399;
  flex-shrink: 0;
}

.control-card-icon.icon-blue,
.control-icon-circle.blue {
  background: #064e3b;
  color: #34d399;
}

.control-card-icon.icon-purple,
.control-icon-circle.purple {
  background: #2e1065;
  color: #c084fc;
}

.control-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.control-card-title {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.control-card-subtitle,
.control-card-sub {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
}

/* Panel Validity Gold Badge */
.validity-time-pill {
  font-size: 11.5px;
  font-weight: 800;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 5px 12px;
  border-radius: 8px;
  font-family: var(--font-mono);
  white-space: nowrap;
}

/* Status Indicator / Summary Pill (Screenshot 5) */
.control-summary-pill,
.status-indicator-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-bubble);
  border: 1px dashed var(--border-color);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 11.5px;
  font-weight: 800;
  color: #ffffff;
  width: 100%;
}

.status-indicator-label {
  font-size: 11.5px;
  font-weight: 800;
  color: #ffffff;
}

.status-indicator-val {
  font-size: 11.5px;
  font-weight: 800;
  color: #ef4444;
}

.status-indicator-val.active {
  color: #10b981;
}

/* iOS Style Switch Toggle (Screenshot 5) */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-round {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #334155;
  border-radius: 24px;
  transition: 0.2s;
}

.slider-round:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: 0.2s;
}

.switch-toggle input:checked+.slider-round {
  background-color: #10b981;
}

.switch-toggle input:checked+.slider-round:before {
  transform: translateX(20px);
}

/* Form Groups & Inputs inside Control Cards */
.forwarder-label {
  font-size: 10.5px;
  font-weight: 800;
  color: #8e95a5;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.forwarder-input,
.control-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12px;
  color: #ffffff;
  outline: none;
  font-family: inherit;
  font-weight: 600;
}

.forwarder-input::placeholder,
.control-input::placeholder {
  color: #64748b;
}

.forwarder-textarea {
  width: 100%;
  min-height: 80px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12px;
  color: #ffffff;
  outline: none;
  font-family: inherit;
  font-weight: 500;
  resize: vertical;
}

.forwarder-textarea::placeholder {
  color: #64748b;
}

.action-btn.btn-primary,
.control-btn-primary {
  width: 100%;
  background: #059669;
  border: 1px solid #10b981;
  color: #ffffff;
  font-weight: 800;
  font-size: 12px;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  transition: none !important;
}

.action-btn.btn-primary:hover,
.action-btn.btn-primary:active,
.action-btn.btn-primary:focus,
.control-btn-primary:hover,
.control-btn-primary:active,
.control-btn-primary:focus {
  background: #059669 !important;
  color: #ffffff !important;
  border: 1px solid #10b981 !important;
  transform: none !important;
  box-shadow: none !important;
  outline: none !important;
}

.action-btn.btn-success {
  background: #0d9488;
  color: #ffffff;
  border: none;
  font-weight: 800;
  font-size: 13.5px;
  padding: 13px;
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
}

.action-btn.btn-danger {
  background: #991b1b;
  color: #ffffff;
  border: none;
  font-weight: 800;
  font-size: 13.5px;
  padding: 13px;
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
}

/* Session Limit Box (Screenshot 5) */
.session-limit-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-bubble);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 12px 14px;
  gap: 12px;
  width: 100%;
}

.session-limit-label-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.session-limit-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #ffffff;
}

.session-limit-sub {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
}

.session-limit-action-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.session-limit-input {
  width: 60px;
  height: 38px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 4px 8px;
  font-size: 13.5px;
  font-weight: 800;
  color: #ffffff;
  text-align: center;
  outline: none;
  font-family: inherit;
}

.session-limit-btn {
  height: 38px;
  background: #3b82f6;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 0 16px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}

/* Active Session Card */
.session-device-card {
  background: var(--bg-bubble);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.session-device-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.session-device-icon {
  color: #60a5fa;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.session-device-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.session-device-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.session-device-name {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
}

.session-this-device-badge,
.session-device-this-badge {
  font-size: 10px;
  font-weight: 800;
  color: #34d399;
  background: #064e3b;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 7px;
  border-radius: 6px;
}

.session-device-meta {
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.session-live-ticker.active-now {
  color: #34d399;
  font-weight: 700;
}

.session-current-pill {
  font-size: 11px;
  font-weight: 800;
  color: #94a3b8;
  background: var(--bg-chip);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 8px;
  display: inline-block;
}

.btn-kick-session {
  background: #3f1d1d;
  color: #ef4444;
  border: 1px solid #7f1d1d;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}

.btn-logout-others {
  width: 100%;
  background: #1e293b;
  color: #ef4444;
  border: 1px solid #334155;
  font-weight: 800;
  font-size: 12.5px;
  padding: 12px;
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
}

/* =========================================================================
   7. Device Detail Sheet (Screenshot 4)
========================================================================= */
.device-full-page-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-app);
  display: none;
  flex-direction: column;
  z-index: 150;
  overflow-y: auto;
  max-width: 480px;
  margin: 0 auto;
}

.device-full-page-overlay.active {
  display: flex;
}

.device-full-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 10;
}

.device-back-btn {
  background: #1e293b;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 5px;
}

#device-page-header-model {
  font-size: 14.5px;
  font-weight: 800;
  color: #ffffff !important;
}

.device-full-page-body {
  padding: 14px 14px 85px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Top Device Hub Card */
.device-hub-top-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.device-hub-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.device-hub-id-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.device-hub-id-txt {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  font-family: var(--font-mono);
}

.device-hub-top-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-circle-gray {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #1e293b;
  border: 1px solid var(--border-color);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* 4 Colorful Action Buttons (Screenshot 4) */
.device-hub-btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}

.btn-hub-call {
  background: var(--btn-call-forward);
  color: var(--btn-call-forward-txt);
  border: 1px solid rgba(16, 185, 129, 0.35);
  font-weight: 700;
  font-size: 12px;
  padding: 10px 8px;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
}

.btn-hub-sms {
  background: var(--btn-send-sms);
  color: var(--btn-send-sms-txt);
  border: 1px solid #10b981;
  font-weight: 700;
  font-size: 12px;
  padding: 10px 8px;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
}

.btn-hub-user {
  background: var(--btn-user-details);
  color: var(--btn-user-details-txt);
  border: 1px solid rgba(16, 185, 129, 0.35);
  font-weight: 700;
  font-size: 12px;
  padding: 10px 8px;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
}

.btn-hub-forwarder {
  background: var(--btn-sms-forward);
  color: var(--btn-sms-forward-txt);
  border: 1px solid rgba(16, 185, 129, 0.35);
  font-weight: 700;
  font-size: 12px;
  padding: 10px 8px;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
}

.btn-hub-sync {
  grid-column: 1 / -1;
  background: #0d9488;
  color: #ffffff;
  border: 1px solid rgba(16, 185, 129, 0.35);
  font-weight: 700;
  font-size: 12px;
  padding: 10px 8px;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

.device-sms-count-badge {
  background: #181d2a;
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #38bdf8;
  font-size: 11px;
  font-weight: 800;
  padding: 0 10px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.quick-sync-btn {
  background: #0284c7;
  color: #ffffff;
  border: 1px solid rgba(56, 189, 248, 0.35);
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: none;
  box-shadow: none;
}

.quick-sync-btn:active {
  background: #0369a1;
}

.quick-sync-btn.syncing svg,
.btn-hub-sync.syncing svg {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Sync Option Cards in Modal */
.sync-option-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sync-option-card:hover {
  background: var(--bg-bubble);
}

.sync-option-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.sync-option-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.sync-option-icon.icon-fast {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.sync-option-icon.icon-deep {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.sync-option-title {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
}

.sync-option-sub {
  font-size: 11.5px;
  color: var(--text-dim);
  font-weight: 600;
  line-height: 1.35;
}

.sync-option-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.sync-pill {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
}

.sync-pill.pill-green {
  background: #064e3b;
  color: #34d399;
}

.sync-pill.pill-blue {
  background: #1e3a8a;
  color: #60a5fa;
}

.sync-pill.pill-purple {
  background: #4c1d95;
  color: #c084fc;
}

.sync-pill.pill-gray {
  background: #1e293b;
  color: #94a3b8;
}

/* Sync Limit Selector Inside Deep Scan Card */
.sync-limit-selector {
  display: flex;
  gap: 7px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.sync-limit-btn {
  flex: 1;
  min-width: 65px;
  background: rgba(168, 85, 247, 0.16);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #d8b4fe;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
}

.sync-limit-btn:hover {
  background: #7e22ce;
  border-color: #a855f7;
  color: #ffffff;
}

.sync-limit-btn.btn-unlimited {
  background: rgba(234, 179, 8, 0.16);
  border-color: rgba(234, 179, 8, 0.4);
  color: #fde047;
}

.sync-limit-btn.btn-unlimited:hover {
  background: #ca8a04;
  color: #ffffff;
}

/* Delete Device Button (Screenshot 4) */
.btn-hub-delete {
  background: var(--btn-delete-device);
  color: var(--btn-delete-device-txt);
  border: 1px solid rgba(239, 68, 68, 0.45);
  font-weight: 700;
  font-size: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  width: 100%;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Device Hub SMS Box */
.device-hub-sms-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.device-hub-sms-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 8px 12px;
  width: 100%;
}

.device-hub-sms-search svg {
  color: var(--text-blue);
}

.device-hub-sms-search input {
  background: transparent;
  border: none;
  font-size: 12px;
  outline: none;
  width: 100%;
  color: #ffffff;
  font-family: inherit;
  font-weight: 600;
}

.device-hub-sms-search input::placeholder {
  color: #64748b;
}

#sheet-sms-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

/* =========================================================================
   8. Action Modals (Send SMS, Call Forward, etc.)
========================================================================= */
.floating-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  z-index: 200;
  padding: 14px;
  padding-top: max(16px, env(safe-area-inset-top, 16px));
  padding-bottom: max(60px, env(safe-area-inset-bottom, 60px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.floating-modal-overlay.active {
  display: flex;
}

.floating-modal-card {
  background: #151822;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  width: 100%;
  max-width: 420px;
  max-height: 90dvh;
  margin-top: 10px;
  margin-bottom: auto;
  overflow-y: auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.floating-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.floating-modal-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.floating-modal-title-wrap h3 {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.floating-modal-subtitle {
  font-size: 12px;
  color: #8e95a5;
  font-weight: 500;
}

#btn-close-floating-modal {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  transition: none;
  box-shadow: none;
}

#btn-close-floating-modal:active {
  background: rgba(255, 255, 255, 0.12);
}

.floating-modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* APK Download Modal Specific Styling - Clean, static, no glow/hover animations */
.apk-download-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.apk-payload-select-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.apk-payload-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.apk-download-card {
  background: #11141e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.apk-download-card.protected-card {
  border-color: rgba(16, 185, 129, 0.25);
}

.apk-card-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.apk-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.01em;
}

.apk-card-desc {
  font-size: 11px;
  color: #8e95a5;
  line-height: 1.35;
}

.apk-card-desc.highlight {
  color: #94a3b8;
}

.apk-card-action-btn {
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 15px;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: none;
  box-shadow: none;
  flex-shrink: 0;
}

.apk-card-action-btn:active {
  opacity: 0.85;
}

.apk-card-action-btn.btn-raw {
  background: #202534;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
}

.apk-card-action-btn.btn-protected {
  background: #059669;
  border: 1px solid #10b981;
  color: #ffffff;
}

.apk-progress-card {
  background: #0e111a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* SIM Slot Selector Grid */
.sim-selector-grid,
.modal-sim-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.sim-selector-card,
.modal-sim-card {
  background: #2b2e3b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: pointer;
}

.sim-selector-card.sim-selector-active,
.modal-sim-card.active {
  background: #059669;
  border-color: #10b981;
}

.sim-selector-card.sim-selector-inactive,
.modal-sim-card:not(.active) {
  background: #2b2e3b;
  border-color: rgba(255, 255, 255, 0.08);
}

.sim-selector-title,
.modal-sim-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #ffffff;
}

.sim-selector-sub,
.modal-sim-sub {
  font-size: 11px;
  color: #94a3b8;
  font-family: var(--font-mono);
}

.sim-selector-card.sim-selector-active .sim-selector-sub,
.modal-sim-card.active .modal-sim-sub {
  color: #a7f3d0;
}

/* Modal Form Controls & Action Buttons */
.forwarder-label {
  font-size: 11px;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.forwarder-input {
  background: #141721 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: #ffffff !important;
  width: 100% !important;
  outline: none !important;
  box-sizing: border-box !important;
}

.forwarder-input:focus {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2) !important;
}

.forwarder-textarea {
  background: #141721 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #ffffff !important;
  width: 100% !important;
  min-height: 90px !important;
  outline: none !important;
  resize: vertical !important;
  font-family: inherit !important;
  box-sizing: border-box !important;
}

.forwarder-textarea:focus {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2) !important;
}

.action-btn {
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-primary {
  background: #2563eb;
  color: #ffffff;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-danger {
  background: #dc2626;
  color: #ffffff;
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-success {
  background: #059669;
  color: #ffffff;
}

.btn-success:hover {
  background: #047857;
}

.control-summary-pill {
  background: #141721;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: #cbd5e1;
}

.hub-sub-card {
  background: #141721;
  border: 2px solid rgba(16, 185, 129, 0.45);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
}

.hub-sub-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hub-sub-dev-badge {
  font-size: 11px;
  font-weight: 800;
  color: #38bdf8;
  font-family: var(--font-mono);
}

.hub-sub-time {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}

.hub-sub-body {
  display: flex;
  flex-direction: column;
}

.sub-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
}

.sub-k {
  color: #94a3b8;
  font-weight: 600;
}

.sub-v {
  color: #ffffff;
  font-weight: 700;
  text-align: right;
  word-break: break-all;
}

.sub-v.highlight {
  color: #facc15;
  font-weight: 800;
}

.hub-sub-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.hub-sub-capture-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: #10b981;
}

.hub-sub-delete-btn {
  background: #3f1d1d;
  color: #ef4444;
  border: 1px solid #7f1d1d;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

/* =========================================================================
   9. Upper Navigation Tabs Strip (Header Top View)
========================================================================= */
.upper-nav-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #121622;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 4px;
  width: 100%;
  box-sizing: border-box;
  gap: 4px;
}

.upper-nav-tabs .nav-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 6px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  user-select: none;
}

.upper-nav-tabs .nav-tab:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.04);
}

.upper-nav-tabs .nav-tab.active {
  background: #064e3b;
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: none;
}

.upper-nav-tabs .nav-tab svg {
  flex-shrink: 0;
  color: inherit;
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: 90%;
  max-width: 360px;
}

.toast {
  background: #1e293b;
  color: #ffffff;
  border: 1px solid var(--border-color);
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
  text-align: center;
}

/* =========================================================================
   10. 2-COLUMN GRID DEVICE CARDS (Matches User Reference Screenshot)
========================================================================= */
#devices-cards-list {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 10px !important;
  width: 100% !important;
  align-items: stretch;
}

#devices-cards-list .loading-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 30px;
  color: #64748b;
  font-weight: 600;
}

.grid-device-card {
  background: #131722;
  border: 2px solid rgba(16, 185, 129, 0.45);
  border-radius: 14px;
  padding: 10px 10px 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  box-sizing: border-box;
  cursor: pointer;
  position: relative;
  min-width: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: none;
}

.grid-device-card.starred {
  border-color: rgba(245, 158, 11, 0.5);
}

.grid-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.grid-card-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.grid-card-num {
  font-size: 13px;
  font-weight: 800;
  color: #f8fafc;
  flex-shrink: 0;
}

.grid-card-model {
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.grid-card-star-btn {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  line-height: 1;
}

.grid-card-star-btn.starred svg {
  fill: #f59e0b;
  stroke: #f59e0b;
}

.grid-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.grid-card-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  line-height: 1.35;
  min-width: 0;
}

.grid-card-label {
  color: #64748b;
  font-weight: 600;
  flex-shrink: 0;
  font-size: 10.5px;
}

.grid-card-val {
  color: #cbd5e1;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
  font-size: 10.5px;
}

.grid-card-id {
  color: #38bdf8;
  cursor: pointer;
  font-family: 'JetBrains Mono', Consolas, monospace;
}

.grid-card-val.online-green {
  color: #10b981 !important;
  font-weight: 700;
}

.grid-card-val.online-muted {
  color: #94a3b8;
}

.grid-card-check-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  border-radius: 8px;
  padding: 6px 0;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  margin-top: 2px;
  transition: none;
}

.grid-card-check-btn.checking {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.08);
}

.grid-card-check-btn.is-online {
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.08);
}