/* ==========================================================================
   Lavoro — Design System & Visual Styles
   Clean, Minimal, Calm, Spacious, AI-First Productivity Interface
   ========================================================================== */

:root {
	/* Light Mode Palette */
	--canvas: #f8fafc;
	--surface: #ffffff;
	--surface-elevated: #ffffff;
	--surface-subtle: #f1f5f9;
	--surface-hover: #eef2f6;
	--border-subtle: rgba(15, 23, 42, 0.08);
	--border-default: rgba(15, 23, 42, 0.12);
	--border-hover: rgba(15, 23, 42, 0.2);
	--text-primary: #0f172a;
	--text-secondary: #475569;
	--text-muted: #64748b;
	--accent: #3b82f6;
	--accent-hover: #2563eb;
	--accent-subtle: rgba(59, 130, 246, 0.08);
	--accent-border: rgba(59, 130, 246, 0.25);
	--accent-contrast: #ffffff;

	/* Priority & Status */
	--priority-high: #b91c1c;
	--priority-high-bg: rgba(185, 28, 28, 0.08);
	--priority-med: #92400e;
	--priority-med-bg: rgba(180, 83, 9, 0.08);
	--priority-low: #047857;
	--priority-low-bg: rgba(4, 120, 87, 0.08);
	--status-online: #10b981;
	--status-offline: #ef4444;

	/* Shadows */
	--shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.03);
	--shadow-sm: 0 2px 8px -1px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
	--shadow-md:
		0 10px 25px -4px rgba(15, 23, 42, 0.06), 0 4px 10px -2px rgba(15, 23, 42, 0.03);
	--shadow-lg:
		0 20px 48px -8px rgba(15, 23, 42, 0.1), 0 8px 16px -2px rgba(15, 23, 42, 0.04);
	--shadow-composer:
		0 16px 48px -6px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);

	/* Layout & Sizing */
	--sidebar-width: 72px;
	--header-height: 56px;
	--radius-sm: 8px;
	--radius-md: 12px;
	--radius-lg: 18px;
	--radius-xl: 24px;
	--radius-full: 9999px;

	/* Transitions */
	--transition-fast: 160ms cubic-bezier(0.4, 0, 0.2, 1);
	--transition-smooth: 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
	/* Dark Mode Palette */
	--canvas: #090d16;
	--surface: #101626;
	--surface-elevated: #161e33;
	--surface-subtle: #141b2d;
	--surface-hover: #1b243b;
	--border-subtle: rgba(255, 255, 255, 0.07);
	--border-default: rgba(255, 255, 255, 0.12);
	--border-hover: rgba(255, 255, 255, 0.2);
	--text-primary: #f8fafc;
	--text-secondary: #94a3b8;
	--text-muted: #64748b;
	--accent: #60a5fa;
	--accent-hover: #3b82f6;
	--accent-subtle: rgba(96, 165, 250, 0.12);
	--accent-border: rgba(96, 165, 250, 0.3);
	--accent-contrast: #090d16;

	--priority-high: #f87171;
	--priority-high-bg: rgba(248, 113, 113, 0.12);
	--priority-med: #fbbf24;
	--priority-med-bg: rgba(251, 191, 36, 0.12);
	--priority-low: #34d399;
	--priority-low-bg: rgba(52, 211, 153, 0.12);

	--shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
	--shadow-sm: 0 2px 8px -1px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
	--shadow-md: 0 10px 25px -4px rgba(0, 0, 0, 0.4), 0 4px 10px -2px rgba(0, 0, 0, 0.2);
	--shadow-lg: 0 20px 48px -8px rgba(0, 0, 0, 0.5), 0 8px 16px -2px rgba(0, 0, 0, 0.3);
	--shadow-composer:
		0 16px 48px -6px rgba(0, 0, 0, 0.55), 0 4px 12px -2px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */

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

