:root {
  --bg-main: #f4fbff;
  --bg-accent: #eefcf8;
  --panel: #ffffff;
  --panel-soft: #f8fcff;
  --line: #d8e9f3;
  --text-main: #133247;
  --text-muted: #5b7688;
  --brand-1: #0ea5d8;
  --brand-2: #08c58d;
  --brand-3: #2874f0;
  --danger: #d34b57;
  --success: #188457;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-soft: 0 16px 34px rgba(16, 79, 111, 0.12);
}

html {
  position: relative;
  min-height: 100%;
  font-size: 15px;
}

html[lang="ar"] .lang-en-only,
html[lang="en"] .lang-ar-only {
  display: none !important;
}

html[lang="ar"] .brand-en,
html[lang="en"] .brand-ar {
  display: none !important;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  margin: 0;
  margin-bottom: 76px;
  font-family: "Tajawal", "Segoe UI", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 12% 12%, rgba(10, 196, 141, 0.14), transparent 33%),
    radial-gradient(circle at 85% 8%, rgba(40, 116, 240, 0.16), transparent 31%),
    linear-gradient(140deg, var(--bg-main), var(--bg-accent));
}

a {
  color: var(--brand-1);
}

a:hover {
  color: #0b7aa2;
  text-decoration: none;
}

.ui-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ui-icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.icon-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.directional-icon {
  transition: transform 0.18s ease;
}

.icon-btn .ui-icon {
  width: 0.95em;
  height: 0.95em;
}

.title-with-icon,
.section-title-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.title-icon-badge,
.section-icon-badge {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1f5978;
  background: linear-gradient(155deg, #edf8ff, #dff2ff);
  border: 1px solid #cce4f5;
  box-shadow: 0 6px 14px rgba(21, 98, 142, 0.12);
}

.title-icon-badge .ui-icon,
.section-icon-badge .ui-icon {
  width: 1rem;
  height: 1rem;
}

.brand-icon {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1f5e7f;
  background: linear-gradient(160deg, #e9f7ff, #d8f0ff);
  border: 1px solid #c6e1f4;
}

.brand-icon .ui-icon {
  width: 0.95rem;
  height: 0.95rem;
}

.nav-link-icon {
  width: 1.05rem;
  height: 1.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2f6a8a;
}

.tile-title-row {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.34rem;
  padding-inline-start: 0;
  margin: 0;
}

.tile-title-row .section-icon-badge {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 10px;
}

.stat-chip-icon {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0f4a68;
  background: rgba(239, 250, 255, 0.65);
  border: 1px solid rgba(204, 232, 246, 0.85);
  margin-bottom: 0.3rem;
}

.stat-chip-icon .ui-icon {
  width: 0.85rem;
  height: 0.85rem;
}

.main-header {
  margin-bottom: 1rem;
}

.dashboard-nav {
  background: linear-gradient(122deg, #ffffff, #f2faff);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(13, 70, 99, 0.09);
}

.brand-title {
  display: inline-flex;
  flex-direction: column;
  gap: 0.06rem;
  line-height: 1.12;
}

.brand-ar {
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--text-main);
}

.brand-en {
  font-family: "Montserrat", "Segoe UI", sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.custom-toggler {
  border-color: var(--line);
}

.nav-links .nav-link {
  color: var(--text-main);
  font-weight: 600;
  border-radius: 999px;
  padding: 0.46rem 0.86rem;
  margin-inline-start: 0;
  transition: all 0.24s ease;
}

.nav-links .nav-link:hover,
.nav-links .nav-link:focus {
  color: #095c7c;
  background: rgba(14, 165, 216, 0.1);
}

.nav-links .nav-link.icon-inline {
  display: flex;
  align-items: center;
  gap: 0.42rem;
}

#deviceStatusTabs {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.46rem;
}

#deviceStatusTabs.btn-group > .btn,
#deviceStatusTabs .device-filter-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  flex: 0 0 auto;
  border-radius: 999px !important;
}

#deviceStatusTabs.btn-group > .btn + .btn,
#deviceStatusTabs.btn-group > .btn + .btn-group,
#deviceStatusTabs.btn-group > .btn-group + .btn,
#deviceStatusTabs.btn-group > .btn-group + .btn-group {
  margin-left: 0 !important;
}

#deviceStatusTabs.btn-group > .btn:not(:first-child),
#deviceStatusTabs.btn-group > .btn:not(:last-child):not(.dropdown-toggle) {
  border-radius: 999px !important;
}

html[dir="rtl"] .directional-icon {
  transform: scaleX(-1);
}

html[dir="rtl"] .icon-inline,
html[dir="rtl"] .icon-btn,
html[dir="rtl"] .title-with-icon,
html[dir="rtl"] .section-title-with-icon,
html[dir="rtl"] .tile-title-row,
html[dir="rtl"] .nav-links .nav-link.icon-inline,
html[dir="rtl"] .connected-shell .flow-step,
html[dir="rtl"] #deviceStatusTabs {
  direction: rtl;
}

html[dir="ltr"] .icon-inline,
html[dir="ltr"] .icon-btn,
html[dir="ltr"] .title-with-icon,
html[dir="ltr"] .section-title-with-icon,
html[dir="ltr"] .tile-title-row,
html[dir="ltr"] .nav-links .nav-link.icon-inline,
html[dir="ltr"] .connected-shell .flow-step,
html[dir="ltr"] #deviceStatusTabs {
  direction: ltr;
}

