@import url('https://fonts.googleapis.com/css2?family=Sora:wght@500;600;700&family=Work+Sans:wght@400;500;600&display=swap');

:root {
	--bg: #f6f2ea;
	--bg-alt: #f1e7db;
	--surface: #ffffff;
	--surface-muted: #f9f6f1;
	--text: #1d1d1b;
	--text-muted: #6f6a60;
	--accent: #145947;
	--accent-strong: #0f3f32;
	--accent-soft: #dbe9e1;
	--warning: #c2603f;
	--shadow: rgba(20, 17, 13, 0.12);
	--radius-lg: 18px;
	--radius-md: 12px;
	--radius-sm: 8px;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: 'Work Sans', sans-serif;
	color: var(--text);
	background: radial-gradient(circle at top left, #f9f4ec 0%, #f2e9dd 55%, #efe4d7 100%);
	min-height: 100vh;
}

[hidden] {
\tdisplay: none !important;
}

h1, h2, h3, h4, h5 {
	font-family: 'Sora', sans-serif;
	margin: 0;
}

a {
	color: inherit;
}

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

.top-menu {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px 28px;
	background: rgba(255, 255, 255, 0.8);
	backdrop-filter: blur(10px);
	position: sticky;
	top: 0;
	z-index: 10;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.top-menu a {
	text-decoration: none;
	color: var(--text-muted);
	font-weight: 600;
}

.top-menu a.active {
	color: var(--accent-strong);
}

.top-menu .username {
	margin-right: auto;
	font-weight: 600;
}

.top-menu a.logout-btn {
	background: var(--accent-strong);
	color: #fff;
	padding: 8px 14px;
	border-radius: 999px;
	font-weight: 600;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.top-menu a.logout-btn:hover,
.top-menu a.logout-btn:focus-visible {
	background: #0b2f26;
}

.page-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 24px 28px;
	gap: 24px;
	flex-wrap: wrap;
}

.header-logo {
	width: 120px;
}

.header-title {
	display: flex;
	align-items: center;
	gap: 16px;
}

.board-select {
	padding: 8px 12px;
	border-radius: var(--radius-sm);
	border: 1px solid rgba(0, 0, 0, 0.1);
	background: white;
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 16px;
}

.filter-group {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.filter-group select,
.filter-group input {
	padding: 8px 10px;
	border-radius: var(--radius-sm);
	border: 1px solid rgba(0, 0, 0, 0.1);
	background: white;
}

.viewer-pill {
	padding: 6px 10px;
	border-radius: 999px;
	background: var(--accent-soft);
	color: var(--accent-strong);
	font-size: 12px;
	font-weight: 600;
}

.notification-wrapper {
	position: relative;
}

.notification-btn {
	border: none;
	background: var(--surface);
	border-radius: 50%;
	width: 40px;
	height: 40px;
	box-shadow: 0 6px 18px var(--shadow);
	cursor: pointer;
	position: relative;
}

.notification-btn svg {
	width: 20px;
	height: 20px;
	fill: var(--accent-strong);
}

.notification-dot {
	position: absolute;
	width: 10px;
	height: 10px;
	background: var(--warning);
	border-radius: 50%;
	top: 8px;
	right: 8px;
}

.notification-panel {
	position: absolute;
	top: 48px;
	right: 0;
	background: white;
	border-radius: var(--radius-md);
	box-shadow: 0 10px 30px var(--shadow);
	width: 280px;
	padding: 16px;
}

.notification-panel ul {
	list-style: none;
	padding: 0;
	margin: 12px 0 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.notification-panel li {
	font-size: 13px;
	color: var(--text-muted);
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.notification-panel li.unread {
	color: var(--text);
	font-weight: 600;
}

.board-wrapper {
	padding: 0 28px 40px;
}

.board {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	padding-bottom: 24px;
}

.list {
	background: var(--surface);
	border-radius: var(--radius-lg);
	padding: 16px;
	min-width: 260px;
	box-shadow: 0 6px 20px var(--shadow);
	height: fit-content;
}

.list-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
	flex-wrap: wrap;
}

.list-title {
	border: none;
	font-weight: 600;
	font-size: 16px;
	background: transparent;
	flex: 1;
}

.list-count {
	background: var(--accent-soft);
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 12px;
}

.card-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-height: 40px;
	padding-bottom: 4px;
}

.card-list.drag-over {
	outline: 2px dashed rgba(20, 89, 71, 0.35);
	border-radius: var(--radius-sm);
}

.card {
	background: var(--surface-muted);
	border-radius: var(--radius-md);
	padding: 12px;
	cursor: pointer;
	border: 1px solid rgba(0, 0, 0, 0.04);
}

.card.drag-file {
	outline: 2px dashed rgba(20, 89, 71, 0.5);
	background: #eef6f1;
}

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

.card-label {
	background: var(--label-color, #d2d2d2);
	color: #1b1b1b;
	padding: 2px 6px;
	border-radius: 999px;
	font-size: 11px;
}

.card-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-top: 8px;
	font-size: 12px;
	color: var(--text-muted);
}

.card-assignees {
	display: flex;
	gap: 6px;
}

.avatar {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--accent-soft);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 600;
}

.add-card-btn {
	margin-top: 12px;
	border: none;
	background: none;
	color: var(--accent-strong);
	font-weight: 600;
	cursor: pointer;
}

.list-new {
	background: rgba(255, 255, 255, 0.6);
	border: 1px dashed rgba(0, 0, 0, 0.15);
	text-align: center;
}

.list-new input {
	width: 100%;
	padding: 8px;
	border-radius: var(--radius-sm);
	border: 1px solid rgba(0, 0, 0, 0.1);
	margin-bottom: 8px;
}

.btn {
	border: none;
	padding: 8px 12px;
	border-radius: var(--radius-sm);
	cursor: pointer;
}

.btn-primary {
	background: var(--accent);
	color: white;
}

.btn-secondary {
	background: var(--accent-soft);
	color: var(--accent-strong);
}

.btn-ghost {
	background: transparent;
	color: var(--accent-strong);
}

.modal {
	position: fixed;
	inset: 0;
	background: rgba(17, 15, 12, 0.4);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 20;
}

.modal.is-open {
	display: flex;
}

.modal-content {
	background: white;
	border-radius: var(--radius-lg);
	padding: 24px;
	width: min(960px, 95vw);
	max-height: 90vh;
	overflow: auto;
	position: relative;
}

.modal-content.drag-file {
	outline: 2px dashed rgba(20, 89, 71, 0.5);
	background: #eef6f1;
}

.modal-content.small {
	width: min(360px, 90vw);
}

#labelColorPicker {
	width: 100%;
	height: 36px;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: var(--radius-sm);
	padding: 0;
	margin-top: 8px;
	background: transparent;
}

.label-palette {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 8px;
	margin: 12px 0 16px;
}

.label-palette button {
	border: none;
	width: 28px;
	height: 28px;
	border-radius: 8px;
	background: var(--swatch);
	cursor: pointer;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.modal-close {
	position: absolute;
	top: 12px;
	right: 12px;
	border: none;
	background: transparent;
	font-size: 24px;
	cursor: pointer;
}

.modal-title {
	font-size: 24px;
	width: 100%;
	border: none;
	font-weight: 600;
}

.modal-columns {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 24px;
	margin-top: 16px;
}

.rich-editor {
	min-height: 140px;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: var(--radius-sm);
	padding: 12px;
	background: #fff;
}

.editor-toolbar {
	display: flex;
	gap: 8px;
	margin-bottom: 8px;
	align-items: center;
}

.editor-toolbar button {
	border: 1px solid rgba(0, 0, 0, 0.1);
	background: white;
	padding: 6px 10px;
	border-radius: var(--radius-sm);
	cursor: pointer;
}

.editor-toolbar button.active {
	background: var(--accent-soft);
	border-color: rgba(0, 0, 0, 0.2);
}

.editor-status {
	margin-left: auto;
	font-size: 12px;
	color: var(--text-muted);
}

.section {
	margin-top: 20px;
}

.section h4 {
	margin-bottom: 8px;
}

.comment {
	background: var(--surface-muted);
	border-radius: var(--radius-sm);
	padding: 8px;
	margin-bottom: 8px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

textarea {
	width: 100%;
	min-height: 80px;
	border-radius: var(--radius-sm);
	border: 1px solid rgba(0, 0, 0, 0.1);
	padding: 8px;
}

.label-option {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}

.list-action {
	border: none;
	background: transparent;
	color: var(--text-muted);
	cursor: pointer;
	font-size: 12px;
}

.list-action.danger {
	color: var(--warning);
}

.label-option .label-actions {
	margin-left: auto;
	display: flex;
	gap: 6px;
}

.label-option .label-edit {
	border: none;
	background: transparent;
	color: var(--accent-strong);
	cursor: pointer;
	font-size: 12px;
}

.label-option .label-edit[disabled],
.assignee-pill button[disabled] {
	opacity: 0.4;
	cursor: not-allowed;
}

.load-more-btn {
	border: none;
	background: var(--accent-soft);
	color: var(--accent-strong);
	padding: 6px 10px;
	border-radius: var(--radius-sm);
	cursor: pointer;
	margin-top: 8px;
}

.archive-section ul {
	list-style: none;
	padding: 0;
	margin: 8px 0 16px;
}

.archive-section li {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 6px 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.activity-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

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

.activity-collapsed #cardActivity {
	display: none;
}

.activity-item {
	background: var(--surface-muted);
	border-radius: var(--radius-sm);
	padding: 8px;
	font-size: 13px;
	color: var(--text-muted);
}

.activity-item strong {
	color: var(--text);
}

#archiveSearch {
	width: 100%;
	padding: 8px 10px;
	border-radius: var(--radius-sm);
	border: 1px solid rgba(0, 0, 0, 0.1);
	margin-bottom: 12px;
}

#archiveTypeFilter {
	width: 100%;
	padding: 8px 10px;
	border-radius: var(--radius-sm);
	border: 1px solid rgba(0, 0, 0, 0.1);
	margin-bottom: 8px;
	background: white;
}

.is-viewer .list-action,
.is-viewer .add-card-btn,
.is-viewer #createListBtn,
.is-viewer #newListTitle {
	display: none;
}

