/* ─────────────────────────────────────────────────
   Foundry: Briefr — Family UI (Planr/Projctr/Taskr parity)
   Includes modal sheet animations (vertical + horizontal)
   ───────────────────────────────────────────────── */

/* THEME TOKENS (reduced set derived from your provided CSS) */
html[data-theme="lt"] {
	--ink: #1c1f26;
	--ink2: #f3f5f2;
	--muted: #666;
	--line: rgba(0, 0, 0, .1);
	--panel: rgba(255, 255, 255, 1);
	--bg: #f8f9fb;
	--brand1: #2253f4;
	--brand2: #5a78ff;
	--round: 16px;
	--btnmute: rgba(0, 0, 0, 0.08);
	--input: rgba(0, 0, 0, 0.04);
	--prg: rgba(255, 255, 255, 0.06);
	--trhover: rgba(0, 0, 0, 0.06);
}

html[data-theme="dk"] {
	--ink: #f3f5f2;
	--ink2: #1c1f26;
	--muted: #a9b1c6;
	--line: rgba(255, 255, 255, .12);
	--panel: linear-gradient(180deg, rgba(20, 24, 36, .96), rgba(16, 20, 32, .96));
	--bg: #0d1016;
	--brand1: #2253f4;
	--brand2: #5a78ff;
	--round: 16px;
	--btnmute: rgba(255, 255, 255, 0.08);
	--input: rgba(255, 255, 255, 0.06);
	--prg: #f3f5f2;
	--trhover: rgba(255, 255, 255, 0.06);
}

* {
	box-sizing: border-box
}

html,
body {
	height: 100%;
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 300 14px var(--font-ui);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

#app {
	display: flex;
	flex-direction: column;
	min-height: 100vh
}

/* Titlebar */
.app-titlebar {
	position: sticky;
	top: 0;
	z-index: 99;
	background: var(--brand1);
	padding: 12px 18px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.app-titlebar h1 {
	margin: 0;
	font-size: 26px;
	font-weight: 400;
	color: #f3f5f2;
	letter-spacing: -0.01em;
font-family: var(--font-title);
}

.app-titlebar .app-logo {
	height: 20px;
	width: auto;
	display: block;
}

/* Toolbar */
.toolbar {
	position: sticky;
	top: 0;
	z-index: 100;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	padding: 14px 18px;
	background: var(--brand1);
	backdrop-filter: blur(22px) saturate(160%);
	height: 120px;
	color: #fff;
}

.toolbar .left,
.toolbar .right {
	display: flex;
	align-items: center;
	gap: 10px;
}

.sep {
	width: 1px;
	height: 24px;
	background: #f3f5f2;
	opacity: .6;
	margin: 0 6px;
}

#refreshBtn {
	color: #f3f5f2;
}

/* Buttons */
.btn {
	height: 34px;
	border-radius: 999px;
	border: none;
	padding: 0 12px;
	cursor: pointer;
	font-size: 13px;
	background: rgba(0, 0, 0, .08);
	color: var(--ink);
	align-content: center;
}

.btn.brand {
	background: var(--brand1);
	color: #fff;
	border: 0;
}

.btn:hover {
	filter: brightness(1.06);
}

.save-check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	margin-left: 8px;
	border-radius: 50%;
	font-weight: 700;
	font-size: 14px;
	color: #9aa4bd;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.12);
	/* ✨ Remove all glow from the idle state */
	box-shadow: none;
	transition: all 0.12s ease;
	opacity: 0.65;
}

.save-check.saved {
	background: rgba(48, 209, 120, 0.25);
	color: #30d158;
	border-color: rgba(48, 209, 120, 0.45);
	box-shadow: 0 0 8px rgba(48, 209, 120, 0.4);
	opacity: 1;
}

/* Buttons: anchors look like buttons + outline variant */
.btn,
.btn:link,
.btn:visited {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
}

.btn.outline {
	background: transparent;
	border: 1px solid var(--line);
	color: var(--ink);
}

html[data-theme="lt"] .btn.outline:hover {
	background: rgba(0, 0, 0, 0.06);
}

html[data-theme="dk"] .btn.outline:hover {
	background: rgba(255, 255, 255, 0.08);
}

/* Delete pill */

#deleteBtn {
	height: 34px;
	border-radius: 999px;
	border: none;
	padding: 0 12px;
	cursor: pointer;
	font-size: 13px;
	background: rgba(255, 95, 111, 0.7);
	color: #f3f5f2;
	align-content: center;
}

