/**
 * SHRC Repair Overview — same blue & orange palette, sized for iPad boards.
 */
:root {
	--shrc-blue: #0693e3;
	--shrc-blue-dark: #007cba;
	--shrc-blue-deep: #005a87;
	--shrc-blue-light: #e8f6fd;
	--shrc-blue-muted: #8ed1fc;
	--shrc-orange: #ff6900;
	--shrc-orange-dark: #e55d00;
	--shrc-amber: #fcb900;
	--shrc-base: #ffffff;
	--shrc-contrast: #111111;
	--shrc-muted: #5a6772;
	--shrc-border: #c5e4f7;
	--shrc-shadow: rgba(6, 147, 227, 0.14);
	--shrc-error: #cf2e2e;
	--shrc-success: #00875a;
	--shrc-radius: 10px;
	--shrc-radius-lg: 14px;
	--shrc-font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.shrc-overview {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	padding-bottom: max(2rem, env(safe-area-inset-bottom));
}

.shrc-overview *,
.shrc-overview *::before,
.shrc-overview *::after {
	box-sizing: border-box;
}

.shrc-overview__login {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1rem;
	font-size: 1.05rem;
}

.shrc-overview__refresh-panel {
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
	padding: 1.05rem 1.2rem 1.15rem;
	margin-bottom: 0.85rem;
}

.shrc-overview__month-panel,
.shrc-overview__category-panel {
	margin-bottom: 0.85rem;
}

.shrc-overview__month-panel .shrc-register__meta {
	margin-bottom: 0;
}

.shrc-overview__refresh {
	min-height: 3.5rem;
	width: 100%;
	font-size: 1.15rem;
	border-radius: 12px;
	touch-action: manipulation;
}

.shrc-overview__toolbar-hint {
	margin: 0;
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--shrc-muted);
	line-height: 1.45;
}

.shrc-overview__snapshot-time {
	margin: 0.45rem 0 0;
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--shrc-blue-deep);
}

.shrc-overview__filters {
	margin: 0;
	padding: 0;
	border: 0;
}

.shrc-overview .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.shrc-overview__filters legend {
	padding: 0;
	margin-bottom: 0.65rem;
	font-size: 1rem;
	font-weight: 700;
	color: var(--shrc-blue-deep);
}

.shrc-overview__category-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.6rem;
}

.shrc-overview__category-chip {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 3.05rem;
	margin: 0;
	padding: 0.6rem 0.5rem;
	text-align: center;
	font-size: 0.92rem;
	font-weight: 700;
	line-height: 1.25;
	color: var(--shrc-blue-deep);
	background: var(--shrc-base);
	border: 2px solid var(--shrc-border);
	border-radius: 12px;
	cursor: pointer;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
}

.shrc-overview__category-chip input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.shrc-overview__category-chip.is-selected,
.shrc-overview__category-chip:has(input:checked) {
	color: #fff;
	background: linear-gradient(135deg, var(--shrc-blue) 0%, var(--shrc-blue-dark) 100%);
	border-color: var(--shrc-blue-dark);
	box-shadow: 0 4px 12px var(--shrc-shadow);
}

.shrc-overview__toggle {
	display: flex;
	align-items: flex-start;
	gap: 0.85rem;
	margin: 0;
	padding: 0.9rem 1rem;
	background: var(--shrc-blue-light);
	border: 1.5px solid var(--shrc-border);
	border-radius: 12px;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
}

.shrc-overview__toggle input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.shrc-overview__toggle-ui {
	flex-shrink: 0;
	width: 3.1rem;
	height: 1.85rem;
	margin-top: 0.15rem;
	border-radius: 999px;
	background: #c5d5de;
	position: relative;
	transition: background 0.15s ease;
}

.shrc-overview__toggle-ui::after {
	content: "";
	position: absolute;
	top: 0.18rem;
	left: 0.18rem;
	width: 1.45rem;
	height: 1.45rem;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
	transition: transform 0.15s ease;
}

.shrc-overview__toggle.is-on .shrc-overview__toggle-ui,
.shrc-overview__toggle:has(input:checked) .shrc-overview__toggle-ui {
	background: var(--shrc-orange);
}

