/*
	Los Santos Stories UCP theme
	Same palette as the in-game login / character selector (CharSelect.pwn):
	gold #C8A45C, gold hover #E6C88A, white titles, soft grey text, on a neutral dark base.
*/

:root {
	--bg: #0e0f11;
	--bg-2: #121316;
	--panel: #17181b;
	--card: #1c1d21;
	--card-2: #222328;
	--card-3: #2a2b31;
	--line: rgba(255, 255, 255, .06);
	--line-2: rgba(255, 255, 255, .1);

	--gold: #c8a45c;
	--gold-hi: #e6c88a;
	--gold-lo: #8f7443;
	--gold-soft: rgba(200, 164, 92, .12);
	--gold-line: rgba(200, 164, 92, .35);

	--text: #f4f4f5;
	--text-2: #c9cbd1;
	--muted: #8b8e97;
	--faint: #5d6069;

	--green: #4ade80;
	--green-soft: rgba(74, 222, 128, .12);
	--red: #ef4444;
	--red-soft: rgba(239, 68, 68, .12);
	--amber: #f5b544;

	--radius: 12px;
	--radius-sm: 8px;
	--shadow: 0 10px 30px rgba(0, 0, 0, .35);
	--sidebar-w: 268px;

	--font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-head: "Outfit", "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
	background: var(--bg);
	color: var(--text-2);
	font-family: var(--font);
	font-size: 14px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	min-height: 100vh;
}

a { color: var(--gold-hi); text-decoration: none; }
a:hover { color: #fff; }

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--text); margin: 0; font-weight: 700; letter-spacing: .1px; }

