/* Classic Windows Desktop Utility Theme - Clean, Functional, No AI Gradients */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 13px;
  color: #1a1a1a;
  background-color: #f0f0f0;
  overflow: hidden;
}

.app-shell {
  display: flex;
  height: calc(100vh - 24px);
  width: 100%;
}

/* ==================== LEFT SIDEBAR ==================== */
.sidebar {
  width: 200px;
  min-width: 200px;
  background-color: #e6e6e6;
  border-right: 1px solid #bdbdbd;
  display: flex;
  flex-direction: column;
  user-select: none;
}

.sidebar-header {
  padding: 10px 10px;
  background-color: #dcdcdc;
  border-bottom: 1px solid #bdbdbd;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.sidebar-brand {
  min-width: 0;
}

.ipv6-toggle-btn {
  padding: 3px 7px;
  font-size: 10.5px;
  font-weight: 700;
  font-family: Consolas, "Courier New", monospace;
  border: 1px solid #8c8c8c;
  background-color: #f3f3f3;
  color: #444444;
  border-radius: 2px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.ipv6-toggle-btn:hover {
  background-color: #e4eef7;
  border-color: #0078d7;
}

.ipv6-toggle-btn.is-on {
  background-color: #16a34a;
  border-color: #15803d;
  color: #ffffff;
}

.app-title {
  font-size: 14px;
  font-weight: 700;
  color: #111111;
}

.app-subtitle {
  font-size: 11px;
  color: #555555;
  margin-top: 2px;
}

.sidebar-nav {
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 0 0 auto;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid transparent;
  background: transparent;
  color: #222222;
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  border-radius: 2px;
}

.nav-btn:hover {
  background-color: #d8e8f6;
  border-color: #99c5ea;
}

.nav-btn.active {
  background-color: #ffffff;
  border-color: #0078d7;
  font-weight: 600;
  color: #000000;
}

.nav-icon {
  flex-shrink: 0;
  color: #333333;
}

.nav-btn.active .nav-icon {
  color: #0078d7;
}

.nav-badge {
  margin-left: auto;
  background-color: #c42b1c;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 2px;
}

.nav-badge.hidden {
  display: none;
}

.nav-badge.badge-green {
  background-color: #1e7e34;
}

.source-select {
  height: 22px;
  font-size: 12px;
  font-weight: 600;
  max-width: 240px;
}

.agent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.sidebar-footer {
  padding: 8px 10px;
  border-top: 1px solid #c8c8c8;
  font-size: 11px;
  color: #555555;
  line-height: 1.4;
}

/* ==================== MAIN CONTENT ==================== */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 6px 10px 8px 10px;
  gap: 6px;
  overflow: hidden;
  background-color: #f0f0f0;
  user-select: text;
  -webkit-user-select: text;
}

/* Persistent Source Network Reference Bar */
.mynet-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  background-color: #e9f2fb;
  border: 1px solid #a6c4e0;
  padding: 4px 8px;
  font-size: 12px;
  color: #1a1a1a;
  flex-shrink: 0;
}

.mynet-label {
  font-weight: 700;
  color: #1f4e79;
}

.mynet-isp-badge {
  background-color: #0078d7;
  color: #ffffff;
  font-weight: 700;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 1px;
}

.mynet-item {
  white-space: nowrap;
}

.mynet-sep {
  color: #9cb6cf;
}

.mynet-refresh {
  margin-left: auto !important;
}

.tab-panel {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 8px;
  overflow: hidden;
}

.tab-panel.active {
  display: flex;
}

/* ==================== TOOLBAR / INPUTS ==================== */
.toolbar-box {
  background-color: #f7f7f7;
  border: 1px solid #c6c6c6;
  padding: 7px 10px;
}

.form-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.form-row label {
  font-weight: 600;
  color: #222222;
  white-space: nowrap;
}

input[type="text"],
input[type="number"] {
  height: 26px;
  padding: 2px 6px;
  border: 1px solid #abadb3;
  background-color: #ffffff;
  color: #000000;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  border-radius: 1px;
}

input[type="text"]:focus,
input[type="number"]:focus {
  outline: none;
  border-color: #0078d7;
}

.input-ip {
  width: 220px;
}

.input-port {
  width: 72px;
}

.input-small {
  width: 64px;
}

.input-ports-list {
  width: 175px;
}

.preset-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px solid #e0e0e0;
}

.preset-label {
  font-size: 11.5px;
  color: #555555;
  margin-right: 2px;
}

.cmp-summary-box {
  flex: 0 0 auto;
  max-height: 44%;
  display: flex;
  flex-direction: column;
}

.cell-ok {
  color: #1b5e20;
  font-weight: 700;
}

.cell-warn {
  color: #9c5700;
  font-weight: 600;
}

.cell-err {
  color: #c5221f;
  font-weight: 600;
}

.select-box {
  height: 26px;
  padding: 2px 6px;
  border: 1px solid #abadb3;
  background-color: #ffffff;
  color: #000000;
  font-family: inherit;
  font-size: 12.5px;
  border-radius: 1px;
}

.input-dns {
  width: 145px;
}

.dns-picker-box {
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px solid #dcdcdc;
}

.dns-picker-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 5px;
  font-size: 12px;
}

.dns-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 12px;
}

.dns-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  background-color: #ffffff;
  border: 1px solid #d4d4d4;
  padding: 3px 8px;
}

.dns-group-title {
  font-weight: 700;
  color: #1f4e79;
}

.dns-chk {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 400 !important;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  cursor: pointer;
}

.bl-extras-box {
  flex: 0 0 auto;
}

.dig-ans-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.subtab-bar {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hidden-pane {
  display: none !important;
}

.trace-hop-note {
  font-size: 11px;
  color: #555555;
  display: block;
}

/* Classic Windows SPF Tooltip */
.spf-hover-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
  cursor: help;
}

.spf-hint-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 600;
  color: #1f4e79;
  background-color: #e8f1fa;
  border: 1px solid #9bc0e6;
  border-radius: 1px;
  vertical-align: middle;
}

