/* Taskr — Foundry family (clean)
   - Foundry titlebar + toolbar (Projctr parity)
   - Splash (shared)
   - Board + Library (Taskr)
   - Modals + Sheet (no icons in modal buttons)
   - Toast: single centered (#toast)
   - Save status: ✓ chip (.save-check)
   - Light/Dark via [data-theme]
*/

/* ============================= */
/* Theme Tokens                  */
/* ============================= */
:root {
	--ink: #eef1f6;
	--muted: #a9b1c6;
	--line: rgba(255, 255, 255, 0.12);
	--panel: linear-gradient(180deg, rgba(20, 24, 36, 0.96), rgba(16, 20, 32, 0.96));
	--panel-strong: rgba(255, 255, 255, 0.10);
	--bg: #0d1016;

	--round-xl: 22px;
	--round-lg: 16px;
	--radius: 14px;

	/* Foundry brand */
	--brand1: #2253f4;
	/* Projctr primary */
	--brand2: #5a78ff;
	/* Accent */
	--accent: var(--brand1);

	--success: #30d179;
	--danger: #ff5c7a;

	--chip-bg: #0f131a;
	--chip-ink: #e7e9ee;
	--chip-muted: #b9bdc7;

	--toggle-h: 30px;
	--toggle-thumb: 26px;

	--btnbg: rgba(255, 255, 255, 0.02);
	--input: rgba(255, 255, 255, 0.1);
}

html[data-theme="lt"] {
	--ink: #1c1f26;
	--ink2: #f3f5f2;
	--muted: #4b5563;
	--line: rgba(255, 255, 255, 0.12);
	--panel: #ffffff;
	--panel-strong: rgba(0, 0, 0, 0.06);
	--bg: #f7f9fb;

	--chip-bg: rgba(243, 245, 242, 0.25);
	--chip-ink: #1c1f26;
	--chip-muted: #4b5563;

	--btnbg: rgba(25, 25, 25, 0.08);
	--input: rgba(15, 15, 15, 0.1);
--accent: var(--brand1);
}

* {
	box-sizing: border-box;
	-webkit-tap-highlight-color: transparent;
}

html,
body {
	height: 100%;
}

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

/* --- Base icon rules: all inline SVGs follow text color --- */
.icon {
	display: inline-grid;
	place-items: center;
	width: 24px;
	height: 24px;
}

.icon svg {
	width: 100%;
	height: 100%;
	display: block;
	fill: currentColor;
	/* ← critical: theme-aware */
	transition: fill .15s ease, opacity .15s ease;
}

/* =========================================================
   TEXT BUTTONS (compact pills used across the app)
   ========================================================= */
.btn {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 34px;
	padding: 0 12px;
	border-radius: 999px;
	border: 1px solid var(--line);
	background: var(--btnbg);
	color: var(--ink);
	font: 500 13px var(--font-ui);
	cursor: pointer;
	transition: background .2s ease, transform .15s ease, border-color .2s ease, opacity .2s ease;
}

.btn:hover {
	background: var(--panel-strong);
	transform: translateY(-1px);
}

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

.btn:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

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

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

.btn.danger {
	border-color: var(--danger);
	color: #f3f5f2;
	background: var(--danger)
}

.btn.small {
	height: 30px;
	padding: 0 10px;
	border-radius: 10px;
}

.btn[disabled],
.btn.is-disabled {
	opacity: .5;
	cursor: not-allowed;
	transform: none !important;
}

/* Keep in-button icons theme-aware */
.btn .icon,
.btn .icon svg {
	width: 16px;
	height: 16px;
}

/* =========================================================
   ICON-ONLY CIRCULAR BUTTONS (generic)
   ========================================================= */
.btn.circle {
	width: 36px;
	height: 36px;
	padding: 0;
	border-radius: 999px;
	display: inline-grid;
	place-items: center;
}

.btn.circle .icon,
.btn.circle .icon svg {
	width: 16px;
	height: 16px;
}

/* =========================================================
   TOOLBAR ICON TILES (Projctr/Planr parity)
   ========================================================= */
