Download
457 lines 13.6 KiBCSSModified 2026-07-25 raw
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457
/* ── Palette ──────────────────────────────────────────────────────────────── */
:root {
  --title-l:    rgb(10, 42, 115);
  --title-r:    rgb(46, 118, 200);
  --close-n:    rgb(172, 32, 32);
  --close-h:    rgb(208, 50, 50);

  --panel-t:    rgb(248, 246, 242);
  --panel-b:    rgb(228, 225, 219);

  --win-bg:     rgb(238, 235, 230);
  --list-bg:    white;
  --sel-bg:     rgb(13, 105, 213);
  --row-hov:    rgb(230, 242, 255);
  --row-conn:   rgb(238, 252, 238);
  --sep:        rgb(226, 223, 218);

  --text:       rgb(22, 22, 22);
  --subtext:    rgb(112, 109, 104);
  --border:     rgb(168, 165, 160);
  --success:    rgb(28, 132, 28);
  --conn-text:  rgb(24, 112, 24);
  --bar-dim:    rgb(178, 175, 170);

  --toggle-on:  rgb(52, 199, 89);
  --toggle-off: rgb(142, 142, 147);

  --btn-face:   rgb(224, 221, 216);
  --btn-conn:   rgb(13, 105, 213);
  --btn-disc:   rgb(175, 38, 22);
  --btn-dis-bg: rgb(200, 197, 192);
  --btn-dis-fg: rgb(142, 139, 134);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
  font-family: system-ui, sans-serif;
  font-size: 13px;
  color: var(--text);
  background: var(--win-bg);
  user-select: none;
  cursor: default;
}

.hidden { display: none !important; }
.spacer { flex: 1; }

/* ── Title bar ────────────────────────────────────────────────────────────── */
#titlebar {
  display: flex;
  align-items: center;
  height: 26px;
  padding-left: 10px;
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.10), rgba(0,0,0,0.12)),
    linear-gradient(to right, var(--title-l), var(--title-r));
  color: white;
}

#titlebar .title { flex: 1; font-size: 13px; }

#close-btn {
  width: 33px;
  height: 20px;
  margin: 3px 3px 3px 0;
  border: none;
  border-radius: 4px;
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--close-n) 100%, white 15%),
    color-mix(in srgb, var(--close-n) 100%, black 15%));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
#close-btn:hover {
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--close-h) 100%, white 15%),
    color-mix(in srgb, var(--close-h) 100%, black 15%));
}

/* ── View layout ──────────────────────────────────────────────────────────── */
.view {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 26px);
}

.content {
  flex: 1;
  overflow-y: auto;
}
.content.pad { padding: 22px 20px 8px; }
.content.list { background: var(--win-bg); padding: 10px; }

/* ── Panels (header / footer) ─────────────────────────────────────────────── */
.panel {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  background: linear-gradient(to bottom, var(--panel-t), var(--panel-b));
}
.panel.footer { padding: 7px 8px; }

#conn-status { font-size: 12px; color: var(--subtext); }
#conn-status.connected { color: var(--text); }
#conn-status.connected::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--success);
}

.status { font-size: 11px; color: var(--subtext); }
.status.error { color: var(--btn-disc); }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  min-height: 26px;
  padding: 0 12px;
  font-size: 13px;
  font-family: inherit;
  border-radius: 3px;
  border: 1px solid var(--border);
  background-image: linear-gradient(to bottom, rgba(255,255,255,0.10), rgba(0,0,0,0.07));
  cursor: pointer;
  color: white;
}
.btn.neutral { background-color: var(--btn-face); color: var(--text); }
.btn.neutral:hover { background-color: rgb(210, 207, 202); }
.btn.connect { background-color: var(--btn-conn); border-color: color-mix(in srgb, var(--btn-conn) 100%, black 12%); min-width: 85px; }
.btn.disconnect { background-color: var(--btn-disc); border-color: color-mix(in srgb, var(--btn-disc) 100%, black 12%); min-width: 95px; }
.btn.forget { background-color: var(--btn-disc); border-color: color-mix(in srgb, var(--btn-disc) 100%, black 12%); min-width: 68px; }
.btn.save { background-color: var(--btn-conn); border-color: color-mix(in srgb, var(--btn-conn) 100%, black 12%); min-width: 108px; }
.btn:disabled {
  background-color: var(--btn-dis-bg);
  color: var(--btn-dis-fg);
  border-color: var(--border);
  cursor: default;
}
.btn:not(:disabled):hover { filter: brightness(1.06); }
.btn:not(:disabled):active { filter: brightness(0.92); }

