[v-cloak] {
  display: none !important;
}

:root {
  --page-bg: #f5f6f7;
  --card-bg: #ffffff;
  --card-border: #dbe2e7;
  --accent: #e85d04;
  --accent-soft: #fff0e5;
  --text-strong: #17232d;
  --text-soft: #5f6b76;
  --input-bg: #ffffff;
}

body {
  background: var(--page-bg) !important;
  color: var(--text-strong);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

main.responsive.padding {
  max-width: 960px;
  margin-inline: auto;
  padding: 0 1rem 2rem !important;
}

.page-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1rem 1.25rem;
  background: transparent !important;
}

.page-header h1 {
  margin: 0;
  color: var(--text-strong) !important;
  font-size: 1.6rem;
  line-height: 1.25;
}

.header-copy {
  padding-right: 180px;
}

.header-meta {
  margin: 0.45rem 0 0;
  max-width: 66ch;
  color: var(--text-soft);
  line-height: 1.6;
}

.header-actions {
  position: absolute;
  top: 2rem;
  right: 1rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 !important;
  padding: 0 !important;
}

.header-btn {
  min-height: 42px;
  padding: 8px 14px !important;
  border: 1px solid #cfd8df !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  color: var(--text-strong) !important;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: none !important;
}

.header-btn.primary {
  border-color: var(--accent) !important;
  background: var(--accent) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 18px rgba(232, 93, 4, 0.18) !important;
}

.header-btn:hover:not(:disabled) {
  background: #f4f7f9 !important;
}

.header-btn.primary:hover:not(:disabled) {
  background: #c94f03 !important;
}

.status-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 15px;
  margin: 0 0 12px;
  border: 1px solid var(--card-border);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  background: var(--card-bg);
  box-shadow: 0 7px 20px rgba(28, 48, 61, 0.055);
}

.status-title {
  margin-bottom: 4px;
  color: var(--text-strong);
  font-weight: 700;
}

.status-panel p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.status-side {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.status-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.status-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid #f0a06d;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #a53e00;
  font-size: 0.85rem;
}

.status-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
}

.connect-action {
  min-width: 128px;
  min-height: 42px;
}

.config-workspace {
  position: relative;
}

.connection-placeholder {
  display: flex;
  position: absolute;
  z-index: 1;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 260px;
  padding: 2rem;
  border: 1px dashed #e7b18c;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-soft);
  text-align: center;
}

.connection-placeholder i {
  color: var(--accent);
  font-size: 2rem;
}

.connection-placeholder strong {
  color: var(--text-strong);
}

.connection-placeholder span {
  max-width: 36rem;
  line-height: 1.6;
}

.config-workspace.is-disconnected .dual-pane {
  opacity: 0.42;
  pointer-events: none;
  user-select: none;
}

.config-help {
  margin: 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text-soft);
}

.config-help summary {
  color: var(--text-strong);
  font-weight: 600;
  cursor: pointer;
}

.config-help ul {
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
  line-height: 1.7;
}

.overlay {
  position: fixed;
  z-index: 2000;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1em;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  color: white;
}

main {
  overflow-x: visible !important;
}

body:has(dialog[open])::after {
  content: '';
  position: absolute;
  z-index: 1049;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  backdrop-filter: blur(10px);
}

dialog {
  z-index: 1050;
  padding: 15px;
  max-height: 80vh;
  width: 750px;
}

fieldset {
  border: 1px solid var(--card-border) !important;
  border-radius: 12px !important;
  background: var(--card-bg);
  box-shadow: 0 7px 20px rgba(28, 48, 61, 0.055);
  padding: 15px;
  overflow: visible;
}

legend {
  color: var(--text-strong) !important;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0 0.4rem;
}

button {
  border-radius: 8px !important;
}

button:not(.transparent):not(.circle):not(.header-btn) {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 14px rgba(232, 93, 4, 0.2);
}

