:root {
  --console-bg-1: #edf6ff;
  --console-bg-2: #f7fffb;
  --console-panel: rgba(255, 255, 255, 0.92);
  --console-panel-strong: #ffffff;
  --console-line: rgba(132, 170, 200, 0.26);
  --console-line-strong: rgba(77, 126, 167, 0.22);
  --console-text: #12344c;
  --console-muted: #5f7890;
  --console-title: #0d2e46;
  --console-brand-1: #0a8fd1;
  --console-brand-2: #00b38a;
  --console-brand-3: #ff8a3d;
  --console-good: #1f8f5c;
  --console-bad: #d45161;
  --console-warn: #d3861b;
  --console-shadow: 0 12px 30px rgba(12, 66, 104, 0.09);
  --console-shadow-soft: 0 6px 18px rgba(20, 82, 120, 0.06);
}

body {
  background:
    radial-gradient(circle at 8% 6%, rgba(26, 145, 215, 0.12) 0%, rgba(26, 145, 215, 0) 28%),
    radial-gradient(circle at 92% 10%, rgba(0, 179, 138, 0.11) 0%, rgba(0, 179, 138, 0) 26%),
    linear-gradient(135deg, var(--console-bg-1), var(--console-bg-2));
  color: var(--console-text);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: -1;
  filter: blur(12px);
  opacity: 0.65;
}

body::before {
  width: 320px;
  height: 320px;
  top: -100px;
  inset-inline-start: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(52, 158, 255, 0.18) 0%, rgba(52, 158, 255, 0) 70%);
}

body::after {
  width: 340px;
  height: 340px;
  top: 80px;
  inset-inline-end: -140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 201, 154, 0.18) 0%, rgba(0, 201, 154, 0) 72%);
}

.dashboard-nav {
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(165, 196, 220, 0.36);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px rgba(12, 63, 98, 0.08);
}

.nav-links .nav-link {
  border: 1px solid transparent;
}

.nav-links .nav-link:hover,
.nav-links .nav-link:focus {
  border-color: rgba(10, 143, 209, 0.16);
  box-shadow: 0 10px 18px rgba(15, 86, 126, 0.08);
}

.main-content-shell {
  padding-inline: 0;
}

.footer-shell {
  margin-top: 1rem;
  border-top: 1px solid rgba(165, 196, 220, 0.28);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
}

.page-shell {
  width: 100%;
  margin-inline: 0;
  padding-inline: 0;
  gap: 0.72rem;
}

.page-head,
.dashboard-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(169, 203, 227, 0.28);
  border-radius: 18px;
  background:
    radial-gradient(circle at 10% -20%, rgba(255, 196, 98, 0.28), rgba(255, 196, 98, 0) 42%),
    linear-gradient(135deg, rgba(12, 53, 95, 0.96), rgba(7, 133, 188, 0.94) 55%, rgba(0, 178, 144, 0.92));
  color: #f5fbff;
  box-shadow: 0 14px 32px rgba(7, 61, 98, 0.1);
}

.page-head {
  padding: clamp(0.8rem, 1.4vw, 1rem);
  margin-bottom: 0.72rem;
}

.dashboard-hero {
  padding: clamp(0.82rem, 1.4vw, 1rem);
}

.hero-topline,
.page-head {
  gap: 0.6rem;
}

.hero-title-ar,
.page-title {
  color: #ffffff;
}

.hero-title-en,
.page-subtitle,
.page-note {
  color: rgba(236, 246, 255, 0.92);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 0.55rem;
}

.stat-chip {
  min-height: 84px;
  padding: 0.64rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 18px rgba(5, 31, 51, 0.09);
}

.stat-chip .stat-label {
  font-size: 0.68rem;
  margin-bottom: 0.08rem;
}

.stat-chip .stat-value {
  font-size: 0.9rem;
  line-height: 1.15;
}

.stat-chip .stat-label,
.stat-chip .stat-value {
  color: #f7fcff;
}

.dashboard-panel,
.content-card {
  border: 1px solid var(--console-line);
  border-radius: 16px;
  background: var(--console-panel);
  backdrop-filter: blur(12px);
  box-shadow: var(--console-shadow);
  padding: 0.78rem;
}

