/* Account pages (account/*.php). Builds on style.css: same tokens, buttons, nav and footer. */

.acc-body { min-height: 100vh; display: flex; flex-direction: column; }
.acc-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.acc-nav a, .acc-linkbtn {
	font-family: var(--f-display); font-weight: 500; font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase;
	color: var(--text-dim); padding: 8px 12px; background: none; border: 0; cursor: pointer; transition: color 0.2s;
}
.acc-nav a:hover, .acc-linkbtn:hover { color: #fff; }
.acc-nav a { max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-inline { display: inline; margin: 0; }

.acc-main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: calc(var(--nav-h) + 48px) var(--gutter) 72px; }
.acc-panel {
	position: relative; padding: clamp(24px, 4vw, 44px);
	background: linear-gradient(180deg, rgba(16, 28, 50, 0.7), rgba(8, 14, 26, 0.7));
	border: 1px solid var(--line);
	clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
}
.acc-panel h1 { font-size: clamp(30px, 4vw, 44px); text-transform: uppercase; margin-bottom: 26px; }
.acc-panel h2 {
	font-size: 20px; text-transform: uppercase; letter-spacing: 0.06em; margin: 40px 0 14px;
	padding-top: 22px; border-top: 1px solid var(--line);
}
.acc-panel a:not(.btn) { color: var(--cyan); }
.acc-panel a:not(.btn):hover { text-decoration: underline; }

.acc-form { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin: 0; }
.acc-field { display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 420px; }
.acc-field span {
	font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint);
}
.acc-field input {
	font: inherit; font-size: 16px; color: var(--text); padding: 11px 14px; width: 100%;
	background: rgba(5, 8, 15, 0.7); border: 1px solid var(--line-strong); border-radius: 0; outline: none;
	transition: border-color 0.2s, box-shadow 0.2s;
}
.acc-field input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(79, 209, 255, 0.18); }
.acc-field input:disabled { opacity: 0.5; }
.acc-form .btn { margin-top: 6px; }
.btn:disabled { pointer-events: none; filter: grayscale(1) brightness(0.7); opacity: 0.6; }

.acc-hint { margin-top: -6px; font-size: 14px; color: var(--text-faint); max-width: 520px; }
.acc-note { margin-top: 26px; font-size: 15px; color: var(--text-dim); }
.acc-join { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap;
	align-items: center; justify-content: space-between; gap: 14px 20px; }
.acc-join p { margin: 0; color: var(--text-dim); }
.acc-links { display: flex; flex-wrap: wrap; gap: 22px; }

.acc-msg { margin-bottom: 22px; padding: 12px 16px; border-left: 3px solid var(--green); background: rgba(77, 255, 166, 0.07); }
.acc-msg.err { border-left-color: var(--red); background: rgba(255, 84, 112, 0.08); }
.acc-msg.warn { border-left-color: var(--amber); background: rgba(255, 181, 69, 0.08); }

.acc-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; margin: 0; }
.acc-facts dt { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); }
.acc-facts dd { margin: 2px 0 0; font-size: 18px; overflow-wrap: anywhere; }

