/*
 * WPKOMPLETNĚ klientský portál.
 *
 * Design tokens, type scale, card and button shapes are taken from
 * wpkompletne.cz so the portal reads as the same product. The one deliberate
 * departure: the container is wide (76rem instead of the marketing site's
 * 33.5rem) because this layout carries columns and tables, not prose.
 */

/* ---------- Fonts (self-hosted, same files as the main site) ---------- */

@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/inter-normal-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/inter-normal-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Inter";
	font-style: italic;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/inter-italic-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Inter";
	font-style: italic;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/inter-italic-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Inter Tight";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/inter-tight-normal-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Inter Tight";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/inter-tight-normal-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Inter Tight";
	font-style: italic;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/inter-tight-italic-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Inter Tight";
	font-style: italic;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/inter-tight-italic-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */

:root {
	--blue: #2171b9;
	--blue-dark: #1a5c97;
	--ink: #1d1d1f;
	--gray: #6e6e73;
	--line: #e8e8ed;
	--tint-blue: #eef4fb;
	--tint-green: #eff6eb;
	--tint-cream: #faf4ea;
	--tint-gray: #f5f5f7;
	--tint-red: #fdeeee;
	--red: #b3261e;
	--amber: #8a5a00;
	--radius: 32px;
	--radius-sm: 18px;
	--radius-xs: 12px;
	--w: 76rem;
}

* {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: #fff;
	color: var(--ink);
	font-family: "Inter", "Inter Fallback", -apple-system, "SF Pro Text", "Segoe UI", sans-serif;
	font-size: 1.0625rem;
	font-weight: 300;
	line-height: 1.6;
	font-feature-settings: "cv05" 1, "cv11" 1;
	-webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
	font-family: "Inter Tight", "Inter", -apple-system, sans-serif;
	font-weight: 300;
	margin: 0 0 0.6rem;
	text-wrap: balance;
}

h1 {
	font-size: clamp(2rem, 5vw, 2.6rem);
	line-height: 1.1;
	letter-spacing: -0.022em;
}

h2 {
	font-size: clamp(1.45rem, 3.4vw, 1.75rem);
	font-weight: 400;
	line-height: 1.18;
	letter-spacing: -0.016em;
}

h3 {
	font-size: 1.15rem;
	font-weight: 400;
	line-height: 1.32;
	letter-spacing: -0.01em;
}

h4 {
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.42;
}

h1 em,
h2 em {
	font-style: italic;
	font-weight: 400;
}

b,
strong {
	font-weight: 600;
}

p {
	margin: 0 0 1rem;
}

p:last-child {
	margin-bottom: 0;
}