html {
	font-size: 16px;
	height: 100%;
	background-color: var(--canvas);
	color: var(--text-primary);
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body {
	min-height: 100%;
	font-family:
		"Inter",
		-apple-system,
		BlinkMacSystemFont,
		"Segoe UI",
		Roboto,
		sans-serif;
	background-color: var(--canvas);
	color: var(--text-primary);
	line-height: 1.5;
	overflow-x: hidden;
}

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

button {
	cursor: pointer;
	user-select: none;
}

:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible,
[tabindex]:focus-visible,
[role="button"]:focus-visible {
	outline: 2px solid var(--accent, #6366f1) !important;
	outline-offset: 2px !important;
}

.composer-tool-btn:focus-visible {
	outline: 2px solid var(--accent, #6366f1) !important;
	outline-offset: 2px !important;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ==========================================================================
   Main Application Layout
   ========================================================================== */

.app-layout {
	display: flex;
	height: 100vh;
	width: 100vw;
	overflow: hidden;
	background-color: var(--canvas);
}

/* ==========================================================================
   Left Navigation Sidebar
   ========================================================================== */

.app-sidebar {
	width: var(--sidebar-width);
	height: 100%;
	flex: 0 0 var(--sidebar-width);
	background-color: var(--surface);
	border-right: 1px solid var(--border-subtle);
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: center;
	padding: 16px 0;
	z-index: 40;
	transition: background-color var(--transition-smooth);
}

.sidebar-top {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	width: 100%;
}

.brand-mark-btn {
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	border-radius: var(--radius-md);
	transition: transform var(--transition-fast);
}

.brand-mark-btn:hover {
	transform: scale(1.05);
}

.brand-icon,
.brand-logo {
	width: 38px;
	height: 38px;
	border-radius: 10px;
	object-fit: cover;
	display: block;
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.sidebar-nav {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	width: 100%;
}

.nav-item {
	position: relative;
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	border-radius: var(--radius-md);
	color: var(--text-secondary);
	transition:
		color var(--transition-fast),
		background-color var(--transition-fast),
		transform var(--transition-fast);
}

.nav-item:hover {
	color: var(--text-primary);
	background-color: var(--surface-subtle);
}

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

.nav-item.active::before {
	content: "";
	position: absolute;
	left: -14px;
	top: 10px;
	bottom: 10px;
	width: 3px;
	border-radius: var(--radius-full);
	background-color: var(--accent);
}

.nav-svg {
	width: 20px;
	height: 20px;
}

/* Sidebar Tooltips */
.nav-tooltip {
	position: absolute;
	left: calc(100% + 12px);
	top: 50%;
	transform: translateY(-50%) scale(0.95);
	background-color: var(--text-primary);
	color: var(--canvas);
	font-size: 0.76rem;
	font-weight: 500;
	white-space: nowrap;
	padding: 5px 9px;
	border-radius: var(--radius-sm);
	pointer-events: none;
	opacity: 0;
	box-shadow: var(--shadow-sm);
	transition:
		opacity var(--transition-fast),
		transform var(--transition-fast);
	z-index: 100;
}

.nav-item:hover .nav-tooltip,
.icon-action-btn:hover .nav-tooltip,
.user-avatar-btn:hover .nav-tooltip {
	opacity: 1;
	transform: translateY(-50%) scale(1);
}

.sidebar-bottom {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	width: 100%;
}

.icon-action-btn {
	position: relative;
	width: 40px;
	height: 40px;
	display: grid;
	place-items: center;
	border-radius: var(--radius-md);
	color: var(--text-secondary);
	transition:
		color var(--transition-fast),
		background-color var(--transition-fast);
}

.icon-action-btn:hover {
	color: var(--text-primary);
	background-color: var(--surface-subtle);
}

.theme-icon-sun {
	display: block;
	width: 19px;
	height: 19px;
}

.theme-icon-moon {
	display: none;
	width: 19px;
	height: 19px;
}

[data-theme="dark"] .theme-icon-sun {
	display: none;
}

[data-theme="dark"] .theme-icon-moon {
	display: block;
}

.user-avatar-btn {
	position: relative;
	width: 36px;
	height: 36px;
	border-radius: var(--radius-full);
	background: linear-gradient(135deg, #4f46e5, #3b82f6);
	color: #ffffff;
	display: grid;
	place-items: center;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	transition: transform var(--transition-fast);
}

.user-avatar-btn:hover {
	transform: scale(1.06);
}

.user-status-dot {
	position: absolute;
	bottom: -1px;
	right: -1px;
	width: 9px;
	height: 9px;
	border-radius: var(--radius-full);
	border: 2px solid var(--surface);
	background-color: var(--status-online);
}

.user-status-dot.offline {
	background-color: var(--status-offline);
}

/* ==========================================================================
   Workspace Shell
   ========================================================================== */

.workspace-container {
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	position: relative;
}

/* Minimal Header */
.workspace-header {
	height: var(--header-height);
	flex: 0 0 var(--header-height);
	border-bottom: 1px solid var(--border-subtle);
	background-color: var(--surface);
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 24px;
	z-index: 20;
	transition: background-color var(--transition-smooth);
}

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

.mobile-menu-trigger {
	display: none;
	width: 36px;
	height: 36px;
	place-items: center;
	color: var(--text-secondary);
	border-radius: var(--radius-sm);
}

.view-breadcrumb {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.88rem;
}

.breadcrumb-app {
	font-weight: 600;
	color: var(--text-primary);
	letter-spacing: -0.01em;
}

.breadcrumb-slash {
	color: var(--text-muted);
}

.breadcrumb-current {
	color: var(--text-secondary);
	font-weight: 500;
}

/* Mode Selector Dropdown in Header */
.mode-dropdown-wrap {
	position: relative;
}

.mode-selector-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px;
	border-radius: var(--radius-full);
	background-color: var(--surface-subtle);
	border: 1px solid var(--border-subtle);
	font-size: 0.82rem;
	font-weight: 500;
	color: var(--text-primary);
	transition:
		background-color var(--transition-fast),
		border-color var(--transition-fast);
}

.mode-selector-pill:hover {
	background-color: var(--surface-hover);
	border-color: var(--border-default);
}

.mode-pill-dot {
	width: 6px;
	height: 6px;
	border-radius: var(--radius-full);
	background-color: var(--accent);
}

.mode-chevron {
	width: 14px;
	height: 14px;
	color: var(--text-muted);
	transition: transform var(--transition-fast);
}

.mode-selector-pill[aria-expanded="true"] .mode-chevron {
	transform: rotate(180deg);
}

/* Floating Mode Menu */
.mode-menu {
	position: absolute;
	top: calc(100% + 8px);
	left: 50%;
	transform: translateX(-50%);
	width: 290px;
	background-color: var(--surface);
	border: 1px solid var(--border-default);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-lg);
	padding: 6px;
	z-index: 100;
	animation: popIn 140ms ease-out;
}

@keyframes popIn {
	from {
		opacity: 0;
		transform: translateX(-50%) translateY(-6px);
	}
	to {
		opacity: 1;
		transform: translateX(-50%) translateY(0);
	}
}

.mode-menu-header {
	padding: 6px 10px;
	font-size: 0.72rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--text-muted);
	border-bottom: 1px solid var(--border-subtle);
	margin-bottom: 4px;
}

.mode-menu-option {
	display: flex;
	flex-direction: column;
	gap: 2px;
	width: 100%;
	padding: 8px 10px;
	border-radius: var(--radius-sm);
	text-align: left;
	transition: background-color var(--transition-fast);
}

.mode-menu-option:hover {
	background-color: var(--surface-subtle);
}

.mode-menu-option.selected {
	background-color: var(--accent-subtle);
}

.mode-opt-title {
	font-size: 0.84rem;
	font-weight: 600;
	color: var(--text-primary);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.mode-opt-desc {
	font-size: 0.74rem;
	color: var(--text-muted);
	line-height: 1.3;
}

/* Header Right */
.header-right {
	display: flex;
	align-items: center;
	gap: 12px;
}

.health-status-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.76rem;
	color: var(--text-secondary);
	padding: 4px 10px;
	border-radius: var(--radius-full);
	background-color: var(--surface-subtle);
	border: 1px solid var(--border-subtle);
}

.status-indicator {
	width: 7px;
	height: 7px;
	border-radius: var(--radius-full);
	background-color: var(--status-online);
	box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16);
}

.health-status-badge.offline .status-indicator {
	background-color: var(--status-offline);
	box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.16);
}

.header-action-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: var(--radius-sm);
	font-size: 0.8rem;
	font-weight: 500;
	color: var(--text-secondary);
	transition:
		color var(--transition-fast),
		background-color var(--transition-fast);
}

