/* frontend/src/style.css */
:root {
  font-family:
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;
  color: #e7edf6;
  background: #141820;
  font-synthesis: none;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background-size: 512px;
}
button,
input,
a {
  font: inherit;
}
button,
a {
  transition: background-color .15s, border-color .15s;
}
button {
  min-height: 42px;
  border: 1px solid #3b4555;
  background: #212833;
  border-radius: 7px;
  padding: 10px 15px;
  color: #dce4f1;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
button:hover:not(:disabled) {
  background: #30394c;
  border-color: #697a99;
}
button:disabled {
  opacity: .38;
  cursor: not-allowed;
}
.primary {
  background: #8797f5;
  color: #101528;
  border-color: #8797f5;
}
.primary:hover:not(:disabled) {
  background: #a1aefe;
}
.danger {
  color: #ff9099;
  border-color: #8b4f5a;
  background: #30222a;
}
.danger:hover:not(:disabled) {
  background: #482b34;
}
button:focus-visible,
input:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid #a9b7ff;
  outline-offset: 3px;
}
.layout {
  display: flex;
  min-height: 100vh;
}
aside {
  width: 200px;
  flex-shrink: 0;
  border-right: 1px solid #303847;
  background: #12171f;
  padding: 27px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.brand {
  font-size: 23px;
  font-weight: 650;
  text-decoration: none;
  color: #eef2fb;
  padding: 0 12px;
  white-space: nowrap;
}
.brand span {
  font-size: 29px;
  margin-right: 5px;
}
.nav {
  margin-top: 44px;
  color: #e3e8ff;
  background: #2a3355;
  border: 1px solid #364268;
  border-radius: 7px;
  padding: 14px;
  font-size: 14px;
  font-weight: 600;
}
.side-foot {
  margin-top: auto;
  font-size: 11px;
  line-height: 1.9;
  color: #9aa8be;
  padding: 13px;
}
main {
  width: 100%;
  min-width: 0;
  max-width: 1600px;
  margin: 0 auto;
  padding: 26px 30px;
}
.eyebrow {
  font-size: 10px !important;
  letter-spacing: 1.4px;
  color: #8d9bb5 !important;
  margin: 0 0 8px !important;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 15px;
}
h1 {
  font-size: 28px;
  margin: 0 0 7px;
  font-weight: 650;
  letter-spacing: .3px;
}
h2 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 15px;
}
p {
  font-size: 12px;
  line-height: 1.8;
  color: #aab7cb;
  margin: 8px 0 16px;
}
.badge {
  white-space: nowrap;
  background: #202936;
  border: 1px solid #45536b;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  color: #b4c1d4;
}
.connected {
  background: #18342a;
  border-color: #367755;
  color: #87e2ad;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 31%);
  gap: 20px;
  align-items: start;
}
.tools {
  min-width: 0;
}
section {
  background: #1c232e;
  border: 1px solid #354153;
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 18px;
}
.connect-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.device-summary {
  display: flex;
  gap: 18px;
  margin-top: 22px;
  align-items: center;
}
.device-icon {
  color: #a5b9d9;
  font-size: 65px;
  line-height: 1;
}
.device-data {
  min-width: 0;
  flex: 1;
}
.device-data h2 {
  font-size: 20px;
}
.properties {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.properties > div {
  border-right: 1px solid #374153;
  padding-right: 9px;
  min-width: 0;
}
.properties > div:last-child {
  border: 0;
}
.properties small {
  display: block;
  color: #a6b5cb;
  font-size: 11px;
  margin-bottom: 7px;
}
.properties strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.connection-help {
  font-size: 11px;
  color: #a2b1c7;
  margin-top: 18px;
}
.connection-help summary {
  cursor: pointer;
}
.connection-help p {
  margin-bottom: 0;
}
.notice {
  color: #bbc9e0;
  background: #192433;
  border: 1px solid #334862;
  padding: 12px 14px;
  border-radius: 7px;
  margin: 0 0 18px;
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.notice.error {
  color: #ffb7be;
  background: #34212a;
  border-color: #70424d;
}
.section-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.tag {
  font-size: 10px;
  letter-spacing: .4px;
  color: #a6b6cf;
  background: #232d3d;
  padding: 5px 7px;
  border-radius: 4px;
  align-self: flex-start;
}
label {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 12px;
  color: #b9c7db;
  margin: 10px 0;
}
input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #455269;
  border-radius: 6px;
  padding: 10px 12px;
  background: #171e29;
  color: #e1e9f7;
  min-width: 0;
}
input::placeholder {
  color: #8594aa;
}
input[type=file] {
  font-size: 12px;
  background: #202b3a;
  border-style: dashed;
  padding: 17px;
}
input[type=file]::file-selector-button {
  background: #333f59;
  border: 0;
  color: #e1e7f6;
  border-radius: 5px;
  padding: 7px 10px;
  margin-right: 14px;
}
.artifact-meta {
  background: #171e28;
  border: 1px solid #2d3b50;
  border-radius: 7px;
  padding: 13px 15px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 12px;
  margin: 14px 0;
}
.artifact-meta small {
  display: block;
  font-size: 10px;
  color: #96a7c0;
  margin-bottom: 7px;
}
.artifact-meta strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.artifact-meta p {
  grid-column: 1/-1;
  margin: 0;
  font-size: 10px;
  color: #8f9fb8;
  overflow-wrap: anywhere;
}
fieldset {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  border: 0;
  padding: 0;
  margin: 16px 0;
}
legend {
  font-size: 11px;
  color: #a8b8d0;
  margin-bottom: 8px;
}
.mode {
  margin: 0;
  border: 1px solid #3a475d;
  border-radius: 7px;
  padding: 12px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.mode.selected {
  border-color: #8a9aff;
  background: #293248;
}
.mode input {
  width: 15px;
  min-height: 15px;
  accent-color: #91a1fb;
}
.mode b {
  font-size: 12px;
  font-weight: 600;
}
.mode small {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  color: #a5b3ca;
  line-height: 1.6;
}
.hint {
  font-size: 10px;
  line-height: 1.8;
  color: #a6b5ca;
  margin: 8px 0;
}
.warning {
  color: #ffd0a4;
  background: #352b25;
  border: 1px solid #77543b;
  padding: 11px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.8;
}
.panel-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 17px;
}
.panel-footer small {
  font-size: 10px;
  color: #96a7bf;
}
.uninstall-row {
  display: flex;
  align-items: flex-end;
  gap: 16px;
}
.uninstall-row label {
  flex: 1;
  margin: 0;
}
.screenshot-panel {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  min-height: 690px;
}
.phone {
  border: 5px solid #536178;
  border-radius: 33px;
  aspect-ratio: 9/18.5;
  max-height: 560px;
  width: 80%;
  margin: 22px auto 28px;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #171e29;
}
.phone:before {
  content: "";
  position: absolute;
  top: 12px;
  left: calc(50% - 4px);
  width: 8px;
  height: 8px;
  background: #62718a;
  border-radius: 50%;
}
.phone img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.phone-empty {
  text-align: center;
  padding: 15px;
}
.phone-empty > span {
  font-size: 45px;
  color: #72829d;
}
.phone-empty p {
  color: #b3c0d6;
  margin: 10px 0 4px;
}
.phone-empty small {
  font-size: 9px;
  color: #8c9bb4;
}
.screenshot-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.screenshot-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #4a5972;
  border-radius: 6px;
  padding: 10px 14px;
  color: #d7e1f8;
  font-size: 12px;
  text-decoration: none;
}
.screenshot-panel > .hint {
  text-align: center;
  margin-top: 18px;
}
footer {
  font-size: 10px;
  color: #8d9db6;
  line-height: 1.9;
  margin-top: 7px;
}
dialog {
  max-width: 540px;
  width: calc(100% - 32px);
  border: 1px solid #546380;
  border-radius: 13px;
  padding: 26px;
  background: #202937;
  color: #e4edfc;
  box-shadow: 0 30px 90px #0008;
}
dialog::backdrop {
  background: #070c14bb;
}
dialog p {
  overflow-wrap: anywhere;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}