#deleteBtn:hover {
	background: rgba(255, 95, 111, 1);
}

/* Optional: empty state (matches Projects) */
.projects-empty {
	text-align: center;
	padding: 40px;
	color: var(--muted);
	font-style: italic;
	background: rgba(255, 255, 255, 0.02);
	border-radius: var(--round);
}

/* View Toggle (glass pill) */
.view-toggle {
	display: inline-flex;
	background: rgba(0, 0, 0, 0.06);
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 50px;
	padding: 4px;
	backdrop-filter: blur(12px);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.view-toggle .toggle-btn {
	font-size: 13px;
	font-weight: 400;
	padding: 8px 20px;
	background: transparent;
	border: none;
	color: #f3f5f2;
	cursor: pointer;
	border-radius: 50px;
	transition: all .25s ease;
}

.view-toggle .toggle-btn.active {
	background: var(--brand1);
	color: #fff;
	box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}

.small {
	font-size: 16px;
	color: var(--ink);
	line-height: 14px !important;
}

/* === Theme Toggle UI (shared) === */
.theme-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 0;
}

.theme-toggle .label {
	font-size: 14px;
	font-weight: 400;
	color: var(--ink);
}

.theme-toggle .toggle-pill {
	width: 48px;
	height: 26px;
	border-radius: 999px;
	border: 1px solid var(--ink);
	background: var(--brand1);
	position: relative;
	cursor: pointer;
	transition: background 0.25s ease, border-color 0.25s ease;
}

/* Knob */
.theme-toggle .toggle-pill::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #f3f5f2;
	transition: transform 0.25s ease, background 0.25s ease;
}

.theme-toggle .toggle-pill.active::after {
	transform: translateX(22px);
}

#autoToggle {
	border: 1px solid #f3f5f2;
}

#autoToggleLabel {
	color: #f3f5f2;
}

#autoToggle::after {
	background: #f3f5f2;
}

/* ── Auto-refresh pill ONLY ─────────────────────────── */
#autoToggle {
	/* off state matches theme neutrals */
	border: 1px solid #f3f5f2);
	background: rgba(0, 0, 0, 0.08);
	transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}

html[data-theme="dk"] #autoToggle {
	background: rgba(255, 255, 255, 0.08);
}

/* on / active — your own color without touching other toggles */
#autoToggle.active {
	border: 1px solid #f3f5f2;
	background: rgb(16, 185, 129);
}

/* knob position for this pill (if your global CSS doesn't already do it) */
#autoToggle::after {
	/* keep the default knob look; ensure it exists in base rules */
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	transition: transform .25s ease;
}

#autoToggle.active::after {
	transform: translateX(22px);
}

/* Modals (family look) */
.modal {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 30;
	background: rgba(10, 12, 18, 0.1);
	backdrop-filter: blur(28px) saturate(180%);
}

.modal.show {
	display: flex;
}

.modal .scrim {
	position: absolute;
	inset: 0;
}

.modal .card {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 640px;
	min-width: 640px;
	max-width: 92vw;
	transform: translate(-50%, -50%);
	will-change: transform, opacity;
	backface-visibility: hidden;
	background: var(--panel);
	border-radius: var(--round);
}

.modal {
	overflow: hidden;
}

#stClose.btn {
	background: var(--btnmute);
}

@media (max-width: 720px) {
	.modal .card {
		width: 92vw;
		min-width: auto;
	}
}

.card header {
	padding: 22px 24px;
	border-bottom: 1px solid var(--line);
	font-weight: 400;
	font-size: 20px;
}

.card section {
	padding: 20px;
	display: grid;
	gap: 14px;
}

.card footer {
	padding: 16px 20px;
	display: flex;
	justify-content: flex-end;
	gap: 10px;
}

/* Fields */
.field label {
	display: block;
	margin: 0 0 6px;
	font-size: 12px;
	font-weight: 400;
	color: var(--muted);
}

.field input,
.field select,
.field textarea {
	height: 42px;
	border-radius: 12px;
	background: var(--input);
	color: var(--ink);
	font-size: 15px;
	padding: 0 14px;
	box-sizing: border-box;
	width: 100%;
	border: var(--line);
}

.field textarea {
	border: none;
	background: var(--input);
	font-size: 15px;
	line-height: 1.5;
	font-family: var(--font-ui);
	color: var(--ink);
	border-radius: 12px;
	box-sizing: border-box;
	outline: none;
	height: 120px;
	Padding: 10px 14px;
}

