/* ==========================================================================
   Inymize Internal CRM — Enterprise SaaS Design System
   Minimalist White • Electric Blue (#176BFF) • Selective Apple Glass • Dark Mode
   ========================================================================== */

:root {
	--bg-canvas: #f8fafc;
	--bg-surface: #ffffff;
	--bg-subtle: #f1f5f9;
	--bg-glass: rgba(255, 255, 255, 0.78);
	--bg-glass-strong: rgba(255, 255, 255, 0.92);
	--ink-primary: #081437;
	--ink-secondary: #475569;
	--ink-muted: #64748b;
	--border-hairline: #e2e8f0;
	--border-glass: rgba(255, 255, 255, 0.85);
	--blue-primary: #176bff;
	--blue-hover: #0e56d6;
	--blue-cyan: #0ea5ff;
	--blue-soft: #eff6ff;
	--blue-soft-border: #bfdbfe;
	--green-ok: #059669;
	--green-soft: #ecfdf5;
	--amber-warn: #d97706;
	--amber-soft: #fffbeb;
	--red-danger: #dc2626;
	--red-soft: #fef2f2;
	--purple-accent: #7c3aed;
	--purple-soft: #f5f3ff;
	--shadow-xs: 0 1px 2px rgba(8, 20, 55, 0.04);
	--shadow-sm: 0 4px 14px rgba(8, 20, 55, 0.05);
	--shadow-lg: 0 20px 50px -12px rgba(8, 20, 55, 0.14);
	--radius-sm: 8px;
	--radius-md: 12px;
	--radius-lg: 16px;
	--radius-xl: 20px;
	--sidebar-w: 262px;
	--topbar-h: 66px;
	color-scheme: light;
}

[data-theme="dark"] {
	--bg-canvas: #090f1d;
	--bg-surface: #11192c;
	--bg-subtle: #18233c;
	--bg-glass: rgba(17, 25, 44, 0.82);
	--bg-glass-strong: rgba(17, 25, 44, 0.96);
	--ink-primary: #f1f5f9;
	--ink-secondary: #cbd5e1;
	--ink-muted: #94a3b8;
	--border-hairline: rgba(148, 163, 184, 0.18);
	--border-glass: rgba(148, 163, 184, 0.22);
	--blue-primary: #3b82f6;
	--blue-hover: #2563eb;
	--blue-cyan: #38bdf8;
	--blue-soft: rgba(59, 130, 246, 0.16);
	--blue-soft-border: rgba(59, 130, 246, 0.35);
	--green-ok: #34d399;
	--green-soft: rgba(16, 185, 129, 0.16);
	--amber-warn: #fbbf24;
	--amber-soft: rgba(245, 158, 11, 0.16);
	--red-danger: #f87171;
	--red-soft: rgba(239, 68, 68, 0.16);
	--purple-accent: #a78bfa;
	--purple-soft: rgba(139, 92, 246, 0.16);
	--shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
	--shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.3);
	--shadow-lg: 0 24px 55px rgba(0, 0, 0, 0.55);
	color-scheme: dark;
}

*, *::before, *::after {
	box-sizing: border-box;
}

