/* CantoWork — account page (account.html). Builds on site.css tokens. */
.acct-page { background: var(--paper); }
.acct-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); max-width: 1240px; margin: 0 auto; min-height: calc(100vh - 72px); }
.acct-shell[hidden] { display: none; }

/* sidebar */
.side { position: sticky; top: 72px; align-self: start; display: flex; flex-direction: column; gap: 18px; padding: 30px 18px 24px 24px; border-right: 1px solid var(--line); min-height: calc(100vh - 72px); }
.side-head { padding: 0 8px; }
.side-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.side-name b { font-weight: 500; font-size: 17px; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan { flex: none; font-size: 12px; color: var(--muted); padding: 2px 8px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-2); }
.side-head small { display: block; margin-top: 4px; font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.side-nav { display: grid; gap: 2px; }
.side-nav a, .side-out { display: flex; align-items: center; gap: 11px; height: 42px; padding: 0 12px; border-radius: 12px; color: var(--ink-2); font-size: 15px; border: 0; background: none; cursor: pointer; text-align: left; }
.side-nav svg, .side-out svg, .icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.side-nav a:hover, .side-out:hover { background: rgba(22, 22, 27, 0.05); color: var(--ink); }
.side-nav a.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow-hair); }
.side-out { margin-top: auto; color: var(--muted); }

/* content */
.content { padding: 34px 40px 80px; min-width: 0; }
.tab { display: none; max-width: 980px; }
.tab.on { display: block; animation: tab-in 0.35s var(--ease) both; }
@keyframes tab-in { from { opacity: 0; transform: translateY(6px); } }
.content h1 { margin: 0 0 22px; font-size: 28px; font-weight: 500; letter-spacing: -0.03em; }
.content h2 { margin: 0; font-size: 21px; font-weight: 500; letter-spacing: -0.02em; }
.lead-sm { margin: -10px 0 20px; color: var(--muted); font-size: 15px; }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow-hair); }
.rows .row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; padding: 12px 20px; border-top: 1px solid var(--line); }
.rows .row:first-child { border-top: 0; }
.k { font-size: 15px; color: var(--ink-2); }
.v { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ink); text-align: right; min-width: 0; word-break: break-word; }
.v.muted { color: var(--muted); }
.avatar { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; color: #fff; font-weight: 600; font-size: 14px; background: var(--signal) center / cover no-repeat; }
.avatar.lg { width: 42px; height: 42px; font-size: 16px; }
.avatar.sm { width: 32px; height: 32px; font-size: 13px; }
.me-chip { border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%; }
.name-form { display: flex; gap: 8px; align-items: center; }
.name-form [hidden] { display: none; }
.name-form input { width: 300px; max-width: 52vw; height: 42px; padding: 0 14px; border: 0; outline: 0; border-radius: 12px; font: inherit; font-size: 15px; color: var(--ink); background: var(--card); box-shadow: inset 0 0 0 1px var(--line-2); }
.name-form input:focus { box-shadow: inset 0 0 0 1.5px var(--iris), 0 0 0 4px rgba(107, 92, 255, 0.12); }
.icon-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: rgba(22, 22, 27, 0.06); color: var(--ink); }

.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 40px 0 16px; }
.btn-danger { background: #e5484d; color: #fff; box-shadow: 0 6px 16px -8px rgba(229, 72, 77, 0.7); }
.btn-danger:hover { transform: translateY(-1px); background: #d63c41; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }

.table-card { overflow-x: auto; }
.sessions { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.sessions th { text-align: left; font-weight: 400; color: var(--muted); padding: 14px 20px; background: var(--paper-2); white-space: nowrap; }
.sessions th:first-child { border-top-left-radius: var(--r); } .sessions th:last-child { border-top-right-radius: var(--r); }
.sessions td:nth-child(4) { white-space: nowrap; }
.sessions td { padding: 20px; border-top: 1px solid var(--line); vertical-align: middle; }
.sessions td.empty { color: var(--muted); text-align: center; }
.sessions .client { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.sessions .ip { font-variant-numeric: tabular-nums; }
.badge-now { font-size: 12px; padding: 2px 8px; border-radius: 6px; color: #0f8f63; background: rgba(52, 211, 153, 0.14); }
.sessions .act { text-align: right; width: 1%; white-space: nowrap; }
.hint { margin: 12px 4px 0; font-size: 13px; color: var(--faint); }

.app-card { display: flex; align-items: center; gap: 18px; padding: 22px; }
.app-card img { border-radius: 14px; }
.app-card .grow { flex: 1; min-width: 0; }
.app-card b { display: block; font-weight: 500; font-size: 17px; }
.app-card small { display: block; color: var(--muted); font-size: 14px; margin-top: 3px; }
.app-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.open-help { margin-top: 12px; padding: 16px 20px; font-size: 14px; color: var(--muted); }
.open-help p { margin: 0 0 6px; } .open-help p:last-child { margin: 0; }
.open-help a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.steps-list { margin: 26px 0 0; padding: 0 0 0 20px; color: var(--muted); font-size: 15px; line-height: 1.9; }
.steps-list b { color: var(--ink); font-weight: 500; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.tags span { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); }

.danger-h { margin: 40px 0 14px !important; }
.danger { padding: 20px; box-shadow: 0 0 0 1px rgba(229, 72, 77, 0.25); }
.danger p { margin: 0 0 14px; color: var(--muted); font-size: 14.5px; }

.acct-loading { position: fixed; inset: 72px 0 0; display: grid; place-items: center; }
.acct-loading[hidden] { display: none; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 2.5px solid var(--line-2); border-top-color: var(--iris); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.dlg { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(22, 22, 27, 0.32); backdrop-filter: blur(3px); }
.dlg[hidden] { display: none; }
.dlg-box { width: min(440px, 100%); padding: 24px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow-float); }
.dlg-box h3 { margin: 0 0 8px; font-size: 19px; font-weight: 500; }
.dlg-box p { margin: 0 0 16px; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.dlg-box input { width: 100%; height: 44px; margin-bottom: 16px; padding: 0 14px; border: 0; outline: 0; border-radius: 12px; font: inherit; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; }
.toast-cw { position: fixed; left: 50%; bottom: 26px; z-index: 60; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 10px 16px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 14px; transition: opacity 0.2s, transform 0.2s var(--ease); }
.toast-cw.on { opacity: 1; transform: translate(-50%, 0); }
.toast-cw.bad { background: #c9353a; }

@media (max-width: 860px) {
  .acct-shell { grid-template-columns: 1fr; }
  .side { position: static; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); padding: 20px 16px 12px; gap: 12px; }
  .side-nav { display: flex; overflow-x: auto; gap: 4px; scrollbar-width: none; }
  .side-nav a { flex: none; height: 38px; font-size: 14px; }
  .side-out { display: none; }
  .content { padding: 24px 16px 60px; }
  .rows .row { flex-wrap: wrap; min-height: 60px; }
  .name-form, .name-form input { width: 100%; max-width: none; }
  .app-card { flex-wrap: wrap; }
  .sessions th:nth-child(3), .sessions td:nth-child(3) { display: none; }
  .sessions td, .sessions th { padding: 14px 12px; }
}
