/* ─── main.css ─────────────────────────────────────────────────────────── */
/* ─── VARIABLES ─────────────────────────────────────────────────────────── */
:root {
	--bg: #0d0f14;
	--bg2: #13161e;
	--bg3: #1a1e28;
	--bg4: #222739;
	--border: #2a2f40;
	--border-light: #343a50;
	--text: #e8eaf0;
	--text2: #9098b4;
	--text3: #5c6380;
	--accent: #6d6aff;
	--accent-glow: rgba(109, 106, 255, 0.15);
	--accent2: #00e5a0;
	--accent3: #ff6b6b;
	--font-head: 'Syne', sans-serif;
	--font-body: 'DM Sans', sans-serif;
	--radius: 10px;
	--radius-lg: 16px;
	--shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
	--shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
	--status-backlog: #5c6380;
	--status-todo: #6d6aff;
	--status-in_progress: #f59e0b;
	--status-review: #8b5cf6;
	--status-done: #10b981;
	--prio-low: #5c6380;
	--prio-medium: #6d6aff;
	--prio-high: #f59e0b;
	--prio-urgent: #ef4444;
}

/* ─── RESET ──────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html,
body {
	height: 100%;
}

body {
	font-family: var(--font-body);
	background: var(--bg);
	color: var(--text);
	font-size: 14px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

input,
textarea,
select,
button {
	font-family: inherit;
	font-size: inherit;
}

a {
	cursor: pointer;
	text-decoration: none;
	color: inherit;
}

.hidden {
	display: none !important;
}

button {
	cursor: pointer;
	border: none;
	background: none;
}

input,
textarea,
select {
	background: var(--bg3);
	border: 1px solid var(--border);
	color: var(--text);
	border-radius: var(--radius);
	padding: 8px 12px;
	outline: none;
	transition: border-color 0.2s;
	width: 100%;
}

input:focus,
textarea:focus,
select:focus {
	border-color: var(--accent);
}

select option {
	background: var(--bg3);
}

textarea {
	resize: vertical;
}

/* ─── LOGIN ──────────────────────────────────────────────────────────────── */
.login-screen {
	height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--bg);
	background-image:
		radial-gradient(ellipse at 20% 50%, rgba(109, 106, 255, 0.08) 0%, transparent 60%),
		radial-gradient(ellipse at 80% 20%, rgba(0, 229, 160, 0.05) 0%, transparent 50%);
}

.login-card {
	width: 380px;
	background: var(--bg2);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 40px;
	box-shadow: var(--shadow);
}

.login-logo {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 28px;
}

.logo-mark {
	font-size: 28px;
	color: var(--accent);
}

.logo-text {
	font-family: var(--font-head);
	font-size: 20px;
	color: var(--text);
}

.logo-text strong {
	color: var(--accent);
	font-weight: 800;
}

.login-card h1 {
	font-family: var(--font-head);
	font-size: 24px;
	font-weight: 700;
	margin-bottom: 4px;
}

.login-sub {
	color: var(--text2);
	margin-bottom: 28px;
}

.login-card .form-group {
	margin-bottom: 16px;
}

.login-card label {
	display: block;
	margin-bottom: 6px;
	color: var(--text2);
	font-size: 13px;
}

.login-hint {
	color: var(--text3);
	font-size: 12px;
	margin-top: 16px;
}

#login-error {
	color: var(--accent3);
	min-height: 18px;
}

/* ─── APP LAYOUT ─────────────────────────────────────────────────────────── */
.app {
	display: flex;
	height: 100vh;
	overflow: hidden;
}

/* ─── SIDEBAR ────────────────────────────────────────────────────────────── */
.sidebar {
	width: 220px;
	min-width: 220px;
	height: 100vh;
	background: var(--bg2);
	border-right: 1px solid var(--border);
	display: flex;
	flex-direction: column;
	transition: width 0.25s ease, min-width 0.25s ease;
	overflow-y: auto;
	overflow-x: hidden;
	position: relative;
}

.sidebar.collapsed {
	width: 72px;
	min-width: 72px;
}

.sidebar.collapsed .nav-label,
.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-section-label,
.sidebar.collapsed .sidebar-footer .user-info,
.sidebar.collapsed .client-dot + .nav-label,
.sidebar.collapsed .logout-label {
	display: none;
}

.sidebar.collapsed .sidebar-nav,
.sidebar.collapsed .sidebar-clients {
	padding-left: 10px;
	padding-right: 10px;
}

.sidebar.collapsed .nav-item {
	width: 48px;
	height: 48px;
	padding: 0;
	justify-content: center;
	gap: 0;
	margin: 0 auto 6px;
	border-radius: 12px;
}

.sidebar.collapsed .sidebar-nav .nav-item:last-child,
.sidebar.collapsed .sidebar-clients .nav-item:last-child {
	margin-bottom: 0;
}

.sidebar.collapsed .sidebar-footer .sidebar-logout-btn {
	width: 48px;
	height: 48px;
	padding: 0;
	justify-content: center;
	gap: 0;
	margin: 0 auto;
	border-radius: 12px;
}

.sidebar.collapsed .client-item {
	justify-content: center;
}

.sidebar.collapsed .client-dot {
	margin-left: 0;
}

.sidebar-header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 20px 16px;
	border-bottom: 1px solid var(--border);
	position: sticky;
	top: 0;
	z-index: 5;
	background: var(--bg2);
}

.sidebar-toggle {
	margin-left: auto;
	color: var(--text3);
	font-size: 18px;
	padding: 4px 8px;
	border-radius: 6px;
	transition: color 0.2s, background 0.2s, transform 0.2s;
	flex-shrink: 0;
	position: relative;
	z-index: 10;
}

