:root {
	/* Paleta marki: docs/assets/paleta.jpeg */
	--shex-bg: #f2f2f2;
	--shex-card: #ffffff;
	--shex-text: #1e293b;
	--shex-muted: #64748b;
	--shex-line: #e2e8f0;
	--shex-accent: #ec1469;
	--shex-accent-strong: #b6115e;
	--shex-accent-light: #f26dab;
	--shex-accent-soft: #e7c5f65e;
	--shex-danger: #dc2626;
	--shex-danger-soft: #fee2e2;
	--shex-ok: #10b981;
	--shex-radius: 16px;
	--shex-shadow: 0 10px 30px rgba(30, 41, 59, 0.06);
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	background: var(--shex-bg);
	color: var(--shex-text);
	font-size: 15px;
	line-height: 1.5;
}

a {
	color: var(--shex-accent);
	text-decoration: none;
}

a,
.shex-btn,
.shex-icon-btn,
.shex-nav-item,
.shex-tab,
.shex-mini-day {
	transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, opacity 0.4s ease;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

/* Układ aplikacji */
.shex-app {
	display: flex;
	min-height: 100vh;
}

.shex-sidebar {
	width: 240px;
	flex-shrink: 0;
	background: var(--shex-card);
	display: flex;
	flex-direction: column;
	padding: 24px 16px;
	gap: 24px;
	border-right: 1px solid var(--shex-line);
}

.shex-brand {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 8px 12px;
}

.shex-brand-center {
	margin-bottom: 12px;
}

.shex-brand-logo {
	display: block;
	width: 92px;
	height: 92px;
}

.shex-nav {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex-grow: 1;
}

.shex-nav-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 11px 12px;
	border-radius: 12px;
	color: var(--shex-muted);
	font-weight: 600;
}

.shex-nav-item:hover {
	background: var(--shex-bg);
	color: var(--shex-text);
}

.shex-nav-item.is-active {
	background: var(--shex-accent-soft);
	color: var(--shex-accent-strong);
}

.shex-nav-icon {
	display: inline-flex;
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

.shex-nav-icon svg {
	display: block;
	width: 100%;
	height: 100%;
}

.shex-sidebar-footer {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.shex-version {
	margin: 8px 12px 0;
	font-size: 11px;
	color: var(--shex-muted);
}

.shex-nav-logout {
	color: var(--shex-danger);
}

.shex-nav-logout:hover {
	background: var(--shex-danger-soft);
	color: var(--shex-danger);
}

.shex-main {
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.shex-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 32px;
}

.shex-page-title {
	margin: 0;
	font-size: 22px;
}

.shex-topbar-user {
	display: flex;
	align-items: center;
	gap: 12px;
}

.shex-user-name {
	color: var(--shex-muted);
	font-weight: 600;
}

.shex-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: var(--shex-accent);
	color: #fff;
	font-weight: 700;
}

.shex-content {
	padding: 0 32px 32px;
}

/* Karty */
.shex-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}

.shex-card {
	background: var(--shex-card);
	border-radius: var(--shex-radius);
	box-shadow: var(--shex-shadow);
	padding: 20px;
	min-width: 0;
}

.shex-card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
	gap: 8px;
}

.shex-card-head h2 {
	margin: 0;
	font-size: 16px;
}

.shex-day-switch {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--shex-muted);
	font-weight: 600;
	font-size: 13px;
}

.shex-icon-btn {
	border: 1px solid var(--shex-line);
	background: var(--shex-card);
	border-radius: 6px;
	width: 28px;
	height: 28px;
	cursor: pointer;
	color: var(--shex-accent);
	font-size: 15px;
}

.shex-icon-btn:hover {
	background: var(--shex-accent-soft);
}

/* Listy wizyt */
.shex-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.shex-list-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border: 1px solid var(--shex-line);
	border-radius: 12px;
}

.shex-list-time {
	font-weight: 700;
	white-space: nowrap;
}

.shex-list-body {
	min-width: 0;
	flex-grow: 1;
}

.shex-list-title {
	display: block;
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.shex-list-meta {
	display: block;
	color: var(--shex-muted);
	font-size: 13px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.shex-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex-shrink: 0;
}

.shex-empty {
	color: var(--shex-muted);
	padding: 8px 2px;
}

/* Status */
.shex-badge {
	font-size: 12px;
	font-weight: 700;
	padding: 3px 10px;
	border-radius: 999px;
	white-space: nowrap;
}

.shex-badge-scheduled {
	background: var(--shex-accent-soft);
	color: var(--shex-accent-strong);
}

.shex-badge-confirmed {
	background: #d9f5ea;
	color: #047857;
}

.shex-badge-completed {
	background: var(--shex-line);
	color: var(--shex-muted);
}

.shex-badge-cancelled,
.shex-badge-no_show {
	background: var(--shex-danger-soft);
	color: var(--shex-danger);
}

/* Statystyki */
.shex-stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
}