.is-viewer .list-title {
	pointer-events: none;
	color: var(--text-muted);
}

.assignee-pill {
	background: var(--accent-soft);
	padding: 6px 10px;
	border-radius: 999px;
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 6px;
}

.assignee-pill button {
	border: none;
	background: transparent;
	cursor: pointer;
}

.checklist {
	background: var(--surface-muted);
	border-radius: var(--radius-sm);
	padding: 12px;
	margin-bottom: 12px;
}

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

.checklist-item select {
	padding: 4px 6px;
	border-radius: var(--radius-sm);
	border: 1px solid rgba(0, 0, 0, 0.1);
}

.toast-container {
	position: fixed;
	bottom: 24px;
	right: 24px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	z-index: 40;
}

.toast {
	background: var(--text);
	color: white;
	padding: 10px 14px;
	border-radius: var(--radius-sm);
}

.toast-hide {
	opacity: 0;
	transition: opacity 0.2s ease;
}

.login-container {
	max-width: 400px;
	margin: 100px auto;
	padding: 2rem;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.login-container h1 {
	margin-top: 0;
	text-align: center;
}

.login-container .form-group {
	margin-bottom: 1rem;
}

.login-container .form-group label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 600;
}

.login-container .form-group input {
	width: 100%;
	padding: 0.75rem;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 1rem;
	box-sizing: border-box;
}

