/* =============================================================================
   Shadcn-ähnliches Design-System
   Copyright 2025 oliPro GmbH, Oliver Becker
   ============================================================================= */

/* === Design Tokens === */
:root {
	--primary: #00B8E6;
	--primary-hover: #008AAC;
	--primary-disabled: #80DCF3;
	--primary-foreground: #ffffff;
	
	--secondary: #6c757d;
	--secondary-hover: #5a6268;
	--secondary-foreground: #ffffff;
	
	--background: #ffffff;
	--foreground: #0f172a;
	
	--muted: #f1f5f9;
	--muted-foreground: #64748b;
	
	--accent: #f1f5f9;
	--accent-foreground: #0f172a;
	
	--border: #e2e8f0;
	--input: #e2e8f0;
	--ring: #00B8E6;
	
	--radius: 0.5rem;
	
	--destructive: #ef4444;
	--destructive-hover: #dc2626;
	--destructive-foreground: #ffffff;
	
	--success: #10b981;
	--success-foreground: #ffffff;
	
	--warning: #f59e0b;
	--warning-foreground: #ffffff;
	
	--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
	--shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
	--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
	--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* === Reset & Base === */
* {
	box-sizing: border-box;
}

body {
	margin: 0;
	padding: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	color: var(--foreground);
	background-color: var(--background);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* === Split-Screen Layout === */
.split-screen {
	display: grid;
	grid-template-columns: 1fr auto;
	min-height: 100vh;
}

.split-screen-image {
	display: flex;
	align-items: center;
	justify-content: center;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	padding: 2rem;
	position: relative;
	overflow: hidden;
}

.split-screen-form {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem 3rem;
	background-color: var(--background);
	min-width: 550px;
	width: 550px;
}

.split-screen-form-content {
	width: 100%;
	max-width: 400px;
}

/* Mobile: Bild ausblenden, Stacked Layout */
@media (max-width: 768px) {
	.split-screen {
		grid-template-columns: 1fr;
	}
	
	.split-screen-image {
		display: none;
	}
	
	.split-screen-form {
		padding: 1.5rem;
		min-height: 100vh;
		min-width: auto;
		width: 100%;
	}
}

/* === Buttons === */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	white-space: nowrap;
	border-radius: var(--radius);
	font-size: 16px;
	font-weight: 500;
	transition: all 0.2s;
	cursor: pointer;
	border: 1px solid transparent;
	padding: 0.5rem 1rem;
	line-height: 1.5;
	text-decoration: none;
}

.btn:focus-visible {
	outline: 2px solid var(--ring);
	outline-offset: 2px;
}

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

.btn-primary {
	background-color: var(--primary);
	color: var(--primary-foreground);
}

.btn-primary:hover:not(:disabled) {
	background-color: var(--primary-hover);
}

.btn-secondary {
	background-color: var(--secondary);
	color: var(--secondary-foreground);
}

.btn-secondary:hover:not(:disabled) {
	background-color: var(--secondary-hover);
}

.btn-outline {
	background-color: transparent;
	color: var(--foreground);
	border-color: var(--border);
}

.btn-outline:hover:not(:disabled) {
	background-color: var(--accent);
	color: var(--accent-foreground);
}

.btn-ghost {
	background-color: transparent;
	color: var(--foreground);
}

.btn-ghost:hover:not(:disabled) {
	background-color: var(--accent);
}

.btn-lg {
	padding: 0.75rem 1.5rem;
	font-size: 18px;
}

.btn-sm {
	padding: 0.375rem 0.75rem;
	font-size: 11px;
}

.btn-block {
	width: 100%;
	display: flex;
}

/* === Inputs === */
.input-group {
	margin-bottom: 1rem;
}

.input-label {
	display: block;
	font-size: 16px;
	font-weight: 500;
	margin-bottom: 0.5rem;
	color: var(--foreground);
}

.input {
	display: block;
	width: 100%;
	padding: 0.5rem 0.75rem;
	font-size: 16px;
	line-height: 1.5;
	color: var(--foreground);
	background-color: var(--background);
	border: 1px solid var(--input);
	border-radius: var(--radius);
	transition: all 0.2s;
}

.input:focus {
	outline: none;
	border-color: var(--ring);
	box-shadow: 0 0 0 3px rgba(0, 184, 230, 0.1);
}

.input:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	background-color: var(--muted);
}

.input::placeholder {
	color: var(--muted-foreground);
}