.toolbar .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 .15s ease, transform .15s ease;
	color: #f3f5f2;
	/* toolbar sits on accent; keep icons readable */
}

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

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

.toolbar .icon-btn .icon svg {
	fill: #f3f5f2;
}

.toolbar .icon-btn .label {
	margin-top: 4px;
	font-size: 10px;
	font-weight: 500;
	color: #f3f5f2;
	line-height: 1.2;
	text-align: center;
}

.toolbar .icon-btn.danger {
	color: var(--danger);
}

.toolbar .icon-btn.danger .icon svg {
	fill: var(--danger);
}

/* =========================================================
   CHIP ACTION BUTTONS (edit/delete) — circular, theme-aware
   ========================================================= */
.task-chip .chip-actions {
	display: flex;
	gap: 8px;
	align-self: flex-end;
	margin-top: 8px;
}

.task-chip .chip-actions .icon-btn {
	min-width: 0;
	min-height: 0;
	width: 32px;
	height: 32px;
	padding: 0;
	border-radius: 999px;
	display: inline-grid;
	place-items: center;
	border: 1px solid var(--line);
	color: var(--chip-ink);
	flex: 0 0 auto;
	transform: none;
background: rgba(255,255,255,0.05);
cursor: pointer;
}

.task-chip .chip-actions .icon-btn:hover {
	background: var(--panel-strong);
}

.task-chip .chip-actions .icon-btn:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.task-chip .chip-actions .icon-btn .icon svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
	opacity: .95;
}

.task-chip .chip-actions .icon-btn[data-act="remove"] {
	color: var(--danger);
	border:1px dotted var(--danger);
cursor: pointer;
background: none;
}

html[data-theme="lt"] .task-chip .chip-actions .icon-btn[data-act="remove"] {
	color: var(--danger);
	border:1px dotted var(--danger);
cursor: pointer;
background: none;
}

/* Small text buttons (forms/modals) — (keep) */
/* (duplicate minimized from earlier file for parity) */

/* Pills */
.pill {
	padding: 8px 12px;
	border-radius: 999px;
	border: 1px solid var(--line);
	background: transparent;
	font-size: 13px;
	color: var(--muted);
}

html[data-theme="lt"] .pill {
	color: var(--ink2);
}

html[data-theme="lt"] .task-chip .chip-actions .icon-btn {
	min-width: 0;
	min-height: 0;
	width: 32px;
	height: 32px;
	padding: 0;
	border-radius: 999px;
	display: inline-grid;
	place-items: center;
	border: 1px solid var(--line);
	color: var(--chip-ink);
	flex: 0 0 auto;
	transform: none;
background: rgba(0,0,0,0.05);
cursor: pointer;
}

html[data-theme="lt"] button[id^="colDel-"].icon-btn.circle{
  min-width: 0;
  min-height: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  border: 1px dotted var(--danger);
  color: var(--chip-ink);
  flex: 0 0 auto;
  transform: none;
  background: none;
cursor: pointer;
}

button[id^="colDel-"].icon-btn.circle {min-width: 0;
  min-height: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  border: 1px dotted var(--danger);
  color: var(--chip-ink);
  flex: 0 0 auto;
  transform: none;
  background: none;
cursor: pointer;}

/* ============================= */
/* Splash (shared)               */
/* ============================= */
.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 .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 p {
	font-size: .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;
}

/* ============================= */
/* App Chrome (top bars)         */
/* ============================= */
#app {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

/* Title bar */
.app-titlebar {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--brand1);
	padding: 0.75rem 1.25rem;
	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;
	line-height: 1.3;
font-family: var(--font-title);
}

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

/* Toolbar */
.toolbar {
	position: sticky;
	top: 0;
	z-index: 90;
	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: var(--line);
	margin: 0 8px;
}

/* === Inline workspace (Planr-style) === */
.ws-label {
	color: #f3f5f2;
	opacity: .9;
	font-weight: 500;
	margin-left: 2px;
	margin-right: 2px;
}

