/* Customer Panel – area styles (home), 2026-10-12 redesign. Shared tokens and components live in app.css.
   Overview, setup, community selection, support and activity. Every selector here starts with an hm-* class, so nothing leaks into
   other areas. Mobile first: single column, no fixed widths, touch targets >= 40 px. */

/* ---------------------------------------------------------------- shared bits */
.hm-alert { margin-bottom: 16px; }
.hm-section { margin-top: 24px; }
.hm-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.hm-section-head > div { min-width: 0; flex: 1 1 260px; }
.hm-section-title { font-size: 1.05rem; margin: 0; }
.hm-section-lead { margin: 6px 0 0; color: var(--nx-text-dim); font-size: 0.86rem; max-width: 760px; }
.hm-empty-line { margin: 0; font-size: 0.88rem; }
:is(.hm-section-head, .hm-server, .hm-license, .hm-next, .hm-step) .nx-btn-sm,
.nx-btn-sm.hm-copy { min-height: 40px; }
.hm-mono { font-family: var(--nx-mono); font-size: 0.9rem; overflow-wrap: anywhere; }
.hm-progress { height: 8px; border-radius: var(--nx-radius-pill); background: var(--nx-bg-hover); overflow: hidden; }
.hm-progress > span { display: block; height: 100%; border-radius: inherit; background: var(--nx-accent); transition: width 0.3s ease; }
@media (prefers-reduced-motion: reduce) { .hm-progress > span { transition: none; } }

/* ---------------------------------------------------------------- overview: KPI tiles */
.hm-metric { min-height: 112px; }
.hm-metric .cp-kpi-value { font-variant-numeric: tabular-nums; line-height: 1.1; }
.hm-metric .cp-kpi-sub { line-height: 1.4; }
.hm-metric-attention { color: var(--nx-warning); font-weight: 600; }

/* overview: license band */
.hm-license { align-items: flex-start; }
.hm-license-main { flex: 1 1 280px; min-width: 0; }
.hm-license-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; font-size: 1.1rem; margin: 4px 0 6px; }
.hm-license-text { margin: 0; color: var(--nx-text-dim); font-size: 0.9rem; }

/* overview: next steps */
.hm-next { margin-bottom: 18px; border-color: var(--nx-accent-dim); }
.hm-next-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hm-next-head .cp-card-sub { margin: 4px 0 0; }
.hm-next-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 8px; }
.hm-next-list a {
    display: flex; gap: 12px; align-items: flex-start; min-height: 44px; padding: 10px 12px; border-radius: var(--nx-radius-sm);
    background: var(--nx-bg-inset); border: 1px solid var(--nx-border-soft); color: var(--nx-text); text-decoration: none;
}
.hm-next-list a:hover { border-color: var(--nx-accent-dim); background: var(--nx-bg-hover); }
.hm-next-list strong { display: block; font-size: 0.9rem; }
.hm-next-no {
    flex: 0 0 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: var(--nx-accent-soft); color: var(--nx-accent); font-weight: 700; font-size: 0.82rem;
}
.hm-next-text { display: block; color: var(--nx-text-dim); font-size: 0.82rem; margin-top: 2px; }

/* overview: server cards */
.hm-server { gap: 10px; }
.hm-server-name { font-size: 1rem; text-transform: none; letter-spacing: 0; color: var(--nx-text); margin: 0; overflow-wrap: anywhere; }
.hm-server-name a { color: inherit; }
.hm-server-name a:hover { color: var(--nx-accent); }
.hm-server .cp-kv dd { display: flex; justify-content: flex-end; }

/* ---------------------------------------------------------------- activity */
.hm-activity { list-style: none; margin: 0; padding: 0; }
.hm-activity-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--nx-border-soft); }
.hm-activity-item:last-child { border-bottom: 0; }
.hm-activity-icon {
    flex: 0 0 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: var(--nx-bg-hover); color: var(--nx-text-dim); font-size: 0.9rem;
}
.hm-activity-body { min-width: 0; flex: 1; }
.hm-activity-sentence { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 0.9rem; overflow-wrap: anywhere; }
.hm-activity-reason { color: var(--nx-text-dim); font-size: 0.82rem; }
.hm-activity-reason::before { content: "· "; }
.hm-activity-meta { display: flex; flex-wrap: wrap; gap: 2px 8px; margin-top: 2px; color: var(--nx-text-faint); font-size: 0.78rem; }
.hm-activity-meta > * + *::before { content: "·"; margin-right: 8px; }
.hm-activity-meta time { font-variant-numeric: tabular-nums; }
.hm-activity-card { padding-top: 8px; padding-bottom: 8px; }
.hm-activity-day + .hm-activity-day { margin-top: 10px; }
.hm-activity-day-title {
    font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--nx-text-faint);
    margin: 10px 0 2px; padding-bottom: 6px; border-bottom: 1px solid var(--nx-border-soft);
}
.hm-filter .cp-tab[aria-pressed="true"] { color: var(--nx-accent-strong); border-bottom-color: var(--nx-accent); }