.spf-hint-badge.hidden {
  display: none;
}

.spf-explain-line {
  font-size: 11.5px;
  font-weight: 400;
  color: #333333;
  margin-top: 2px;
}

/* Global 1-Second Delay Classic Windows Floating Tooltip */
.classic-tooltip-float {
  position: fixed;
  z-index: 9999;
  min-width: 280px;
  max-width: 500px;
  background-color: #ffffe1;
  color: #111111;
  border: 1px solid #767676;
  padding: 7px 10px;
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.classic-tooltip-float.hidden {
  display: none;
}

.classic-tooltip-float ul {
  margin: 4px 0 0 0;
  padding-left: 16px;
}

.classic-tooltip-float li {
  margin-bottom: 2px;
}

.dig-ans-item {
  cursor: help;
  padding: 1px 2px;
}

.dig-ans-item:hover {
  background-color: #e8f1fa;
}

.ps-inline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Classic Windows Buttons */
.btn {
  height: 26px;
  padding: 0 12px;
  border: 1px solid #adadad;
  background-color: #e1e1e1;
  color: #000000;
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
  border-radius: 1px;
  white-space: nowrap;
}

.btn:hover:not(:disabled) {
  background-color: #e5f1fb;
  border-color: #0078d7;
}

.btn:active:not(:disabled) {
  background-color: #cce4f7;
}

.btn:disabled {
  color: #888888;
  background-color: #e9e9e9;
  border-color: #cccccc;
  cursor: not-allowed;
}

.btn-primary {
  background-color: #0078d7;
  border-color: #005a9e;
  color: #ffffff;
  font-weight: 600;
}

.btn-primary:hover:not(:disabled) {
  background-color: #0067b8;
  border-color: #004e8c;
  color: #ffffff;
}

.btn-danger {
  color: #a80000;
}

.btn-danger:hover:not(:disabled) {
  background-color: #fde7e9;
  border-color: #c42b1c;
}

.btn-mini {
  height: 20px;
  padding: 0 7px;
  margin-left: 6px;
  font-size: 11px;
  border: 1px solid #b5b5b5;
  background-color: #e8e8e8;
  color: #222222;
  cursor: pointer;
  border-radius: 1px;
}

.btn-mini:hover {
  background-color: #e5f1fb;
  border-color: #0078d7;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 400 !important;
  cursor: pointer;
  margin-left: 8px;
}

.proto-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 2px 8px;
  height: 26px;
  background-color: #ffffff;
  border: 1px solid #bdbdbd;
}

.radio-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 400 !important;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

input:disabled {
  background-color: #ebebeb;
  color: #888888;
  cursor: not-allowed;
}

/* ==================== GROUPBOX ==================== */
.groupbox {
  border: 1px solid #bdbdbd;
  background-color: #ffffff;
  margin: 0;
  padding: 6px 9px 8px 9px;
}

.groupbox legend {
  font-weight: 600;
  font-size: 12.5px;
  color: #1f4e79;
  padding: 0 5px;
  display: flex;
  align-items: center;
}

/* ==================== INFO & DEFAULT PORTS ==================== */
.info-grid {
  display: grid;
  grid-template-columns: 1.05fr 1.25fr;
  gap: 8px;
}

.kv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.kv-table td {
  padding: 3px 5px;
  vertical-align: top;
}

.kv-key {
  color: #555555;
  white-space: nowrap;
  width: 115px;
}

.kv-val {
  color: #111111;
  font-weight: 600;
  word-break: break-word;
}

.mono {
  font-family: Consolas, "Courier New", monospace;
}

.default-ports-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 3px;
}

.port-cell {
  border: 1px solid #cccccc;
  background-color: #f9f9f9;
  padding: 2px 3px;
  text-align: center;
  cursor: pointer;
  line-height: 1.15;
}

.port-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.port-dir {
  font-size: 8.5px;
  font-weight: 700;
  padding: 0 2px;
  display: inline-block;
  border-radius: 1px;
  letter-spacing: 0.2px;
}

.dir-web {
  background-color: #e3edf7;
  color: #1f4e79;
  border: 1px solid #b5cfe8;
}

.dir-out {
  background-color: #fff0db;
  color: #8a4b00;
  border: 1px solid #e0b97e;
}

.dir-in {
  background-color: #e4f3e8;
  color: #1b5e20;
  border: 1px solid #9ccca8;
}

.dir-etc {
  background-color: #f0e8f7;
  color: #5b2c6f;
  border: 1px solid #cbb2df;
}

.dir-sys {
  background-color: #eaeaea;
  color: #333333;
  border: 1px solid #bdbdbd;
}

.dir-strm {
  background-color: #fde8ef;
  color: #9c1a49;
  border: 1px solid #e6a8bf;
}

.dir-vpn {
  background-color: #e2f3f5;
  color: #0e5a6d;
  border: 1px solid #99cfd8;
}

.dir-mk {
  background-color: #fff3cd;
  color: #664d03;
  border: 1px solid #e0c46c;
}

.port-cell:hover {
  border-color: #0078d7;
  background-color: #eef6fc;
}

.port-num {
  font-family: Consolas, "Courier New", monospace;
  font-weight: 700;
  font-size: 11.5px;
}

.port-svc {
  font-size: 9.5px;
  color: #555555;
}

.port-state {
  margin-top: 1px;
  font-size: 10px;
  font-weight: 700;
  font-family: Consolas, "Courier New", monospace;
}

