:root {
	--bg: #f5f7fb;
	--panel: #ffffff;
	--muted: #6b7280;
	--text: #111827;
	--accent: #2563eb;
	--accent-2: #0ea5e9;
	--danger: #ef4444;
	--border: #e5e7eb;
	--shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
}

* {
	box-sizing: border-box;
}

html,
body {
	height: 100%;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.container {
	max-width: 1100px;
	margin: 32px auto;
	padding: 0 16px;
}

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 24px;
}

.title {
	margin: 0 0 16px 0;
	font-size: 22px;
	font-weight: 700;
}

label {
	display: block;
	margin: 12px 0 6px;
	font-weight: 600;
	color: var(--muted);
}

input,
select,
button,
textarea {
	outline: none;
	font-size: 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--text);
    /* Smooth, crisp interactions */
    transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease, opacity .15s ease;
}

input,
select,
textarea {
	width: 100%;
	padding: 12px 14px;
	outline: none;
}

/* Remove default outlines but keep clear, accessible focus styles */
*:focus { outline: none; }
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
	border-color: var(--accent);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

/* For inputs specifically: remove any focus border/halo entirely */
input:focus,
input:focus-visible,
select:focus,
select:focus-visible,
textarea:focus,
textarea:focus-visible {
	border-color: inherit;
	box-shadow: none;
}

input::placeholder {
	color: #9aa3b2;
}

.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
    background: var(--accent);
    border: 1px solid transparent;
    color: #ffffff;
	font-weight: 700;
	padding: 12px 16px;
	cursor: pointer;
    border-radius: 10px;
	margin-top: 15px;
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
    transition: background-color .15s ease, box-shadow .15s ease, transform .12s ease;
}

.btn:hover { background: #1e40af; transform: translateY(-1px); }
.btn:active { transform: translateY(0); box-shadow: 0 0 0 rgba(0,0,0,0); }

.btn-danger {
	background: var(--danger);
	color: #fff;
}

.btn-outline {
	background: #ffffff;
	color: var(--accent-2);
	border-color: var(--accent-2);
	box-shadow: none;
}

.btn-outline:hover {
	background: var(--accent-2);
	color: #ffffff;
}

.muted {
	color: var(--muted);
	font-size: 12px;
}

.grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

@media (max-width: 720px) {
	.grid {
		grid-template-columns: 1fr;
	}
}

/* Side-by-side actions that stack on small screens */
.actions-row { display:flex; gap:10px; }

@media (max-width: 720px) {
	.actions-row { flex-direction: column; }
	.actions-row .btn { width: 100%; }
}

table {
	width: 100%;
	border-collapse: collapse;
}

.table-wrap {
	width: 100%;
	overflow-x: auto;
	max-height: 70vh;
	overflow-y: auto;
}

th,
td {
    border-bottom: 1px solid var(--border);
	padding: 10px 12px;
	text-align: left;
	font-size: 14px;
}

th {
	color: var(--muted);
	font-weight: 700;
}

.topbar {
	display: flex;
	gap: 10px;
	align-items: center;
    flex-wrap: wrap;
}

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

.topbar a:hover {
	text-decoration: underline;
}

/* Ensure anchor buttons look like real buttons */
a.btn {
	color: #ffffff;
	text-decoration: none;
}

a.btn:hover {
	text-decoration: none;
}

.actions a {
	color: var(--accent-2);
	margin-right: 10px;
}

.qr-wrap {
	text-align: center;
}

.qr-wrap img {
    border-radius: 12px;
    box-shadow: var(--shadow);
}

/* Subtle animated entrances */
.card { animation: fadeInUp .25s ease-out both; }

@keyframes fadeInUp {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}

/* Utility animations (optional use) */
.fade-in { animation: fadeIn .2s ease-out both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; }
}