/* Offerio - Minimalist B2B E-shop CSS */

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

:root {
	--color-primary: #1e293b;
	--color-primary-hover: #0f172a;
	--color-secondary: #64748b;
	--color-success: #10b981;
	--color-error: #ef4444;
	--color-text: #1e293b;
	--color-text-light: #64748b;
	--color-border: #e2e8f0;
	--color-bg: #ffffff;
	--color-bg-light: #f8fafc;
	--spacing: 1rem;
	--border-radius: 0;
	--transition: 150ms ease;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 14px;
	line-height: 1.6;
	color: var(--color-text);
	background: #ffffff;
}

/* =====================================================
   Layout
   ===================================================== */
.container {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 var(--spacing);
}

.main {
	min-height: calc(100vh - 140px);
	padding: 2rem 0;
}

/* =====================================================
   Header
   ===================================================== */
.header {
	background: var(--color-bg);
	border-bottom: 1px solid var(--color-border);
	padding: 1rem 0;
	position: sticky;
	top: 0;
	z-index: 100;
}

.header-content {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
}

.logo {
	font-size: 1.5rem;
	font-weight: 600;
	margin: 0;
}

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

.logo-img {
	height: 44px;
	width: 140px;
	display: block;
	object-fit: cover;
	object-position: center 40%;
}

.page-title {
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--color-text);
	margin: 0;
}

.nav {
	display: flex;
	gap: 1.5rem;
	flex: 1;
}

.nav a {
	color: var(--color-text);
	text-decoration: none;
	padding: 0.5rem 1rem;
	border-radius: var(--border-radius);
	transition: all var(--transition);
}

.nav a:hover {
	background: var(--color-bg-light);
	color: var(--color-primary);
}

.nav a.active {
	background: var(--color-primary);
	color: white;
}

.user-menu {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.user-pricelist {
	color: var(--color-text-light);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.025em;
	cursor: help;
	text-transform: uppercase;
}

.user-currency {
	background: #1e293b;
	color: white;
	font-size: 0.75rem;
	font-weight: 700;
	padding: 0.25rem 0.625rem;
	border-radius: 0;
	letter-spacing: 0.025em;
	cursor: help;
}

.user-discount {
	background: #722F37;
	color: white;
	font-size: 0.75rem;
	font-weight: 700;
	padding: 0.25rem 0.625rem;
	border-radius: 0;
	letter-spacing: 0.025em;
	cursor: help;
}

.user-name {
	color: var(--color-text-light);
	font-size: 0.875rem;
}

.btn-logout {
	color: var(--color-text-light);
	text-decoration: none;
	font-size: 0.875rem;
	padding: 0.5rem 1rem;
	border-radius: var(--border-radius);
	transition: all var(--transition);
}

.btn-logout:hover {
	color: var(--color-error);
	background: #fee;
}

/* =====================================================
   Footer
   ===================================================== */
.footer {
	background: var(--color-bg);
	border-top: 1px solid var(--color-border);
	padding: 1.5rem 0;
	text-align: center;
	color: var(--color-text-light);
	font-size: 0.875rem;
}

/* =====================================================
   Buttons
   ===================================================== */
.btn {
	display: inline-block;
	padding: 0.75rem 1.5rem;
	font-size: 0.875rem;
	font-weight: 500;
	text-decoration: none;
	border: none;
	border-radius: var(--border-radius);
	cursor: pointer;
	transition: all var(--transition);
	text-align: center;
}

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

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

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

.btn-secondary:hover {
	background: #475569;
}

.btn-success {
	background: var(--color-success);
	color: white;
}

.btn-success:hover {
	background: #059669;
}

/* =====================================================
   Forms
   ===================================================== */
.form-group {
	margin-bottom: 1.25rem;
}

.form-label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 500;
	color: var(--color-text);
}

.form-control {
	width: 100%;
	padding: 0.75rem;
	font-size: 0.875rem;
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius);
	background: var(--color-bg);
	transition: border-color var(--transition);
}