.header-action-btn:hover {
	color: var(--text-primary);
	background-color: var(--surface-subtle);
}

.header-action-btn svg {
	width: 15px;
	height: 15px;
}

/* ==========================================================================
   Main Workspace Views
   ========================================================================== */

.workspace-main {
	flex: 1 1 0;
	overflow-y: auto;
	position: relative;
	display: flex;
	flex-direction: column;
}

.view-pane {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	width: 100%;
	min-height: 100%;
}

.view-pane[hidden] {
	display: none !important;
}

.view-content-wrapper {
	max-width: 980px;
	width: 100%;
	margin: 0 auto;
	padding: 36px 32px 64px 32px;
}

.pane-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 28px;
}

.pane-title {
	font-size: 1.6rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--text-primary);
	line-height: 1.2;
}

.pane-subtitle {
	font-size: 0.92rem;
	color: var(--text-secondary);
	margin-top: 4px;
}

.pane-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

/* ==========================================================================
   VIEW: Assistant / Welcome Screen
   ========================================================================== */

#viewAssistant {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: center;
	padding: 24px 20px 24px 20px;
	min-height: 100%;
	position: relative;
}

/* Calm Welcome Hero */
.assistant-welcome-hero {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	margin-top: auto;
	margin-bottom: 28px;
	transition:
		opacity var(--transition-smooth),
		transform var(--transition-smooth);
}

.assistant-welcome-hero.minimized {
	opacity: 0;
	transform: translateY(-16px);
	pointer-events: none;
	display: none;
}

/* Lavoro AI Orb — Refined, Breathing, Calm */
.lavoro-orb-wrap {
	margin-bottom: 22px;
	display: grid;
	place-items: center;
}

.lavoro-orb {
	position: relative;
	width: 58px;
	height: 58px;
	border-radius: var(--radius-full);
	background: radial-gradient(circle at 35% 35%, #60a5fa, #4f46e5 55%, #312e81 100%);
	box-shadow:
		0 0 28px -2px rgba(96, 165, 250, 0.45),
		0 0 54px 4px rgba(79, 70, 229, 0.25);
	animation: orbBreathe 4.5s ease-in-out infinite;
}

@keyframes orbBreathe {
	0%,
	100% {
		transform: scale(1);
		filter: drop-shadow(0 0 20px rgba(96, 165, 250, 0.35));
	}
	50% {
		transform: scale(1.06);
		filter: drop-shadow(0 0 34px rgba(79, 70, 229, 0.5));
	}
}

.orb-inner {
	position: absolute;
	inset: 6px;
	border-radius: var(--radius-full);
	background: radial-gradient(
		circle at 30% 30%,
		rgba(255, 255, 255, 0.8),
		rgba(255, 255, 255, 0) 65%
	);
}

.orb-pulse {
	position: absolute;
	inset: -4px;
	border-radius: var(--radius-full);
	border: 1px solid rgba(96, 165, 250, 0.35);
	animation: orbRing 4.5s ease-in-out infinite;
}

@keyframes orbRing {
	0%,
	100% {
		transform: scale(1);
		opacity: 0.4;
	}
	50% {
		transform: scale(1.16);
		opacity: 0.8;
	}
}

.hero-typography {
	max-width: 540px;
}

.hero-title {
	font-size: clamp(1.8rem, 3.2vw, 2.35rem);
	font-weight: 700;
	letter-spacing: -0.025em;
	color: var(--text-primary);
	line-height: 1.2;
}

.hero-sub {
	font-size: clamp(0.95rem, 1.6vw, 1.08rem);
	font-weight: 400;
	color: var(--text-secondary);
	margin-top: 8px;
	line-height: 1.4;
}

/* ==========================================================================
   Chat Conversation Thread
   ========================================================================== */

.chat-thread-container {
	width: 100%;
	max-width: 780px;
	flex: 1 1 auto;
	margin: 0 auto;
	padding: 16px 0 140px 0;
	overflow-y: visible;
}

.chat-messages {
	display: flex;
	flex-direction: column;
	gap: 22px;
	width: 100%;
}

.message {
	display: flex;
	flex-direction: column;
	width: 100%;
	animation: messageFadeIn 180ms ease-out;
}

@keyframes messageFadeIn {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* User Message — Subtle right-aligned card */
.message.user {
	align-items: flex-end;
}

.message.user .message-bubble {
	max-width: 82%;
	background-color: var(--surface-subtle);
	border: 1px solid var(--border-subtle);
	border-radius: 18px 18px 4px 18px;
	padding: 12px 18px;
	color: var(--text-primary);
	font-size: 0.95rem;
	line-height: 1.55;
	box-shadow: var(--shadow-xs);
}

.message.user .message-meta {
	display: none;
}

/* Assistant Message — Clean left-aligned response */
.message.assistant {
	align-items: flex-start;
}

.message.assistant .message-bubble {
	max-width: 100%;
	width: 100%;
	background: transparent;
	padding: 4px 0;
}

.message.assistant .message-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
	font-size: 0.76rem;
	color: var(--text-muted);
}

.assistant-mark-small {
	width: 18px;
	height: 18px;
	border-radius: var(--radius-full);
	background: linear-gradient(135deg, #4f46e5, #3b82f6);
	display: inline-block;
}

.message.assistant .message-meta strong {
	color: var(--text-primary);
	font-weight: 600;
}

.message.assistant .message-meta span {
	background-color: var(--surface-subtle);
	padding: 2px 7px;
	border-radius: var(--radius-full);
	border: 1px solid var(--border-subtle);
	font-size: 0.72rem;
}

.message-content {
	font-size: 0.96rem;
	line-height: 1.65;
	color: var(--text-primary);
}

.message-content p {
	margin-bottom: 12px;
}

.message-content p:last-child {
	margin-bottom: 0;
}

.message-content ul,
.message-content ol {
	margin: 8px 0 12px 22px;
}

.message-content li {
	margin-bottom: 4px;
}

.message-content code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 0.86em;
	background-color: var(--surface-subtle);
	border: 1px solid var(--border-subtle);
	padding: 2px 6px;
	border-radius: 4px;
}

.message-content pre {
	position: relative;
	background-color: var(--surface-subtle);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-md);
	padding: 14px 16px;
	overflow-x: auto;
	margin: 12px 0;
	font-size: 0.88rem;
}