html, body {
	margin: 0;
	padding: 0;
	min-height: 100%;
	background: var(--bg-canvas);
	color: var(--ink-primary);
	font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

a {
	color: var(--blue-primary);
	text-decoration: none;
}

button, input, select, textarea {
	font: inherit;
	color: inherit;
}

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

.hidden {
	display: none !important;
}

.tabular {
	font-variant-numeric: tabular-nums;
}

.glass-panel {
	background: var(--bg-glass);
	backdrop-filter: blur(20px) saturate(160%);
	-webkit-backdrop-filter: blur(20px) saturate(160%);
	border: 1px solid var(--border-glass);
	box-shadow: var(--shadow-lg);
}

.glass-header {
	background: var(--bg-glass);
	backdrop-filter: blur(18px) saturate(160%);
	-webkit-backdrop-filter: blur(18px) saturate(160%);
	border-bottom: 1px solid var(--border-hairline);
}

/* Brand Lockup */
.inymize-brand-lockup {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: var(--ink-primary);
}
.brand-text-wrap {
	display: flex;
	flex-direction: column;
	line-height: 1.1;
}
.brand-wordmark {
	font-size: 19px;
	font-weight: 800;
	letter-spacing: -0.03em;
	color: var(--ink-primary);
}
.brand-sub {
	font-size: 10.5px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--blue-primary);
}
.custom-crm-logo-mark {
	width: 36px;
	height: 36px;
	border-radius: 10px;
	object-fit: cover;
	flex-shrink: 0;
	background: var(--bg-surface);
	border: 1px solid var(--border-subtle);
}
.custom-crm-logo-full {
	max-height: 40px;
	max-width: 176px;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
}
.login-header .custom-crm-logo-full {
	max-height: 46px;
	max-width: 240px;
}
.brand-preview-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 12px;
	margin-top: 10px;
}
.brand-preview-box {
	padding: 16px 18px;
	border-radius: 12px;
	border: 1px solid var(--border-subtle);
	display: flex;
	align-items: center;
	min-height: 72px;
}
.brand-preview-box.light {
	background: #FFFFFF;
	color: #0F172A;
}
.brand-preview-box.light .brand-wordmark { color: #0F172A; }
.brand-preview-box.dark {
	background: #0F172A;
	color: #F8FAFC;
	border-color: #1E293B;
}
.brand-preview-box.dark .brand-wordmark { color: #F8FAFC; }

/* ==========================================================================
   Login Screen
   ========================================================================== */
.inymize-login-body {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	position: relative;
	overflow-x: hidden;
}
.inymize-login-bg {
	position: fixed;
	inset: 0;
	pointer-events: none;
	overflow: hidden;
	z-index: 0;
}
.login-orb {
	position: absolute;
	border-radius: 999px;
	filter: blur(85px);
	opacity: 0.25;
}
.login-orb-1 {
	width: 460px;
	height: 460px;
	background: #176bff;
	top: -120px;
	left: -80px;
}
.login-orb-2 {
	width: 420px;
	height: 420px;
	background: #0ea5ff;
	bottom: -140px;
	right: -80px;
}
.inymize-login-shell {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 480px;
}
.login-card {
	border-radius: var(--radius-xl);
	padding: 28px;
}
.login-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
}
.login-intro h1 {
	margin: 0 0 6px;
	font-size: 22px;
	font-weight: 700;
	letter-spacing: -0.02em;
}
.login-intro p {
	margin: 0 0 18px;
	color: var(--ink-secondary);
	font-size: 13.5px;
}
.login-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.password-input-wrap {
	position: relative;
	display: flex;
	align-items: center;
}
.password-input-wrap input {
	padding-right: 60px;
}
.pwd-eye-btn {
	position: absolute;
	right: 10px;
	background: transparent;
	border: none;
	color: var(--blue-primary);
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
}
.login-options {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 12.5px;
	color: var(--ink-secondary);
}
.checkbox-inline {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
}
.dhaka-badge {
	padding: 3px 8px;
	border-radius: 999px;
	background: var(--blue-soft);
	color: var(--blue-primary);
	font-size: 11px;
	font-weight: 600;
}
.demo-roles-box {
	margin-top: 18px;
	border: 1px solid var(--border-hairline);
	border-radius: var(--radius-md);
	padding: 10px 12px;
	background: var(--bg-surface);
}
.demo-roles-box summary {
	cursor: pointer;
	font-size: 12px;
	font-weight: 600;
	color: var(--ink-secondary);
}
.demo-roles-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 6px;
	margin-top: 10px;
	max-height: 220px;
	overflow-y: auto;
}
.demo-role-chip {
	text-align: left;
	padding: 7px 9px;
	border-radius: 8px;
	border: 1px solid var(--border-hairline);
	background: var(--bg-canvas);
	cursor: pointer;
	display: flex;
	flex-direction: column;
	gap: 1px;
	transition: border-color 0.15s ease, background 0.15s ease;
}
.demo-role-chip:hover {
	border-color: var(--blue-primary);
	background: var(--blue-soft);
}
.demo-role-chip strong {
	font-size: 11.5px;
	color: var(--ink-primary);
}
.demo-role-chip span {
	font-size: 10.5px;
	color: var(--ink-muted);
}
.login-brand-footer {
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid var(--border-hairline);
	text-align: center;
}
.brand-strip-img {
	max-width: 100%;
	height: 28px;
	object-fit: contain;
	border-radius: 4px;
	background: #ffffff;
	padding: 2px 6px;
}
.login-legal {
	margin: 8px 0 0;
	font-size: 11px;
	color: var(--ink-muted);
}