button:hover:not(:disabled):not(.transparent):not(.circle):not(.header-btn) {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.actions button {
  min-height: 3.1rem;
  z-index: 1;
}

.actions button:hover,
.actions button:focus-within {
  z-index: 1020;
}

input,
select,
textarea {
  border-radius: 8px !important;
  background: var(--input-bg) !important;
  color: var(--text-strong) !important;
  border-color: #aebbc3 !important;
  color: var(--text-strong) !important;
}

input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

label,
.checkbox span,
.field label {
  color: var(--text-soft) !important;
}

.tooltip {
  max-width: min(34rem, 90vw);
  line-height: 1.6;
}

.small-space {
  height: 0.75rem;
}

.tooltip {
  position: absolute;
  z-index: 1010;
}

.actions .tooltip {
  z-index: 1030;
}

.tooltip a {
  text-decoration: underline !important;
}

.actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  overflow: visible;
  z-index: 10;
}
.dual-pane {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 12px;
}

#map {
  width: 100%;
  min-width: 400px;
  height: 400px;

}

.dual-pane fieldset {
  margin-block-start: 0;
}

.field {
  margin-block-end: 0.5rem;
}

.access-password-control {
  min-width: 0;
}

.access-password-field {
  margin-block-end: 0.2rem !important;
}

.field-hint {
  display: block;
  min-height: 1.25rem;
  padding: 0.1rem 0.85rem 0.25rem;
  color: var(--text-soft);
  font-size: 0.78rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: normal;
}

.byte-counter {
  font-size: 0.85em;
  color: var(--text-soft);
}

.console-output {
  background: rgba(8, 10, 12, 0.96) !important;
  color: #dfe6eb !important;
  font-family: 'Courier New', Courier, monospace !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
  padding: 0.75em !important;
  border-radius: 0.9rem !important;
  height: 400px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.console-output * {
  font-family: 'Courier New', Courier, monospace !important;
  font-size: 13px !important;
}

.console-cmd {
  color: #ffb37a !important;
}

.console-reply {
  color: #ccc !important;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.console-error {
  color: #ff7f7f !important;
}

.console-input-line {
  display: flex !important;
  align-items: center !important;
  margin-top: 0.25em !important;
  width: 100%;
  cursor: text;
}

.console-prompt {
  color: #7cb3ff !important;
  flex-shrink: 0;
}

.console-input-line input {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  color: #ffb37a !important;
  font-family: 'Courier New', Courier, monospace !important;
  font-size: 13px !important;
  padding: 0 !important;
  margin: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  flex: 0 0 auto !important;
}

.console-ghost {
  color: rgba(245, 247, 250, 0.34) !important;
  font-family: 'Courier New', Courier, monospace !important;
  font-size: 13px !important;
  pointer-events: none;
  white-space: pre;
}

.console-input-line progress {
  flex-shrink: 0;
  margin-left: 0.5em;
}

@media (max-width: 800px) {
  .page-header {
    align-items: flex-start;
    padding: 1rem 0.75rem 1rem;
  }

  .header-copy {
    padding-right: 0;
  }

  .header-actions {
    position: static;
    margin-left: auto !important;
  }

  .header-actions .header-btn {
    min-height: 38px;
    padding: 7px 12px !important;
  }

  .status-panel {
    flex-direction: column;
    align-items: flex-start;
  }

  .status-badges {
    justify-content: flex-start;
  }

  .status-side {
    width: 100%;
    justify-content: flex-start;
  }

  .status-actions,
  .status-actions .connect-action {
    width: 100%;
  }

  .connection-placeholder {
    min-height: 220px;
  }

  .dual-pane > * {
    width: 100%;
  }

  main.responsive.padding {
    padding: 0 0.75rem 1.5rem !important;
  }

  dialog {
    width: 95%;
    max-height: 100vh;
  }
}

.leaflet-map-pane {
  cursor: crosshair
}

.leaflet-bottom {
  position: absolute !important;
}
.leaflet-control-layers-list {
  margin-block-start: 0 !important;
}
.leaflet-bottom .leaflet-control-layers {
  margin-bottom: 55px !important;
}