.shrc-overview__toggle.is-on .shrc-overview__toggle-ui::after,
.shrc-overview__toggle:has(input:checked) .shrc-overview__toggle-ui::after {
	transform: translateX(1.25rem);
}

.shrc-overview__toggle-text {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	color: var(--shrc-blue-deep);
}

.shrc-overview__toggle-text strong {
	font-size: 1.02rem;
}

.shrc-overview__toggle-text span {
	font-size: 0.85rem;
	font-weight: 500;
	color: var(--shrc-muted);
}

.shrc-overview__stats {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.shrc-overview__stat--wait-time .shrc-overview__stat-value,
.shrc-overview__stat--repair-time .shrc-overview__stat-value {
	font-size: 1.45rem;
}

.shrc-overview__stat {
	padding: 1rem 1.05rem 1.05rem;
	background: var(--shrc-base);
	border: 1px solid var(--shrc-border);
	border-radius: var(--shrc-radius-lg);
	box-shadow: 0 4px 18px var(--shrc-shadow);
	min-height: 6.2rem;
}

.shrc-overview__stat-label {
	margin: 0 0 0.35rem;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--shrc-muted);
}

.shrc-overview__stat-value {
	margin: 0;
	font-size: 2.15rem;
	font-weight: 800;
	line-height: 1;
	color: var(--shrc-blue-deep);
}

.shrc-overview__stat--waiting .shrc-overview__stat-value {
	color: var(--shrc-orange);
}

.shrc-overview__stat--progress .shrc-overview__stat-value {
	color: var(--shrc-blue);
}

.shrc-overview__stat--repaired .shrc-overview__stat-value {
	color: var(--shrc-success);
}

.shrc-overview__stat-note {
	margin: 0.4rem 0 0;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--shrc-muted);
}

.shrc-overview__category-stats {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.65rem;
}

.shrc-overview__cat-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.45rem;
	align-items: start;
	padding: 0.75rem 0.85rem;
	background: linear-gradient(135deg, var(--shrc-blue-light) 0%, #fff 100%);
	border: 1px solid var(--shrc-border);
	border-radius: 12px;
	cursor: pointer;
	touch-action: manipulation;
}

.shrc-overview__cat-row.is-empty {
	opacity: 0.45;
}

.shrc-overview__cat-row.is-active {
	outline: 2px solid var(--shrc-orange);
}

.shrc-overview__cat-name {
	font-size: 0.98rem;
	font-weight: 700;
	color: var(--shrc-blue-deep);
}

.shrc-overview__cat-count {
	min-width: 4.4rem;
	padding: 0.28rem 0.5rem;
	text-align: center;
	font-size: 0.78rem;
	font-weight: 800;
	border-radius: 999px;
}

.shrc-overview__cat-count--waiting {
	color: #fff;
	background: var(--shrc-orange);
}

.shrc-overview__cat-count--progress {
	color: #fff;
	background: var(--shrc-blue);
}

.shrc-overview__cat-count--repaired {
	color: #fff;
	background: var(--shrc-success);
}