/* ==========================================================================
   App Shell Layout
   ========================================================================== */
.app-shell {
	display: flex;
	min-height: 100vh;
}
.app-sidebar {
	width: var(--sidebar-w);
	flex-shrink: 0;
	background: var(--bg-surface);
	border-right: 1px solid var(--border-hairline);
	display: flex;
	flex-direction: column;
	position: sticky;
	top: 0;
	height: 100vh;
	z-index: 40;
	transition: transform 0.22s ease;
}
.sidebar-top {
	padding: 16px 18px 12px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.sidebar-role-strip {
	margin: 0 14px 10px;
	padding: 6px 10px;
	border-radius: 999px;
	background: var(--blue-soft);
	border: 1px solid var(--blue-soft-border);
	color: var(--blue-primary);
	font-size: 11.5px;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 7px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.role-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--blue-primary);
	flex-shrink: 0;
}
.sidebar-nav {
	flex: 1;
	overflow-y: auto;
	padding: 6px 10px;
	display: flex;
	flex-direction: column;
	gap: 3px;
}
.nav-section-lbl {
	font-size: 10.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: var(--ink-muted);
	padding: 10px 10px 4px;
}
.nav-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 11px;
	border-radius: 10px;
	border: none;
	background: transparent;
	color: var(--ink-secondary);
	font-weight: 500;
	font-size: 13.5px;
	cursor: pointer;
	width: 100%;
	text-align: left;
	transition: background 0.15s ease, color 0.15s ease;
}
.nav-item:hover {
	background: var(--bg-subtle);
	color: var(--ink-primary);
}
.nav-item.active {
	background: var(--blue-soft);
	color: var(--blue-primary);
	font-weight: 600;
}
.nav-item svg {
	width: 17px;
	height: 17px;
	flex-shrink: 0;
}
.nav-pill-count {
	margin-left: auto;
	padding: 1px 7px;
	border-radius: 999px;
	background: var(--blue-primary);
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
}
.sidebar-footer {
	padding: 12px 14px;
	border-top: 1px solid var(--border-hairline);
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.profile-mini-card {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px;
	border-radius: 10px;
	border: 1px solid var(--border-hairline);
	background: var(--bg-canvas);
	cursor: pointer;
	width: 100%;
	text-align: left;
}
.profile-mini-card:hover {
	border-color: var(--blue-primary);
}
.profile-mini-meta {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}
.profile-mini-meta strong {
	font-size: 12.5px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.profile-mini-meta small {
	font-size: 11px;
	color: var(--ink-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.sidebar-footer-actions {
	display: flex;
	gap: 6px;
}

.app-main {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}
.app-topbar {
	height: var(--topbar-h);
	position: sticky;
	top: 0;
	z-index: 30;
	padding: 0 22px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
}
.topbar-left {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}
.topbar-title {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	letter-spacing: -0.02em;
}
.topbar-sub {
	margin: 0;
	font-size: 12px;
	color: var(--ink-muted);
}
.topbar-right {
	display: flex;
	align-items: center;
	gap: 10px;
}
.global-search-wrap {
	position: relative;
	width: 270px;
}
.global-search-wrap .search-icon {
	position: absolute;
	left: 11px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--ink-muted);
	pointer-events: none;
}
.global-search-wrap input {
	width: 100%;
	padding: 7px 12px 7px 32px;
	border-radius: 999px;
	border: 1px solid var(--border-hairline);
	background: var(--bg-surface);
	font-size: 12.5px;
}
.search-dropdown {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	width: 360px;
	max-height: 380px;
	overflow-y: auto;
	border-radius: var(--radius-md);
	background: var(--bg-surface);
	border: 1px solid var(--border-hairline);
	box-shadow: var(--shadow-lg);
	z-index: 50;
	padding: 6px;
}
.search-hit {
	display: flex;
	flex-direction: column;
	padding: 8px 10px;
	border-radius: 8px;
	cursor: pointer;
	border: none;
	background: transparent;
	width: 100%;
	text-align: left;
}
.search-hit:hover {
	background: var(--blue-soft);
}
.search-hit strong {
	font-size: 13px;
}
.search-hit small {
	font-size: 11.5px;
	color: var(--ink-muted);
}

.btn-punch {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 7px 13px;
	border-radius: 999px;
	border: 1px solid var(--blue-soft-border);
	background: var(--blue-soft);
	color: var(--blue-primary);
	font-size: 12.5px;
	font-weight: 600;
	cursor: pointer;
}
.btn-punch.checked-in {
	background: var(--green-soft);
	border-color: rgba(5, 150, 105, 0.35);
	color: var(--green-ok);
}
.pulse-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: currentColor;
}

.notif-trigger {
	position: relative;
}
.notif-badge {
	position: absolute;
	top: 2px;
	right: 2px;
	min-width: 17px;
	height: 17px;
	padding: 0 4px;
	border-radius: 999px;
	background: var(--red-danger);
	color: #ffffff;
	font-size: 10px;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.app-content {
	padding: 22px;
	flex: 1;
	max-width: 1580px;
	width: 100%;
	margin: 0 auto;
}

/* ==========================================================================
   Common UI Components (Cards, Buttons, Forms, Tables, Badges)
   ========================================================================== */
.avatar-circle {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--blue-primary);
	color: #ffffff;
	font-weight: 700;
	font-size: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.avatar-sm {
	width: 26px;
	height: 26px;
	font-size: 10.5px;
}

.btn-primary, .btn-secondary, .btn-danger, .btn-success, .btn-ghost-sm, .btn-icon-ghost {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	border-radius: 9px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.15s ease;
	border: 1px solid transparent;
}
.btn-primary {
	background: var(--blue-primary);
	color: #ffffff;
	padding: 8px 15px;
	font-size: 13px;
}
.btn-primary:hover {
	background: var(--blue-hover);
}
.btn-secondary {
	background: var(--bg-surface);
	border-color: var(--border-hairline);
	color: var(--ink-primary);
	padding: 8px 14px;
	font-size: 13px;
}
.btn-secondary:hover {
	border-color: var(--blue-primary);
	color: var(--blue-primary);
}
.btn-success {
	background: var(--green-ok);
	color: #ffffff;
	padding: 7px 13px;
	font-size: 12.5px;
}
.btn-danger {
	background: var(--red-soft);
	border-color: rgba(220, 38, 38, 0.3);
	color: var(--red-danger);
	padding: 7px 13px;
	font-size: 12.5px;
}
.btn-ghost-sm {
	background: transparent;
	border: 1px solid var(--border-hairline);
	color: var(--ink-secondary);
	padding: 5px 10px;
	font-size: 12px;
}
.btn-ghost-sm:hover {
	border-color: var(--blue-primary);
	color: var(--blue-primary);
}
.btn-icon-ghost {
	width: 34px;
	height: 34px;
	background: transparent;
	border: 1px solid var(--border-hairline);
	color: var(--ink-secondary);
}
.btn-icon-ghost:hover {
	border-color: var(--blue-primary);
	color: var(--blue-primary);
}
.btn-block { width: 100%; }
.btn-lg { padding: 11px 18px; font-size: 14px; }
.btn-sm { padding: 5px 10px; font-size: 12px; }

.card {
	background: var(--bg-surface);
	border: 1px solid var(--border-hairline);
	border-radius: var(--radius-lg);
	padding: 18px;
	box-shadow: var(--shadow-xs);
}
.card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 14px;
}
.card-title {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: -0.01em;
}
.card-sub {
	font-size: 12px;
	color: var(--ink-muted);
}

.page-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 18px;
}
.filter-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}
.tab-pills {
	display: inline-flex;
	background: var(--bg-subtle);
	padding: 4px;
	border-radius: 10px;
	gap: 3px;
}
.tab-pill {
	border: none;
	background: transparent;
	padding: 6px 12px;
	border-radius: 7px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--ink-secondary);
	cursor: pointer;
}
.tab-pill.active {
	background: var(--bg-surface);
	color: var(--blue-primary);
	box-shadow: var(--shadow-xs);
}