.inline-edit {
	min-width: 180px;
	max-width: 280px;
	padding: 6px 10px 4px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.2);
	color: #fff;
	outline: none;
	background: transparent;
	font-size: 13px;
	line-height: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.inline-edit:focus {
	border-bottom-color: #fff;
}

.inline-edit.empty {
	opacity: .7;
}

#wsSelect {
	appearance: none;
	/* Removes native dropdown arrow (optional) */
	background: transparent;
	border-bottom: 1px solid rgba(255, 255, 255, 0.2);
	Border-top: none;
	Border-right: none;
	Border-left: none;
	border-radius: 0px;
	color: #f3f5f2;
	padding: 4px 10px;
	Font-size: 13px;
	min-width: 180px;
	transition: all 0.2s ease;
}

/* ============================= */
/* App Grid (below bars)         */
/* ============================= */
#appGrid {
	height: calc(100vh - 168px);
	display: grid;
	grid-template-columns: 300px 1fr;
	gap: 16px;
	padding: 16px;
}

@media (max-width: 1024px) {
	#appGrid {
		grid-template-columns: 1fr;
		grid-template-rows: auto 1fr;
		height: calc(100vh - 168px);
	}

	.sidebar {
		order: 2;
	}

	.board {
		order: 1;
	}
}

/* Panels */
.sidebar,
.board {
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: var(--round-xl);
	padding: 14px;
	min-height: 0;
}

/* Sidebar (Library) */
.sidebar {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.sidebar .sidebar-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.sidebar .title {
	font-weight: 400;
	letter-spacing: .3px;
}

/* Library list */
.task-list {
	flex: 1;
	overflow: auto;
	display: grid;
	gap: 10px;
	padding-right: 2px;
}

.empty-note {
	color: var(--muted);
	font-size: 13px;
	text-align: center;
	opacity: .9;
	padding: 12px;
	border: 1px dashed var(--line);
	border-radius: 12px;
}

/* ============================= */
/* Task chips                    */
/* ============================= */
.task-chip {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 14px 16px;
	border-radius: 16px;
	background: var(--chip-bg);
	color: var(--chip-ink);
	border: 1px dotted rgba(255, 255, 255, .08);
	cursor: grab;
	transition: transform .15s ease, border-color .2s ease, background .2s ease;
}

html[data-theme="lt"] .task-chip {
	border-color: rgba(0, 0, 0, .08);
}

.task-chip:hover {
	border-color: var(--brand2);
}

.task-chip.dragging {
	opacity: .96;
	cursor: grabbing;
}

.task-chip .task-name {
	font-weight: 400;
	font-size: 14px;
}

.task-chip .task-meta {
	font-size: 12px;
	color: var(--chip-muted);
	opacity: .95;
}

/* Chip controls */
.task-chip .check-wrap {
	position: absolute;
	top: 8px;
	right: 8px;
}

.task-chip .check input {
	width: 18px;
	height: 18px;
	accent-color: var(--success);
}

/* Chip actions */
.chip-actions {
	display: flex;
	gap: 8px;
	align-self: flex-end;
	margin-top: 8px;
}

.icon-btn.circle {
	width: 32px;
	height: 32px;
	padding: 0;
	border-radius: 999px;
}

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

.task-chip .icon svg {
	opacity: .95;
}

/* ============================= */
/* Board (columns)               */
/* ============================= */
.board {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
}

.weekbar {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(280px, 1fr);
	gap: 12px;
	min-width: 100%;
}

.day-col {
	background: transparent;
	border: 1px solid var(--line);
	border-radius: var(--round-lg);
	display: flex;
	flex-direction: column;
	padding: 10px;
	min-height: 220px;
	transition: box-shadow .25s ease, border-color .25s ease;
}

.day-col.active-day {
	border: 2px solid rgb(34, 197, 94); color: rgb(34, 197, 94); font-weight: 600;
}

html[data-theme="lt"] .day-col.active-day {
	border: 2px solid var(--brand1); color: var(--brand1); font-weight: 600;
}

.day-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 8px;
}