.nav-preferences {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  margin-inline-start: 0.7rem;
}

.icon-toggle-btn {
  border: 1px solid #cde2ef;
  background: #f4fbff;
  color: #22506b;
  border-radius: 12px;
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.32rem;
  padding: 0 0.55rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-toggle-btn svg {
  width: 17px;
  height: 17px;
}

.icon-toggle-btn:hover,
.icon-toggle-btn:focus {
  background: #e8f6ff;
  color: #133f5b;
  border-color: #9ac7e0;
}

.language-code {
  font-family: "Montserrat", "Segoe UI", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.theme-icon {
  display: none;
}

.theme-sun {
  display: inline-block;
}

body.dark-theme .theme-sun {
  display: none;
}

body.dark-theme .theme-moon {
  display: inline-block;
}

.app-width {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-inline: 0;
}

.main-content-shell {
  min-height: calc(100vh - 190px);
  width: 100%;
  max-width: none;
  margin: 0;
  padding-inline: 0;
}

.footer-shell {
  position: absolute;
  bottom: 0;
  width: 100%;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-muted);
  padding: 0.85rem 0;
}

.page-shell {
  display: grid;
  gap: 1rem;
}

.page-head {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(124deg, rgba(255, 255, 255, 0.98), rgba(235, 250, 255, 0.94));
  box-shadow: var(--shadow-soft);
  padding: 1.06rem 1.1rem;
}

.page-title {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 700;
}

.page-subtitle {
  margin: 0.2rem 0 0;
  font-family: "Montserrat", "Segoe UI", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.page-note {
  margin-top: 0.62rem;
  color: #3e657b;
  font-size: 0.86rem;
}

.dashboard-hero {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.98), rgba(233, 249, 255, 0.94));
  box-shadow: var(--shadow-soft);
  padding: 1.18rem 1.16rem 1rem;
  margin-bottom: 0.2rem;
}

.hero-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.hero-title-ar {
  margin: 0;
  font-size: 1.24rem;
  font-weight: 700;
}

.hero-title-en {
  margin: 0;
  font-family: "Montserrat", "Segoe UI", sans-serif;
  font-size: 0.77rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pulse-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand-2);
  box-shadow: 0 0 0 rgba(8, 197, 141, 0.55);
  animation: pulse 1.9s infinite;
  margin-inline-end: 0.35rem;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(8, 197, 141, 0.48); }
  70% { box-shadow: 0 0 0 12px rgba(8, 197, 141, 0); }
  100% { box-shadow: 0 0 0 0 rgba(8, 197, 141, 0); }
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.72rem;
  margin-top: 0.92rem;
}

.stat-chip {
  border-radius: var(--radius-md);
  border: 1px solid #dcedf7;
  background: #fff;
  padding: 0.66rem 0.75rem;
}

.stat-label {
  display: block;
  font-size: 0.77rem;
  color: var(--text-muted);
  margin-bottom: 0.22rem;
}

.stat-value {
  font-family: "Montserrat", "Segoe UI", sans-serif;
  font-weight: 700;
  color: #0f4361;
}

.panel-grid {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 1rem;
}

.dashboard-panel,
.content-card {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  padding: 1rem;
}

