/* =====================================================
   SPS — Strefa Konsultanta (dashboard + kreator + profil)
   ===================================================== */

* { box-sizing: border-box; }

body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	background: #F8F9FB;
	color: #1A2540;
	margin: 0;
	-webkit-font-smoothing: antialiased;
}

/* =========== LAYOUT z sidebarem =========== */
.sps-sidebar {
	position: fixed;
	top: 0; left: 0; bottom: 0;
	width: 260px;
	background: #1A2540;
	color: #fff;
	padding: 1.5rem 1rem;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	z-index: 100;
}
.sps-sidebar__brand {
	display: flex;
	align-items: center;
	gap: .75rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid rgba(255,255,255,.10);
}
.sps-sidebar__logo {
	width: 40px; height: 40px;
	background: linear-gradient(135deg, #D4A017, #E6B844);
	color: #1A2540;
	border-radius: 10px;
	display: flex; align-items: center; justify-content: center;
	font-weight: 800;
	font-size: 16px;
}
.sps-sidebar__brand strong { display: block; font-size: 14px; }
.sps-sidebar__brand small { opacity: .65; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }

.sps-sidebar__nav { display: flex; flex-direction: column; gap: .25rem; flex: 1; }
.sps-nav-link {
	display: flex; align-items: center; gap: .65rem;
	padding: .65rem .85rem;
	color: rgba(255,255,255,.75);
	text-decoration: none;
	border-radius: 8px;
	font-size: 14px;
	transition: background .15s ease, color .15s ease;
}
.sps-nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sps-nav-link.is-active {
	background: rgba(212,160,23,.18);
	color: #FFD700;
	font-weight: 700;
	box-shadow: inset 3px 0 0 #D4A017;
	padding-left: 1.1rem;
}
.sps-nav-link.is-active svg { color: #D4A017; }
.sps-nav-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.sps-nav-link--accent {
	background: linear-gradient(135deg, #D4A017, #E6B844);
	color: #1A2540 !important;
	font-weight: 700;
	transition: background .2s, box-shadow .2s, transform .2s;
}
.sps-nav-link--accent:hover {
	background: linear-gradient(135deg, #E6B844, #F4D03F);
	box-shadow: 0 6px 18px rgba(212,160,23,.4);
	transform: translateY(-1px);
}
.sps-nav-link--accent svg { color: #1A2540; }
/* gdy aktywny i accent jednocześnie — mocniejszy outline + żółty napis */
.sps-nav-link--accent.is-active {
	background: linear-gradient(135deg, #1A2540, #243353);
	color: #FFD700 !important;
	box-shadow: 0 0 0 2px rgba(255,215,0,.5), 0 6px 18px rgba(212,160,23,.35);
	font-weight: 800;
}
.sps-nav-link--accent.is-active svg { color: #FFD700; }

/* v0.12.2: sub-nav pod "Klienci" — 2 etapowe przyciski */
.sps-nav-sub {
	display: flex; flex-direction: column; gap: .3rem;
	margin: .25rem 0 .65rem 1rem; padding-left: .65rem;
	border-left: 2px solid rgba(255,255,255,.1);
}
.sps-nav-link--etap1, .sps-nav-link--etap2 {
	padding: .55rem .85rem;
	border-radius: 10px;
	font-size: .88rem;
	font-weight: 700;
}
/* v0.14.12: I etap — lekki pomarańcz (zamiast zielonego) */
.sps-nav-link--etap1 { background: rgba(251,146,60,.12); color: #FDBA74 !important; border-left: 3px solid #FB923C; }
.sps-nav-link--etap1:hover { background: rgba(251,146,60,.22); color: #fff !important; }
.sps-nav-link--etap1.is-active { background: linear-gradient(135deg,#FB923C,#EA580C); color: #fff !important; box-shadow: 0 6px 14px rgba(251,146,60,.35); }
.sps-nav-link--etap1.is-active svg { color: #fff; }
.sps-nav-link--etap1 svg { color: #FDBA74; }

.sps-nav-link--etap2 { background: rgba(212,160,23,.12); color: #FBBF24 !important; border-left: 3px solid #D4A017; }
.sps-nav-link--etap2:hover { background: rgba(212,160,23,.22); color: #fff !important; }
.sps-nav-link--etap2.is-active { background: linear-gradient(135deg,#D4A017,#B07F0E); color: #1A2540 !important; box-shadow: 0 6px 14px rgba(212,160,23,.35); }
.sps-nav-link--etap2.is-active svg { color: #1A2540; }
.sps-nav-link--etap2 svg { color: #FBBF24; }

.sps-etap-badge {
	display: inline-block;
	font-size: 9px;
	padding: 1px 5px;
	border-radius: 4px;
	margin-left: .35rem;
	font-weight: 800;
	letter-spacing: .3px;
	vertical-align: middle;
}
.sps-etap-badge--I  { background: #FB923C; color: #fff; }
.sps-etap-badge--II { background: #D4A017; color: #1A2540; }
.sps-nav-link--etap1.is-active .sps-etap-badge--I  { background: #fff; color: #9A3412; }
.sps-nav-link--etap2.is-active .sps-etap-badge--II { background: #1A2540; color: #FBBF24; }

.sps-sidebar__user {
	display: flex; align-items: center; gap: .65rem;
	padding-top: 1rem;
	border-top: 1px solid rgba(255,255,255,.10);
}
.sps-sidebar__avatar {
	width: 36px; height: 36px;
	border-radius: 50%;
	object-fit: cover;
}
.sps-sidebar__avatar--init {
	background: linear-gradient(135deg, #D4A017, #E6B844);
	color: #1A2540;
	display: flex; align-items: center; justify-content: center;
	font-weight: 800; font-size: 14px;
}
.sps-sidebar__user-info { flex: 1; min-width: 0; }
.sps-sidebar__user-info strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sps-sidebar__user-info small { opacity: .6; font-size: 11px; }
.sps-logout {
	color: rgba(255,255,255,.5);
	padding: .35rem;
	border-radius: 6px;
	transition: all .15s;
}
.sps-logout:hover { color: #D4A017; background: rgba(255,255,255,.06); }
.sps-logout svg { width: 16px; height: 16px; display: block; }

.sps-main {
	margin-left: 260px;
	padding: 2rem;
	max-width: 1200px;
}

/* =========== PAGE HEADER =========== */
.sps-page-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 2rem;
	flex-wrap: wrap;
}
.sps-page-header h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.01em; }
.sps-page-header p { margin: .25rem 0 0; color: #6B7280; }

/* =========== STATS =========== */
/* v0.10.9: stats-grid uniwersalny (zespol + wizytowka) */
.sps-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1rem;
	margin-bottom: 1.5rem;
}
.sps-stat-card {
	background: #fff;
	border: 1px solid #E5E7EB;
	border-radius: 14px;
	padding: 1.25rem 1.5rem;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: .35rem;
	box-shadow: 0 2px 8px rgba(15,26,51,.04);
	transition: .2s;
}
.sps-stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(15,26,51,.08); }
.sps-stat-icon { font-size: 1.5rem; line-height: 1; }
.sps-stat-value { font-size: 1.65rem; font-weight: 800; color: #0F1A33; line-height: 1.1; }
.sps-stat-label { font-size: .8rem; color: #6B7280; text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }

.sps-stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1rem;
	margin-bottom: 2rem;
}
.sps-stat {
	background: #fff;
	border: 1px solid #E5E7EB;
	border-radius: 12px;
	padding: 1.5rem;
	box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.sps-stat-num {
	font-size: 32px;
	font-weight: 800;
	color: #1A2540;
	line-height: 1;
	margin-bottom: .35rem;
}
.sps-stat-label { color: #6B7280; font-size: 13px; }
.sps-stat--accent { border-color: #D4A017; background: linear-gradient(135deg, #FBF7E8, #fff); }
.sps-stat--accent .sps-stat-num { color: #D4A017; }

/* =========== SECTIONS =========== */
.sps-section { margin-bottom: 2rem; }
.sps-section-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
}
.sps-section-head h2 { margin: 0; font-size: 20px; }
.sps-link { color: #D4A017; text-decoration: none; font-weight: 600; font-size: 14px; }
.sps-link:hover { text-decoration: underline; }

/* =========== CARDS =========== */
.sps-card {
	background: #fff;
	border: 1px solid #E5E7EB;
	border-radius: 12px;
	padding: 2rem;
	margin-bottom: 1.5rem;
	box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.sps-card h2 { margin: 0 0 .5rem; font-size: 20px; }
.sps-card-desc { color: #6B7280; margin: 0 0 1.5rem; font-size: 14px; }

/* =========== FORMS =========== */
.sps-form { max-width: 480px; margin: 0 auto; }
.sps-form--wide { max-width: 100%; }
.sps-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.sps-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.sps-field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.sps-field label {
	font-size: 13px; font-weight: 600; color: #1A2540;
}
.sps-field input[type="text"],
.sps-field input[type="email"],
.sps-field input[type="tel"],
.sps-field input[type="url"],
.sps-field input[type="number"],
.sps-field input[type="date"],
.sps-field input[type="password"],
.sps-field select,
.sps-field textarea {
	width: 100%;
	padding: .65rem .85rem;
	background: #F9FAFB;
	border: 1.5px solid #E5E7EB;
	border-radius: 8px;
	font-family: inherit;
	font-size: 14px;
	transition: border-color .15s ease, background .15s ease;
}
.sps-field input:focus,
.sps-field select:focus,
.sps-field textarea:focus {
	outline: none;
	border-color: #D4A017;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(212,160,23,.10);
}
.sps-field small {
	font-size: 12px;
	color: #6B7280;
}
.sps-field textarea { resize: vertical; min-height: 80px; }

/* =========== BUTTONS =========== */
.sps-btn {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	padding: .65rem 1.25rem;
	border-radius: 8px;
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	border: none;
	cursor: pointer;
	transition: all .15s ease;
	font-family: inherit;
}
.sps-btn--sm { padding: .4rem .85rem; font-size: 13px; }
.sps-btn--lg { padding: .85rem 1.65rem; font-size: 15px; }
.sps-btn--gold {
	background: linear-gradient(135deg, #D4A017, #E6B844);
	color: #1A2540;
	box-shadow: 0 4px 12px rgba(212,160,23,.30);
}
.sps-btn--gold:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 22px rgba(212,160,23,.45);
}
/* v0.11.4: zielony "Zapisz ofertę" */
.sps-btn--save {
	background: linear-gradient(135deg, #10B981, #059669);
	color: #fff;
	box-shadow: 0 4px 12px rgba(16,185,129,.30);
	border: none;
}
.sps-btn--save:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 22px rgba(16,185,129,.45);
	color: #fff;
}
.sps-btn--outline {
	background: transparent;
	color: #1A2540;
	border: 1.5px solid #1A2540;
}
.sps-btn--outline:hover { background: #1A2540; color: #fff; }
.sps-btn--ghost {
	background: transparent;
	color: #6B7280;
}
.sps-btn--ghost:hover { color: #1A2540; }

/* =========== ALERTS =========== */
.sps-alert {
	padding: 1rem 1.25rem;
	border-radius: 8px;
	margin-bottom: 1.5rem;
	font-size: 14px;
}
.sps-alert--err { background: #FEF2F2; color: #991B1B; border-left: 4px solid #DC2626; }
.sps-alert--ok { background: #ECFDF5; color: #065F46; border-left: 4px solid #10B981; }
.sps-alert--info { background: #EFF6FF; color: #1E40AF; border-left: 4px solid #3B82F6; }

/* =========== AUTH PAGES (login / rejestracja) =========== */
.sps-auth-wrap {
	min-height: 100vh;
	background: linear-gradient(135deg, #1A2540 0%, #264360 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem 1rem;
}
.sps-auth-card {
	background: #fff;
	border-radius: 18px;
	padding: 2.5rem;
	max-width: 460px;
	width: 100%;
	box-shadow: 0 24px 60px rgba(0,0,0,.30);
}
.sps-auth-card--wide { max-width: 560px; }
.sps-auth-icon {
	width: 60px; height: 60px;
	background: linear-gradient(135deg, #D4A017, #E6B844);
	border-radius: 16px;
	display: flex; align-items: center; justify-content: center;
	margin-bottom: 1.5rem;
	color: #1A2540;
	box-shadow: 0 8px 20px rgba(212,160,23,.30);
}
.sps-auth-icon svg { width: 30px; height: 30px; }
.sps-auth-title { margin: 0 0 .35rem; font-size: 26px; font-weight: 800; }
.sps-auth-subtitle { margin: 0 0 2rem; color: #6B7280; font-size: 14px; }

.sps-remember {
	display: flex;
	align-items: center;
	gap: .5rem;
	font-size: 13px;
	margin: 1rem 0;
}
.sps-consent {
	display: flex;
	align-items: flex-start;
	gap: .65rem;
	font-size: 12px;
	color: #6B7280;
	margin: 1rem 0;
	line-height: 1.5;
}
.sps-consent input { margin-top: 2px; }

.sps-auth-links {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 1rem;
	font-size: 13px;
}
.sps-auth-links a { color: #1A2540; text-decoration: none; font-weight: 600; }
.sps-auth-links a:hover { color: #D4A017; }

.sps-auth-trust {
	text-align: center;
	margin-top: 1.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid #E5E7EB;
	font-size: 11px;
	color: #6B7280;
}

.sps-honeypot {
	position: absolute;
	left: -9999px;
	opacity: 0;
	pointer-events: none;
}

/* =========== STEPPER (kreator) =========== */
.sps-stepper {
	display: flex;
	gap: .5rem;
	margin-bottom: 2rem;
	overflow-x: auto;
	padding-bottom: .5rem;
}
.sps-step {
	display: flex;
	align-items: center;
	gap: .5rem;
	padding: .65rem 1rem;
	background: #fff;
	border: 1px solid #E5E7EB;
	border-radius: 8px;
	text-decoration: none;
	color: #6B7280;
	font-size: 13px;
	flex-shrink: 0;
	transition: all .15s;
}
.sps-step.is-active { background: #1A2540; color: #fff; border-color: #1A2540; }
.sps-step.is-done { color: #10B981; border-color: #10B981; }
.sps-step-num {
	width: 22px; height: 22px;
	border-radius: 50%;
	background: rgba(255,255,255,.15);
	display: flex; align-items: center; justify-content: center;
	font-size: 11px;
	font-weight: 700;
}
.sps-step:not(.is-active) .sps-step-num { background: #F3F4F6; }

.sps-kreator-nav {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 2rem;
}

/* =========== WARIANTY (kreator step 4) =========== */
.sps-variant {
	background: #FBF7E8;
	border: 2px solid #E8DFCB;
	border-radius: 12px;
	padding: 1.25rem;
}
.sps-variant--opt { border-color: #D4A017; background: linear-gradient(135deg, #FBF7E8, #fff); position: relative; }
.sps-variant h3 { margin: 0 0 1rem; font-size: 16px; }
.sps-badge-opt {
	background: #D4A017;
	color: #1A2540;
	font-size: 9px;
	padding: .15rem .5rem;
	border-radius: 4px;
	letter-spacing: .05em;
	margin-left: .5rem;
}
.sps-variant-preview {
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid rgba(0,0,0,.06);
	font-size: 13px;
}
.sps-variant-preview strong { display: block; font-size: 18px; color: #D4A017; }
.sps-variant-preview small { color: #6B7280; }

/* =========== FIN PREVIEW =========== */
.sps-fin-preview {
	background: #FBF7E8;
	border: 1px solid #E8DFCB;
	border-radius: 12px;
	padding: 1.5rem;
	margin-bottom: 2rem;
}

/* =========== SUMMARY =========== */
.sps-summary-block {
	background: #fff;
	border: 1px solid #E5E7EB;
	border-radius: 12px;
	padding: 1.5rem;
	margin-bottom: 1.5rem;
}
.sps-summary-block h3 { margin: 0 0 1rem; font-size: 16px; }
.sps-summary-block table { width: 100%; }
.sps-summary-block th { text-align: left; padding: .35rem 1rem .35rem 0; color: #6B7280; font-weight: 500; font-size: 13px; width: 180px; }
.sps-summary-block td { padding: .35rem 0; font-size: 14px; font-weight: 600; }
.sps-summary-card {
	background: #FBF7E8;
	border: 2px solid #E8DFCB;
	border-radius: 10px;
	padding: 1rem;
}
.sps-summary-card h4 { margin: 0 0 .5rem; font-size: 14px; }
.sps-summary-card dl { margin: 0; font-size: 12px; }
.sps-summary-card dt { color: #6B7280; float: left; clear: left; }
.sps-summary-card dd { margin: 0 0 .25rem; text-align: right; }

/* =========== OFERTY LIST =========== */
.sps-oferty-list { display: flex; flex-direction: column; gap: .5rem; }
.sps-oferta-row {
	background: #fff;
	border: 1px solid #E5E7EB;
	border-radius: 10px;
	padding: 1rem 1.25rem;
	display: grid;
	grid-template-columns: 1fr auto auto;
	gap: 1rem;
	align-items: center;
}
.sps-oferta-row:hover { box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.sps-oferta-info strong { display: block; font-size: 15px; }
.sps-oferta-info small { color: #6B7280; font-size: 12px; }
.sps-oferta-wartosc { color: #D4A017; font-size: 16px; }

.sps-status {
	display: inline-block;
	padding: .25rem .65rem;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .03em;
	white-space: nowrap;
}
.sps-status--draft { background: #F3F4F6; color: #4B5563; }
.sps-status--sent { background: #DBEAFE; color: #1E40AF; }
.sps-status--viewed { background: #FEF3C7; color: #92400E; }
.sps-status--accepted { background: #D1FAE5; color: #065F46; }
.sps-status--rejected { background: #FEE2E2; color: #991B1B; }
.sps-status--expired { background: #F3F4F6; color: #6B7280; }

.sps-oferta-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* =========== FILTERS =========== */
.sps-filters { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.sps-filter {
	padding: .4rem .85rem;
	background: #fff;
	border: 1px solid #E5E7EB;
	border-radius: 999px;
	font-size: 12px;
	color: #6B7280;
	text-decoration: none;
}
.sps-filter:hover { color: #1A2540; }
.sps-filter.is-active { background: #1A2540; color: #fff; border-color: #1A2540; }

/* =========== EMPTY =========== */
.sps-empty {
	background: #fff;
	border: 2px dashed #E5E7EB;
	border-radius: 12px;
	padding: 3rem 2rem;
	text-align: center;
	color: #6B7280;
}
.sps-empty p { margin: 0 0 1rem; }

/* =========== RESPONSIVE =========== */
/* === MOBILE: menu jako wysuwany panel (off-canvas) ===
   Wcześniej sidebar zamieniał się w poziomy pasek z 14 linkami zawijanymi
   w wiersze — na telefonie rozwalało to cały widok. */
.sps-mobile-bar { display: none; }
.sps-backdrop { display: none; }

@media (max-width: 900px) {
	/* Górny pasek z hamburgerem */
	.sps-mobile-bar {
		display: flex; align-items: center; justify-content: space-between; gap: 1rem;
		position: fixed; top: 0; left: 0; right: 0; height: 58px;
		background: #1A2540; color: #fff; padding: 0 1rem;
		z-index: 120; box-shadow: 0 2px 14px rgba(10,18,40,.22);
	}
	.sps-mobile-bar__brand { display: flex; align-items: center; gap: .6rem; min-width: 0; }
	.sps-mobile-bar__logo {
		width: 32px; height: 32px; flex-shrink: 0;
		background: linear-gradient(135deg,#D4A017,#E6B844); color: #1A2540;
		border-radius: 8px; display: flex; align-items: center; justify-content: center;
		font-weight: 800; font-size: 13px; letter-spacing: .5px;
	}
	.sps-mobile-bar__t {
		font-weight: 700; font-size: .95rem;
		white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
	}

	.sps-burger {
		width: 42px; height: 42px; flex-shrink: 0;
		background: rgba(255,255,255,.08); border: 0; border-radius: 10px;
		display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
		cursor: pointer; padding: 0;
	}
	.sps-burger span { display: block; width: 19px; height: 2px; background: #fff; border-radius: 2px; transition: .25s ease; }
	.sps-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
	.sps-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
	.sps-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

	/* Sidebar → panel wysuwany z lewej */
	.sps-sidebar {
		position: fixed; top: 0; left: 0; bottom: 0;
		width: 84%; max-width: 310px;
		flex-direction: column; gap: 1.25rem;
		padding: 1.25rem 1rem;
		transform: translateX(-100%);
		transition: transform .28s cubic-bezier(.4,0,.2,1);
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		z-index: 130;
	}
	.sps-sidebar.is-open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.42); }
	.sps-sidebar__nav { flex-direction: column; flex-wrap: nowrap; }
	.sps-sidebar__user {
		padding-top: 1rem; padding-left: 0;
		border-top: 1px solid rgba(255,255,255,.10); border-left: 0;
		margin-top: auto;
	}
	/* Wygodniejsze cele dotyku */
	.sps-nav-link { padding-top: .8rem; padding-bottom: .8rem; }

	/* Przyciemnienie tła pod panelem */
	.sps-backdrop {
		display: block; position: fixed; inset: 0;
		background: rgba(10,18,40,.55); z-index: 125;
		opacity: 0; pointer-events: none; transition: opacity .25s ease;
	}
	.sps-backdrop.is-open { opacity: 1; pointer-events: auto; }

	/* Treść startuje pod paskiem */
	.sps-main { margin-left: 0; padding: calc(58px + 1.25rem) 1rem 2.5rem; max-width: 100%; }

	.sps-stats { grid-template-columns: 1fr 1fr; }
	.sps-row-2, .sps-row-3 { grid-template-columns: 1fr; }
	.sps-oferta-row { grid-template-columns: 1fr; }

	/* Nic nie wystaje w bok */
	html, body.sps-page { max-width: 100%; overflow-x: hidden; }
	.sps-main img { max-width: 100%; height: auto; }
	.sps-main table { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
	.sps-page-header { flex-direction: column; align-items: stretch; }

	/* Blokada przewijania tła przy otwartym panelu — musi być po regule overflow-x */
	body.sps-menu-open { overflow: hidden; }
}

@media (max-width: 480px) {
	.sps-stats { grid-template-columns: 1fr; }
	.sps-main { padding-left: .85rem; padding-right: .85rem; }
	.sps-mobile-bar__t { font-size: .88rem; }
}

/* === MOBILE: utwardzenie kart, list i formularzy we WSZYSTKICH zakładkach ===
   UWAGA: NIE używamy `overflow-wrap: anywhere` — ta wartość zmienia liczenie
   min-content, przez co elastyczne elementy kurczą się do szerokości JEDNEGO
   znaku i tekst łamie się po literze. `break-word` łamie tylko wtedy, gdy
   słowo faktycznie nie mieści się, i nie rusza szerokości minimalnej. */
@media (max-width: 900px) {
	.sps-main { overflow-wrap: break-word; }

	/* Nagłówki, wiersze i paski akcji zawijają się zamiast wystawać poza ekran */
	.sps-main [class*="card__top"],
	.sps-main [class*="card__head"],
	.sps-main [class*="__actions"],
	.sps-main [class*="__meta"] { flex-wrap: wrap; }

	/* Długie e-maile / URL-e w wierszach meta: element MUSI móc się zwęzić,
	   inaczej `break-word` nie ma czego łamać (flex item nie schodzi poniżej min-content)
	   i tekst wychodzi poza kartę. To celowo wąski zakres — NIE na całe bloki treści. */
	.sps-main [class*="__meta"] > span,
	.sps-main [class*="__meta"] > a { min-width: 0; }

	/* Pola formularzy — nigdy szersze niż kontener */
	.sps-main input, .sps-main select, .sps-main textarea { max-width: 100%; }

	/* Paski filtrów / narzędzi zawsze się zawijają */
	.sps-toolbar { flex-wrap: wrap; }
	.sps-toolbar__search { flex: 1 1 100%; min-width: 0; }
}

/* ==================================================
 * v0.10.0: Moja wizytówka — edytor
 * ================================================== */
.sps-flash {
	padding: .85rem 1.15rem;
	border-radius: 10px;
	margin-bottom: 1.25rem;
	font-weight: 600;
	font-size: 14px;
}
.sps-flash--ok {
	background: rgba(16,185,129,.12);
	color: #065F46;
	border-left: 4px solid #10B981;
}

.sps-wiz-link-card {
	background: linear-gradient(135deg, #1A2540, #243353);
	color: #fff;
	border-radius: 14px;
	padding: 1.25rem 1.5rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1.5rem;
	margin-bottom: 1.5rem;
	flex-wrap: wrap;
	box-shadow: 0 8px 24px rgba(15,26,51,.1);
}
.sps-wiz-link-card small {
	display: block;
	color: rgba(255,255,255,.6);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: .25rem;
}
.sps-wiz-link-card strong {
	font-family: 'Courier New', monospace;
	font-size: 1rem;
	color: #D4A017;
	word-break: break-all;
}
.sps-wiz-link-actions {
	display: flex;
	gap: .5rem;
	flex-wrap: wrap;
}

.sps-wiz-form { display: grid; gap: 1.25rem; }
.sps-wiz-section {
	background: #fff;
	border-radius: 14px;
	padding: 1.5rem 1.75rem;
	box-shadow: 0 4px 12px rgba(15,26,51,.04);
	border: 1px solid #E5E7EB;
}
.sps-wiz-section h2 {
	font-size: 1.1rem;
	font-weight: 800;
	color: #1A2540;
	margin: 0 0 1rem;
}
.sps-wiz-section .sps-form-row label {
	display: block;
	font-weight: 600;
	font-size: 14px;
	color: #1A2540;
	margin-bottom: .35rem;
}
.sps-wiz-section input[type="text"],
.sps-wiz-section textarea {
	width: 100%;
	padding: .75rem .9rem;
	border: 1.5px solid #E5E7EB;
	border-radius: 10px;
	font-family: inherit;
	font-size: 14px;
	background: #FAFBFC;
	margin-top: .35rem;
	transition: .15s;
}
.sps-wiz-section input[type="text"]:focus,
.sps-wiz-section textarea:focus {
	border-color: #D4A017;
	outline: none;
	background: #fff;
}
.sps-wiz-section textarea { resize: vertical; min-height: 80px; }
.sps-wiz-section small {
	display: block;
	margin-top: .35rem;
	color: #6B7280;
	font-size: 12px;
}
.sps-wiz-info {
	background: #FBF7E8;
	border-left: 4px solid #D4A017;
	padding: 1rem 1.25rem;
	border-radius: 10px;
	font-size: .92rem;
	color: #4B5563;
	line-height: 1.5;
}
.sps-wiz-info a { color: #D4A017; font-weight: 700; }
.sps-wiz-actions {
	display: flex;
	gap: .75rem;
	margin-top: 1rem;
	flex-wrap: wrap;
}
@media (max-width: 720px) {
	.sps-wiz-link-card { flex-direction: column; align-items: stretch; }
	.sps-wiz-section { padding: 1.25rem 1rem; }
}

/* v0.10.4: specjalizacje + wartości w edytorze */
.sps-wiz-help {
	color: #6B7280;
	font-size: 13px;
	margin: -.5rem 0 1rem;
}
.sps-wiz-spec-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: .75rem;
}
.sps-wiz-spec-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .55rem;
	padding: 1rem .85rem;
	border: 2px solid #E5E7EB;
	border-radius: 12px;
	cursor: pointer;
	transition: .2s;
	background: #FAFBFC;
	text-align: center;
}
.sps-wiz-spec-card input { display: none; }
.sps-wiz-spec-card:hover {
	border-color: #D4A017;
	background: rgba(212,160,23,.04);
}
.sps-wiz-spec-card.is-active {
	border-color: #D4A017;
	background: rgba(212,160,23,.1);
	box-shadow: 0 4px 12px rgba(212,160,23,.18);
}
.sps-wiz-spec-icon {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #D4A017;
	border: 1.5px solid rgba(212,160,23,.3);
}
.sps-wiz-spec-icon svg { width: 22px; height: 22px; }
.sps-wiz-spec-name {
	font-size: .85rem;
	font-weight: 700;
	color: #1A2540;
}

.sps-wiz-wart-list {
	display: grid;
	gap: .85rem;
}
.sps-wiz-wart-row {
	display: grid;
	grid-template-columns: 120px 1fr;
	gap: 1rem;
	align-items: center;
	padding: .85rem;
	background: #FAFBFC;
	border: 1px solid #E5E7EB;
	border-radius: 12px;
}
.sps-wiz-wart-icon-col {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .5rem;
}
.sps-wiz-wart-icon-preview {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	background: linear-gradient(135deg, #D4A017, #B8860B);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
}
.sps-wiz-wart-icon-preview svg { width: 24px; height: 24px; }
.sps-wiz-wart-icon-select {
	width: 100%;
	font-size: 12px;
	padding: .35rem;
	border: 1.5px solid #E5E7EB;
	border-radius: 6px;
	background: #fff;
}
.sps-wiz-wart-fields {
	display: grid;
	gap: .5rem;
}
.sps-wiz-wart-fields input {
	padding: .65rem .85rem;
	border: 1.5px solid #E5E7EB;
	border-radius: 8px;
	font-size: 14px;
	background: #fff;
}
.sps-wiz-wart-fields input:focus {
	border-color: #D4A017;
	outline: none;
}
@media (max-width: 600px) {
	.sps-wiz-wart-row { grid-template-columns: 1fr; }
	.sps-wiz-wart-icon-col { flex-direction: row; justify-content: flex-start; }
}

/* v0.13.2: bulk actions + view toggle + filtry */
.sps-toolbar {
	display:flex; align-items:center; gap:.75rem; flex-wrap:wrap;
	background:#fff; border:1px solid #E5E7EB; border-radius:12px;
	padding:.75rem 1rem; margin-bottom:1rem;
}
.sps-toolbar__search {
	flex:1 1 220px; min-width:220px;
	padding:.55rem .9rem; border:1.5px solid #E5E7EB; border-radius:8px;
	font-size:.92rem;
}
.sps-toolbar__search:focus { outline:none; border-color:#D4A017; box-shadow:0 0 0 3px rgba(212,160,23,.12); }
.sps-toolbar__select {
	padding:.5rem .75rem; border:1.5px solid #E5E7EB; border-radius:8px;
	background:#fff; font-size:.88rem; cursor:pointer;
}
.sps-toolbar__viewtoggle { display:flex; gap:.25rem; background:#F3F4F6; padding:.25rem; border-radius:8px; }
.sps-toolbar__viewbtn {
	padding:.4rem .75rem; border:none; background:transparent; cursor:pointer;
	font-size:.85rem; font-weight:600; color:#6B7280; border-radius:6px;
	display:inline-flex; align-items:center; gap:.35rem; transition:.15s;
}
.sps-toolbar__viewbtn:hover { color:#1A2540; }
.sps-toolbar__viewbtn.is-active { background:#fff; color:#1A2540; box-shadow:0 1px 3px rgba(0,0,0,.08); }

.sps-bulkbar {
	display:none; align-items:center; gap:.85rem;
	background:linear-gradient(135deg,#1A2540,#3B4D7F); color:#fff;
	padding:.75rem 1.25rem; border-radius:10px; margin-bottom:1rem;
	box-shadow:0 4px 12px rgba(26,37,64,.25);
}
.sps-bulkbar.is-visible { display:flex; }
.sps-bulkbar__count { font-weight:800; font-size:1rem; }
.sps-bulkbar__actions { display:flex; gap:.5rem; margin-left:auto; }
.sps-bulkbar__btn {
	padding:.5rem 1rem; border-radius:8px; cursor:pointer;
	font-weight:700; font-size:.88rem; border:none;
}
.sps-bulkbar__btn--trash { background:#DC2626; color:#fff; }
.sps-bulkbar__btn--trash:hover { background:#991B1B; }
.sps-bulkbar__btn--cancel { background:rgba(255,255,255,.15); color:#fff; }
.sps-bulkbar__btn--cancel:hover { background:rgba(255,255,255,.25); }

.sps-bulk-check { width:18px; height:18px; cursor:pointer; }

/* View modes — grid (kafelki) vs list */
.sps-items--grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); gap:1rem; }
.sps-items--list { display:flex; flex-direction:column; gap:.5rem; }
.sps-items--list .sps-item { display:flex !important; flex-direction:row !important; align-items:center; gap:1rem; }

.sps-notice { padding:.85rem 1.25rem; border-radius:10px; margin:1rem 0; font-weight:600; }
.sps-notice--ok { background:#D1FAE5; color:#065F46; border-left:4px solid #10B981; }
