/* ============================================================
   DeviceHub — panel quản lý tài khoản thiết bị.

   Hệ thị giác: giấy sáng + mực chàm + nhấn hồng — cùng bảng màu
   với hiệu ứng canvas của sakuga-vfx (trắng / chàm / hồng).
   Token:
     nền #F7F4FF · card #FFFFFF · mực #1D1A4A · phụ #6B6590
     nhấn #FF5FA8 · phụ nhấn #5A4FD8 · ok #0F9D63 · bad #E11D48
     typography Fira Sans / Fira Code
   Không dùng thư viện ngoài — chỉ CSS thuần.
   ============================================================ */

:root {
  color-scheme: light;

  /* surfaces */
  --page: #f7f4ff;
  --card: #ffffff;
  --card-2: #f1edff;
  --chip: rgba(29, 26, 74, .06);

  /* text */
  --ink: #1d1a4a;
  --mute: #6b6590;

  /* lines & glass */
  --line: rgba(29, 26, 74, .13);
  --line-2: rgba(29, 26, 74, .26);
  --glass: rgba(255, 255, 255, .84);
  --glass-2: rgba(255, 255, 255, .96);

  /* brand */
  --acc: #ff5fa8;
  --acc-ink: #ffffff;
  --acc-soft: rgba(255, 95, 168, .14);
  --blue: #5a4fd8;
  --ok: #0f9d63;
  --warn: #b26a00;
  --bad: #e11d48;

  --r: 16px;
  --shadow: 0 18px 40px -26px rgba(29, 26, 74, .28);

  --font: "Fira Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --display: "Fira Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "Fira Code", ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: rgba(29, 26, 74, .35) transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background-color: var(--page);
  background-image:
    radial-gradient(1100px 620px at 8% -12%, rgba(255, 95, 168, .16), transparent 62%),
    radial-gradient(900px 520px at 102% -6%, rgba(90, 79, 216, .20), transparent 58%),
    radial-gradient(820px 640px at 52% 118%, rgba(143, 141, 247, .14), transparent 62%);
  background-attachment: fixed;
  font: 400 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
button { font: inherit; color: inherit; }

::selection { background: rgba(255, 95, 168, .28); color: #fff; }

:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ------------------------------------------------------------- layout */

.app {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  min-height: 100vh;
}

.side {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 16px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .86) 0%, rgba(241, 237, 255, .78) 100%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  backdrop-filter: blur(18px) saturate(120%);
  overflow-y: auto;
}

.main {
  min-width: 0;
  padding: 24px 28px 44px;
  max-width: 1280px;
}

/* -------------------------------------------------------------- brand */

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.logo {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: block;
  object-fit: contain;
}

.brand b {
  display: block;
  font: 600 16.5px/1 var(--display);
  letter-spacing: -.01em;
}

.brand small {
  display: block;
  margin-top: 5px;
  color: var(--mute);
  font: 500 10px/1 var(--mono);
  letter-spacing: .18em;
  text-transform: uppercase;
}

.brand-lg .logo {
  width: 52px;
  height: 52px;
}

/* ---------------------------------------------------------------- nav */

.nav {
  display: grid;
  gap: 4px;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--mute);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.nav a:hover {
  background: rgba(29, 26, 74, .08);
  color: var(--ink);
}

.nav a.on {
  background: linear-gradient(90deg, rgba(255, 95, 168, .18) 0%, rgba(255, 95, 168, .04) 100%);
  border-color: rgba(255, 95, 168, .28);
  color: var(--ink);
  font-weight: 600;
}

.nav .ico {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: var(--mute);
  transition: color .18s ease;
}

.nav a:hover .ico { color: var(--ink); }
.nav a.on .ico { color: var(--acc); }

.side-foot {
  margin-top: auto;
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.me {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ava {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: rgba(29, 26, 74, .10);
  color: var(--ink);
  font: 600 14px/1 var(--display);
}

.me-txt { min-width: 0; }

.me-txt b {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.me-txt small { color: var(--mute); font-size: 11.5px; }

/* --------------------------------------------------------------- top */

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 20px;
}

.top h1 {
  margin: 0;
  font: 600 26px/1.15 var(--display);
  letter-spacing: -.02em;
}

.top p { margin: 6px 0 0; color: var(--mute); font-size: 13px; }

.top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ------------------------------------------------------------- cards */

.card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(255, 255, 255, .86) 0%, rgba(255, 255, 255, .74) 100%);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .05);
}