.content-card.soft {
  background: rgba(250, 253, 255, 0.88);
}

.panel-title,
.field-label,
.device-filter-label {
  color: var(--console-title);
}

.panel-subtitle,
.text-muted {
  color: var(--console-muted) !important;
}

.form-control {
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(137, 177, 204, 0.34);
  background: rgba(255, 255, 255, 0.88);
  color: var(--console-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  padding: 0.42rem 0.68rem;
  font-size: 0.9rem;
}

.form-control:focus {
  border-color: rgba(12, 143, 205, 0.42);
  box-shadow: 0 0 0 0.2rem rgba(10, 143, 209, 0.12);
}

.btn {
  border-radius: 999px;
  font-weight: 700;
  padding: 0.42rem 0.86rem;
  font-size: 0.86rem;
}

.btn-accent {
  color: #fff;
  border: none;
  background: linear-gradient(135deg, var(--console-brand-3), #ffb34a);
  box-shadow: 0 14px 26px rgba(255, 138, 61, 0.24);
}

.btn-soft {
  color: var(--console-title);
  border: 1px solid rgba(149, 186, 212, 0.36);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(240, 248, 255, 0.88));
}

.btn-accent:hover,
.btn-accent:focus,
.btn-soft:hover,
.btn-soft:focus {
  transform: translateY(-1px);
}

.devices-browser-shell {
  display: grid;
  gap: 0.68rem;
}

.devices-browser-note {
  padding: 0.72rem 0.82rem;
  border-radius: 14px;
  border: 1px solid rgba(159, 198, 224, 0.3);
  background: linear-gradient(135deg, rgba(247, 251, 255, 0.95), rgba(236, 247, 255, 0.85));
  color: var(--console-muted);
  font-size: 0.82rem;
}

.device-browser-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.6rem;
}

.device-browser-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 0.7rem;
  width: 100%;
  min-width: 0;
  max-width: none;
  padding: 0.58rem 0.72rem;
  border-radius: 16px;
  border: 1px solid rgba(154, 194, 220, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 255, 0.94));
  box-shadow: var(--console-shadow-soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.device-browser-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(18, 80, 117, 0.12);
}

.device-browser-card.is-selected {
  border-color: rgba(255, 138, 61, 0.55);
  box-shadow: 0 18px 42px rgba(255, 138, 61, 0.18);
}

.device-browser-card.is-online {
  background:
    radial-gradient(circle at top left, rgba(24, 132, 87, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 252, 247, 0.92));
}

.device-browser-card.is-offline {
  background:
    radial-gradient(circle at top left, rgba(212, 81, 97, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 248, 0.92));
}

.device-browser-card-head,
.device-browser-check,
.redis-record-head,
.redis-tag-list,
.redis-key-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  justify-content: space-between;
  flex-wrap: wrap;
}

.device-browser-card-head {
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding-inline-end: 0.32rem;
  border-inline-end: 1px solid rgba(154, 194, 220, 0.24);
}

.device-browser-card-body {
  display: grid;
  grid-template-columns: minmax(92px, 112px) minmax(156px, 190px) minmax(138px, 170px) minmax(0, 1fr);
  align-items: stretch;
  gap: 0.42rem;
  min-width: 0;
}

.device-browser-check {
  justify-content: center;
  margin: 0;
  min-height: 100%;
  width: 100%;
}

.device-browser-check input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  cursor: pointer;
  accent-color: var(--console-brand-3);
}

.device-browser-field,
.redis-fact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  padding: 0.42rem 0.54rem;
  border-radius: 12px;
  border: 1px solid var(--console-line);
  background: rgba(248, 252, 255, 0.92);
}

.device-browser-card.is-selected .device-browser-field {
  border-color: rgba(255, 138, 61, 0.22);
}

.device-browser-field-status {
  background: rgba(250, 252, 255, 0.88);
}

.device-browser-field-response {
  background: rgba(246, 251, 255, 0.9);
}