.message-content pre code {
	background: none;
	border: none;
	padding: 0;
}

/* GFM Tables in Assistant Messages */
.table-scroll-wrap {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin: 14px 0;
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-md);
	background-color: var(--surface);
}

.message-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.88rem;
	text-align: left;
	min-width: 440px;
}

.message-content th {
	background-color: var(--surface-subtle);
	color: var(--text-primary);
	font-weight: 600;
	padding: 10px 14px;
	border-bottom: 1px solid var(--border-default);
}

.message-content td {
	padding: 9px 14px;
	border-bottom: 1px solid var(--border-subtle);
	color: var(--text-secondary);
}

.message-content tr:last-child td {
	border-bottom: none;
}

.message-content tr:hover td {
	background-color: var(--surface-hover);
}

/* Headings & Quotes in Assistant Messages */
.message-content h1,
.message-content h2,
.message-content h3,
.message-content h4 {
	color: var(--text-primary);
	font-weight: 600;
	margin: 16px 0 8px 0;
	line-height: 1.35;
}

.message-content h1 {
	font-size: 1.25rem;
}
.message-content h2 {
	font-size: 1.12rem;
}
.message-content h3 {
	font-size: 1.02rem;
}
.message-content h4 {
	font-size: 0.94rem;
}

.message-content blockquote {
	border-left: 3px solid var(--accent);
	padding: 6px 14px;
	margin: 10px 0;
	color: var(--text-secondary);
	background-color: var(--surface-subtle);
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Tool Execution Indicators — Humane, Expandable Activity Pills */
.tool-activity-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 12px;
	background-color: var(--surface);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-full);
	font-size: 0.8rem;
	color: var(--text-secondary);
	margin: 6px 0 10px 0;
	box-shadow: var(--shadow-xs);
}

.tool-activity-pill .tool-icon {
	color: var(--accent);
}

.tool-activity-pill.completed {
	color: var(--text-primary);
	border-color: var(--accent-border);
}

.tool-activity-pill.completed .tool-icon {
	color: var(--priority-low);
}

/* AI Thinking Indicator */
.ai-thinking {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--text-muted);
	font-size: 0.85rem;
	padding: 4px 0;
}

.thinking-dots {
	display: flex;
	gap: 4px;
}

.thinking-dots span {
	width: 5px;
	height: 5px;
	border-radius: var(--radius-full);
	background-color: var(--accent);
	animation: thinkPulse 1.2s infinite ease-in-out;
}

.thinking-dots span:nth-child(2) {
	animation-delay: 0.2s;
}

.thinking-dots span:nth-child(3) {
	animation-delay: 0.4s;
}

@keyframes thinkPulse {
	0%,
	80%,
	100% {
		transform: scale(0.6);
		opacity: 0.3;
	}
	40% {
		transform: scale(1.1);
		opacity: 1;
	}
}

/* ==========================================================================
   AI Chat Input Composer (Large, Premium, Centered)
   ========================================================================== */

.composer-floating-container {
	width: 100%;
	max-width: 760px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 12px;
	z-index: 25;
	position: sticky;
	bottom: 16px;
}

.ai-composer-card {
	background-color: var(--surface);
	border: 1px solid var(--border-default);
	border-radius: var(--radius-xl);
	box-shadow: var(--shadow-composer);
	padding: 14px 18px 10px 18px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	transition:
		border-color var(--transition-fast),
		box-shadow var(--transition-fast);
}