.content-card.soft {
  background: linear-gradient(160deg, #ffffff, var(--panel-soft));
}

.panel-title {
  margin: 0 0 0.72rem;
  font-size: 1rem;
  font-weight: 700;
}

.panel-subtitle {
  margin: 0 0 0.8rem;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.grid-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.grid-four {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.field-label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  color: #2f5b73;
  font-size: 0.86rem;
}

.form-control,
.custom-select {
  border-radius: var(--radius-sm);
  border: 1px solid #cde2ee;
  box-shadow: none;
}

.form-control:focus,
.custom-select:focus {
  border-color: #6fcce7;
  box-shadow: 0 0 0 0.23rem rgba(14, 165, 216, 0.16);
}

.command-form .form-control {
  border-radius: 12px;
}

.btn-accent {
  color: #fff;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  padding-inline: 1rem;
  background: linear-gradient(125deg, var(--brand-1), var(--brand-2));
  box-shadow: 0 8px 20px rgba(8, 159, 193, 0.29);
}

.btn-accent:hover,
.btn-accent:focus {
  color: #fff;
  filter: brightness(0.97);
}

.btn-soft {
  border-radius: 12px;
  border: 1px solid #c6dfec;
  color: #2c5d79;
  background: #f6fbfe;
  font-weight: 600;
  padding-inline: 0.9rem;
}

.btn-soft:hover,
.btn-soft:focus {
  background: #edf8fd;
}

.action-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.note-box {
  border-radius: 12px;
  border: 1px solid #d9ecf7;
  background: #f6fcff;
  color: #386279;
  padding: 0.64rem 0.72rem;
  font-size: 0.83rem;
}

.alert {
  border-radius: 12px;
}

.device-table-wrap,
.table-shell {
  border: 1px solid #dceaf4;
  border-radius: 15px;
  overflow: hidden;
  background: #fff;
}

.device-table,
.table-modern {
  margin-bottom: 0;
}

.device-table thead th,
.table-modern thead th {
  border-top: none;
  font-size: 0.82rem;
  color: #22516d;
  background: #f1f9fd;
  white-space: nowrap;
}

.device-table td,
.device-table th,
.table-modern td,
.table-modern th {
  vertical-align: middle;
}

.device-table td,
.table-modern td {
  font-size: 0.87rem;
}

.badge-state {
  border-radius: 999px;
  padding: 0.28rem 0.56rem;
  font-size: 0.73rem;
  font-weight: 700;
}

.badge-online {
  background: rgba(8, 197, 141, 0.14);
  color: var(--success);
}

.badge-offline {
  background: rgba(211, 75, 87, 0.13);
  color: #a93e49;
}

.history-list {
  margin-top: 1rem;
  display: grid;
  gap: 0.76rem;
}

.command-item {
  border: 1px solid #dbeaf4;
  border-radius: 14px;
  background: linear-gradient(160deg, #ffffff, #f9fdff);
  padding: 0.82rem;
}

.command-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.56rem;
  flex-wrap: wrap;
}

.command-id {
  font-family: "Montserrat", "Segoe UI", sans-serif;
  font-size: 0.75rem;
  color: #2f627f;
}

.command-text {
  font-weight: 700;
  color: #164a69;
}

.ltr-input,
.ltr-text,
.command-text {
  direction: ltr;
  unicode-bidi: plaintext;
  text-align: left;
}

.command-meta {
  font-size: 0.78rem;
  color: #5d7b8e;
}

.mini-table {
  margin-top: 0.38rem;
}

.mini-table th {
  background: #f1f8fc;
  font-size: 0.76rem;
}

.mini-table td {
  font-size: 0.8rem;
}

.status-pass {
  color: var(--success);
  font-weight: 700;
}

.status-fail {
  color: #b3414a;
  font-weight: 700;
}

.status-offline {
  color: #d4202f;
  font-weight: 800;
}

.status-pending {
  color: #8f5c06;
  font-weight: 700;
}

.view-switchers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.history-panel .history-list {
  max-height: 460px;
  overflow-y: auto;
  padding-inline-end: 0.2rem;
}

.devices-table-wrap {
  max-height: 470px;
  overflow: auto;
}

.retry-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  justify-content: center;
  flex-wrap: wrap;
}

.retry-minutes-input,
.retry-minutes-select {
  width: 170px;
  min-width: 150px;
}

.retry-caption {
  font-size: 0.74rem;
  color: var(--text-muted);
  white-space: nowrap;
}

body.dark-theme {
  --bg-main: #0f1a24;
  --bg-accent: #132431;
  --panel: #182737;
  --panel-soft: #1a2f42;
  --line: #3a5369;
  --text-main: #eaf3ff;
  --text-muted: #b5c9db;
  --shadow-soft: 0 16px 34px rgba(0, 0, 0, 0.32);
}

body.dark-theme .dashboard-nav,
body.dark-theme .footer-shell,
body.dark-theme .note-box,
body.dark-theme .stat-chip,
body.dark-theme .device-table-wrap,
body.dark-theme .table-shell,
body.dark-theme .command-item,
body.dark-theme .page-head,
body.dark-theme .dashboard-hero,
body.dark-theme .dashboard-panel,
body.dark-theme .content-card {
  background: #182a3a;
  color: var(--text-main);
  border-color: var(--line);
}

body.dark-theme .dashboard-hero {
  background: linear-gradient(120deg, rgba(30, 48, 66, 0.95), rgba(25, 62, 92, 0.82));
}

body.dark-theme .stat-chip:nth-child(1) {
  background: linear-gradient(145deg, rgba(16, 151, 110, 0.33), rgba(18, 45, 54, 0.96));
}

body.dark-theme .stat-chip:nth-child(2) {
  background: linear-gradient(145deg, rgba(188, 68, 87, 0.33), rgba(45, 28, 36, 0.96));
}

body.dark-theme .stat-chip:nth-child(3) {
  background: linear-gradient(145deg, rgba(20, 112, 196, 0.35), rgba(25, 39, 59, 0.96));
}

body.dark-theme .stat-chip:nth-child(4) {
  background: linear-gradient(145deg, rgba(201, 130, 44, 0.32), rgba(48, 37, 22, 0.96));
}

body.dark-theme .device-table thead th,
body.dark-theme .table-modern thead th,
body.dark-theme .mini-table th {
  background: #233b50;
  color: #edf6ff;
  border-color: #3f5b72;
}

body.dark-theme .device-table td,
body.dark-theme .table-modern td,
body.dark-theme .mini-table td {
  color: #e8f2ff;
  border-color: #334a60;
}

body.dark-theme .status-offline {
  color: #ff6b78;
}

body.dark-theme .btn-soft {
  background: #254057;
  color: #e7f2ff;
  border-color: #4a647b;
}

body.dark-theme .btn-soft:hover,
body.dark-theme .btn-soft:focus {
  background: #2b4b66;
  color: #f2f8ff;
}

body.dark-theme .form-control,
body.dark-theme .custom-select {
  background: #1f3549;
  color: #ecf5ff;
  border-color: #47647c;
}

body.dark-theme .form-control:focus,
body.dark-theme .custom-select:focus {
  border-color: #53a7dc;
  box-shadow: 0 0 0 0.23rem rgba(61, 136, 188, 0.22);
}

body.dark-theme .form-control::placeholder {
  color: #9fb8cc;
}

body.dark-theme .btn-accent {
  background: linear-gradient(125deg, #3aa5df, #21c296);
  box-shadow: 0 10px 24px rgba(25, 167, 214, 0.34);
}

body.dark-theme .nav-links .nav-link {
  color: #eaf3ff;
}

body.dark-theme .nav-links .nav-link:hover,
body.dark-theme .nav-links .nav-link:focus {
  color: #ffffff;
  background: rgba(114, 182, 222, 0.22);
}

body.dark-theme .brand-en,
body.dark-theme .page-subtitle,
body.dark-theme .page-note,
body.dark-theme .panel-subtitle,
body.dark-theme .stat-label,
body.dark-theme .field-label,
body.dark-theme .command-meta,
body.dark-theme .command-id,
body.dark-theme .metric-name {
  color: #bdd0e2;
}

body.dark-theme .page-title,
body.dark-theme .panel-title,
body.dark-theme .hero-title-ar,
body.dark-theme .hero-title-en,
body.dark-theme .command-text,
body.dark-theme .stat-value,
body.dark-theme .metric-value {
  color: #f1f8ff;
}

body.dark-theme .note-box {
  background: #1f3448;
  color: #d9eaf9;
  border-color: #446078;
}

body.dark-theme .icon-toggle-btn {
  background: #20374a;
  color: #e6f2ff;
  border-color: #4a6378;
}

body.dark-theme .icon-toggle-btn:hover,
body.dark-theme .icon-toggle-btn:focus {
  background: #2a4760;
  color: #ffffff;
  border-color: #6d8aa2;
}

body.dark-theme .title-icon-badge,
body.dark-theme .section-icon-badge,
body.dark-theme .brand-icon {
  color: #dbeeff;
  background: linear-gradient(160deg, #2c4b62, #233b4f);
  border-color: #4e6e87;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.26);
}

body.dark-theme .nav-link-icon {
  color: #b8daf2;
}

body.dark-theme .stat-chip-icon {
  color: #dcf2ff;
  background: rgba(15, 56, 86, 0.48);
  border-color: rgba(94, 139, 172, 0.62);
}

body.dark-theme .key-value-table th {
  background: #233b50;
  color: #edf6ff;
  border-color: #3f5b72;
}

body.dark-theme .key-value-table td {
  color: #e8f2ff;
  border-color: #334a60;
}

body.dark-theme a {
  color: #79c5ff;
}

body.dark-theme a:hover {
  color: #a6dcff;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 0.8rem;
}

.metric-card {
  border-radius: var(--radius-md);
  border: 1px solid #d9ebf6;
  background: #fff;
  padding: 0.8rem;
  box-shadow: 0 8px 16px rgba(15, 83, 116, 0.07);
}

.metric-name {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.metric-value {
  margin-top: 0.22rem;
  font-family: "Montserrat", "Segoe UI", sans-serif;
  font-weight: 700;
  color: #124667;
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 0.9rem;
}

.nav-tile {
  border-radius: 16px;
  border: 1px solid #d9ebf6;
  background: linear-gradient(150deg, #ffffff, #f6fcff);
  box-shadow: var(--shadow-soft);
  padding: 1rem;
}

.nav-tile h3 {
  margin: 0 0 0.5rem;
  font-size: 1.04rem;
  font-weight: 700;
}

.nav-tile p {
  margin: 0 0 0.8rem;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.key-value-table th {
  width: 260px;
  background: #f1f9fd;
  color: #23526d;
  font-size: 0.84rem;
}

.key-value-table td {
  font-size: 0.9rem;
}

@media (max-width: 991px) {
  .panel-grid,
  .grid-two,
  .grid-three,
  .grid-four,
  .metric-grid,
  .tile-grid,
  .hero-stats {
    grid-template-columns: 1fr;
  }

  .nav-preferences {
    width: 100%;
    justify-content: flex-end;
    margin-top: 0.65rem;
    margin-inline-start: 0;
  }

  .icon-toggle-btn {
    min-width: 42px;
  }
}

/* Connected Dashboard Refresh */
.connected-shell {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 100%;
  gap: 1.15rem;
  padding-bottom: 0.4rem;
  overflow-x: clip;
}

.connected-shell::before,
.connected-shell::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  z-index: 0;
  pointer-events: none;
  filter: blur(1px);
  animation: connected-float 14s ease-in-out infinite;
}

.connected-shell::before {
  width: 280px;
  height: 280px;
  top: -86px;
  inset-inline-start: -90px;
  background: radial-gradient(circle, rgba(32, 196, 255, 0.3) 0%, rgba(32, 196, 255, 0) 72%);
}

.connected-shell::after {
  width: 240px;
  height: 240px;
  top: 24px;
  inset-inline-end: -78px;
  animation-delay: -4s;
  background: radial-gradient(circle, rgba(16, 214, 150, 0.28) 0%, rgba(16, 214, 150, 0) 72%);
}

.connected-shell > * {
  position: relative;
  z-index: 1;
  max-width: 100%;
}

.connected-shell .dashboard-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(145, 221, 255, 0.55);
  border-radius: 24px;
  background:
    radial-gradient(circle at 16% -12%, rgba(255, 227, 128, 0.54) 0%, rgba(255, 227, 128, 0) 42%),
    radial-gradient(circle at 102% 12%, rgba(140, 255, 231, 0.34) 0%, rgba(140, 255, 231, 0) 38%),
    linear-gradient(132deg, #0a2f66 0%, #0f5c9f 52%, #08a7a7 100%);
  box-shadow: 0 26px 46px rgba(8, 49, 97, 0.3);
  margin-bottom: 0.1rem;
  padding: 1.35rem 1.3rem 1.1rem;
}

.connected-shell .dashboard-hero::before {
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0) 68%);
  pointer-events: none;
}

.connected-shell .hero-title-ar,
.connected-shell .hero-title-en {
  color: #f5fbff;
}

.connected-shell .hero-title-ar {
  font-size: clamp(1.2rem, 1.35vw + 0.88rem, 1.75rem);
  letter-spacing: 0.01em;
}

.connected-shell .hero-title-en {
  margin-top: 0.2rem;
  color: rgba(236, 246, 255, 0.9);
  letter-spacing: 0.12em;
}

.connected-shell .dashboard-hero .note-box {
  border: 1px solid rgba(214, 240, 255, 0.45);
  background: rgba(6, 32, 71, 0.28);
  color: #f0f8ff;
  backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.11);
}

.connected-shell .pulse-dot {
  background: #ffda58;
  box-shadow: 0 0 0 rgba(255, 218, 88, 0.58);
}

.connected-shell .hero-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.78rem;
  margin-top: 1.04rem;
}

.connected-shell .stat-chip {
  border: 1px solid rgba(196, 231, 253, 0.46);
  background: rgba(8, 45, 95, 0.25);
  color: #eff8ff;
  backdrop-filter: blur(6px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09);
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.connected-shell .stat-chip:hover {
  transform: translateY(-2px);
  background: rgba(8, 45, 95, 0.35);
  border-color: rgba(227, 246, 255, 0.72);
}

.connected-shell .stat-label {
  color: rgba(220, 238, 255, 0.86);
}

.connected-shell .stat-value {
  color: #ffffff;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
}

.connected-shell .panel-grid {
  grid-template-columns: minmax(320px, 560px) minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.connected-shell .dashboard-panel {
  border: 1px solid #d6e7f6;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 251, 255, 0.95));
  box-shadow: 0 18px 34px rgba(15, 78, 114, 0.12);
  padding: 0.82rem;
}

.connected-shell .command-panel,
.connected-shell .history-panel,
.connected-shell .devices-panel {
  position: relative;
  overflow: hidden;
}

.connected-shell .history-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.connected-shell .command-panel {
  width: 100%;
  margin-inline: 0;
}

.connected-shell .command-panel::before,
.connected-shell .history-panel::before,
.connected-shell .devices-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #0ec8e8, #00b39f, #febd38);
  opacity: 0.9;
}

.connected-shell .panel-title {
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  margin-bottom: 0.46rem;
}

.connected-shell .panel-subtitle {
  margin-bottom: 0.62rem;
  color: #4a6a84;
  line-height: 1.42;
}

.connected-shell .command-form {
  display: grid;
  gap: 0.78rem;
  padding: 0.82rem;
  border: 1px solid #d9e8f5;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 250, 255, 0.94));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.68);
}

.connected-shell .command-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(260px, 0.92fr);
  gap: 0.85rem;
  align-items: stretch;
}

.connected-shell .command-main-field,
.connected-shell .command-settings-grid {
  min-width: 0;
}

.connected-shell .command-settings-grid {
  display: grid;
  gap: 0.62rem;
  grid-template-columns: 1fr;
  align-content: start;
}

.connected-shell .command-main-field,
.connected-shell .compact-field {
  display: flex;
  flex-direction: column;
}

.connected-shell .command-main-field textarea.form-control {
  min-height: 156px;
  height: 100%;
  resize: vertical;
  padding: 0.8rem 0.88rem;
  line-height: 1.6;
  font-size: 0.95rem;
}

.connected-shell .compact-field .form-control,
.connected-shell .compact-field .custom-select {
  min-height: 48px;
}

.connected-shell .command-note {
  margin-bottom: 0 !important;
}

.connected-shell .command-actions {
  justify-content: flex-start;
  gap: 0.58rem;
}

.connected-shell .command-actions .btn {
  min-height: 46px;
}

.connected-shell .device-filter-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.45fr) minmax(220px, 1fr);
  gap: 0.7rem;
  margin-bottom: 0.7rem;
}

