/* ==========================================================================
   Account group: sign in, register, recovery, verification, logout,
   account home, settings, statistics, messages, balance, designer profile.
   Loaded after css/threedoo.css. All own classes start with acc- or auth.
   ========================================================================== */

/* AUTH PAGES -------------------------------------------------------------- */
.auth { max-width: 520px; margin: 0 auto; padding-bottom: 24px; }
.auth--wide { max-width: 700px; }
.auth .page-head { padding-top: clamp(8px, 3vw, 28px); }
.page-head__lead { margin: 0; color: var(--ink-2); max-width: 60ch; }
.auth__alt { text-align: center; color: var(--ink-2); margin: 4px 0 0; }
.auth__alt a, .form-card a { font-weight: 600; }

/* FORMS ------------------------------------------------------------------- */
.form-card { margin-top: 20px; }
.form-card .form-group { margin-bottom: 20px; }
.form-card label { display: block; margin-bottom: 6px; }
.acc-opt { margin-left: 4px; font-weight: 400; color: var(--ink-3); font-size: .85rem; }
.form-card .help-block { margin: 6px 0 0; }
.acc-field-error { margin: 6px 0 0; color: #a93a29; font-weight: 600; font-size: .95rem; }
.acc-field-error::before { content: "! "; font-weight: 800; }
.acc-field-error a { color: inherit; text-decoration: underline; }
.has-error .help-block { color: var(--ink-3); }
.has-error label, .has-error .acc-legend { color: var(--ink); }
.has-error .form-control { border-color: var(--red); box-shadow: 0 0 0 3px rgba(201, 74, 55, .14); }
input[type="file"].form-control { padding: 9px 12px; min-height: 48px; }
.acc-row { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
@media (min-width: 640px) { .acc-row { grid-template-columns: 1fr 1fr; } }
.acc-note { color: var(--ink-2); font-size: .95rem; margin: 0 0 18px; }
.acc-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 8px; }
.acc-fieldset { border: 0; border-top: 1px solid var(--line); padding: 22px 0 0; margin: 28px 0 0; min-width: 0; }
.acc-fieldset:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.acc-fieldset > legend { float: left; width: 100%; padding: 0; margin: 0 0 12px; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.acc-fieldset > legend + * { clear: both; }
fieldset.form-group { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.acc-legend { display: block; padding: 0; margin: 0 0 8px; font-family: var(--font-body); font-weight: 600; font-size: .95rem; }
.acc-checks { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.acc-checks--stack { flex-direction: column; gap: 2px; margin-bottom: 20px; }
.acc-check { display: flex !important; align-items: center; gap: 10px; min-height: 44px; margin: 0 !important; font-weight: 500 !important; cursor: pointer; }
.acc-check input { width: 20px; height: 20px; flex: none; accent-color: var(--blue); }
.acc-check span { line-height: 1.3; }

/* STATES (empty, finished, error) ----------------------------------------- */
.acc-state { text-align: center; padding: clamp(28px, 6vw, 56px) clamp(16px, 4vw, 40px); margin-left: auto; margin-right: auto; background: var(--surface); border: 1px dashed var(--line-2); }
.acc-state h2 { margin: 0 0 8px; font-size: clamp(1.3rem, 1rem + 1vw, 1.7rem); }
.acc-state p { margin: 0 auto 8px; color: var(--ink-2); max-width: 46ch; }
.acc-state__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px !important; }
.acc-muted { color: var(--ink-3); }

/* ACCOUNT NAVIGATION ------------------------------------------------------ */
.acc-nav { margin: 8px 0 24px; border-bottom: 1px solid var(--line-2); overflow-x: auto; scrollbar-width: thin; }
.acc-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; min-width: max-content; }
.acc-nav a { display: block; padding: 12px 16px; min-height: 44px; border-bottom: 3px solid transparent; margin-bottom: -1px; color: var(--ink-2); font-weight: 600; text-decoration: none; }
.acc-nav a:hover { color: var(--ink); background: var(--ground-2); border-radius: var(--r-s) var(--r-s) 0 0; }
.acc-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--blue-logo); }