.device-browser-field-label,
.redis-fact-label,
.redis-preview-label {
  display: block;
  margin-bottom: 0.14rem;
  color: var(--console-muted);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.device-browser-field strong,
.redis-fact-value {
  display: block;
  color: var(--console-title);
  font-weight: 700;
  min-width: 0;
  font-size: 0.76rem;
}

.device-browser-field-status .badge-state {
  align-self: flex-start;
}

.device-browser-imei {
  font-family: "Consolas", "Montserrat", monospace;
  font-size: 0.92rem;
  color: var(--console-title);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.device-browser-type {
  color: var(--console-text);
  text-align: start;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.device-browser-response-value {
  color: var(--console-title);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.device-browser-meta-row,
.redis-facts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
  width: auto;
}

.device-browser-footnote {
  color: var(--console-muted);
  font-size: 0.71rem;
  font-weight: 700;
}

.device-browser-empty,
.redis-empty-state {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--console-muted);
}

.device-browser-more {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0.65rem 0.8rem;
  border-radius: 14px;
  border: 1px dashed rgba(154, 194, 220, 0.45);
  background: rgba(248, 252, 255, 0.88);
}

.device-browser-more-note {
  color: var(--console-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.redis-explorer-panel {
  padding: 0.82rem;
}

.redis-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-bottom: 0.72rem;
}

.redis-toolbar-main {
  display: grid;
  grid-template-columns: minmax(280px, 1.6fr) minmax(190px, 0.8fr);
  gap: 0.9rem;
  flex: 1 1 720px;
}

.redis-tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.72rem;
}

.redis-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.54rem 0.78rem;
  border: 1px solid rgba(146, 185, 212, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--console-title);
  font-weight: 700;
  font-size: 0.84rem;
}

.redis-tab-btn.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--console-brand-1), var(--console-brand-2));
  box-shadow: 0 14px 26px rgba(8, 127, 183, 0.22);
}

.redis-tab-count,
.redis-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0.15rem 0.52rem;
  border-radius: 999px;
  border: 1px solid rgba(154, 191, 215, 0.32);
  background: rgba(244, 250, 255, 0.95);
  color: var(--console-title);
  font-size: 0.72rem;
  font-weight: 700;
}

.redis-tab-btn.is-active .redis-tab-count {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.redis-pill.subtle {
  background: rgba(248, 252, 255, 0.84);
}

.redis-generated-stamp {
  min-height: 42px;
}

.redis-section-host {
  min-height: 240px;
}

.redis-loading-state {
  min-height: 180px;
  display: grid;
  place-items: center;
  text-align: center;
}

.redis-section {
  display: grid;
  gap: 0.72rem;
}

.redis-section[hidden] {
  display: none !important;
}

.redis-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.redis-section-count {
  padding: 0.58rem 0.76rem;
  border-radius: 14px;
  border: 1px solid var(--console-line);
  background: rgba(247, 251, 255, 0.92);
  color: var(--console-muted);
}

.redis-record-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.72rem;
}

.redis-record-card {
  display: grid;
  gap: 0.68rem;
  padding: 0.78rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 188, 214, 0.3);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 255, 0.94));
  box-shadow: var(--console-shadow-soft);
}

.redis-record-title {
  color: var(--console-title);
  font-size: 0.9rem;
  font-weight: 800;
}

.redis-record-subtitle {
  color: var(--console-muted);
  margin-top: 0.18rem;
}

.redis-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}

.redis-status-badge.tone-success {
  background: rgba(31, 143, 92, 0.12);
  color: var(--console-good);
}

.redis-status-badge.tone-danger {
  background: rgba(212, 81, 97, 0.12);
  color: var(--console-bad);
}

.redis-status-badge.tone-warning {
  background: rgba(211, 134, 27, 0.13);
  color: var(--console-warn);
}

.redis-status-badge.tone-info,
.redis-status-badge.tone-neutral {
  background: rgba(10, 143, 209, 0.1);
  color: var(--console-brand-1);
}

.redis-preview-box,
.redis-details {
  border: 1px solid var(--console-line);
  border-radius: 18px;
  background: rgba(249, 252, 255, 0.94);
}

.redis-preview-box {
  padding: 0.85rem;
}

.redis-details summary {
  cursor: pointer;
  padding: 0.85rem;
  color: var(--console-title);
  font-weight: 800;
}

.redis-raw-text,
.redis-preview-text {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--console-text);
  font-family: "Consolas", "Montserrat", monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.redis-raw-text {
  padding: 0 0.85rem 0.85rem;
}