/* ---------------------------------------------------------------- setup */
.hm-setup-progress { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; max-width: 360px; color: var(--nx-text-dim); font-size: 0.86rem; }
.hm-step .cp-step-head { flex-wrap: wrap; }
.hm-step-text { flex: 1 1 240px; min-width: 0; }
.hm-step h2:focus { outline: none; }
.hm-step h2:focus-visible { box-shadow: var(--nx-focus); border-radius: 4px; }
.hm-step-badge { margin-left: auto; }
.hm-setup-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hm-setup-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 0.9rem; }
.hm-setup-name { font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.hm-setup-form { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.hm-setup-form .nx-field { width: 100%; margin-bottom: 0; }
.hm-setup-form .nx-select { width: 100%; max-width: 420px; }
.hm-field-foot { display: flex; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; margin-top: 6px; }
.hm-count { font-variant-numeric: tabular-nums; }
.hm-key-row .nx-field { margin: 0; }
.hm-key-row .cp-row-sub, .hm-key-row .cp-msg-ok, .hm-key-row .cp-msg-error { margin: 0; }
.hm-key-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.hm-guilds { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.hm-guild { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--nx-border-soft); }
.hm-guild-main { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 240px; }
.hm-guild-icon { width: 36px; height: 36px; flex: 0 0 36px; }
.hm-link-steps .nx-btn { margin-top: 6px; }
.hm-command { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.hm-command .cp-code { margin-top: 0; }
.hm-step-link { margin: 0; font-size: 0.88rem; }
.hm-step .cp-inline-form .nx-btn { min-height: 40px; }

/* ---------------------------------------------------------------- community selection */
.hm-tenant-card { max-width: 480px; }
.hm-tenant-card .nx-signin-logo { width: 56px; height: 56px; }
.hm-tenants { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.hm-tenant {
    width: 100%; min-height: 60px; display: flex; align-items: center; gap: 12px; padding: 10px 12px; cursor: pointer;
    background: var(--nx-bg-inset); color: var(--nx-text); border: 1px solid var(--nx-border-soft); border-radius: var(--nx-radius-sm);
    font: inherit; text-align: left;
}
.hm-tenant:hover:not(:disabled) { border-color: var(--nx-accent-dim); background: var(--nx-bg-hover); }
.hm-tenant:focus-visible { outline: none; box-shadow: var(--nx-focus); }
.hm-tenant:disabled { cursor: not-allowed; opacity: 0.65; }
.hm-tenant-current { border-color: var(--nx-accent-dim); }
.hm-tenant-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hm-tenant-name { font-weight: 600; overflow-wrap: anywhere; }
.hm-tenant-sub { color: var(--nx-text-faint); font-size: 0.8rem; }
.hm-tenant-badges { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 auto; }
.hm-tenant-role { color: var(--nx-text-faint); font-size: 0.78rem; }
@media (max-width: 420px) {
    .hm-tenant { flex-wrap: wrap; }
    .hm-tenant-badges { flex-direction: row; align-items: center; width: 100%; padding-left: 48px; }
}

/* ---------------------------------------------------------------- support */
.hm-kv dd { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.hm-copy-value code { background: var(--nx-bg-hover); padding: 2px 8px; border-radius: 6px; }
.hm-copy { gap: 6px; }
.hm-faq details { border-bottom: 1px solid var(--nx-border-soft); }
.hm-faq details:last-child { border-bottom: 0; }
.hm-faq summary {
    cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    min-height: 48px; padding: 10px 0; font-weight: 600;
}
.hm-faq summary::-webkit-details-marker { display: none; }
.hm-faq summary::after { content: "+"; color: var(--nx-accent); font-size: 1.2rem; flex: 0 0 auto; }
.hm-faq details[open] summary::after { content: "−"; }
.hm-faq summary:focus-visible { outline: none; box-shadow: var(--nx-focus); border-radius: 4px; }
.hm-faq details p { margin: 0 0 12px; color: var(--nx-text-dim); font-size: 0.9rem; line-height: 1.6; max-width: 820px; }
