/* Account area (/account): small additions on top of site.css, same tokens and vocabulary (node cards, badges, mono labels). */

.account { padding-bottom: clamp(40px, 7vw, 80px); }
.account-head { padding-bottom: 12px; }
.account-head h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.03em; }

/* nav + who */
.account-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0 0 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.account-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.account-nav a {
  color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding: 8px 12px; border-radius: 10px; border: 1px solid transparent;
}
.account-nav a:hover { color: var(--ink); background: var(--surface); }
.account-nav a[aria-current='page'] { color: var(--accent-ink); background: var(--accent-soft); }
.account-who { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink-3); font-size: 0.9rem; }
.account-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }

.account-flash {
  border: 1px solid var(--line-2); border-left: 3px solid var(--team); background: var(--surface);
  border-radius: var(--radius-s); padding: 12px 16px; margin: 0 0 20px; color: var(--ink-2);
}
.account-flash.is-error { border-left-color: #ff8a80; }
.account-sent { border: 1px solid var(--line-2); border-radius: var(--radius-s); padding: 12px 16px; margin-bottom: 18px; background: var(--surface-2); }
.account-sent p { margin: 0 0 6px; }
.account-sent p:last-child { margin: 0; }
.account-narrow { max-width: 640px; }

/* sign in */
.account-or { display: flex; align-items: center; gap: 12px; margin: 22px 0 16px; max-width: 520px; color: var(--ink-3); font-size: 0.85rem; }
.account-or::before, .account-or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.account-google { width: 100%; max-width: 520px; }

/* license cards */
.account-cards { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .account-cards { grid-template-columns: 1fr 1fr; } }
.account-license-title { font-size: 1.3rem; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.account-license.is-off .node-head .dot { background: var(--ink-3); }
.account-state.is-on { background: var(--team-soft); color: var(--team-ink); }
.account-state.is-off { background: var(--surface-2); color: var(--ink-3); border: 1px solid var(--line-2); }
.account-state.is-soon { background: var(--warn-bg); color: var(--warn-ink); }

.account-key {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--bg); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; margin: 4px 0 16px;
}
.account-key-text { font-family: var(--mono); font-size: 1rem; letter-spacing: 0.04em; color: var(--ink); background: none; border: 0; padding: 0; overflow-wrap: anywhere; }
.account-key-actions { display: flex; gap: 8px; }
.account-mask { font-family: var(--mono); font-size: 0.85rem; color: var(--ink-3); font-weight: 400; }

.account-facts { display: grid; gap: 10px 20px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin: 0 0 18px; }
.account-facts div { min-width: 0; }
.account-facts dt { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-3); margin-bottom: 2px; }
.account-facts dd { margin: 0; color: var(--ink); }

.account-resend { margin-top: 16px; }
.account-resend .node-body { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; }
.account-resend p { margin: 0; color: var(--ink-2); }

/* /activate ("Sign in to activate" from the app) */
.activate-code {
  font-family: var(--mono); font-size: clamp(1.6rem, 6vw, 2.2rem); font-weight: 600; letter-spacing: 0.12em;
  display: inline-block; margin: 0 0 18px; padding: 10px 18px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg); color: var(--ink);
}
.activate-choices { border: 0; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.activate-choices legend { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-3); margin-bottom: 8px; padding: 0; }
.activate-choice {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; cursor: pointer;
  border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface);
}
.activate-choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.activate-choice.is-off { cursor: not-allowed; opacity: 0.65; }
.activate-choice input { margin-top: 4px; accent-color: var(--accent); }
.activate-choice-main { display: grid; gap: 2px; min-width: 0; }
.activate-choice-name { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.activate-request form + .fine { margin-top: 16px; }

/* tables (orders, devices, trials) */
.account-table td { vertical-align: middle; }
.account-sub { display: block; margin-top: 2px; }
.account-slots { color: var(--ink-2); margin: 0 0 8px; }
.account-devices + .account-devices { margin-top: 16px; }
.account-devices .account-license-title { margin-bottom: 4px; }

.account-confirm summary { list-style: none; }
.account-confirm summary::-webkit-details-marker { display: none; }
.account-confirm[open] summary { background: var(--surface-2); }
.account-confirm form {
  margin-top: 10px; padding: 12px; border: 1px solid var(--warn-line); background: var(--warn-bg); color: var(--warn-ink);
  border-radius: var(--radius-s); max-width: 340px; font-size: 0.92rem;
}
.account-confirm form p { margin: 0 0 10px; }

/* phones: tables become stacked rows */
@media (max-width: 640px) {
  .account-bar { display: grid; grid-template-columns: minmax(0, 1fr); }
  /* Wrap instead of scrolling: a hidden-scrollbar strip cut "Support" off at 390 px with no hint there was more. */
  .account-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; min-width: 0; }
  .account-nav a { white-space: nowrap; text-align: center; font-size: 0.86rem; padding: 8px 2px; }
  .account-who { justify-content: space-between; }
  .account-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .account-table, .account-table tbody, .account-table tr, .account-table td { display: block; width: 100%; }
  .account-table tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  .account-table td { border: 0; padding: 4px 0 4px 104px; position: relative; min-height: 1.9em; }
  .account-table td::before { content: attr(data-label); position: absolute; left: 0; top: 7px; font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-3); }
  .account-table td:empty { display: none; }
  .account-key-actions { width: 100%; }
  .account-key-actions .btn { flex: 1; }
  .account-confirm form { max-width: none; }
}

/* support (M5) */
.account-new-ticket, .account-reply { margin-top: 16px; }
.account-form { max-width: 640px; }
.account-form input[type='text'], .account-form textarea {
  width: 100%; font: inherit; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
}
.account-form textarea { resize: vertical; min-height: 8em; }
.account-form input[type='file'] { display: block; margin-top: 6px; color: var(--ink-3); font: inherit; font-size: 0.9rem; max-width: 100%; }
/* The picker button looks like the site's small ghost button instead of the browser's grey default. */
.account-form input[type='file']::file-selector-button {
  font: inherit; font-weight: 600; font-size: 0.9rem; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 12px; margin-right: 12px; cursor: pointer;
}
.account-form input[type='file']::file-selector-button:hover { background: var(--surface-2); }
.account-form input[type='file']:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
/* Send left, "Solved, close" right, same size. */
.account-reply-actions .account-close-btn { margin-left: auto; }
.account-form textarea:focus-visible, .account-form input[type='text']:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.account-back { margin: 0 0 12px; }
.account-back a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.account-back a:hover { color: var(--ink); }
.account-close { display: none; }
.ticket-thread { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ticket-msg { border: 1px solid var(--line-2); border-radius: var(--radius-s); padding: 12px 16px; background: var(--surface-2); min-width: 0; }
.ticket-msg.is-staff { border-left: 3px solid var(--team); background: var(--surface); }
.ticket-msg-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; margin-bottom: 6px; font-size: 0.9rem; }
.ticket-msg-head time { color: var(--ink-3); font-family: var(--mono); font-size: 0.78rem; }
.ticket-msg-body { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
.ticket-files { list-style: none; padding: 8px 0 0; margin: 8px 0 0; border-top: 1px solid var(--line); display: grid; gap: 4px; font-size: 0.92rem; }
.ticket-files a { font-family: var(--mono); font-size: 0.85rem; overflow-wrap: anywhere; }
/* Narrow phones (< 380 px): five labels no longer fit one row, so 3 + 2. */
@media (max-width: 379px) {
  .account-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
