/* Personal cabinet, launcher confirmation, new password and sign-in through Telegram.
   Quiet rows on one surface, hairline dividers, a single accent; no pills, tiles or glows. */
.ac-shell { width: min(880px, calc(100% - 40px)); margin: 0 auto; padding: 44px 0 96px; }
.ac-muted { color: var(--muted); }
.ac-small { font-size: 12.5px; }

.ac-head { display: flex; align-items: center; gap: 16px; }
.ac-avatar { width: 52px; height: 52px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--surface2);
  border: 1px solid var(--border); color: var(--text); font-family: var(--font-display); font-size: 20px; }
.ac-who { min-width: 0; }
.ac-who h1 { font-family: var(--font-display); font-size: 28px; line-height: 1.1; letter-spacing: -.02em; overflow-wrap: anywhere; }
.ac-who p { display: flex; align-items: center; gap: 12px; margin-top: 6px; font-size: 13px; }
.ac-head-actions { margin-left: auto; display: flex; gap: 8px; }
.ac-role { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; }
.ac-role::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ac-role-owner { color: #d99a3f; }
.ac-role-admin { color: #e06a5e; }
.ac-role-moderator { color: #5f9be0; }
.ac-role-media { color: #a47fe0; }
.ac-role-user { color: var(--green); }

.ac-tabs { display: flex; gap: 2px; margin: 30px 0 26px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.ac-tabs::-webkit-scrollbar { display: none; }
.ac-tabs button { position: relative; padding: 10px 12px; background: none; color: var(--muted); font-size: 14px; white-space: nowrap; }
.ac-tabs button:hover { color: var(--text); }
.ac-tabs button.active { color: var(--text); }
.ac-tabs button.active::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }

.ac-body { display: grid; gap: 28px; }
.ac-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.ac-section-head h2 { font-family: var(--font-body); font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.ac-list { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.ac-list-pad { padding: 20px; }
.ac-row { display: flex; align-items: center; gap: 16px; min-height: 56px; padding: 14px 18px; }
.ac-row + .ac-row { border-top: 1px solid var(--border); }
.ac-row-main { display: flex; flex: 1; flex-direction: column; gap: 3px; min-width: 0; }
.ac-row-title { font-size: 14px; color: var(--text); }
.ac-row-note { font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.ac-row-value { font-size: 14px; color: var(--text); text-align: right; }
.ac-row-action { display: flex; flex: none; align-items: center; gap: 8px; }
.ac-row-empty { font-size: 13.5px; color: var(--muted); }
.ac-row-empty a, .ac-link { color: var(--text); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
.ac-row-empty a:hover, .ac-link:hover { text-decoration-color: currentColor; }
.ac-link { font-size: 13px; }

.ac-btn { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 16px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface2); color: var(--text); font-size: 13.5px; font-weight: 500; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s; }
.ac-btn:hover { border-color: color-mix(in srgb, var(--text) 24%, transparent); }
.ac-btn-small { height: 32px; padding: 0 12px; border-radius: 8px; font-size: 13px; }
.ac-btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.ac-btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.ac-btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.ac-btn-ghost:hover { background: var(--surface2); border-color: transparent; color: var(--text); }
.ac-btn-block { width: 100%; }
.ac-btn:disabled { opacity: .55; }

.ac-access { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 24px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; }
.ac-caption { font-size: 13px; color: var(--muted); }
.ac-access h2 { margin-top: 6px; font-family: var(--font-display); font-size: 30px; letter-spacing: -.02em; }
.ac-state { margin-top: 6px; font-size: 14px; }
.ac-state-active { color: var(--green); }
.ac-state-expired, .ac-state-blocked { color: var(--danger); }
.ac-state-none { color: var(--muted); }
.ac-access-actions { display: flex; gap: 8px; }

.ac-code { display: inline-flex; align-items: center; gap: 4px; }
.ac-code code, .ac-row code, .ac-card code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12.5px; color: var(--muted); }
.ac-copy { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: none; color: var(--muted); }
.ac-copy:hover { background: var(--surface2); color: var(--text); }
.ac-copy .icon { width: 15px; height: 15px; }

.ac-password { display: grid; gap: 14px; max-width: 420px; }
.ac-field { display: grid; gap: 7px; }
.ac-field label { font-size: 13px; color: var(--muted); }
.ac-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; font-size: 12.5px; }

.ac-switch-row { cursor: pointer; }
.ac-switch-row.is-locked { cursor: default; }
.ac-switch { position: relative; flex: none; width: 36px; height: 20px; }
.ac-switch input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: inherit; }
.ac-switch span { position: absolute; inset: 0; border: 1px solid var(--border); border-radius: 99px; background: var(--surface2); pointer-events: none; transition: background-color .15s; }
.ac-switch span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform .15s, background-color .15s; }
.ac-switch input:checked + span { border-color: var(--accent); background: var(--accent); }
.ac-switch input:checked + span::after { transform: translateX(16px); background: #fff; }
.ac-switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.is-locked .ac-switch input:checked + span { opacity: .55; }
.ac-inline-wait { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }

/* Single-card pages: launcher confirmation, new password. */
.ac-narrow { width: min(460px, calc(100% - 32px)); margin: 0 auto; padding: 64px 0 96px; }
.ac-card { display: grid; gap: 14px; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.ac-card h1, .ac-wait h1 { font-family: var(--font-display); font-size: 26px; line-height: 1.15; letter-spacing: -.02em; }
.ac-card p, .ac-wait p { font-size: 14px; }
.ac-facts { background: var(--bg); }
.ac-facts .ac-row { justify-content: space-between; min-height: 46px; padding: 11px 16px; }
.ac-facts .ac-row-title { font-size: 13.5px; color: var(--muted); }
.ac-card-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.ac-wait { display: grid; gap: 12px; }
.ac-wait-note { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.ac-code-big { padding: 16px 0; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); font-family: var(--font-display);
  font-size: 48px; line-height: 1; letter-spacing: .08em; text-align: center; }
.ac-signin-alt { display: grid; gap: 12px; margin-top: 14px; }

@media (max-width: 640px) {
  .ac-shell { padding-top: 26px; }
  .ac-head { flex-wrap: wrap; }
  .ac-head-actions { width: 100%; margin-left: 0; }
  .ac-access { flex-direction: column; align-items: stretch; }
  .ac-access-actions { flex-direction: column; }
  .ac-row { flex-wrap: wrap; }
  .ac-key .ac-row-action { width: 100%; }
  .ac-card { padding: 22px; }
}

.ac .form-error:empty { display: none; }