/* ── Toggle switch ────────────────────────────────────────────────────────── */
.toggle {
  position: relative;
  width: 38px;
  height: 22px;
  margin-left: 4px;
  flex-shrink: 0;
  cursor: pointer;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .knob {
  position: absolute;
  inset: 0;
  border-radius: 11px;
  background: var(--toggle-off);
  transition: background 0.15s;
}
.toggle .knob::after {
  content: "";
  position: absolute;
  top: 2.5px;
  left: 2.5px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 2px rgba(0,0,0,0.25);
  transition: transform 0.15s;
}
.toggle input:checked + .knob { background: var(--toggle-on); }
.toggle input:checked + .knob::after { transform: translateX(16px); }

/* ── Spinner ──────────────────────────────────────────────────────────────── */
.spinner {
  width: 14px;
  height: 14px;
  margin-right: 4px;
  border: 2px solid transparent;
  border-top-color: var(--subtext);
  border-right-color: var(--subtext);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Network list rows ────────────────────────────────────────────────────── */
.list-card { margin-top: 0; }
.other-card { margin-top: 10px; }

.row {
  display: flex;
  align-items: center;
  height: 50px;
  padding: 0 12px;
  cursor: pointer;
  transition: background 0.1s;
}
.row + .row { border-top: 1px solid var(--sep); }
.row:hover { background: var(--row-hov); }
.row.in-use { background: var(--row-conn); }
.row.in-use:hover { background: var(--row-hov); }
.row.selected, .row.selected:hover { background: var(--sel-bg); }

.row .bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  width: 28px;
  margin-right: 12px;
  flex-shrink: 0;
}
.row .bars i {
  width: 4.5px;
  border-radius: 1px;
  background: var(--bar-dim);
}
.row .bars i:nth-child(1) { height: 4px; }
.row .bars i:nth-child(2) { height: 8px; }
.row .bars i:nth-child(3) { height: 12px; }
.row .bars i:nth-child(4) { height: 16px; }
.row .bars i.on { background: rgb(64, 64, 64); }
.row.in-use .bars i.on { background: var(--conn-text); }
.row.selected .bars i.on { background: white; }

.row .labels { flex: 1; min-width: 0; }
.row .ssid {
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row.in-use .ssid { color: var(--conn-text); }
.row.selected .ssid { color: white; }
.row .sub {
  font-size: 11px;
  color: var(--subtext);
  margin-top: 2px;
}
.row.selected .sub { color: rgb(185, 210, 248); }

.row .icon { flex-shrink: 0; margin-left: 8px; }
.row .icon svg { display: block; }
.row .icon .stroke { stroke: var(--subtext); }
.row .icon .fill { fill: var(--subtext); }
.row .icon.check .stroke { stroke: var(--success); }
.row.selected .icon .stroke { stroke: white; }
.row.selected .icon .fill { fill: white; }

.row.other { height: 42px; }
.row.other .ssid { font-size: 12.5px; }

.icon.chev .stroke { stroke: var(--bar-dim); }
.row:hover .icon.chev .stroke { stroke: var(--subtext); }
.row.selected .icon.chev .stroke { stroke: rgba(255, 255, 255, 0.85); }

/* ── VPN card (pinned above the list) ─────────────────────────────────────── */
.vpn-wrap { padding: 10px 10px 0; background: var(--win-bg); }
.vpn-wrap .info-card { margin-top: 0; }

.row.vpn-row { height: 44px; cursor: default; }
.row.vpn-row:hover { background: transparent; }
.row.vpn-row.in-use, .row.vpn-row.in-use:hover { background: var(--row-conn); }

.vpn-icon {
  display: flex;
  justify-content: center;
  width: 28px;
  margin-right: 12px;
  flex-shrink: 0;
  color: var(--bar-dim);
}
.row.vpn-row.in-use .vpn-icon { color: var(--conn-text); }

.row.vpn-row .spinner { margin-right: 8px; }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 100%;
  color: var(--subtext);
}
.empty svg { color: var(--bar-dim); }

/* ── Password / info views ────────────────────────────────────────────────── */
h2 { font-size: 15px; font-weight: 600; }

.info-head { display: flex; align-items: center; gap: 12px; }
.info-head .info-head-text { flex: 1; min-width: 0; }
.info-head h2 {
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
p.sub { font-size: 12px; color: var(--subtext); margin-top: 4px; }
p.sub.connected { color: var(--success); }
p.sub.connected::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--success);
}