/* Toast */
.toast {
	position: fixed;
	left: 50%;
	bottom: 40px;
	transform: translateX(-50%) translateY(20px);
	background: rgba(19, 24, 36, 0.95);
	color: #fff;
	padding: 14px 22px;
	border-radius: 14px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	backdrop-filter: blur(14px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
	opacity: 0;
	pointer-events: none;
	transition: opacity .35s ease, transform .35s ease;
	z-index: 99;
}

.toast.show {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
	pointer-events: auto;
}

/* Vertical-only transitions (enter from bottom → leave to top) */
.card.anim-enter-from-bottom {
	animation: br-enter-up .32s cubic-bezier(.22, 1, .36, 1) both;
}

.card.anim-leave-to-top {
	animation: br-leave-up .22s cubic-bezier(.4, 0, .2, 1) both;
}

@keyframes br-enter-up {
	from {
		transform: translate(-50%, calc(-50% + 64px));
		opacity: 0;
	}

	to {
		transform: translate(-50%, -50%);
		opacity: 1;
	}
}

@keyframes br-leave-up {
	from {
		transform: translate(-50%, -50%);
		opacity: 1;
	}

	to {
		transform: translate(-50%, calc(-50% - 56px));
		opacity: 0;
	}
}

@media (prefers-reduced-motion: reduce) {

	.card.anim-enter-from-bottom,
	.card.anim-leave-to-top {
		animation: none !important;
	}
}

/* Status pills for Studio list */
.status-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 12px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(255, 255, 255, 0.06);
}

html[data-theme="lt"] .status-pill {
	border-color: rgba(0, 0, 0, 0.1);
	background: rgba(0, 0, 0, 0.05);
}

.status-new {
	color: #0A84FF;
}

.status-approved {
	color: #30D158;
}

.status-archived {
	color: #8E8E93;
}

/* Two-column grid helper (reuses family spacing) */
.grid-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.card.pad {
	padding: 14px;
}

/* Searchbar (family look) */
.searchbar {
	height: 42px;
	min-width: 280px;
	padding: 0 12px;
	border-radius: 999px;
	border: none;
	color: var(--ink);
	background: rgba(0, 0, 0, 0.08);
	font-size: 14px;
}

html[data-theme="lt"] .searchbar {
	background: rgba(0, 0, 0, 0.06);
}

/* ----- Inbox grid width (give Read panel more room) ----- */
.inbox-grid {
	display: grid;
	gap: 14px;
	padding: 14px;
}

.inbox-grid--roomy {
	grid-template-columns: minmax(520px, 1fr) minmax(500px, 620px);
}

@media (min-width: 1440px) {
	.inbox-grid--roomy {
		grid-template-columns: minmax(640px, 1fr) minmax(560px, 720px);
	}
}

/* ----- Fixed table layout so columns don't jump ----- */
.projects.projects-fixed {
	table-layout: fixed;
	width: 100%;
}

.projects.projects-fixed thead th,
.projects.projects-fixed tbody td {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	text-align: left;
	font-weight: 400;
	font-size: 15px;
}

.projects.projects-fixed t:hover {
	Background: var(--trhover)
}

/* Column widths via colgroup (uniform across filters) */
.col-project {
	width: 45%;
}

.col-contact {
	width: 27%;
}

.col-created {
	width: 18%;
}

.col-status {
	width: 10%;
}

/* inbox rows */
.inbox-table .row,
#inboxTable tbody tr {
	border-bottom: 1px solid var(--line);
}

.projects.projects-fixed thead th {
	border-bottom: 1px solid var(--line);
	padding-bottom: 16px;
	margin-bottom: 32px;
}

.projects.projects-fixed tbody tr {
	margin: 8px 0;
}

#emptyState {
	padding: 16px 0;
}

h3#dTitle {
	font-weight: 400;
	font-size: 20px;
	margin: 0;
	color: var(--brand1);
}

/* ── Studio Inbox: spacing + hover (theme-aware) ───────────────────── */

#list {
	width: 100%;
	border-collapse: separate;
	/* allow rounded hover if desired */
	border-spacing: 0;
}

#list th,
#list td {
	padding: 14px 18px;
	/* breathing room */
	line-height: 1.45;
	vertical-align: middle;
	/*  border-bottom: 1px solid var(--line); */
}