a {
	color: var(--blue);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

::selection {
	background: var(--tint-blue);
}

img {
	max-width: 100%;
	height: auto;
}

.wrap {
	width: min(100% - 2.5rem, var(--w));
	margin-inline: auto;
}

main.wrap {
	padding: 2rem 0 4rem;
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

.lead {
	font-size: 1.1rem;
	color: var(--gray);
	text-wrap: pretty;
}

.small {
	font-size: 0.9rem;
}

.muted {
	color: var(--gray);
}

.center {
	text-align: center;
}

.overline {
	display: block;
	font-size: 0.72rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--gray);
}

.overdue {
	color: var(--red);
	font-weight: 500;
}

.soon {
	color: var(--amber);
	font-weight: 500;
}

/* ---------- Header / footer ---------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	padding: 1rem 0;
	background: rgba(255, 255, 255, 0.85);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--line);
}

.bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.logo__img {
	display: block;
	height: 20px;
	width: auto;
}

.logo--login .logo__img {
	height: 24px;
	margin-inline: auto;
}

.bar__nav {
	display: flex;
	align-items: center;
	gap: 1.1rem;
	font-size: 0.95rem;
}

.bar__nav a {
	color: var(--ink);
	text-decoration: none;
}

.bar__nav a:hover {
	color: var(--blue);
}

.bar__user {
	color: var(--gray);
	font-size: 0.9rem;
}

.site-footer {
	border-top: 1px solid var(--line);
	padding: 1.5rem 0 2.5rem;
}

/* ---------- Buttons ---------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.85rem 1.7rem;
	border-radius: 999px;
	font-weight: 550;
	font-size: 0.82rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	text-decoration: none;
	border: 1px solid transparent;
	background: none;
	font-family: inherit;
	cursor: pointer;
	transition: background 0.12s ease, transform 0.12s ease, border-color 0.12s ease;
}

.btn:active {
	transform: scale(0.98);
}

.btn--primary {
	background: var(--blue);
	color: #fff;
}

.btn--primary:hover {
	background: var(--blue-dark);
}

.btn--ghost {
	color: var(--ink);
	border-color: #d2d2d7;
}

.btn--ghost:hover {
	border-color: var(--ink);
}

.btn--sm {
	padding: 0.6rem 1.2rem;
	font-size: 0.75rem;
}

.btn--xs {
	padding: 0.35rem 0.9rem;
	font-size: 0.7rem;
}

.btn[disabled] {
	opacity: 0.5;
	cursor: progress;
}

.btn-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	align-items: center;
	margin-top: 1rem;
}

/* ---------- Cards, grids, layout ---------- */

.card {
	border-radius: var(--radius);
	padding: 2rem 2.1rem;
	background: #fff;
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
}

.card--border {
	border: 1px solid var(--line);
}

.card--tint-blue {
	background: var(--tint-blue);
}

.card--tint-green {
	background: var(--tint-green);
}

.card--tint-cream {
	background: var(--tint-cream);
}

.card--tint-gray {
	background: var(--tint-gray);
}

.card--tint-red {
	background: var(--tint-red);
}

.grid {
	display: grid;
	gap: 1.5rem;
}

.grid--cards {
	grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
}

/* Wide cards: services and projects breathe instead of stacking. */
.grid--wide {
	grid-template-columns: repeat(auto-fit, minmax(26rem, 1fr));
}

@media (max-width: 58rem) {
	.grid--wide {
		grid-template-columns: 1fr;
	}
}

.stack {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.section {
	display: flex;
	flex-direction: column;
	gap: 1.15rem;
}

.section__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
}

.section__head h2 {
	margin: 0;
}

.hero {
	padding-top: 0.5rem;
}

.hero h1 {
	margin-bottom: 0.4rem;
}

.crumbs {
	color: var(--gray);
	display: flex;
	gap: 0.5rem;
}

.crumbs a {
	text-decoration: none;
}

.empty {
	text-align: center;
	padding: 3rem 2rem;
}

/* ---------- Stats ---------- */

.stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 1rem;
}