.day-name {
	font-weight: 500;
	letter-spacing: .3px;
	cursor: text;
}

.progress {
	height: 8px;
	border-radius: 999px;
	background: transparent;
	overflow: hidden;
	border: 1px solid var(--line);
}

.progress>i {
	display: block;
	height: 100%;
	width: 0;
	background: linear-gradient(90deg, var(--accent), var(--success));
	transition: width 260ms ease;
}

html[data-theme="lt"] .day-col {
	border: 1px rgba(25, 25, 25, .08) solid; 
}

.dropzone {
	flex: 1;
	min-height: 140px;
	border: 1px dashed var(--line);
	border-radius: 12px;
	padding: 8px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	overflow: auto;
	transition: all .2s ease;
}

.dropzone.hover {
	border-color: var(--brand2);
	box-shadow: 0 0 0 3px rgba(90, 120, 255, .2) inset;
}

/* Inline add row */
.add-row {
	display: flex;
	gap: 6px;
	align-items: center;
	padding: 6px;
	border: 1px dashed var(--line);
	border-radius: 10px;
	margin-bottom: 8px;
}

.add-row input,
.add-row select {
	flex: 1;
	padding: 8px 10px;
	border-radius: 10px;
	border: 1px solid var(--line);
	background: transparent;
	color: var(--ink);
}

.add-row .btn {
	padding: 8px 10px;
}

/* ============================= */
/* Modals + Sheet                */
/* ============================= */
.modal {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, .5);
	z-index: 60;
	backdrop-filter: blur(8px) saturate(160%);
	-webkit-backdrop-filter: blur(8px) saturate(160%)
}

.modal.show {
	display: flex;
}

.modal .card {
	background: var(--panel);
	border-radius: 22px;
	min-width: 560px;
	max-width: 760px;
	color: var(--ink);
	box-shadow: 0 20px 80px rgba(0, 0, 0, .45);
	display: flex;
	flex-direction: column;
}

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

.modal section {
	padding: 18px 22px;
	display: grid;
	gap: 14px;
}

.modal .grid2 {
	grid-template-columns: 1fr 1fr;
}

.modal .grid2 .full {
	grid-column: 1 / -1;
}

.modal footer {
	padding: 18px 22px;
	display: flex;
	justify-content: flex-end;
	gap: 10px;
}

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

.small {
	font-size: 12px;
}

hr {
	border: none;
	border-top: 1px solid var(--line);
	margin: 8px 0;
}

.sheet {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, .5);
	z-index: 9999;
	backdrop-filter: blur(8px) saturate(160%);
	-webkit-backdrop-filter: blur(8px) saturate(160%)
}

.sheet.open {
	display: flex;
}

.sheet .card {
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 22px;
	max-width: 520px;
	width: 92%;
	color: var(--ink);
	box-shadow: 0 20px 80px rgba(0, 0, 0, .45);
	max-height: 90vh;
	overflow: auto;
}

.sheet-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 22px;
	border-bottom: 1px solid var(--line);
}

.sheet .title {
	font-size: 20px;
	font-weight: 400;
	letter-spacing: .3px;
}

.sheet .form {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 18px 22px;
}

.field label {
	display: block;
	font-size: .9rem;
	font-weight: 300;
	margin-bottom: 6px;
	opacity: .85;
}

.field input,
.field select {
	width: 100%;
	padding: 12px 14px;
	border-radius: 12px;
	border: 1px solid var(--input);
	background: transparent;
	color: var(--ink);
	font-size: 1rem;
	height: 42px;
	margin-bottom: 12px;
}

#taskName, .field textarea {
	width: 100% !important;
	padding: 12px 14px;
	border-radius: 8px;
	border: 1px solid var(--input);
	background: transparent;
	color: var(--ink);
	font-size: 1rem;
	height: 126px;
	margin-bottom: 12px;
}

.smallmuted label {
	opacity: .6;
}

.actions {
	display: flex;
	align-items: center;
	gap: 10px;
	justify-content: flex-end;
	padding: 18px 22px;
	border-top: 1px solid var(--line);
}