@media (min-width: 1280px) {

	#list th,
	#list td {
		padding: 16px 20px;
	}
}

/* Clickable rows + smooth hover */
#list tbody tr {
	cursor: pointer;
	transition: background 0.18s ease, box-shadow 0.18s ease;
}

/* Light theme hover */
html[data-theme="lt"] #list tbody tr:hover {
	background: rgba(0, 0, 0, 0.03);
}

/* Dark theme hover */
html[data-theme="dk"] #list tbody tr:hover {
	background: rgba(255, 255, 255, 0.04);
}

/* Selected row — fallback first… */
#list tbody tr.selected {
	background: rgba(90, 120, 255, 0.12);
	/* fallback if color-mix unsupported */
}

/* …then theme-aware mix if supported by the browser */
@supports (background: color-mix(in srgb, white 10%, black)) {
	#list tbody tr.selected {
		background: color-mix(in srgb, var(--brand1) 16%, transparent);
	}
}

/* Optional: soften hover/selected edges */
#list tbody tr:hover td:first-child,
#list tbody tr.selected td:first-child {
	border-top-left-radius: 10px;
	border-bottom-left-radius: 10px;
}

#list tbody tr:hover td:last-child,
#list tbody tr.selected td:last-child {
	border-top-right-radius: 10px;
	border-bottom-right-radius: 10px;
}

/* readable body text */
.wrap-text {
	white-space: pre-wrap;
	line-height: 1.5;
}

/* actions row */
.actions-inline {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	padding: 16px 0;
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}

/* status pills in list */
.status-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 12px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(255, 255, 255, 0.06);
}

html[data-theme="lt"] .status-pill {
	border-color: rgba(0, 0, 0, 0.1);
	background: rgba(0, 0, 0, 0.05);
}

.status-new {
	color: #0A84FF;
}

.status-approved {
	color: #30D158;
}

.status-archived {
	color: #8E8E93;
}

/* search input (family look) */
.searchbar {
	height: 34px;
	min-width: 280px;
	padding: 0 12px;
	border-radius: 999px;
	border: none;
	color: var(--ink);
	background: rgba(0, 0, 0, 0.08);
}

html[data-theme="lt"] .searchbar {
	background: rgba(0, 0, 0, 0.06);
}

/* tiny spacing util */
.ml-8 {
	margin-left: 8px;
}

/* … keep everything you already have in this file … */

/* ── Utilities ── */
.inline {
	display: flex;
	align-items: center;
	gap: 8px;
}

.mt-14 {
	margin-top: 14px;
}

.flex-spacer {
	flex: 1;
}

.hidden {
	display: none !important;
}

/* === Splash Screen === */
.splash {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f3f5f2;
	backdrop-filter: blur(24px) saturate(180%);
	opacity: 1;
	pointer-events: auto;
	transition: opacity 0.6s ease;
}

.splash.fade-out {
	opacity: 0;
	pointer-events: none;
}

.splash-inner {
	text-align: center;
	animation: splashFadeIn 1.5s ease forwards;
	Background: var(--brand1);
	Border-radius: 32px;
	padding: 64px;
}

.splash-inner h1 {
  font-size: 48px;
  font-weight: 300;
  letter-spacing: -0.02em;
  margin: 0 0 160px 0 !important;
  color: #f3f5f2;
font-family: var(--font-title);
}

.splash-inner .splash-strap {
	font-size: 0.9rem;
	font-weight: 400;
	color: rgba(255, 255, 255, 0.6);
	margin-bottom: 40px;
}

.splash-inner p {
	font-size: 0.9rem;
	font-weight: 400;
	color: rgba(255, 255, 255, 0.6);
	Margin: 0;
}

@keyframes splashFadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.splash-logo {
	width: 180px;
	margin-bottom: 1rem;
}


/* ===Status bar===*/
.foundry-footer-status {
	position: fixed;
	bottom: 12px;
	left: 20px;
	font-size: 0.75rem;
	font-weight: 300;
	letter-spacing: 0.3px;
	color: var(--ink));
	pointer-events: none;
	z-index: 999;
	user-select: none;
	font-family: inherit;
}

.foundry-footer-status::before {
	content: "•";
	margin-right: 6px;
	opacity: 0.3;
}

/* ── Studio Inbox helpers (CSP-safe classes) ── */
.inbox-grid {
	display: grid;
	grid-template-columns: 1fr 40%;
	gap: 14px;
	padding: 14px;
}

.scroll {
	overflow: auto;
}