::selection { background: var(--gold); color: #111; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2b2c31; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--gold-lo); }

.muted { color: var(--muted); }
.gold { color: var(--gold); }
.green { color: var(--green); }
.red { color: var(--red); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mt { margin-top: 18px; }
.mb { margin-bottom: 18px; }

/* ------------------------------------------------ dev stripe */

.dev-stripe {
	position: sticky; top: 0; z-index: 60;
	height: 22px;
	background: repeating-linear-gradient(-45deg, var(--gold) 0 14px, #111 14px 28px);
	display: flex; align-items: center; justify-content: center;
}
.dev-stripe span {
	background: #111; color: var(--gold-hi);
	font: 700 10.5px/22px var(--font); letter-spacing: 2.5px; text-transform: uppercase;
	padding: 0 14px;
}

/* ------------------------------------------------ app shell */

.app { display: flex; min-height: 100vh; }

.sidebar {
	position: sticky; top: 0;
	width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
	height: 100vh;
	background: linear-gradient(180deg, #131417 0%, #101114 100%);
	border-right: 1px solid var(--line);
	display: flex; flex-direction: column;
	z-index: 40;
}
.dev-stripe + .app .sidebar { height: calc(100vh - 22px); top: 22px; }

.sidebar::after {
	content: ""; position: absolute; top: 0; right: -1px; width: 2px; height: 120px;
	background: linear-gradient(180deg, var(--gold), transparent);
}

.brand {
	display: flex; align-items: center; gap: 12px;
	padding: 20px 20px 16px;
}
.brand img { width: 52px; height: 52px; object-fit: contain; filter: drop-shadow(0 4px 12px rgba(200, 164, 92, .25)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font: 800 19px var(--font-head); color: #fff; letter-spacing: .3px; text-transform: uppercase; }
.brand-text em { font: 600 11px var(--font); color: var(--gold); font-style: normal; letter-spacing: 2px; text-transform: uppercase; margin-top: 3px; }

.welcome {
	margin: 0 14px 10px;
	padding: 12px 14px;
	border-radius: var(--radius-sm);
	background: linear-gradient(135deg, rgba(200, 164, 92, .16), rgba(200, 164, 92, .04));
	border: 1px solid var(--gold-line);
	display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.welcome small { display: block; color: var(--text-2); font-size: 12px; }
.welcome strong { display: block; color: var(--gold-hi); font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 170px; }
.welcome-bell { position: relative; color: var(--gold-hi); font-size: 15px; }
.welcome-bell .dot { position: absolute; top: -2px; right: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px #1a1712; }

.nav { flex: 1; overflow-y: auto; padding: 4px 10px 12px; }

.nav-section {
	padding: 16px 12px 6px;
	color: var(--gold);
	font: 700 11px var(--font); letter-spacing: 1.6px; text-transform: uppercase;
}

.nav-item {
	position: relative;
	display: flex; align-items: center; gap: 12px;
	padding: 9px 12px;
	margin: 1px 0;
	border-radius: var(--radius-sm);
	color: var(--text-2);
	font-weight: 500; font-size: 14px;
	transition: background .15s, color .15s;
}
.nav-item i { width: 18px; text-align: center; color: var(--muted); font-size: 14.5px; transition: color .15s; }
.nav-item:hover { background: rgba(255, 255, 255, .04); color: #fff; }
.nav-item:hover i { color: var(--gold-hi); }
.nav-item.active { background: linear-gradient(90deg, rgba(200, 164, 92, .18), rgba(200, 164, 92, .02)); color: #fff; }
.nav-item.active i { color: var(--gold); }
.nav-item.active::before { content: ""; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }

.nav-count {
	margin-left: auto;
	min-width: 20px; height: 20px; padding: 0 6px;
	border-radius: 10px;
	background: var(--gold); color: #17140e;
	font-size: 11px; font-weight: 700; line-height: 20px; text-align: center;
}

.sidebar-foot { padding: 10px; border-top: 1px solid var(--line); }
.server-pill {
	display: flex; align-items: center; gap: 10px;
	padding: 9px 12px; margin-bottom: 4px;
	color: var(--text-2); font-size: 12.5px;
}
.server-pill b { color: #fff; }
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); } }
.nav-item.logout:hover { color: var(--red); }
.nav-item.logout:hover i { color: var(--red); }

.sidebar-backdrop { display: none; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ------------------------------------------------ top bar */

.topbar {
	display: grid;
	grid-template-columns: auto 1fr minmax(220px, 420px) auto;
	align-items: center; gap: 20px;
	padding: 22px 32px 18px;
}
.menu-btn { display: none !important; }

.page-heading { grid-column: 1 / 3; min-width: 0; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.back-link:hover { color: var(--gold-hi); }
.page-heading h1 { font-size: 26px; font-weight: 700; color: #fff; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-sub { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }

.search {
	position: relative;
	display: flex; align-items: center;
}
.search i { position: absolute; left: 14px; color: var(--muted); font-size: 13px; pointer-events: none; }
.search input {
	width: 100%; height: 40px;
	padding: 0 14px 0 38px;
	border-radius: var(--radius-sm);
	border: 1px solid var(--line-2);
	background: var(--panel);
	color: var(--text); font: 14px var(--font);
	outline: none; transition: border-color .15s, box-shadow .15s;
}
.search input::placeholder { color: var(--faint); }
.search input:focus { border-color: var(--gold-line); box-shadow: 0 0 0 3px var(--gold-soft); }

.top-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
	position: relative;
	display: inline-flex; align-items: center; justify-content: center;
	width: 40px; height: 40px;
	border-radius: var(--radius-sm);
	border: 1px solid var(--line-2);
	background: var(--panel);
	color: var(--text-2); cursor: pointer;
	transition: border-color .15s, color .15s;
}
.icon-btn:hover { border-color: var(--gold-line); color: var(--gold-hi); }
.icon-count {
	position: absolute; top: -6px; right: -6px;
	min-width: 18px; height: 18px; padding: 0 5px;
	border-radius: 9px; background: var(--red); color: #fff;
	font-size: 10.5px; font-weight: 700; line-height: 18px; text-align: center;
	box-shadow: 0 0 0 2px var(--bg);
}

.user-menu { position: relative; }
.user-btn {
	display: flex; align-items: center; gap: 8px;
	padding: 3px 10px 3px 3px; height: 40px;
	border-radius: 20px; border: 1px solid var(--line-2);
	background: var(--panel); color: var(--muted); cursor: pointer;
}
.user-btn:hover { border-color: var(--gold-line); }
.user-btn i { font-size: 11px; }
.dropdown {
	position: absolute; right: 0; top: calc(100% + 8px);
	width: 240px;
	background: var(--card); border: 1px solid var(--line-2);
	border-radius: var(--radius); box-shadow: var(--shadow);
	padding: 6px; z-index: 50;
	opacity: 0; visibility: hidden; transform: translateY(-4px);
	transition: opacity .15s, transform .15s, visibility .15s;
}
.user-menu.open .dropdown { opacity: 1; visibility: visible; transform: none; }
.dropdown-head { padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.dropdown-head strong { color: #fff; font-size: 14.5px; }
.dropdown a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 6px; color: var(--text-2); font-size: 13.5px; }
.dropdown a i { width: 16px; color: var(--muted); }
.dropdown a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.dropdown a.danger:hover, .dropdown a.danger:hover i { color: var(--red); }

/* ------------------------------------------------ content */

.content { flex: 1; padding: 6px 32px 32px; display: flex; flex-direction: column; gap: 22px; }

.footer {
	display: flex; justify-content: space-between; gap: 10px;
	padding: 18px 32px; border-top: 1px solid var(--line);
	color: var(--faint); font-size: 12.5px;
}

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-side { grid-template-columns: 300px minmax(0, 1fr); align-items: start; }
.grid-main-side { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 22px; min-width: 0; }

/* ------------------------------------------------ cards */

.card {
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	min-width: 0;
}
.card-head {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	margin: 0 22px; padding: 18px 0 14px;
	border-bottom: 1px solid var(--line);
}
.card-head h2 { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; }
.card-head h2 i { color: var(--gold); font-size: 15px; }
.card-tools { display: flex; align-items: center; gap: 8px; }
.card-body { padding: 18px 22px 22px; }
.card-body.flush { padding: 0; }

.count-pill {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 26px; height: 26px; padding: 0 8px; border-radius: 13px;
	border: 1px solid var(--gold-line); background: var(--gold-soft);
	color: var(--gold-hi); font-size: 12px; font-weight: 700;
}

/* stat tiles */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 14px; }
.stat {
	display: flex; flex-direction: column; gap: 4px;
	padding: 16px 16px 15px;
	border-radius: var(--radius-sm);
	background: var(--card); border: 1px solid var(--line);
	min-width: 0;
}
.stat-label { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.stat-value { color: #fff; font: 700 20px var(--font-head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-hint { color: var(--faint); font-size: 12px; }
.stat-gold .stat-value { color: var(--gold-hi); }
.stat-green .stat-value { color: var(--green); }

/* key/value rows */
.info-list { display: flex; flex-direction: column; }
.info-row { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.info-row:last-child { border-bottom: 0; }
.info-row > i { width: 20px; text-align: center; color: var(--faint); font-size: 15px; }
.info-row div > span { display: block; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; }
.info-row div > strong { display: block; color: #fff; font-weight: 600; font-size: 14px; word-break: break-word; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 9px 18px; }
.kv dt { color: var(--muted); font-size: 13px; }
.kv dd { margin: 0; color: #fff; font-weight: 500; text-align: right; font-size: 13.5px; word-break: break-word; }

/* ------------------------------------------------ badges, chips, tags */

.badge {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 3px 10px; border-radius: 20px;
	font-size: 11.5px; font-weight: 700; letter-spacing: .2px; white-space: nowrap;
	border: 1px solid var(--line-2); color: var(--text-2); background: rgba(255, 255, 255, .04);
}
.badge i { font-size: 10.5px; }
.badge-gold { border-color: var(--gold-line); color: var(--gold-hi); background: var(--gold-soft); }
.badge-white { border-color: rgba(255, 255, 255, .25); color: #fff; background: rgba(255, 255, 255, .07); }
.badge-muted { color: var(--muted); }
.badge-green { border-color: rgba(74, 222, 128, .35); color: var(--green); background: var(--green-soft); }
.badge-red { border-color: rgba(239, 68, 68, .35); color: #f87171; background: var(--red-soft); }
.badge-amber { border-color: rgba(245, 181, 68, .35); color: var(--amber); background: rgba(245, 181, 68, .1); }

.chip {
	display: inline-block; padding: 2px 8px; border-radius: 6px;
	background: var(--card-3); border: 1px solid var(--line-2);
	color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap;
}

.tag {
	display: inline-flex; align-items: center; gap: 7px;
	padding: 5px 10px; border-radius: 6px;
	border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03);
	color: var(--text-2); font-size: 12px; font-weight: 600;
}
.tag-gold { border-color: var(--gold-line); color: var(--gold-hi); background: var(--gold-soft); }

/* ------------------------------------------------ buttons & forms */

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	height: 40px; padding: 0 18px;
	border-radius: var(--radius-sm);
	border: 1px solid transparent;
	font: 600 14px var(--font); cursor: pointer; white-space: nowrap;
	transition: background .15s, border-color .15s, color .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--gold); color: #17140e; }
.btn-gold:hover { background: var(--gold-hi); color: #17140e; }
.btn-ghost { background: var(--panel); border-color: var(--line-2); color: #fff; }
.btn-ghost:hover { border-color: var(--gold-line); color: var(--gold-hi); }
.btn-outline { background: transparent; border-color: var(--gold-line); color: var(--gold-hi); }
.btn-outline:hover { background: var(--gold-soft); color: #fff; }
.btn-danger { background: transparent; border-color: rgba(239, 68, 68, .4); color: #f87171; }
.btn-danger:hover { background: var(--red-soft); color: #fff; }
.btn-green { background: transparent; border-color: rgba(74, 222, 128, .4); color: var(--green); }
.btn-green:hover { background: var(--green-soft); color: #fff; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.icon-action { background: none; border: 0; padding: 6px; color: var(--faint); cursor: pointer; border-radius: 6px; font-size: 14px; }
.icon-action:hover { color: var(--red); background: var(--red-soft); }

.form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field label { color: var(--text-2); font-size: 12.5px; font-weight: 600; }
.field .hint { color: var(--faint); font-size: 12px; }

.input, .select, .textarea {
	width: 100%;
	padding: 10px 13px;
	border-radius: var(--radius-sm);
	border: 1px solid var(--line-2);
	background: var(--bg-2);
	color: var(--text); font: 14px var(--font);
	outline: none; transition: border-color .15s, box-shadow .15s;
}
.input, .select { height: 42px; }
.textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--gold-line); box-shadow: 0 0 0 3px var(--gold-soft); }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 18px, calc(100% - 13px) 18px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }

.input-icon { position: relative; }
.input-icon > i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: 13px; pointer-events: none; }
.input-icon .input { padding-left: 38px; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.switch:last-child { border-bottom: 0; }
.switch b { display: block; color: #fff; font-weight: 600; font-size: 14px; }
.switch small { display: block; color: var(--muted); font-size: 12.5px; }
.switch input { appearance: none; flex: 0 0 auto; width: 42px; height: 24px; border-radius: 12px; background: var(--card-3); border: 1px solid var(--line-2); position: relative; cursor: pointer; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: left .15s, background .15s; }
.switch input:checked { background: var(--gold-soft); border-color: var(--gold-line); }
.switch input:checked::after { left: 21px; background: var(--gold); }

.char-counter { color: var(--faint); font-size: 12px; text-align: right; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ------------------------------------------------ alerts & toasts */

.alert {
	display: flex; gap: 12px; align-items: flex-start;
	padding: 14px 16px; border-radius: var(--radius-sm);
	border: 1px solid var(--line-2); background: var(--card);
	color: var(--text-2);
}
.alert > i { margin-top: 2px; }
.alert b { color: #fff; }
.alert-gold { border-color: var(--gold-line); background: var(--gold-soft); }
.alert-gold > i { color: var(--gold); }
.alert-error { border-color: rgba(239, 68, 68, .35); background: var(--red-soft); }
.alert-error > i { color: var(--red); }
.alert-green { border-color: rgba(74, 222, 128, .35); background: var(--green-soft); }
.alert-green > i { color: var(--green); }
.alert ul { margin: 6px 0 0; padding-left: 18px; }

.toasts { position: fixed; top: 22px; right: 22px; z-index: 100; display: flex; flex-direction: column; gap: 10px; max-width: 380px; }
.dev-stripe ~ .app .toasts { top: 40px; }
.toast {
	display: flex; align-items: center; gap: 12px;
	padding: 13px 14px 13px 16px; border-radius: var(--radius-sm);
	background: var(--card-2); border: 1px solid var(--line-2); border-left: 3px solid var(--gold);
	color: #fff; box-shadow: var(--shadow); font-size: 13.5px;
	animation: toast-in .25s ease;
}
.toast > i { color: var(--gold); }
.toast-error { border-left-color: var(--red); }
.toast-error > i { color: var(--red); }
.toast-success > i { color: var(--green); }
.toast-success { border-left-color: var(--green); }
.toast span { flex: 1; }
.toast button { background: none; border: 0; color: var(--muted); cursor: pointer; }
@keyframes toast-in { from { opacity: 0; transform: translateX(16px); } }

/* ------------------------------------------------ tables */

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
	text-align: left; padding: 12px 16px;
	color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
	border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--text-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: rgba(255, 255, 255, .02); }
.table td strong, .table td a.strong { color: #fff; font-weight: 600; }
.table tr.row-link { cursor: pointer; }
.cell-user { display: flex; align-items: center; gap: 10px; }

/* ------------------------------------------------ tabs */

.tabs { display: flex; border-bottom: 1px solid var(--line); margin: -4px 0 20px; }
.tab {
	flex: 1; display: flex; align-items: center; justify-content: center; gap: 9px;
	padding: 12px 10px; margin-bottom: -1px;
	color: var(--muted); font-weight: 600; font-size: 14px; cursor: pointer;
	border: 0; border-bottom: 2px solid transparent; background: none; font-family: var(--font);
}
.tab:hover { color: #fff; }
.tab.active { color: #fff; border-bottom-color: var(--gold); }
.tab.active i { color: var(--gold); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ------------------------------------------------ avatar */

.avatar {
	display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
	border-radius: 50%;
	background: linear-gradient(145deg, #2c2a25, #1b1a17);
	border: 1px solid var(--gold-line);
	color: var(--gold-hi); font-family: var(--font-head); font-weight: 700;
	background-size: 190%; background-position: 50% 6%; background-repeat: no-repeat;
	overflow: hidden;
}
.avatar.has-skin { background-color: #26272c; }
.avatar-xs { width: 24px; height: 24px; font-size: 11px; }
.avatar-sm { width: 32px; height: 32px; font-size: 13px; }
.avatar-md { width: 44px; height: 44px; font-size: 17px; }
.avatar-lg { width: 64px; height: 64px; font-size: 24px; }
.avatar-xl { width: 168px; height: 168px; font-size: 64px; border-width: 3px; border-color: var(--gold); box-shadow: 0 0 0 6px rgba(200, 164, 92, .08), 0 18px 40px rgba(0, 0, 0, .45); }

/* ------------------------------------------------ profile */

.profile-card { overflow: hidden; }
.profile-banner {
	position: relative;
	height: 250px;
	display: flex; align-items: center; justify-content: center;
	background:
		radial-gradient(ellipse at 50% 120%, rgba(200, 164, 92, .28), transparent 60%),
		linear-gradient(180deg, #1b1a17, #121214);
	border-bottom: 1px solid var(--line);
}
.profile-banner::before {
	content: ""; position: absolute; inset: 0;
	background: url("/assets/images/gunbg.png"); opacity: .05;
}
.profile-banner .avatar { position: relative; }
.profile-name { padding: 20px 22px 6px; }
.profile-name h2 { font-size: 23px; margin-bottom: 8px; word-break: break-word; }
.profile-name .badges { display: flex; flex-wrap: wrap; gap: 6px; }
.profile-bio { padding: 8px 22px 0; color: var(--text-2); font-size: 13.5px; white-space: pre-line; word-break: break-word; }
.profile-info { padding: 8px 22px 16px; }

/* ------------------------------------------------ character cards */

.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(268px, 100%), 1fr)); gap: 16px; }
.char-card {
	display: flex; flex-direction: column;
	background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius);
	overflow: hidden; color: inherit;
	transition: border-color .15s, transform .15s, box-shadow .15s;
}
.char-card.clickable:hover { border-color: var(--gold-line); transform: translateY(-2px); box-shadow: var(--shadow); color: inherit; }
.char-art {
	position: relative; height: 170px; overflow: hidden;
	background:
		radial-gradient(circle at 50% 100%, rgba(200, 164, 92, .22), transparent 65%),
		repeating-linear-gradient(45deg, #1f2024 0 6px, #1b1c20 6px 12px);
	border-bottom: 1px solid var(--line);
	display: flex; justify-content: center;
}
.char-art img { height: 300px; margin-top: 4px; object-fit: contain; object-position: top; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .5)); }
.char-noskin { align-self: center; font-size: 64px; color: var(--card-3); }
.char-status {
	position: absolute; right: 10px; bottom: 10px;
	padding: 3px 10px; border-radius: 12px;
	font-size: 11px; font-weight: 700; backdrop-filter: blur(4px);
}
.char-status.on { color: var(--green); background: rgba(10, 30, 18, .8); border: 1px solid rgba(74, 222, 128, .4); }
.char-status.off { color: var(--muted); background: rgba(15, 15, 17, .8); border: 1px solid var(--line-2); }
.char-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.char-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.char-title h3 { font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.char-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.char-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); margin-top: auto; }
.char-meta span { display: block; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; white-space: nowrap; }
.char-meta strong { display: block; color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; }

.char-new {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
	min-height: 320px;
	border: 1px dashed var(--gold-line); border-radius: var(--radius);
	background: rgba(200, 164, 92, .03);
	color: var(--gold-hi); font-weight: 600;
	transition: background .15s;
}
.char-new i { font-size: 30px; }
.char-new small { color: var(--muted); font-weight: 400; }
.char-new:hover { background: var(--gold-soft); color: #fff; }

/* character detail */
.char-hero {
	display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 0;
	overflow: hidden;
}
.char-hero .char-art { height: auto; min-height: 280px; border-bottom: 0; border-right: 1px solid var(--line); }
.char-hero .char-art img { height: 380px; }
.char-hero-body { padding: 22px 24px; display: flex; flex-direction: column; gap: 16px; }
.char-hero-body h2 { font-size: 28px; }
.progress { height: 8px; border-radius: 4px; background: var(--card-3); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi)); }
.progress-label { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-bottom: 6px; }

/* ------------------------------------------------ comments */

.comment-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.comment-form .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.comments { display: flex; flex-direction: column; gap: 12px; }
.comment { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--card); border: 1px solid var(--line); }
.comment-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.comment-head a.who { color: #fff; font-weight: 700; }
.comment-head a.who:hover { color: var(--gold-hi); }
.comment-head time { color: var(--faint); font-size: 12px; }
.comment-head form { margin-left: auto; }
.comment-body { color: var(--text-2); white-space: pre-line; word-break: break-word; }

/* ------------------------------------------------ lists */

.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); color: inherit; }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover .list-title { color: var(--gold-hi); }
.list-icon {
	width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px;
	display: flex; align-items: center; justify-content: center;
	background: var(--gold-soft); color: var(--gold); border: 1px solid var(--gold-line);
}
.list-main { flex: 1; min-width: 0; }
.list-title { display: block; color: #fff; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-sub { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-side { color: var(--muted); font-size: 12px; white-space: nowrap; text-align: right; }
.unread .list-title::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); margin-left: 8px; vertical-align: middle; }

/* ------------------------------------------------ announcements */

.post { padding: 20px 22px; border-bottom: 1px solid var(--line); }
.post:last-child { border-bottom: 0; }
.post-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.post-head h3 { font-size: 18px; flex: 1 1 auto; }
.post-head h3 a { color: #fff; }
.post-head h3 a:hover { color: var(--gold-hi); }
.post-meta { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.post-body { color: var(--text-2); line-height: 1.7; white-space: pre-line; word-break: break-word; }
.post.pinned { background: linear-gradient(90deg, rgba(200, 164, 92, .07), transparent 60%); }

/* ------------------------------------------------ hero (dashboard) */

.hero {
	position: relative; overflow: hidden;
	padding: 28px 30px;
	border-radius: var(--radius);
	border: 1px solid var(--gold-line);
	background:
		radial-gradient(ellipse at 100% 0%, rgba(200, 164, 92, .22), transparent 55%),
		linear-gradient(135deg, #1d1b17, #141416);
	display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.hero::after {
	content: ""; position: absolute; right: -40px; bottom: -60px; width: 300px; height: 300px;
	background: url("/assets/images/lsstories_logo.png") center/contain no-repeat;
	opacity: .06; transform: rotate(-8deg);
}
.hero h2 { font-size: 26px; margin-bottom: 6px; }
.hero h2 span { color: var(--gold-hi); }
.hero p { margin: 0; color: var(--text-2); max-width: 560px; }
.hero-actions { display: flex; gap: 10px; position: relative; z-index: 1; flex-wrap: wrap; }

.connect-box {
	display: flex; align-items: center; gap: 10px;
	padding: 8px 8px 8px 14px; border-radius: var(--radius-sm);
	background: rgba(0, 0, 0, .3); border: 1px solid var(--line-2);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #fff; font-size: 13px;
}

/* ------------------------------------------------ search / misc */

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 34px 16px; color: var(--muted); }
.empty > i { font-size: 30px; color: var(--gold-lo); margin-bottom: 4px; }
.empty strong { color: #fff; font-size: 15px; }
.empty p { margin: 0; max-width: 420px; }

.pager { display: flex; justify-content: center; gap: 6px; padding: 16px; }
.pager a, .pager span { min-width: 34px; height: 34px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--line-2); color: var(--text-2); font-weight: 600; font-size: 13px; }
.pager a:hover { border-color: var(--gold-line); color: var(--gold-hi); }
.pager .current { background: var(--gold); border-color: var(--gold); color: #17140e; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filters .input, .filters .select { height: 38px; width: auto; min-width: 180px; }

.pill-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-nav a { padding: 7px 14px; border-radius: 20px; border: 1px solid var(--line-2); color: var(--text-2); font-size: 13px; font-weight: 600; }
.pill-nav a:hover { border-color: var(--gold-line); color: #fff; }
.pill-nav a.active { background: var(--gold); border-color: var(--gold); color: #17140e; }

.faq details { border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq summary { list-style: none; cursor: pointer; padding: 15px 0; color: #fff; font-weight: 600; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "\f067"; font: var(--fa-font-solid); color: var(--gold); font-size: 12px; margin-top: 3px; }
.faq details[open] summary::after { content: "\f068"; }
.faq details p { margin: 0 0 16px; color: var(--text-2); line-height: 1.7; }

code, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; background: var(--card-2); border: 1px solid var(--line-2); padding: 1px 6px; border-radius: 5px; color: var(--gold-hi); }

.cmd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 10px; }
.cmd { padding: 11px 13px; border-radius: var(--radius-sm); background: var(--card); border: 1px solid var(--line); }
.cmd code { display: inline-block; margin-bottom: 4px; }
.cmd span { display: block; color: var(--muted); font-size: 12.5px; }

/* map */
.map-shell { position: relative; height: 72vh; min-height: 460px; overflow: hidden; border-radius: 0 0 var(--radius) var(--radius); background: #0b0c0d; cursor: grab; touch-action: none; }
.map-shell.dragging { cursor: grabbing; }
.map-layer { position: absolute; left: 0; top: 0; width: 3072px; height: 3072px; transform-origin: 0 0; }
.map-layer img { width: 100%; height: 100%; display: block; user-select: none; -webkit-user-drag: none; }
.map-pin {
	position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px;
	border-radius: 50%; display: flex; align-items: center; justify-content: center;
	font-size: 10px; color: #17140e; background: var(--gold); border: 2px solid #17140e;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .6); cursor: pointer;
}
.map-pin.p-house { background: #fff; }
.map-pin.p-sale { background: var(--green); }
.map-pin.p-mine { background: var(--gold-hi); width: 26px; height: 26px; margin: -13px 0 0 -13px; font-size: 12px; }
.map-tip {
	position: absolute; z-index: 5; pointer-events: none;
	padding: 8px 11px; border-radius: 8px; background: var(--card-2); border: 1px solid var(--gold-line);
	color: #fff; font-size: 12.5px; white-space: nowrap; box-shadow: var(--shadow); display: none;
}
.map-tip small { display: block; color: var(--muted); }
.map-ctrl { position: absolute; right: 14px; top: 14px; display: flex; flex-direction: column; gap: 6px; z-index: 6; }
.map-legend { display: flex; flex-wrap: wrap; gap: 16px; color: var(--text-2); font-size: 12.5px; }
.map-legend i.dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; border: 2px solid #17140e; }

/* ------------------------------------------------ login & register */

.auth-body {
	min-height: 100vh;
	display: flex; align-items: center; justify-content: center;
	padding: 40px 16px;
	background:
		radial-gradient(ellipse at 50% -10%, rgba(200, 164, 92, .18), transparent 55%),
		radial-gradient(ellipse at 50% 110%, rgba(200, 164, 92, .08), transparent 50%),
		var(--bg);
}
.auth {
	width: 100%; max-width: 440px;
	display: flex; flex-direction: column; align-items: center; gap: 22px;
}
.auth-wide { max-width: 640px; }
.auth-logo { width: 120px; height: 120px; object-fit: contain; filter: drop-shadow(0 10px 30px rgba(200, 164, 92, .25)); }
.auth-card {
	width: 100%;
	background: rgba(23, 24, 27, .92);
	border: 1px solid var(--line-2);
	border-radius: 14px;
	box-shadow: 0 30px 60px rgba(0, 0, 0, .5);
	overflow: hidden;
}
.auth-head { padding: 22px 26px 0; }
.auth-head h1 { font-size: 24px; color: #fff; }
.auth-line { height: 2px; margin: 14px 26px 0; background: linear-gradient(90deg, var(--gold), rgba(200, 164, 92, .1)); }
.auth-sub { display: flex; justify-content: space-between; padding: 10px 26px 0; font-size: 11px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; }
.auth-sub span:first-child { color: var(--gold); }
.auth-sub span:last-child { color: #fff; }
.auth-body-inner { padding: 22px 26px 26px; display: flex; flex-direction: column; gap: 16px; }
.auth-foot { text-align: center; color: var(--muted); font-size: 13.5px; }
.auth-foot a { font-weight: 600; }

/* ------------------------------------------------ responsive */

@media (max-width: 1280px) {
	.grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.grid-main-side { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1080px) {
	.sidebar { position: fixed; left: 0; top: 0; height: 100vh !important; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
	body.nav-open .sidebar { transform: none; }
	body.nav-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 30; }
	.menu-btn { display: inline-flex !important; }
	.topbar { grid-template-columns: auto minmax(0, 1fr) auto; }
	.page-heading { grid-column: auto; }
	.search { grid-column: 1 / -1; grid-row: 2; }
	.grid-side, .grid-3, .grid-2 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
	.topbar { padding: 16px 16px 12px; gap: 12px; }
	.content { padding: 4px 16px 24px; gap: 16px; }
	.footer { padding: 16px; flex-direction: column; }
	.top-actions .btn span { display: none; }
	.top-actions .btn { width: 40px; padding: 0; }
	.page-heading h1 { font-size: 21px; }
	.grid-4 { grid-template-columns: minmax(0, 1fr); }
	.form-row { grid-template-columns: minmax(0, 1fr); }
	.card-head { margin: 0 16px; }
	.card-body { padding: 16px; }
	.hero { flex-direction: column; align-items: flex-start; padding: 22px; }
	.char-hero { grid-template-columns: minmax(0, 1fr); }
	.char-hero .char-art { border-right: 0; border-bottom: 1px solid var(--line); min-height: 220px; height: 220px; }
	.table th, .table td { padding: 11px 12px; }
	.hide-sm { display: none; }
}

@media (max-width: 640px) {
	.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.stat { padding: 12px; }
	.stat-value { font-size: 17px; }
	.card-head { flex-wrap: wrap; }
	.filters .input, .filters .select { min-width: 0; width: 100%; }
	.filters, .filters .input-icon { width: 100%; }
	.avatar-xl { width: 140px; height: 140px; }
	.profile-banner { height: 210px; }
	.char-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.char-meta strong { white-space: normal; }
	.toasts { left: 16px; right: 16px; max-width: none; }
}
@media (max-width: 640px) { .page-sub { display: none; } }

/* ------------------------------------------------ onboarding steps */

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; counter-reset: s; }
.step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 0 6px; }
.step::before { content: ""; position: absolute; top: 21px; left: -50%; right: 50%; height: 2px; background: var(--line-2); z-index: 0; }
.step:first-child::before { display: none; }
.step-done::before, .step-current::before, .step-error::before { background: var(--gold); }
.step-dot { position: relative; z-index: 1; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--card); border: 2px solid var(--line-2); color: var(--faint); font-size: 15px; }
.step-done .step-dot { background: var(--gold); border-color: var(--gold); color: #17140e; }
.step-current .step-dot { border-color: var(--gold); color: var(--gold-hi); box-shadow: 0 0 0 5px var(--gold-soft); }
.step-error .step-dot { border-color: var(--red); color: var(--red); box-shadow: 0 0 0 5px var(--red-soft); }
.step-text b { display: block; color: var(--text-2); font-size: 13px; font-weight: 600; }
.step-text small { display: block; color: var(--faint); font-size: 11.5px; }
.step-done .step-text b, .step-current .step-text b { color: #fff; }
.step-current .step-text small { color: var(--gold-hi); }

@media (max-width: 900px) {
	.steps { grid-template-columns: minmax(0, 1fr); gap: 14px; }
	.step { flex-direction: row; text-align: left; align-items: center; }
	.step::before { top: -14px; bottom: auto; left: 21px; right: auto; width: 2px; height: 14px; }
}

.mini-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.mini-steps li { flex: 1; text-align: center; padding-top: 8px; border-top: 3px solid var(--line-2); color: var(--faint); font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; }
.mini-steps li.on { border-top-color: var(--gold); color: var(--gold-hi); }
.mini-steps li.done { border-top-color: var(--gold-lo); color: var(--text-2); }

.verify-icon { width: 84px; height: 84px; margin: 4px auto 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 34px; }
.verify-icon.ok { background: var(--gold-soft); border: 1px solid var(--gold-line); color: var(--gold-hi); }
.verify-icon.bad { background: var(--red-soft); border: 1px solid rgba(239, 68, 68, .35); color: var(--red); }

.gate { max-width: 760px; margin: 0 auto; width: 100%; }
.answer { padding: 14px 0; border-bottom: 1px solid var(--line); }
.answer:last-child { border-bottom: 0; }
.answer h4 { font-size: 13.5px; color: var(--gold); margin-bottom: 6px; font-weight: 600; }
.answer p { margin: 0; color: var(--text-2); white-space: pre-line; word-break: break-word; line-height: 1.6; }