.ai-composer-card:focus-within {
	border-color: var(--accent);
	box-shadow:
		0 20px 52px -8px rgba(59, 130, 246, 0.14),
		0 4px 12px -2px rgba(15, 23, 42, 0.04);
}

.ai-composer-card textarea {
	width: 100%;
	border: none;
	outline: none;
	resize: none;
	min-height: 48px;
	max-height: 180px;
	font-size: 0.98rem;
	line-height: 1.5;
	color: var(--text-primary);
	background: transparent;
	padding: 4px 0;
}

.ai-composer-card textarea::placeholder {
	color: var(--text-muted);
}

.composer-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: 4px;
	border-top: 1px solid var(--border-subtle);
}

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

.composer-tool-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 5px 10px;
	border-radius: var(--radius-sm);
	font-size: 0.8rem;
	font-weight: 500;
	color: var(--text-secondary);
	cursor: pointer;
	transition:
		background-color var(--transition-fast),
		color var(--transition-fast);
}

.composer-tool-btn:hover {
	color: var(--text-primary);
	background-color: var(--surface-subtle);
}

.composer-tool-btn svg {
	width: 15px;
	height: 15px;
}

.composer-chip-btn {
	padding: 4px 10px;
	border-radius: var(--radius-full);
	font-size: 0.76rem;
	font-weight: 500;
	color: var(--text-secondary);
	background-color: var(--surface-subtle);
	border: 1px solid var(--border-subtle);
	transition:
		background-color var(--transition-fast),
		color var(--transition-fast);
}

.composer-chip-btn:hover {
	color: var(--accent);
	background-color: var(--accent-subtle);
	border-color: var(--accent-border);
}

.composer-checkbox-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 8px;
	font-size: 0.76rem;
	color: var(--text-secondary);
	cursor: pointer;
}

.composer-checkbox-pill input {
	accent-color: var(--accent);
}

.composer-icon-btn {
	width: 32px;
	height: 32px;
	display: grid;
	place-items: center;
	border-radius: var(--radius-full);
	color: var(--text-secondary);
	transition:
		color var(--transition-fast),
		background-color var(--transition-fast);
}

.composer-icon-btn:hover {
	color: var(--text-primary);
	background-color: var(--surface-subtle);
}

.composer-icon-btn svg {
	width: 17px;
	height: 17px;
}

.composer-icon-btn.recording {
	color: #ef4444;
	background-color: rgba(239, 68, 68, 0.12);
	animation: micPulse 1s infinite alternate;
}

@keyframes micPulse {
	from {
		transform: scale(1);
	}
	to {
		transform: scale(1.12);
	}
}

.composer-stop-btn {
	width: 32px;
	height: 32px;
	display: grid;
	place-items: center;
	border-radius: var(--radius-full);
	background-color: var(--surface-subtle);
	border: 1px solid var(--border-default);
	color: var(--text-primary);
}

.stop-square {
	width: 10px;
	height: 10px;
	border-radius: 2px;
	background-color: var(--text-primary);
}

.composer-send-btn {
	width: 34px;
	height: 34px;
	display: grid;
	place-items: center;
	border-radius: var(--radius-full);
	background-color: var(--text-primary);
	color: var(--canvas);
	transition:
		opacity var(--transition-fast),
		transform var(--transition-fast);
}

.composer-send-btn:hover:not(:disabled) {
	transform: scale(1.05);
	opacity: 0.92;
}

.composer-send-btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.send-arrow-icon {
	width: 16px;
	height: 16px;
}

/* Attachment Tray */
.composer-attachment-tray {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 0 6px;
}

.attachment-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px;
	border-radius: var(--radius-full);
	background-color: var(--surface);
	border: 1px solid var(--border-subtle);
	font-size: 0.76rem;
	color: var(--text-secondary);
	box-shadow: var(--shadow-xs);
}

.attachment-chip-remove {
	cursor: pointer;
	color: var(--text-muted);
}

.attachment-chip-remove:hover {
	color: var(--priority-high);
}

/* Quick Action Pills Under Composer */
.quick-actions-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 2px;
}

.action-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	border-radius: var(--radius-full);
	background-color: var(--surface);
	border: 1px solid var(--border-subtle);
	font-size: 0.8rem;
	font-weight: 500;
	color: var(--text-secondary);
	box-shadow: var(--shadow-xs);
	transition:
		border-color var(--transition-fast),
		color var(--transition-fast),
		transform var(--transition-fast),
		background-color var(--transition-fast);
}

.action-pill:hover {
	color: var(--text-primary);
	border-color: var(--border-hover);
	background-color: var(--surface-hover);
	transform: translateY(-1px);
}

.pill-sparkle {
	color: var(--accent);
	font-size: 0.88rem;
}

/* ==========================================================================
   VIEW: Tasks & Priorities
   ========================================================================== */

