/* ═══════════════════════════════════════════════════════════════
   CS Commends — Soft Dark Design System
   v1.0 · Minimalist, responsive, accessible
   ═══════════════════════════════════════════════════════════════ */

:root {
	/* Background layers */
	--bg-0: #09090e;
	--bg-1: #0e0e15;
	--bg-2: #14141c;
	--bg-3: #1a1a24;
	--bg-4: #20202b;

	/* Borders */
	--bd-1: #1e1e29;
	--bd-2: #262632;
	--bd-3: #323240;

	/* Foreground */
	--fg-1: #f5f5f8;
	--fg-2: #c8c8d0;
	--fg-3: #8a8a95;
	--fg-4: #5a5a65;
	--fg-5: #3a3a45;

	/* Brand — softer red-coral */
	--brand: #ef5a47;
	--brand-hover: #e04733;
	--brand-2: #f07757;
	--brand-soft: rgba(239, 90, 71, 0.12);
	--brand-glow: rgba(239, 90, 71, 0.2);

	/* Semantic colors (softer than hex defaults) */
	--success: #4ade80;
	--success-soft: rgba(74, 222, 128, 0.1);
	--warning: #fbbf24;
	--warning-soft: rgba(251, 191, 36, 0.1);
	--danger: #f87171;
	--danger-soft: rgba(248, 113, 113, 0.1);
	--info: #8b93ff;
	--info-soft: rgba(139, 147, 255, 0.12);
	--discord: #5865F2;

	/* Shadows */
	--shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
	--shadow-md: 0 4px 12px rgba(0,0,0,0.35);
	--shadow-lg: 0 12px 36px rgba(0,0,0,0.45);
	--shadow-glow: 0 0 32px var(--brand-glow);

	/* Radii */
	--r-sm: 8px;
	--r-md: 10px;
	--r-lg: 14px;
	--r-xl: 18px;
	--r-full: 999px;

	/* Transitions */
	--t-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
	--t-slow: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset ─────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--bg-1);
	color: var(--fg-2);
	font-family: 'Inter', 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
	font-size: 15px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	min-height: 100vh;
}

::selection { background: var(--brand-soft); color: var(--fg-1); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb { background: var(--bd-2); border-radius: 5px; border: 2px solid var(--bg-1); }
::-webkit-scrollbar-thumb:hover { background: var(--bd-3); }

/* ─── Typography ────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
	color: var(--fg-1);
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.02em;
	margin: 0;
}

h1 { font-size: clamp(1.75rem, 4vw + 0.5rem, 2.85rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.3rem, 2vw + 0.6rem, 1.75rem); }
h3 { font-size: 1.1rem; font-weight: 700; }
h4 { font-size: 0.95rem; font-weight: 700; }

p { margin: 0; }

a { color: var(--brand); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--brand-2); }

small { font-size: 0.82rem; }

code {
	background: var(--bg-3);
	padding: 0.1rem 0.4rem;
	border-radius: 4px;
	font-size: 0.85em;
	color: var(--fg-1);
	font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

/* ─── Layout ────────────────────────────────────────────────── */

.container {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1.25rem;
}

.container-sm { max-width: 540px; }
.container-md { max-width: 760px; }
.container-lg { max-width: 960px; }

.page {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.page-main { flex: 1 0 auto; }

.section { padding: 3.5rem 0; }
.section-sm { padding: 2rem 0; }

@media (max-width: 640px) {
	.section { padding: 2.5rem 0; }
}

/* ─── Top Navigation ────────────────────────────────────────── */

.nav {
	position: sticky;
	top: 0;
	z-index: 40;
	background: rgba(14, 14, 21, 0.75);
	backdrop-filter: saturate(1.6) blur(12px);
	-webkit-backdrop-filter: saturate(1.6) blur(12px);
	border-bottom: 1px solid var(--bd-1);
}

.nav-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.8rem 0;
	gap: 0.75rem;
}

.nav-brand {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	color: var(--fg-1);
	font-weight: 800;
	letter-spacing: -0.01em;
	font-size: 1rem;
	text-decoration: none;
}

.nav-brand:hover { color: var(--fg-1); }
.nav-brand img { width: 28px; height: 28px; border-radius: 7px; flex-shrink: 0; }

.nav-actions {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	flex-wrap: nowrap;
}

/* Mobile nav: collapse into hamburger */
.nav-toggle {
	display: none;
	width: 40px;
	height: 40px;
	border-radius: var(--r-sm);
	background: transparent;
	border: 1px solid var(--bd-2);
	color: var(--fg-2);
	cursor: pointer;
	align-items: center;
	justify-content: center;
}

@media (max-width: 768px) {
	.nav-toggle { display: inline-flex; }
	.nav-actions {
		position: absolute;
		top: 100%;
		right: 0;
		left: 0;
		padding: 0.85rem 1.25rem 1.1rem;
		flex-direction: column;
		align-items: stretch;
		gap: 0.5rem;
		background: var(--bg-2);
		border-bottom: 1px solid var(--bd-1);
		box-shadow: var(--shadow-lg);
		transform: translateY(-10px);
		opacity: 0;
		visibility: hidden;
		transition: all var(--t-slow);
	}
	.nav-actions.open {
		transform: translateY(0);
		opacity: 1;
		visibility: visible;
	}
	.nav-actions > * { width: 100%; justify-content: center; }
	.lang-switch { justify-content: center; }
}

/* ─── Buttons ───────────────────────────────────────────────── */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	padding: 0.6rem 1rem;
	border-radius: var(--r-sm);
	border: 1px solid transparent;
	background: transparent;
	color: var(--fg-2);
	font-family: inherit;
	font-size: 0.88rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: all var(--t-fast);
	white-space: nowrap;
	letter-spacing: -0.005em;
}