.connected-shell {
  gap: 0.62rem;
}

.connected-shell .dashboard-hero {
  border-radius: 18px;
  padding: 0.9rem 0.95rem 0.82rem;
  box-shadow: 0 14px 28px rgba(8, 49, 97, 0.18);
}

.connected-shell .hero-title-ar {
  font-size: clamp(1rem, 0.9vw + 0.72rem, 1.35rem);
}

.connected-shell .hero-title-en {
  margin-top: 0.08rem;
  font-size: 0.68rem;
  letter-spacing: 0.07em;
}

.connected-shell .dashboard-hero .note-box {
  padding: 0.38rem 0.55rem;
}

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

.connected-shell .stat-chip {
  min-height: 76px;
  padding: 0.52rem 0.58rem;
}

.connected-shell .stat-label {
  font-size: 0.66rem;
  margin-bottom: 0.05rem;
}

.connected-shell .stat-value {
  font-size: 0.84rem;
}

.connected-shell .panel-grid {
  grid-template-columns: minmax(280px, 460px) minmax(0, 1fr);
  gap: 0.68rem;
}

.connected-shell .dashboard-panel {
  border-radius: 16px;
  padding: 0.6rem;
  box-shadow: 0 10px 22px rgba(15, 78, 114, 0.08);
}

.connected-shell .panel-title {
  font-size: 0.88rem;
  margin-bottom: 0.3rem;
}

.connected-shell .panel-subtitle {
  margin-bottom: 0.42rem;
  font-size: 0.74rem;
  line-height: 1.3;
}

.connected-shell .command-form {
  gap: 0.54rem;
  padding: 0.55rem;
  border-radius: 12px;
}

.connected-shell .command-form-grid {
  grid-template-columns: minmax(0, 1.12fr) minmax(220px, 0.88fr);
  gap: 0.55rem;
}

.connected-shell .command-settings-grid {
  gap: 0.42rem;
}

.connected-shell .command-main-field textarea.form-control {
  min-height: 102px;
  padding: 0.55rem 0.65rem;
  line-height: 1.45;
  font-size: 0.86rem;
}

.connected-shell .compact-field .form-control,
.connected-shell .compact-field .custom-select,
.connected-shell .device-type-filter-toggle {
  min-height: 40px;
}

.connected-shell .command-actions {
  gap: 0.42rem;
}

.connected-shell .command-actions .btn {
  min-height: 40px;
  padding: 0.34rem 0.72rem;
}

.connected-shell .device-filter-grid {
  grid-template-columns: minmax(220px, 1.35fr) minmax(200px, 1fr);
  gap: 0.52rem;
  margin-bottom: 0.5rem;
}

.connected-shell .device-filter-field {
  gap: 0.16rem;
}

.connected-shell .device-filter-label {
  font-size: 0.72rem;
}

.connected-shell .device-type-filter-toggle {
  gap: 0.5rem;
}

.connected-shell .device-type-filter-menu {
  top: calc(100% + 0.25rem);
  border-radius: 12px;
  padding: 0.42rem;
}

.connected-shell .device-type-filter-actions {
  gap: 0.35rem;
  padding-bottom: 0.3rem;
  margin-bottom: 0.3rem;
}

.connected-shell .device-type-filter-option {
  min-height: 34px;
  padding: 0.28rem 0.42rem;
  font-size: 0.82rem;
}

.connected-shell #commandMessage {
  padding: 0.36rem 0.55rem;
  margin-bottom: 0.45rem !important;
}

.connected-shell .dispatch-flow {
  gap: 0.28rem;
  margin-bottom: 0.28rem;
}

.connected-shell .flow-step {
  min-height: 34px;
  padding: 0.22rem 0.4rem;
  border-radius: 10px;
  font-size: 0.68rem;
}

.connected-shell .history-panel .history-list {
  display: grid;
  gap: 0.72rem;
  align-content: start;
  max-height: min(50vh, 560px);
}

.connected-shell .command-item {
  display: grid;
  gap: 0.62rem;
  padding: 0.74rem;
  border-radius: 14px;
  border-color: rgba(161, 198, 222, 0.34);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 251, 255, 0.95));
  box-shadow: 0 8px 18px rgba(17, 90, 134, 0.08);
}