.form-control:focus {
	outline: none;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px rgba(30, 41, 59, 0.1);
}

/* =====================================================
   Cards
   ===================================================== */
.card {
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius);
	padding: 1.5rem;
}

/* =====================================================
   Tables
   ===================================================== */
.table {
	width: 100%;
	border-collapse: collapse;
	background: var(--color-bg);
}

.table th,
.table td {
	padding: 0.75rem;
	text-align: left;
	border-bottom: 1px solid var(--color-border);
}

.table th {
	font-weight: 600;
	color: var(--color-text);
	background: var(--color-bg-light);
}

.table tbody tr {
	transition: background var(--transition);
}

.table tbody tr:hover {
	background: var(--color-bg-light);
}

/* =====================================================
   Responsive - Tablet
   ===================================================== */
@media (max-width: 1024px) {
	.container {
		padding: 0 1.5rem;
	}

	.header-content {
		gap: 1rem;
	}

	.nav {
		gap: 1rem;
	}

	.nav a {
		padding: 0.625rem 1rem;
		font-size: 0.875rem;
	}
}

/* =====================================================
   Responsive - Mobile
   ===================================================== */
@media (max-width: 768px) {
	.header-content {
		flex-wrap: wrap;
	}

	.nav {
		width: 100%;
		order: 3;
		justify-content: center;
	}

	.user-menu {
		flex-wrap: wrap;
	}

	.user-name {
		display: none;
	}
}

/* =====================================================
   Touch Optimizations (Tablets)
   ===================================================== */
@media (hover: none) and (pointer: coarse) {
	.btn,
	.nav a,
	.form-control {
		min-height: 44px; /* iOS minimum touch target */
	}

	.table td,
	.table th {
		padding: 1rem;
	}
}

/* =====================================================
   Flash Messages
   ===================================================== */
.flash-message {
	position: fixed;
	top: 20px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 10000;
	min-width: 320px;
	max-width: 600px;
	animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
	from {
		opacity: 0;
		transform: translateX(-50%) translateY(-20px);
	}
	to {
		opacity: 1;
		transform: translateX(-50%) translateY(0);
	}
}

@keyframes slideUp {
	from {
		opacity: 1;
		transform: translateX(-50%) translateY(0);
	}
	to {
		opacity: 0;
		transform: translateX(-50%) translateY(-20px);
	}
}

.flash-message.hiding {
	animation: slideUp 0.3s ease-out;
}

.flash-content {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 1rem 1.25rem;
	border-radius: 0;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
	backdrop-filter: blur(10px);
}

.flash-success .flash-content {
	background: linear-gradient(135deg, rgba(16, 185, 129, 0.95) 0%, rgba(5, 150, 105, 0.95) 100%);
	color: white;
}

.flash-error .flash-content {
	background: linear-gradient(135deg, rgba(239, 68, 68, 0.95) 0%, rgba(220, 38, 38, 0.95) 100%);
	color: white;
}

.flash-info .flash-content {
	background: linear-gradient(135deg, rgba(59, 130, 246, 0.95) 0%, rgba(37, 99, 235, 0.95) 100%);
	color: white;
}

.flash-warning .flash-content {
	background: linear-gradient(135deg, rgba(245, 158, 11, 0.95) 0%, rgba(217, 119, 6, 0.95) 100%);
	color: white;
}

.flash-text {
	flex: 1;
	font-weight: 500;
	font-size: 0.9375rem;
}

.flash-close {
	background: transparent;
	border: none;
	color: white;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0.8;
	transition: opacity var(--transition);
}

.flash-close:hover {
	opacity: 1;
}

@media (max-width: 768px) {
	.flash-message {
		min-width: auto;
		max-width: calc(100% - 2rem);
		left: 1rem;
		right: 1rem;
		transform: none;
	}

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

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

	.flash-content {
		padding: 0.875rem 1rem;
	}
}