.card-h {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.card-h h2 {
  margin: 0;
  font: 600 15px/1.2 var(--display);
  letter-spacing: -.005em;
}

.card-b { padding: 18px; }

.card-f {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 13px 18px 15px;
  border-top: 1px solid var(--line);
}

.card-wide-gap { margin-top: 16px; }

.side-card { align-self: start; }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

/* -------------------------------------------------------------- stats */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.stat {
  position: relative;
  overflow: hidden;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .88) 0%, rgba(255, 255, 255, .72) 100%);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .05);
}

.stat::after {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -46px;
  width: 124px;
  height: 124px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(90, 79, 216, .22), transparent 70%);
  pointer-events: none;
}

.stat.acc::after {
  background: radial-gradient(circle, rgba(255, 95, 168, .30), transparent 70%);
}

.stat .n {
  position: relative;
  font: 600 30px/1 var(--display);
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}

.stat .n-sub {
  font-size: 17px;
  font-weight: 500;
  color: var(--mute);
  letter-spacing: 0;
  margin-left: 2px;
}

.stat .l {
  position: relative;
  margin-top: 8px;
  color: var(--mute);
  font-size: 12.5px;
  font-weight: 500;
}

.stat-bar { margin-top: 10px; }

/* -------------------------------------------------------------- table */

.tbl-wrap { overflow-x: auto; }

.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.tbl th {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(241, 237, 255, .45);
  color: var(--mute);
  font: 500 10.5px/1.4 var(--mono);
  letter-spacing: .12em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.tbl td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(29, 26, 74, .10);
  vertical-align: middle;
}

.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .18s ease; }
.tbl tbody tr:hover td { background: rgba(29, 26, 74, .06); }

.mono { font: 400 12.5px/1.5 var(--mono); color: var(--mute); }
.mono-ink { font: 500 13px/1.4 var(--mono); color: var(--ink); }

.cell-sub {
  display: block;
  margin-top: 3px;
  color: var(--mute);
  font-size: 12px;
}

/* <td class="cell-sub"> vẫn phải là ô bảng, nếu không đường kẻ hàng bị lệch */
td.cell-sub { display: table-cell; margin: 0; }

.cell-q { min-width: 110px; }
.cell-q .q { margin-top: 7px; }

/* giữ là ô bảng (không đặt display: flex lên <td>) để đường kẻ hàng thẳng */
.cell-actions {
  white-space: nowrap;
  min-width: 118px;
}

.cell-actions > * { vertical-align: middle; }
.cell-actions > * + * { margin-left: 6px; }

.inline { display: inline; margin: 0; }