.sidebar-toggle:hover {
	color: var(--text);
	background: var(--bg3);
}

.sidebar.collapsed .sidebar-toggle {
	transform: rotate(180deg);
	margin-left: 0;
}

.sidebar.collapsed .sidebar-header {
	justify-content: center;
	padding: 16px 8px;
	gap: 4px;
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .logo-mark {
	display: none;
}

.sidebar-nav,
.sidebar-clients {
	padding: 12px 8px;
}

.nav-section-label {
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--text3);
	padding: 4px 8px 8px;
	white-space: nowrap;
}

.nav-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border-radius: 8px;
	color: var(--text2);
	font-size: 13px;
	font-weight: 500;
	transition: background 0.15s, color 0.15s;
	white-space: nowrap;
	cursor: pointer;
}

.nav-item:hover {
	background: var(--bg3);
	color: var(--text);
}

.nav-item.active {
	background: var(--accent-glow);
	color: var(--accent);
}

.nav-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	min-width: 16px;
	height: 16px;
	flex-shrink: 0;
	font-size: 16px;
	line-height: 1;
}

.nav-icon svg {
	width: 12px;
	height: 12px;
	stroke-width: 2;
}

.sidebar.collapsed .nav-icon {
	width: 20px;
	min-width: 20px;
	margin: 0;
}

.client-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	min-width: 8px;
	margin-left: 6px;
}

.sidebar-footer {
	margin-top: auto;
	padding: 16px;
	border-top: 1px solid var(--border);
	background: var(--bg2);
}

.sidebar.collapsed .sidebar-footer {
	padding: 10px;
}

.user-info {
	font-size: 12px;
	color: var(--text2);
	margin-bottom: 8px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.user-info strong {
	color: var(--text);
}

.sidebar-logout-btn {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 10px;
	justify-content: flex-start;
}

.sidebar.collapsed .sidebar-logout-btn {
	width: 56px;
	height: 56px;
	padding: 0;
	justify-content: center;
	gap: 0;
	margin: 0 auto;
	border-radius: 12px;
}

/* ─── TOPBAR ─────────────────────────────────────────────────────────────── */
.main-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	min-height: 0;
}

.topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 24px;
	border-bottom: 1px solid var(--border);
	background: var(--bg2);
	gap: 16px;
	flex-wrap: wrap;
}

.topbar-left {
	display: flex;
	align-items: center;
	gap: 12px;
}

.page-title {
	font-family: var(--font-head);
	font-size: 20px;
	font-weight: 700;
}

.topbar-right {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.search-box {
	display: flex;
	align-items: center;
	gap: 6px;
	background: var(--bg3);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 0 12px;
	color: var(--text2);
}

.search-box input {
	background: none;
	border: none;
	padding: 7px 0;
	width: 160px;
	color: var(--text);
}

.filter-select {
	width: auto;
	padding: 7px 12px;
	font-size: 13px;
	background: var(--bg3);
}

.client-badge {
	font-size: 12px;
	font-weight: 600;
	padding: 3px 10px;
	border-radius: 20px;
	background: var(--accent-glow);
	color: var(--accent);
}

/* ─── BUTTONS ────────────────────────────────────────────────────────────── */
.btn-primary {
	background: var(--accent);
	color: #fff;
	border-radius: var(--radius);
	padding: 8px 18px;
	font-weight: 600;
	font-size: 13px;
	transition: opacity 0.2s, transform 0.1s;
	white-space: nowrap;
}

.btn-primary:hover {
	opacity: 0.9;
	transform: translateY(-1px);
}

.btn-secondary {
	background: var(--bg4);
	color: var(--text);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 7px 14px;
	font-weight: 500;
	font-size: 13px;
	transition: border-color 0.2s;
}

.btn-secondary:hover {
	border-color: var(--accent);
}

.btn-ghost {
	color: var(--text2);
	padding: 7px 14px;
	border-radius: var(--radius);
	font-size: 13px;
	transition: color 0.2s, background 0.2s;
}

.btn-ghost:hover {
	color: var(--text);
	background: var(--bg3);
}

.btn-danger {
	color: var(--accent3);
	padding: 7px 14px;
	border-radius: var(--radius);
	font-size: 13px;
	border: 1px solid rgba(239, 68, 68, 0.3);
	transition: background 0.2s;
}

.btn-danger:hover {
	background: rgba(239, 68, 68, 0.1);
}

.btn-ghost.active,
.calendar-range-btn.active,
.kanban-mode-btn.active {
	background: var(--accent-glow);
	color: var(--accent);
	border: 1px solid rgba(109, 106, 255, 0.35);
}

/* ─── VIEW CONTENT ───────────────────────────────────────────────────────── */
.view-content {
	flex: 1;
	overflow: auto;
	padding: 24px;
	min-height: 0;
}

/* ─── KANBAN ─────────────────────────────────────────────────────────────── */
.kanban-toolbar {
	display: flex;
	gap: 8px;
	margin-bottom: 16px;
}

.kanban-board {
	display: flex;
	gap: 16px;
	height: 100%;
	min-height: calc(100vh - 130px);
}

.kanban-col {
	min-width: 260px;
	width: 260px;
	flex-shrink: 0;
	background: var(--bg2);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	display: flex;
	flex-direction: column;
	max-height: calc(100vh - 140px);
}

.kanban-col-header {
	padding: 14px 16px;
	border-bottom: 1px solid var(--border);
	display: flex;
	align-items: center;
	gap: 8px;
	position: sticky;
	top: 0;
	background: var(--bg2);
	border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.col-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
}

.col-title {
	font-family: var(--font-head);
	font-weight: 600;
	font-size: 13px;
	flex: 1;
}

.col-count {
	font-size: 11px;
	background: var(--bg4);
	color: var(--text2);
	padding: 2px 7px;
	border-radius: 10px;
	font-weight: 600;
}

.kanban-cards {
	flex: 1;
	overflow-y: auto;
	padding: 12px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.kanban-cards::-webkit-scrollbar {
	width: 4px;
}

.kanban-cards::-webkit-scrollbar-track {
	background: transparent;
}

.kanban-cards::-webkit-scrollbar-thumb {
	background: var(--border);
	border-radius: 2px;
}

.kanban-col.is-drop-target {
	border-color: var(--accent);
	box-shadow: 0 0 0 1px rgba(109, 106, 255, 0.25) inset;
}

.kanban-col.is-drop-target .kanban-col-header {
	background: rgba(109, 106, 255, 0.08);
}

.task-card {
	background: var(--bg3);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 14px;
	cursor: pointer;
	transition: border-color 0.2s, transform 0.15s, box-shadow 0.15s;
	position: relative;
}

.task-card:hover {
	border-color: var(--border-light);
	transform: translateY(-2px);
	box-shadow: var(--shadow-sm);
}

.task-card[draggable="true"] {
	cursor: grab;
}

.task-card.is-dragging {
	opacity: 0.55;
	transform: rotate(1deg);
}

.card-client-bar {
	height: 3px;
	border-radius: 2px;
	margin-bottom: 10px;
	width: 40%;
}

.card-title {
	font-weight: 500;
	margin-bottom: 8px;
	font-size: 13px;
	line-height: 1.4;
	color: var(--text);
}

.card-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 8px;
}

.badge {
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.03em;
	padding: 2px 7px;
	border-radius: 4px;
	text-transform: uppercase;
}

.badge-priority-low {
	background: rgba(92, 99, 128, 0.2);
	color: var(--prio-low);
}

.badge-priority-medium {
	background: rgba(109, 106, 255, 0.2);
	color: var(--prio-medium);
}

.badge-priority-high {
	background: rgba(245, 158, 11, 0.2);
	color: var(--prio-high);
}

.badge-priority-urgent {
	background: rgba(239, 68, 68, 0.2);
	color: var(--prio-urgent);
}

.badge-cat {
	background: var(--bg4);
	color: var(--text2);
}

.card-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid var(--border);
}