.stat {
	border-radius: var(--radius-sm);
	padding: 1.25rem 1.4rem;
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.stat__value {
	font-family: "Inter Tight", "Inter", sans-serif;
	font-size: 2rem;
	font-weight: 400;
	line-height: 1.05;
	letter-spacing: -0.02em;
}

/* ---------- Pills ---------- */

.pill {
	display: inline-block;
	padding: 0.15rem 0.65rem;
	border-radius: 999px;
	background: var(--tint-gray);
	color: var(--gray);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

.pill--done,
.pill--active {
	background: var(--tint-green);
	color: #3d6b1f;
}

.pill--in_progress,
.pill--review,
.pill--status {
	background: var(--tint-blue);
	color: var(--blue-dark);
}

.pill--prio-urgent {
	background: var(--tint-red);
	color: var(--red);
}

.pill--prio-high {
	background: #fdf3e3;
	color: var(--amber);
}

/* ---------- Project cards ---------- */

.project-card {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	text-decoration: none;
	color: inherit;
	transition: border-color 0.15s ease, transform 0.15s ease;
}

.project-card:hover {
	border-color: #c9cad0;
	transform: translateY(-2px);
}

.project-card h3 {
	margin: 0;
}

.project-card__meta {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
	margin: 0;
}

/* ---------- Lists ---------- */

.list {
	padding: 0.5rem 1.5rem;
}

.list__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.85rem 0;
	border-bottom: 1px solid var(--line);
	flex-wrap: wrap;
}

.list__row:last-child {
	border-bottom: 0;
}

.list__row a {
	text-decoration: none;
	font-weight: 400;
}

.list__row a:hover {
	text-decoration: underline;
}

.list__row span {
	display: block;
}

.list__side {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.rows {
	margin: 0.5rem 0 0;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.row {
	display: flex;
	gap: 0.75rem;
	justify-content: space-between;
	border-bottom: 1px dashed var(--line);
	padding-bottom: 0.35rem;
}

.row:last-child {
	border-bottom: 0;
}

.row dt {
	color: var(--gray);
	flex: 0 0 auto;
}

.row dd {
	margin: 0;
	text-align: right;
	word-break: break-word;
}

/* ---------- Task board ---------- */

.board {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.25rem;
	align-items: start;
}

@media (max-width: 60rem) {
	.board {
		grid-template-columns: 1fr;
	}
}

.board__col {
	display: flex;
	flex-direction: column;
	min-width: 0;
	background: var(--tint-gray);
	border-radius: var(--radius-sm);
	padding: 1rem;
}

.board__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
}

.board__title {
	margin: 0;
	font-size: 0.78rem;
	font-weight: 500;
	color: var(--gray);
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.board__count {
	background: #fff;
	border-radius: 999px;
	padding: 0.05rem 0.55rem;
	font-size: 0.75rem;
	color: var(--gray);
}

.board__hint {
	margin: 0.35rem 0 0;
}

.board__cards {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	margin-top: 0.9rem;
	min-height: 3rem;
}

.board__add {
	margin-top: 0.75rem;
	border: 1px dashed var(--line);
	background: none;
	border-radius: var(--radius-xs);
	padding: 0.55rem;
	color: var(--gray);
	font: inherit;
	font-size: 0.9rem;
	cursor: pointer;
}

.board__add:hover {
	border-color: var(--blue);
	color: var(--blue);
}

.board__note {
	margin-top: 1rem;
}

.task-card {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--radius-xs);
	padding: 0.8rem 0.9rem;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	cursor: pointer;
}

.task-card:hover {
	border-color: var(--blue);
}

.task-card:focus-visible {
	outline: 2px solid var(--blue);
	outline-offset: 2px;
}

.task-card__title {
	margin: 0;
	font-size: 0.98rem;
}

.task-card__excerpt {
	margin: 0;
}

.task-card__meta {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
	margin: 0;
	color: var(--gray);
}

.task-card__count {
	display: inline-flex;
	align-items: center;
	gap: 0.2rem;
}

.task-card--ghost {
	opacity: 0.35;
}

.task-card--dragging {
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
}

.icon {
	flex: none;
	vertical-align: -2px;
}

.comments {
	list-style: none;
	margin: 0.75rem 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.wpk-comment {
	background: var(--tint-gray);
	border-radius: var(--radius-xs);
	padding: 0.6rem 0.8rem;
}

.wpk-comment__meta {
	display: flex;
	gap: 0.5rem;
	font-size: 0.78rem;
	color: var(--gray);
}

.wpk-comment__body {
	font-size: 0.9rem;
}

.wpk-comment__body p {
	margin: 0.35rem 0 0;
}

/* ---------- Forms ---------- */

label {
	display: block;
	margin-bottom: 0.75rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
select,
textarea {
	width: 100%;
	padding: 0.7rem 0.9rem;
	border: 1px solid var(--line);
	border-radius: var(--radius-xs);
	background: #fff;
	font: inherit;
	font-size: 0.95rem;
	color: var(--ink);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible,
summary:focus-visible {
	outline: 2px solid var(--blue);
	outline-offset: 2px;
}

textarea {
	resize: vertical;
}

.request {
	border-radius: var(--radius-sm);
}

.comment-form textarea {
	font-size: 0.9rem;
}

.form__status--error {
	color: var(--red);
}

.form__status--ok {
	color: #3d6b1f;
}

.notice {
	border-radius: var(--radius-xs);
	padding: 0.7rem 1rem;
	font-size: 0.9rem;
}

.notice--error {
	background: var(--tint-red);
	color: var(--red);
}

/* ---------- Login ---------- */

.portal--login main.wrap {
	min-height: 70vh;
	justify-content: center;
}

.login {
	display: grid;
	place-items: center;
}

.login__card {
	width: min(100%, 27rem);
	padding: 2.5rem 2.25rem;
}

.login__card h1 {
	font-size: 1.6rem;
	margin-top: 1.25rem;
}

.login__card .login-submit input,
.login__card #wp-submit {
	width: 100%;
	padding: 0.85rem 1.7rem;
	border-radius: 999px;
	border: 0;
	background: var(--blue);
	color: #fff;
	font-family: inherit;
	font-size: 0.82rem;
	font-weight: 550;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	cursor: pointer;
}

.login__card .login-remember {
	font-size: 0.9rem;
	color: var(--gray);
}

.login__card .login-remember input {
	width: auto;
	margin-right: 0.4rem;
}

.login__or {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 1.25rem 0 0.75rem;
}

.login__or::before,
.login__or::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--line);
}

.btn--seznam {
	width: 100%;
	justify-content: center;
	background: #fff;
	color: var(--ink);
	border: 1px solid var(--line);
}

.btn--seznam:hover {
	border-color: var(--ink);
}

/* ---------- Vault and usage ---------- */

.vault__list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.vault__item {
	border-top: 1px solid var(--line);
	padding-top: 0.9rem;
}

.vault__item:first-child {
	border-top: 0;
	padding-top: 0;
}

.vault__item h3 {
	font-size: 1rem;
	margin: 0.15rem 0 0.3rem;
}

.vault__secret {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	flex-wrap: wrap;
	margin-top: 0.5rem;
}

.vault__value {
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	font-size: 0.9rem;
	background: var(--tint-gray);
	border-radius: var(--radius-xs);
	padding: 0.25rem 0.6rem;
	user-select: all;
	word-break: break-all;
}

.vault__value[data-empty] {
	background: none;
	padding: 0;
}

.vault__hint {
	border-top: 1px solid var(--line);
	padding-top: 0.75rem;
	margin: 0;
}

.usage {
	margin-top: 0.5rem;
}

.usage__bar {
	display: block;
	height: 6px;
	border-radius: 999px;
	background: var(--tint-gray);
	overflow: hidden;
}

.usage__fill {
	display: block;
	height: 100%;
	background: var(--blue);
	border-radius: 999px;
}

.usage__fill--warn {
	background: #d99a1f;
}

.usage__fill--over {
	background: var(--red);
}

.usage__label {
	margin: 0.35rem 0 0;
	color: var(--gray);
}

/* ---------- Motion ---------- */

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

/* ---------- Page head and subpage tabs ---------- */

.page-head {
	padding: 1.75rem 0 1.25rem;
	border-bottom: 1px solid var(--line);
	margin-bottom: 1.75rem;
}

.page-head__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
}

.page-head h1 {
	margin: 0.35rem 0 0;
	font-size: clamp(1.7rem, 3.6vw, 2.1rem);
}

.page-head__meta {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
	margin: 0.5rem 0 0;
}

.page-head__meta > * + *::before {
	content: "·";
	margin-right: 0.75rem;
	color: var(--line);
}

.tabs {
	display: flex;
	gap: 0.35rem;
	flex-wrap: wrap;
	margin-top: 1.25rem;
}

.tabs__link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.4rem 0.85rem;
	border-radius: 999px;
	color: var(--gray);
	font-size: 0.92rem;
	text-decoration: none;
}