.shex-stat-tile {
	border: 1px solid var(--shex-line);
	border-radius: 12px;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.shex-stat-value {
	font-size: 26px;
	font-weight: 700;
	color: var(--shex-accent);
}

.shex-stat-label {
	color: var(--shex-muted);
	font-size: 13px;
}

/* Mini kalendarz */
.shex-mini-calendar table {
	width: 100%;
	border-collapse: collapse;
	text-align: center;
	font-size: 13px;
}

.shex-mini-calendar th {
	color: var(--shex-muted);
	font-weight: 600;
	padding: 6px 0;
}

.shex-mini-calendar td {
	padding: 2px;
}

.shex-mini-day {
	display: inline-flex;
	width: 32px;
	height: 32px;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
	color: var(--shex-text);
	font-weight: 600;
}

.shex-mini-day:hover {
	background: var(--shex-accent-soft);
}

.shex-mini-day.is-other {
	color: #cbd5e1;
	font-weight: 400;
}

.shex-mini-day.is-today {
	background: var(--shex-accent);
	color: #fff;
}

/* Legenda zespołu */
.shex-legend {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.shex-legend li {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 600;
}

/* Przyciski i formularze */
.shex-btn {
	border: 1px solid var(--shex-line);
	border-radius: 6px;
	padding: 10px 18px;
	font-weight: 700;
	font-size: 14px;
	cursor: pointer;
	background: var(--shex-card);
	color: var(--shex-text);
}

.shex-btn-primary {
	background: var(--shex-accent);
	border-color: var(--shex-accent);
	color: #fff;
}

.shex-btn-primary:hover {
	background: var(--shex-accent-strong);
}

.shex-btn-danger {
	background: var(--shex-danger);
	border-color: var(--shex-danger);
	color: #fff;
}

.shex-btn-block {
	width: 100%;
}

.shex-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0 0 14px;
}

.shex-field label {
	font-weight: 600;
	font-size: 13px;
	color: var(--shex-muted);
}

.shex-field input,
.shex-field select,
.shex-field textarea {
	border: 1px solid var(--shex-line);
	border-radius: 10px;
	padding: 10px 12px;
	font: inherit;
	background: var(--shex-card);
	color: var(--shex-text);
}

.shex-field input:focus,
.shex-field select:focus,
.shex-field textarea:focus {
	outline: 2px solid var(--shex-accent);
	outline-offset: 0;
	border-color: var(--shex-accent);
}

.shex-field-inline {
	margin: 0 0 14px;
	color: var(--shex-muted);
}

.shex-alert {
	background: var(--shex-danger-soft);
	color: var(--shex-danger);
	border-radius: 10px;
	padding: 10px 14px;
	font-weight: 600;
}

/* Logowanie */
.shex-login-page {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	padding: 20px;
}

.shex-login-card {
	background: var(--shex-card);
	border-radius: var(--shex-radius);
	box-shadow: var(--shex-shadow);
	padding: 32px;
	width: 100%;
	max-width: 380px;
}

.shex-login-card h1 {
	font-size: 20px;
	text-align: center;
	margin: 0 0 18px;
}

/* Kalendarz */
.shex-card-calendar {
	padding: 24px;
}

.shex-calendar-toolbar {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}

.shex-calendar-toolbar label {
	color: var(--shex-muted);
	font-weight: 600;
}

.shex-calendar-toolbar select {
	border: 1px solid var(--shex-line);
	border-radius: 10px;
	padding: 9px 12px;
	font: inherit;
}

.shex-calendar-toolbar .shex-btn {
	margin-left: auto;
}

#shex-calendar {
	--fc-border-color: var(--shex-line);
	--fc-button-bg-color: var(--shex-card);
	--fc-button-border-color: var(--shex-line);
	--fc-button-text-color: var(--shex-text);
	--fc-button-active-bg-color: var(--shex-accent);
	--fc-button-active-border-color: var(--shex-accent);
	--fc-button-hover-bg-color: var(--shex-accent-soft);
	--fc-button-hover-border-color: var(--shex-line);
	--fc-today-bg-color: var(--shex-accent-soft);
	--fc-page-bg-color: var(--shex-card);
}

#shex-calendar .fc-button {
	border-radius: 10px;
	font-weight: 600;
	text-transform: none;
}

#shex-calendar .fc-button-active {
	color: #fff;
}

#shex-calendar .fc-toolbar-title {
	font-size: 18px;
	font-weight: 700;
}

/* Modal */
.shex-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.45);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	z-index: 50;
}

.shex-modal {
	background: var(--shex-card);
	border-radius: var(--shex-radius);
	box-shadow: var(--shex-shadow);
	width: 100%;
	max-width: 480px;
	max-height: 90vh;
	overflow-y: auto;
	padding: 24px;
}

.shex-modal h2 {
	margin: 0 0 16px;
	font-size: 18px;
}

.shex-modal-actions {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	margin-top: 18px;
	flex-wrap: wrap;
}

.shex-modal-error {
	display: none;
}

.shex-modal-error.is-visible {
	display: block;
}

.shex-detail-rows {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
}

.shex-detail-rows div {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	border-bottom: 1px solid var(--shex-line);
	padding-bottom: 8px;
}