.btn:focus-visible {
	outline: none;
	box-shadow: 0 0 0 2px var(--bg-1), 0 0 0 4px var(--brand-soft);
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* Size variants */
.btn-sm { padding: 0.4rem 0.7rem; font-size: 0.8rem; }
.btn-lg { padding: 0.85rem 1.3rem; font-size: 0.95rem; border-radius: var(--r-md); }

/* Width helpers */
.btn-block { width: 100%; }

/* ─── Touch target accessibility (WCAG 2.5.5 / Apple HIG / Material) ───
   On touch / coarse-pointer devices, ensure interactive elements meet the
   44×44 CSS px minimum. We don't enforce it on fine-pointer (mouse/trackpad)
   to keep the dense desktop layout. */
@media (pointer: coarse) {
	.btn,
	.btn-sm {
		min-height: 44px;
	}
	a.nav-brand,
	.tag-input,
	input[type="text"],
	input[type="email"],
	input[type="password"],
	input[type="number"],
	input[type="search"],
	select {
		min-height: 44px;
	}
}

/* Style variants */
.btn-primary {
	background: linear-gradient(135deg, var(--brand), var(--brand-hover));
	color: #fff;
	box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
	background: linear-gradient(135deg, var(--brand-hover), #c9391f);
	color: #fff;
	box-shadow: var(--shadow-md), var(--shadow-glow);
	transform: translateY(-1px);
}

.btn-secondary {
	background: var(--bg-3);
	color: var(--fg-1);
	border: 1px solid var(--bd-2);
}
.btn-secondary:hover {
	background: var(--bg-4);
	border-color: var(--bd-3);
	color: var(--fg-1);
}

.btn-ghost {
	background: transparent;
	color: var(--fg-2);
	border: 1px solid var(--bd-2);
}
.btn-ghost:hover {
	background: var(--bg-3);
	border-color: var(--bd-3);
	color: var(--fg-1);
}

.btn-accent-green {
	background: var(--success-soft);
	color: var(--success);
	border: 1px solid rgba(74, 222, 128, 0.2);
}
.btn-accent-green:hover {
	background: rgba(74, 222, 128, 0.16);
	color: var(--success);
	border-color: rgba(74, 222, 128, 0.35);
}

.btn-accent-orange {
	background: rgba(251, 146, 60, 0.1);
	color: #fb923c;
	border: 1px solid rgba(251, 146, 60, 0.2);
}
.btn-accent-orange:hover {
	background: rgba(251, 146, 60, 0.16);
	color: #fb923c;
	border-color: rgba(251, 146, 60, 0.35);
}

.btn-accent-purple {
	background: var(--info-soft);
	color: var(--info);
	border: 1px solid rgba(139, 147, 255, 0.2);
}
.btn-accent-purple:hover {
	background: rgba(139, 147, 255, 0.18);
	color: var(--info);
	border-color: rgba(139, 147, 255, 0.35);
}

.btn-danger {
	background: var(--danger-soft);
	color: var(--danger);
	border: 1px solid rgba(248, 113, 113, 0.2);
}
.btn-danger:hover {
	background: rgba(248, 113, 113, 0.16);
	border-color: rgba(248, 113, 113, 0.35);
	color: var(--danger);
}

/* Icon-only button */
.btn-icon {
	width: 40px;
	height: 40px;
	padding: 0;
	border-radius: var(--r-sm);
}

/* ─── Language switch ───────────────────────────────────────── */

.lang-switch {
	display: inline-flex;
	gap: 0;
	background: var(--bg-3);
	border: 1px solid var(--bd-2);
	border-radius: var(--r-sm);
	padding: 2px;
}
.lang-switch button {
	padding: 0.35rem 0.6rem;
	background: transparent;
	border: none;
	color: var(--fg-3);
	font-family: inherit;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	border-radius: 6px;
	cursor: pointer;
	transition: all var(--t-fast);
}
.lang-switch button:hover { color: var(--fg-1); }
.lang-switch button.active {
	background: var(--bd-2);
	color: var(--fg-1);
}

/* ─── Cards ─────────────────────────────────────────────────── */

.card {
	background: var(--bg-2);
	border: 1px solid var(--bd-1);
	border-radius: var(--r-lg);
	padding: 1.6rem;
	box-shadow: var(--shadow-sm);
}

.card-lg { padding: 2rem; border-radius: var(--r-xl); }
.card-sm { padding: 1.2rem; border-radius: var(--r-md); }

.card-interactive {
	transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
	cursor: pointer;
}
.card-interactive:hover {
	transform: translateY(-2px);
	border-color: var(--bd-3);
	box-shadow: var(--shadow-md);
}

.card-title { margin: 0 0 0.85rem; }
.card-subtitle { color: var(--fg-3); font-size: 0.88rem; margin: 0 0 1.2rem; }

/* Service card (tinted) */
.service-card {
	position: relative;
	display: block;
	padding: 1.5rem;
	background: var(--bg-2);
	border: 1px solid var(--bd-1);
	border-radius: var(--r-lg);
	text-decoration: none;
	color: inherit;
	transition: transform var(--t-slow), border-color var(--t-slow), box-shadow var(--t-slow);
	overflow: hidden;
}
.service-card::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, var(--tint, var(--brand-soft)) 0%, transparent 60%);
	pointer-events: none;
	opacity: 0.6;
	transition: opacity var(--t-slow);
}
.service-card:hover {
	transform: translateY(-4px);
	border-color: var(--tint-border, var(--bd-3));
	box-shadow: var(--shadow-md);
}
.service-card:hover::before { opacity: 1; }
.service-card > * { position: relative; }