.login-container .form-group input:focus {
	outline: none;
	border-color: #007bff;
}

.login-container .error {
	color: #dc3545;
	background: #f8d7da;
	padding: 0.75rem;
	border-radius: 4px;
	margin-bottom: 1rem;
}

.login-container .success {
	color: #155724;
	background: #d4edda;
	padding: 0.75rem;
	border-radius: 4px;
	margin-bottom: 1rem;
}

.login-container button[type="submit"] {
	width: 100%;
	padding: 0.75rem;
	background: #007bff;
	color: white;
	border: none;
	border-radius: 4px;
	font-size: 1rem;
	cursor: pointer;
}

.login-container button[type="submit"]:hover {
	background: #0056b3;
}

/* Login page uses green button */
body:has(form[action$="/login"]) .login-container button[type="submit"] {
	background: #05884d;
}

body:has(form[action$="/login"]) .login-container button[type="submit"]:hover {
	background: #046b3d;
}

body:has(form[action$="/forgot"]) .login-container button[type="submit"],
body:has(form[action$="/reset"]) .login-container button[type="submit"] {
	background: #05884d;
}

body:has(form[action$="/forgot"]) .login-container button[type="submit"]:hover,
body:has(form[action$="/reset"]) .login-container button[type="submit"]:hover {
	background: #046b3d;
}

