table {
	border-collapse: collapse;
	width: 100%;
}
th,
td {
	border: 1px solid #333;
	padding: 8px;
	text-align: left;
}
th {
	background: #1e1e1e;
}
tr:nth-child(even) {
	background: #161616;
}
.btn {
	padding: 4px 10px;
	border: none;
	cursor: pointer;
	font-weight: bold;
}
.block {
	background: #a00;
	color: white;
}
.unblock {
	background: #0a0;
	color: white;
}
.badge-ok {
	color: #0f0;
}
.badge-blocked {
	color: #f00;
}

/* === Reset & Base === */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
}

body {
	min-height: 100vh;
	background: radial-gradient(
		circle at top,
		#0f2027,
		#0b1418 40%,
		#05090c 100%
	);
	color: #e6e6e6;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
}

/* === Card === */
form {
	background: rgba(20, 28, 34, 0.9);
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: 14px;
	padding: 3px;
	width: 100%;
	max-width: 380px;
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03),
		0 20px 60px rgba(0, 0, 0, 0.7), inset 0 0 40px rgba(0, 0, 0, 0.4);
	backdrop-filter: blur(6px);
	animation: fadeIn 0.6s ease;
}

/* === Title === */
h2 {
	text-align: center;
	margin-bottom: 28px;
	font-weight: 600;
	letter-spacing: 0.5px;
	color: #ffffff;
	text-shadow: 0 0 12px rgba(0, 180, 255, 0.15);
}

/* === Error === */
p {
	margin-bottom: 16px;
	padding: 10px 14px;
	border-radius: 8px;
	background: rgba(180, 40, 40, 0.15);
	border: 1px solid rgba(255, 80, 80, 0.3);
	color: #ff9b9b;
	font-size: 14px;
}

/* === Input === */
input[type='text'] {
	width: 100%;
	padding: 14px 16px;
	margin-bottom: 20px;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(10, 15, 20, 0.9);
	color: #ffffff;
	font-size: 15px;
	outline: none;
	transition: all 0.25s ease;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

input[type='text']::placeholder {
	color: #8a97a3;
}

input[type='text']:focus {
	border-color: #2fa4ff;
	box-shadow: 0 0 0 1px rgba(47, 164, 255, 0.4),
		0 0 16px rgba(47, 164, 255, 0.25);
	background: rgba(12, 18, 24, 1);
}

/* === Button === */
button {
	width: 100%;
	padding: 14px;
	border-radius: 10px;
	border: none;
	background: linear-gradient(135deg, #1e88ff, #00b4ff);
	color: #ffffff;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.4px;
	cursor: pointer;
	transition: all 0.25s ease;
	box-shadow: 0 6px 20px rgba(0, 180, 255, 0.35),
		inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

button:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 28px rgba(0, 180, 255, 0.45),
		inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

button:active {
	transform: translateY(0);
	box-shadow: 0 4px 14px rgba(0, 180, 255, 0.25),
		inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* === Animations === */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.top-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
}

/* Logout */
.logout-form {
	margin: 0;
}

.logout-btn {
	padding: 10px 18px;
	border-radius: 10px;
	border: 1px solid rgba(255, 80, 80, 0.45);
	background: linear-gradient(135deg, #7a1f1f, #c53030);
	color: #ffffff;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.25s ease;
	box-shadow: 0 4px 14px rgba(255, 80, 80, 0.35),
		inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.logout-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 8px 22px rgba(255, 80, 80, 0.45),
		inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.logout-btn:active {
	transform: translateY(0);
	box-shadow: 0 3px 10px rgba(255, 80, 80, 0.25),
		inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* === Fingerprint copy === */
.fp-cell {
	display: flex;
	align-items: center;
	gap: 8px;
	max-width: 100%;
	overflow: hidden;
	flex-direction: column;
	padding: 10px;
}

.fp-text {
	flex: 1;
	min-width: 0; /* КЛЮЧЕВОЕ */
	max-width: 100%;
	word-break: break-all;
	overflow-wrap: anywhere;
	white-space: normal;
	font-family: Consolas, monospace;
	font-size: 12px;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
}

.copy-btn {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: #ffffff;
	border-radius: 6px;
	padding: 4px 8px;
	cursor: pointer;
	font-size: 13px;
	transition: all 0.2s ease;
}

.copy-btn:hover {
	background: rgba(0, 180, 255, 0.2);
	border-color: rgba(0, 180, 255, 0.6);
}

/* === Toast === */
.toast {
	position: fixed;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%) translateY(20px);
	background: rgba(20, 28, 34, 0.95);
	color: #ffffff;
	padding: 10px 16px;
	border-radius: 10px;
	font-size: 14px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
	opacity: 0;
	transition: all 0.3s ease;
	z-index: 9999;
}

.toast.show {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

/* =========================
   MOBILE ADAPTATION
   ========================= */

@media (max-width: 900px) {
	body {
		padding: 12px;
		align-items: flex-start;
		justify-content: flex-start;
	}

	h2 {
		font-size: 20px;
		margin-bottom: 16px;
		text-align: center;
	}

	input[type='text'] {
		font-size: 16px;
		padding: 14px 14px;
	}

	button {
		font-size: 16px;
		padding: 14px;
	}

	.top-bar {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}

	.logout-btn {
		width: 100%;
		padding: 12px;
	}
}

/* =========================
   TABLE → CARD VIEW (MOBILE)
   ========================= */

@media (max-width: 768px) {
	table,
	thead,
	tbody,
	th,
	td,
	tr {
		display: block;
		width: 100%;
	}

	thead {
		display: none;
	}

	tr {
		margin-bottom: 16px;
		background: rgba(20, 28, 34, 0.9);
		border: 1px solid rgba(255, 255, 255, 0.06);
		border-radius: 14px;
		padding: 12px 14px;
		box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5),
			inset 0 0 30px rgba(0, 0, 0, 0.4);
	}

	td {
		border: none;
		padding: 6px 0;
		display: flex;
		justify-content: flex-start;
		align-items: flex-start;
		text-align: right;
		font-size: 13px;
		gap: 10px;
		flex-direction: row;
		flex-wrap: wrap;
		align-content: flex-start;
	}

	td::before {
		content: attr(data-label);
		font-weight: 600;
		color: #8faecb;
		text-align: left;
		flex: 1;
	}

	td span,
	td form {
		flex: 1;
		text-align: right;
	}

	.btn {
		width: 100%;
		margin-top: 6px;
		padding: 10px;
		font-size: 14px;
		border-radius: 8px;
	}

	.badge-ok,
	.badge-blocked {
		font-weight: 700;
	}

	.badge-ok {
		color: #2dff2d;
	}

	.badge-blocked {
		color: #ff3b3b;
	}
}

/* =========================
   EXTRA SMALL DEVICES
   ========================= */

@media (max-width: 420px) {
	h2 {
		font-size: 18px;
	}

	td {
		font-size: 12px;
	}

	.btn {
		font-size: 13px;
		padding: 9px;
	}

	.logout-btn {
		font-size: 13px;
		padding: 10px;
	}
}