.card-date {
	font-size: 11px;
	color: var(--text3);
}

.card-date.overdue {
	color: var(--accent3);
}

.card-hours {
	font-size: 11px;
	color: var(--text3);
	display: flex;
	align-items: center;
	gap: 4px;
}

.card-client-name {
	font-size: 10px;
	color: var(--text3);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.task-client-required-badge {
	display: inline-flex;
	margin-top: 6px;
	margin-bottom: 6px;
	padding: 4px 8px;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 700;
	background: rgba(255, 107, 107, 0.12);
	color: var(--accent3);
	border: 1px solid rgba(255, 107, 107, 0.22);
}

.card-client-action {
	margin-top: 10px;
}

.client-next-step-btn {
	width: 100%;
	font-size: 12px;
	padding: 8px 10px;
}

/* ─── CALENDAR ───────────────────────────────────────────────────────────── */
.calendar-container {
	max-width: 1100px;
	height: 100%;
	display: flex;
	flex-direction: column;
	min-height: 0;
}

.calendar-container-fluid {
	width: 100%;
	max-width: none;
	height: 100%;
	display: flex;
	flex-direction: column;
	min-height: 0;
}

#view-calendar {
	height: 100%;
	min-height: 0;
}

#calendar-grid-wrapper {
	width: 100%;
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

.calendar-span-wrapper {
	width: 100%;
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

.calendar-range-body {
	position: relative;
	flex: 1;
	min-height: 220px;
	border: 1px solid var(--border);
	border-radius: 0 0 12px 12px;
	overflow: hidden;
	background: var(--bg2);
	padding-top: calc((var(--lane-count, 1) * 34px) + 12px);
	display: flex;
}

.calendar-range-day-grid,
.calendar-bars-layer {
	display: grid;
	grid-template-columns: repeat(var(--calendar-cols, 7), minmax(0, 1fr));
}

.calendar-range-day-grid {
	flex: 1;
	height: 100%;
	min-height: 220px;
}

.calendar-range-day-col {
	height: 100%;
	border-right: 1px solid var(--border);
	cursor: pointer;
	transition: background 0.15s;
}

.calendar-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 18px;
}

.calendar-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
}

.calendar-header h3 {
	font-family: var(--font-head);
	font-size: 18px;
	font-weight: 700;
	text-transform: capitalize;
}

.calendar-range-switcher {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
}

.calendar-grid-month {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 4px;
	width: 100%;
}

.cal-day-label {
	text-align: center;
	font-size: 11px;
	font-weight: 700;
	color: var(--text3);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	padding: 8px 0;
}

.cal-cell {
	background: var(--bg2);
	border: 1px solid var(--border);
	border-radius: 8px;
	min-height: 110px;
	padding: 8px;
	transition: border-color 0.2s;
}

.cal-cell:hover {
	border-color: var(--border-light);
}

.cal-cell.today {
	border-color: var(--accent);
}

.cal-cell.other-month {
	opacity: 0.4;
}

.cal-date {
	font-size: 11px;
	font-weight: 700;
	color: var(--text2);
	margin-bottom: 6px;
}

.cal-cell.today .cal-date {
	color: var(--accent);
}