.port-cell.open {
  background-color: #e6f4ea;
  border-color: #2e7d32;
}
.port-cell.open .port-state { color: #1b5e20; }

.port-cell.refused {
  background-color: #fff4e5;
  border-color: #c77700;
}
.port-cell.refused .port-state { color: #9c5700; }

.port-cell.timeout,
.port-cell.error {
  background-color: #fce8e6;
  border-color: #c5221f;
}
.port-cell.timeout .port-state,
.port-cell.error .port-state { color: #a50e0e; }

/* ==================== CONSOLE OUTPUTS ==================== */
.output-split {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  min-height: 0;
}

.output-box {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.console-output {
  flex: 1;
  background-color: #0c0c0c;
  color: #dcdcdc;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12.5px;
  line-height: 1.45;
  padding: 8px 10px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid #888888;
}

.log-ok { color: #4ec968; }
.log-warn { color: #f0b849; }
.log-err { color: #f26b6b; }
.log-head { color: #6bb5ff; font-weight: 700; }
.log-muted { color: #9a9a9a; }

.mode-tag {
  margin-left: 8px;
  font-size: 11px;
  font-weight: 400;
  color: #444444;
  background-color: #eaeaea;
  border: 1px solid #c5c5c5;
  padding: 0 5px;
}

.mode-tag:empty {
  display: none;
}

/* ==================== SUMMARY & TABLES ==================== */
.summary-bar {
  background-color: #ffffff;
  border: 1px solid #bdbdbd;
  padding: 7px 10px;
  font-weight: 600;
  font-size: 13px;
}

.summary-bar.clean {
  background-color: #e6f4ea;
  border-color: #2e7d32;
  color: #1b5e20;
}

.summary-bar.listed {
  background-color: #fce8e6;
  border-color: #c5221f;
  color: #a50e0e;
}

.summary-bar.warn {
  background-color: #fff4e5;
  border-color: #c77700;
  color: #8a4b00;
}

.table-groupbox {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.table-scroll {
  flex: 1;
  overflow-y: auto;
  border: 1px solid #cccccc;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.data-table th {
  position: sticky;
  top: 0;
  background-color: #e8e8e8;
  border-bottom: 1px solid #b5b5b5;
  border-right: 1px solid #d4d4d4;
  padding: 5px 8px;
  text-align: left;
  font-weight: 600;
  color: #222222;
}

.data-table td {
  border-bottom: 1px solid #e5e5e5;
  border-right: 1px solid #efefef;
  padding: 4px 8px;
}

.data-table tbody tr:hover {
  background-color: #eef6fc;
}

.empty-cell {
  text-align: center;
  color: #777777;
  padding: 20px !important;
}

.badge-clean {
  color: #1b5e20;
  font-weight: 700;
}

.badge-listed {
  color: #ffffff;
  background-color: #c5221f;
  padding: 1px 6px;
  font-weight: 700;
  display: inline-block;
}

.badge-other {
  color: #8a4b00;
  font-weight: 600;
}

.badge-online {
  color: #1b5e20;
  font-weight: 700;
}

.badge-offline {
  color: #777777;
}

/* ==================== PROGRESS & FILTERS (SUBNET) ==================== */
.progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-track {
  flex: 1;
  height: 16px;
  background-color: #e6e6e6;
  border: 1px solid #a8a8a8;
}

.progress-fill {
  height: 100%;
  background-color: #06b025;
  transition: width 0.12s linear;
}

.progress-text {
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  min-width: 70px;
  text-align: right;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-filter {
  height: 25px;
  padding: 0 10px;
  border: 1px solid #b5b5b5;
  background-color: #e4e4e4;
  color: #222222;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}

.btn-filter.active {
  background-color: #ffffff;
  border-color: #0078d7;
  font-weight: 600;
  color: #005a9e;
}

.filter-hint {
  margin-left: auto;
  font-size: 11.5px;
  color: #666666;
}

/* ==================== STATUS BAR ==================== */
.statusbar {
  height: 24px;
  background-color: #e6e6e6;
  border-top: 1px solid #bdbdbd;
  display: flex;
  align-items: center;
  font-size: 11.5px;
  color: #333333;
  user-select: none;
}

.status-cell {
  padding: 0 10px;
  border-right: 1px solid #c5c5c5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-cell:last-child {
  border-right: none;
}

.status-grow {
  flex: 1;
}

@media (max-width: 960px) {
  .info-grid,
  .output-split {
    grid-template-columns: 1fr;
  }
  .default-ports-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==================== VIRTUAL OFFICE LOGIN OVERLAY & RBAC ==================== */
.admin-hidden {
  display: none !important;
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: radial-gradient(circle at top, #eefaf0 0%, #d3efd8 52%, #bfe5c8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.login-overlay.hidden {
  display: none;
}

.login-card {
  width: 580px;
  max-width: 96vw;
  background-color: #f8fcf9;
  border: 2px solid #81c784;
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(46, 125, 50, 0.18);
  overflow: hidden;
}

.pixel-office-frame {
  background-color: #161d31;
  border-bottom: 2px solid #38bdf8;
  line-height: 0;
}

.pixel-office-frame svg {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.login-form-box {
  padding: 12px 14px 14px 14px;
  background-color: #f0f0f0;
}

.login-form-title {
  font-weight: 700;
  font-size: 13px;
  color: #1f4e79;
  margin-bottom: 8px;
}

.login-fields-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.login-field {
  flex: 1;
  min-width: 150px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.login-field label {
  font-size: 12px;
  font-weight: 600;
  color: #222222;
}

.login-field input {
  width: 100%;
  height: 28px;
  padding: 3px 8px;
  border: 1px solid #8c8c8c;
  background-color: #ffffff;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
}

.login-field input:focus {
  outline: none;
  border-color: #0078d7;
}

.login-submit-btn {
  height: 28px;
  padding: 0 18px;
}

.login-error {
  margin-top: 8px;
  padding: 5px 8px;
  background-color: #fce8e6;
  border: 1px solid #c5221f;
  color: #a50e0e;
  font-size: 12px;
  font-weight: 600;
}

.login-error.hidden {
  display: none;
}

.sidebar-user-box {
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid #c8c8c8;
}

.sidebar-user-row {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #111111;
  margin-bottom: 4px;
}

.user-dot {
  color: #16a34a;
  font-size: 11px;
}

.role-pill {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 2px;
  background-color: #dbeafe;
  color: #1e40af;
  text-transform: uppercase;
}

.role-pill.is-admin {
  background-color: #fef3c7;
  color: #92400e;
}

.btn-logout {
  width: 100%;
  margin-left: 0 !important;
  height: 22px;
}

/* ==================== USER ACTIVITY LOG PANEL ==================== */
.usr-users-box {
  flex: 0 0 auto;
  max-height: 220px;
}

.usr-logs-box {
  flex: 1;
  min-height: 220px;
}

.usr-log-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.usr-log-toolbar label {
  font-weight: 600;
  color: #222222;
}

.log-action-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid #cbd5e1;
  background-color: #f1f5f9;
  color: #334155;
  white-space: nowrap;
}

.log-action-badge.log-act-login {
  background-color: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.log-action-badge.log-act-fail {
  background-color: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}

.log-action-badge.log-act-test {
  background-color: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
}

/* ==================== DNS DIG CMD TERMINAL VIEW ==================== */
.dig-view-btn.active {
  background-color: #0078d7;
  border-color: #005a9e;
  color: #ffffff;
  font-weight: 700;
}

.dig-cmd-terminal {
  flex: 1;
  min-height: 180px;
  margin: 0;
  padding: 10px 12px;
  background-color: #0c0c0c;
  color: #d4d4d4;
  border: 1px solid #404040;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.45;
  overflow: auto;
  white-space: pre;
  user-select: text;
  -webkit-user-select: text;
}

/* ==================== MINI SIDEBAR VIRTUAL OFFICE (200px) ==================== */
.sidebar-office-wrap {
  flex: 1;
  min-height: 115px;
  margin: 2px 6px 6px 6px;
  border: 2px solid #233044;
  background-color: #8b5a2b;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 2px;
  cursor: pointer;
}

.mini-office-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  background-color: #141e30;
  color: #f8fafc;
  border-bottom: 2px solid #2b3d59;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.mini-office-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-office-cnt {
  margin-left: auto;
  background-color: #16a34a;
  color: #ffffff;
  font-size: 10px;
  padding: 0 5px;
  border-radius: 2px;
}

.mini-office-expand {
  background-color: #29384d;
  color: #e2e8f0;
  border: 1px solid #475569;
  font-size: 11px;
  line-height: 1;
  padding: 2px 4px;
  cursor: pointer;
}

.mini-office-expand:hover {
  background-color: #3b82f6;
  color: #ffffff;
}

.mini-office-grid {
  flex: 1;
  padding: 7px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  align-content: start;
  background:
    radial-gradient(circle at 50% 45%, rgba(254, 243, 199, 0.14) 0%, rgba(120, 53, 15, 0) 70%),
    repeating-linear-gradient(
      90deg,
      rgba(90, 56, 24, 0.22) 0px,
      rgba(90, 56, 24, 0.22) 1px,
      transparent 1px,
      transparent 28px
    ),
    repeating-linear-gradient(
      0deg,
      #b57e46 0px,
      #b57e46 13px,
      #966434 13px,
      #966434 14px
    );
}

.mini-office-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #fef3c7;
  font-size: 11px;
  padding: 12px 4px;
}

.mini-desk {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px 4px 4px 4px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.88) 0%, rgba(15, 23, 42, 0.92) 100%);
  border: 1px solid #5c3a1b;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}

.mini-desk.state-busy {
  border-color: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4), inset 0 1px 0 rgba(254, 243, 199, 0.15);
}

.mini-desk.state-online {
  border-color: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.28), inset 0 1px 0 rgba(220, 252, 231, 0.12);
}

.mini-desk.state-offline {
  opacity: 0.65;
}

.mini-desk.state-empty {
  opacity: 0.84;
  border-style: dashed;
  border-color: #7c4d25;
  background: rgba(30, 41, 59, 0.5);
}

.full-desk.state-empty {
  opacity: 0.86;
  border-style: dashed;
  border-color: #5c3a1b;
  background: linear-gradient(180deg, rgba(139, 90, 43, 0.72) 0%, rgba(101, 63, 28, 0.78) 100%);
}

.mini-desk-sprite {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 30px;
}

.mini-desk.state-busy .mini-desk-sprite {
  animation: office-typing 0.55s steps(2, end) infinite;
}

@keyframes office-typing {
  0% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
  100% { transform: translateY(0); }
}

.mini-desk-name {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dot-ind {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-busy {
  background-color: #f59e0b;
  box-shadow: 0 0 4px #f59e0b;
}

.dot-online {
  background-color: #22c55e;
}

.dot-offline {
  background-color: #94a3b8;
}

/* ==================== EXPANDED VIRTUAL OFFICE MODAL ==================== */
.office-modal {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background-color: rgba(10, 15, 28, 0.68);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.office-modal.hidden {
  display: none;
}

.office-modal-dialog {
  width: 680px;
  max-width: 96vw;
  max-height: 88vh;
  background-color: #f0f0f0;
  border: 2px solid #233044;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
}

.office-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background-color: #141e30;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.office-close-btn {
  margin-left: 8px !important;
}

.office-modal-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 12px;
  background-color: #e2e8f0;
  border-bottom: 1px solid #cbd5e1;
  font-size: 12px;
  color: #1e293b;
}

.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
}

.office-modal-grid {
  padding: 18px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
  gap: 14px;
  background:
    radial-gradient(circle at 50% 40%, rgba(254, 243, 199, 0.18) 0%, rgba(120, 53, 15, 0) 68%),
    repeating-linear-gradient(
      90deg,
      rgba(90, 56, 24, 0.18) 0px,
      rgba(90, 56, 24, 0.18) 1px,
      transparent 1px,
      transparent 44px
    ),
    repeating-linear-gradient(
      0deg,
      #b57e46 0px,
      #b57e46 15px,
      #966434 15px,
      #966434 16px
    );
}

.full-desk {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 8px;
  background: linear-gradient(180deg, #8c5828 0%, #6d411b 100%);
  border: 2px solid #3f240e;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.18), 0 4px 8px rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  color: #ffffff;
}

.full-desk.state-offline {
  opacity: 0.65;
}

.full-desk.state-busy .full-desk-sprite {
  animation: office-typing 0.55s steps(2, end) infinite;
}

.full-desk-bubble {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  margin-bottom: 6px;
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid #1e293b;
}

.full-desk-bubble.st-busy {
  background-color: #fef3c7;
  color: #92400e;
  border-color: #d97706;
}

.full-desk-bubble.st-online {
  background-color: #dcfce7;
  color: #166534;
  border-color: #16a34a;
}

.full-desk-bubble.st-offline {
  background-color: #e2e8f0;
  color: #475569;
  border-color: #94a3b8;
}

.full-desk-name {
  margin-top: 5px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ==================== WALKING PIXEL CAT ==================== */
.office-cat-lane {
  position: relative;
  height: 40px;
  flex-shrink: 0;
  overflow: hidden;
  border-top: 2px solid #5a3818;
  background:
    radial-gradient(circle at 82% 20%, rgba(254, 240, 138, 0.22) 0%, rgba(254, 240, 138, 0) 45%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.16) 0%, rgba(15, 23, 42, 0) 45%),
    repeating-linear-gradient(
      90deg,
      rgba(90, 56, 24, 0.16) 0px,
      rgba(90, 56, 24, 0.16) 1px,
      transparent 1px,
      transparent 28px
    ),
    repeating-linear-gradient(
      0deg,
      #b57e46 0px,
      #b57e46 12px,
      #966434 12px,
      #966434 13px
    );
}

.office-cat-lane-lg {
  height: 58px;
}

.office-corner-plant {
  position: absolute;
  left: 4px;
  bottom: 2px;
  width: 26px;
  height: 32px;
  pointer-events: none;
  z-index: 1;
}

.office-corner-plant-lg {
  left: 12px;
  bottom: 4px;
  width: 40px;
  height: 48px;
}

.office-kitchen-corner {
  position: absolute;
  right: 4px;
  bottom: 2px;
  width: 68px;
  height: 34px;
  pointer-events: none;
  z-index: 1;
}

.office-kitchen-corner-lg {
  right: 14px;
  bottom: 4px;
  width: 108px;
  height: 50px;
}

.office-cat {
  position: absolute;
  bottom: 2px;
  left: 6px;
  width: 26px;
  height: 24px;
  z-index: 2;
  animation: cat-patrol-mini 9s linear infinite;
}

.office-cat-lg {
  width: 38px;
  height: 36px;
  bottom: 4px;
  z-index: 2;
  animation: cat-patrol-lg 13s linear infinite;
}

.office-cat svg {
  display: block;
  width: 100%;
  height: 100%;
  animation: cat-step 0.4s steps(2, end) infinite;
}

@keyframes cat-patrol-mini {
  0%   { left: 6px; transform: scaleX(1); }
  48%  { left: calc(100% - 32px); transform: scaleX(1); }
  50%  { left: calc(100% - 32px); transform: scaleX(-1); }
  98%  { left: 6px; transform: scaleX(-1); }
  100% { left: 6px; transform: scaleX(1); }
}

@keyframes cat-patrol-lg {
  0%   { left: 12px; transform: scaleX(1); }
  48%  { left: calc(100% - 50px); transform: scaleX(1); }
  50%  { left: calc(100% - 50px); transform: scaleX(-1); }
  98%  { left: 12px; transform: scaleX(-1); }
  100% { left: 12px; transform: scaleX(1); }
}

@keyframes cat-step {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-2px); }
  100% { transform: translateY(0); }
}

/* ==================== COMPARE PORT DARK CMD STYLE & COMPARE ISP ==================== */
.cmp-cmd-table .table-scroll {
  background-color: #0c0c0c;
  border-color: #404040;
}

.cmp-cmd-table .data-table {
  background-color: #0c0c0c;
  color: #dcdcdc;
  font-family: Consolas, "Courier New", monospace;
}

.cmp-cmd-table .data-table th {
  background-color: #181818;
  color: #6bb5ff;
  border-bottom: 1px solid #3c3c3c;
  border-right: 1px solid #2b2b2b;
}

.cmp-cmd-table .data-table td {
  border-bottom: 1px solid #242424;
  border-right: 1px solid #1e1e1e;
  color: #dcdcdc;
}

.cmp-cmd-table .data-table tbody tr:hover {
  background-color: #16202a;
}

.cmp-cmd-table .empty-cell {
  color: #9a9a9a;
}

.cmp-cmd-table .cell-ok {
  color: #4ec968;
}

.cmp-cmd-table .cell-warn {
  color: #f0b849;
}

.cmp-cmd-table .cell-err {
  color: #f26b6b;
}

.cmp-cmd-table .trace-hop-note {
  color: #9a9a9a;
}

.cisp-select {
  min-width: 150px;
  max-width: 220px;
  height: 24px;
  font-size: 12px;
}

.cisp-grid-3 {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-height: 0;
}

.cisp-grid-3.cols-1 {
  grid-template-columns: minmax(0, 1fr);
}

.cisp-grid-3.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cisp-grid-3.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cisp-grid-3 .output-box {
  min-width: 180px;
  resize: horizontal;
  overflow: hidden;
}

@media (max-width: 1050px) {
  .cisp-grid-3 {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
}

/* ==================== SCHEDULED TASKS TAB ==================== */
.input-dt {
  height: 26px;
  padding: 1px 6px;
  border: 1px solid #abadb3;
  background-color: #ffffff;
  color: #000000;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  border-radius: 1px;
}

.tsk-list-box {
  flex: 0 0 auto;
  max-height: 235px;
}

.tsk-preview-box {
  flex: 1;
  min-height: 165px;
}

.tsk-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid #cbd5e1;
}

.tsk-st-scheduled {
  background-color: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
}

.tsk-st-running {
  background-color: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

.tsk-st-completed {
  background-color: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.tsk-st-stopped {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

/* ==================== COMPARE PER-SLOT CONTROLS, BACKUP, BALLOON ==================== */
.cisp-slot-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-bottom: 5px;
}

.cisp-slot-probe {
  flex: 1 1 130px;
  min-width: 110px;
  height: 22px;
  font-size: 11.5px;
}

.cisp-slot-mode {
  height: 22px;
  font-size: 11.5px;
}

.cisp-slot-port {
  width: 58px !important;
  height: 22px !important;
  font-size: 11.5px !important;
}

.cisp-slot-count {
  width: 48px !important;
  height: 22px !important;
  font-size: 11.5px !important;
}

.sidebar-backup-box {
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid #c8c8c8;
}

.sidebar-backup-btns {
  display: flex;
  gap: 4px;
  margin-bottom: 3px;
}

.sidebar-backup-btns .btn-mini {
  flex: 1;
  margin-left: 0 !important;
  height: 22px;
  font-weight: 600;
}

.sidebar-backup-meta {
  font-size: 10px;
  color: #444444;
  line-height: 1.3;
  word-break: break-all;
}

.sidebar-user-actions {
  display: flex;
  gap: 4px;
}

.sidebar-user-actions .btn-mini {
  flex: 1;
  margin-left: 0 !important;
  height: 22px;
}

.ipv6-toggle-btn.is-unavailable {
  background-color: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}

.balloon-warn {
  position: fixed;
  z-index: 10050;
  max-width: 340px;
  background-color: #fff8db;
  color: #7c2d12;
  border: 1px solid #d97706;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
  pointer-events: none;
}

.balloon-warn.hidden {
  display: none;
}

/* ==================== WEB TEST PREVIEW ==================== */
.wt-browser-bar {
  padding: 4px 8px;
  background-color: #e2e8f0;
  border: 1px solid #cbd5e1;
  border-bottom: none;
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wt-preview-frame {
  flex: 1;
  width: 100%;
  min-height: 280px;
  border: 1px solid #cbd5e1;
  background-color: #ffffff;
}

/* ==================== INLINE REAL CMD TERMINAL ==================== */
.cmd-window {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 460px;
  border: 1px solid #334155;
  background-color: #0c0c0c;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.cmd-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 10px;
  background-color: #1f2937;
  color: #e2e8f0;
  font-family: "Segoe UI", sans-serif;
  font-size: 12px;
  border-bottom: 1px solid #374151;
}

.cmd-titlebar-text {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cmd-titlebar-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.cmd-screen {
  flex: 1;
  padding: 10px 12px;
  background-color: #0c0c0c;
  color: #e5e7eb;
  font-family: Consolas, "Lucida Console", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.45;
  overflow-y: auto;
  cursor: text;
}

.cmd-output-lines {
  white-space: pre-wrap;
  word-break: break-word;
}

.cmd-prompt-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.cmd-prompt-prefix {
  color: #38bdf8;
  font-weight: 700;
  white-space: nowrap;
  user-select: none;
}

.cmd-inline-input {
  flex: 1;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: #ffffff !important;
  font-family: Consolas, "Lucida Console", "Courier New", monospace;
  font-size: 13px;
  padding: 0;
  margin: 0;
  caret-color: #4ade80;
}

/* ==================== PET GARDEN (GRASS, HOUSE, POND, TOYS, DOGS & CATS) ==================== */
.pet-garden-mini {
  position: relative;
  flex: 1;
  min-height: 122px;
  overflow: hidden;
  background: #87ceeb;
}

.pet-garden-full {
  position: relative;
  width: 100%;
  height: 390px;
  overflow: hidden;
  background: #87ceeb;
}

.pet-runner-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.pet-garden-scenery {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.pet-pond-ripple {
  animation: pond-ripple 3.2s ease-in-out infinite;
  transform-origin: center;
}

@keyframes pond-ripple {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.04); }
}

.pet-actor {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 3;
  transition: left 2.8s cubic-bezier(0.42, 0, 0.58, 1), top 2.8s cubic-bezier(0.42, 0, 0.58, 1);
  pointer-events: auto;
  will-change: left, top;
}

.pet-actor-sprite {
  animation: pet-hop 0.7s ease-in-out infinite;
  transition: transform 0.25s ease;
}

.pet-actor.state-busy .pet-actor-sprite {
  animation: pet-hop 0.42s ease-in-out infinite;
}

.pet-actor.state-offline {
  opacity: 0.65;
}

.pet-actor.state-offline .pet-actor-sprite {
  animation: none;
}

@keyframes pet-hop {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-3px); }
}

.pet-name-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 1px;
  padding: 1px 5px;
  border-radius: 999px;
  background-color: rgba(15, 23, 42, 0.82);
  color: #f8fafc;
  font-family: Consolas, "Courier New", monospace;
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.pet-garden-full .pet-name-pill {
  font-size: 11px;
  padding: 2px 7px;
}

.pet-activity-tag {
  margin-bottom: 2px;
  padding: 1px 6px;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  border: 1px solid #cbd5e1;
  font-size: 10px;
  font-weight: 700;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pet-actor.state-busy .pet-activity-tag {
  background-color: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}

/* ==================== THEME / SKIN SWITCHER (HIGH CONTRAST & READABLE) ==================== */
.theme-select {
  height: 22px;
  font-size: 11px;
  padding: 0 6px;
  margin-left: 6px;
}

/* 1. Modern Clean SaaS */
body[data-theme="modern"] {
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  background-color: #f1f5f9;
  color: #0f172a;
}
body[data-theme="modern"] .sidebar {
  background-color: #ffffff;
  border-right: 1px solid #cbd5e1;
}
body[data-theme="modern"] .sidebar-header {
  background-color: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  color: #0f172a;
}
body[data-theme="modern"] .nav-btn {
  color: #1e293b;
  border-radius: 6px;
  margin: 1px 6px;
  border-left: none;
}
body[data-theme="modern"] .nav-btn:hover {
  background-color: #f1f5f9;
}
body[data-theme="modern"] .nav-btn.active {
  background-color: #e0e7ff;
  color: #3730a3;
  font-weight: 700;
}
body[data-theme="modern"] .mynet-bar,
body[data-theme="modern"] .toolbar-box,
body[data-theme="modern"] .groupbox,
body[data-theme="modern"] .summary-bar {
  background-color: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
body[data-theme="modern"] .groupbox > legend {
  color: #1e293b;
  font-weight: 700;
}
body[data-theme="modern"] .btn-primary {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  border-color: #4338ca;
  color: #ffffff;
  border-radius: 6px;
}
body[data-theme="modern"] .btn,
body[data-theme="modern"] .input-ip,
body[data-theme="modern"] .input-port,
body[data-theme="modern"] .input-small,
body[data-theme="modern"] .select-box {
  border-radius: 6px;
}

/* 2. Windows 11 Fluent Mica */
body[data-theme="win11"] {
  font-family: "Segoe UI Variable", "Segoe UI", sans-serif;
  background: linear-gradient(135deg, #edf2f8 0%, #e1ebf6 100%);
  color: #111827;
}
body[data-theme="win11"] .sidebar {
  background-color: #f3f6fb;
  border-right: 1px solid #cbd5e1;
}
body[data-theme="win11"] .sidebar-header {
  background-color: #eef3f9;
  border-bottom: 1px solid #cbd5e1;
  color: #111827;
}
body[data-theme="win11"] .nav-btn {
  color: #1f2937;
  border-radius: 6px;
  margin: 2px 6px;
  border-left: 3px solid transparent;
}
body[data-theme="win11"] .nav-btn.active {
  background-color: #ffffff;
  border-left-color: #0067c0;
  color: #005a9e;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
}
body[data-theme="win11"] .mynet-bar,
body[data-theme="win11"] .toolbar-box,
body[data-theme="win11"] .groupbox,
body[data-theme="win11"] .summary-bar {
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  color: #111827;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}
body[data-theme="win11"] .btn-primary {
  background-color: #0067c0;
  border-color: #005a9e;
  color: #ffffff;
  border-radius: 5px;
}
body[data-theme="win11"] .btn,
body[data-theme="win11"] .input-ip,
body[data-theme="win11"] .input-port,
body[data-theme="win11"] .input-small,
body[data-theme="win11"] .select-box {
  border-radius: 5px;
}

/* 3. Linux / Ubuntu Yaru (High-contrast readable dark) */
body[data-theme="linux"] {
  font-family: "Ubuntu", "Segoe UI", sans-serif;
  background-color: #242424;
  color: #f8fafc;
}
body[data-theme="linux"] .sidebar {
  background-color: #2c1e26;
  border-right: 1px solid #4d3543;
  color: #f8fafc;
}
body[data-theme="linux"] .sidebar-header {
  background-color: #1f141a;
  border-bottom: 1px solid #4d3543;
  color: #ffffff;
}
body[data-theme="linux"] .nav-btn {
  color: #f1f5f9;
  border-left-width: 3px;
}
body[data-theme="linux"] .nav-btn:hover {
  background-color: #422b38;
}
body[data-theme="linux"] .nav-btn.active {
  background-color: #543345;
  border-left-color: #e95420;
  color: #ffffff;
  font-weight: 700;
}
body[data-theme="linux"] .main-area,
body[data-theme="linux"] .mynet-bar,
body[data-theme="linux"] .toolbar-box,
body[data-theme="linux"] .groupbox,
body[data-theme="linux"] .summary-bar,
body[data-theme="linux"] .status-bar {
  background-color: #2e2e2e;
  border-color: #52525b;
  color: #f8fafc;
}
body[data-theme="linux"] .groupbox > legend,
body[data-theme="linux"] label,
body[data-theme="linux"] .mynet-item {
  color: #f1f5f9;
}
body[data-theme="linux"] .muted {
  color: #cbd5e1;
}
body[data-theme="linux"] .data-table th {
  background-color: #1f1f1f;
  color: #ffffff;
  border-color: #52525b;
}
body[data-theme="linux"] .data-table td {
  background-color: #2a2a2a;
  border-color: #3f3f46;
  color: #f1f5f9;
}
body[data-theme="linux"] .input-ip,
body[data-theme="linux"] .input-port,
body[data-theme="linux"] .input-small,
body[data-theme="linux"] .input-ports-list,
body[data-theme="linux"] .select-box,
body[data-theme="linux"] .input-dt {
  background-color: #18181b;
  color: #ffffff;
  border-color: #71717a;
}
body[data-theme="linux"] .btn,
body[data-theme="linux"] .btn-mini {
  background-color: #3f3f46;
  color: #ffffff;
  border-color: #71717a;
}
body[data-theme="linux"] .btn-primary {
  background-color: #e95420;
  border-color: #c74315;
  color: #ffffff;
}
body[data-theme="linux"] .sidebar-footer,
body[data-theme="linux"] .sidebar-user-box,
body[data-theme="linux"] .sidebar-backup-box,
body[data-theme="linux"] .sidebar-note {
  background-color: #1f141a;
  border-color: #4d3543;
  color: #e2e8f0;
}

/* 4. AI Cyberpunk Dark (Crisp readable text) */
body[data-theme="ai"] {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: radial-gradient(circle at top right, #1e1b4b 0%, #090d1a 65%);
  color: #f1f5f9;
}
body[data-theme="ai"] .sidebar {
  background: linear-gradient(180deg, #0f172a 0%, #090d1a 100%);
  border-right: 1px solid #334155;
  color: #f1f5f9;
}
body[data-theme="ai"] .sidebar-header {
  background: #0f172a;
  border-bottom: 1px solid #334155;
  color: #7dd3fc;
}
body[data-theme="ai"] .nav-btn {
  color: #e2e8f0;
  border-radius: 6px;
  margin: 1px 6px;
  border-left: none;
}
body[data-theme="ai"] .nav-btn:hover {
  background-color: rgba(56, 189, 248, 0.14);
}
body[data-theme="ai"] .nav-btn.active {
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.25), rgba(139, 92, 246, 0.25));
  color: #7dd3fc;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.55);
}
body[data-theme="ai"] .mynet-bar,
body[data-theme="ai"] .toolbar-box,
body[data-theme="ai"] .groupbox,
body[data-theme="ai"] .summary-bar,
body[data-theme="ai"] .status-bar {
  background-color: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  color: #f1f5f9;
}
body[data-theme="ai"] .groupbox > legend {
  color: #7dd3fc;
  font-weight: 700;
}
body[data-theme="ai"] label,
body[data-theme="ai"] .mynet-item {
  color: #e2e8f0;
}
body[data-theme="ai"] .muted {
  color: #94a3b8;
}
body[data-theme="ai"] .data-table th {
  background-color: #1e293b;
  color: #7dd3fc;
  border-color: #334155;
}
body[data-theme="ai"] .data-table td {
  background-color: #0f172a;
  border-color: #1e293b;
  color: #f1f5f9;
}
body[data-theme="ai"] .input-ip,
body[data-theme="ai"] .input-port,
body[data-theme="ai"] .input-small,
body[data-theme="ai"] .input-ports-list,
body[data-theme="ai"] .select-box,
body[data-theme="ai"] .input-dt {
  background-color: #020617;
  color: #f8fafc;
  border: 1px solid #475569;
  border-radius: 6px;
}
body[data-theme="ai"] .btn,
body[data-theme="ai"] .btn-mini {
  background-color: #1e293b;
  color: #f1f5f9;
  border-color: #475569;
  border-radius: 6px;
}
body[data-theme="ai"] .btn-primary {
  background: linear-gradient(135deg, #0284c7, #6d28d9);
  border-color: #38bdf8;
  color: #ffffff;
}
body[data-theme="ai"] .sidebar-footer,
body[data-theme="ai"] .sidebar-user-box,
body[data-theme="ai"] .sidebar-backup-box,
body[data-theme="ai"] .sidebar-note {
  background-color: #0b1120;
  border-color: #334155;
  color: #e2e8f0;
}

/* 5. Retro CRT Phosphor Green (Readable soft mint/green) */
body[data-theme="retro"] {
  font-family: Consolas, "Courier New", monospace;
  background-color: #060d06;
  color: #86efac;
}
body[data-theme="retro"] .sidebar,
body[data-theme="retro"] .sidebar-header,
body[data-theme="retro"] .mynet-bar,
body[data-theme="retro"] .toolbar-box,
body[data-theme="retro"] .groupbox,
body[data-theme="retro"] .summary-bar,
body[data-theme="retro"] .status-bar,
body[data-theme="retro"] .sidebar-footer,
body[data-theme="retro"] .sidebar-user-box,
body[data-theme="retro"] .sidebar-backup-box,
body[data-theme="retro"] .sidebar-note {
  background-color: #0a140a;
  border-color: #22c55e;
  color: #86efac;
}
body[data-theme="retro"] .groupbox > legend,
body[data-theme="retro"] label,
body[data-theme="retro"] .mynet-item {
  color: #bbf7d0;
}
body[data-theme="retro"] .nav-btn {
  color: #86efac;
}
body[data-theme="retro"] .nav-btn.active {
  background-color: #14532d;
  border-left-color: #4ade80;
  color: #dcfce7;
  font-weight: 700;
}
body[data-theme="retro"] .data-table th,
body[data-theme="retro"] .data-table td {
  background-color: #071007;
  border-color: #166534;
  color: #bbf7d0;
}
body[data-theme="retro"] .input-ip,
body[data-theme="retro"] .input-port,
body[data-theme="retro"] .input-small,
body[data-theme="retro"] .input-ports-list,
body[data-theme="retro"] .select-box,
body[data-theme="retro"] .input-dt,
body[data-theme="retro"] .btn,
body[data-theme="retro"] .btn-mini {
  background-color: #040904;
  color: #bbf7d0;
  border-color: #22c55e;
  font-family: Consolas, "Courier New", monospace;
}
body[data-theme="retro"] .btn-primary {
  background-color: #15803d;
  border-color: #4ade80;
  color: #ffffff;
}

/* ==================== MOBILE RESPONSIVE (iPhone / Android) ==================== */
@media (max-width: 768px) {
  html, body {
    height: auto;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-text-size-adjust: 100%;
  }

  .app-shell {
    flex-direction: column;
    height: auto;
    min-height: 100dvh;
  }

  .sidebar {
    width: 100%;
    min-width: 0;
    border-right: none;
    border-bottom: 1px solid #bdbdbd;
  }

  .sidebar-header {
    padding: 8px 10px;
  }

  .sidebar-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 4px;
    padding: 6px 8px;
  }

  .nav-btn {
    flex: 0 0 auto;
    padding: 6px 10px;
    border-left: none;
    border-bottom: 2px solid transparent;
    border-radius: 3px;
    white-space: nowrap;
  }

  .nav-btn.active {
    border-left-color: transparent;
    border-bottom-color: #0078d7;
  }

  .sidebar-office-wrap,
  .sidebar-note {
    display: none;
  }

  .sidebar-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 6px 8px;
  }

  .sidebar-backup-box,
  .sidebar-user-box {
    flex: 1 1 210px;
    margin-bottom: 0;
  }

  .main-workspace {
    overflow: visible;
    min-width: 0;
  }

  .source-bar {
    flex-wrap: wrap;
    padding: 6px 8px;
    gap: 6px;
  }

  .source-bar .source-net-line {
    font-size: 11px;
    white-space: normal;
    word-break: break-word;
  }

  .tab-panel.active {
    overflow: visible;
    padding: 8px;
  }

  .form-row {
    gap: 6px;
  }

  .input-ip,
  .input-ports-list,
  .select-box,
  .input-dt {
    width: 100%;
    max-width: 100%;
    font-size: 16px; /* prevents iOS Safari auto-zoom on focus */
    height: 34px;
  }

  .input-port,
  .input-small {
    font-size: 16px;
    height: 34px;
  }

  .btn,
  .btn-primary {
    min-height: 34px;
    padding: 4px 10px;
  }

  .default-ports-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .console-output {
    min-height: 220px;
    max-height: 340px;
    font-size: 11.5px;
  }

  .cisp-grid,
  .cisp-grid.cols-2,
  .cisp-grid.cols-3 {
    grid-template-columns: 1fr;
  }

  .cisp-grid > fieldset {
    resize: none;
  }

  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .status-bar {
    position: static;
    height: auto;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 8px;
  }
}