.inline-create-card {
	background-color: var(--surface);
	border: 1px solid var(--border-default);
	border-radius: var(--radius-lg);
	padding: 14px 18px;
	margin-bottom: 22px;
	box-shadow: var(--shadow-sm);
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.inline-create-card input[type="text"] {
	font-size: 0.96rem;
	color: var(--text-primary);
	border: none;
	outline: none;
	width: 100%;
}

.inline-create-controls {
	display: flex;
	align-items: center;
	gap: 10px;
	border-top: 1px solid var(--border-subtle);
	padding-top: 10px;
}

.inline-create-controls select,
.inline-create-controls input {
	padding: 6px 10px;
	border-radius: var(--radius-sm);
	border: 1px solid var(--border-subtle);
	background-color: var(--surface-subtle);
	font-size: 0.82rem;
	color: var(--text-secondary);
}

.filter-tabs-bar {
	display: flex;
	align-items: center;
	gap: 4px;
	border-bottom: 1px solid var(--border-subtle);
	margin-bottom: 18px;
	padding-bottom: 8px;
}

.tab-btn {
	padding: 6px 14px;
	border-radius: var(--radius-sm);
	font-size: 0.84rem;
	font-weight: 500;
	color: var(--text-secondary);
	transition:
		color var(--transition-fast),
		background-color var(--transition-fast);
}

.tab-btn:hover {
	color: var(--text-primary);
}

.tab-btn.active {
	color: var(--text-primary);
	background-color: var(--surface-subtle);
	font-weight: 600;
}

.task-list-flow {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.task-item-card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 18px;
	background-color: var(--surface);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-xs);
	transition:
		border-color var(--transition-fast),
		transform var(--transition-fast),
		box-shadow var(--transition-fast);
}

.task-item-card:hover {
	border-color: var(--border-default);
	box-shadow: var(--shadow-sm);
}

.task-item-card.completed {
	opacity: 0.65;
}

.task-item-card.completed .task-text-title {
	text-decoration: line-through;
	color: var(--text-muted);
}

.task-item-left {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
	flex: 1 1 auto;
}

/* Custom Checkbox */
.task-checkbox-btn {
	width: 22px;
	height: 22px;
	flex: 0 0 22px;
	border-radius: var(--radius-full);
	border: 1.8px solid var(--border-default);
	display: grid;
	place-items: center;
	transition:
		background-color var(--transition-fast),
		border-color var(--transition-fast);
}

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

.task-item-card.completed .task-checkbox-btn {
	background-color: var(--priority-low);
	border-color: var(--priority-low);
	color: #ffffff;
}

.task-checkbox-icon {
	width: 12px;
	height: 12px;
	display: none;
}

.task-item-card.completed .task-checkbox-icon {
	display: block;
}

.task-content-block {
	min-width: 0;
}

.task-text-title {
	font-size: 0.94rem;
	font-weight: 500;
	color: var(--text-primary);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.task-meta-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 4px;
	font-size: 0.78rem;
	color: var(--text-secondary);
}

.priority-pill {
	display: inline-flex;
	align-items: center;
	padding: 2px 7px;
	border-radius: var(--radius-full);
	font-size: 0.72rem;
	font-weight: 600;
	text-transform: capitalize;
}

.priority-pill.priority-high {
	color: var(--priority-high);
	background-color: var(--priority-high-bg);
}

.priority-pill.priority-medium {
	color: var(--priority-med);
	background-color: var(--priority-med-bg);
}

.priority-pill.priority-low {
	color: var(--priority-low);
	background-color: var(--priority-low-bg);
}

.task-item-actions {
	display: flex;
	align-items: center;
	gap: 4px;
}

.task-action-btn {
	padding: 5px 9px;
	border-radius: var(--radius-sm);
	font-size: 0.76rem;
	color: var(--text-secondary);
	transition:
		color var(--transition-fast),
		background-color var(--transition-fast);
}

.task-action-btn:hover {
	color: var(--text-primary);
	background-color: var(--surface-subtle);
}

.task-ai-breakdown-btn {
	color: var(--accent-hover);
}

.task-ai-breakdown-btn:hover {
	background-color: var(--accent-subtle);
}

/* ==========================================================================
   VIEW: Day Planner
   ========================================================================== */

.planner-two-col {
	display: grid;
	grid-template-columns: 1.8fr 1.2fr;
	gap: 24px;
}

.timeline-card,
.side-card {
	background-color: var(--surface);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-lg);
	padding: 22px;
	box-shadow: var(--shadow-sm);
}

.timeline-header,
.side-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 18px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--border-subtle);
}

.timeline-header h3,
.side-card-header h3 {
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--text-primary);
}

.badge-subtle {
	font-size: 0.74rem;
	font-weight: 500;
	color: var(--text-muted);
	background-color: var(--surface-subtle);
	padding: 3px 8px;
	border-radius: var(--radius-full);
}

.planner-timeline {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.timeline-block {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: 10px 14px;
	border-radius: var(--radius-md);
	background-color: var(--surface-subtle);
	border-left: 3px solid var(--accent);
	transition: transform var(--transition-fast);
}

.timeline-block:hover {
	transform: translateX(2px);
}

.timeline-block.focus-block {
	border-left-color: #8b5cf6;
	background-color: rgba(139, 92, 246, 0.06);
}

.timeline-time {
	font-size: 0.84rem;
	font-weight: 600;
	color: var(--text-muted);
	min-width: 58px;
	padding-top: 2px;
}

.timeline-details {
	flex: 1 1 auto;
}

.timeline-title {
	font-size: 0.92rem;
	font-weight: 600;
	color: var(--text-primary);
}

.timeline-subtitle {
	font-size: 0.78rem;
	color: var(--text-secondary);
	margin-top: 2px;
}

.planner-side-col {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.goal-text {
	font-size: 0.94rem;
	line-height: 1.5;
	color: var(--text-secondary);
}

.focus-items-stack {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.focus-mini-card {
	padding: 10px 12px;
	border-radius: var(--radius-sm);
	background-color: var(--surface-subtle);
	border: 1px solid var(--border-subtle);
	font-size: 0.88rem;
}

/* ==========================================================================
   VIEW: Reminders
   ========================================================================== */

.reminders-timeline-flow {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.reminder-item-card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 18px;
	background-color: var(--surface);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-xs);
}

.reminder-time-badge {
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--accent);
	background-color: var(--accent-subtle);
	padding: 3px 8px;
	border-radius: var(--radius-full);
}

/* ==========================================================================
   VIEW: Daily Briefing
   ========================================================================== */

.briefing-sections-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
}