.cal-task-pill {
	font-size: 10px;
	padding: 2px 6px;
	border-radius: 3px;
	margin-bottom: 3px;
	cursor: pointer;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: #fff;
	font-weight: 500;
	transition: opacity 0.2s;
}

.cal-task-pill:hover {
	opacity: 0.85;
}

.cal-more-link {
	font-size: 11px;
	color: var(--accent);
	margin-top: 4px;
}

.calendar-range-header {
	display: grid;
	grid-template-columns: repeat(var(--calendar-cols, 7), minmax(0, 1fr));
	gap: 0;
	border: 1px solid var(--border);
	border-bottom: none;
	border-radius: 12px 12px 0 0;
	overflow: hidden;
}

.calendar-range-head-cell {
	background: var(--bg2);
	border-right: 1px solid var(--border);
	padding: 12px 8px;
	text-align: center;
	cursor: pointer;
	transition: background 0.15s;
}

.calendar-range-head-cell:last-child {
	border-right: none;
}

.calendar-range-head-cell:hover {
	background: var(--bg3);
}

.calendar-range-head-cell.today {
	background: rgba(109, 106, 255, 0.08);
}

.calendar-range-head-day {
	font-size: 11px;
	color: var(--text3);
	text-transform: uppercase;
	font-weight: 700;
	margin-bottom: 4px;
}

.calendar-range-head-num {
	font-size: 18px;
	font-weight: 800;
	color: var(--text);
}

.calendar-range-day-col:last-child {
	border-right: none;
}

.calendar-range-day-col:hover {
	background: rgba(255, 255, 255, 0.02);
}

.calendar-range-day-col.today {
	background: rgba(109, 106, 255, 0.05);
}

.calendar-bars-layer {
	position: absolute;
	inset: 0;
	pointer-events: none;
	padding-top: 8px;
	padding-bottom: 8px;
}

.calendar-task-bar {
	position: absolute;
	height: 26px;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0 10px;
	background: var(--bar-color);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	cursor: pointer;
	box-shadow: var(--shadow-sm);
	z-index: 3;
	border: 1px solid rgba(255, 255, 255, 0.15);
	left: 0;
	right: 0;
}

.calendar-bars-layer .calendar-task-bar {
	position: relative;
	pointer-events: auto;
	align-self: start;
}

.calendar-task-bar.starts-here {
	border-radius: 8px 4px 4px 8px;
}

.calendar-task-bar.ends-here {
	border-radius: 4px 8px 8px 4px;
}

.calendar-task-bar.starts-here.ends-here,
.calendar-task-bar.single-day {
	border-radius: 8px;
}

.calendar-task-bar.continues-left,
.calendar-task-bar.continues-right {
	border-radius: 4px;
}

.calendar-task-bar-title {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	flex: 1;
}

.calendar-task-bar-meta {
	font-size: 10px;
	font-weight: 500;
	opacity: 0.88;
	white-space: nowrap;
}

.calendar-switch {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 6px 10px;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: var(--bg3);
	color: var(--text2);
}

.calendar-switch-label {
	font-size: 13px;
	font-weight: 500;
	margin-left: 8px;
	color: var(--text2);
	white-space: nowrap;
}

.calendar-switch-track {
	position: relative;
	width: 44px;
	height: 24px;
	border-radius: 999px;
	background: var(--bg4);
	border: 1px solid var(--border-light);
	transition: background 0.2s ease, border-color 0.2s ease;
	padding: 0;
	display: inline-flex;
	align-items: center;
}

.calendar-switch-thumb {
	position: absolute;
	left: 3px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--text2);
	transition: transform 0.2s ease, background 0.2s ease;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.calendar-switch.is-on {
	border-color: rgba(109, 106, 255, 0.35);
	background: var(--accent-glow);
}

.calendar-switch.is-on .calendar-switch-label {
	color: var(--text);
}

.calendar-switch.is-on .calendar-switch-track {
	background: rgba(109, 106, 255, 0.35);
	border-color: rgba(109, 106, 255, 0.5);
}

.calendar-switch.is-on .calendar-switch-thumb {
	transform: translateX(20px);
	background: #fff;
}

.calendar-switch-track:hover {
	border-color: var(--accent);
}

.year-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 16px;
	width: 100%;
}

.year-month-card {
	background: var(--bg2);
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 14px;
}

.year-month-title {
	font-family: var(--font-head);
	font-size: 15px;
	margin-bottom: 10px;
	text-transform: capitalize;
}

.year-mini-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
}

.year-mini-label {
	font-size: 10px;
	color: var(--text3);
	text-align: center;
	font-weight: 700;
}

.year-day {
	min-height: 28px;
	border: 1px solid var(--border);
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	color: var(--text2);
	background: var(--bg3);
	cursor: pointer;
	transition: transform 0.12s, border-color 0.12s;
}

.year-day:hover {
	transform: translateY(-1px);
	border-color: var(--border-light);
}

.year-day.today {
	color: var(--accent);
	border-color: var(--accent);
}

.year-day.has-tasks {
	color: var(--text);
	font-weight: 700;
}

.year-day.empty {
	visibility: hidden;
}

/* ─── LIST TABLE ─────────────────────────────────────────────────────────── */
.list-container {
	overflow-x: auto;
}

.task-table {
	width: 100%;
	border-collapse: collapse;
}

.task-table th {
	text-align: left;
	padding: 10px 14px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--text3);
	border-bottom: 1px solid var(--border);
	white-space: nowrap;
}

.task-table td {
	padding: 12px 14px;
	border-bottom: 1px solid var(--border);
	vertical-align: middle;
}

.task-table tr:hover td {
	background: var(--bg3);
}