/* Form Elements */
.form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}
.form-field {
	display: flex;
	flex-direction: column;
	gap: 5px;
}
.form-field.full {
	grid-column: 1 / -1;
}
.form-field label {
	font-size: 12px;
	font-weight: 600;
	color: var(--ink-secondary);
}
.form-field input, .form-field select, .form-field textarea, .filter-input {
	width: 100%;
	padding: 8px 11px;
	border-radius: 9px;
	border: 1px solid var(--border-hairline);
	background: var(--bg-surface);
	font-size: 13px;
}
.filter-input {
	width: auto;
	min-width: 135px;
	padding: 7px 10px;
	font-size: 12.5px;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
	border-color: var(--blue-primary);
	outline: none;
	box-shadow: 0 0 0 3px var(--blue-soft);
}

/* KPI Grids & Layouts */
.kpi-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
	gap: 14px;
	margin-bottom: 18px;
}
.kpi-card {
	background: var(--bg-surface);
	border: 1px solid var(--border-hairline);
	border-radius: var(--radius-md);
	padding: 15px 16px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	transition: transform 0.16s ease, border-color 0.16s ease;
}
.kpi-card:hover {
	transform: translateY(-2px);
	border-color: var(--blue-soft-border);
}
.kpi-label {
	font-size: 12px;
	font-weight: 600;
	color: var(--ink-muted);
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.kpi-value {
	font-size: 24px;
	font-weight: 800;
	letter-spacing: -0.025em;
	font-variant-numeric: tabular-nums;
}
.kpi-meta {
	font-size: 11.5px;
	color: var(--ink-secondary);
}

.dash-grid-2 {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin-bottom: 16px;
}
.dash-grid-3 {
	display: grid;
	grid-template-columns: 1.5fr 1fr;
	gap: 16px;
	margin-bottom: 16px;
}

/* Tables */
.table-wrap {
	width: 100%;
	overflow-x: auto;
}
.data-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}
.data-table th {
	text-align: left;
	padding: 10px 12px;
	font-size: 11.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--ink-muted);
	border-bottom: 1px solid var(--border-hairline);
	white-space: nowrap;
}
.data-table td {
	padding: 11px 12px;
	border-bottom: 1px solid var(--border-hairline);
	vertical-align: middle;
}
.data-table tr:last-child td {
	border-bottom: none;
}
.data-table tbody tr:hover {
	background: var(--bg-canvas);
}

