/* DrapOTS account dashboard and account forms.
   Loaded after style.css. Selectors that must beat the generic
   ".content h2", ".content button" and ".content table" rules are scoped
   under .content. */

/* ===== Shared bits ===== */

.alert-warning { border-color: var(--brass); color: var(--ink); }
.alert-info { border-color: var(--wood-700); color: var(--ink); }
.alert p { margin: 0; }
.alert p + p { margin-top: 6px; }
.alert .button { margin-top: 10px; }

.content .button-danger {
	background: #8b1a1a;
	color: #fff;
	box-shadow: inset 1px 1px 0 #b94a4a, inset -1px -1px 0 #3d0808;
}
.content .button-danger:hover { background: #6e1313; color: #fff; }

.content .button-quiet.button-danger {
	background: transparent;
	color: #8b1a1a;
	box-shadow: inset 0 0 0 2px #8b1a1a;
}
.content .button-quiet.button-danger:hover { background: #8b1a1a; color: #fff; }

.content .form-card .form-actions,
.content .acct-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 12px;
}

.content .form-card .form-actions { margin-top: 6px; }

.acct-value { margin: 0; font-weight: bold; color: var(--ink); }

.content .field textarea {
	width: 100%;
	max-width: 520px;
	padding: 7px 9px;
	resize: vertical;
	font: inherit;
}

.form-section.is-danger { border-color: rgba(139, 26, 26, 0.55); }
.form-section.is-danger legend { color: #8b1a1a; }

.acct-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* ===== Dashboard header card ===== */

.acct-header {
	margin: 0 0 20px;
	padding: 3px;
	background: var(--brass);
	clip-path: var(--px);
}

.acct-header-inner {
	padding: 18px 20px 20px;
	background: var(--wood-700);
	color: var(--parchment);
	clip-path: var(--px);
}

.acct-header a { color: var(--brass-light); }
.acct-header :focus-visible { outline-color: var(--brass-light); }

.acct-header-top {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 8px 16px;
	margin: 0 0 16px;
}

.acct-eyebrow {
	margin: 0;
	font-size: 11px;
	color: var(--parchment-dark);
}

.content .acct-name {
	margin: 0;
	font: 2rem/1.15 var(--font-display);
	color: var(--brass-light);
	overflow-wrap: anywhere;
}

.acct-welcome { margin: 4px 0 0; color: var(--parchment); }
.acct-welcome span { color: #ffb3a8 !important; }

.acct-header-status {
	margin: 0;
	padding: 4px 10px;
	background: var(--wood-950);
	box-shadow: inset 0 0 0 1px rgba(200, 160, 74, 0.6);
	font-weight: bold;
}

/* Controller HTML carries inline red/green that is unreadable on wood. */
.acct-header [style*="color"] { color: inherit !important; }

.acct-facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 12px 20px;
	margin: 0;
	padding-top: 14px;
	border-top: 1px dashed rgba(200, 160, 74, 0.55);
}

.acct-facts dt {
	font-size: 11px;
	color: var(--parchment-dark);
}

.acct-facts dd { margin: 2px 0 0; font-weight: bold; overflow-wrap: anywhere; }

/* ===== Sections ===== */

.acct-section { margin: 0 0 26px; }

.acct-section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
	margin: 0 0 12px;
}

.content .acct-title {
	margin: 0;
	font: 1.5rem/1.2 var(--font-display);
	color: var(--wood-700);
}

.acct-meta { margin: 2px 0 0; font-size: 12px; color: var(--ink-soft); }

/* ===== Character cards ===== */

.acct-chars {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 14px;
	margin: 0 0 14px;
	padding: 0;
	list-style: none;
}

.content .acct-chars li { max-width: none; }

.acct-char {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 12px 14px 14px;
	background: #f6eed7;
	border: 1px solid rgba(74, 46, 25, 0.3);
	border-top: 3px solid var(--wood-700);
}

.acct-char.is-deleted {
	border-style: dashed;
	border-top-style: solid;
	border-top-color: #8b1a1a;
	background: #efe3c6;
}

.acct-char-head { display: flex; align-items: center; gap: 12px; }

.acct-outfit {
	flex: none;
	width: 64px;
	height: 64px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(74, 46, 25, 0.1);
}

.acct-outfit img { image-rendering: pixelated; max-width: 64px; max-height: 64px; }

.acct-char-id { min-width: 0; }

.acct-char-name {
	display: block;
	font-weight: bold;
	font-size: 15px;
	overflow-wrap: anywhere;
}

.acct-status,
.acct-flag {
	display: inline-block;
	margin-top: 4px;
	padding: 1px 8px;
	font-size: 11px;
	font-weight: bold;
	line-height: 1.6;
}

.acct-status { background: var(--wood-950); }
.acct-status::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; background: currentColor; }
.acct-status.is-online { color: var(--online); }
.acct-status.is-offline { color: var(--offline); }

.acct-flag { margin-left: 4px; color: #fff; background: #8b1a1a; }

.acct-char-facts {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 2px 12px;
	margin: 0;
	font-size: 12px;
}
.acct-char-facts dt { color: var(--ink-soft); }
.acct-char-facts dd { margin: 0; font-weight: bold; }

.acct-char-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; }

.acct-empty {
	margin: 0 0 14px;
	padding: 18px 16px;
	background: #f6eed7;
	border: 1px dashed rgba(74, 46, 25, 0.45);
}
.acct-empty p { margin: 0 0 10px; }

.acct-tools {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 10px;
}
.acct-tools-label { font-size: 12px; color: var(--ink-soft); margin-right: 4px; }

/* ===== Settings list ===== */

.content .acct-settings { margin: 0; padding: 0; list-style: none; }
.content .acct-settings li { max-width: none; }

.acct-setting {
	display: grid;
	grid-template-columns: 150px minmax(0, 1fr) auto;
	align-items: center;
	gap: 6px 16px;
	padding: 10px 0;
	border-bottom: 1px dashed rgba(74, 46, 25, 0.3);
}
.acct-setting:first-child { padding-top: 0; }
.acct-setting:last-child { padding-bottom: 0; border-bottom: 0; }

.acct-setting-label { font-weight: bold; color: var(--wood-700); }
.acct-setting-value { overflow-wrap: anywhere; }
.acct-setting-value small { display: block; color: var(--ink-soft); }
.acct-setting-action { display: flex; flex-wrap: wrap; gap: 8px; }

/* ===== Logs ===== */

.acct-logs { margin: 0 0 26px; }
.acct-logs-scroll { max-height: 360px; overflow: auto; }

.content .acct-table { width: 100%; background: #f6eed7; }
.content .acct-table th {
	position: sticky;
	top: 0;
	padding: 6px 12px;
	text-align: left;
	color: var(--parchment);
	background: var(--wood-700);
}
.content .acct-table td { padding: 5px 12px; border-bottom: 1px solid rgba(74, 46, 25, 0.12); }

/* ===== Phone ===== */

@media (max-width: 760px) {
	.acct-header-inner { padding: 14px 14px 16px; }
	.content .acct-name { font-size: 1.6rem; }
	.acct-chars { grid-template-columns: minmax(0, 1fr); }
	.acct-setting { grid-template-columns: minmax(0, 1fr); }
	.content .form-card .form-actions .button,
	.content .acct-char-actions .button { flex: 1 1 auto; text-align: center; }
}

.acct-limit { margin: 0 0 12px; }
