/*
 * Shared UI components used by public and admin pages.
 */

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 0.82rem 1.32rem;
	min-height: 46px;
	border-radius: 999px;
	border: 1px solid transparent;
	background: linear-gradient(135deg, var(--primary), #159a8f);
	color: #ffffff;
	font-family: var(--font-display);
	font-size: 0.92rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.button:hover {
	transform: translateY(-1px);
	box-shadow: 0 14px 28px rgba(15, 118, 110, 0.28);
	filter: saturate(1.05);
}

.button:active {
	transform: translateY(0);
	box-shadow: 0 8px 16px rgba(15, 118, 110, 0.2);
	filter: saturate(1.08) brightness(0.98);
}

.button:disabled,
.button[disabled] {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
	filter: none;
}

.button-secondary {
	background: #edf2f7;
	border-color: #d5dee7;
	color: #233240;
	box-shadow: none;
}

.button-secondary:hover {
	box-shadow: 0 10px 18px rgba(61, 79, 97, 0.12);
}

.button-secondary:active {
	box-shadow: 0 6px 12px rgba(61, 79, 97, 0.1);
}

.button-accent {
	background: linear-gradient(135deg, var(--accent), #f97316);
	box-shadow: 0 10px 20px rgba(194, 65, 12, 0.25);
}

.button-accent:hover {
	box-shadow: 0 14px 28px rgba(194, 65, 12, 0.3);
}

.button-accent:active {
	box-shadow: 0 8px 18px rgba(194, 65, 12, 0.24);
}

.button-danger {
	background: linear-gradient(135deg, #dc2626, #ef4444);
}

.button.small {
	min-height: 36px;
	padding: 0.42rem 0.86rem;
	font-size: 0.73rem;
	letter-spacing: 0.02em;
}

.alert {
	border-radius: 14px;
	padding: 13px 14px;
	margin-bottom: 16px;
	border: 1px solid;
	line-height: 1.5;
	font-size: 0.95rem;
}

.alert-success {
	background: var(--success-soft);
	color: var(--success);
	border-color: #86efac;
}

.alert-error {
	background: var(--danger-soft);
	color: var(--danger);
	border-color: #fca5a5;
}

.alert-info {
	background: var(--info-soft);
	color: var(--info);
	border-color: #7dd3fc;
}

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

.auth-card {
	width: min(840px, 100%);
	background: linear-gradient(160deg, #ffffff 0%, #fffaf1 100%);
	border: 1px solid rgba(15, 118, 110, 0.18);
	border-radius: 30px;
	padding: 34px;
	box-shadow: var(--shadow-strong);
}

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

.auth-kicker {
	display: inline-flex;
	padding: 6px 11px;
	border-radius: 999px;
	background: var(--accent-soft);
	color: var(--accent-strong);
	font-family: var(--font-display);
	font-size: 0.73rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	margin-bottom: 14px;
}

.auth-card h1 {
	margin: 0 0 8px;
	font-family: var(--font-display);
	font-size: clamp(1.7rem, 4vw, 2.2rem);
	line-height: 1.08;
	letter-spacing: -0.02em;
}

.auth-card p {
	margin: 0 0 20px;
	line-height: 1.65;
	color: var(--text-muted);
}

.auth-card label {
	display: block;
	margin-bottom: 8px;
	font-weight: 700;
	font-size: 0.9rem;
	letter-spacing: 0.01em;
}

.auth-card input,
.auth-card textarea,
.input-control {
	width: 100%;
	padding: 13px 14px;
	margin-bottom: 14px;
	border: 1px solid var(--border);
	border-radius: 13px;
	background: #ffffff;
	color: var(--text);
	font: inherit;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-card input:focus,
.auth-card textarea:focus,
.input-control:focus {
	border-color: rgba(15, 118, 110, 0.6);
	box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
	outline: none;
}

.auth-card textarea {
	min-height: 220px;
	resize: vertical;
}

.form-grid {
	display: grid;
	gap: 16px;
}

.form-column,
.form-field {
	display: flex;
	flex-direction: column;
}

.form-actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	align-items: center;
}

.device-auth-form {
	display: grid;
	gap: 8px;
}

.device-auth-form .button {
	width: 100%;
	margin-top: 4px;
}

.form-actions.right {
	justify-content: flex-end;
}

.results-section {
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px dashed var(--border-strong);
}

.results-grid {
	display: grid;
	gap: 14px;
}

.result-card {
	padding: 16px;
	border: 1px solid var(--border);
	border-radius: 18px;
	background: #ffffff;
	box-shadow: var(--shadow-soft);
}

.result-meta {
	margin-bottom: 10px;
	color: var(--text-muted);
	font-size: 0.9rem;
}

.search-form {
	margin-bottom: 24px;
}

.results-meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 14px;
	gap: 10px;
	flex-wrap: wrap;
}

.result-link {
	margin-bottom: 12px;
}

.result-link a {
	color: var(--primary-strong);
	font-weight: 700;
}

.result-link a:hover {
	text-decoration: underline;
}

.small {
	margin: 14px 0 0;
	color: var(--text-muted);
	font-size: 0.84rem;
	line-height: 1.6;
}

.code-pill {
	display: inline-flex;
	padding: 5px 10px;
	border-radius: 999px;
	background: #e2e8f0;
	color: #0f172a;
	font-family: var(--font-mono);
	font-size: 0.76rem;
}

@media (min-width: 900px) {
	.form-grid.two-columns {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.form-grid.three-columns {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 680px) {
	.auth-page {
		padding: 24px 14px 36px;
	}

	.auth-card {
		padding: 24px 18px;
		border-radius: 20px;
	}

	.form-actions,
	.form-actions.right {
		justify-content: stretch;
	}

	.form-actions .button {
		width: 100%;
	}
}