.connected-shell .device-filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-width: 0;
}

.connected-shell .device-filter-label {
  color: #2d5a79;
  font-size: 0.8rem;
  font-weight: 700;
}

.connected-shell .device-type-filter-dropdown {
  position: relative;
}

.connected-shell .device-type-filter-toggle {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  text-align: start;
  font-weight: 600;
  color: #244a66;
  background: #fff;
}

.connected-shell .device-type-filter-toggle:focus {
  box-shadow: 0 0 0 0.2rem rgba(57, 116, 160, 0.16);
}

.connected-shell #deviceTypeFilterSummary {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connected-shell .device-type-filter-caret {
  font-size: 0.9rem;
  color: #5a7892;
  transition: transform 0.18s ease;
}

.connected-shell .device-type-filter-dropdown.is-open .device-type-filter-caret {
  transform: rotate(180deg);
}

.connected-shell .device-type-filter-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  inset-inline: 0;
  z-index: 35;
  border-radius: 14px;
  border: 1px solid #cbdfee;
  background: #ffffff;
  box-shadow: 0 18px 34px rgba(36, 79, 109, 0.16);
  padding: 0.55rem;
}

.connected-shell .device-type-filter-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  padding-bottom: 0.45rem;
  margin-bottom: 0.45rem;
  border-bottom: 1px solid #e1edf7;
}