.connected-shell .command-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.connected-shell .command-item-title {
  display: grid;
  gap: 0.3rem;
  flex: 1 1 320px;
  min-width: 0;
}

.connected-shell .command-id-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.connected-shell .command-flag {
  padding: 0.2rem 0.46rem;
  border-radius: 999px;
  border: 1px solid rgba(160, 198, 222, 0.44);
  background: rgba(244, 249, 255, 0.92);
  color: var(--console-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.connected-shell .command-text {
  display: block;
  padding: 0.52rem 0.62rem;
  border-radius: 12px;
  border: 1px solid rgba(171, 205, 226, 0.32);
  background: rgba(248, 252, 255, 0.92);
  color: var(--console-title);
  font-family: "Consolas", "Montserrat", monospace;
  font-size: 0.81rem;
  line-height: 1.5;
  white-space: normal;
  word-break: break-word;
}

.connected-shell .command-item-time {
  display: grid;
  gap: 0.14rem;
  min-width: 170px;
  padding: 0.48rem 0.58rem;
  border-radius: 12px;
  border: 1px solid rgba(164, 201, 223, 0.34);
  background: rgba(246, 251, 255, 0.92);
}

.connected-shell .command-item-time-label,
.connected-shell .command-stat-label {
  color: var(--console-muted);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
}

.connected-shell .command-item-time strong {
  color: var(--console-title);
  font-size: 0.77rem;
  font-weight: 800;
}

.connected-shell .command-item-summary {
  display: grid;
  gap: 0.52rem;
}

.connected-shell .command-item-hint {
  margin: 0;
  line-height: 1.45;
}

.connected-shell .command-batch-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.42rem;
}

.connected-shell .command-stat-pill {
  display: grid;
  gap: 0.14rem;
  min-width: 0;
  padding: 0.46rem 0.54rem;
  border-radius: 12px;
  border: 1px solid var(--console-line);
  background: rgba(248, 252, 255, 0.92);
}

.connected-shell .command-stat-pill.tone-info {
  background: rgba(241, 248, 255, 0.96);
}

.connected-shell .command-stat-pill.tone-warning {
  background: rgba(255, 249, 237, 0.96);
}

.connected-shell .command-stat-pill.tone-success {
  background: rgba(240, 251, 246, 0.96);
}

.connected-shell .command-stat-pill.tone-danger {
  background: rgba(255, 244, 246, 0.96);
}

.connected-shell .command-stat-value {
  color: var(--console-title);
  font-size: 0.9rem;
  font-weight: 800;
}

.connected-shell .command-item-table-wrap {
  border: 1px solid rgba(167, 201, 222, 0.3);
  border-radius: 14px;
  overflow: auto;
  background: rgba(255, 255, 255, 0.96);
}

.connected-shell .mini-table {
  margin-top: 0;
  margin-bottom: 0;
  min-width: 780px;
}

.connected-shell .mini-table tbody tr:nth-child(even) {
  background: rgba(244, 249, 255, 0.72);
}

.connected-shell .mini-table tbody tr:hover {
  background: rgba(234, 244, 255, 0.92);
}

.connected-shell .mini-table td,
.connected-shell .mini-table th {
  vertical-align: middle;
}

.connected-shell .mini-table td:nth-child(1) {
  min-width: 190px;
}

.connected-shell .mini-table td:nth-child(4) {
  min-width: 220px;
  max-width: 340px;
  white-space: normal;
  word-break: break-word;
}

.connected-shell .mini-table td:nth-child(6) {
  min-width: 220px;
  max-width: 320px;
  white-space: normal;
  word-break: break-word;
}

.connected-shell .mini-table td:last-child {
  min-width: 210px;
}

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

.connected-shell .retry-controls .btn {
  white-space: nowrap;
}

.ltr-auto {
  direction: ltr;
  unicode-bidi: plaintext;
}

body.dark-theme .dashboard-panel,
body.dark-theme .content-card,
body.dark-theme .device-browser-card,
body.dark-theme .redis-record-card,
body.dark-theme .redis-section-count,
body.dark-theme .device-browser-field,
body.dark-theme .device-browser-mini-pill,
body.dark-theme .device-browser-response,
body.dark-theme .redis-fact,
body.dark-theme .redis-preview-box,
body.dark-theme .redis-details,
body.dark-theme .devices-browser-note {
  background: rgba(17, 31, 45, 0.86);
  border-color: rgba(109, 144, 171, 0.22);
  color: #e5f2ff;
}

body.dark-theme .device-browser-type,
body.dark-theme .device-browser-field-label,
body.dark-theme .command-item-time-label,
body.dark-theme .command-stat-label,
body.dark-theme .redis-record-subtitle,
body.dark-theme .device-browser-mini-pill span,
body.dark-theme .device-browser-response-label,
body.dark-theme .device-browser-footnote,
body.dark-theme .redis-fact-label,
body.dark-theme .devices-browser-note,
body.dark-theme .panel-subtitle {
  color: rgba(214, 231, 247, 0.7) !important;
}

body.dark-theme .device-browser-imei,
body.dark-theme .device-browser-response-value,
body.dark-theme .device-browser-field strong,
body.dark-theme .command-stat-value,
body.dark-theme .command-item-time strong,
body.dark-theme .redis-fact-value {
  color: #edf6ff;
}

body.dark-theme .connected-shell .command-flag,
body.dark-theme .connected-shell .command-text,
body.dark-theme .connected-shell .command-item-time,
body.dark-theme .connected-shell .command-stat-pill,
body.dark-theme .connected-shell .command-item-table-wrap {
  background: rgba(19, 36, 52, 0.9);
  border-color: rgba(97, 133, 160, 0.3);
}

body.dark-theme .connected-shell .mini-table tbody tr:nth-child(even) {
  background: rgba(46, 70, 94, 0.26);
}

body.dark-theme .connected-shell .mini-table tbody tr:hover {
  background: rgba(66, 99, 126, 0.28);
}

body.dark-theme .device-browser-card-head {
  border-color: rgba(109, 144, 171, 0.22);
}

body.dark-theme .device-browser-more {
  background: rgba(17, 31, 45, 0.78);
  border-color: rgba(109, 144, 171, 0.28);
}

body.dark-theme .device-browser-more-note {
  color: rgba(214, 231, 247, 0.74);
}

body.dark-theme .redis-pill,
body.dark-theme .redis-tab-btn,
body.dark-theme .form-control {
  background: rgba(18, 35, 52, 0.9);
  color: #eaf5ff;
}

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

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

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

  .device-browser-card-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .connected-shell .command-batch-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .device-browser-field-response {
    grid-column: 1 / -1;
  }
}

