:root {
	--bg: #0b0d11;
	--bg-surface: #12151b;
	--bg-card: #181c24;
	--bg-input: #1e2330;
	--fg: #b8bfc9;
	--fg-heading: #e4e8ee;
	--fg-muted: #5e6775;
	--accent: #8b5cf6;
	--accent-hover: #7c3aed;
	--green: #22c55e;
	--yellow: #eab308;
	--red: #ef4444;
	--border: #1e2430;
	--radius: 6px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
	background: var(--bg);
	color: var(--fg);
	font-size: 14px;
	line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* Top nav */
.topnav {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(11, 13, 17, 0.92);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--border);
	padding: 0 24px;
}

.topnav-inner {
	max-width: 1100px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 56px;
}

.topnav-brand {
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0.12em;
	color: var(--accent);
	text-decoration: none;
}

.topnav-links { display: flex; align-items: center; gap: 24px; }

.topnav-links a {
	color: var(--fg-muted);
	font-size: 13px;
	font-weight: 500;
	text-decoration: none;
	transition: color 0.15s;
}

.topnav-links a:hover { color: var(--fg-heading); }

.topnav-links .btn {
	padding: 6px 16px;
	font-size: 12px;
}

/* Page wrapper */
.page { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* Hero */
.hero {
	text-align: center;
	padding: 80px 24px 60px;
	max-width: 700px;
	margin: 0 auto;
}

.hero h1 {
	font-size: 42px;
	font-weight: 800;
	color: var(--fg-heading);
	letter-spacing: -0.02em;
	line-height: 1.15;
	margin-bottom: 16px;
}

.hero .accent { color: var(--accent); }

.hero p {
	font-size: 16px;
	color: var(--fg-muted);
	max-width: 500px;
	margin: 0 auto 32px;
}

.hero-actions { display: flex; gap: 12px; justify-content: center; }

/* Cards */
.card {
	background: var(--bg-surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 20px;
}

/* Product grid */
.product-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 20px;
	margin-bottom: 48px;
}

.product-card {
	background: var(--bg-surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 24px;
	transition: border-color 0.2s;
}

.product-card:hover { border-color: var(--accent); }

.product-card h3 {
	font-size: 16px;
	font-weight: 600;
	color: var(--fg-heading);
	margin-bottom: 8px;
}

.product-card p {
	font-size: 13px;
	color: var(--fg-muted);
	margin-bottom: 16px;
}

.product-card .price {
	font-size: 22px;
	font-weight: 700;
	color: var(--accent);
}

.product-card .price span {
	font-size: 12px;
	font-weight: 400;
	color: var(--fg-muted);
}

/* Feature list */
.features {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 24px;
	padding: 48px 0;
}

.feature {
	padding: 20px;
}

.feature h3 {
	font-size: 14px;
	font-weight: 600;
	color: var(--fg-heading);
	margin-bottom: 6px;
}

.feature p {
	font-size: 13px;
	color: var(--fg-muted);
}

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 20px;
	border-radius: var(--radius);
	font-size: 13px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	border: 1px solid var(--border);
	transition: all 0.15s;
	text-decoration: none;
}

.btn-primary { background: var(--accent); color: white; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); color: white; }
.btn-secondary { background: var(--bg-card); color: var(--fg); }
.btn-secondary:hover { background: var(--bg-input); color: var(--fg-heading); }
.btn-danger { background: transparent; color: var(--red); border-color: var(--red); }
.btn-danger:hover { background: var(--red); color: white; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* Badges */
.badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 3px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.badge-active { background: rgba(34,197,94,0.1); color: var(--green); }
.badge-open { background: rgba(139,92,246,0.1); color: var(--accent); }
.badge-closed { background: rgba(94,103,117,0.15); color: var(--fg-muted); }
.badge-waiting { background: rgba(234,179,8,0.1); color: var(--yellow); }

/* Forms */
.form-group { margin-bottom: 16px; }

.form-group label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--fg-muted);
	margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
	width: 100%;
	padding: 10px 14px;
	background: var(--bg-input);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	color: var(--fg-heading);
	font-size: 13px;
	font-family: inherit;
	outline: none;
	transition: border-color 0.15s;
}

input:focus, select:focus, textarea:focus { border-color: var(--accent); }
textarea { resize: vertical; min-height: 80px; }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 13px; }

th {
	text-align: left;
	font-weight: 600;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--fg-muted);
	padding: 10px 12px;
	border-bottom: 1px solid var(--border);
}