input[type="password"], input[type="text"] {
  width: 100%;
  padding: 5px 8px;
  font-size: 13px;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: white;
  color: var(--text);
  user-select: text;
  cursor: text;
}
input:focus { outline: 2px solid var(--sel-bg); outline-offset: -1px; }

#pw-status { margin-top: 10px; }

/* ── Info view cards ──────────────────────────────────────────────────────── */
.info-sec {
  margin: 14px 2px 0;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--subtext);
}
.info-card {
  margin-top: 10px;
  background: var(--list-bg);
  border: 1px solid var(--sep);
  border-radius: 6px;
  overflow: hidden;
}
.info-sec + .info-card { margin-top: 6px; }

.irow {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 2px 10px;
  transition: background 0.1s;
}
.irow + .irow { border-top: 1px solid var(--sep); }
.irow:hover { background: rgb(246, 250, 255); }
.irow:focus-within { background: var(--row-hov); }

.ilabel {
  width: 84px;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--subtext);
}
.ival {
  flex: 1;
  min-width: 0;
  text-align: right;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: text;
  cursor: text;
}
.ival.sigval {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  user-select: none;
  cursor: default;
}

.irow .bars { display: flex; align-items: flex-end; gap: 2px; }
.irow .bars i { width: 3.5px; border-radius: 1px; background: var(--bar-dim); }
.irow .bars i:nth-child(1) { height: 4px; }
.irow .bars i:nth-child(2) { height: 7px; }
.irow .bars i:nth-child(3) { height: 10px; }
.irow .bars i:nth-child(4) { height: 13px; }
.irow .bars i.on { background: rgb(64, 64, 64); }

/* Small icon buttons (copy / show-password) — fade in on row hover */
.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  padding: 0;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: var(--subtext);
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.12s, background 0.12s, color 0.12s;
}
.irow:hover .icon-btn, .icon-btn:focus-visible { opacity: 1; }
.icon-btn:hover { background: rgba(0, 0, 0, 0.08); color: var(--text); }
.icon-btn:active { background: rgba(0, 0, 0, 0.14); }
.icon-btn.done { opacity: 1; color: var(--success); }
.icon-btn svg { display: block; }

/* Header scan button */
.icon-btn.header-btn {
  width: 26px;
  height: 26px;
  opacity: 0.75;
  color: var(--text);
}
.icon-btn.header-btn:hover { opacity: 1; }
.icon-btn.header-btn:disabled { background: transparent; cursor: default; }
.icon-btn.spinning svg { animation: spin 0.9s linear infinite; }

/* Inline (borderless) password field inside a card row */
.irow input.pw {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  font-size: 12.5px;
  font-family: inherit;
  text-align: right;
  color: var(--text);
  user-select: text;
  cursor: text;
}
.irow input.pw:focus { outline: none; }
.irow input.pw::placeholder { color: var(--bar-dim); }

/* Compact toggle for card rows */
.toggle.small { width: 32px; height: 19px; margin-left: 0; }
.toggle.small .knob::after { width: 14px; height: 14px; top: 2.5px; left: 2.5px; }
.toggle.small input:checked + .knob::after { transform: translateX(13px); }

#info-noprofile { margin-top: 14px; }
#info-status { margin-top: 8px; }