.tabs__link:hover {
	background: var(--tint-gray);
	color: var(--ink);
}

.tabs__link.is-active {
	background: var(--ink);
	color: #fff;
}

.tabs__count {
	font-size: 0.78rem;
	opacity: 0.7;
}

/* ---------- Dialog ---------- */

body.is-modal-open {
	overflow: hidden;
}

.modal {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 4vh 1rem;
	overflow-y: auto;
}

.modal[hidden] {
	display: none;
}

.modal__overlay {
	position: fixed;
	inset: 0;
	background: rgba(29, 29, 31, 0.45);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
}

.modal__box {
	position: relative;
	z-index: 1;
	width: min(100%, 46rem);
	background: #fff;
	border-radius: var(--radius-sm);
	padding: 1.9rem 2rem;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

.modal__box--narrow {
	width: min(100%, 32rem);
}

.modal__close {
	position: absolute;
	top: 0.75rem;
	right: 0.9rem;
	border: 0;
	background: none;
	font-size: 1.6rem;
	line-height: 1;
	color: var(--gray);
	cursor: pointer;
}

.modal__close:hover {
	color: var(--ink);
}

.detail__head {
	border-bottom: 1px solid var(--line);
	padding-bottom: 1rem;
	margin-bottom: 1.1rem;
}

.detail__badges {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
	margin: 0 0 0.5rem;
}

.detail__head h2 {
	margin: 0 0 0.3rem;
}

.detail__actions {
	margin-top: 0.9rem;
}

.detail__desc {
	color: var(--gray);
}

.detail__section {
	border-top: 1px solid var(--line);
	margin-top: 1.25rem;
	padding-top: 1.1rem;
}

.detail__section h3 {
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--gray);
	margin-bottom: 0.7rem;
}