td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--border);
	vertical-align: middle;
}

tr:hover td { background: var(--bg-card); }

/* Auth pages */
.auth-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: calc(100vh - 56px);
}

.auth-box {
	background: var(--bg-surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 32px;
	width: 100%;
	max-width: 400px;
}

.auth-box h1 {
	font-size: 20px;
	font-weight: 700;
	color: var(--fg-heading);
	margin-bottom: 24px;
}

.error-msg {
	background: rgba(239,68,68,0.1);
	border: 1px solid rgba(239,68,68,0.25);
	border-radius: var(--radius);
	padding: 8px 12px;
	color: var(--red);
	font-size: 13px;
	margin-bottom: 16px;
}

.success-msg {
	background: rgba(34,197,94,0.1);
	border: 1px solid rgba(34,197,94,0.25);
	border-radius: var(--radius);
	padding: 8px 12px;
	color: var(--green);
	font-size: 13px;
	margin-bottom: 16px;
}

/* Portal sidebar */
.portal-layout { display: flex; min-height: calc(100vh - 56px); }

.portal-sidebar {
	width: 200px;
	background: var(--bg-surface);
	border-right: 1px solid var(--border);
	padding: 16px 0;
	flex-shrink: 0;
}

.portal-sidebar a {
	display: block;
	padding: 8px 20px;
	color: var(--fg-muted);
	font-size: 13px;
	font-weight: 500;
	text-decoration: none;
	transition: color 0.15s, background 0.15s;
}

.portal-sidebar a:hover { color: var(--fg-heading); background: var(--bg-card); }
.portal-sidebar a.active { color: var(--accent); background: var(--bg-card); border-left: 2px solid var(--accent); }

.portal-content { flex: 1; padding: 24px 32px; min-width: 0; }

.portal-content h1 {
	font-size: 20px;
	font-weight: 600;
	color: var(--fg-heading);
	margin-bottom: 24px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--border);
}

/* Stats */
.stats-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 16px;
	margin-bottom: 24px;
}

.stat-tile {
	background: var(--bg-surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 16px;
}

.stat-tile .stat-label {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--fg-muted);
	margin-bottom: 4px;
}

.stat-tile .stat-value {
	font-size: 24px;
	font-weight: 700;
	color: var(--fg-heading);
	font-variant-numeric: tabular-nums;
}

/* FAQ */
.faq-item {
	border-bottom: 1px solid var(--border);
	padding: 16px 0;
}

.faq-item h3 {
	font-size: 14px;
	font-weight: 600;
	color: var(--fg-heading);
	margin-bottom: 6px;
}

.faq-item p { font-size: 13px; color: var(--fg-muted); }

/* Ticket thread */
.message {
	padding: 16px;
	margin-bottom: 12px;
	border-radius: var(--radius);
	border: 1px solid var(--border);
}

.message-staff { background: rgba(139,92,246,0.04); border-color: rgba(139,92,246,0.15); }
.message-user { background: var(--bg-surface); }

.message-meta {
	font-size: 11px;
	color: var(--fg-muted);
	margin-bottom: 8px;
}

.message-body { font-size: 13px; white-space: pre-wrap; }

/* Announcement */
.announcement {
	background: var(--bg-surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 20px;
	margin-bottom: 12px;
}

.announcement h3 {
	font-size: 14px;
	font-weight: 600;
	color: var(--fg-heading);
	margin-bottom: 4px;
}

.announcement .date {
	font-size: 11px;
	color: var(--fg-muted);
	margin-bottom: 10px;
}

.announcement p { font-size: 13px; }

/* Utility */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-muted { color: var(--fg-muted); }
.text-sm { font-size: 12px; }
.text-center { text-align: center; }
.mono { font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace; font-size: 12px; }

/* Footer */
.footer {
	border-top: 1px solid var(--border);
	padding: 32px 24px;
	text-align: center;
	color: var(--fg-muted);
	font-size: 12px;
	margin-top: 64px;
}

/* Status indicators */
.status-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	margin-right: 6px;
}

.status-dot.online { background: var(--green); }
.status-dot.offline { background: var(--red); }
.status-dot.degraded { background: var(--yellow); }

@media (max-width: 768px) {
	.hero h1 { font-size: 28px; }
	.hero-actions { flex-direction: column; align-items: center; }
	.portal-sidebar { display: none; }
	.portal-content { padding: 16px; }
	.topnav-links { gap: 12px; }
	.topnav-links a.hide-mobile { display: none; }
}