.shrc-overview__cat-counts {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.shrc-overview__cat-times {
	font-size: 0.82rem;
	font-weight: 700;
	color: var(--shrc-muted);
}

.shrc-overview__cards {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.shrc-overview__card {
	padding: 1rem 1.05rem 1.1rem;
	background: #fff;
	border: 1.5px solid var(--shrc-border);
	border-radius: var(--shrc-radius-lg);
	box-shadow: 0 2px 10px var(--shrc-shadow);
}

.shrc-overview__card--waiting {
	border-left: 5px solid var(--shrc-orange);
}

.shrc-overview__card--in_progress {
	border-left: 5px solid var(--shrc-blue);
}

.shrc-overview__card--repaired {
	border-left: 5px solid var(--shrc-success);
}

.shrc-overview__card--other {
	border-left: 5px solid var(--shrc-muted);
}

.shrc-overview__card-top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.45rem 0.65rem;
	margin-bottom: 0.55rem;
}

.shrc-overview__badge {
	display: inline-flex;
	align-items: center;
	padding: 0.28rem 0.65rem;
	font-size: 0.78rem;
	font-weight: 800;
	border-radius: 999px;
	color: #fff;
	background: var(--shrc-orange);
}

.shrc-overview__badge--visit {
	background: linear-gradient(135deg, var(--shrc-orange) 0%, var(--shrc-orange-dark) 100%);
}

.shrc-overview__badge--status {
	background: var(--shrc-blue);
}

.shrc-overview__badge--repaired {
	background: var(--shrc-success);
}

.shrc-overview__badge--progress {
	background: var(--shrc-blue);
}

.shrc-overview__badge--progress-time {
	background: var(--shrc-blue-dark);
}

.shrc-overview__badge--wait {
	background: var(--shrc-orange-dark);
}

.shrc-overview__ticket {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 3.6rem;
	padding: 0.35rem 0.7rem;
	font-size: 1.45rem;
	font-weight: 800;
	letter-spacing: 0.03em;
	color: #fff;
	background: linear-gradient(135deg, var(--shrc-orange) 0%, var(--shrc-orange-dark) 100%);
	border-radius: 12px;
}

.shrc-overview__card-visitor {
	margin: 0 0 0.2rem;
	font-size: 1.25rem;
	font-weight: 800;
	color: var(--shrc-blue-deep);
}

.shrc-overview__card-item {
	margin: 0 0 0.25rem;
	font-size: 1.2rem;
	font-weight: 800;
	color: var(--shrc-blue-deep);
	line-height: 1.25;
}

.shrc-overview__card-meta {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--shrc-muted);
}

.shrc-overview__card-notes {
	margin: 0.65rem 0 0;
	padding: 0.65rem 0.75rem;
	font-size: 0.92rem;
	background: var(--shrc-blue-light);
	border-radius: 10px;
	color: var(--shrc-contrast);
}

.shrc-overview__empty {
	margin: 0;
	padding: 0.85rem 0.15rem;
	font-weight: 600;
	color: var(--shrc-muted);
}

.shrc-overview.is-busy {
	cursor: wait;
}

.shrc-overview.is-busy .shrc-overview__refresh,
.shrc-overview.is-busy .shrc-overview__category-chip,
.shrc-overview.is-busy .shrc-overview__tab,
.shrc-overview.is-busy .shrc-register__accordion-trigger,
.shrc-overview.is-busy .shrc-overview__assign-btn {
	pointer-events: none;
	opacity: 0.72;
}

.shrc-overview__board {
	background: var(--shrc-base);
	border: 1px solid var(--shrc-border);
	border-radius: var(--shrc-radius-lg);
	box-shadow: 0 4px 18px var(--shrc-shadow);
	overflow: hidden;
}

