/* BEM CSS — Souhrnný přehled firem (Admin) */

/* ========== HLAVIČKA + FILTR ========== */
.prehled__header {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 24px;
	flex-wrap: wrap;
	margin-bottom: 28px;
}

.prehled__title {
	font-size: 26px;
	font-weight: 700;
	color: #0f172a;
	margin-bottom: 4px;
}

.prehled__subtitle {
	font-size: 14px;
	color: #64748b;
}

.filtr {
	display: flex;
	gap: 6px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 4px;
}

.filtr__button {
	padding: 8px 14px;
	background: transparent;
	border: none;
	border-radius: 7px;
	color: #475569;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s;
	font-family: inherit;
}

.filtr__button:hover {
	background: #f1f5f9;
}

.filtr__button--active,
.filtr__button--active-period {
	background: #1e3a8a;
	color: #fff;
}

.filtr__button--active:hover,
.filtr__button--active-period:hover {
	background: #1e3a8a;
}

.filtr__button--custom {
	border-left: 1px solid #e2e8f0;
	margin-left: 4px;
	padding-left: 14px;
}

/* ========== KPI KARTY ========== */
.kpi {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 14px;
	margin-bottom: 32px;
}

.kpi__card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-top: 3px solid #94a3b8;
	border-radius: 12px;
	padding: 20px;
	cursor: pointer;
	text-align: left;
	transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
	font-family: inherit;
	position: relative;
}