.service-icon {
	width: 42px;
	height: 42px;
	border-radius: var(--r-md);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--tint, var(--brand-soft));
	color: var(--tint-fg, var(--brand));
	margin-bottom: 0.9rem;
}

/* ─── Inputs ────────────────────────────────────────────────── */

.label {
	display: block;
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--fg-2);
	margin-bottom: 0.45rem;
	letter-spacing: 0.005em;
}

.input, .select, .textarea {
	width: 100%;
	padding: 0.72rem 0.9rem;
	background: var(--bg-3);
	border: 1px solid var(--bd-2);
	border-radius: var(--r-sm);
	color: var(--fg-1);
	font-family: inherit;
	font-size: 0.92rem;
	line-height: 1.4;
	outline: none;
	transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.input::placeholder { color: var(--fg-4); }
.input:focus, .select:focus, .textarea:focus {
	border-color: var(--brand);
	box-shadow: 0 0 0 3px var(--brand-soft);
}
.input:disabled { background: var(--bg-2); color: var(--fg-3); cursor: not-allowed; }

.input-group { display: flex; gap: 0.5rem; }
.input-group > .input { flex: 1; }

.hint {
	font-size: 0.74rem;
	color: var(--fg-4);
	margin-top: 0.35rem;
	line-height: 1.5;
}

.input-error {
	font-size: 0.78rem;
	color: var(--danger);
	margin-top: 0.4rem;
	display: none;
}
.input-error.show { display: block; }

input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="checkbox"] { accent-color: var(--brand); }