.shex-detail-rows dt {
	color: var(--shex-muted);
	font-weight: 600;
}

.shex-detail-rows dd {
	margin: 0;
	text-align: right;
}

/* Klient - podpowiedzi */
.shex-autocomplete {
	position: relative;
}

.shex-autocomplete-list {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	background: var(--shex-card);
	border: 1px solid var(--shex-line);
	border-radius: 10px;
	box-shadow: var(--shex-shadow);
	list-style: none;
	margin: 0;
	padding: 4px;
	max-height: 220px;
	overflow-y: auto;
	z-index: 10;
}

.shex-autocomplete-list li {
	padding: 8px 10px;
	border-radius: 8px;
	cursor: pointer;
}

.shex-autocomplete-list li:hover {
	background: var(--shex-accent-soft);
}

/* Kartoteki */
.shex-topbar-search {
	flex-grow: 1;
	max-width: 460px;
	margin: 0 24px;
}

.shex-topbar-search input {
	width: 100%;
	border: 1px solid var(--shex-line);
	border-radius: 12px;
	padding: 11px 16px;
	font: inherit;
	background: var(--shex-card);
}

.shex-topbar-search input:focus {
	outline: 2px solid var(--shex-accent);
	border-color: var(--shex-accent);
}

a.shex-list-item {
	color: inherit;
	display: flex;
	align-items: center;
	gap: 12px;
}

a.shex-list-item:hover {
	border-color: var(--shex-accent);
}

.shex-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-top: 16px;
	color: var(--shex-muted);
	font-weight: 600;
}

.shex-tabs {
	display: flex;
	gap: 6px;
}

.shex-tab {
	border: 1px solid var(--shex-line);
	background: var(--shex-card);
	border-radius: 10px;
	padding: 7px 14px;
	font-weight: 600;
	cursor: pointer;
	color: var(--shex-muted);
}

.shex-tab.is-active {
	background: var(--shex-accent);
	border-color: var(--shex-accent);
	color: #fff;
}

.shex-client-layout {
	display: grid;
	grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
	gap: 20px;
	align-items: start;
}

.shex-notes {
	border: 1px solid var(--shex-line);
	border-radius: 12px;
	padding: 12px 14px;
	margin: 14px 0 0;
}

.shex-notes h3 {
	margin: 0 0 6px;
	font-size: 14px;
	color: var(--shex-muted);
}

.shex-notes-text {
	margin: 0;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.shex-notes-text.is-empty {
	color: var(--shex-muted);
}

.shex-consents {
	border: 1px solid var(--shex-line);
	border-radius: 12px;
	padding: 12px 14px;
	margin: 14px 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* Status */
.shex-status-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 20px;
	align-items: start;
}

.shex-card-note {
	margin-top: 0;
	color: var(--shex-muted);
	font-size: 13px;
}

.shex-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.shex-table th,
.shex-table td {
	text-align: left;
	padding: 9px 10px;
	border-bottom: 1px solid var(--shex-line);
}

.shex-table th {
	color: var(--shex-muted);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.shex-table tr:last-child td {
	border-bottom: 0;
}

/* Event kalendarza */
.shex-event {
	position: relative;
	height: 100%;
	padding: 2px 24px 2px 4px;
	overflow: hidden;
	font-size: 12px;
	line-height: 1.3;
}

.shex-event-time {
	font-weight: 700;
}

.shex-event-title {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.shex-event-employee {
	position: absolute;
	top: 2px;
	right: 2px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	color: var(--shex-text);
	font-size: 9px;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.shex-consents h3 {
	margin: 0;
	font-size: 14px;
	color: var(--shex-muted);
}

.shex-btn-inline {
	align-self: flex-start;
	margin-top: 6px;
	padding: 6px 12px;
	font-size: 13px;
}

/* Responsywność */
@media (max-width: 1100px) {
	.shex-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 860px) {
	.shex-app {
		flex-direction: column;
	}

	.shex-sidebar {
		width: 100%;
		flex-direction: row;
		align-items: center;
		padding: 12px 16px;
		gap: 12px;
		border-right: 0;
		border-bottom: 1px solid var(--shex-line);
	}

	.shex-brand {
		padding: 0;
	}

	.shex-brand-logo {
		width: 36px;
		height: 36px;
	}

	.shex-version {
		display: none;
	}

	.shex-nav {
		flex-direction: row;
		flex-grow: 1;
	}

	.shex-sidebar-footer {
		flex-direction: row;
	}

	.shex-nav-item {
		padding: 9px 10px;
	}

	.shex-topbar,
	.shex-content {
		padding-left: 16px;
		padding-right: 16px;
	}

	.shex-grid {
		grid-template-columns: 1fr;
	}

	.shex-stats {
		grid-template-columns: 1fr;
	}

	.shex-client-layout {
		grid-template-columns: 1fr;
	}

	.shex-status-layout {
		grid-template-columns: 1fr;
	}

	.shex-topbar-search {
		margin: 0 12px;
	}
}