/* Badges & Status Pills */
.badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 3px 9px;
	border-radius: 999px;
	font-size: 11.5px;
	font-weight: 600;
	white-space: nowrap;
}
.badge-blue { background: var(--blue-soft); color: var(--blue-primary); }
.badge-green { background: var(--green-soft); color: var(--green-ok); }
.badge-amber { background: var(--amber-soft); color: var(--amber-warn); }
.badge-red { background: var(--red-soft); color: var(--red-danger); }
.badge-purple { background: var(--purple-soft); color: var(--purple-accent); }
.badge-gray { background: var(--bg-subtle); color: var(--ink-secondary); }

.progress-bar {
	width: 100%;
	height: 7px;
	border-radius: 999px;
	background: var(--bg-subtle);
	overflow: hidden;
}
.progress-fill {
	height: 100%;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--blue-primary), var(--blue-cyan));
}

/* Kanban Boards (Tasks & BD Pipeline) */
.kanban-board {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(255px, 1fr);
	gap: 12px;
	overflow-x: auto;
	padding-bottom: 10px;
}
.kanban-col {
	background: var(--bg-subtle);
	border-radius: var(--radius-md);
	padding: 10px;
	min-height: 360px;
	display: flex;
	flex-direction: column;
	gap: 9px;
}
.kanban-col-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 2px 4px 6px;
	font-size: 12.5px;
	font-weight: 700;
}
.kanban-card {
	background: var(--bg-surface);
	border: 1px solid var(--border-hairline);
	border-radius: 10px;
	padding: 11px 12px;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	gap: 7px;
	box-shadow: var(--shadow-xs);
}
.kanban-card:hover {
	border-color: var(--blue-primary);
}
.kanban-card.overdue {
	border-left: 3px solid var(--red-danger);
}