@media (max-width: 992px) {
  .panel-grid {
    grid-template-columns: 1fr;
  }

  .redis-toolbar-main {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .connected-shell .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .device-browser-card-body {
    grid-template-columns: 1fr 1fr;
  }

  .connected-shell .command-item-time {
    min-width: 100%;
  }

  .connected-shell .command-batch-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .page-shell {
    width: 100%;
  }

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

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

  .connected-shell .dashboard-panel,
  .connected-shell .dashboard-hero {
    padding: 0.58rem;
  }

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

  .connected-shell .command-actions .btn {
    width: 100%;
  }

  .device-browser-grid,
  .redis-record-grid,
  .hero-stats {
    grid-template-columns: 1fr;
  }

  .device-browser-meta-row,
  .redis-facts-grid {
    grid-template-columns: 1fr;
  }

  .device-browser-card {
    grid-template-columns: 1fr;
  }

  .device-browser-card-head {
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    padding-inline-end: 0;
    padding-block-end: 0.35rem;
    border-inline-end: 0;
    border-bottom: 1px solid rgba(154, 194, 220, 0.24);
  }

  .device-browser-card-body {
    grid-template-columns: 1fr;
  }

  .connected-shell .command-item {
    padding: 0.64rem;
  }

  .connected-shell .command-item-head {
    gap: 0.48rem;
  }

  .connected-shell .command-batch-stats {
    grid-template-columns: 1fr;
  }

  .connected-shell .command-item-table-wrap {
    border-radius: 12px;
  }

  .connected-shell .mini-table {
    min-width: 700px;
  }

  .device-browser-field-response {
    grid-column: auto;
  }

  .redis-tablist {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 540px) {
  .redis-tablist {
    grid-template-columns: 1fr;
  }
}