.connected-shell .device-type-filter-actions .btn {
  padding: 0.15rem 0.3rem;
  font-weight: 700;
  text-decoration: none;
}

.connected-shell .device-type-filter-options {
  display: grid;
  gap: 0.3rem;
  max-height: 260px;
  overflow: auto;
}

.connected-shell .device-type-filter-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 40px;
  padding: 0.42rem 0.5rem;
  border-radius: 10px;
  color: #274c67;
  font-size: 0.92rem;
  transition: background 0.18s ease, color 0.18s ease;
  cursor: pointer;
}

.connected-shell .device-type-filter-option:hover {
  background: #eef7ff;
}

.connected-shell .device-type-filter-option input {
  margin: 0;
  flex: 0 0 auto;
}

.connected-shell .device-type-filter-empty {
  color: #6b879d;
  font-size: 0.88rem;
  padding: 0.45rem 0.15rem 0.25rem;
}

.connected-shell #commandMessage {
  border-radius: 14px;
  border-color: #cce4f6;
  background: linear-gradient(145deg, #f4fbff, #ecf6ff);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.85);
  padding: 0.5rem 0.7rem;
  margin-bottom: 0.6rem !important;
}

.connected-shell .dispatch-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  margin-bottom: 0.45rem;
}

.connected-shell .flow-step {
  display: flex;
  align-items: center;
  gap: 0.36rem;
  min-height: 42px;
  border-radius: 12px;
  border: 1px dashed #c6dced;
  background: #f6fbff;
  color: #56748d;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 0.34rem 0.5rem;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.connected-shell .flow-step-icon {
  width: 1.22rem;
  height: 1.22rem;
  border-radius: 8px;
  border: 1px solid #c9e0f0;
  color: #2b5f80;
  background: linear-gradient(160deg, #f2f9ff, #e7f3fe);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.connected-shell .flow-step.is-done {
  border-style: solid;
  border-color: #9fd8b8;
  background: #edf9f2;
  color: #1b714c;
}

.connected-shell .flow-step.is-done .flow-step-icon {
  border-color: #94cfb0;
  color: #1e7a53;
  background: #ddf4e8;
}

.connected-shell .flow-step.is-active {
  border-style: solid;
  border-color: #9bc7e5;
  background: #ecf6ff;
  color: #215778;
}

.connected-shell .dispatch-readiness {
  border-radius: 10px;
  border: 1px solid #d5e8f6;
  background: #f6fbff;
  color: #4a6f8a;
  font-size: 0.79rem;
  font-weight: 700;
  padding: 0.34rem 0.52rem;
  margin-bottom: 0.56rem;
}

.connected-shell .dispatch-readiness.is-ready {
  border-color: #a1d8bc;
  background: #edf9f2;
  color: #176e49;
}

.connected-shell .form-row {
  margin-inline: -0.35rem;
}

.connected-shell .form-group {
  margin-bottom: 0.58rem;
}

.connected-shell .field-label,
.connected-shell .command-panel label {
  color: #2d5a79;
  font-size: 0.83rem;
  font-weight: 700;
}

.connected-shell .form-control,
.connected-shell .custom-select {
  border-radius: 12px;
  border-color: #c8deef;
  background: #ffffff;
  color: #11344d;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
  min-height: calc(1.4em + 0.95rem + 2px);
}

.connected-shell .form-control:hover,
.connected-shell .custom-select:hover {
  border-color: #97c5e5;
}

.connected-shell .form-control:focus,
.connected-shell .custom-select:focus {
  border-color: #44b6e5;
  box-shadow: 0 0 0 0.22rem rgba(24, 177, 230, 0.2);
}

.connected-shell .btn-accent {
  border-radius: 12px;
  background: linear-gradient(118deg, #ff7c4b 0%, #ff9a2f 48%, #ffc14f 100%);
  color: #1f2c36;
  box-shadow: 0 12px 24px rgba(255, 136, 60, 0.3);
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.connected-shell .btn-accent:hover,
.connected-shell .btn-accent:focus {
  color: #1f2c36;
  filter: brightness(1.02);
  transform: translateY(-1px);
  box-shadow: 0 15px 24px rgba(255, 131, 48, 0.34);
}

.connected-shell .btn-soft {
  border-radius: 12px;
  border-color: #c6def0;
  background: linear-gradient(150deg, #f8fbff, #edf7ff);
  color: #295676;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.connected-shell .btn-soft:hover,
.connected-shell .btn-soft:focus {
  transform: translateY(-1px);
  border-color: #9fc8e7;
  background: linear-gradient(150deg, #eff7ff, #e5f2fe);
  color: #1e4a67;
}

.connected-shell .history-panel .history-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(64vh, 760px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-inline-end: 0.2rem;
}

.connected-shell .history-list::-webkit-scrollbar,
.connected-shell .devices-table-wrap::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

.connected-shell .history-list::-webkit-scrollbar-thumb,
.connected-shell .devices-table-wrap::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #9ec8e6, #80aed1);
  border-radius: 999px;
}

.connected-shell .command-item {
  border: 1px solid #d4e5f5;
  border-radius: 15px;
  background: linear-gradient(160deg, #ffffff, #f4f9ff);
  box-shadow: 0 10px 20px rgba(17, 90, 134, 0.09);
}

.connected-shell .command-item-head {
  margin-bottom: 0.58rem;
}

.connected-shell .command-id {
  color: #2c6485;
  letter-spacing: 0.03em;
}

.connected-shell .command-text {
  color: #0d3f5d;
  font-size: 0.96rem;
}

.connected-shell .command-meta {
  color: #4e708b;
}

.connected-shell .mini-table thead th,
.connected-shell .device-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  border-top: none;
  border-bottom-color: #cfe1f1;
  color: #1f4f70;
  background: linear-gradient(180deg, #f4f9ff, #eaf4ff);
}

.connected-shell .mini-table td,
.connected-shell .mini-table th,
.connected-shell .device-table td,
.connected-shell .device-table th {
  border-color: #dbe8f4;
}

.connected-shell .device-table-wrap {
  border-radius: 16px;
  border: 1px solid #cfe3f4;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
  max-width: 100%;
  overflow-x: auto;
  overflow-y: auto;
}

.connected-shell .devices-table-wrap {
  max-height: min(50vh, 520px);
  max-width: 100%;
}

.connected-shell .device-table {
  min-width: 1120px;
}

.connected-shell .device-table tbody tr {
  transition: background-color 0.18s ease;
}

.connected-shell .device-table tbody tr:hover {
  background: #f4f9ff;
}

.connected-shell .device-table tbody tr.is-selected {
  background: #eaf6ff;
}

.connected-shell .device-table tbody tr.is-selected:hover {
  background: #e0f1ff;
}

.connected-shell .device-check {
  width: 16px;
  height: 16px;
  accent-color: #0fa4d8;
}

.connected-shell .badge-state {
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.64rem;
}

.connected-shell .badge-online {
  background: rgba(14, 197, 141, 0.16);
  color: #0e7b59;
}

.connected-shell .badge-offline {
  background: rgba(224, 77, 90, 0.15);
  color: #b13e49;
}

.connected-shell .retry-controls {
  gap: 0.4rem;
}

.connected-shell .retry-caption {
  color: #4b6f8b;
}

.connected-shell .retry-minutes-select,
.connected-shell .retry-minutes-input {
  border: 1px solid #c5ddf0;
  border-radius: 9px;
  background: #ffffff;
  color: #1d4968;
}

.connected-shell .status-pass {
  color: #0f8a5d;
}

.connected-shell .status-fail {
  color: #c1404d;
}

.connected-shell .status-pending {
  color: #b1781c;
}

.connected-shell .status-offline {
  color: #d5243b;
}

body.dark-theme .connected-shell::before {
  background: radial-gradient(circle, rgba(72, 164, 255, 0.25) 0%, rgba(72, 164, 255, 0) 70%);
}

body.dark-theme .connected-shell::after {
  background: radial-gradient(circle, rgba(47, 222, 188, 0.22) 0%, rgba(47, 222, 188, 0) 70%);
}

body.dark-theme .connected-shell .dashboard-hero {
  border-color: rgba(103, 172, 229, 0.38);
  background:
    radial-gradient(circle at 16% -12%, rgba(255, 198, 112, 0.24) 0%, rgba(255, 198, 112, 0) 42%),
    radial-gradient(circle at 102% 12%, rgba(95, 221, 206, 0.25) 0%, rgba(95, 221, 206, 0) 38%),
    linear-gradient(132deg, #0d2848 0%, #0e426f 52%, #0a6f72 100%);
  box-shadow: 0 26px 46px rgba(0, 0, 0, 0.33);
}

body.dark-theme .connected-shell .dashboard-hero .note-box {
  border-color: rgba(137, 184, 220, 0.35);
  background: rgba(5, 20, 42, 0.42);
  color: #e8f6ff;
}

body.dark-theme .connected-shell .stat-chip {
  border-color: rgba(111, 148, 177, 0.45);
  background: rgba(9, 35, 58, 0.42);
  color: #e6f3ff;
}

body.dark-theme .connected-shell .stat-label {
  color: rgba(206, 223, 240, 0.84);
}

body.dark-theme .connected-shell .dashboard-panel {
  border-color: #365572;
  background: linear-gradient(180deg, rgba(25, 42, 59, 0.98), rgba(21, 37, 52, 0.96));
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.35);
}

body.dark-theme .connected-shell .panel-subtitle,
body.dark-theme .connected-shell .command-meta,
body.dark-theme .connected-shell .retry-caption {
  color: #b8cde0;
}

body.dark-theme .connected-shell .device-filter-label {
  color: #d5e8f8;
}

body.dark-theme .connected-shell .device-type-filter-toggle {
  border-color: #476885;
  background: #1c3245;
  color: #e0eef9;
}

body.dark-theme .connected-shell .device-type-filter-caret {
  color: #c1d8eb;
}

body.dark-theme .connected-shell .device-type-filter-menu {
  border-color: #476885;
  background: linear-gradient(180deg, rgba(25, 42, 59, 0.99), rgba(21, 37, 52, 0.97));
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.34);
}

body.dark-theme .connected-shell .device-type-filter-actions {
  border-color: #35556f;
}

body.dark-theme .connected-shell .device-type-filter-option {
  color: #dbeaf7;
}

body.dark-theme .connected-shell .device-type-filter-option:hover {
  background: rgba(84, 125, 157, 0.22);
}

body.dark-theme .connected-shell .device-type-filter-empty {
  color: #b8cde0;
}

body.dark-theme .connected-shell #commandMessage {
  border-color: #3f607d;
  background: linear-gradient(145deg, #1a3044, #1e364b);
  color: #dbecf9;
}

body.dark-theme .connected-shell .flow-step {
  border-color: #45647d;
  background: #1f3448;
  color: #c6ddf0;
}

body.dark-theme .connected-shell .flow-step-icon {
  border-color: #4f6f89;
  background: #29445a;
  color: #def0ff;
}

body.dark-theme .connected-shell .flow-step.is-done {
  border-color: #4f8f73;
  background: #203a32;
  color: #9ee6c4;
}

body.dark-theme .connected-shell .flow-step.is-done .flow-step-icon {
  border-color: #4f8f73;
  background: #26453b;
  color: #aef1d0;
}

body.dark-theme .connected-shell .flow-step.is-active {
  border-color: #4f7ca0;
  background: #20384c;
  color: #b8dcf8;
}

body.dark-theme .connected-shell .dispatch-readiness {
  border-color: #43627c;
  background: #1f3448;
  color: #c7def2;
}

body.dark-theme .connected-shell .dispatch-readiness.is-ready {
  border-color: #4f8f73;
  background: #203a32;
  color: #9ce3bf;
}

body.dark-theme .connected-shell .form-control,
body.dark-theme .connected-shell .custom-select,
body.dark-theme .connected-shell .retry-minutes-select,
body.dark-theme .connected-shell .retry-minutes-input {
  border-color: #4d6b84;
  background: #1f374d;
  color: #eaf4ff;
}

body.dark-theme .connected-shell .form-control:hover,
body.dark-theme .connected-shell .custom-select:hover {
  border-color: #5f8aad;
}

body.dark-theme .connected-shell .form-control:focus,
body.dark-theme .connected-shell .custom-select:focus {
  border-color: #52a0d3;
  box-shadow: 0 0 0 0.22rem rgba(58, 134, 183, 0.22);
}

body.dark-theme .connected-shell .btn-accent {
  color: #162738;
  background: linear-gradient(118deg, #ff8755 0%, #ffac3e 48%, #ffd468 100%);
  box-shadow: 0 12px 24px rgba(255, 143, 66, 0.25);
}

body.dark-theme .connected-shell .btn-soft {
  border-color: #4a6680;
  background: linear-gradient(150deg, #273f56, #23384d);
  color: #e5f2ff;
}

body.dark-theme .connected-shell .btn-soft:hover,
body.dark-theme .connected-shell .btn-soft:focus {
  border-color: #5b7c99;
  background: linear-gradient(150deg, #2d4962, #294157);
}

body.dark-theme .connected-shell .command-item {
  border-color: #365270;
  background: linear-gradient(160deg, #1d3347, #213a51);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.26);
}

body.dark-theme .connected-shell .command-text {
  color: #edf5ff;
}

body.dark-theme .connected-shell .command-id {
  color: #93bbdc;
}

body.dark-theme .connected-shell .device-table-wrap {
  border-color: #365576;
  background: #182a3a;
}

body.dark-theme .connected-shell .mini-table thead th,
body.dark-theme .connected-shell .device-table thead th {
  border-bottom-color: #415e7a;
  color: #edf7ff;
  background: linear-gradient(180deg, #244057, #20364a);
}

body.dark-theme .connected-shell .mini-table td,
body.dark-theme .connected-shell .mini-table th,
body.dark-theme .connected-shell .device-table td,
body.dark-theme .connected-shell .device-table th {
  border-color: #334b62;
  color: #e8f2ff;
}

body.dark-theme .connected-shell .device-table tbody tr:hover {
  background: rgba(75, 113, 145, 0.2);
}

body.dark-theme .connected-shell .badge-online {
  background: rgba(26, 187, 137, 0.2);
  color: #80e1bf;
}

body.dark-theme .connected-shell .badge-offline {
  background: rgba(219, 97, 106, 0.2);
  color: #ff9ba4;
}

body.dark-theme .connected-shell .status-pass {
  color: #63d8a7;
}

body.dark-theme .connected-shell .status-fail {
  color: #ff8e9a;
}

body.dark-theme .connected-shell .status-pending {
  color: #f2be62;
}

body.dark-theme .connected-shell .status-offline {
  color: #ff7f93;
}

@keyframes connected-float {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.95;
  }

  50% {
    transform: translateY(8px);
    opacity: 0.75;
  }
}

@media (max-width: 1260px) {
  .connected-shell .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .connected-shell .panel-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 991px) {
  .connected-shell {
    gap: 0.95rem;
  }

  .connected-shell .dashboard-hero {
    border-radius: 20px;
    padding: 1.1rem 1rem 0.95rem;
  }

  .connected-shell .dashboard-panel {
    border-radius: 16px;
    padding: 0.72rem;
  }

  .connected-shell .command-form {
    padding: 0.76rem;
  }

  .connected-shell .command-form-grid {
    grid-template-columns: 1fr;
    gap: 0.72rem;
  }

  .connected-shell .dispatch-flow {
    grid-template-columns: 1fr;
    gap: 0.34rem;
  }

  .connected-shell .devices-table-wrap {
    max-height: 48vh;
  }

  .connected-shell .history-panel .history-list {
    max-height: 48vh;
  }
}

@media (max-width: 767px) {
  .connected-shell .hero-stats {
    grid-template-columns: 1fr;
  }

  .connected-shell .device-filter-grid {
    grid-template-columns: 1fr;
    gap: 0.56rem;
  }

  .connected-shell .device-type-filter-menu {
    position: static;
    margin-top: 0.4rem;
  }

  .connected-shell .hero-topline {
    gap: 0.6rem;
  }

  .connected-shell .action-row .btn {
    width: 100%;
  }

  .connected-shell .devices-panel .d-flex {
    gap: 0.6rem;
  }

  .connected-shell .command-main-field textarea.form-control {
    min-height: 132px;
  }

  .connected-shell .retry-controls {
    justify-content: flex-start;
  }

  .connected-shell .retry-minutes-select,
  .connected-shell .retry-minutes-input {
    width: 100%;
    max-width: 240px;
  }
}