.task-table tr:hover .row-actions {
	opacity: 1;
}

.row-actions {
	opacity: 0;
	transition: opacity 0.2s;
	display: flex;
	gap: 4px;
}

.status-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 8px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 600;
	white-space: nowrap;
}

.status-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
}

/* ─── DASHBOARD ──────────────────────────────────────────────────────────── */
.dashboard-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 20px;
}

.stat-card {
	background: var(--bg2);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 24px;
}

.stat-card h4 {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--text3);
	margin-bottom: 12px;
}

.stat-big {
	font-family: var(--font-head);
	font-size: 40px;
	font-weight: 800;
	color: var(--text);
	line-height: 1;
	margin-bottom: 4px;
}

.stat-sub {
	color: var(--text2);
	font-size: 13px;
}

.stat-bar-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.stat-bar-row {
	display: flex;
	align-items: center;
	gap: 10px;
}

.stat-bar-label {
	width: 90px;
	font-size: 12px;
	color: var(--text2);
	white-space: nowrap;
}

.stat-bar-track {
	flex: 1;
	background: var(--bg4);
	border-radius: 4px;
	height: 6px;
	overflow: hidden;
}

.stat-bar-fill {
	height: 100%;
	border-radius: 4px;
	transition: width 1s ease;
}

.stat-bar-val {
	font-size: 12px;
	font-weight: 600;
	color: var(--text);
	width: 28px;
	text-align: right;
}

.client-stat-grid {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.client-stat-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 14px;
	background: var(--bg3);
	border-radius: 8px;
	border: 1px solid var(--border);
	cursor: pointer;
	transition: border-color 0.2s;
}

.client-stat-row:hover {
	border-color: var(--border-light);
}

.client-stat-name {
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 8px;
}

.client-stat-nums {
	font-size: 12px;
	color: var(--text2);
	display: flex;
	gap: 16px;
}

/* ─── TASK MODAL ─────────────────────────────────────────────────────────── */
.modal {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
}

.modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.7);
	backdrop-filter: blur(4px);
}

.modal-panel {
	position: relative;
	background: var(--bg2);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	width: min(1280px, 96vw);
	max-height: 92vh;
	display: flex;
	flex-direction: column;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
	animation: modalIn 0.2s ease;
}

.modal-panel-sm {
	width: min(560px, 95vw);
}

@keyframes modalIn {
	from {
		opacity: 0;
		transform: scale(0.96) translateY(8px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

.modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px;
	border-bottom: 1px solid var(--border);
}

.modal-header h3 {
	font-family: var(--font-head);
	font-size: 18px;
	font-weight: 700;
}

.modal-close {
	color: var(--text3);
	font-size: 20px;
	padding: 4px 8px;
	border-radius: 6px;
	transition: color 0.2s, background 0.2s;
}

.modal-close:hover {
	color: var(--text);
	background: var(--bg3);
}

.modal-body {
	flex: 1;
	overflow-y: auto;
	padding: 24px;
}

.modal-footer {
	padding: 16px 24px;
	border-top: 1px solid var(--border);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.modal-actions {
	display: flex;
	gap: 10px;
}

.task-modal-layout {
	display: grid;
	grid-template-columns: minmax(380px, 0.95fr) minmax(480px, 1.25fr);
	gap: 0;
	min-height: 68vh;
}

.task-modal-left,
.task-modal-right,
.comments-thread-list {
	min-height: 0;
}

.task-modal-left {
	padding-right: 24px;
	border-right: 1px solid var(--border);
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
	padding-bottom: 24px;
}

.task-modal-right {
	padding-left: 24px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	padding-bottom: 24px;
}

.task-panel-section {
	background: rgba(255, 255, 255, 0.01);
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 16px;
}

.task-panel-section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
}

.task-panel-section-head h4 {
	font-family: var(--font-head);
	font-size: 13px;
	font-weight: 700;
	color: var(--text2);
}

#time-tracking-section {
	margin-top: auto;
}

.form-group {
	margin-bottom: 16px;
}

.form-group:last-child {
	margin-bottom: 0;
}

.form-group label {
	display: block;
	font-size: 12px;
	color: var(--text2);
	margin-bottom: 6px;
	font-weight: 500;
}

.form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.form-help,
.field-note {
	font-size: 12px;
	color: var(--text3);
	margin-top: 8px;
}

.checkbox-line {
	display: flex;
	align-items: center;
	gap: 10px;
}

.admin-divider {
	height: 1px;
	background: var(--border);
	margin: 18px 0;
}

/* ─── TIME LOGS ──────────────────────────────────────────────────────────── */
#time-logs-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 12px;
}

.timelog-item {
	background: var(--bg3);
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 8px 10px;
	font-size: 12px;
}

.timelog-hours {
	font-weight: 700;
	color: var(--accent2);
}

.timelog-form {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.timelog-form input {
	font-size: 13px;
}

/* ─── CONVERSATION ───────────────────────────────────────────────────────── */
.conversation-panel {
	display: flex;
	flex-direction: column;
	min-height: 100%;
	height: 100%;
}

.conversation-header {
	padding-bottom: 12px;
	border-bottom: 1px solid var(--border);
	margin-bottom: 12px;
}

.conversation-header h4 {
	font-family: var(--font-head);
	font-size: 16px;
	font-weight: 700;
	color: var(--text);
	margin-bottom: 4px;
}

.conversation-subtitle {
	font-size: 12px;
	color: var(--text3);
}

.comment-composer-toolbar {
	display: flex;
	gap: 8px;
	margin-bottom: 10px;
}

.reply-preview {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 8px 10px;
	margin-bottom: 10px;
	background: var(--bg3);
	border: 1px solid var(--border);
	border-radius: 10px;
}

.reply-preview-content {
	font-size: 12px;
	color: var(--text2);
}

.comment-thread-item {
	position:relative;
	display: flex;
	align-items: flex-start;
	gap: 8px;
	max-width: 100%;
}

.comment-thread-item.level-1,
.comment-thread-item.level-2,
.comment-thread-item.level-3 {
	margin-left: 14px;
}

.comment-avatar {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--bg4);
	border: 1px solid var(--border);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 700;
	color: var(--text);
	flex-shrink: 0;
	margin-top: 1px;
}