/* ─── Pills / Badges ────────────────────────────────────────── */

.pill {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	padding: 0.25rem 0.6rem;
	border-radius: var(--r-full);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.pill-brand { background: var(--brand-soft); color: var(--brand); }
.pill-success { background: var(--success-soft); color: var(--success); }
.pill-warning { background: var(--warning-soft); color: var(--warning); }
.pill-danger { background: var(--danger-soft); color: var(--danger); }
.pill-info { background: var(--info-soft); color: var(--info); }
.pill-neutral { background: var(--bg-3); color: var(--fg-3); border: 1px solid var(--bd-2); }

.status-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	flex-shrink: 0;
}

/* ─── Progress bar ──────────────────────────────────────────── */

.progress {
	width: 100%;
	height: 6px;
	background: var(--bg-3);
	border-radius: var(--r-full);
	overflow: hidden;
}
.progress-fill {
	height: 100%;
	background: linear-gradient(90deg, var(--brand), var(--brand-2));
	border-radius: var(--r-full);
	transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
	width: 0%;
}
.progress-fill.success { background: linear-gradient(90deg, #22c55e, var(--success)); }
.progress-fill.info { background: linear-gradient(90deg, #6d74e6, var(--info)); }

/* ─── Package grid (commend / hours / group packages) ───────── */

.pkg-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 0.65rem;
}

.pkg-card {
	position: relative;
	padding: 1.1rem 0.75rem;
	background: var(--bg-3);
	border: 1px solid var(--bd-2);
	border-radius: var(--r-md);
	cursor: pointer;
	transition: all var(--t-fast);
	text-align: center;
}
.pkg-card:hover {
	border-color: var(--brand);
	transform: translateY(-2px);
}
.pkg-card.active {
	border-color: var(--brand);
	background: var(--brand-soft);
	box-shadow: 0 0 0 1px var(--brand);
}
.pkg-card.featured {
	border-color: rgba(239, 90, 71, 0.35);
	background: linear-gradient(135deg, rgba(239, 90, 71, 0.06), rgba(239, 90, 71, 0.01));
}
.pkg-amount {
	font-size: 1.8rem;
	font-weight: 900;
	color: var(--fg-1);
	line-height: 1;
	letter-spacing: -0.02em;
}
.pkg-unit {
	font-size: 0.65rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--fg-3);
	margin-top: 0.35rem;
}
.pkg-badge {
	position: absolute;
	top: -8px;
	right: 8px;
	padding: 0.18rem 0.5rem;
	border-radius: var(--r-full);
	background: var(--brand);
	color: #fff;
	font-size: 0.58rem;
	font-weight: 800;
	letter-spacing: 0.05em;
}

/* ─── Grid helpers ──────────────────────────────────────────── */

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

@media (max-width: 880px) {
	.grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ─── Stack / Cluster (utilities) ───────────────────────────── */

.stack > * + * { margin-top: var(--gap, 1rem); }
.stack-sm { --gap: 0.5rem; }
.stack-lg { --gap: 1.6rem; }

.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, 0.6rem); }
.cluster-between { justify-content: space-between; }
.cluster-center { justify-content: center; }

/* ─── Hero section ──────────────────────────────────────────── */

.hero {
	text-align: center;
	padding: 3rem 0 2rem;
	position: relative;
}

.hero-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.35rem 0.85rem;
	background: var(--brand-soft);
	color: var(--brand-2);
	border: 1px solid rgba(239, 90, 71, 0.18);
	border-radius: var(--r-full);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	margin-bottom: 1.2rem;
}

.hero-title {
	font-size: clamp(1.9rem, 4.5vw + 0.5rem, 3.3rem);
	line-height: 1.1;
	letter-spacing: -0.035em;
	margin-bottom: 0.75rem;
	font-weight: 900;
}

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

.hero-desc {
	font-size: clamp(0.95rem, 1vw + 0.6rem, 1.1rem);
	color: var(--fg-3);
	max-width: 640px;
	margin: 0 auto 1.6rem;
	line-height: 1.6;
}

