/* =========================================================================
   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:
    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: 220px 220px;
  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;
}

.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;
}

.tactical-login-card {
  position: relative;
  width: 100%;
  background: #0d131f;
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 8px;
  padding: 32px 24px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
}

/* Tactical Corner Brackets */
.corner-bracket {
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
  border: 2px solid #10b981;
  opacity: 0.75;
}

.corner-tl {
  top: 6px;
  left: 6px;
  border-right: none;
  border-bottom: none;
}

.corner-tr {
  top: 6px;
  right: 6px;
  border-left: none;
  border-bottom: none;
}

.corner-bl {
  bottom: 6px;
  left: 6px;
  border-right: none;
  border-top: none;
}

.corner-br {
  bottom: 6px;
  right: 6px;
  border-left: none;
  border-top: none;
}

.tactical-title {
  font-size: 22px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.05em;
  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.15);
  border: 1px solid #10b981;
  color: #6ee7b7;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 4px;
}

.tactical-divider {
  width: 100%;
  height: 1px;
  background: rgba(16, 185, 129, 0.15);
  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: #080c14;
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: 6px;
  padding: 0 12px;
  height: 46px;
}

.tactical-input-box:focus-within {
  border-color: #10b981;
}

.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.7;
  flex-shrink: 0;
}

.tactical-eye-btn {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}

.tactical-eye-btn:hover {
  color: #10b981;
}

.tactical-submit-btn {
  width: 100%;
  background: #059669;
  border: 1px solid #10b981;
  color: #ffffff;
  font-weight: 900;
  font-size: 13.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 13px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.tactical-submit-btn:hover {
  background: #10b981;
}

.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 {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
}

.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: 4px;
}

/* =========================================================================
   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: 8px 14px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  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 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;
  padding: 10px 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) */
.app-content,
.app-body {
  flex: 1;
  padding: 12px 14px 90px;
  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,
.control-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

/* Section Header Meta Rows (Top Counter & Action) */
.sms-header-actions-row,
.section-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px;
  margin-top: 2px;
  margin-bottom: 2px;
  width: 100%;
}

.sms-total-pill,
.count-badge-pill {
  font-size: 11.5px;
  font-weight: 800;
  color: #94a3b8;
  background: #1e2230;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 14px;
  border-radius: 10px;
  letter-spacing: -0.01em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.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. Tab 1: Device Cards (Screenshot 1)
========================================================================= */
.device-card-v2 {
  background: #131722;
  border: 1px solid rgba(16, 185, 129, 0.32);
  border-radius: 20px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  width: 100%;
}

.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: 1px solid rgba(16, 185, 129, 0.26);
  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: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.hub-sms-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hub-sms-sender-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.hub-sms-sender {
  font-size: 14.5px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.hub-sms-sim-badge {
  font-size: 11.5px;
  font-weight: 700;
  color: #3b82f6;
  background: transparent;
  border: none;
  padding: 0;
  margin-left: 6px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

.hub-sms-date {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.hub-sms-body {
  font-size: 13.5px;
  color: #cbd5e1;
  line-height: 1.55;
  word-break: break-word;
  padding: 0;
  margin: 2px 0 4px;
  background: transparent;
  border: none;
  font-weight: 500;
}

.hub-sms-bottom {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.hub-sms-id-badge {
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
  font-family: var(--font-mono);
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.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: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.hub-sub-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 10px;
  gap: 8px;
}

.hub-sub-dev-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 800;
  color: #ffffff;
  min-width: 0;
  cursor: pointer;
}

.hub-sub-dev-badge {
  font-size: 11px;
  font-weight: 800;
  color: #34d399;
  background: #064e3b;
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 2px 8px;
  border-radius: 6px;
  font-family: var(--font-mono);
  flex-shrink: 0;
  cursor: pointer;
}

.hub-sub-time {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  font-family: var(--font-mono);
  white-space: nowrap;
  flex-shrink: 0;
}

.hub-sub-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1a1e2b;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 12.5px;
}

.sub-k {
  color: #94a3b8;
  font-weight: 700;
  font-size: 12px;
}

.sub-v {
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
  font-family: var(--font-sans);
  text-align: right;
  word-break: break-all;
}

.sub-v.highlight {
  color: #34d399;
  font-family: var(--font-mono);
}

.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: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.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: 12px;
  width: 100%;
}

.control-card-title-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
}

.control-card-icon,
.control-icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  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: 14.5px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.control-card-subtitle,
.control-card-sub {
  font-size: 11.5px;
  color: var(--text-dim);
  font-weight: 600;
}

/* Panel Validity Gold Badge */
.validity-time-pill {
  font-size: 12px;
  font-weight: 800;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 6px 14px;
  border-radius: 10px;
  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: 12px;
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 800;
  color: #ffffff;
  width: 100%;
}

.status-indicator-label {
  font-size: 12.5px;
  font-weight: 800;
  color: #ffffff;
}

.status-indicator-val {
  font-size: 12px;
  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: 11px;
  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: 14px;
  padding: 12px 14px;
  font-size: 13.5px;
  color: #ffffff;
  outline: none;
  font-family: inherit;
  font-weight: 600;
}

.forwarder-input::placeholder,
.control-input::placeholder {
  color: #64748b;
}

.forwarder-textarea {
  width: 100%;
  min-height: 90px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13.5px;
  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: 13.5px;
  padding: 13px;
  border-radius: 14px;
  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: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  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: 14px;
  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: 10px;
  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: 800;
  font-size: 13px;
  padding: 13px 10px;
  border-radius: 14px;
  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: 800;
  font-size: 13px;
  padding: 13px 10px;
  border-radius: 14px;
  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: 800;
  font-size: 13px;
  padding: 13px 10px;
  border-radius: 14px;
  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: 800;
  font-size: 13px;
  padding: 13px 10px;
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
}

/* 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: 800;
  font-size: 13px;
  padding: 13px 14px;
  border-radius: 14px;
  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: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  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: 14px;
  padding: 10px 14px;
  width: 100%;
}

.device-hub-sms-search svg {
  color: var(--text-blue);
}

.device-hub-sms-search input {
  background: transparent;
  border: none;
  font-size: 13px;
  outline: none;
  width: 100%;
  color: #ffffff;
  font-family: inherit;
  font-weight: 600;
}

.device-hub-sms-search input::placeholder {
  color: #64748b;
}

/* =========================================================================
   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: #1f222e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  max-height: 90dvh;
  margin-top: 10px;
  margin-bottom: auto;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.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: 18px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.floating-modal-subtitle {
  font-size: 12px;
  color: #8e95a5;
  font-weight: 600;
}

#btn-close-floating-modal {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #2b2e3b;
  color: #94a3b8;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
}

.floating-modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 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: 1px solid rgba(255, 255, 255, 0.08);
  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. Bottom Navigation Bar
========================================================================= */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: #0d111a;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  padding: 8px 10px max(8px, env(safe-area-inset-bottom, 8px));
  z-index: 100;
}

.nav-tab {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-family: inherit;
  padding: 4px 8px;
  flex: 1;
}

.nav-tab.active {
  color: #10b981;
}

.nav-tab svg {
  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;
}