.comment-bubble-wrap {
	max-width: min(82%, 720px);
	min-width: 0;
	display: flex;
	flex-direction: column;
	position: relative;
	overflow: visible;
	padding-bottom: 18px;
}

.comment-bubble-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-bottom: 3px;
}

.comment-bubble-actions .btn-ghost:hover {
	background: var(--bg3);
}

.comment-author-name {
	font-weight: 700;
	color: var(--text);
	font-size: 12px;
}

.comment-author-role {
	font-size: 10px;
	color: var(--text2);
	background: var(--bg4);
	padding: 1px 6px;
	border-radius: 999px;
}

.comment-date {
	font-size: 10px;
	color: var(--text3);
}

.comment-type-chip {
	font-size: 10px;
	font-weight: 700;
	padding: 1px 6px;
	border-radius: 999px;
	background: rgba(245, 158, 11, 0.14);
	color: var(--prio-high);
}

.comment-type-chip.public {
	background: rgba(109, 106, 255, 0.14);
	color: var(--accent);
}

.comment-bubble-body {
	background: var(--bg3);
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 8px 10px;
	font-size: 13px;
	color: var(--text);
	line-height: 1.45;
	white-space: pre-wrap;
	word-break: break-word;
	width: fit-content;
	max-width: 100%;
}

.comment-thread-item.is-client-message:not(.is-mine) > .comment-bubble-wrap > .comment-main > .comment-bubble-body {
	background: rgba(0, 229, 160, 0.07);
	border-color: rgba(0, 229, 160, 0.18);
}

.comment-thread-item.is-mine > .comment-bubble-wrap > .comment-main > .comment-bubble-body {
	background: rgba(109, 106, 255, 0.12);
	border-color: rgba(109, 106, 255, 0.28);
}

.comment-thread-item.is-internal > .comment-bubble-wrap > .comment-main > .comment-bubble-body {
	border-color: rgba(245, 158, 11, 0.35);
	background: rgba(245, 158, 11, 0.07);
}

.comment-mention {
	display: inline-flex;
	margin-right: 6px;
	font-weight: 700;
	color: var(--accent);
}

.comment-bubble-actions .btn-ghost {
	padding: 2px 6px;
	font-size: 11px;
	line-height: 1.2;
	border-radius: 999px;
}

.comment-children {
	margin-top: 4px;
	width: 100%;
}

.comment-form {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.comment-form textarea {
	min-height: 96px;
	border-radius: 14px;
	padding: 12px 14px;
}

.conversation-composer {
	border-top: 1px solid var(--border);
	padding-top: 12px;
	margin-top: 6px;
	background: linear-gradient(
		to bottom,
		rgba(19, 22, 30, 0),
		rgba(19, 22, 30, 0.55) 18%,
		rgba(19, 22, 30, 1) 100%
	);
}

.conversation-actions {
	display: flex;
	justify-content: flex-end;
}

.composer-footer {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

.composer-tools {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.composer-tools select {
	width: auto;
	min-width: 170px;
}

.file-upload-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 12px;
	border-radius: 999px;
	background: var(--bg3);
	border: 1px solid var(--border);
	color: var(--text2);
	font-size: 13px;
	cursor: pointer;
	transition: all 0.2s ease;
	white-space: nowrap;
}

.file-upload-btn:hover {
	background: var(--bg4);
	color: var(--text);
	border-color: var(--accent);
}

#selected-files-preview {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.file-preview-item {
	font-size: 12px;
	color: var(--text2);
	background: var(--bg3);
	border: 1px solid var(--border);
	border-radius: 999px;
	padding: 5px 10px;
}

/* ─── NOTIFICATIONS ──────────────────────────────────────────────────────── */
.notifications-wrap {
	position: relative;
}

.notifications-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
}

.notifications-badge {
	position: absolute;
	top: 2px;
	right: 2px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--accent3);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.notifications-dropdown {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	width: 380px;
	max-height: 420px;
	overflow: hidden;
	background: var(--bg2);
	border: 1px solid var(--border);
	border-radius: 14px;
	box-shadow: var(--shadow);
	z-index: 50;
}

.notifications-dropdown-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	border-bottom: 1px solid var(--border);
}

.notifications-list {
	max-height: 360px;
	overflow-y: auto;
}

.notification-item {
	padding: 14px 16px;
	border-bottom: 1px solid var(--border);
	cursor: pointer;
	transition: background 0.15s ease;
}

.notification-item:hover {
	background: var(--bg3);
}

.notification-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 6px;
}

.notification-author {
	font-size: 12px;
	font-weight: 700;
	color: var(--text);
}

.notification-date {
	font-size: 11px;
	color: var(--text3);
	white-space: nowrap;
}

.notification-task {
	font-size: 12px;
	color: var(--accent);
	margin-bottom: 4px;
	font-weight: 600;
}

.notification-content {
	font-size: 12px;
	color: var(--text2);
	line-height: 1.45;
}

.notifications-empty {
	padding: 18px 16px;
	color: var(--text2);
	font-size: 13px;
}