.briefing-card {
	background-color: var(--surface);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-lg);
	padding: 22px;
	box-shadow: var(--shadow-sm);
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.briefing-card.full-width {
	grid-column: 1 / -1;
}

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

.section-tag {
	font-size: 0.74rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--text-muted);
}

.focus-card {
	background: linear-gradient(135deg, var(--surface), var(--surface-subtle));
	border-left: 4px solid var(--accent);
}

.focus-headline {
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--text-primary);
	line-height: 1.35;
}

.focus-meta-pills {
	display: flex;
	gap: 10px;
	margin-top: 4px;
}

.meta-badge {
	font-size: 0.78rem;
	color: var(--text-secondary);
	background-color: var(--surface);
	border: 1px solid var(--border-subtle);
	padding: 4px 10px;
	border-radius: var(--radius-full);
}

.badge-active {
	background-color: rgba(79, 70, 229, 0.12) !important;
	color: var(--accent) !important;
	font-weight: 600 !important;
}

.timeline-block.current-block {
	border-left-color: #10b981;
	background-color: rgba(16, 185, 129, 0.08);
}

.briefing-email-card {
	padding: 10px 14px;
	border-radius: var(--radius-md);
	background-color: var(--surface-subtle);
	border: 1px solid var(--border-subtle);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
}

.briefing-email-meta {
	font-size: 0.78rem;
	color: var(--text-secondary);
	margin-top: 2px;
}

.briefing-email-actions {
	display: flex;
	gap: 6px;
	flex-shrink: 0;
}

.briefing-task-row,
.briefing-sched-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 8px 10px;
	border-radius: var(--radius-sm);
	background-color: var(--surface-subtle);
	margin-bottom: 6px;
	font-size: 0.88rem;
}

/* ==========================================================================
   VIEW: Knowledge / RAG
   ========================================================================== */

.knowledge-search-card {
	background-color: var(--surface);
	border: 1px solid var(--border-default);
	border-radius: var(--radius-lg);
	padding: 8px 12px;
	margin-bottom: 24px;
	box-shadow: var(--shadow-sm);
}

.search-input-wrap {
	display: flex;
	align-items: center;
	gap: 12px;
}

.search-icon {
	width: 18px;
	height: 18px;
	color: var(--text-muted);
}

.search-input-wrap input {
	flex: 1 1 auto;
	font-size: 0.95rem;
	color: var(--text-primary);
	border: none;
	outline: none;
}

.knowledge-results-stack {
	background-color: var(--surface);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-lg);
	padding: 20px;
	margin-bottom: 28px;
	box-shadow: var(--shadow-sm);
}

.results-meta-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--border-subtle);
}

.text-link-btn {
	font-size: 0.78rem;
	color: var(--accent);
	cursor: pointer;
}

.results-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.rag-result-card {
	padding: 12px 14px;
	border-radius: var(--radius-md);
	background-color: var(--surface-subtle);
	border: 1px solid var(--border-subtle);
}

.rag-score-badge {
	font-size: 0.72rem;
	font-weight: 600;
	color: var(--accent);
	background-color: var(--accent-subtle);
	padding: 2px 6px;
	border-radius: var(--radius-full);
}

.docs-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 14px;
	margin-top: 14px;
}

.doc-summary-card {
	padding: 14px 16px;
	background-color: var(--surface);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-xs);
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.doc-summary-card h4 {
	font-size: 0.92rem;
	font-weight: 600;
	color: var(--text-primary);
}

.doc-summary-card p {
	font-size: 0.8rem;
	color: var(--text-secondary);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ==========================================================================
   VIEW: Dashboard & Conversations
   ========================================================================== */

.dashboard-metrics-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	margin-bottom: 24px;
}

.metric-card {
	background-color: var(--surface);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-lg);
	padding: 20px;
	box-shadow: var(--shadow-sm);
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.metric-label {
	font-size: 0.78rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--text-muted);
}

.metric-value {
	font-size: 1.8rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--text-primary);
}

.metric-sub {
	font-size: 0.78rem;
	color: var(--text-secondary);
}

.dashboard-breakdown-card {
	background-color: var(--surface);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-lg);
	padding: 24px;
	box-shadow: var(--shadow-sm);
}

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