/* Chat / Internal Comms Split View */
.comms-layout {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 16px;
	height: calc(100vh - 180px);
	min-height: 520px;
}
.chat-sidebar {
	background: var(--bg-surface);
	border: 1px solid var(--border-hairline);
	border-radius: var(--radius-lg);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
.chat-channel-list {
	flex: 1;
	overflow-y: auto;
	padding: 8px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.chat-channel-btn {
	border: none;
	background: transparent;
	text-align: left;
	padding: 9px 10px;
	border-radius: 9px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}
.chat-channel-btn:hover { background: var(--bg-subtle); }
.chat-channel-btn.active { background: var(--blue-soft); color: var(--blue-primary); }
.chat-main {
	background: var(--bg-surface);
	border: 1px solid var(--border-hairline);
	border-radius: var(--radius-lg);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
.chat-messages {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.chat-bubble-row {
	display: flex;
	gap: 10px;
	max-width: 82%;
}
.chat-bubble-row.mine {
	margin-left: auto;
	flex-direction: row-reverse;
}
.chat-bubble {
	padding: 9px 13px;
	border-radius: 13px;
	background: var(--bg-subtle);
	font-size: 13px;
}
.chat-bubble-row.mine .chat-bubble {
	background: var(--blue-primary);
	color: #ffffff;
}
.chat-composer {
	padding: 12px 14px;
	border-top: 1px solid var(--border-hairline);
	display: flex;
	gap: 8px;
	align-items: center;
}
.chat-composer input[type="text"] {
	flex: 1;
	padding: 9px 12px;
	border-radius: 999px;
	border: 1px solid var(--border-hairline);
	background: var(--bg-canvas);
}

/* Calendar Grid */
.calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	border: 1px solid var(--border-hairline);
	border-radius: var(--radius-md);
	overflow: hidden;
	background: var(--bg-surface);
}
.cal-dow {
	padding: 8px;
	text-align: center;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	background: var(--bg-subtle);
	border-bottom: 1px solid var(--border-hairline);
	color: var(--ink-muted);
}
.cal-cell {
	min-height: 92px;
	padding: 6px;
	border-right: 1px solid var(--border-hairline);
	border-bottom: 1px solid var(--border-hairline);
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.cal-cell:nth-child(7n) { border-right: none; }
.cal-day-num {
	font-size: 11.5px;
	font-weight: 700;
	color: var(--ink-secondary);
}
.cal-day-num.today {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--blue-primary);
	color: #ffffff;
}
.cal-event-pill {
	font-size: 11px;
	padding: 2px 6px;
	border-radius: 6px;
	background: var(--blue-soft);
	color: var(--blue-primary);
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	border: none;
	text-align: left;
	cursor: pointer;
}

/* Activity Feed & Lists */
.feed-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.feed-item {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--border-hairline);
}
.feed-item:last-child { border-bottom: none; padding-bottom: 0; }
.feed-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--blue-primary);
	margin-top: 6px;
	flex-shrink: 0;
}

/* Drawers & Dialogs */
.drawer-panel {
	position: fixed;
	top: 0;
	right: 0;
	width: 400px;
	max-width: 94vw;
	height: 100vh;
	z-index: 80;
	display: flex;
	flex-direction: column;
	border-left: 1px solid var(--border-hairline);
}
.drawer-wide {
	width: 560px;
}
.drawer-head {
	padding: 16px 18px;
	border-bottom: 1px solid var(--border-hairline);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}
