/* Arbeitszeit — modern, mobile-first design (light + dark). */

:root {
	color-scheme: light dark;
	--bg: #f6f3f1;
	--bg-glow-1: transparent;
	--bg-glow-2: transparent;
	--surface: #ffffff;
	--surface-solid: #ffffff;
	--surface-2: #faf8f7;
	--fg: #231a20;
	--muted: #64585f;
	--line: #e8e0dc;
	--accent: #166534;
	--accent-2: #0f4a26;
	--accent-soft: rgba(22, 101, 52, 0.1);
	--start: #16a34a;
	--stop: #f43f5e;
	--danger: #e11d48;
	--warn: #d97706;
	--shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
	--shadow-lg: 0 18px 40px -12px rgba(22, 101, 52, 0.45);
	--radius: 22px;
	--radius-sm: 14px;
	--font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--nav-h: 4.25rem;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0e0c0c;
		--bg-glow-1: transparent;
		--bg-glow-2: transparent;
		--surface: #292323;
		--surface-solid: #292323;
		--surface-2: #120f0f;
		--fg: #f5eef6;
		--muted: #b9adb6;
		--line: #2c2526;
		--accent: #4caf78;
		--accent-2: #2e7d4f;
		--accent-soft: rgba(76, 175, 120, 0.14);
		--start: #4ade80;
		--stop: #fb7185;
		--danger: #fb7185;
		--warn: #fbbf24;
		--shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35);
		--shadow-lg: 0 18px 40px -12px rgba(0, 0, 0, 0.6);
	}
}

* { box-sizing: border-box; }

html { -webkit-tap-highlight-color: transparent; }

body {
	margin: 0;
	min-height: 100dvh;
	color: var(--fg);
	font-family: var(--font);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	font-variant-numeric: tabular-nums;
	background:
		radial-gradient(60rem 30rem at 10% -10%, var(--bg-glow-1), transparent 60%),
		radial-gradient(50rem 30rem at 110% 10%, var(--bg-glow-2), transparent 60%),
		var(--bg);
	background-attachment: fixed;
}

button, input { font: inherit; }

/* ---------- Layout ---------- */
.shell {
	max-width: 38rem;
	margin: 0 auto;
	padding: max(1.25rem, env(safe-area-inset-top)) 1.1rem 2rem;
}
.shell.app { padding-bottom: calc(var(--nav-h) + 2rem + env(safe-area-inset-bottom)); }
main > .stack { margin-top: 0.5rem; }

.stack { display: flex; flex-direction: column; gap: 1rem; }
.row { display: flex; flex-wrap: wrap; align-items: end; gap: 0.75rem; }

.topbar { margin: 0.25rem 0 1rem; }
.topbar h1 { margin: 0; }

h1 { margin: 0 0 1rem; font-size: clamp(1.75rem, 6vw, 2.2rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.15; }
h2 { margin: 0; font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }
.section-title { font-size: 0.8rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }

.eyebrow {
	margin: 0 0 0.15rem;
	font-weight: 700;
	font-size: 0.75rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	background: linear-gradient(90deg, var(--accent), var(--accent-2));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.hint { margin: 0; color: var(--muted); font-size: 0.9rem; }
.hint.warn { color: var(--warn); }
.ok { margin: 0; color: var(--start); font-weight: 600; }
.muted { color: var(--muted); }
.date-line { margin: -0.5rem 0 0; color: var(--muted); font-weight: 500; }

/* ---------- Cards ---------- */
.card {
	background: var(--surface);
	-webkit-backdrop-filter: blur(16px) saturate(140%);
	backdrop-filter: blur(16px) saturate(140%);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 1.15rem;
	box-shadow: var(--shadow);
}

/* ---------- Hero (live timer + start/stop) ---------- */
.hero {
	position: relative;
	overflow: hidden;
	border-radius: 28px;
	padding: 1.4rem 1.25rem 1.25rem;
	color: #fff;
	text-align: center;
	background: linear-gradient(145deg, #3d4a42, #232b26);
	box-shadow: 0 18px 40px -16px rgba(15, 23, 42, 0.55);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
	transition: background 0.4s ease;
}
.hero::before {
	content: "";
	position: absolute;
	inset: -40% -20% auto auto;
	width: 70%;
	aspect-ratio: 1;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 65%);
	pointer-events: none;
}
.hero.is-running {
	background: linear-gradient(145deg, #166534, #0b3a1f);
	box-shadow: var(--shadow-lg);
}
.hero .status {
	margin: 0;
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.3rem 0.75rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.14);
	font-size: 0.85rem;
	font-weight: 600;
}
.hero-time {
	margin: 0.4rem 0 0;
	font-size: clamp(3.2rem, 16vw, 4.6rem);
	font-weight: 800;
	letter-spacing: -0.04em;
	line-height: 1;
}
.hero-sub { margin: 0 0 0.9rem; opacity: 0.85; font-size: 0.92rem; }
.hero .hint.warn { color: #fde68a; }

.dot {
	width: 0.55rem;
	height: 0.55rem;
	border-radius: 50%;
	background: #6ee7b7;
	box-shadow: 0 0 0 0 rgba(110, 231, 183, 0.7);
	animation: pulse 1.8s infinite;
}
@keyframes pulse {
	70% { box-shadow: 0 0 0 0.6rem rgba(110, 231, 183, 0); }
	100% { box-shadow: 0 0 0 0 rgba(110, 231, 183, 0); }
}

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 2.9rem;
	padding: 0.6rem 1.15rem;
	border: 1px solid transparent;
	border-radius: var(--radius-sm);
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
	color: #fff;
	font-weight: 650;
	cursor: pointer;
	transition: transform 0.12s ease, filter 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.55; cursor: default; transform: none; }
.btn:focus-visible, .tab:focus-visible, .input:focus-visible, .entry-button:focus-visible, .day-button:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent);
	outline-offset: 2px;
}
.btn-secondary { background: var(--surface-2); color: var(--fg); border-color: var(--line); }
.btn-danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }

.big-btn {
	width: 100%;
	min-height: 4.2rem;
	font-size: 1.2rem;
	font-weight: 750;
	border-radius: 20px;
	background: #fff;
	color: #0f172a;
	box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.45);
}
.big-btn-icon {
	display: inline-grid;
	place-items: center;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	font-size: 0.8rem;
	color: #fff;
}
.btn-start .big-btn-icon { background: var(--start); }
.btn-stop { color: #be123c; }
.btn-stop .big-btn-icon { background: var(--stop); }

.icon-btn {
	display: inline-grid;
	place-items: center;
	width: 1.6rem;
	height: 1.6rem;
	border: 0;
	border-radius: 50%;
	background: color-mix(in srgb, var(--danger) 12%, transparent);
	color: var(--danger);
	font-size: 1rem;
	line-height: 1;
	cursor: pointer;
}

/* ---------- Bottom navigation ---------- */
.tabs {
	position: fixed;
	left: 50%;
	bottom: calc(0.75rem + env(safe-area-inset-bottom));
	transform: translateX(-50%);
	width: min(26rem, calc(100% - 1.5rem));
	height: var(--nav-h);
	z-index: 10;
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 1fr;
	gap: 0.25rem;
	padding: 0.4rem;
	border-radius: 24px;
	background: var(--surface);
	-webkit-backdrop-filter: blur(20px) saturate(160%);
	backdrop-filter: blur(20px) saturate(160%);
	border: 1px solid var(--line);
	box-shadow: 0 12px 32px -8px rgba(15, 23, 42, 0.25);
}
.tab {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.1rem;
	border: 0;
	border-radius: 18px;
	background: transparent;
	color: var(--muted);
	font-size: 0.72rem;
	font-weight: 650;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}
.tab.active { background: var(--accent-soft); color: var(--accent); }

/* ---------- Forms ---------- */
.field, .entry-form label, .pick-day {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	flex: 1;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--muted);
}
.input {
	width: 100%;
	min-height: 2.9rem;
	padding: 0.6rem 0.85rem;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--surface-2);
	color: var(--fg);
	font-weight: 500;
	transition: border-color 0.2s ease, background 0.2s ease;
}
.input:focus { border-color: var(--accent); background: var(--surface-solid); outline: none; }
.input:disabled { opacity: 0.5; }

.switch { display: inline-flex; align-items: center; gap: 0.6rem; cursor: pointer; color: var(--fg); font-weight: 500; }
.switch input {
	appearance: none;
	-webkit-appearance: none;
	flex: none;
	position: relative;
	width: 2.4rem;
	height: 1.4rem;
	margin: 0;
	border-radius: 999px;
	background: color-mix(in srgb, var(--muted) 35%, transparent);
	cursor: pointer;
	transition: background 0.2s ease;
}
.switch input::after {
	content: "";
	position: absolute;
	top: 0.15rem;
	left: 0.15rem;
	width: 1.1rem;
	height: 1.1rem;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
	transition: transform 0.2s ease;
}
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(1rem); }
.switch input:disabled { opacity: 0.5; }
.switch input:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }

/* ---------- Day summary ---------- */
.summary-main, .month-total > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.summary-label { font-weight: 700; color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; }
.summary-value { font-size: 2.3rem; font-weight: 800; letter-spacing: -0.035em; }
.live { color: var(--accent); }
.summary-rows { margin: 0.75rem 0 0; display: flex; flex-direction: column; gap: 0.15rem; font-size: 0.92rem; }
.summary-rows > div {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.75rem;
	padding: 0.45rem 0;
	border-top: 1px solid var(--line);
}
.summary-rows dt { color: var(--muted); }
.summary-rows dd { margin: 0; font-weight: 650; white-space: nowrap; }
.break-row .switch { font-size: 0.9rem; }
.break-row.skipped dd { color: var(--muted); font-weight: 500; }
.extra-row dt { display: inline-flex; align-items: center; gap: 0.5rem; }
.extra-row dd { color: var(--start); }

.sheet {
	margin-top: 0.75rem;
	padding: 0.9rem;
	border-radius: var(--radius-sm);
	background: var(--accent-soft);
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}
.sheet-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
.sheet-grid > div { display: flex; flex-direction: column; }
.sheet-grid small { color: var(--muted); font-size: 0.75rem; font-weight: 600; }
.sheet-grid strong { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.sheet .hint { font-size: 0.78rem; }

/* ---------- Widget "Zeit hinzufügen" ---------- */
.widget { border-left: 4px solid var(--accent); }
.minutes-field { max-width: 8rem; }

/* ---------- Entries ---------- */
.entries, .days { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.entry, .day {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 18px;
	box-shadow: var(--shadow);
	overflow: hidden;
}
.entry.running { border-color: color-mix(in srgb, var(--start) 55%, transparent); }
.entry-button, .day-button {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.85rem 1rem;
	background: transparent;
	border: 0;
	color: inherit;
	text-align: left;
	cursor: pointer;
}
.entry-time { flex: 1; font-weight: 600; }
.entry-duration { font-weight: 750; }
.entry-edit { color: var(--muted); }
.split-note { color: var(--muted); font-weight: 500; }
.entry-form { display: flex; flex-wrap: wrap; gap: 0.75rem; padding: 1rem; }
.entry-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; width: 100%; }
.entry-form .alert { width: 100%; }
.add-entry { align-self: flex-start; }

/* ---------- History ---------- */
.month-nav { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.month-nav h2 { font-size: 1.25rem; }
.month-nav .btn { width: 2.9rem; padding: 0; font-size: 1.4rem; border-radius: 50%; }
.month-total {
	color: #fff;
	border: 0;
	background: linear-gradient(145deg, #166534, #0b3a1f);
	box-shadow: var(--shadow-lg);
}
.month-total .summary-label, .month-total .hint { color: rgba(255, 255, 255, 0.82); }
.week-header {
	display: flex;
	justify-content: space-between;
	margin: 0.6rem 0.25rem 0;
	color: var(--muted);
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}
.day-button > span:first-child { flex: 1; font-weight: 600; }
.day-meta { color: var(--muted); font-size: 0.82rem; }
.day-button strong { font-size: 1.05rem; }
.day.open { box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow); }
.day-detail { padding: 0 1rem 1rem; }
.day-detail .card { background: var(--surface-2); box-shadow: none; }

/* ---------- Settings ---------- */
.break-rule {
	margin: 0;
	padding: 0.6rem 1rem 1rem;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--surface-2);
}
.break-rule legend { padding: 0 0.3rem; font-weight: 650; }
.weekdays { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.weekday {
	position: relative;
	display: inline-grid;
	place-items: center;
	min-width: 2.8rem;
	min-height: 2.6rem;
	border-radius: 12px;
	background: var(--surface-2);
	border: 1px solid var(--line);
	color: var(--muted);
	font-weight: 700;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}
.weekday.on { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; color: #fff; }
.weekday input { position: absolute; opacity: 0; pointer-events: none; }
.weekday:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.push-box { border-top: 1px solid var(--line); padding-top: 0.9rem; }

/* ---------- Login ---------- */
.auth { padding-top: max(3rem, env(safe-area-inset-top)); }
.auth-logo {
	display: grid;
	place-items: center;
	width: 4rem;
	height: 4rem;
	margin-bottom: 1rem;
	border-radius: 20px;
	color: #fff;
	background: linear-gradient(145deg, #166534, #0b3a1f);
	box-shadow: var(--shadow-lg);
}

/* ---------- States ---------- */
.loading { display: flex; align-items: center; gap: 0.6rem; padding: 1.5rem 0; color: var(--muted); }
.spinner {
	width: 1.1rem;
	height: 1.1rem;
	border-radius: 50%;
	border: 2px solid var(--line);
	border-top-color: var(--accent);
	animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 2rem 0; }
.empty-title { margin: 0; font-weight: 650; color: var(--muted); }
.alert {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.7rem 0.9rem;
	border-radius: var(--radius-sm);
	background: color-mix(in srgb, var(--danger) 10%, transparent);
	color: var(--danger);
	font-weight: 500;
}
.alert .btn { min-height: 2.25rem; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Family ---------- */
.members { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.member {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.7rem 0.9rem;
	border-radius: var(--radius-sm);
	background: var(--surface-2);
	border: 1px solid var(--line);
}
.member.inactive { opacity: 0.6; }
.member-info { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.member-info small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.member .btn { min-height: 2.4rem; padding: 0.4rem 0.8rem; }
.invite-box { padding: 0.9rem; border-radius: var(--radius-sm); background: var(--accent-soft); }
h3.section-title { margin: 0; }

/* ---------- Account / password ---------- */
.link-btn {
	align-self: center;
	border: 0;
	background: none;
	padding: 0.25rem;
	color: var(--accent);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}
.member { flex-wrap: wrap; }
.member-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.confirm-box { padding: 0.9rem; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.confirm-box.danger { border-color: color-mix(in srgb, var(--danger) 35%, transparent); background: color-mix(in srgb, var(--danger) 6%, var(--surface)); }
.danger-zone { padding-top: 0.9rem; border-top: 1px solid var(--line); }
.btn-danger-solid { background: var(--danger); color: #fff; }

/* ---------- Week overview (Heute) ---------- */
.week-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.week-value { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.03em; }
.week-value small { font-size: 0.95rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.progress {
	height: 8px;
	margin: 0.6rem 0 0.5rem;
	border-radius: 999px;
	background: var(--surface-2);
	border: 1px solid var(--line);
	overflow: hidden;
}
.progress i { display: block; height: 100%; border-radius: 999px; background: var(--accent); transition: width 0.4s ease; }

/* 7-day columns with the daily target as a line */
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.25rem; }
.chart-legend { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.chart-legend i { display: inline-block; width: 16px; height: 2px; border-radius: 1px; background: var(--fg); opacity: 0.6; }
.chart { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; align-items: end; }
.chart-target {
	position: absolute;
	left: 0;
	right: 0;
	height: 2px;
	border-radius: 1px;
	background: var(--fg);
	opacity: 0.6;
	pointer-events: none;
	z-index: 1;
}
.wbar {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 0;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--muted);
	cursor: default;
}
.wbar:hover, .wbar:focus-visible { background: var(--surface-2); }
.wbar:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.wbar-plot { position: relative; display: flex; align-items: flex-end; justify-content: center; width: 100%; }
.wbar-plot i {
	display: block;
	width: min(24px, 70%);
	border-radius: 4px 4px 0 0;
	background: color-mix(in srgb, var(--accent) 45%, var(--surface));
	transition: height 0.3s ease, background 0.15s ease;
}
.wbar:hover .wbar-plot i, .wbar:focus-visible .wbar-plot i { background: color-mix(in srgb, var(--accent) 70%, var(--surface)); }
.wbar.now .wbar-plot i { background: var(--accent); }
.wbar.empty .wbar-plot i { background: var(--line); border-radius: 2px; }
.wbar-value { position: absolute; left: 0; right: 0; text-align: center; font-size: 0.75rem; font-weight: 700; color: var(--fg); }
.wbar small { height: 34px; display: flex; flex-direction: column; justify-content: center; font-size: 0.7rem; line-height: 1.15; text-align: center; }
.wbar.now small { color: var(--fg); font-weight: 700; }
.wtip {
	position: absolute;
	bottom: calc(100% + 4px);
	left: 50%;
	transform: translateX(-50%);
	z-index: 3;
	width: max-content;
	max-width: 11rem;
	padding: 0.35rem 0.55rem;
	border-radius: 8px;
	background: var(--fg);
	color: var(--bg);
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.12s ease;
}
.wbar:first-child .wtip { left: 0; transform: none; }
.wbar:last-child .wtip { left: auto; right: 0; transform: none; }
.wbar:hover .wtip, .wbar:focus-visible .wtip, .wbar:focus .wtip { opacity: 1; }

/* Week header in the history: total + delta to the weekly target */
.week-sum { display: inline-flex; gap: 0.6rem; align-items: baseline; }
.delta { font-weight: 800; text-transform: none; letter-spacing: 0; }
.delta.pos { color: var(--accent); }
.delta.neg { color: var(--danger); }

/* ---- Free days ---- */
.wbar.free .wbar-plot i {
	background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--accent) 55%, var(--surface)) 0 4px, color-mix(in srgb, var(--accent) 25%, var(--surface)) 4px 8px);
}
.wbar.free.now .wbar-plot i {
	background: repeating-linear-gradient(135deg, var(--accent) 0 4px, color-mix(in srgb, var(--accent) 55%, var(--surface)) 4px 8px);
}
.free-row dd { color: var(--start); }
.free-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.free-list li {
	display: inline-flex; align-items: center; gap: 0.25rem;
	padding: 0.2rem 0.3rem 0.2rem 0.7rem; border-radius: 999px;
	background: var(--surface-2); border: 1px solid var(--line); font-size: 0.9rem;
}

/* ---- HR page ---- */
.pool-card .summary-value { color: var(--accent); }
.pool-card.negative .summary-value { color: var(--danger); }
.pool-card > div { display: flex; justify-content: space-between; align-items: baseline; }
.hr-days { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.hr-day {
	background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
	padding: 0.85rem 1rem; display: flex; flex-direction: column; gap: 0.6rem;
}
.hr-day.full { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.hr-top { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.hr-main { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; }
.hr-times { display: grid; grid-template-columns: repeat(4, auto); gap: 0.25rem 1rem; font-variant-numeric: tabular-nums; font-weight: 600; }
.hr-times span { display: flex; flex-direction: column; }
.hr-times small { font-size: 0.7rem; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.hr-times em { font-style: normal; font-weight: 500; color: var(--muted); font-size: 0.85rem; }
.hr-hours { color: var(--accent); }
.hr-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }
.hr-btn { min-height: 44px; padding: 0 0.9rem; white-space: nowrap; }
.hr-note { margin: 0; }
.to-pool { color: var(--warn); font-weight: 600; }
.from-pool { color: var(--start); font-weight: 600; }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--surface-2); }
.segmented button {
	border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 0.85rem;
	padding: 0.35rem 0.8rem; border-radius: 999px; cursor: pointer; min-height: 32px;
}
.segmented button.active { background: var(--accent); color: #fff; font-weight: 600; }
.segmented button:disabled { cursor: default; }
@media (max-width: 420px) {
	.hr-main { flex-direction: column; align-items: stretch; }
	.hr-times { grid-template-columns: repeat(2, auto); }
	.hr-actions { justify-content: flex-end; }
}
.hr-day.off { background: var(--surface-2); }
.hr-day.off strong { color: var(--muted); }

/* ---- SAP copy helper ---- */
.sap { display: flex; flex-direction: column; gap: 0.4rem; padding-top: 0.6rem; border-top: 1px dashed var(--line); }
.sap-row { display: grid; grid-template-columns: 4.5rem 1fr 1fr; gap: 0.5rem; align-items: center; }
.sap-kind { font-weight: 600; font-size: 0.9rem; }
.copy-value {
	min-height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2);
	color: var(--fg); font: inherit; font-variant-numeric: tabular-nums; font-weight: 600; cursor: pointer;
}
.copy-value:hover { border-color: var(--accent); }
.copy-value:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.copy-value.copied { background: var(--accent); border-color: var(--accent); color: #fff; }
.sap-done { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.2rem; }
.sap-done.done .switch { color: var(--start); font-weight: 600; }
.sap-changed {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem;
	padding: 0.6rem 0.75rem; border-radius: 10px; border: 1px solid var(--warn);
	background: color-mix(in srgb, var(--warn) 12%, var(--surface));
}
.sap-changed p { margin: 0; color: var(--fg); font-size: 0.9rem; }
.sap-changed small { color: var(--muted); }