/* ---------- Attachments ---------- */

.files {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

.files:empty {
	display: none;
}

.file {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	max-width: 100%;
	padding: 0.4rem 0.7rem;
	border: 1px solid var(--line);
	border-radius: var(--radius-xs);
	color: var(--ink);
	text-decoration: none;
}

.file:hover {
	border-color: var(--blue);
	color: var(--blue);
}

.file--image {
	flex-direction: column;
	align-items: flex-start;
	padding: 0.4rem;
}

.file--image img {
	max-height: 8rem;
	border-radius: 0.5rem;
}

.file__name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 14rem;
}

.upload {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	margin-top: 0.75rem;
	cursor: pointer;
}

/* ---------- Live timer ---------- */

.timer {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.3rem 0.4rem 0.3rem 0.7rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: #fff;
}

.timer[hidden] {
	display: none;
}

.timer__dot {
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	background: var(--red);
	animation: wpk-pulse 1.6s ease-in-out infinite;
}

.timer__clock {
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	font-size: 0.88rem;
}

.timer__label {
	max-width: 12rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: var(--gray);
}

.timer-start.is-running {
	background: var(--tint-blue);
	border-color: var(--blue);
	color: var(--blue);
}

@keyframes wpk-pulse {
	0%,
	100% {
		opacity: 1;
	}

	50% {
		opacity: 0.25;
	}
}

/* ---------- Toast ---------- */

.toast {
	position: fixed;
	left: 50%;
	bottom: 1.5rem;
	transform: translateX(-50%);
	z-index: 120;
	background: var(--ink);
	color: #fff;
	border-radius: 999px;
	padding: 0.6rem 1.2rem;
	font-size: 0.92rem;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.toast[hidden] {
	display: none;
}

.toast--error {
	background: var(--red);
}

/* ---------- Home alerts ---------- */

.page-head--home {
	border-bottom: 0;
	padding-bottom: 0.5rem;
	margin-bottom: 0.5rem;
}

.alerts {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.alert {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.9rem 1.3rem;
	border-radius: var(--radius-sm);
	background: var(--tint-blue);
	color: var(--ink);
	text-decoration: none;
	font-size: 0.95rem;
}

.alert--warn {
	background: var(--tint-cream);
}

.alert:hover {
	color: var(--blue);
}

.alert__go {
	opacity: 0.5;
}

.badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.25rem;
	height: 1.25rem;
	padding: 0 0.35rem;
	margin-left: 0.35rem;
	border-radius: 999px;
	background: var(--blue);
	color: #fff;
	font-size: 0.72rem;
	font-weight: 500;
}

.badge--warn {
	background: var(--amber);
}

.badge--dot {
	background: var(--blue);
	margin-left: 0;
}

.bar__link {
	display: inline-flex;
	align-items: center;
}

/* ---------- Announcements ---------- */

.notice-item {
	border-left: 3px solid var(--line);
}

.notice-item.is-unread {
	border-left-color: var(--blue);
}

.notice-item--important {
	border-left-color: var(--amber);
}

.notice-item--warning {
	border-left-color: var(--red);
}

.notice-item__meta {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	flex-wrap: wrap;
	margin: 0;
}

.notice-item h2 {
	margin: 0;
	font-size: 1.25rem;
}

.prose p:last-child {
	margin-bottom: 0;
}

.pill--level-important {
	background: var(--tint-cream);
	color: var(--amber);
}

.pill--level-warning {
	background: var(--tint-red);
	color: var(--red);
}

/* ---------- Contracts ---------- */

.contract__meta {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	flex-wrap: wrap;
	margin: 0;
}

.contract h2 {
	margin: 0;
	font-size: 1.25rem;
}

.contract--pending {
	border-color: var(--amber);
	background: #fffdf8;
}

.contract__actions {
	margin-top: 0.3rem;
}

/* ---------- Services ---------- */

.service-card__meta {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	flex-wrap: wrap;
	margin: 0;
}

.service-card__price {
	font-weight: 500;
}

.service-card--job {
	background: var(--tint-gray);
	border-color: transparent;
}

/* ---------- One-off jobs ---------- */

.job {
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	padding: 1.6rem 1.8rem;
	gap: 0.8rem;
}

.job__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
}