.drawer-head h2 { margin: 0; font-size: 16px; }
.drawer-head-actions { display: flex; gap: 8px; align-items: center; }
.drawer-body {
	flex: 1;
	overflow-y: auto;
	padding: 18px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

dialog.inymize-dialog {
	border: none;
	padding: 0;
	background: transparent;
	max-width: 680px;
	width: 94vw;
	margin: auto;
	overflow: visible;
}
dialog.inymize-dialog::backdrop {
	background: rgba(8, 20, 55, 0.45);
	backdrop-filter: blur(4px);
}
.dialog-card {
	background: var(--bg-surface);
	border: 1px solid var(--border-hairline);
	border-radius: var(--radius-xl);
	box-shadow: var(--shadow-lg);
	overflow: hidden;
}
.dialog-head {
	padding: 16px 20px;
	border-bottom: 1px solid var(--border-hairline);
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.dialog-head h2 { margin: 0; font-size: 16px; }
.dialog-body {
	padding: 20px;
	max-height: 78vh;
	overflow-y: auto;
}

/* Alerts & Toasts */
.alert-banner {
	padding: 10px 12px;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 500;
	margin-bottom: 14px;
}
.alert-error { background: var(--red-soft); color: var(--red-danger); border: 1px solid rgba(220, 38, 38, 0.25); }
.alert-info { background: var(--blue-soft); color: var(--blue-primary); border: 1px solid var(--blue-soft-border); }
.alert-success { background: var(--green-soft); color: var(--green-ok); border: 1px solid rgba(5, 150, 105, 0.25); }
.alert-warn { background: var(--amber-soft); color: var(--amber-warn); border: 1px solid rgba(217, 119, 6, 0.28); }

.input-with-action {
	display: flex;
	gap: 8px;
	align-items: stretch;
}
.input-with-action input {
	flex: 1 1 auto;
	min-width: 0;
}
.credential-preview {
	margin: 10px 0 14px;
	padding: 12px 14px;
	border-radius: 10px;
	background: var(--bg-subtle);
	border: 1px solid var(--border-hairline);
	color: var(--ink-primary);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 12.5px;
	line-height: 1.55;
	white-space: pre-wrap;
	word-break: break-word;
	-webkit-user-select: all;
	user-select: all;
}

.toast-stack {
	position: fixed;
	bottom: 20px;
	right: 20px;
	z-index: 120;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.notif-popup-stack {
	position: fixed;
	top: 76px;
	right: 20px;
	z-index: 115;
	width: min(375px, calc(100vw - 32px));
	display: flex;
	flex-direction: column;
	gap: 10px;
	pointer-events: none;
}
.notif-popup-card {
	pointer-events: auto;
	background: var(--glass-bg);
	-webkit-backdrop-filter: var(--glass-blur);
	backdrop-filter: var(--glass-blur);
	border: 1px solid var(--glass-border);
	border-left: 4px solid var(--blue-primary);
	border-radius: 14px;
	box-shadow: var(--shadow-lg);
	padding: 13px 14px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	animation: notifPopIn 0.24s ease-out;
}
@keyframes notifPopIn {
	from { opacity: 0; transform: translateY(-8px) scale(0.98); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}
.notif-popup-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}
.notif-popup-title {
	font-size: 13.5px;
	font-weight: 700;
	color: var(--ink-primary);
	line-height: 1.3;
}
.notif-popup-body {
	font-size: 12.5px;
	color: var(--ink-secondary);
	line-height: 1.45;
}
.notif-popup-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 4px;
}
.toast-item {
	background: var(--ink-primary);
	color: var(--bg-surface);
	padding: 10px 15px;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 600;
	box-shadow: var(--shadow-lg);
}
.toast-item.error { background: var(--red-danger); color: #ffffff; }
.toast-item.success { background: var(--green-ok); color: #ffffff; }

/* Loading */
.loading-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 70px 20px;
	color: var(--ink-muted);
	gap: 12px;
}
.spinner {
	width: 28px;
	height: 28px;
	border: 3px solid var(--border-hairline);
	border-top-color: var(--blue-primary);
	border-radius: 50%;
	animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive & Mobile */
.mobile-only { display: none; }
.sidebar-backdrop { display: none; }

@media (max-width: 1024px) {
	.dash-grid-2, .dash-grid-3 { grid-template-columns: 1fr; }
	.comms-layout { grid-template-columns: 1fr; height: auto; }
	.global-search-wrap { width: 190px; }
}

@media (max-width: 820px) {
	.mobile-only { display: inline-flex; }
	.app-sidebar {
		position: fixed;
		left: 0;
		top: 0;
		transform: translateX(-100%);
	}
	.app-sidebar.open {
		transform: translateX(0);
	}
	.sidebar-backdrop.open {
		display: block;
		position: fixed;
		inset: 0;
		background: rgba(8, 20, 55, 0.4);
		z-index: 35;
	}
	.global-search-wrap { display: none; }
	.form-grid { grid-template-columns: 1fr; }
	.demo-roles-grid { grid-template-columns: 1fr; }
}

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

@media print {
	.app-sidebar, .app-topbar, .no-print { display: none !important; }
	.app-content { padding: 0; }
	.card { border: 1px solid #ccc; box-shadow: none; }
}
