:root {
  font-family: system-ui, 'Microsoft YaHei', sans-serif;
  color: #252a2a;
  background: #f6f7f7;
  font-size: 14px;
  letter-spacing: 0;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid #cdd4d2;
  border-radius: 5px;
  background: #fff;
  color: #26332f;
  cursor: pointer;
  white-space: nowrap;
}
button:hover {
  background: #eef4f1;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button.primary,
button.selected {
  background: #19644e;
  color: #fff;
  border-color: #19644e;
}
button.icon {
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 8px;
}
.lucide {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
input,
select,
textarea {
  min-height: 37px;
  width: 100%;
  min-width: 0;
  border: 1px solid #c6d0cc;
  border-radius: 4px;
  padding: 7px 9px;
  background: #fff;
  color: #252a2a;
}
input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  outline: 2px solid #438269;
  outline-offset: 2px;
}
label {
  display: grid;
  gap: 5px;
  color: #56645f;
  font-size: 12px;
  min-width: 0;
}
h1 {
  font-size: 23px;
  margin: 0;
  font-weight: 650;
}
h2 {
  font-size: 15px;
  margin: 0 0 10px;
  font-weight: 650;
}
header {
  height: 66px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 30px;
  border-bottom: 1px solid #dce1df;
  background: #fff;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
}
.brand .lucide {
  width: 26px;
  height: 26px;
  color: #19644e;
}
.account {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
nav {
  display: flex;
  padding: 12px 30px;
  gap: 6px;
  border-bottom: 1px solid #dce1df;
  background: #fff;
  overflow-x: auto;
}
nav button {
  border: 0;
  background: transparent;
  flex-shrink: 0;
}
main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 30px;
}
.heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  background: #e7edea;
  color: #3b5a4e;
  white-space: nowrap;
}
.muted {
  color: #69766f;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.session-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  padding-bottom: 24px;
}
.session-tools form,
.inline-form {
  display: flex;
  align-items: end;
  gap: 10px;
}
.session-tools label {
  flex: 1;
}
.session-tools form {
  flex-wrap: wrap;
}
.session-tools label {
  min-width: 130px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.checkbox-label input {
  width: 16px;
  min-height: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
}
.profiles-heading {
  margin-top: 26px;
}
.workspace {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 440px;
  border-top: 1px solid #d7dfdb;
  border-bottom: 1px solid #d7dfdb;
  background: #fff;
}
.device-list {
  display: grid;
  gap: 6px;
}
.device-tile {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 3px 8px;
  width: 100%;
  min-height: 64px;
  text-align: left;
  justify-content: stretch;
  padding: 9px;
  white-space: normal;
}
.device-tile .lucide { grid-row: span 2; }
.device-tile strong { font-size: 13px; overflow-wrap: anywhere; min-width: 0; }
.device-tile small { font-size: 11px; color: #657169; overflow-wrap: anywhere; }
.device-tile.selected small { color: #fff; opacity: .85; }
.peer-heading { margin-top: 24px; }
#direct-peer-name { font-size: 13px; overflow-wrap: anywhere; }
.session-peer { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 10px; margin-top: 8px; }
.session-heading > div { min-width: 0; }
#session-name { overflow-wrap: anywhere; }
#discovery-status { margin-top: 20px; }
.incoming-direct {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 0;
  color: #7b5024;
  border-bottom: 1px solid #e4d7b7;
  overflow-wrap: anywhere;
}
.text-area { border-top: 1px solid #dce3df; padding-top: 18px; margin-top: 20px; }
.text-messages { display: grid; gap: 10px; max-height: 320px; overflow: auto; }
.text-message { border-left: 3px solid #b9cec5; padding: 2px 0 2px 10px; min-width: 0; }
.text-message[data-direction="send"] { border-color: #8d9bb3; }
.text-message pre { font: inherit; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.text-message-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 5px; }
#text-form { margin-top: 14px; }
#text-input { display: block; resize: vertical; min-height: 86px; max-height: 300px; }
.text-commands { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
aside {
  padding: 20px 14px;
  border-right: 1px solid #dce3df;
}
aside h2 {
  font-size: 12px;
  color: #68766e;
  margin-bottom: 14px;
}
.session-item {
  display: grid;
  width: 100%;
  justify-content: start;
  text-align: left;
  margin-bottom: 7px;
  gap: 4px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.session-item span {
  font-size: 11px;
  color: inherit;
  opacity: 0.75;
}
.transfer-area {
  min-width: 0;
  padding: 20px;
}
.session-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}
.session-heading > .badge { flex-shrink: 0; min-width: 64px; text-align: center; }
.session-heading h2 {
  margin-bottom: 5px;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0 16px;
}
.toolbar .muted {
  max-width: 160px;
}
#invite-form {
  display: flex;
  align-items: end;
  gap: 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e0e6e2;
}
#invite-form label {
  max-width: 170px;
}
output {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
  word-break: break-all;
}
#invite-secret {
  max-width: 230px;
  color: #4f5b55;
  align-self: center;
  margin-left: 8px;
}
.empty {
  padding: 70px 0;
  text-align: center;
  color: #8a9690;
}
.job {
  padding: 18px 0;
  border-bottom: 1px solid #e1e7e3;
}
.job-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.job-name {
  font-weight: 600;
  overflow-wrap: anywhere;
  flex: 1;
  min-width: min(150px, 100%);
}
.job-title .badge {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.job-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-top: 9px;
  color: #6a786f;
  font-size: 12px;
}
.job-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}
progress {
  appearance: none;
  display: block;
  width: 100%;
  height: 5px;
  border: 0;
  margin-top: 12px;
  background: #e5ebe7;
  border-radius: 2px;
}
progress::-webkit-progress-bar {
  background: #e5ebe7;
  border-radius: 2px;
}
progress::-webkit-progress-value {
  background: #2c8566;
  border-radius: 2px;
}
.inline-form {
  padding-bottom: 24px;
  flex-wrap: wrap;
}
.inline-form label {
  flex: 1;
  min-width: 150px;
}
.table-scroll {
  width: 100%;
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  background: #fff;
  font-size: 13px;
}
th,
td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid #dde4e0;
  vertical-align: middle;
  overflow-wrap: anywhere;
}
th {
  font-size: 12px;
  font-weight: 500;
  color: #6f7b75;
  background: #eef2ef;
}
td.url {
  max-width: 360px;
  word-break: break-all;
}
#enrollment {
  padding: 16px 0 22px;
}
.storage-item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid #dbe2de;
}
.storage-item div {
  flex: 1;
  min-width: 0;
}
.storage-item a {
  color: #19644e;
}
.login-screen {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  min-height: 100dvh;
  padding: 24px;
}
.login-form {
  width: 340px;
  max-width: 100%;
  display: grid;
  gap: 19px;
}
.login-form .brand {
  margin-bottom: 20px;
}
.login-form h1 {
  font-size: 20px;
}
.login-form button {
  margin-top: 5px;
}
#message {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 18px;
  border: 1px solid #a8b9ae;
  background: #fff;
  box-shadow: 0 3px 15px #00000016;
  border-radius: 5px;
  max-width: min(560px, 90vw);
  z-index: 10;
  overflow-wrap: anywhere;
}
[hidden] {
  display: none !important;
}
@media (max-width: 760px) {
  header {
    padding: 0 16px;
    gap: 10px;
  }
  .brand {
    font-size: 20px;
  }
  #environment {
    display: none;
  }
  .account {
    font-size: 12px;
  }
  nav {
    padding: 10px 12px;
  }
  main {
    padding: 22px 14px;
  }
  .session-tools {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .workspace {
    grid-template-columns: 1fr;
  }
  .peer-sidebar { min-width: 0; }
  .device-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .device-tile { min-height: 72px; }
  .peer-heading { margin-top: 14px; }
  #discovery-status { margin: 12px 0 0; }
  .incoming-direct { flex-wrap: wrap; }
  aside {
    border-right: 0;
    border-bottom: 1px solid #dce3df;
    padding: 14px;
  }
  .session-item {
    display: inline-grid;
    width: 150px;
    vertical-align: top;
    margin-right: 7px;
  }
  #session-list {
    white-space: nowrap;
    overflow: auto;
  }
  .transfer-area {
    padding: 16px 12px;
  }
  #invite-form {
    flex-wrap: wrap;
  }
  #invite-secret {
    margin: 0;
    max-width: 100%;
  }
  .toolbar {
    gap: 6px;
  }
  .toolbar button {
    padding: 7px 9px;
  }
  .session-heading .badge {
    white-space: normal;
    max-width: 100px;
  }
  h1 {
    font-size: 21px;
  }
  td,
  th {
    padding: 10px;
  }
  .storage-item {
    flex-wrap: wrap;
  }
}