/* ─── DAY MODAL / CALENDAR DETAILS ──────────────────────────────────────── */
.day-task-item {
	background: var(--bg3);
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 12px;
	margin-bottom: 10px;
	cursor: pointer;
	transition: border-color 0.15s, transform 0.15s;
}

.day-task-item:hover {
	border-color: var(--border-light);
	transform: translateY(-1px);
}

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

.day-task-client {
	display: inline-flex;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 999px;
}

.day-task-title {
	font-weight: 700;
	color: var(--text);
	margin-bottom: 6px;
}

.day-task-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	font-size: 12px;
	color: var(--text2);
	margin-bottom: 6px;
}

.day-task-desc {
	font-size: 12px;
	color: var(--text3);
}

.empty-day-state {
	color: var(--text2);
	padding: 10px 0;
}

/* ─── UTILS ──────────────────────────────────────────────────────────────── */
.select-muted {
	color: var(--text2);
}

/* ─── SCROLLBAR ──────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
	width: 6px;
	height: 6px;
}

::-webkit-scrollbar-track {
	background: transparent;
}

::-webkit-scrollbar-thumb {
	background: var(--border);
	border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
	background: var(--border-light);
}

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
	.calendar-task-bar-meta {
		display: none;
	}
}

@media (max-width: 1100px) {
	.task-modal-layout {
		grid-template-columns: 1fr;
	}

	.task-modal-left {
		border-right: none;
		padding-right: 0;
		padding-bottom: 20px;
		border-bottom: 1px solid var(--border);
	}

	.task-modal-right {
		padding-left: 0;
		padding-top: 20px;
	}

	.comments-thread-list {
		min-height: 260px;
	}
}

@media (max-width: 900px) {
	.calendar-header {
		width: 100%;
	}

	.calendar-range-switcher {
		width: 100%;
	}

	.calendar-range-switcher .btn-ghost {
		flex: 1 1 auto;
		text-align: center;
	}

	.calendar-range-body {
		overflow-x: auto;
	}
}

@media (max-width: 700px) {
	.calendar-range-head-num {
		font-size: 15px;
	}

	.calendar-task-bar {
		font-size: 11px;
		padding: 0 8px;
	}
}

@media (max-width: 640px) {
	.calendar-grid-month {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.cal-day-label {
		display: none;
	}

	.year-grid {
		grid-template-columns: 1fr;
	}
}

/* ─── COMMENTS ──────────────────────────────────────────────────────────── */
.comment-attachments-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 8px;
}

.comment-attachment {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 10px;
	border: 1px solid var(--border);
	border-radius: 10px;
	background: var(--bg2);
	color: var(--text2);
	font-size: 12px;
	width: fit-content;
	max-width: 100%;
}

.comment-attachment:hover {
	border-color: var(--accent);
	color: var(--text);
}

.comment-reactions-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 8px;
}

.comment-reaction-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 8px;
	border-radius: 999px;
	background: var(--bg4);
	border: 1px solid var(--border);
	color: var(--text);
	font-size: 12px;
	line-height: 1;
}

.comment-reaction-chip.active {
	border-color: rgba(109, 106, 255, 0.4);
	background: rgba(109, 106, 255, 0.12);
	color: var(--accent);
}

.comment-bubble-actions {
	position: absolute;
	left: 0;
	top: calc(100% - 0px);
	z-index: 30;
	opacity: 0;
	pointer-events: none;
	transform: translateY(0);
	transition: opacity .15s ease, transform .15s ease;
}

.comment-main:hover > .comment-bubble-actions,
.comment-main:focus-within > .comment-bubble-actions,
.comment-bubble-actions:hover {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0);
}

.comment-actions-toolbar {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 8px;
	border-radius: 999px;
	background: var(--bg2);
	border: 1px solid var(--border);
	box-shadow: var(--shadow-sm);
	white-space: nowrap;
}

.comment-quick-reaction-btn {
	width: 30px;
	height: 30px;
	padding: 0;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: none;
	font-size: 16px;
	line-height: 1;
	font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
	transition: transform .12s ease, background .12s ease;
}

.comment-quick-reaction-btn:hover {
	background: var(--bg3);
	transform: scale(1.08);
}

/* ─── TASK MODAL LAYOUT IMPROVEMENTS ───────────────────────────────────── */

#task-modal .modal-body {
	overflow: hidden;
}

.task-modal-layout {
	display: grid;
	grid-template-columns: minmax(420px, 1fr) minmax(0, 520px);
	gap: 0;
	min-height: 68vh;
	height: 68vh;
	align-items: stretch;
}

.task-modal-layout.is-create-mode {
	grid-template-columns: minmax(0, 1fr);
}

.task-modal-layout.is-create-mode .task-modal-right {
	display: none;
}

.task-modal-layout.is-create-mode .task-modal-left {
	border-right: none;
	padding-right: 0;
}

.task-modal-layout.is-conversation-collapsed {
	grid-template-columns: minmax(0, 1fr) 64px;
}

.task-modal-layout.is-conversation-collapsed .task-modal-right {
	padding-left: 12px;
}

.task-modal-layout.is-conversation-collapsed .conversation-panel > *:not(.conversation-header) {
	display: none;
}

.task-modal-left {
	padding-right: 24px;
	border-right: 1px solid var(--border);
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
}

.task-modal-right {
	padding-left: 24px;
	min-width: 0;
	min-height: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.conversation-panel {
	display: flex;
	flex-direction: column;
	min-height: 0;
	height: 100%;
}

.comments-thread-list {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
	padding-right: 6px;
	padding-bottom: 40px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.conversation-composer {
	flex-shrink: 0;
}

.conversation-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--border);
	margin-bottom: 12px;
}