/* Face gallery (profile): radios hidden but focusable, the whole tile is the label. */
.acc-faces { border: 0; margin: 0; padding: 0; min-width: 0; width: 100%; }
.acc-face-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 10px; }
.acc-face {
	position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 6px 8px;
	cursor: pointer; border: 1px solid var(--line-strong); background: rgba(5, 8, 15, 0.5);
	transition: border-color 0.15s, background 0.15s;
}
.acc-face:hover { border-color: rgba(79, 209, 255, 0.5); }
.acc-face input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.acc-face img { display: block; width: 100%; max-width: 128px; height: auto; aspect-ratio: 1; background: #05070d; }
.acc-face span { font-size: 13px; line-height: 1.25; text-align: center; color: var(--text-dim); }
.acc-face:has(input:checked) { border-color: var(--cyan); background: rgba(79, 209, 255, 0.12); box-shadow: 0 0 0 1px var(--cyan); }
.acc-face:has(input:checked) span { color: #fff; }
.acc-face:has(input:checked)::after {
	content: "\2713"; position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; line-height: 22px;
	text-align: center; font-size: 14px; font-weight: 700; color: #05070d; background: var(--cyan);
}
.acc-face:has(input:focus-visible) { outline: 2px solid #fff; outline-offset: 2px; }
.acc-face-text { flex-direction: row; display: inline-flex; padding: 10px 14px; }
.acc-sub {
	font-family: var(--f-mono); font-size: 12px; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase;
	color: var(--text-faint); margin: 6px 0 -4px;
}
legend.acc-sub { padding: 0; margin: 10px 0 8px; }
.acc-face-now { display: flex; align-items: center; gap: 12px; }
.acc-face-now img { flex: none; border: 1px solid var(--line-strong); }

/* Nav: the small face next to the username. */
.acc-nav a.acc-me { display: inline-flex; align-items: center; gap: 8px; }
.acc-me span { overflow: hidden; text-overflow: ellipsis; }
.acc-me-face { flex: none; width: 24px; height: 24px; border: 1px solid var(--line-strong); }

.acc-table-wrap { overflow-x: auto; margin-bottom: 22px; }
.acc-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.acc-table th {
	text-align: left; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
	color: var(--text-faint); font-weight: 400; padding: 8px 10px; border-bottom: 1px solid var(--line-strong);
}
.acc-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.acc-table .acc-linkbtn { padding: 0; font-size: 12px; color: var(--cyan); }
.acc-ua { font-size: 12px; color: var(--text-faint); overflow-wrap: anywhere; max-width: 320px; }
.acc-tag { font-family: var(--f-mono); font-size: 11px; font-weight: 400; color: var(--green); text-transform: uppercase; }

@media (max-width: 820px) {
	.acc-nav a, .acc-linkbtn { padding: 8px 6px; font-size: 13px; letter-spacing: 0.06em; }
	.acc-facts { grid-template-columns: 1fr; }
	.acc-face-grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
	.acc-face span { font-size: 12px; }
	.acc-table td, .acc-table th { padding: 8px 6px; }
}

/* Privacy page */
.acc-prose p, .acc-prose li { color: var(--text-dim); }
.acc-prose p + p, .acc-prose ul + p { margin-top: 12px; }
.acc-prose ul { padding-left: 20px; margin: 12px 0; }
.acc-prose li + li { margin-top: 8px; }

/* Admin pages (admin/*.php) */
.acc-main.acc-wide { max-width: 1100px; }
.adm-menu { display: flex; flex-wrap: wrap; gap: 4px 2px; margin-bottom: 14px; }
.adm-menu a {
	font-family: var(--f-display); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
	color: var(--text-dim); padding: 8px 12px; border: 1px solid transparent;
}
.adm-menu a:hover { color: #fff; }
.adm-menu a.on { color: #fff; border-color: var(--line-strong); background: rgba(79, 209, 255, 0.08); }
.adm-row { flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin-bottom: 14px; }
.adm-row .acc-field { width: auto; flex: 1 1 200px; }
.adm-row .btn { margin-top: 0; }
.acc-field select {
	font: inherit; font-size: 16px; color: var(--text); padding: 10px 12px; width: 100%;
	background: rgba(5, 8, 15, 0.9); border: 1px solid var(--line-strong); border-radius: 0;
}
.adm-check { display: flex; align-items: center; gap: 10px; color: var(--text-dim); }
.adm-check input { accent-color: var(--cyan); }
.adm-numbers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.adm-numbers dd { font-family: var(--f-display); font-size: 28px; }
.adm-bad { color: var(--red); font-weight: 600; }
.adm-secret { margin-bottom: 22px; padding: 14px 16px; border-left: 3px solid var(--amber); background: rgba(255, 181, 69, 0.08); }
.adm-secret pre {
	margin: 10px 0 0; font-family: var(--f-mono); font-size: 15px; color: #fff; white-space: pre-wrap; word-break: break-all;
	user-select: all;
}
.adm-bar { width: 100%; min-width: 80px; height: 10px; appearance: none; border: 0; background: rgba(120, 180, 255, 0.1); }
.adm-bar::-webkit-progress-bar { background: rgba(120, 180, 255, 0.1); }
.adm-bar::-webkit-progress-value { background: var(--cyan); }
.adm-bar::-moz-progress-bar { background: var(--cyan); }
.acc-panel h3.acc-sub { margin-top: 18px; margin-bottom: 8px; }

@media (max-width: 820px) {
	.adm-numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	/* Tables become cards: one row per block, the column name in front of each value. */
	.acc-wide .acc-table thead { display: none; }
	.acc-wide .acc-table tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
	.acc-wide .acc-table td { display: flex; gap: 12px; padding: 3px 0; border: 0; }
	.acc-wide .acc-table td::before {
		content: attr(data-label); flex: 0 0 38%; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.1em;
		text-transform: uppercase; color: var(--text-faint); padding-top: 3px;
	}
	.acc-wide .acc-table td:empty { display: none; }
}
.acc-facts + .acc-hint, .acc-links + .acc-facts { margin-top: 14px; }