.pad {
	padding: 14px;
}

.flex-col {
	display: flex;
	flex-direction: column;
	gap: 12px;
	border: 1px solid var(--line);
	border-radius: var(--round);
	background: var(--panel);
}

.m0 {
	margin: 0;
}

/*.mt-auto { margin-top:auto; }*/
.dim {
	opacity: .85;
}

.divider {
	border: 0;
	border-top: 1px solid var(--line);
	opacity: .5;
}

.wrap-text {
	white-space: pre-wrap;
	line-height: 1.5;
}

.actions-inline {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.status-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 12px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(255, 255, 255, 0.06);
}

html[data-theme="lt"] .status-pill {
	border-color: rgba(0, 0, 0, 0.1);
	background: rgba(0, 0, 0, 0.05);
}

.status-new {
	color: #0A84FF;
}

.status-approved {
	color: #30D158;
}

.status-archived {
	color: #8E8E93;
}

.searchbar {
	height: 34px;
	min-width: 280px;
	padding: 0 12px;
	border-radius: 999px;
	border: none;
	color: var(--ink);
	background: rgba(0, 0, 0, 0.08);
}

html[data-theme="lt"] .searchbar {
	background: rgba(0, 0, 0, 0.06);
}

.ml-8 {
	margin-left: 8px;
}

/* ── Modal sheet animations (already in your file) ── */

/* === Base Icon Button === */
.icon-btn {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 60px;
	min-height: 60px;
	padding: 6px 4px;
	background: transparent;
	border: 0;
	border-radius: 8px;
	cursor: pointer;
	text-align: center;
	transition: background 0.15s ease, transform 0.15s ease;
	vertical-align: middle;
	/* ✅ Ensures centering in toolbar */
}

.toolbar .icon-btn {
	margin: 0 6px;
	/* ✅ Optional: consistent spacing between buttons */
}

.icon-btn:hover {
	background: rgba(255, 255, 255, 0.08);
	transform: translateY(-1px);
}

.icon-btn:active {
	transform: translateY(0);
}

/* === Icon === */
.icon-btn .icon svg {
	width: 24px;
	height: 24px;
	display: block;
	fill: #f3f5f2;
	transition: fill 0.15s ease;
}

.icon-btn:hover .icon svg {
	fill: #f3f5f2;
	Opacity: 0.8
}

/* === Label (always visible + wrapping) === */
.icon-btn .label {
	margin-top: 4px;
	font-size: 10px;
	font-weight: 400;
	color: #f3f5f2;
	line-height: 1.2;
	max-width: 100%;
	white-space: normal;
	/* ✅ Allow wrapping */
	word-break: break-word;
	/* ✅ Handle longer words gracefully */
	text-align: center;
	pointer-events: none;
	transition: color 0.15s ease;
}

.icon-btn:hover .label {
	color: #f3f5f2;
	Opacity: 0.8;
}

/* === Remove tooltip hover (no longer needed) === */
.icon-btn::after {
	display: none;
}

/* Progress shell (below toolbar) */
.wizard-progress {
	position: sticky;
	top: 120px;
	/* match your toolbar height */
	z-index: 90 !important;
	padding: 10px 18px 0;
	width: 30%;
	margin-left: auto;
	margin-right: auto;
	Margin-top: 32px;
}

/* Rounded progress bar */
.wizard-progress .bar {
	width: 100%;
	height: 10px;
	border-radius: 999px;
	overflow: hidden;
	border: 1px solid var(--line);
	background: var(--prg);
}

html[data-theme="dk"] .wizard-progress .bar {
	background: rgba(255, 255, 255, 0.06);
}

/* Rounded progress bar stays the same */

/* ✅ Make the fill a block that fully spans the bar, then scale it */
.wizard-progress .bar .fill {
	display: block;
	/* was inline, this is required */
	width: 100%;
	/* base width to scale from */
	height: 100%;
	background: var(--brand1);
	border-radius: 999px;
	transform-origin: left center;
	transform: scaleX(0);
	/* start empty */
	transition: transform .25s ease;
	will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
	.wizard-progress .bar .fill {
		transition: none !important;
	}
}

#searchInput::-webkit-search-cancel-button {
	-webkit-appearance: none;
	appearance: none;
	display: none;
}

#searchInput::-webkit-search-cancel-button {
	-webkit-appearance: none;
	appearance: none;
	display: none;
}

.step-indicator {
	display: none !important;
}