@media (min-width: 1600px) {
  main {
    padding: 35px 42px;
  }
  .phone {
    max-height: 630px;
  }
}
@media (max-width: 1100px) {
  aside {
    width: 170px;
  }
  .brand {
    font-size: 19px;
  }
  main {
    padding: 22px;
  }
  .workspace {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 15px;
  }
  .properties {
    grid-template-columns: 1fr 1fr;
  }
  .device-icon {
    display: none;
  }
  section {
    padding: 18px;
  }
  .mode {
    padding: 10px;
  }
  .panel-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 850px) {
  .workspace {
    grid-template-columns: 1fr;
  }
  .screenshot-panel {
    position: static;
    min-height: 0;
  }
  .phone {
    max-width: 250px;
    max-height: 460px;
  }
  .properties {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  aside {
    display: none;
  }
  main {
    padding: 16px;
  }
  h1 {
    font-size: 24px;
  }
  .connect-actions {
    justify-content: flex-start;
  }
  .connect-actions button {
    flex: 1;
    font-size: 11px;
  }
  .properties {
    grid-template-columns: 1fr 1fr;
  }
  .artifact-meta,
  fieldset {
    grid-template-columns: 1fr;
  }
  .uninstall-row {
    align-items: stretch;
    flex-direction: column;
  }
  .uninstall-row button {
    align-self: flex-start;
  }
  .panel-footer {
    align-items: stretch;
  }
  .panel-footer button {
    width: 100%;
  }
}
.brand,
.nav,
h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}
.device-icon {
  line-height: 0;
}
.phone-empty > svg {
  color: #72829d;
}
.transport-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.transport-row label {
  flex: 1;
  min-width: 180px;
  margin: 0;
}
.transport-row select {
  width: 100%;
  border: 1px solid #455269;
  border-radius: 6px;
  padding: 11px;
  background: #171e29;
  color: #dce4f1;
  min-height: 42px;
  font: inherit;
}
.transport-row button {
  flex-shrink: 0;
}