.kpi__card:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.kpi__card--blue   { border-top-color: #2563eb; }
.kpi__card--purple { border-top-color: #7c3aed; }
.kpi__card--green  { border-top-color: #059669; }
.kpi__card--cyan   { border-top-color: #0891b2; }
.kpi__card--amber  { border-top-color: #d97706; }
.kpi__card--indigo { border-top-color: #1e3a8a; }

.kpi__label {
	font-size: 12px;
	font-weight: 600;
	color: #64748b;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 10px;
}

.kpi__value {
	font-size: 32px;
	font-weight: 700;
	color: #0f172a;
	line-height: 1;
	margin-bottom: 8px;
}

.kpi__unit {
	font-size: 14px;
	font-weight: 500;
	color: #94a3b8;
	margin-left: 2px;
}

.kpi__sub {
	font-size: 13px;
	color: #64748b;
	margin-bottom: 12px;
}

.kpi__hint {
	font-size: 11px;
	color: #cbd5e1;
	font-weight: 500;
}

.kpi__card:hover .kpi__hint {
	color: #1e3a8a;
}

/* ========== ČASOVÁ OSA ========== */
.osa {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 24px;
	margin-bottom: 32px;
}

.osa__head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 20px;
}

.osa__title {
	font-size: 18px;
	font-weight: 600;
	color: #0f172a;
}

.osa__legend {
	display: flex;
	gap: 16px;
	font-size: 13px;
	color: #475569;
}

.osa__legend-item {
	display: flex;
	align-items: center;
	gap: 6px;
}

.osa__dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	display: inline-block;
}

.osa__dot--blue   { background: #2563eb; }
.osa__dot--purple { background: #7c3aed; }
.osa__dot--green  { background: #059669; }

.osa__chart {
	display: grid;
	grid-template-columns: repeat(30, 1fr);
	gap: 4px;
	height: 180px;
	align-items: end;
	padding-bottom: 24px;
	position: relative;
	border-bottom: 1px solid #e2e8f0;
}

.osa__day {
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	cursor: pointer;
	position: relative;
	transition: opacity 0.15s;
}

.osa__day:hover {
	opacity: 0.75;
}

.osa__bars {
	display: flex;
	gap: 2px;
	height: 100%;
	align-items: flex-end;
}

.osa__bar {
	flex: 1;
	border-radius: 2px 2px 0 0;
	min-height: 2px;
	transition: opacity 0.15s;
}

.osa__bar--blue   { background: #2563eb; }
.osa__bar--purple { background: #7c3aed; }
.osa__bar--green  { background: #059669; }

.osa__label {
	position: absolute;
	bottom: -22px;
	left: 0;
	right: 0;
	text-align: center;
	font-size: 10px;
	color: #94a3b8;
}

.osa__hint {
	margin-top: 8px;
	text-align: center;
	font-size: 12px;
	color: #94a3b8;
	font-style: italic;
}

/* ========== PIPELINE ========== */
.pipeline {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 24px;
	margin-bottom: 32px;
}

.pipeline__title {
	font-size: 18px;
	font-weight: 600;
	color: #0f172a;
	margin-bottom: 20px;
}

.pipeline__steps {
	display: flex;
	align-items: stretch;
	gap: 8px;
}

.pipeline__step {
	flex: 1;
	background: #f8fafc;
	border: 2px solid #e2e8f0;
	border-radius: 10px;
	padding: 18px 14px;
	cursor: pointer;
	text-align: center;
	transition: transform 0.15s, border-color 0.15s, background-color 0.15s;
	font-family: inherit;
	position: relative;
}

.pipeline__step:hover {
	transform: translateY(-2px);
}

.pipeline__step-number {
	position: absolute;
	top: 8px;
	right: 8px;
	font-size: 10px;
	font-weight: 700;
	color: #cbd5e1;
}

.pipeline__step-name {
	font-size: 13px;
	font-weight: 600;
	color: #475569;
	margin-bottom: 12px;
}

.pipeline__step-count {
	font-size: 32px;
	font-weight: 700;
	color: #0f172a;
	line-height: 1;
	margin-bottom: 8px;
}

.pipeline__step-desc {
	font-size: 11px;
	color: #94a3b8;
}

.pipeline__step--cyan   { border-color: #cffafe; background: #ecfeff; }
.pipeline__step--amber  { border-color: #fde68a; background: #fffbeb; }
.pipeline__step--purple { border-color: #ddd6fe; background: #f5f3ff; }
.pipeline__step--green  { border-color: #bbf7d0; background: #f0fdf4; }
.pipeline__step--red    { border-color: #fecaca; background: #fef2f2; }

.pipeline__step--cyan:hover   { border-color: #06b6d4; }
.pipeline__step--amber:hover  { border-color: #d97706; }
.pipeline__step--purple:hover { border-color: #7c3aed; }
.pipeline__step--green:hover  { border-color: #059669; }
.pipeline__step--red:hover    { border-color: #dc2626; }

.pipeline__arrow {
	display: flex;
	align-items: center;
	color: #cbd5e1;
	font-size: 18px;
	font-weight: 300;
}

/* ========== SPÍCÍ FIRMY ========== */
.spici {
	background: #fff;
	border: 1px solid #fecaca;
	border-radius: 12px;
	padding: 24px;
	margin-bottom: 32px;
}

.spici__head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 16px;
	flex-wrap: wrap;
	gap: 12px;
}

.spici__title-wrap {
	display: flex;
	align-items: center;
	gap: 10px;
}

.spici__icon {
	font-size: 18px;
	color: #dc2626;
}

.spici__title {
	font-size: 18px;
	font-weight: 600;
	color: #0f172a;
}

.spici__badge {
	background: #fee2e2;
	color: #dc2626;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
}

.spici__action {
	background: transparent;
	border: none;
	color: #1e3a8a;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	font-family: inherit;
}

.spici__action:hover {
	text-decoration: underline;
}

.spici__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 10px;
}

.spici__item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	background: #fef2f2;
	border-radius: 8px;
	cursor: pointer;
	transition: background-color 0.15s;
}

.spici__item:hover {
	background: #fee2e2;
}

.spici__item-name {
	font-size: 13px;
	font-weight: 600;
	color: #0f172a;
	margin-bottom: 2px;
}

.spici__item-meta {
	font-size: 11px;
	color: #64748b;
}

.spici__item-days {
	background: #dc2626;
	color: #fff;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	white-space: nowrap;
}

/* ========== TABULKA FIREM ========== */
.tabulka {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 24px;
}

.tabulka__head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 16px;
}

.tabulka__title {
	font-size: 18px;
	font-weight: 600;
	color: #0f172a;
}

.tabulka__filter-info {
	font-size: 13px;
	color: #64748b;
}

.tabulka__filter-info strong {
	color: #1e3a8a;
}

.tabulka__wrap {
	overflow-x: auto;
}

.tabulka__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.tabulka__table thead th {
	text-align: left;
	padding: 10px 12px;
	background: #f8fafc;
	color: #475569;
	font-weight: 600;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border-bottom: 1px solid #e2e8f0;
}

.tabulka__table tbody td {
	padding: 12px;
	border-bottom: 1px solid #f1f5f9;
	color: #0f172a;
}

.tabulka__table tbody tr:hover {
	background: #f8fafc;
}

.tabulka__row--spici {
	background: #fffbeb;
}

.tabulka__row--spici:hover {
	background: #fef3c7;
}

.tabulka__firma {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 500;
}

.tabulka__spici-icon {
	font-size: 14px;
}

.tabulka__bod-nula {
	font-family: 'Courier New', monospace;
	color: #64748b;
	font-size: 12px;
}

.tabulka__link {
	color: #1e3a8a;
	font-weight: 500;
	font-size: 12px;
}

.tabulka__link:hover {
	text-decoration: underline;
}

/* ========== BADGE ========== */
.badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	white-space: nowrap;
}

.badge--green  { background: #d1fae5; color: #047857; }
.badge--cyan   { background: #cffafe; color: #0e7490; }
.badge--amber  { background: #fef3c7; color: #92400e; }
.badge--purple { background: #ede9fe; color: #6d28d9; }
.badge--red    { background: #fee2e2; color: #b91c1c; }

/* ========== RESPONZIVITA ========== */
@media (max-width: 1100px) {
	.kpi {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 900px) {
	.pipeline__steps {
		flex-direction: column;
	}
	.pipeline__arrow {
		transform: rotate(90deg);
		justify-content: center;
	}
	.osa__chart {
		grid-template-columns: repeat(15, 1fr);
		gap: 3px;
	}
	.osa__day:nth-child(even) {
		display: none;
	}
}

@media (max-width: 600px) {
	.kpi {
		grid-template-columns: repeat(2, 1fr);
	}
	.kpi__value {
		font-size: 24px;
	}
	.prehled__header {
		flex-direction: column;
		align-items: stretch;
	}
	.filtr {
		overflow-x: auto;
	}
}
