/* Onefold client portal: light, calm, the site's own colours and type. Loaded only on the portal page. */

.ofp-main {
	padding-block: clamp(32px, 5vw, 64px) clamp(48px, 7vw, 96px);
}

/* The "Start a project" band does not belong in a client's portal. */
.elementor .of-footer-cta {
	display: none;
}

.elementor .of-footer {
	padding-top: 0;
}

.ofp {
	--ofp-line: var(--of-color-border, #E3E6F0);
	--ofp-muted: var(--of-color-muted, #4A5068);
	display: grid;
	gap: 20px;
	color: var(--of-color-text, #0B1020);
}

.ofp h1,
.ofp h2,
.ofp h3,
.ofp h4,
.ofp p {
	margin: 0;
}

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

.ofp-small {
	font-size: 0.875rem;
}

.ofp-card {
	display: grid;
	gap: 14px;
	padding: clamp(20px, 3vw, 28px);
	border: 1px solid var(--of-glass-border, rgba(255, 255, 255, 0.85));
	border-radius: var(--of-radius-lg, 24px);
	background: var(--of-color-surface, #FFFFFF);
	box-shadow: var(--of-shadow, 0 12px 32px rgba(11, 16, 32, 0.06));
}

.ofp-narrow {
	max-width: 480px;
	margin-inline: auto;
}

.ofp-preview {
	padding: 10px 16px;
	border-radius: 12px;
	background: #FFF4D6;
	color: #6B4E00;
	font-weight: 600;
}

/* Top bar */
.ofp-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: flex-end;
	justify-content: space-between;
}

.ofp-eyebrow {
	color: var(--of-color-violet, #6C5CE7);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.ofp-hello {
	font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
	letter-spacing: -0.03em;
}

.ofp-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.ofp-nav a {
	padding: 9px 16px;
	border-radius: 999px;
	color: var(--of-color-text, #0B1020);
	font-weight: 600;
	text-decoration: none;
	box-shadow: inset 0 0 0 1px var(--ofp-line);
}

.ofp-nav a[aria-current="page"] {
	background: rgba(108, 92, 231, 0.1);
	color: #3F34A8;
	box-shadow: none;
}

/* Projects */
.ofp-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 20px;
}

.ofp-project {
	color: inherit;
	text-decoration: none;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.ofp-project:hover {
		box-shadow: var(--of-glow, 0 20px 60px rgba(108, 92, 231, 0.18));
		transform: translateY(-2px);
	}
}

.ofp-project:focus-visible {
	outline: 3px solid var(--of-color-violet, #6C5CE7);
	outline-offset: 3px;
}

.ofp-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	justify-content: space-between;
}

.ofp-title {
	font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem);
	letter-spacing: -0.02em;
}

.ofp-more {
	color: var(--of-color-link, #5B4BD8);
	font-weight: 700;
}

.ofp-status {
	display: inline-block;
	padding: 3px 12px;
	border-radius: 999px;
	background: #EEF0F6;
	font-size: 0.8125rem;
	font-weight: 700;
	white-space: nowrap;
}

.ofp-status--planning { background: #EDEBFF; color: #4B3BC9; }
.ofp-status--in_progress { background: #E6F4FF; color: #0B5A8C; }
.ofp-status--review { background: #FFF4D6; color: #6B4E00; }
.ofp-status--on_hold { background: #F1F1F4; color: #4A5068; }
.ofp-status--completed { background: #DDF5E7; color: #0D5B33; }

.ofp-progress {
	display: grid;
	gap: 6px;
}

.ofp-progress__bar {
	display: block;
	height: 10px;
	overflow: hidden;
	border-radius: 999px;
	background: #EEF0F6;
}

.ofp-progress__bar > span {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: var(--of-gradient, linear-gradient(135deg, #6C5CE7, #00C2FF));
}

.ofp-progress__text {
	color: var(--ofp-muted);
	font-size: 0.9375rem;
}

.ofp-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 28px;
	margin: 0;
}

.ofp-facts dt {
	color: var(--ofp-muted);
	font-size: 0.8125rem;
	font-weight: 600;
}

.ofp-facts dd {
	margin: 2px 0 0;
	font-weight: 600;
}

.ofp-columns {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	align-items: start;
}

/* Steps */
.ofp-steps,
.ofp-updates,
.ofp-files {
	display: grid;
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ofp-step {
	display: grid;
	grid-template-columns: 18px 1fr;
	gap: 12px;
	align-items: start;
}

.ofp-step__dot {
	width: 16px;
	height: 16px;
	margin-top: 4px;
	border: 2px solid #C9CDE0;
	border-radius: 50%;
	background: #FFFFFF;
}

.ofp-step.is-in_progress .ofp-step__dot {
	border-color: var(--of-color-violet, #6C5CE7);
	box-shadow: inset 0 0 0 3px #FFFFFF;
	background: var(--of-color-violet, #6C5CE7);
}

.ofp-step.is-done .ofp-step__dot {
	border-color: #12805C;
	background: #12805C;
}

.ofp-step__state {
	color: var(--ofp-muted);
	font-size: 0.8125rem;
	font-weight: 600;
}

.ofp-updates > li {
	padding-left: 14px;
	border-left: 3px solid rgba(108, 92, 231, 0.3);
}

.ofp-files a {
	font-weight: 600;
}

/* Forms */
.ofp-form fieldset {
	display: grid;
	gap: 12px;
	margin: 0;
	padding: 0;
	border: 0;
}

.ofp-form p,
.ofp #ofp-login p {
	display: grid;
	gap: 6px;
}

.ofp-form label,
.ofp #ofp-login label {
	font-size: 0.9375rem;
	font-weight: 600;
}

.ofp input[type="text"],
.ofp input[type="email"],
.ofp input[type="tel"],
.ofp input[type="password"],
.ofp textarea {
	width: 100%;
	min-height: 46px;
	padding: 11px 14px;
	border: 1px solid var(--ofp-line);
	border-radius: 12px;
	background: #FFFFFF;
	color: var(--of-color-text, #0B1020);
	font: inherit;
	font-size: 1rem;
}

.ofp input[readonly] {
	background: #F4F5FA;
	color: var(--ofp-muted);
}

.ofp input:focus-visible,
.ofp textarea:focus-visible {
	border-color: var(--of-color-violet, #6C5CE7);
	outline: 3px solid rgba(108, 92, 231, 0.25);
}

.ofp #ofp-login .login-remember label {
	display: flex;
	gap: 8px;
	align-items: center;
	font-weight: 400;
}

.ofp #ofp-login .button-primary,
.ofp-form button {
	justify-self: start;
}

.ofp #ofp-login .button-primary {
	min-height: 48px;
	padding: 0.75em 1.8em;
	border: 0;
	border-radius: 999px;
	background: var(--of-gradient-strong, linear-gradient(135deg, #6C5CE7, #2F6FE4));
	color: #FFFFFF;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.ofp-form fieldset:disabled {
	opacity: 0.6;
}

.ofp-notice {
	padding: 12px 16px;
	border-radius: 12px;
	font-weight: 600;
}

.ofp-notice.is-ok {
	background: #E7F7EE;
	color: #10593A;
}

.ofp-notice.is-error {
	background: #FCECEE;
	color: #8E1F33;
}

@media (max-width: 767px) {
	.ofp-columns {
		grid-template-columns: 1fr;
	}

	.ofp-bar {
		align-items: flex-start;
	}
}

/* Support */
.ofp-tstatus--open { background: #EDEBFF; color: #4B3BC9; }
.ofp-tstatus--waiting { background: #FFF4D6; color: #6B4E00; }
.ofp-tstatus--resolved { background: #DDF5E7; color: #0D5B33; }
.ofp-tstatus--closed { background: #F1F1F4; color: #4A5068; }

.ofp-new > summary {
	display: inline-flex;
	list-style: none;
	cursor: pointer;
}

.ofp-new > summary::-webkit-details-marker {
	display: none;
}

.ofp-new[open] > summary {
	margin-bottom: 16px;
}

.ofp select {
	width: 100%;
	min-height: 46px;
	padding: 10px 12px;
	border: 1px solid var(--ofp-line);
	border-radius: 12px;
	background: #FFFFFF;
	font: inherit;
	font-size: 1rem;
}

.ofp-tickets,
.ofp-thread {
	display: grid;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ofp-tickets > li {
	padding-bottom: 12px;
	border-bottom: 1px solid var(--ofp-line);
}

.ofp-tickets > li:last-child {
	border-bottom: 0;
}

.ofp-msg {
	max-width: 88%;
	padding: 12px 16px;
	border-radius: 16px;
	background: #F4F5FA;
}

.ofp-msg.is-team {
	justify-self: start;
	background: rgba(108, 92, 231, 0.08);
}

.ofp-msg.is-client {
	justify-self: end;
}

.ofp-msg p + p {
	margin-top: 6px;
}

@media (max-width: 767px) {
	.ofp-msg {
		max-width: 100%;
	}
}

/* Quotes and invoices */
.ofp-dstatus--sent { background: #FFF4D6; color: #6B4E00; }
.ofp-dstatus--accepted, .ofp-dstatus--paid { background: #E7F7EE; color: #10593A; }
.ofp-dstatus--rejected, .ofp-dstatus--cancelled, .ofp-dstatus--expired { background: #F1F1F4; color: #5A6075; }
.ofp-dstatus--issued, .ofp-dstatus--partial { background: #E6F4FF; color: #0B5A8C; }
.ofp-dstatus--credited, .ofp-dstatus--credit { background: #EDEBFF; color: #4B3BC9; }
.ofp-dstatus--overdue { background: #FCECEE; color: #8E1F33; }

.ofp-tablewrap { overflow-x: auto; }
.ofp-docs { width: 100%; border-collapse: collapse; font-size: 15px; }
.ofp-docs th { padding: 8px 10px; border-bottom: 2px solid #E3E6F0; color: #5A6075; font-size: 13px; font-weight: 600; text-align: left; }
.ofp-docs td { padding: 12px 10px; border-bottom: 1px solid #E3E6F0; vertical-align: top; }
.ofp-num { text-align: right !important; white-space: nowrap; }

.ofp-owed__sum { margin: 4px 0 6px; font-size: 26px; font-weight: 700; color: #0B1020; }
.ofp-owed__line { margin: 12px 0 0; font-weight: 700; }
.ofp-docbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.ofp-answer { border: 2px solid #6C5CE7; }
.ofp-check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.ofp-check input { width: auto; margin-top: 4px; }
.ofp-decline summary { cursor: pointer; color: #5A6075; }
.ofp-payments { margin: 0 0 8px; padding: 0; list-style: none; }
.ofp-payments li { padding: 8px 0; border-bottom: 1px solid #E3E6F0; }
.ofp-paperwrap { margin-top: 16px; }
.ofp-paperwrap .ofa-paper { max-width: none; }

@media (max-width: 640px) {
	.ofp-docs { font-size: 14px; }
	.ofp-owed__sum { font-size: 22px; }
	.ofp-paperwrap .ofa-paper__items th:nth-child(3), .ofp-paperwrap .ofa-paper__items td:nth-child(3),
	.ofp-paperwrap .ofa-paper__items th:nth-child(4), .ofp-paperwrap .ofa-paper__items td:nth-child(4) { display: none; }
}
.ofp-badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: #6C5CE7; color: #FFFFFF; font-size: 12px; line-height: 20px; text-align: center; }

/* Bigger tick boxes, easier to tap on a phone. */
.ofp-check input[type="checkbox"] { flex: none; width: 20px; height: 20px; vertical-align: -4px; }

/* Page titles are h1 for screen readers, sized like the card titles they replaced. */
.ofp-pagetitle { font-size: var(--of-text-h2, 1.75rem); }

/* Phase D: login messages, payment states, login card. */
.ofp-alert { margin: 0 0 14px; padding: 12px 16px; border-radius: 12px; background: #FCECEE; color: #8E1F33; font-weight: 600; }
.ofp-dstatus--issued { background: #FCECEE; color: #8E1F33; }
.ofp-dstatus--partial { background: #FFF4D6; color: #6B4E00; }
.ofp-owed__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.ofp-owed__paid { color: #0D7A45; }
.ofp-narrow:has(#ofp-login) { position: relative; overflow: hidden; padding-top: clamp(28px, 4vw, 36px); }
.ofp-narrow:has(#ofp-login)::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--of-gradient, linear-gradient(135deg, #6C5CE7, #00C2FF)); }
.ofp #ofp-login { display: grid; gap: 14px; }
.ofp #ofp-login .button-primary { width: 100%; justify-self: stretch; }
