:root {
  --bg: #0b1017;
  --bg-soft: #111925;
  --panel: #131c29;
  --panel-2: #18222f;
  --line: #223044;
  --text: #e8eef7;
  --muted: #8ba0bb;
  --accent: #4da3ff;
  --accent-2: #28d3a5;
  --warn: #f5b544;
  --danger: #ff6b6b;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: radial-gradient(1200px 600px at 15% -10%, #16233a 0%, var(--bg) 55%) fixed;
  color: var(--text);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 40px;
}

h1, h2 { margin: 0; font-weight: 600; }
h1 { font-size: 19px; letter-spacing: .3px; }
h2 { font-size: 15px; }

.hidden { display: none !important; }
.hint { color: var(--muted); font-size: 12px; }
.num { text-align: right; }

/* ---------------- top bar ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 22px;
  background: rgba(11, 16, 23, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 11px; font-size: 20px;
  background: linear-gradient(140deg, #1d3f6b, #10202f);
  color: var(--accent);
  border: 1px solid #23405f;
}
.sub { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.chip {
  background: var(--panel); border: 1px solid var(--line); color: var(--muted);
  padding: 6px 11px; border-radius: 9px; font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.chip.select { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; }
.chip select { background: transparent; border: 0; color: var(--text); font-size: 12px; outline: none; }

.btn {
  background: linear-gradient(180deg, #1e5f9e, #17507f);
  color: #fff; border: 1px solid #2b6ea9; border-radius: 9px;
  padding: 7px 13px; font-size: 12.5px; cursor: pointer;
  transition: transform .08s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: var(--panel); border-color: var(--line); color: var(--text); }
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn.danger { background: linear-gradient(180deg, #9e2f2f, #7d2020); border-color: #b84343; }
.btn.warn { background: linear-gradient(180deg, #9c6b19, #7b5312); border-color: #b98a2a; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.banner {
  margin: 16px 22px 0; padding: 11px 15px; border-radius: 11px;
  background: rgba(245, 181, 68, .12); border: 1px solid rgba(245, 181, 68, .45);
  color: #ffd479; font-size: 13px;
}

main { padding: 18px 22px 0; display: grid; gap: 16px; }

/* ---------------- cards ---------------- */
.cards {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.card {
  background: linear-gradient(180deg, var(--panel), var(--bg-soft));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 16px; box-shadow: var(--shadow);
}
.card.compact { display: flex; flex-direction: column; justify-content: space-between; }
.metric-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12.5px; }
.metric-body { display: flex; align-items: center; gap: 16px; margin-top: 10px; }
.metric-side { flex: 1; min-width: 0; display: grid; gap: 6px; }
.metric-side .hint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ring {
  --p: 0;
  width: 92px; height: 92px; flex: none; border-radius: 50%;
  display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--ring-color, var(--accent)) calc(var(--p) * 1%), rgba(255, 255, 255, .07) 0);
  transition: background .4s ease;
}
.ring::after {
  content: ""; position: absolute; inset: 8px; border-radius: 50%;
  background: #0f1722; border: 1px solid var(--line);
}
.ring span {
  position: relative; z-index: 1; font-size: 19px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.ring.high { --ring-color: var(--warn); }
.ring.critical { --ring-color: var(--danger); }

.spark { width: 100%; height: 48px; display: block; }
.big { margin: 10px 0 6px; font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }

.bar { height: 7px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.bar > span { display: block; height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .4s ease; }

/* ---------------- panels ---------------- */
.grid.two { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.panel {
  background: linear-gradient(180deg, var(--panel), var(--bg-soft));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 16px; box-shadow: var(--shadow); min-width: 0;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.panel-tools select {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 5px 8px; font-size: 12px;
}
.legend { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); }
.legend strong { color: var(--text); font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 5px; }
.dot.in { background: var(--accent); }
.dot.out { background: var(--accent-2); }

#net-chart { width: 100%; height: 180px; display: block; }

/* ---------------- kv & tables ---------------- */
.kv-grid { display: grid; gap: 10px 18px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.kv-grid.wide { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.kv { background: rgba(255, 255, 255, .025); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; min-width: 0; }
.kv .k { color: var(--muted); font-size: 11.5px; display: block; margin-bottom: 3px; }
.kv .v { font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }

.table-wrap { overflow-x: auto; }
.table-wrap.scroll { max-height: 320px; overflow-y: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.table th {
  text-align: left; color: var(--muted); font-weight: 500; font-size: 11.5px;
  padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
  position: sticky; top: 0; background: var(--panel); z-index: 1;
}
table.table td { padding: 7px 10px; border-bottom: 1px solid rgba(34, 48, 68, .55); }
table.table tbody tr:hover { background: rgba(77, 163, 255, .06); }
table.table td.num, table.table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.truncate { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }

/* ---------------- services ---------------- */
.services { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
.service {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(255, 255, 255, .025); border: 1px solid var(--line);
  border-radius: 11px; padding: 10px 12px; min-width: 0;
}
.service .info { min-width: 0; }
.service .name { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }
.service .meta { color: var(--muted); font-size: 11.5px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; }
.service .actions { display: flex; gap: 6px; flex: none; }
.state { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.state.active { background: var(--accent-2); box-shadow: 0 0 0 3px rgba(40, 211, 165, .15); }
.state.failed { background: var(--danger); box-shadow: 0 0 0 3px rgba(255, 107, 107, .15); }
.state.inactive { background: #55647a; }
.badge { font-size: 11px; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); }

/* ---------------- modal ---------------- */
.modal {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center;
  background: rgba(4, 7, 12, .72); backdrop-filter: blur(3px); padding: 24px;
}
.modal-box {
  width: min(1080px, 100%); max-height: 86vh; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.transfer-body { padding: 12px 16px 16px; overflow: auto; }
.transfer-list {
  list-style: none; margin: 8px 0 0; padding: 0; max-height: 46vh; overflow: auto;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg-soft);
}
.transfer-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--line);
}
.transfer-list li:last-child { border-bottom: none; }
.transfer-list li:hover { background: var(--panel-2); }
.transfer-list li.active { background: rgba(77, 163, 255, .18); }
.transfer-list li.up { color: var(--muted); }
.transfer-list .t-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.transfer-list .t-side { color: var(--muted); font-size: 12px; white-space: nowrap; }
.transfer-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.transfer-target { display: flex; align-items: center; gap: 10px; margin: 2px 0 0; }
.transfer-target select { flex: 1; min-width: 0; }
.task-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.task-list li { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: var(--bg-soft); }
.task-list li.running { border-color: rgba(77, 163, 255, .5); }
.task-list li.failed, .task-list li.interrupted { border-color: rgba(255, 107, 107, .45); }
.task-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.task-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-meta { color: var(--muted); font-size: 12px; white-space: nowrap; }
.task-bar { height: 5px; margin: 7px 0 5px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.task-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .3s ease; }
.task-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.task-foot .hint { margin: 0; }
.log-body {
  margin: 0; padding: 14px 16px; overflow: auto; flex: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px; line-height: 1.6; white-space: pre-wrap; word-break: break-all;
  background: #0a0f16; color: #cfe2f5;
}

/* ---------------- toasts ---------------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: grid; gap: 10px; max-width: 420px; }
.toast {
  background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 11px 14px; box-shadow: var(--shadow);
  font-size: 12.5px; animation: slide .25s ease;
}
.toast.ok { border-left-color: var(--accent-2); }
.toast.err { border-left-color: var(--danger); }
.toast strong { display: block; margin-bottom: 3px; font-size: 13px; }
.toast pre { margin: 6px 0 0; font-size: 11.5px; white-space: pre-wrap; word-break: break-all; color: var(--muted); max-height: 150px; overflow: auto; }
@keyframes slide { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.footer {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 18px 22px 0; color: var(--muted); font-size: 11.5px;
}

@media (max-width: 640px) {
  main { padding: 14px 12px 0; }
  .tabs { padding: 12px 12px 0; }
  .topbar { padding: 12px; }
  .cards { grid-template-columns: 1fr; }
  .grid.two { grid-template-columns: 1fr; }
}

/* ---------------- 公开只读 / 管理模式 ---------------- */

/* 未登录时隐藏所有管理类内容；登录后隐藏"登录"入口 */
body:not(.admin) .admin-only { display: none !important; }
body.admin .login-only { display: none !important; }

.chip.ok { color: #7ff0cd; border-color: rgba(40, 211, 165, .45); background: rgba(40, 211, 165, .12); }
.chip.bad { color: #ffb0b0; border-color: rgba(255, 107, 107, .45); background: rgba(255, 107, 107, .12); }
.mode-badge { color: #9dc7ff; border-color: rgba(77, 163, 255, .45); background: rgba(77, 163, 255, .12); }

.notice {
  margin: 16px 22px 0; padding: 12px 16px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  border-radius: 12px; font-size: 13px;
  background: rgba(77, 163, 255, .10);
  border: 1px solid rgba(77, 163, 255, .35);
  color: #cfe2f5;
}
.notice b { color: #fff; }
.notice .btn { margin-left: auto; }

/* ---------------- 内网穿透面板 ---------------- */

.grid.two.tight { gap: 14px; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }

.subpanel {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 14px; margin-top: 14px;
  background: rgba(255, 255, 255, .022);
}
.subpanel h3 { margin: 0 0 10px; font-size: 13.5px; font-weight: 600; color: #cfe2f5; }
.grid.two.tight .subpanel { margin-top: 14px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; margin-bottom: 8px; }
.form-grid label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.form-grid input, .form-grid select, .tiny-input {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 7px 9px; font-size: 12.5px; width: 100%; outline: none;
}
.form-grid input:focus, .form-grid select:focus, .tiny-input:focus { border-color: var(--accent); }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 8px; }
.tiny-input { width: 90px; padding: 5px 8px; }

.btn.tiny { padding: 3px 8px; font-size: 11.5px; border-radius: 7px; }
.tiny-btn { padding: 5px 10px; font-size: 11.5px; }

.tunnel-list { display: grid; gap: 9px; }
.tunnel-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 12px;
}
.tunnel-item-text { min-width: 0; }
.tunnel-item .name { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.tunnel-item .meta { color: var(--muted); font-size: 11.5px; margin-top: 2px; }

.steps { margin: 0 0 10px; padding-left: 20px; font-size: 12.5px; color: #cfe2f5; }
.steps li { margin-bottom: 7px; }
.inline-code {
  background: #0a0f16; border: 1px solid var(--line); border-radius: 6px;
  padding: 2px 6px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px; word-break: break-all;
}

.code-block {
  margin: 0 0 10px; padding: 12px 14px; max-height: 320px; overflow: auto;
  background: #0a0f16; border: 1px solid var(--line); border-radius: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px; line-height: 1.6; white-space: pre-wrap; word-break: break-all;
  color: #cfe2f5;
}

.kv-tools { display: flex; align-items: center; gap: 7px; margin-top: 6px; flex-wrap: wrap; }
.kv.span-2 { grid-column: span 2; }

/* --------------------------------------------------------------- VPN 面板 */
.form-inline { display: flex; gap: 8px; margin: 12px 0 4px; flex-wrap: wrap; }
.form-inline input {
  flex: 1; min-width: 160px; padding: 7px 10px; border-radius: 8px;
  border: 1px solid var(--line); background: rgba(0, 0, 0, .25);
  color: var(--text); font-size: 13px; font-family: inherit;
}
.form-inline input:focus { outline: none; border-color: var(--accent); }

.client-result {
  margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line);
}
.qr-row { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.qr {
  width: 168px; height: 168px; flex: none; padding: 6px; border-radius: 10px;
  background: #fff; image-rendering: pixelated;
}
.qr-side { flex: 1; min-width: 220px; display: grid; gap: 8px; }
.qr-side .code-block { margin-bottom: 0; max-height: 220px; }

.table td .state { margin-right: 7px; }

/* ------------------------------------------------------------ 流量管理 */
.usage-cell { font-size: 12px; white-space: nowrap; min-width: 132px; }
.usage-cell .hint { margin-top: 3px; }

.mini-bar {
  height: 5px; margin-top: 4px; border-radius: 99px; overflow: hidden;
  background: rgba(255, 255, 255, .09);
}
.mini-bar > span {
  display: block; height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .3s ease;
}
.mini-bar > span.warn { background: linear-gradient(90deg, #f5b544, #d98b1f); }
.mini-bar > span.over { background: linear-gradient(90deg, #ff6b6b, #b93b3b); }

.bar > span.warn { background: linear-gradient(90deg, #f5b544, #d98b1f); }
.bar > span.over { background: linear-gradient(90deg, #ff6b6b, #b93b3b); }

/* 实时隧道：标题栏 + 离线记录 */
.subpanel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.subpanel-head h3 { margin: 0; }
table.table tbody tr.row-offline { opacity: .5; }
.badge.offline { color: #ffd9a0; border-color: rgba(245, 181, 68, .45); background: rgba(245, 181, 68, .12); }

.badge.danger-badge {
  color: #ffb0b0; border-color: rgba(255, 107, 107, .45); background: rgba(255, 107, 107, .12);
}

.usage-body { padding: 14px 16px 18px; overflow: auto; display: grid; gap: 12px; }
.usage-bar { height: 8px; }
.check-label {
  display: flex !important; align-items: center; gap: 8px;
  font-size: 12.5px; color: #cfe2f5;
}
.check-label input { width: auto; }

/* ------------------------------------------------------------ 功能分页 */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 22px 0; }
.tab {
  appearance: none; cursor: pointer; font: inherit; font-size: 13px;
  padding: 7px 15px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); color: var(--muted);
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.tab:hover { color: var(--text); border-color: #2d4463; }
.tab-badge {
  display: inline-block; min-width: 16px; margin-left: 6px; padding: 0 4px;
  border-radius: 999px; background: var(--accent); color: #06101c;
  font-size: 11px; font-weight: 700; line-height: 16px; text-align: center;
  vertical-align: 1px;
}
.tab.active {
  color: #fff;
  background: linear-gradient(180deg, #2a6fbe, #1f5596);
  border-color: #3f83d6;
  box-shadow: 0 2px 10px rgba(45, 120, 200, .28);
}

.page { display: grid; gap: 16px; }

/* ------------------------------------------------------------ 文件分享 */
.dropzone {
  border: 1.5px dashed #2f4462; border-radius: 12px; padding: 22px 16px;
  text-align: center; cursor: pointer; background: rgba(255, 255, 255, .02);
  transition: border-color .15s ease, background .15s ease;
}
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: rgba(77, 163, 255, .09); }
.dropzone.ready { border-style: solid; border-color: rgba(40, 211, 165, .5); background: rgba(40, 211, 165, .07); }
.dropzone .drop-title { margin: 0 0 6px; font-size: 13.5px; font-weight: 600; color: #cfe2f5; overflow-wrap: anywhere; }
.dropzone .hint { margin: 0; }

.share-progress { margin: 10px 0 4px; display: grid; gap: 6px; }
.quota { margin: 10px 0 12px; display: grid; gap: 6px; }
.hint.danger { color: #ff9d9d; }
.share-queue-box { margin: 12px 0 4px; }
.share-queue { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 260px; overflow-y: auto; }
.share-queue li {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center;
  background: rgba(255, 255, 255, .025); border: 1px solid var(--line);
  border-radius: 9px; padding: 7px 10px; font-size: 12.5px;
}
.share-queue .q-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-queue .q-meta { color: var(--muted); font-size: 11.5px; }
.share-queue .q-state { font-variant-numeric: tabular-nums; white-space: nowrap; }
.share-queue .q-state.done { color: var(--accent-2); }
.share-queue .q-state.failed { color: var(--danger); }
.share-queue .q-bar { grid-column: 1 / -1; height: 4px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.share-queue .q-bar > span { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #2a6fbe, #4da3ff); }
.share-queue .q-tools { display: flex; gap: 6px; }
.stack { display: grid; gap: 14px; align-content: start; }
.share-result { margin-top: 12px; display: grid; gap: 10px; }
.share-link-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.share-link-input {
  flex: 1; min-width: 220px; padding: 8px 11px; border-radius: 9px;
  border: 1px solid var(--line); background: #0f1722; color: #bcd6ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px;
}
.share-link-input:focus { outline: none; border-color: var(--accent); }
.shares-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.shares-name .truncate { max-width: 260px; }
.shares-note { color: var(--muted); font-size: 11px; margin-top: 2px; overflow-wrap: anywhere; }
.share-modal-body { padding: 16px; }

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .kv.span-2 { grid-column: span 1; }
  .notice { margin: 14px 12px 0; }
  .shares-name .truncate { max-width: 160px; }
}