.priority-bars-container {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.priority-bar-row {
	display: flex;
	align-items: center;
	gap: 16px;
}

.priority-bar-label {
	width: 90px;
	font-size: 0.82rem;
	font-weight: 500;
	color: var(--text-secondary);
}

.priority-bar-track {
	flex: 1 1 auto;
	height: 8px;
	border-radius: var(--radius-full);
	background-color: var(--surface-subtle);
	overflow: hidden;
}

.priority-bar-fill {
	height: 100%;
	border-radius: var(--radius-full);
	transition: width 400ms ease-out;
}

.priority-bar-fill.fill-high {
	background-color: var(--priority-high);
}

.priority-bar-fill.fill-med {
	background-color: var(--priority-med);
}

.priority-bar-fill.fill-low {
	background-color: var(--priority-low);
}

.priority-bar-count {
	font-size: 0.84rem;
	font-weight: 600;
	color: var(--text-primary);
	min-width: 24px;
	text-align: right;
}

.conversations-history-flow {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.conversation-card {
	padding: 16px 20px;
	background-color: var(--surface);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-xs);
	display: flex;
	flex-direction: column;
	gap: 6px;
}

/* ==========================================================================
   Buttons & Core Components
   ========================================================================== */

.btn-primary {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	border-radius: var(--radius-sm);
	font-size: 0.84rem;
	font-weight: 600;
	background-color: var(--text-primary);
	color: var(--canvas);
	transition:
		opacity var(--transition-fast),
		transform var(--transition-fast);
}

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

.btn-secondary {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border-radius: var(--radius-sm);
	font-size: 0.84rem;
	font-weight: 500;
	background-color: var(--surface-subtle);
	border: 1px solid var(--border-subtle);
	color: var(--text-primary);
	transition:
		background-color var(--transition-fast),
		border-color var(--transition-fast);
}

.btn-secondary:hover {
	background-color: var(--surface-hover);
	border-color: var(--border-default);
}

/* Empty States */
.empty-state-box {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 44px 24px;
	color: var(--text-muted);
	gap: 12px;
}

.empty-state-box p {
	max-width: 380px;
	font-size: 0.9rem;
	line-height: 1.5;
}

/* Modals */
.modal-backdrop {
	position: fixed;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.45);
	backdrop-filter: blur(4px);
	display: grid;
	place-items: center;
	z-index: 150;
	padding: 20px;
}

.modal-backdrop[hidden] {
	display: none;
}

.modal-card {
	width: 100%;
	max-width: 520px;
	background-color: var(--surface);
	border: 1px solid var(--border-default);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg);
	padding: 24px;
	max-height: 90vh;
	overflow-y: auto;
	animation: modalSlide 180ms ease-out;
}

@keyframes modalSlide {
	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;
	margin-bottom: 20px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--border-subtle);
}

.modal-header h3 {
	font-size: 1.15rem;
	font-weight: 600;
	color: var(--text-primary);
}

.modal-close-btn {
	width: 32px;
	height: 32px;
	display: grid;
	place-items: center;
	border-radius: var(--radius-sm);
	color: var(--text-muted);
}

.modal-close-btn:hover {
	color: var(--text-primary);
	background-color: var(--surface-subtle);
}

.settings-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.form-group-title {
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--text-primary);
	margin-bottom: -6px;
}

.form-row {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.form-row label {
	font-size: 0.8rem;
	font-weight: 500;
	color: var(--text-secondary);
}

.form-row input,
.form-row textarea {
	padding: 8px 12px;
	border-radius: var(--radius-sm);
	border: 1px solid var(--border-default);
	background-color: var(--surface-subtle);
	font-size: 0.9rem;
	color: var(--text-primary);
}

.form-actions {
	display: flex;
	justify-content: flex-end;
	margin-top: 6px;
}

.modal-divider {
	border: none;
	height: 1px;
	background-color: var(--border-subtle);
	margin: 20px 0;
}

.section-note {
	font-size: 0.8rem;
	color: var(--text-primary);
	margin-bottom: 10px;
}

.inline-code {
	font-family: monospace;
	color: var(--text-primary);
	background-color: var(--surface-subtle);
	padding: 2px 6px;
	border-radius: 4px;
}

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

.diagnostics-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	font-size: 0.84rem;
}

.diag-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px 0;
	border-bottom: 1px dashed var(--border-subtle);
}

.text-link {
	color: var(--accent);
	text-decoration: none;
}

.text-link:hover {
	text-decoration: underline;
}

/* Toast Notifications */
.toast-container {
	position: fixed;
	bottom: 24px;
	right: 24px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	z-index: 200;
	pointer-events: none;
}

.toast {
	padding: 10px 16px;
	border-radius: var(--radius-md);
	background-color: var(--text-primary);
	color: var(--canvas);
	font-size: 0.84rem;
	font-weight: 500;
	box-shadow: var(--shadow-md);
	opacity: 0;
	transform: translateY(8px);
	transition:
		opacity var(--transition-fast),
		transform var(--transition-fast);
}

.toast.show {
	opacity: 1;
	transform: translateY(0);
}

/* Mobile Bottom Bar (Hidden on desktop) */
.mobile-bottom-bar {
	display: none;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

@media (max-width: 1024px) {
	.planner-two-col {
		grid-template-columns: 1fr;
	}

	.dashboard-metrics-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.app-sidebar {
		display: none;
	}

	.mobile-menu-trigger {
		display: grid;
	}

	.hide-mobile {
		display: none;
	}

	.mobile-bottom-bar {
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		height: 60px;
		background-color: var(--surface);
		border-top: 1px solid var(--border-subtle);
		display: flex;
		align-items: center;
		justify-content: space-around;
		z-index: 50;
		padding: 0 10px;
	}

	.mobile-nav-btn {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 3px;
		color: var(--text-muted);
		font-size: 0.68rem;
		font-weight: 500;
	}

	.mobile-nav-btn svg {
		width: 20px;
		height: 20px;
	}

	.mobile-nav-btn.active {
		color: var(--accent);
	}

	.workspace-header {
		padding: 0 16px;
	}

	.view-content-wrapper {
		padding: 20px 16px 84px 16px;
	}

	.briefing-sections-grid {
		grid-template-columns: 1fr;
	}

	.dashboard-metrics-grid {
		grid-template-columns: 1fr;
	}

	.composer-floating-container {
		bottom: 68px;
		padding: 0 4px;
	}

	.toolbar-left .composer-chip-btn {
		display: none;
	}
}