.hero-actions { display: inline-flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; }

/* ─── Feature list ──────────────────────────────────────────── */

.feature-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 1rem;
}

.feature {
	padding: 1.4rem;
	background: var(--bg-2);
	border: 1px solid var(--bd-1);
	border-radius: var(--r-lg);
}
.feature-icon {
	width: 40px;
	height: 40px;
	border-radius: var(--r-md);
	background: var(--brand-soft);
	color: var(--brand);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 0.85rem;
}
.feature h3 { font-size: 0.95rem; margin: 0 0 0.4rem; color: var(--fg-1); }
.feature p { font-size: 0.84rem; color: var(--fg-3); line-height: 1.55; margin: 0; }

/* ─── Alerts / warn boxes ──────────────────────────────────── */

.alert {
	display: flex;
	align-items: start;
	gap: 0.65rem;
	padding: 0.85rem 0.95rem;
	background: var(--bg-3);
	border: 1px solid var(--bd-2);
	border-radius: var(--r-md);
	font-size: 0.85rem;
	line-height: 1.5;
}
.alert-warning {
	background: var(--warning-soft);
	border-color: rgba(251, 191, 36, 0.2);
	color: var(--fg-2);
}
.alert-warning .alert-icon { color: var(--warning); }
.alert-info {
	background: var(--info-soft);
	border-color: rgba(139, 147, 255, 0.2);
}
.alert-info .alert-icon { color: var(--info); }
.alert-success {
	background: var(--success-soft);
	border-color: rgba(74, 222, 128, 0.2);
}
.alert-success .alert-icon { color: var(--success); }

.alert-icon { flex-shrink: 0; margin-top: 1px; }
.alert-title { font-weight: 700; color: var(--fg-1); margin: 0 0 0.15rem; font-size: 0.88rem; }

/* ─── Status indicator (nav pulse dot) ─────────────────────── */

.status-indicator {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.3rem 0.65rem;
	background: var(--bg-3);
	border: 1px solid var(--bd-2);
	border-radius: var(--r-full);
	font-size: 0.72rem;
	color: var(--fg-3);
	font-weight: 600;
}
.status-indicator .dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--fg-4);
}
.status-indicator.online .dot {
	background: var(--success);
	box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.45);
	animation: pulse-dot 2s infinite;
}
.status-indicator.offline .dot { background: var(--danger); }
.status-indicator.maintenance .dot { background: var(--warning); }

@keyframes pulse-dot {
	0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.45); }
	70% { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
	100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

/* ─── Spinner ──────────────────────────────────────────────── */

.spinner {
	width: 16px;
	height: 16px;
	border: 2px solid var(--bd-2);
	border-top-color: var(--brand);
	border-radius: 50%;
	animation: spin 0.7s linear infinite;
	display: inline-block;
	vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Toast ────────────────────────────────────────────────── */

.toast {
	position: fixed;
	top: 20px;
	right: 20px;
	padding: 0.85rem 1.1rem;
	background: var(--bg-2);
	border: 1px solid var(--bd-2);
	border-radius: var(--r-md);
	color: var(--fg-1);
	font-size: 0.88rem;
	z-index: 9999;
	box-shadow: var(--shadow-lg);
	transform: translateX(120%);
	transition: transform var(--t-slow);
	max-width: 360px;
}
.toast.show { transform: translateX(0); }
.toast.success { border-color: rgba(74, 222, 128, 0.3); }
.toast.success::before { content: ''; width: 8px; height: 8px; background: var(--success); border-radius: 50%; display: inline-block; margin-right: 0.6rem; vertical-align: middle; }
.toast.error { border-color: rgba(248, 113, 113, 0.3); }
.toast.error::before { content: ''; width: 8px; height: 8px; background: var(--danger); border-radius: 50%; display: inline-block; margin-right: 0.6rem; vertical-align: middle; }

@media (max-width: 640px) {
	.toast { top: 10px; right: 10px; left: 10px; max-width: none; }
}

/* ─── Modal ────────────────────────────────────────────────── */

.modal {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}
.modal.open { display: flex; }

.modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(5, 5, 10, 0.7);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	animation: fade-in 0.2s ease;
}
.modal-card {
	position: relative;
	background: var(--bg-2);
	border: 1px solid var(--bd-2);
	border-radius: var(--r-xl);
	padding: 1.75rem;
	max-width: 460px;
	width: 100%;
	box-shadow: var(--shadow-lg);
	animation: slide-up 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 0.4rem;
	gap: 0.75rem;
}
.modal-head h3 { margin: 0; color: var(--fg-1); font-size: 1.15rem; }
.modal-close {
	width: 32px;
	height: 32px;
	border-radius: var(--r-sm);
	background: transparent;
	border: none;
	color: var(--fg-3);
	font-size: 1.2rem;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: all var(--t-fast);
}
.modal-close:hover { background: var(--bg-3); color: var(--fg-1); }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-up { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ─── Footer ───────────────────────────────────────────────── */

.footer {
	padding: 2.5rem 0;
	border-top: 1px solid var(--bd-1);
	color: var(--fg-4);
	font-size: 0.82rem;
	text-align: center;
	margin-top: 3rem;
}
.footer a { color: var(--fg-3); }
.footer a:hover { color: var(--fg-2); }

/* ─── Utility classes ──────────────────────────────────────── */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--fg-3); }
.text-dim { color: var(--fg-4); }
.text-brand { color: var(--brand); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }

.fs-sm { font-size: 0.82rem; }
.fs-md { font-size: 0.92rem; }
.fs-lg { font-size: 1.05rem; }

.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden { display: none !important; }

.mobile-only { display: none; }
@media (max-width: 640px) { .mobile-only { display: block; } .desktop-only { display: none !important; } }

/* ─── Session / Order list items ───────────────────────────── */

.list { display: flex; flex-direction: column; gap: 0.7rem; }

.list-item {
	background: var(--bg-3);
	border: 1px solid var(--bd-2);
	border-radius: var(--r-md);
	padding: 1rem;
}

.list-item-head {
	display: flex;
	justify-content: space-between;
	align-items: start;
	gap: 0.7rem;
	flex-wrap: wrap;
	margin-bottom: 0.7rem;
}

.list-item-title { font-size: 0.9rem; font-weight: 700; color: var(--fg-1); margin: 0; }
.list-item-sub { font-size: 0.72rem; color: var(--fg-3); margin-top: 0.2rem; }

.list-item-ident { display: flex; gap: 0.6rem; align-items: center; min-width: 0; flex: 1; }
.list-item-ident img { width: 38px; height: 38px; border-radius: var(--r-sm); flex-shrink: 0; object-fit: cover; }

.empty-state {
	text-align: center;
	padding: 2rem 1rem;
	color: var(--fg-4);
	font-size: 0.88rem;
}
.empty-state svg { opacity: 0.3; margin: 0 auto 0.7rem; display: block; }

/* ─── Balance bar ─────────────────────────────────────────── */

.balance-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1rem 1.25rem;
	background: var(--bg-2);
	border: 1px solid var(--bd-1);
	border-radius: var(--r-lg);
	gap: 0.8rem;
	flex-wrap: wrap;
}
.balance-value { display: inline-flex; align-items: baseline; gap: 0.35rem; }
.balance-num { font-size: 1.8rem; font-weight: 900; color: var(--fg-1); letter-spacing: -0.02em; }
.balance-lbl { font-size: 0.8rem; color: var(--fg-3); }

/* ─── FAQ / Accordion ─────────────────────────────────────── */

.faq-item {
	background: var(--bg-2);
	border: 1px solid var(--bd-1);
	border-radius: var(--r-md);
	padding: 1rem 1.2rem;
	transition: border-color var(--t-fast);
}
.faq-item[open] { border-color: var(--bd-3); }
.faq-item summary {
	list-style: none;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	color: var(--fg-1);
	font-weight: 700;
	font-size: 0.95rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
	content: '+';
	color: var(--brand);
	font-size: 1.3rem;
	font-weight: 400;
	transition: transform var(--t-fast);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
	margin: 0.8rem 0 0;
	font-size: 0.88rem;
	color: var(--fg-3);
	line-height: 1.65;
}

/* ─── Accessible visually-hidden ───────────────────────────── */

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