.forgot-link,
.back-link {
	display: block;
	text-align: center;
	margin-top: 1rem;
	color: #007bff;
	text-decoration: none;
}

.forgot-link:hover,
.back-link:hover {
	text-decoration: underline;
}
.admin-section {
	padding: 24px 28px;
}

.admin-user-create {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 10px;
	margin-bottom: 16px;
}

.admin-user-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.admin-user {
	display: grid;
	grid-template-columns: 1.3fr 1.5fr 0.7fr 1.2fr auto auto auto;
	align-items: center;
	gap: 8px;
	background: white;
	border-radius: var(--radius-lg);
	padding: 12px;
	box-shadow: 0 6px 20px var(--shadow);
}

.admin-user input,
.admin-user select,
.admin-user-create input,
.admin-user-create select {
	padding: 8px;
	border-radius: var(--radius-sm);
	border: 1px solid rgba(0, 0, 0, 0.1);
	background: white;
	color: var(--text);
}

.admin-user .pill {
	background: var(--accent-soft);
	color: var(--accent-strong);
	padding: 4px 8px;
	border-radius: 999px;
	font-size: 12px;
}

.btn-ghost.danger {
	color: var(--warning);
}

.admin-board {
	background: white;
	border-radius: var(--radius-lg);
	padding: 16px;
	margin-bottom: 16px;
	box-shadow: 0 6px 20px var(--shadow);
}

.admin-board-header {
	display: flex;
	gap: 12px;
	margin-bottom: 12px;
}

.admin-board-header input {
	flex: 1;
	padding: 8px;
	border-radius: var(--radius-sm);
	border: 1px solid rgba(0, 0, 0, 0.1);
}

.admin-member {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 6px 0;
}

.admin-member select {
	padding: 4px 6px;
	border-radius: var(--radius-sm);
	border: 1px solid rgba(0, 0, 0, 0.1);
	margin: 0 8px;
}

.admin-board-settings {
	margin-top: 16px;
	display: grid;
	gap: 12px;
}

.admin-board-settings label {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 14px;
	color: var(--text-muted);
}

.admin-board-settings input,
.admin-board-settings select,
.admin-board-settings textarea {
	padding: 8px;
	border-radius: var(--radius-sm);
	border: 1px solid rgba(0, 0, 0, 0.1);
	background: white;
	color: var(--text);
}

@media (max-width: 900px) {
	.admin-user {
		grid-template-columns: 1fr 1fr;
	}
}

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

.empty-state {
	text-align: center;
	background: rgba(255, 255, 255, 0.7);
	padding: 60px 20px;
	border-radius: var(--radius-lg);
	box-shadow: 0 8px 20px var(--shadow);
}

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

	.header-actions {
		flex-direction: column;
		align-items: flex-start;
	}
}
