:root {
	--background: #f3f6fb;
	--surface: #ffffff;
	--surface-muted: #f8fafc;
	--border: #dbe3ee;
	--text: #182334;
	--muted: #64748b;
	--primary: #2563eb;
	--primary-dark: #1d4ed8;
	--danger-background: #fef2f2;
	--danger-text: #b91c1c;
	--success-background: #f0fdf4;
	--success-text: #15803d;
	--shadow: 0 18px 45px rgba(31, 41, 55, 0.08);
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	color: var(--text);
	background: var(--background);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	line-height: 1.5;
}

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

a:hover {
	text-decoration: underline;
}

.container {
	width: min(1120px, calc(100% - 40px));
	margin: 0 auto;
}

.auth-page {
	display: grid;
	min-height: 100vh;
	place-items: center;
	padding: 24px;
}

.auth-card,
.form-card {
	width: min(100%, 440px);
	padding: 40px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 16px;
	box-shadow: var(--shadow);
}

.auth-card {
	text-align: center;
}

.brand-mark {
	display: grid;
	width: 52px;
	height: 52px;
	margin: 0 auto 20px;
	place-items: center;
	color: #ffffff;
	background: var(--primary);
	border-radius: 14px;
	font-size: 1.5rem;
	font-weight: 700;
}

h1 {
	margin: 0 0 8px;
	font-size: 1.75rem;
	line-height: 1.2;
}

.muted {
	margin: 0 0 28px;
	color: var(--muted);
}

form {
	text-align: left;
}

.form-field {
	margin-bottom: 18px;
}

label {
	display: block;
	margin-bottom: 7px;
	font-size: 0.9rem;
	font-weight: 600;
}

input {
	width: 100%;
	padding: 11px 13px;
	color: var(--text);
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 8px;
	font: inherit;
}

input:focus {
	outline: 3px solid rgba(37, 99, 235, 0.18);
	border-color: var(--primary);
}

.button {
	width: 100%;
	padding: 12px 16px;
	border: 0;
	border-radius: 8px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.button-primary {
	color: #ffffff;
	background: var(--primary);
}

.button-primary:hover {
	background: var(--primary-dark);
}

.alert {
	margin: 0 0 20px;
	padding: 11px 13px;
	border-radius: 8px;
	font-size: 0.9rem;
	text-align: left;
}

.alert-error {
	color: var(--danger-text);
	background: var(--danger-background);
}

.alert-success {
	color: var(--success-text);
	background: var(--success-background);
}

.topbar {
	background: var(--surface);
	border-bottom: 1px solid var(--border);
}

.topbar-inner {
	display: flex;
	min-height: 68px;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.brand {
	color: var(--text);
	font-size: 1.2rem;
	font-weight: 700;
}

.brand:hover {
	text-decoration: none;
}

.topbar-nav {
	display: flex;
	align-items: center;
	gap: 20px;
	font-size: 0.9rem;
}

.topbar-nav a.active {
	font-weight: 600;
}

.user-label {
	color: var(--muted);
}

.user-label strong {
	color: var(--text);
}

.dashboard-content {
	display: grid;
	min-height: calc(100vh - 68px);
	place-items: center;
	padding: 56px 0;
}

.dashboard-panel {
	width: 100%;
	padding: 32px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 16px;
	box-shadow: var(--shadow);
}

.panel-header {
	margin-bottom: 24px;
}

.panel-header h1 {
	margin-bottom: 6px;
}

.panel-description {
	margin: 0;
	color: var(--muted);
}

.table-wrapper {
	overflow-x: auto;
	border: 1px solid var(--border);
	border-radius: 10px;
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.92rem;
	text-align: left;
}

th,
td {
	padding: 14px 16px;
	border-bottom: 1px solid var(--border);
	white-space: nowrap;
}

th {
	color: var(--muted);
	background: var(--surface-muted);
	font-size: 0.78rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

tbody tr:last-child td {
	border-bottom: 0;
}

tbody tr:hover {
	background: #f8fafc;
}

code {
	padding: 3px 6px;
	color: #334155;
	background: #f1f5f9;
	border-radius: 5px;
	font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
	font-size: 0.85em;
}

.empty-state {
	width: min(100%, 620px);
	padding: 56px 24px;
	color: var(--muted);
	background: var(--surface-muted);
	border: 1px dashed var(--border);
	border-radius: 16px;
	text-align: center;
}

.empty-state h1 {
	color: var(--text);
}

.empty-state p {
	margin: 0;
}

.empty-state-icon {
	display: grid;
	width: 48px;
	height: 48px;
	margin: 0 auto 20px;
	place-items: center;
	color: var(--primary);
	background: #dbeafe;
	border-radius: 50%;
	font-size: 1.6rem;
	font-weight: 300;
}

.page-content {
	display: flex;
	justify-content: center;
	padding: 56px 0;
}

.form-card {
	width: min(100%, 520px);
}

.form-card .muted {
	margin-bottom: 28px;
}

.back-link {
	display: inline-block;
	margin-bottom: 28px;
	font-size: 0.9rem;
}

@media (max-width: 680px) {
	.container {
		width: min(100% - 28px, 1120px);
	}

	.auth-card,
	.form-card,
	.dashboard-panel {
		padding: 28px 22px;
	}

	.topbar-inner {
		align-items: flex-start;
		flex-direction: column;
		gap: 10px;
		padding: 16px 0;
	}

	.topbar-nav {
		flex-wrap: wrap;
		gap: 10px 16px;
	}
}