/* Autofill-Dropdown verhindern */
.input:-webkit-autofill,
.input:-webkit-autofill:hover,
.input:-webkit-autofill:focus,
.input:-webkit-autofill:active {
	-webkit-box-shadow: 0 0 0 30px var(--background) inset !important;
	-webkit-text-fill-color: var(--foreground) !important;
	transition: background-color 5000s ease-in-out 0s;
}

/* Autofill-Dropdown für Passwort-Felder komplett deaktivieren */
input[type="password"]:-webkit-autofill,
input[type="password"]:-webkit-autofill:hover,
input[type="password"]:-webkit-autofill:focus,
input[type="password"]:-webkit-autofill:active {
	-webkit-box-shadow: 0 0 0 30px var(--background) inset !important;
	-webkit-text-fill-color: var(--foreground) !important;
	transition: background-color 5000s ease-in-out 0s;
}

.input-error {
	border-color: var(--destructive);
}

.input-error:focus {
	border-color: var(--destructive);
	box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Floating Label Input */
.input-floating {
	position: relative;
}

.input-floating .input {
	padding-top: 1.5rem;
	padding-bottom: 0.5rem;
}

.input-floating .input-label {
	position: absolute;
	top: 0.5rem;
	left: 0.75rem;
	font-size: 14px;
	color: var(--muted-foreground);
	pointer-events: none;
	transition: all 0.2s;
}

.input-floating .input:focus ~ .input-label,
.input-floating .input:not(:placeholder-shown) ~ .input-label {
	top: 0.25rem;
	font-size: 12px;
	color: var(--foreground);
}

/* Input with Icon */
.input-with-icon {
	position: relative;
}

.input-with-icon .input {
	padding-right: 2.5rem;
}

.input-with-icon-icon {
	position: absolute;
	right: 0.75rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--muted-foreground);
	cursor: pointer;
	pointer-events: all;
}

/* === Cards === */
.card {
	background-color: var(--background);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-sm);
	overflow: hidden;
}

.card-header {
	padding: 1.5rem;
	border-bottom: 1px solid var(--border);
}

.card-title {
	font-size: 20px;
	font-weight: 600;
	margin: 0;
	color: var(--foreground);
}

.card-body {
	padding: 1.5rem;
}

.card-footer {
	padding: 1.5rem;
	border-top: 1px solid var(--border);
	background-color: var(--muted);
}

/* === Alerts === */
.alert {
	padding: 1rem;
	border-radius: var(--radius);
	border: 1px solid transparent;
	margin-bottom: 1rem;
}

.alert-success {
	background-color: rgba(16, 185, 129, 0.1);
	border-color: var(--success);
	color: #065f46;
}

.alert-error,
.alert-danger {
	background-color: rgba(239, 68, 68, 0.1);
	border-color: var(--destructive);
	color: #991b1b;
}

.alert-warning {
	background-color: rgba(245, 158, 11, 0.1);
	border-color: var(--warning);
	color: #92400e;
}

.alert-info {
	background-color: rgba(0, 184, 230, 0.1);
	border-color: var(--primary);
	color: #0c4a6e;
}

/* === OTP Input === */
.otp-container {
	display: flex;
	gap: 0.5rem;
	justify-content: center;
	margin: 1.5rem 0;
}

.otp-slot {
	width: 3rem;
	height: 3rem;
	text-align: center;
	font-size: 1.25rem;
	font-weight: 600;
	border: 2px solid var(--input);
	border-radius: var(--radius);
	background-color: var(--background);
	color: var(--foreground);
	transition: all 0.2s;
}

.otp-slot:focus {
	outline: none;
	border-color: var(--ring);
	box-shadow: 0 0 0 3px rgba(0, 184, 230, 0.1);
}

.otp-slot.filled {
	border-color: var(--primary);
	background-color: rgba(0, 184, 230, 0.05);
}

.otp-slot.active {
	border-color: var(--ring);
	box-shadow: 0 0 0 3px rgba(0, 184, 230, 0.1);
}

.otp-slot:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	background-color: var(--muted);
}

/* === Form Layout === */
.form-container {
	max-width: 400px;
	margin: 0 auto;
	padding: 2rem;
}

.form-header {
	text-align: center;
	margin-bottom: 2rem;
}

.form-header img {
	margin-bottom: 1rem;
}

.form-header h1 {
	font-size: 28px;
	font-weight: 600;
	margin: 0 0 0.5rem 0;
	color: var(--foreground);
}

.form-header p {
	font-size: 16px;
	color: var(--muted-foreground);
	margin: 0;
}

.form-footer {
	text-align: center;
	margin-top: 1.5rem;
	font-size: 16px;
}

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

.form-footer a:hover {
	text-decoration: underline;
}