/* frontend/src/platform.css */
[hidden] {
  display: none !important;
}
.platform-layout > aside nav {
  display: grid;
  gap: 10px;
}
.platform-layout > aside .nav {
  margin: 0;
  background: transparent;
  border-color: transparent;
  color: #aebdd5;
  text-align: left;
  display: block;
  width: 100%;
}
.platform-layout > aside .nav.active {
  background: #2a3355;
  border-color: #414f7c;
  color: #edf0ff;
}
.sidebar-label {
  font-size: 10px;
  margin: 38px 14px 14px;
  letter-spacing: 1.4px;
  color: #8b9fbf;
}
.platform-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.platform-top label {
  min-width: 240px;
}
.platform-layout select {
  min-height: 42px;
  max-width: 100%;
  padding: 9px 12px;
  border: 1px solid #455269;
  background: #171e29;
  color: #dce4f1;
  border-radius: 6px;
  font: inherit;
}
.platform-controls {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: space-between;
  background: #192331;
  border: 1px solid #34445f;
  border-radius: 9px;
  padding: 12px 16px;
  margin: 14px 0 22px;
  font-size: 11px;
  color: #abbfdc;
}
.platform-controls > div {
  display: flex;
  gap: 8px;
}
.platform-controls button {
  font-size: 11px;
  min-height: 36px;
  padding: 7px 12px;
}
.platform-workspace section {
  margin: 0;
}
.platform-workspace input,
.platform-workspace textarea,
.platform-workspace select {
  color: #dce5f5 !important;
  background: #171e29 !important;
  border-color: #45536e !important;
}
.platform-workspace button {
  font: inherit;
  min-height: 38px;
  border: 1px solid #45536e;
  border-radius: 7px;
  padding: 9px 13px;
  background: #252f41;
  color: #c6d5ed;
}
.platform-workspace button.primary,
.platform-workspace button.active {
  background: #8797f5 !important;
  color: #131a2e !important;
  border-color: #8797f5 !important;
}
.platform-workspace label,
.platform-workspace p,
.platform-workspace small {
  color: #aebed6 !important;
}
.platform-workspace h2,
.platform-workspace h3,
.platform-workspace b,
.platform-workspace h4 {
  color: #e4ebf8 !important;
}
.platform-workspace .central-hero,
.platform-workspace .acq-intro {
  background: #1d2532 !important;
  border-color: #3a4964 !important;
}
.platform-workspace .central-notice,
.platform-workspace .acq-notice {
  background: #202b3d !important;
  border: 1px solid #3d506e;
  color: #c4d4f0 !important;
  border-radius: 8px;
}
.platform-workspace .acq-notice {
  padding: 12px 15px;
}
.platform-workspace .central-notice[data-tone=error] {
  background: #39252e !important;
  color: #ffc4ca !important;
}
.platform-workspace .central-notice[data-tone=warning] {
  background: #302a25 !important;
  color: #f1cca9 !important;
}
.platform-workspace .central-notice[data-tone=success] {
  background: #1d322d !important;
  color: #a0e0bd !important;
}
.platform-workspace pre,
.platform-workspace .acq-url {
  white-space: pre-wrap;
  background: #141c28 !important;
  color: #c3d5ef !important;
  border-color: #3e5270 !important;
}
.platform-workspace .central-table-card,
.platform-workspace .central-config-card,
.platform-workspace .acq-card {
  box-shadow: none !important;
  border-color: #364760 !important;
}
.platform-workspace textarea {
  font-size: 12px;
  line-height: 1.7;
  padding: 12px;
  resize: vertical;
}
.platform-workspace .central-product-options {
  background: #202b3d !important;
  border-color: #4a5d7a !important;
  z-index: 40;
}
.platform-workspace .central-product-options button {
  background: #202b3d !important;
  color: #dbe6f9 !important;
}
.platform-workspace .central-product-options button:hover {
  background: #303f5b !important;
}
.platform-workspace .central-detail {
  max-width: min(1000px, 94vw);
  background: #1c2635 !important;
  border: 1px solid #586988 !important;
  color: #d3e2fa !important;
}
.platform-workspace .central-detail::backdrop,
.platform-confirm::backdrop {
  background: #080e19c9;
}
.platform-confirm {
  background: #1d2737;
  border: 1px solid #52688d;
  color: #e0e9f9;
  max-width: 560px;
  width: calc(100% - 30px);
  padding: 26px;
  border-radius: 12px;
}
.platform-confirm p {
  white-space: pre-wrap;
  line-height: 1.9;
}
.platform-confirm small {
  color: #9badcc;
}
.dialog-error {
  padding: 12px;
  color: #ffb6c4;
  background: #3b2330;
  border-radius: 6px;
  font-size: 12px;
  margin: 12px 0;
}
.platform-layout > .notice button {
  margin-left: 15px;
}
.platform-workspace .central-table-head {
  gap: 16px;
}
.platform-workspace .acq-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.platform-workspace .acq-tabs button {
  font-size: 12px;
}
.platform-workspace .central-page-actions,
.platform-workspace .central-actions {
  flex-wrap: wrap;
}
.platform-workspace .helper {
  font-size: 11px;
}
.device-workspace {
  min-width: 0;
}
.platform-workspace .acq-kicker,
.platform-workspace .central-kicker {
  font-size: 10px !important;
  letter-spacing: 1.5px;
  color: #a8b9dc !important;
}
@media (max-width: 800px) {
  .platform-top {
    align-items: stretch;
    flex-direction: column;
  }
  .platform-controls {
    align-items: stretch;
    flex-direction: column;
  }
  .platform-controls > div {
    flex-wrap: wrap;
  }
  .platform-layout > aside {
    width: 170px;
  }
  .platform-top label {
    min-width: 0;
  }
}
@media (max-width: 600px) {
  .platform-layout {
    display: block;
  }
  .platform-layout > aside {
    display: flex;
    position: static;
    width: 100%;
    height: auto;
    padding: 13px 16px;
    border-right: 0;
    border-bottom: 1px solid #354259;
  }
  .platform-layout > aside .brand {
    font-size: 20px;
  }
  .platform-layout > aside nav {
    display: flex;
    margin-top: 13px;
    gap: 6px;
  }
  .platform-layout > aside .nav {
    font-size: 11px;
    padding: 9px;
  }
  .platform-layout > aside .sidebar-label,
  .platform-layout > aside .side-foot {
    display: none;
  }
  .platform-workspace .central-toolbar {
    flex-wrap: wrap;
  }
  .platform-workspace .central-config-card {
    min-width: 0;
  }
  .platform-workspace .central-config-grid {
    grid-template-columns: 1fr !important;
  }
  .platform-workspace .acq-tabs button {
    flex: 1;
    white-space: nowrap;
  }
}
.computer-pairing {
  margin-bottom: 24px;
}
.pair-actions {
  display: flex;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
}
.pair-actions a {
  color: #b5c5ff;
  font-size: 13px;
}
.pair-actions label {
  min-width: 220px;
  flex: 1;
}
.pair-actions input {
  display: block;
  width: 100%;
  margin-top: 7px;
}
.computer-pairing p:last-child {
  margin-bottom: 0;
}