/* ------------------------------------------------------------- badges */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font: 500 10.5px/1.25 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge .d {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.b-ok { color: #0b7a4b; border-color: rgba(15, 157, 99, .40); background: rgba(15, 157, 99, .10); }
.b-warn { color: #8a5a00; border-color: rgba(178, 106, 0, .40); background: rgba(178, 106, 0, .12); }
.b-bad { color: #b01a3c; border-color: rgba(225, 29, 72, .40); background: rgba(225, 29, 72, .12); }
.b-info { color: #4a3fc4; border-color: rgba(90, 79, 216, .40); background: rgba(90, 79, 216, .12); }
.b-mut { color: #3b3670; border-color: var(--line-2); background: rgba(29, 26, 74, .10); }
.b-acc { color: #b3155f; border-color: rgba(255, 95, 168, .45); background: rgba(255, 95, 168, .14); }

/* -------------------------------------------------------------- quota */

.q {
  height: 8px;
  overflow: hidden;
  border: 1px solid rgba(29, 26, 74, .16);
  border-radius: 999px;
  background: rgba(241, 237, 255, .65);
}

.q i {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #d92d80 0%, #ff5fa8 60%, #ff7ab5 100%);
  box-shadow: 0 0 12px rgba(255, 95, 168, .55);
  transition: width .3s ease;
}

.q.over i {
  background: linear-gradient(90deg, #dc2626 0%, #ef4444 60%, #f87171 100%);
  box-shadow: 0 0 12px rgba(225, 29, 72, .55);
}

/* -------------------------------------------------------------- tabs */

.tabs-h { align-items: center; }

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
  color: var(--mute);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}

.tab:hover { border-color: var(--line-2); color: var(--ink); }

.tab.on {
  border-color: rgba(255, 95, 168, .45);
  background: rgba(255, 95, 168, .14);
  color: #a8175a;
  font-weight: 600;
}

.tab-n {
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(241, 237, 255, .7);
  color: var(--ink);
  font: 500 10.5px/1.5 var(--mono);
}

.tab.on .tab-n { background: rgba(255, 95, 168, .25); color: #a8175a; }

/* ------------------------------------------------------------ filters */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

.inp-grow { flex: 1 1 220px; }

.filters select.inp,
.filters input.inp:not(.inp-grow) {
  flex: 0 0 auto;
  width: auto;
  min-width: 170px;
}

/* -------------------------------------------------------------- forms */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field label {
  color: var(--mute);
  font: 500 10.5px/1.4 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hint {
  color: var(--mute);
  font-size: 11.5px;
  line-height: 1.5;
}

.inp {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: rgba(241, 237, 255, .58);
  color: var(--ink);
  font: 400 14px/1.45 var(--font);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.inp:hover { border-color: rgba(29, 26, 74, .48); }

.inp:focus {
  border-color: var(--acc);
  background: rgba(241, 237, 255, .85);
  box-shadow: 0 0 0 3px rgba(255, 95, 168, .18);
}

.inp::placeholder { color: #8b86ad; }

select.inp {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6590' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

textarea.inp { resize: vertical; min-height: 90px; }

.inp-row {
  display: flex;
  gap: 6px;
  align-items: stretch;
}

.inp-row .inp { flex: 1 1 auto; min-width: 0; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 16px;
}

.field-full { grid-column: 1 / -1; }

.form-2col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
}

.form-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.meta {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.meta > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
  font-size: 12.5px;
}

.meta span { color: var(--mute); }
.meta b { font-weight: 600; }

.tips {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
  font-size: 12.5px;
  line-height: 1.55;
}

.tips li {
  padding-left: 18px;
  position: relative;
  color: var(--ink);
}

.tips li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--acc);
  border-radius: 2px;
  background: rgba(255, 95, 168, .18);
  transform: rotate(45deg);
}

.danger-zone {
  display: grid;
  gap: 6px;
  border-top: 1px dashed rgba(225, 29, 72, .35);
}

/* -------------------------------------------------------------- notes */

.note {
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--mute);
  border-radius: 10px;
  background: rgba(29, 26, 74, .08);
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 14px;
}

.note-ok { border-left-color: var(--ok); background: rgba(15, 157, 99, .10); }
.note-bad { border-left-color: var(--bad); background: rgba(225, 29, 72, .10); }
.note-warn { border-left-color: var(--warn); background: rgba(178, 106, 0, .10); }
.note-info { border-left-color: var(--blue); background: rgba(90, 79, 216, .10); }

.empty { color: var(--mute); text-align: center; padding: 20px 8px; }
.empty-action { text-align: center; padding: 0 0 8px; }

.mini-link {
  color: #ff7ab5;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 95, 168, .35);
  transition: border-color .18s ease, color .18s ease;
}

.mini-link:hover { color: #ff7ab5; border-bottom-color: #ff7ab5; }

.muted { color: var(--mute); font-size: 12px; }

/* ------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border: 1px solid var(--line-2);
  border-radius: 11px;
  background: rgba(255, 255, 255, .78);
  color: var(--ink);
  font: 500 13.5px/1 var(--font);
  text-decoration: none;
  cursor: pointer;
  box-shadow:
    0 6px 18px -12px rgba(29, 26, 74, .30),
    inset 0 1px 0 rgba(255, 255, 255, .06);
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}

.btn:hover {
  background: rgba(241, 237, 255, .85);
  border-color: rgba(29, 26, 74, .50);
  transform: translateY(-1px);
}

.btn:active,
.btn.boing {
  transform: translateY(1px) scale(.985);
  box-shadow: inset 0 2px 6px rgba(29, 26, 74, .16);
}

.btn[aria-disabled="true"] {
  opacity: .45;
  pointer-events: none;
}

.btn-p {
  border-color: rgba(255, 95, 168, .55);
  background: linear-gradient(180deg, #ff8ec2 0%, #ff5fa8 58%, #d92d80 100%);
  color: var(--acc-ink);
  font-weight: 600;
  box-shadow:
    0 10px 26px -12px rgba(255, 95, 168, .70),
    inset 0 1px 0 rgba(255, 255, 255, .40);
}

.btn-p:hover {
  background: linear-gradient(180deg, #ff7ab5 0%, #ff5fa8 58%, #d92d80 100%);
  border-color: rgba(255, 138, 190, .75);
}

.btn-d {
  border-color: rgba(225, 29, 72, .45);
  background: rgba(225, 29, 72, .12);
  color: #b01a3c;
}

.btn-d:hover {
  background: rgba(225, 29, 72, .20);
  border-color: rgba(225, 29, 72, .65);
  color: #8f1230;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  box-shadow: none;
}

.btn-ghost:hover { background: rgba(29, 26, 74, .10); }

.btn-s {
  padding: 6px 11px;
  border-radius: 9px;
  font-size: 12px;
}

.btn-w { width: 100%; }
.btn-lg { padding: 12px 20px; font-size: 15px; margin-top: 6px; }

/* ------------------------------------------------------------ pager */

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}

.pg {
  min-width: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--mute);
  font: 500 12.5px/1.4 var(--mono);
  text-align: center;
  text-decoration: none;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}

.pg:hover { border-color: var(--line-2); color: var(--ink); }

.pg.on {
  border-color: rgba(255, 95, 168, .50);
  background: rgba(255, 95, 168, .16);
  color: #a8175a;
}

.pg-mut { padding: 6px 2px; color: var(--mute); }

/* -------------------------------------------------------------- feed */

.feed {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0;
}

.feed li {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12.5px;
}

.feed li:last-child { border-bottom: 0; }

.feed-t { color: var(--mute); font: 400 11.5px var(--mono); min-width: 78px; }

.feed-a {
  padding: 2px 8px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: #3b3670;
  font: 500 10.5px/1.4 var(--mono);
}

.feed-u {
  color: var(--mute);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dist { display: grid; gap: 8px; }

.dist-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}

.dist-row:last-child { border-bottom: 0; }
.dist-row b { font: 600 18px/1 var(--display); font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------------- foot */

.foot {
  margin-top: 30px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--mute);
  font-size: 11.5px;
}

/* -------------------------------------------------------------- toasts */

.toasts {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 60;
  display: grid;
  gap: 10px;
  max-width: min(380px, calc(100vw - 40px));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--acc);
  border-radius: 12px;
  background: var(--glass-2);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 40px -18px rgba(29, 26, 74, .30);
  font-size: 13px;
  font-weight: 400;
  transform: translateY(10px);
  opacity: 0;
  transition: transform .22s ease, opacity .22s ease;
}

.toast.in { transform: translateY(0); opacity: 1; }
.toast.out { opacity: 0; transform: translateY(6px); }

.toast b {
  flex: 0 0 auto;
  margin-top: 1px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(29, 26, 74, .16);
  color: var(--ink);
  font: 600 10px/1.5 var(--mono);
  letter-spacing: .08em;
}

.toast.ok { border-left-color: var(--ok); }
.toast.bad { border-left-color: var(--bad); }
.toast.warn { border-left-color: var(--warn); }
.toast.info { border-left-color: var(--blue); }

.toast.ok b { background: rgba(15, 157, 99, .16); color: #0b7a4b; }
.toast.bad b { background: rgba(225, 29, 72, .22); color: #b01a3c; }
.toast.warn b { background: rgba(178, 106, 0, .22); color: #8a5a00; }
.toast.info b { background: rgba(90, 79, 216, .22); color: #4a3fc4; }

/* ------------------------------------------------------------- dialog */

dialog.confirm {
  width: min(430px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: rgba(255, 255, 255, .97);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  color: var(--ink);
  box-shadow: 0 40px 90px -30px rgba(29, 26, 74, .30), inset 0 1px 0 rgba(255, 255, 255, .06);
}

dialog.confirm::backdrop {
  background: rgba(29, 26, 74, .38);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.confirm-h {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
  font: 600 16px/1.2 var(--display);
}

.dlg-tag {
  padding: 2px 7px;
  border: 1px solid rgba(225, 29, 72, .40);
  border-radius: 6px;
  background: rgba(225, 29, 72, .12);
  color: #b01a3c;
  font: 500 10px/1.5 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.confirm-b {
  padding: 20px;
  font-size: 14px;
  line-height: 1.6;
  color: #3b3670;
}

.confirm-f {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 20px 20px;
}

/* --------------------------------------------------------------- auth */

.auth-body {
  background-color: var(--page);
  background-image:
    radial-gradient(900px 560px at 6% 4%, rgba(255, 95, 168, .20), transparent 60%),
    radial-gradient(820px 520px at 96% 10%, rgba(90, 79, 216, .24), transparent 58%),
    radial-gradient(760px 620px at 60% 110%, rgba(143, 141, 247, .18), transparent 62%);
}

.auth {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
  min-height: 100vh;
}

.auth-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  padding: 48px clamp(28px, 6vw, 80px);
  border-right: 1px solid var(--line);
  background-image:
    linear-gradient(rgba(29, 26, 74, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 26, 74, .05) 1px, transparent 1px);
  background-size: 44px 44px;
}

.auth-hero .mark {
  position: relative;
  z-index: 0;
  color: #ff7ab5;
  white-space: nowrap;
}

.auth-hero .mark::after {
  content: "";
  position: absolute;
  left: 0;
  right: 2px;
  bottom: -2px;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 95, 168, .22);
  box-shadow: 0 0 18px rgba(255, 95, 168, .35);
  z-index: -1;
}

.auth-hero h1 {
  margin: 0;
  font: 600 clamp(30px, 4.4vw, 46px)/1.1 var(--display);
  letter-spacing: -.025em;
}

.lede {
  max-width: 520px;
  margin: 0;
  color: var(--mute);
  font-size: 15px;
  line-height: 1.65;
}

.ticks {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 11px;
  font-size: 14px;
  font-weight: 400;
  color: #3b3670;
}

.ticks li { display: flex; align-items: center; gap: 11px; }

.tick {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 95, 168, .45);
  border-radius: 999px;
  background: rgba(255, 95, 168, .14);
  color: #ff7ab5;
}

.tick svg { width: 12px; height: 12px; }

.fx-word {
  position: absolute;
  font: 600 clamp(40px, 6vw, 76px)/1 var(--mono);
  color: transparent;
  -webkit-text-stroke: 1px rgba(29, 26, 74, .55);
  opacity: .10;
  pointer-events: none;
  user-select: none;
  letter-spacing: .02em;
}

.fx-word.w1 { top: 7%; right: 5%; transform: rotate(-8deg); }
.fx-word.w2 { bottom: 16%; right: 10%; transform: rotate(5deg); }
.fx-word.w3 { bottom: 5%; left: 5%; transform: rotate(-4deg); }

.auth-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px clamp(20px, 4vw, 56px);
}

.auth-card .card {
  width: 100%;
  max-width: 420px;
  box-shadow: 0 40px 90px -40px rgba(29, 26, 74, .30), inset 0 1px 0 rgba(255, 255, 255, .06);
}

.auth-card form { display: grid; gap: 14px; }

.mini {
  margin: 16px 0 0;
  color: var(--mute);
  font-size: 12px;
  line-height: 1.6;
}

.mini code {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(241, 237, 255, .6);
  color: #3b3670;
  font: 400 11.5px var(--mono);
}

/* ------------------------------------------------------- boot loader */

.boot {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  background-color: var(--page);
  background-image:
    radial-gradient(900px 560px at 12% 6%, rgba(255, 95, 168, .18), transparent 60%),
    radial-gradient(760px 480px at 88% 12%, rgba(90, 79, 216, .18), transparent 58%),
    radial-gradient(680px 520px at 55% 100%, rgba(143, 141, 247, .16), transparent 62%);
  opacity: 1;
  transition: opacity .32s ease;
}

.boot.out {
  opacity: 0;
  pointer-events: none;
}

.boot-in {
  width: min(400px, 76vw);
  display: grid;
  gap: 2px;
}

.boot-tag {
  color: var(--mute);
  font: 500 10.5px/1.4 var(--mono);
  letter-spacing: .22em;
  text-align: center;
  text-transform: uppercase;
}

/* --------------------------------------------------------- responsive */

@media (max-width: 1020px) {
  .form-2col { grid-template-columns: 1fr; }
  .side-card { order: 2; }
}

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }

  .side {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .side-foot { margin: 0 0 0 auto; padding: 0; border: 0; display: flex; align-items: center; }
  .side-foot .btn-w { width: auto; }
  .me { display: none; }

  .main { padding: 18px 16px 40px; }

  .auth { grid-template-columns: 1fr; }
  .auth-hero { border-right: 0; border-bottom: 1px solid var(--line); padding: 36px 22px; }
}

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .top h1 { font-size: 22px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat .n { font-size: 24px; }
  .fx-word { display: none; }
}

/* -------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* may (phone) */
.dev-exp { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dev-exp .inp { width: auto; min-width: 0; flex: 0 1 230px; }
.dev-add .inp { width: auto; min-width: 0; flex: 1 1 170px; }