.actions .spacer {
	flex: 1;
}

.color-hidden {
	position: absolute;
	opacity: 0;
	pointer-events: none;
	width: 0;
	height: 0;
}

#wsClone {
	border: 99px;
	width: 18px;
}

/* Global field labels */
.field>label {
	display: block;
	margin: 0 0 6px;
	font-size: 13px;
	font-weight: 500;
	color: var(--ink);
	letter-spacing: 0.2px;
}

/* “Small” helper labels (keep them subtler) */
.field>label.small {
	margin-bottom: 4px;
	font-weight: 400;
	color: var(--muted);
}

/* Checkbox labels that wrap an input */
.field>label.checkbox {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	/* no bottom margin for inline checkbox rows */
	font-weight: 500;
}

/* Swatches */
.swatch-picker {
	display: grid;
	grid-template-columns: repeat(12, 28px);
	gap: 10px;
}

.swatch {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, .18);
	cursor: pointer;
	transition: transform .15s ease, box-shadow .15s ease, border .15s ease;
}

html[data-theme="lt"] .swatch {
	border-color: rgba(0, 0, 0, .12);
}

.swatch:hover {
	transform: translateY(-2px);
}

.swatch[aria-selected="true"] {
	box-shadow: 0 0 0 3px rgba(255, 255, 255, .15) inset;
}

html[data-theme="lt"] .swatch[aria-selected="true"] {
	box-shadow: 0 0 0 3px rgba(0, 0, 0, .1) inset;
}

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

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

.toggle-pill {
	width: 48px;
	height: 26px;
	border-radius: 999px;
	border: 1px solid var(--ink);
	background: #f3f5f2;
	position: relative;
	cursor: pointer;
}

.toggle-pill::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--brand1);
	transform: translateX(0);
	transition: transform .25s ease;
}

html[data-theme="lt"] .toggle-pill::after {
	transform: translateX(22px);
	background: var(--ink2);
}

html[data-theme="lt"] .toggle-pill {
	background: var(--brand1);
	border-color: transparent;
}

/* Workspaces list */
.ws-list {
	display: grid;
	gap: 8px;
}

.ws-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 10px 12px;
	border-radius: 12px;
	border: 1px solid var(--line);
	background: transparent;
}

.ws-name {
	flex: 1;
	padding: 10px 12px;
	border-radius: 12px;
	border: 1px solid var(--line);
	background: transparent;
	color: var(--ink);
}

.ws-actions {
	display: flex;
	gap: 8px;
	margin-top: 10px;
}

/* ============================= */
/* Toast (single, centered)      */
/* ============================= */
#toast {
	position: fixed;
	bottom: 40px;
	left: 50%;
	transform: translateX(-50%) translateY(20px);
	background: rgba(18, 20, 30, 0.92);
	backdrop-filter: blur(14px);
	padding: 14px 22px;
	border-radius: 16px;
	font-size: 14px;
	font-weight: 400;
	color: #fff;
	display: flex;
	align-items: center;
	gap: 10px;
	opacity: 0;
	pointer-events: none;
	transition: opacity .35s ease, transform .35s ease;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
	z-index: 99;
	border: 1px solid var(--line);
}

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

.toast-icon svg {
	width: 20px;
	height: 20px;
	fill: var(--brand1);
}

/* ============================= */
/* Footer Status Bar             */
/* ============================= */
.foundry-footer-status {
  position: fixed;
  bottom: 12px;
  left: 20px;
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.3px;
  color: #f3f5f2;
  pointer-events: none;
  z-index: 999;
  user-select: none;
  font-family: inherit;
padding:8px;
background: var(--brand1);
border-radius:99px;
}

.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;
}

#saveStatus.sync-pushing { opacity: 0.75; }
#saveStatus.sync-pending { opacity: 0.9; }
#saveStatus.sync-pulled  { box-shadow: 0 0 0 2px rgba(48,209,121,.35) inset; }
#saveStatus.sync-error   { box-shadow: 0 0 0 2px rgba(255,95,111,.35) inset; }