.shrc-overview__tabs {
	display: flex;
	align-items: stretch;
	gap: 0;
	margin: 0;
	padding: 0.45rem 0.45rem 0;
	background: linear-gradient(180deg, var(--shrc-blue-light) 0%, #dceef8 100%);
	border-bottom: 2px solid var(--shrc-border);
}

.shrc-overview__tab {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1 1 0;
	gap: 0.4rem;
	min-height: 3.25rem;
	margin: 0;
	padding: 0.55rem 0.4rem;
	border: 2px solid transparent;
	border-bottom: 0;
	border-radius: 12px 12px 0 0;
	background: transparent;
	color: var(--shrc-blue-deep);
	font-size: 0.92rem;
	font-weight: 800;
	cursor: pointer;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

.shrc-overview__tab.is-active {
	color: var(--shrc-blue-deep);
	background: #fff;
	border-color: var(--shrc-border);
	box-shadow: none;
	position: relative;
	z-index: 1;
	margin-bottom: -2px;
	padding-bottom: calc(0.55rem + 2px);
	border-bottom: 2px solid #fff;
}

.shrc-overview__tab-count {
	min-width: 1.7rem;
	padding: 0.1rem 0.4rem;
	border-radius: 999px;
	background: var(--shrc-orange);
	color: #fff;
	font-size: 0.85rem;
	line-height: 1.4;
}

.shrc-overview__tab.is-active .shrc-overview__tab-count {
	background: var(--shrc-blue);
}

.shrc-overview__tab-panel {
	padding: 1.1rem 1.05rem 1.2rem;
	background: #fff;
}

.shrc-overview__tab-panel[hidden] {
	display: none;
}

.shrc-overview__tab-hint {
	margin: 0 0 0.85rem;
	font-size: 0.92rem;
	font-weight: 600;
	color: var(--shrc-muted);
	line-height: 1.4;
}

.shrc-overview__subheading {
	margin: 1.25rem 0 0.65rem;
	font-size: 1.05rem;
	font-weight: 800;
	color: var(--shrc-blue-deep);
}

.shrc-overview__table-wrap {
	max-height: min(70vh, 42rem);
	overflow: auto;
	-webkit-overflow-scrolling: touch;
}

.shrc-overview__table {
	min-width: 46rem;
	font-size: 1rem;
}

.shrc-overview__table th,
.shrc-overview__table td {
	font-size: 1rem;
	vertical-align: middle;
}

.shrc-overview__grouped.shrc-overview__group-start td {
	border-top: 2px solid var(--shrc-blue-muted);
	background: #f3f9fd;
}

.shrc-overview__grouped.shrc-overview__group-cont td {
	border-top: 1px dashed var(--shrc-border);
	background: #f3f9fd;
}

.shrc-overview__ticket-group {
	vertical-align: middle;
	text-align: center;
	box-shadow: inset 4px 0 0 var(--shrc-orange);
}

.shrc-overview__ticket-label {
	display: block;
	font-weight: 800;
	color: var(--shrc-orange);
}

.shrc-overview__ticket-count {
	display: inline-block;
	margin-top: 0.25rem;
	min-width: 1.35rem;
	padding: 0.1rem 0.4rem;
	font-size: 0.75rem;
	font-weight: 800;
	color: #fff;
	background: var(--shrc-orange);
	border-radius: 999px;
}

.shrc-overview__empty-cell {
	text-align: center;
	color: var(--shrc-muted);
	padding: 1.1rem 0.75rem !important;
}

.shrc-overview__col-assign {
	min-width: 16rem;
}

.shrc-overview__assign {
	display: flex;
	align-items: center;
	gap: 0.45rem;
}

.shrc-overview__repairer-input {
	width: 9.5rem;
	min-height: 2.75rem;
	padding: 0.45rem 0.6rem;
	border: 1.5px solid var(--shrc-border);
	border-radius: 10px;
	font-size: 16px;
	font-weight: 600;
	color: var(--shrc-contrast);
}

.shrc-overview__repairer-input.is-invalid {
	border-color: var(--shrc-error);
	background: #fff5f5;
}

.shrc-overview__assign-btn {
	min-height: 2.75rem;
	padding: 0.45rem 0.85rem;
	font-size: 0.95rem;
	white-space: nowrap;
}

.shrc-overview__category-stats .shrc-overview__table-wrap {
	margin-bottom: 0.25rem;
}

.shrc-overview__table tbody tr.is-empty td {
	opacity: 0.45;
}

@media (min-width: 768px) {
	.shrc-overview__refresh-panel {
		flex-direction: row;
		align-items: center;
	}

	.shrc-overview__refresh {
		width: auto;
		min-width: 12rem;
	}

	.shrc-overview__tab {
		font-size: 1.05rem;
	}

	.shrc-overview__category-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.shrc-overview__stats {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.shrc-overview__category-stats {
		grid-template-columns: 1fr;
	}

	.shrc-overview__cards--compact {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1100px) {
	.shrc-overview__category-grid {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}

	.shrc-overview__cards:not(.shrc-overview__cards--compact) {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (hover: hover) and (pointer: fine) {
	.shrc-overview__category-chip:hover {
		border-color: var(--shrc-blue);
		background: var(--shrc-blue-light);
	}

	.shrc-overview__category-chip.is-selected:hover,
	.shrc-overview__category-chip:has(input:checked):hover {
		background: linear-gradient(135deg, var(--shrc-blue-dark) 0%, var(--shrc-blue-deep) 100%);
	}
}