.conversation-toggle-btn {
	white-space: nowrap;
	flex-shrink: 0;
}

.task-modal-layout.is-conversation-collapsed .conversation-header {
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	padding-bottom: 0;
	border-bottom: none;
	margin-bottom: 0;
	height: 100%;
}

.task-modal-layout.is-conversation-collapsed .conversation-header h4,
.task-modal-layout.is-conversation-collapsed .conversation-subtitle {
	display: none;
}

.task-modal-layout.is-conversation-collapsed .conversation-toggle-btn {
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	height: 100%;
	min-height: 220px;
	padding: 12px 8px;
}

.comment-actions-toolbar {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 8px;
	border-radius: 999px;
	background: var(--bg2);
	border: 1px solid var(--border);
	box-shadow: var(--shadow-sm);
	white-space: nowrap;
}

.comment-actions-separator {
	width: 1px;
	height: 18px;
	background: var(--border);
	margin: 0 2px;
}

.comment-quick-reaction-inline {
	width: 28px;
	height: 28px;
	padding: 0;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	line-height: 1;
}

.comment-quick-reaction-inline:hover {
	background: var(--bg3);
	transform: scale(1.08);
}

.comment-main {
	position: relative;
	display: flex;
	flex-direction: column;
	width: fit-content;
	max-width: 100%;
}

.comment-thread-item.is-mine {
	flex-direction: row;
	justify-content: flex-start;
}

.comment-thread-item.is-mine.level-1,
.comment-thread-item.is-mine.level-2,
.comment-thread-item.is-mine.level-3 {
	margin-left: 14px;
	margin-right: 0;
}

.comment-thread-item.is-mine .comment-bubble-wrap {
	margin-left: 0;
	align-items: flex-start;
}

.comment-thread-item.is-mine .comment-main {
	margin-left: 0;
	align-items: flex-start;
}

.comment-thread-item.is-mine .comment-bubble-head {
	justify-content: flex-start;
}

.comment-thread-item.is-mine .comment-bubble-body {
	margin-left: 0;
}

.comment-thread-item.is-mine .comment-reactions-row {
	justify-content: flex-start;
}

.comment-thread-item.is-mine .comment-attachments-list {
	align-items: flex-start;
}

.comment-thread-item.is-mine .comment-bubble-actions {
	left: 0;
	right: auto;
}

.comment-thread-item.is-mine .comment-reaction-picker {
	left: 0;
	right: auto;
}

#selected-files-preview {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
}

.selected-file-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	max-width: 100%;
	padding: 6px 10px;
	border-radius: 999px;
	background: var(--bg3);
	border: 1px solid var(--border);
	color: var(--text2);
	font-size: 12px;
}

.selected-file-name {
	max-width: 220px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.selected-file-remove-btn {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--text3);
	font-size: 12px;
	padding: 0;
}

.selected-file-remove-btn:hover {
	background: var(--bg4);
	color: var(--text);
}

.kanban-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.kanban-mode-count {
  --progress: 0;
  --size: 34px;
  --thickness: 3px;
  --track: rgba(255, 255, 255, 0.10);
  --fill: #6d6aff;

  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--size);
  height: var(--size);
  min-width: var(--size);
  border-radius: 999px;

  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  color: var(--text2);
  background:
    radial-gradient(
      closest-side,
      var(--bg2, #111827) calc(100% - var(--thickness)),
      transparent calc(100% - var(--thickness) + 1px)
    ),
    conic-gradient(
      var(--fill) calc(var(--progress) * 1%),
      var(--track) 0
    );

  transition:
    background 0.45s ease,
    transform 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.kanban-mode-count.is-complete {
  --fill: #10b981;
  color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.10);
}

.kanban-mode-count.is-empty {
  --fill: #5c6380;
  color: var(--text3);
}

.kanban-mode-btn:hover .kanban-mode-count {
  transform: scale(1.06);
}

.kanban-mode-count {
  animation: kanbanCountPop 0.35s ease;
}

@keyframes kanbanCountPop {
  0% {
    transform: scale(0.92);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}


.client-required-switch {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 10px;
	border-radius: 999px;
	background: var(--bg3);
	border: 1px solid var(--border);
	color: var(--text2);
	font-size: 13px;
	font-weight: 500;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
	white-space: nowrap;
}

.client-required-switch:hover {
	background: var(--bg4);
	border-color: var(--border-light);
	color: var(--text);
}

.client-required-switch:active {
	transform: translateY(1px);
}

.client-required-switch-label {
	line-height: 1;
}

.client-required-switch-track {
	position: relative;
	width: 34px;
	height: 20px;
	border-radius: 999px;
	background: var(--bg4);
	border: 1px solid var(--border-light);
	transition: background 0.2s ease, border-color 0.2s ease;
	flex-shrink: 0;
}

.client-required-switch-thumb {
	position: absolute;
	top: 2px;
	left: 2px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--text2);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
	transition: transform 0.2s ease, background 0.2s ease;
}

.client-required-switch.active {
	background: rgba(255, 107, 107, 0.10);
	border-color: rgba(255, 107, 107, 0.28);
	color: var(--text);
}

.client-required-switch.active .client-required-switch-track {
	background: rgba(255, 107, 107, 0.28);
	border-color: rgba(255, 107, 107, 0.45);
}

.client-required-switch.active .client-required-switch-thumb {
	transform: translateX(14px);
	background: #fff;
}

.client-required-switch.active .client-required-switch-label {
	color: var(--accent3);
	font-weight: 600;
}