/* === Page Footer (unten rechts) === */
.page-footer {
	position: fixed;
	bottom: 1rem;
	right: 1rem;
	display: flex;
	gap: 1rem;
	font-size: 14px;
	z-index: 100;
}

.page-footer a {
	color: var(--muted-foreground);
	text-decoration: none;
	transition: color 0.2s;
}

.page-footer a:hover {
	color: var(--foreground);
	text-decoration: underline;
}

@media (max-width: 768px) {
	.page-footer {
		position: static;
		justify-content: center;
		margin-top: 2rem;
		padding: 1rem;
		flex-wrap: wrap;
	}
}

/* === Status Messages === */
.status-message {
	padding: 0.75rem 1rem;
	border-radius: var(--radius);
	margin-top: 1rem;
	margin-bottom: 0;
	font-size: 14px;
	display: none;
	min-height: 0;
	transition: all 0.3s ease-in-out;
	text-align: center;
}

.status-message.show {
	display: block;
	animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.status-message.success {
	background-color: rgba(16, 185, 129, 0.1);
	border: 1px solid var(--success);
	color: #065f46;
}

.status-message.error {
	background-color: rgba(239, 68, 68, 0.1);
	border: 1px solid var(--destructive);
	color: #991b1b;
}

.status-message h4 {
	margin: 0 0 0.5rem 0;
	font-size: 16px;
	font-weight: 600;
}

.status-message p {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
}

/* === Utilities === */
.text-center {
	text-align: center;
}

.text-muted {
	color: var(--muted-foreground);
}

.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; }

.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; }

/* === Link Styles === */
.link {
	color: var(--primary);
	text-decoration: none;
	font-size: 16px;
	transition: color 0.2s;
}

.link:hover {
	color: var(--primary-hover);
	text-decoration: underline;
}

/* === Loading Spinner === */
.spinner {
	display: inline-block;
	width: 1rem;
	height: 1rem;
	border: 2px solid var(--muted);
	border-top-color: var(--primary);
	border-radius: 50%;
	animation: spin 0.6s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* === Table Styles === */
.table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 0;
}

.table td {
	padding: 0.75rem;
	border-bottom: 1px solid var(--border);
	vertical-align: top;
}

.table tr:last-child td {
	border-bottom: none;
}

/* === Quantity Controls === */
.quantity-controls {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.quantity-controls button {
	width: 2rem;
	height: 2rem;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.quantity-controls input {
	width: 70px;
	text-align: center;
}

/* === Checkbox === */
.checkbox-group {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.checkbox-group input[type="checkbox"] {
	width: 1rem;
	height: 1rem;
	margin-top: 0.25rem;
	cursor: pointer;
}

.checkbox-group label {
	cursor: pointer;
	font-size: 16px;
	line-height: 1.5;
}

/* === Radio === */
.radio-group {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
}

.radio-group input[type="radio"] {
	width: 1rem;
	height: 1rem;
	margin-top: 0.25rem;
	cursor: pointer;
}

.radio-group label {
	cursor: pointer;
	font-size: 16px;
	line-height: 1.5;
}

/* === Grid Layout === */
.grid {
	display: grid;
	gap: 1.5rem;
}

.grid-2 {
	grid-template-columns: repeat(2, 1fr);
}

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

/* === Container === */
.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1rem;
}

/* === Responsive Helpers === */
/* === Password Requirements === */
.password-requirements {
	margin-top: 0.75rem;
	padding: 0.75rem;
	background-color: var(--muted);
	border-radius: var(--radius);
	font-size: 13px;
}

.requirement-item {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
	transition: all 0.2s;
}

.requirement-item:last-child {
	margin-bottom: 0;
}

.requirement-icon {
	font-size: 14px;
	line-height: 1;
	min-width: 20px;
	text-align: center;
}

.requirement-item.valid .requirement-icon {
	color: var(--success);
}

.requirement-item.valid .requirement-icon::before {
	content: "✅";
}

.requirement-item:not(.valid) .requirement-icon {
	color: var(--destructive);
}

.requirement-item:not(.valid) .requirement-icon::before {
	content: "❌";
}

.requirement-text {
	color: var(--foreground);
}

.requirement-item.valid .requirement-text {
	color: var(--muted-foreground);
}

@media (max-width: 768px) {
	.form-container {
		padding: 1.5rem;
	}
	
	.otp-slot {
		width: 2.5rem;
		height: 2.5rem;
		font-size: 1.125rem;
	}
	
	.container {
		padding: 0 0.75rem;
	}
	
	.password-requirements {
		font-size: 12px;
	}
}