.job__head h2 {
	margin: 0.1rem 0 0;
	font-size: 1.3rem;
}

.job__meta {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0;
}

.job__price {
	font-weight: 500;
	color: var(--ink);
}

.job__progress {
	height: 4px;
	border-radius: 999px;
	background: var(--line);
	overflow: hidden;
}

.job__progress span {
	display: block;
	height: 100%;
	background: var(--blue);
}

.job__count {
	margin: 0;
}

.job__tasks {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.task-row {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.7rem 0.9rem;
	border: 1px solid var(--line);
	border-radius: var(--radius-xs);
	background: #fff;
	cursor: pointer;
}

.task-row:hover {
	border-color: var(--blue);
}

.task-row__state {
	flex: none;
	width: 0.85rem;
	height: 0.85rem;
	border-radius: 50%;
	border: 1.5px solid var(--line);
}

.task-row--in_progress .task-row__state {
	border-color: var(--blue);
	background: var(--tint-blue);
}

.task-row--done .task-row__state {
	border-color: var(--blue);
	background: var(--blue);
}

.task-row--done .task-row__title {
	color: var(--gray);
	text-decoration: line-through;
	text-decoration-thickness: 1px;
}

.task-row__title {
	flex: 1;
	min-width: 0;
}

.task-row__meta {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex: none;
}

.board__actions {
	margin-top: 0.5rem;
}

.staff-only {
	color: var(--blue);
}

.pill--retainer {
	background: var(--tint-blue);
	color: var(--blue);
}

/* ---------- Management ---------- */

.manage-layout {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(18rem, 1fr);
	gap: 1.5rem;
	align-items: start;
}

@media (max-width: 62rem) {
	.manage-layout {
		grid-template-columns: 1fr;
	}
}

.manage-side {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.manage-side h2,
.manage-tile h2 {
	font-size: 1.05rem;
	margin: 0;
}

.manage-tile {
	gap: 0.5rem;
}

.fields-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
	gap: 1rem;
}

.field {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	min-width: 0;
}

.field--textarea,
.field--kv {
	grid-column: 1 / -1;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="url"],
.field input[type="tel"],
.field input[type="date"],
.field input[type="number"],
.field input[type="password"],
.field select,
.field textarea,
.manage-form input[type="text"],
.manage-form textarea {
	width: 100%;
	font: inherit;
	font-size: 0.95rem;
	padding: 0.55rem 0.7rem;
	border: 1px solid var(--line);
	border-radius: var(--radius-xs);
	background: #fff;
	color: var(--ink);
}

.field select[multiple] {
	padding: 0.3rem;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
	outline: 2px solid var(--blue);
	outline-offset: 1px;
	border-color: transparent;
}

.field__kv {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.field__kv-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	gap: 0.4rem;
}

.field__check {
	padding: 0.35rem 0;
}

.check {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	padding: 0.25rem 0;
	font-size: 0.95rem;
}

.manage-form {
	gap: 1.25rem;
}

.manage-user .page-head__row {
	align-items: baseline;
}

.btn.danger {
	color: var(--red);
	border-color: var(--line);
}

.btn.danger:hover {
	border-color: var(--red);
}

.key-notice {
	border: 1px solid var(--amber);
}

.key-notice__key {
	display: inline-block;
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	font-size: 1.15rem;
	letter-spacing: 0.06em;
	background: #fff;
	border-radius: var(--radius-xs);
	padding: 0.5rem 0.9rem;
	user-select: all;
}

.notice--ok {
	background: var(--tint-green);
	border-radius: var(--radius-xs);
	padding: 0.7rem 1rem;
}

.pill--draft {
	background: var(--tint-cream);
	color: var(--amber);
}

.bar__link--manage {
	font-weight: 500;
}

.service-card--addon {
	background: var(--tint-gray);
	border-color: transparent;
}

.service-card--addon .service-card__price {
	font-weight: 400;
}