/* NUMBER TILES ------------------------------------------------------------ */
.acc-tiles { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 0 0 12px; }
.acc-tiles > div { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.acc-tiles dt { font-size: .95rem; font-weight: 500; color: var(--ink-3); }
.acc-tiles dd { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.acc-tiles + .table-responsive, .acc-tiles + p { margin-top: 20px; }
.acc-facts { display: grid; gap: 0; margin: 0 0 16px; }
.acc-facts > div { display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.acc-facts dt { font-weight: 600; color: var(--ink-2); }
.acc-facts dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; user-select: all; }
section.card.narrow { margin-left: 0; }

/* MESSAGES ---------------------------------------------------------------- */
.acc-threads { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.acc-thread { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); color: var(--ink); text-decoration: none; min-height: 64px; }
.acc-thread:hover { border-color: var(--ink-3); color: var(--ink); }
.acc-thread__body { flex: 1; min-width: 0; display: grid; }
.acc-thread__body strong { font-family: var(--font-display); }
.acc-thread__text { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-thread__date { flex: none; color: var(--ink-3); font-size: .88rem; }
@media (max-width: 480px) { .acc-thread__date { display: none; } }
.acc-bubbles { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 12px; }
.acc-bubble { display: grid; grid-template-columns: auto 40px minmax(0, 1fr); gap: 10px; align-items: start; }
.acc-bubble__pick { display: grid; place-items: center; width: 32px; min-height: 40px; margin: 0; }
.acc-bubble__pick input { width: 20px; height: 20px; accent-color: var(--blue); }
.acc-bubble__body { background: var(--surface); border: 1px solid var(--line); border-radius: 4px var(--r-m) var(--r-m) var(--r-m); padding: 10px 14px; min-width: 0; }
.acc-bubble--mine .acc-bubble__body { background: #e8f2fe; border-color: #bcd8fb; border-radius: var(--r-m) 4px var(--r-m) var(--r-m); }
.acc-bubble__meta { margin: 0 0 4px; color: var(--ink-3); font-size: .88rem; }
.acc-bubble__meta strong { color: var(--ink); }
.acc-bubble__text { margin: 0; overflow-wrap: anywhere; }
.acc-recipient { margin: 16px 0 0; }
.acc-recipient a { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }

/* DESIGNER PROFILE -------------------------------------------------------- */
.profile { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 8px; }
.profile__avatar { display: flex; }
.profile__main { min-width: 0; }
.acc-eyebrow { margin: 0 0 4px; font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.profile h1 { margin: 0 0 12px; overflow-wrap: anywhere; font-size: clamp(2rem, 1.4rem + 2.5vw, 3rem); }
.profile__chips, .profile__links { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.profile__chips li { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border-radius: 999px; background: var(--ground-2); font-size: .92rem; font-weight: 600; }
.profile__links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font-weight: 600; }
.profile__bio { margin: 0 0 14px; max-width: 64ch; overflow-wrap: anywhere; }
.profile__side { display: grid; gap: 16px; align-content: start; }
.profile__stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; }
.profile__stats > div { background: var(--ground); border-radius: var(--r-s); padding: 10px 12px; min-width: 0; }
.profile__stats dt { font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); overflow-wrap: anywhere; }
.profile__stats dd { margin: 2px 0 0; font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.profile__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.profile__actions form { margin: 0; }
@media (min-width: 720px) {
	.profile { grid-template-columns: auto minmax(0, 1fr); column-gap: 28px; }
	.profile__side { grid-column: 1 / -1; }
}
@media (min-width: 1100px) {
	.profile { grid-template-columns: auto minmax(0, 1fr) 340px; }
	.profile__side { grid-column: auto; }
	.profile__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.acc-faces { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.acc-faces a { display: block; border-radius: 50%; }
.acc-faces a:focus-visible .acc-avatar { box-shadow: 0 0 0 3px var(--focus); }

@media (max-width: 480px) {
	.profile__avatar .acc-avatar--xl { width: 88px; height: 88px; }
	.my-model { grid-template-columns: 72px minmax(0, 1fr); }
	.my-model__thumb, .my-model__thumb img { width: 72px; height: 54px; }
}

/* Visually hidden text inside scrolling tables must not widen the page */
.table-responsive, .acc-nav { position: relative; }
.profile__avatar { align-items: flex-start; }
@media (max-width: 719px) { .profile__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