/* Trash icon colour (both themes) */
:root { --trash-icon: var(--danger); }
html[data-theme="lt"] { --trash-icon: var(--danger); }

/* Generic: any trash icon */
.icon[data-icon="trash-2"]:not(#wsDeleteBtn) { color: var(--trash-icon); }

/* Scoped: chip delete + column delete */
.task-chip [data-act="remove"] .icon { color: var(--trash-icon); }
button[id^="colDel-"] .icon { color: var(--trash-icon); }

/* Toolbar only: it sets a hard SVG fill; override just for trash */
.toolbar .icon-btn .icon[data-icon="trash-2"] svg { fill: #f3f5f2; }

/* base */
.task-chip [data-act="remove"],
button[id^="colDel-"] {
  position: relative;
  overflow: hidden;
  transition: box-shadow .15s ease;
}

/* overlay sits under the icon */
.task-chip [data-act="remove"]::after,
button[id^="colDel-"]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: currentColor;
  opacity: 0;
  transition: opacity .15s ease;
  z-index: 0;
}

/* keep icon above overlay */
.task-chip [data-act="remove"] .icon,
button[id^="colDel-"] .icon {
  position: relative;
  z-index: 1;
}

/* hover state (no icon change) */
.task-chip [data-act="remove"]:hover::after,
button[id^="colDel-"]:hover::after {
  opacity: .08; 
transform: none;
}

/* Disable native text highlight when we’re arming/dragging */
.drag-armed, .drag-armed *,
.is-dragging, .is-dragging * {
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none; /* iOS */
}

/* Allow normal text selection inside actual form fields */
.is-dragging input,
.is-dragging select,
.is-dragging textarea,
.is-dragging [contenteditable="true"] {
  -webkit-user-select: text !important;
  user-select: text !important;
}

/* Touch: keep vertical scroll when not dragging */
.task-chip { touch-action: pan-y; }

/* Keep column/grids from expanding due to long content */
.weekbar, .day-col, .dropzone, .task-chip { min-width: 0; }

/* Chips should not size to their content; fill the column width */
.task-chip {
  width: 100%;
  max-width: 100%;
}

/* Wrap long task names / metadata (including long unbroken words) */
.task-chip .task-name,
.task-chip .task-meta {
  white-space: normal;
  overflow-wrap: anywhere; /* modern */
  word-break: break-word;  /* fallback */
}

/* Optional: cap chip width in super-wide screens */
@media (min-width: 1440px) {
  .dropzone .task-chip { max-width: 560px; }
}

/* Give the board's main grid (weekbar) actual height to divvy up */
.board{
  display:flex;
  flex-direction:column;
  min-height:0;              /* allow children to shrink */
  overflow-x:auto;
  overflow-y:hidden;         /* keep vertical scroll inside columns */
}

/* Week grid fills the board's height and may shrink */
.weekbar{
  flex:1 1 auto;             /* take remaining height */
  min-height:0;              /* critical for inner scroll */
}

/* Each column stretches to the full height of the weekbar */
.weekbar > .day-col{
  height:100%;
  min-height:0;              /* let .dropzone scroll */
  display:flex;
  flex-direction:column;
}

/* The drop area takes the remaining column height and scrolls */
.dropzone{
  flex:1 1 auto;
  min-height:0;              /* critical */
  overflow-y:auto;           /* auto is nicer than always-on scrollbars */
  overflow-x:hidden;
  -webkit-overflow-scrolling: touch; /* smooth iOS/Chrome */
  padding-right: 6px;        /* room for scrollbar, optional */
  overscroll-behavior: contain; /* prevent page scroll chaining */
}

/* Hide scrollbar, still scrolls */
.dropzone {
  overflow-y: auto;
  overflow-x: hidden;
  -ms-overflow-style: none;  /* IE/Edge legacy */
  scrollbar-width: none;     /* Firefox */
}
.dropzone::-webkit-scrollbar { /* Chrome/Safari/Edge (Chromium) */
  width: 0;
  height: 0;
}