/*-------------------------------------
           Reset Styles
--------------------------------------*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
	margin: 0;
	padding: 0;
	border: 0;
	outline: 0;
	font-weight: inherit;
	font-style: inherit;
	font-size: 100%;
	font-family: inherit;
	vertical-align: baseline;
}

html,
body {
	height: 100%;
}

/*-------------------------------------
           End Reset Styles
--------------------------------------*/

/*-------------------------------------
        Color Palette & Variables
--------------------------------------*/

:root {
	--primary-color: #182A4E;
	--primary-dark: #0F1F38;
	--primary-light: #2D4A7B;
	--accent-blue: #3B82F6;
	--success-green: #10B981;
	--error-red: #EF4444;
	--warning-orange: #F59E0B;
	--bg-light: #F0F4F9;
	--bg-white: #FFFFFF;
	--text-dark: #1a1a1a;
	--text-light: #6B7280;
	--border-light: #E5E7EB;
	--border-medium: #D1D5DB;
}

/*-------------------------------------
        Global Styles
--------------------------------------*/

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
		'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
	line-height: 1.6;
	color: var(--text-dark);
	background-color: var(--bg-light);
	background-image: linear-gradient(180deg, #f3f7fc 0%, #e8ecf3 100%);
	background-attachment: fixed;
	margin: 0;
	padding: 0;
	overflow: hidden;
}

a {
	color: var(--accent-blue);
	text-decoration: none;
	transition: color 0.2s ease;
}

a:hover {
	color: var(--primary-light);
	text-decoration: underline;
}

.clear-fix:after {
	content: ".";
	display: block;
	visibility: hidden;
	height: 0;
	font-size: 1px;
	clear: both;
}

.clear-fix {
	zoom: 1;
}

ul {
	list-style-type: none;
	margin: 0;
	padding: 0;
	overflow: hidden;
}

li {
	float: left;
	padding: 10px;
}

/*-------------------------------------
       App Shell & Sidebar
--------------------------------------*/

.app-shell {
	display: flex;
	height: 100vh;
	max-height: 100vh;
	overflow: hidden;
}

#sidebar {
	width: 250px;
	background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary-color) 100%);
	color: var(--bg-white);
	display: flex;
	flex-direction: column;
	padding: 18px 14px;
	box-sizing: border-box;
	box-shadow: 2px 0 10px rgba(24, 42, 78, 0.15);
	height: 100vh;
	overflow-y: auto;
	flex-shrink: 0;
}

#app-main {
	flex: 1;
	min-width: 0;
	height: 100vh;
	overflow-y: auto;
	overflow-x: hidden;
	display: flex;
	flex-direction: column;
}

.app-menu-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border: 1px solid var(--border-light);
	border-radius: 8px;
	background: var(--bg-white);
	color: var(--primary-color);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
	z-index: 1400;
}

.app-menu-toggle-icon {
	display: inline-block;
	transform: translateY(-1px);
}

.sidebar-backdrop {
	display: none;
	position: fixed;
	inset: 0;
	border: 0;
	padding: 0;
	background: rgba(15, 23, 42, 0.45);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
	z-index: 1200;
}

.app-topbar {
	position: sticky;
	top: 0;
	z-index: 800;
	flex-shrink: 0;
}

.footer {
	display: none;
}

.app-topbar {
	height: 42px;
	padding: 0 20px;
	background: var(--bg-white);
	border-bottom: 1px solid var(--border-light);
	display: grid;
	grid-template-columns: auto auto minmax(120px, 1fr) auto;
	align-items: center;
	gap: 12px;
	box-sizing: border-box;
}

.topbar-organization-switcher {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
}

.topbar-organization-label {
	font-size: 12px;
	font-weight: 600;
	color: var(--text-light);
	white-space: nowrap;
}

.topbar-organization-select {
	margin: 0;
	min-width: 170px;
	max-width: 260px;
	padding: 4px 8px;
	font-size: 12px;
	line-height: 1.2;
	height: 30px;
}

.topbar-organization-single {
	font-size: 12px;
	font-weight: 600;
	color: var(--text-dark);
	padding: 4px 8px;
	border: 1px solid var(--border-light);
	border-radius: 6px;
	background: #f8fafc;
	max-width: 260px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.topbar-status-slot {
	width: 100%;
	min-width: 0;
	display: flex;
	justify-content: center;
	align-items: center;
}

.app-topbar-user {
	font-size: 13px;
	color: var(--text-light);
	font-weight: 600;
}

.app-topbar-logout-form {
	grid-column: 4 / 5;
	justify-self: end;
	margin: 0;
}

.app-topbar-logout {
	font-size: 13px;
	font-weight: 600;
	color: var(--primary-color);
	text-decoration: none;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	font-family: inherit;
}

.app-topbar-logout:hover {
	text-decoration: underline;
	color: var(--primary-color);
}

.app-topbar a,
.app-topbar a:hover,
.app-topbar a:focus,
.app-topbar a:visited {
	color: var(--primary-color);
}

.sidebar-brand {
	padding: 4px 8px 16px 8px;
	border-bottom: 1px solid rgba(255,255,255,0.2);
	margin-bottom: 14px;
}

.logo-link {
	display: block;
	line-height: 0;
	max-width: 100%;
}

.logo-wordmark {
	display: inline-block;
	font-size: 28px;
	font-weight: 800;
	line-height: 1.2;
	color: var(--bg-white);
	letter-spacing: 0.4px;
}

.logo-link img {
	max-height: 64px;
	max-width: 90%;
	height: auto;
	object-fit: contain;
}


.sidebar-nav {
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
}

.sidebar-link {
	color: var(--bg-white);
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	padding: 10px 12px;
	border-radius: 8px;
	transition: all 0.2s ease;
	border: 1px solid transparent;
}

.sidebar-link:hover {
	color: var(--bg-white);
	text-decoration: none;
	background: rgba(255,255,255,0.12);
	border-color: rgba(255,255,255,0.2);
}

.sidebar-link:visited,
.sidebar-link:focus,
.sidebar-link:focus-visible {
	color: var(--bg-white);
	text-decoration: none;
}

.sidebar-link.is-active {
	background: rgba(255,255,255,0.22);
	border-color: rgba(255,255,255,0.35);
	box-shadow: inset 0 0 0 1px rgba(255,255,255,0.15);
}

.sidebar-link-admin {
	background: rgba(255,255,255,0.18);
	border-color: rgba(255,255,255,0.25);
}

.sidebar-organization {
	color: var(--bg-white);
	font-size: 13px;
	opacity: 0.92;
	padding: 6px 12px;
}

.sidebar-bottom {
	margin-top: auto;
	padding-top: 12px;
}

/*-------------------------------------
       Primary Button Styles
--------------------------------------*/

.myButton {
	display: inline-block;
	padding: 8px 16px;
	margin: 0;
	background: linear-gradient(135deg, var(--accent-blue) 0%, var(--primary-light) 100%);
	color: var(--bg-white);
	border: none;
	border-radius: 6px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 2px 6px rgba(24, 42, 78, 0.12);
}

.myButton:hover {
	background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
	color: var(--bg-white);
	box-shadow: 0 4px 12px rgba(24, 42, 78, 0.2);
	transform: translateY(-2px);
	text-decoration: none;
}

.myButton:visited,
.myButton:focus,
.myButton:focus-visible {
	color: var(--bg-white);
	text-decoration: none;
}

.myButton:active {
	transform: translateY(0);
	box-shadow: 0 2px 4px rgba(24, 42, 78, 0.15);
}

/*-------------------------------------
       Article Container Styles
--------------------------------------*/

.article-list {
	max-width: 900px;
	margin: 30px 0;
	padding: 0 24px;
}

.article-list.todo-page-list {
	max-width: 980px;
}

.article-list.wide-layout {
	max-width: 1400px;
}

.article-info-container {
	background: var(--bg-white);
	border: 1px solid var(--border-light);
	border-radius: 10px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	padding: 0;
	margin: 0 0 20px 0;
	transition: all 0.3s ease;
	overflow: hidden;
}

.article-info-container:hover {
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.article-inner-border {
	background-color: transparent;
	border: none;
	border-radius: 0;
	padding: 20px;
	line-height: 1.6;
}

.article-details {
	display: flex;
	align-items: stretch;
	gap: 20px;
}

.vote-panel {
	flex: 0 0 110px;
	padding: 20px 15px;
	background: linear-gradient(135deg, var(--bg-light) 0%, #f8fbff 100%);
	border-right: 1px solid var(--border-light);
	text-align: center;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
}

.vote-score {
	font-size: 18px;
	font-weight: 700;
	color: var(--primary-color);
	margin-bottom: 12px;
}

.vote-form {
	margin: 6px 0;
	width: 100%;
}

.vote-button {
	display: block;
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #BDD4FF;
	border-radius: 5px;
	background-color: var(--bg-white);
	color: var(--text-dark);
	cursor: pointer;
	font-weight: 600;
	font-size: 12px;
	transition: all 0.2s ease;
}

.vote-button:hover {
	background-color: var(--accent-blue);
	color: var(--bg-white);
	border-color: var(--accent-blue);
}

.vote-button:disabled {
	opacity: 0.65;
	cursor: not-allowed;
	transform: none;
}

.vote-button.selected {
	background-color: var(--primary-color);
	border-color: var(--primary-color);
	color: var(--bg-white);
}

.vote-button.up.selected {
	background-color: var(--success-green);
	border-color: var(--success-green);
}

.vote-button.down.selected {
	background-color: var(--error-red);
	border-color: var(--error-red);
}

.vote-login {
	font-size: 12px;
	font-style: italic;
	color: var(--text-light);
	margin-top: 10px;
}

.article-copy {
	flex: 1;
	padding: 0;
}

.article-main {
	display: flex;
	align-items: flex-start;
	gap: 20px;
	flex: 1;
}

.article-main .article-copy {
	flex: 1;
	min-width: 0;
}

.facet-section {
	flex: 0 0 320px;
	max-width: 320px;
	background: linear-gradient(180deg, #f8fbff 0%, #f1f6fe 100%);
	border: 1px solid var(--border-light);
	border-radius: 8px;
	padding: 12px;
	box-sizing: border-box;
}

.facet-heading {
	font-size: 15px;
	font-weight: 700;
	color: var(--primary-color);
	margin: 0 0 10px 0;
}

.facet-empty {
	font-size: 13px;
	color: var(--text-light);
	margin: 0;
}

.facet-list {
	list-style: none;
	margin: 0;
	padding: 0;
	overflow: visible;
}

.facet-row {
	float: none;
	padding: 10px 0;
	border-top: 1px solid var(--border-light);
	display: flex;
	align-items: center;
	gap: 10px;
}

.facet-row:first-child {
	border-top: none;
	padding-top: 0;
}

.facet-row:last-child {
	padding-bottom: 0;
}

.facet-title {
	font-size: 13px;
	font-weight: 700;
	margin: 0;
	color: var(--primary-color);
}

.facet-main {
	flex: 1;
	min-width: 0;
}

.facet-vote-score {
	font-size: 10px;
	font-weight: 700;
	color: var(--primary-color);
	margin: 0;
	line-height: 1;
}

.facet-vote .vote-button {
	max-width: 140px;
}

.facet-vote-inline {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	flex: 0 0 20px;
}

.facet-vote-inline .vote-form {
	margin: 0;
	width: auto;
}

.facet-arrow {
	width: 18px;
	height: 14px;
	min-width: 18px;
	padding: 0;
	line-height: 12px;
	font-size: 9px;
	border-radius: 4px;
	border-color: var(--border-light);
	color: var(--text-light);
	background: transparent;
}

.facet-arrow:hover {
	background-color: #eef4ff;
	color: var(--primary-color);
	border-color: #c7d8ff;
}

.facet-vote-inline .vote-login {
	font-size: 10px;
	line-height: 1.2;
	text-align: center;
}

.facet-actions {
	margin: 12px 0 0 0;
	padding-top: 10px;
	border-top: 1px solid var(--border-light);
}

.article-title {
	font-size: 18px;
	font-weight: 700;
	color: var(--primary-color);
	margin: 0;
	line-height: 1.4;
}

.article-title-meta {
	margin: 2px 0 8px 0;
	line-height: 1;
}

.article-title-date {
	display: inline-flex;
	align-items: center;
	font-size: 12px;
	font-weight: 500;
	color: var(--text-light);
	white-space: nowrap;
	letter-spacing: 0.01em;
}

.article-title-date::before {
	content: "•";
	display: inline-block;
	margin-right: 6px;
	font-size: 10px;
	opacity: 0.75;
}

.article-title a {
	color: var(--primary-color);
	transition: color 0.2s ease;
}

.article-title a:hover {
	color: var(--accent-blue);
	text-decoration: none;
}

.article-submit-info {
	font-size: 12px;
	color: var(--text-light);
	margin: 0 0 12px 0;
}

.article-content {
	font-size: 14px;
	color: var(--text-dark);
	line-height: 1.6;
	margin: 0;
}

/*-------------------------------------
    Status Message Styles
--------------------------------------*/

.status-message-container {
	max-width: 100%;
	margin: 0;
	padding: 0 30px;
	background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
	box-sizing: border-box;
	padding-top: 15px;
	padding-bottom: 15px;
}

.status-message-inner {
	max-width: 900px;
	margin: 0 auto;
	background: var(--bg-white);
	border-left: 4px solid var(--accent-blue);
	border-radius: 8px;
	padding: 12px 16px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	line-height: 1.6;
}

.status-message-row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 10px;
}

.status-message-row:last-child {
	margin-bottom: 0;
}

.status-message-row[data-type="success"] {
	border-left-color: var(--success-green);
}

.status-message-row[data-type="success"] .status-icon {
	color: var(--success-green);
}

.status-message-row[data-type="error"] {
	border-left-color: var(--error-red);
}

.status-message-row[data-type="error"] .status-icon {
	color: var(--error-red);
}

.status-message-row[data-type="warning"] {
	border-left-color: var(--warning-orange);
}

.status-message-row[data-type="warning"] .status-icon {
	color: var(--warning-orange);
}

.status-icon {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	color: var(--accent-blue);
}

.status-text {
	font-size: 14px;
	color: var(--text-dark);
	font-weight: 500;
}

.status-message-container[data-in-topbar="1"] {
	max-width: none;
	margin: 0;
	padding: 0;
	background: transparent;
	display: inline-flex;
	width: auto;
}

.status-message-container[data-in-topbar="1"] .status-message-inner {
	max-width: none;
	margin: 0;
	padding: 3px 8px;
	border-radius: 6px;
	box-shadow: none;
	border: 1px solid var(--border-light);
	border-left: 3px solid var(--accent-blue);
	line-height: 1.2;
	min-height: 24px;
	max-height: 24px;
	display: inline-flex;
	align-items: center;
	overflow: hidden;
	width: auto;
}

.status-message-container[data-in-topbar="1"] .status-message-row {
	margin-bottom: 0;
	gap: 8px;
	white-space: nowrap;
	min-width: 0;
}

.status-message-container[data-in-topbar="1"] .status-message-row:not(:first-child) {
	display: none;
}

.status-message-container[data-in-topbar="1"] .status-icon {
	width: 16px;
	height: 16px;
}

.status-message-container[data-in-topbar="1"] .status-text {
	font-size: 12px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	cursor: help;
}

/*-------------------------------------
       Footer Styles
--------------------------------------*/

.footer {
	background: var(--bg-light);
	color: var(--text-dark);
	padding: 30px 20px;
	text-align: center;
	margin-top: 50px;
	font-size: 13px;
	border-bottom: 5px solid var(--primary-color);
}

/*-------------------------------------
       404/500 Page Styles
--------------------------------------*/

.body-404,
.body-500 {
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
}

.body-404 h1,
.body-500 h1 {
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	width: 100%;
	height: 400px;
	margin: 0;
}

.body-404 h1 span,
.body-500 h1 span {
	display: none;
}

.body-404 h2.info-top,
.body-500 h2.info-top {
	border: 1px solid var(--border-light);
	font-size: 18px;
	background: var(--bg-white);
	border-radius: 6px;
	width: auto;
	max-width: 400px;
	margin: -48px auto 0;
	padding: 15px 20px;
	font-weight: bold;
	text-align: center;
}

.site-owner-404,
.site-visitor-404 {
	float: left;
	font-size: 14px;
	color: var(--text-light);
	font-weight: normal;
	padding: 10px 0;
}

.site-owner-404 {
	width: 50%;
	border-right: 1px solid var(--border-light);
	padding-right: 20px;
}

.site-owner-404 h3,
.site-visitor-404 h3 {
	font-size: 14px;
	font-weight: 600;
	color: var(--text-dark);
	margin: 0 0 10px 0;
}

.site-visitor-404 {
	width: 50%;
	padding-left: 20px;
}

.site-owner-404 ol li,
.site-visitor-404 ol li {
	padding-bottom: 5px;
}

/*-------------------------------------
       Form Styles
--------------------------------------*/

.form-title {
	font-size: 24px;
	font-weight: 700;
	color: var(--primary-color);
	margin: 0 0 25px 0;
	padding-bottom: 15px;
	border-bottom: 2px solid var(--border-light);
}

.article-form {
	width: 100%;
}

.compact-filters {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	align-items: end;
}

.compact-filters .filter-search {
	grid-column: span 2;
}

.compact-filters .form-group {
	margin-bottom: 8px;
}

.compact-filters .form-actions {
	grid-column: 1 / -1;
	margin-top: 8px;
	padding-top: 8px;
}

.product-summary-row {
	display: flex;
	gap: 18px;
	flex-wrap: wrap;
	margin: -10px 0 14px 0;
	padding: 10px 12px;
	background: #f7faff;
	border: 1px solid var(--border-light);
	border-radius: 8px;
	font-size: 13px;
}

.form-group {
	margin-bottom: 20px;
}

.step-title {
	font-size: 18px;
	font-weight: 700;
	color: var(--primary-color);
	margin: 18px 0 6px 0;
	padding-top: 10px;
	border-top: 1px solid var(--border-light);
}

.step-note {
	font-size: 13px;
	color: var(--text-light);
	margin: 0 0 12px 0;
}

.form-group label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: var(--text-dark);
	margin-bottom: 8px;
}

input[type="text"],
input[type="password"],
input[type="email"],
select,
textarea {
	width: 100%;
	max-width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--border-light);
	border-radius: 6px;
	font-family: inherit;
	font-size: 14px;
	line-height: 1.5;
	color: var(--text-dark);
	background-color: var(--bg-white);
	box-sizing: border-box;
	transition: all 0.2s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
	outline: none;
	border-color: var(--accent-blue);
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
	background-color: var(--bg-white);
}

textarea {
	resize: vertical;
	font-family: 'Monaco', 'Courier New', monospace;
}

.form-actions {
	display: flex;
	gap: 12px;
	margin-top: 25px;
	padding-top: 15px;
	border-top: 1px solid var(--border-light);
}

.button-secondary {
	background: linear-gradient(135deg, var(--text-light) 0%, #5a6c7d 100%);
}

.button-secondary:hover {
	background: linear-gradient(135deg, #5a6c7d 0%, var(--text-light) 100%);
}

.button-danger {
	background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.button-danger:hover {
	background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
}

.admin-table-wrap {
	margin-top: 25px;
	overflow-x: auto;
}

.todo-card-container {
	overflow: visible;
}

.todo-table-wrap {
	overflow-x: auto;
	overflow-y: visible;
	padding: 0 10px;
	box-sizing: border-box;
}

.todo-table {
	overflow: visible;
	table-layout: fixed;
}

.admin-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 12px;
	background: var(--bg-white);
	border: 1px solid var(--border-light);
	border-radius: 8px;
	overflow: hidden;
}

.todo-table .todo-col-done {
	width: 64px;
}

.todo-table .todo-col-item {
	width: auto;
}

.todo-table .todo-col-tags {
	width: 180px;
}

.todo-table .todo-col-actions {
	width: 84px;
}

.admin-table thead th {
	background: var(--primary-color);
	color: var(--bg-white);
	padding: 8px;
	text-align: left;
	font-weight: 600;
}

.admin-table tbody td {
	padding: 7px;
	border-top: 1px solid var(--border-light);
	vertical-align: middle;
}

.admin-table tbody tr:nth-child(even) {
	background: #f8fafc;
}

.todo-toolbar {
	margin: -4px 0 10px 0;
	display: block;
}

.todo-filter-form {
	display: block;
	width: 100%;
	max-width: none;
}

.todo-filter-panel {
	--todo-filter-select-width: 360px;
	border: 1px solid var(--border-light);
	border-radius: 8px;
	padding: 12px;
	background: var(--bg-light);
}

.page-filter-panel {
	border: 1px solid var(--border-light);
	border-radius: 8px;
	padding: 12px;
	background: var(--bg-light);
	margin-bottom: 14px;
}

.page-filter-panel .form-title {
	margin-bottom: 10px;
	padding-bottom: 10px;
}

.page-filter-panel .form-actions {
	margin-top: 10px;
}

.page-filter-panel.page-filter-panel-plain .form-title {
	border-bottom: none;
	padding-bottom: 0;
	margin-bottom: 0;
}

.todo-filter-title {
	display: block;
	font-size: 20px;
	font-weight: 700;
	color: var(--primary-color);
	line-height: 1.2;
}

.todo-filter-header-row {
	display: grid;
	grid-template-columns: 64px var(--todo-filter-select-width) max-content;
	align-items: center;
	column-gap: 2px;
	padding-bottom: 10px;
	margin-bottom: 10px;
	border-bottom: 1px solid var(--border-light);
}

.todo-list-filter-select {
	width: var(--todo-filter-select-width);
	max-width: var(--todo-filter-select-width);
	padding: 10px 12px;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--primary-color);
	margin-bottom: 0;
	margin-left: 0;
	border-radius: 8px;
}

.todo-tag-filter-row {
	margin-top: 0;
	display: grid;
	grid-template-columns: 64px var(--todo-filter-select-width) max-content auto;
	align-items: center;
	column-gap: 2px;
}

.todo-filter-spacer {
	display: inline-block;
	width: 1px;
	height: 1px;
}

.todo-tag-filter-label {
	font-size: 13px;
	font-weight: 600;
	color: var(--text-dark);
	white-space: nowrap;
}

.todo-filter-form select {
	min-width: 210px;
	max-width: 260px;
	padding: 6px 10px;
	font-size: 13px;
	border-radius: 6px;
}

.todo-filter-form .todo-list-filter-select,
.todo-filter-form .todo-tag-filter-select {
	min-width: var(--todo-filter-select-width);
	max-width: var(--todo-filter-select-width);
	width: var(--todo-filter-select-width);
}

.todo-tag-filter-select {
	min-width: var(--todo-filter-select-width);
	max-width: var(--todo-filter-select-width);
	width: var(--todo-filter-select-width);
}

.todo-list-filter-select {
	min-width: var(--todo-filter-select-width);
	max-width: var(--todo-filter-select-width);
	width: var(--todo-filter-select-width);
}

.todo-filter-form .myButton {
	padding: 6px 10px;
	font-size: 12px;
}

.todo-tag-filter-row .myButton {
	justify-self: start;
	width: auto;
}

.todo-filter-row-actions {
	justify-self: start;
}

.todo-filter-row-actions .myButton {
	padding: 6px 10px;
	font-size: 12px;
}

.todo-filter-add-icon {
	text-decoration: none;
	color: var(--accent-blue);
}

.todo-filter-add-icon:hover {
	text-decoration: none;
}

.todo-check-cell {
	width: 64px;
	text-align: center;
}

.todo-check-form {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
}

.todo-check-input {
	width: 16px;
	height: 16px;
	cursor: pointer;
}

.todo-item-title-cell {
	white-space: normal;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.todo-item-title {
	display: inline;
	vertical-align: middle;
	white-space: normal;
}

.inline-item-title {
	cursor: pointer;
}

.inline-item-title:hover {
	text-decoration: underline;
	text-decoration-style: dotted;
	text-underline-offset: 2px;
}

.inline-item-input {
	display: none;
	font-size: 12px;
	line-height: 1.4;
	padding: 2px 6px;
	max-width: 100%;
	width: 100%;
	box-sizing: border-box;
}

.inline-tag-name-wrap {
	display: inline-block;
	max-width: 100%;
}

.inline-tag-name {
	cursor: pointer;
}

.inline-tag-name:hover {
	text-decoration: underline;
	text-decoration-style: dotted;
	text-underline-offset: 2px;
}

.inline-tag-input {
	display: none;
	font-size: 12px;
	line-height: 1.4;
	padding: 2px 6px;
	max-width: 260px;
	width: 100%;
	box-sizing: border-box;
}

.todo-item-title.is-completed {
	text-decoration: line-through;
	opacity: 0.75;
}

.todo-item-note-indicator {
	display: inline-block;
	vertical-align: middle;
	margin-left: 6px;
	font-size: 12px;
	line-height: 1;
	color: var(--accent-blue);
	cursor: help;
}

.todo-actions-cell {
	width: 84px;
	white-space: nowrap;
}

.todo-actions-group {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.todo-tags-cell {
	width: 180px;
	position: relative;
}

.todo-tag-form {
	display: inline-flex;
	margin: 0;
	width: 100%;
}


.todo-row-tag-select {
	min-width: 140px;
	max-width: 180px;
	padding: 5px 8px;
	font-size: 12px;
	border-radius: 6px;
}

.todo-row-tag-select[multiple] {
	height: 64px;
	padding: 4px 6px;
}

.todo-tag-editor {
	position: relative;
	width: 100%;
	z-index: 1;
}

.todo-tag-editor.is-open {
	z-index: 1200;
}

.todo-tag-display {
	width: 100%;
	max-width: 100%;
	min-height: 28px;
	padding: 2px 4px;
	border: 1px solid transparent;
	background: transparent;
	cursor: pointer;
	text-align: left;
	border-radius: 6px;
}

.todo-tag-display:hover {
	background: #f8fafc;
	border-color: var(--border-light);
}

.todo-tag-bubbles {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	max-width: 100%;
	flex-wrap: wrap;
	overflow: visible;
	white-space: normal;
}

.todo-tag-bubble {
	display: inline-block;
	max-width: 100%;
	padding: 2px 7px;
	border-radius: 999px;
	background: #e8f0ff;
	border: 1px solid #c7d8ff;
	color: var(--primary-color);
	font-size: 11px;
	line-height: 1.2;
	white-space: normal;
	overflow-wrap: anywhere;
}

.todo-tag-bubble.is-empty {
	background: #f3f4f6;
	border-color: var(--border-light);
	color: var(--text-light);
}

.todo-tag-popover {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	z-index: 300;
	width: 220px;
	max-height: 220px;
	overflow-y: auto;
	background: var(--bg-white);
	border: 1px solid var(--border-light);
	border-radius: 8px;
	box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
	padding: 6px;
}

.todo-tag-popover.is-floating {
	position: fixed;
	z-index: 5000;
}

.todo-tag-popover.is-dropup {
	top: auto;
	bottom: calc(100% + 4px);
}

.todo-tag-options {
	list-style: none;
	margin: 0;
	padding: 0;
	overflow: visible;
}

.todo-tag-option {
	float: none;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 2px;
}

.todo-tag-option-name {
	font-size: 12px;
	color: var(--text-dark);
	line-height: 1.25;
}

.todo-tag-toggle {
	width: 22px;
	height: 22px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--border-light);
	border-radius: 5px;
	background: var(--bg-white);
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
}

.todo-tag-toggle.is-add {
	color: var(--accent-blue);
	border-color: #bfdbfe;
	background: #eff6ff;
}

.todo-tag-toggle.is-remove {
	color: #92400e;
	border-color: #fcd34d;
	background: #fffbeb;
}

.todo-delete-form {
	display: inline-flex;
	margin: 0;
}

.todo-delete-form .myButton {
	padding: 6px 10px;
	font-size: 12px;
}

.todo-delete-icon {
	width: 28px;
	height: 28px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--border-light);
	border-radius: 6px;
	background: var(--bg-white);
	color: var(--error-red);
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
}

.todo-delete-icon:hover {
	background: #fff5f5;
	border-color: #fecaca;
}

.todo-note-icon {
	width: 28px;
	height: 28px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--border-light);
	border-radius: 6px;
	background: var(--bg-white);
	color: var(--accent-blue);
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
}

.todo-note-icon:hover {
	background: #eff6ff;
	border-color: #bfdbfe;
}

.todo-action-icon-svg {
	width: 16px;
	height: 16px;
	display: block;
}

.todo-add-icon {
	width: 28px;
	height: 28px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--border-light);
	border-radius: 6px;
	background: var(--bg-white);
	color: var(--accent-blue);
	cursor: pointer;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
}

.todo-add-icon:hover {
	background: #eff6ff;
	border-color: #bfdbfe;
}

.item-detail-modal {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.45);
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
	z-index: 1000;
}

.item-detail-modal.is-open {
	display: flex;
}

.item-detail-dialog {
	width: 100%;
	max-width: 560px;
	background: var(--bg-white);
	border: 1px solid var(--border-light);
	border-radius: 10px;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.24);
	overflow: hidden;
}

.item-detail-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 14px;
	border-bottom: 1px solid var(--border-light);
	background: #f8fafc;
}

.item-detail-header h3 {
	margin: 0;
	font-size: 16px;
	color: var(--primary-color);
}

.item-detail-close {
	width: 30px;
	height: 30px;
	border: 1px solid var(--border-light);
	border-radius: 6px;
	background: var(--bg-white);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	color: var(--text-light);
}

.item-detail-close:hover {
	background: #f3f4f6;
}

.item-detail-body {
	padding: 14px;
}

.item-detail-meta {
	font-size: 13px;
	line-height: 1.5;
	color: var(--text-dark);
	margin-bottom: 12px;
	display: grid;
	gap: 4px;
}

.item-detail-form label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 6px;
	color: var(--text-dark);
}

.item-detail-form textarea {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	resize: vertical;
	min-height: 90px;
}

.item-detail-actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 12px;
}

.entity-manager-modal {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.45);
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
	z-index: 1100;
}

.entity-manager-modal.is-open {
	display: flex;
}

.entity-manager-dialog {
	width: 100%;
	max-width: 620px;
	background: var(--bg-white);
	border: 1px solid var(--border-light);
	border-radius: 10px;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.24);
	overflow: hidden;
}

.entity-manager-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 14px;
	border-bottom: 1px solid var(--border-light);
	background: #f8fafc;
}

.entity-manager-header h3 {
	margin: 0;
	font-size: 16px;
	color: var(--primary-color);
}

.entity-manager-close {
	width: 30px;
	height: 30px;
	border: 1px solid var(--border-light);
	border-radius: 6px;
	background: var(--bg-white);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	color: var(--text-light);
}

.entity-manager-close:hover {
	background: #f3f4f6;
}

.entity-manager-body {
	padding: 14px;
}

.entity-create-form label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 6px;
	color: var(--text-dark);
}

.entity-create-row {
	display: flex;
	gap: 8px;
	align-items: center;
}

.entity-create-row input[type="text"] {
	margin: 0;
}

.entity-actions-cell {
	white-space: nowrap;
	display: flex;
	gap: 6px;
}

.entity-name-input {
	display: none;
	font-size: 12px;
	line-height: 1.4;
	padding: 4px 8px;
	max-width: 320px;
	width: 100%;
	box-sizing: border-box;
}

.todo-add-form {
	margin: 0;
}

.todo-add-title-input {
	display: block;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	padding: 2px 6px;
	font-size: 12px;
	line-height: 1.4;
	border: none;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.todo-add-title-input:focus {
	outline: none;
	border: none;
	box-shadow: none;
	background: transparent;
}

.todo-add-title-input::placeholder {
	color: var(--text-light);
	opacity: 0.95;
}

.todo-add-date-cell {
	color: var(--text-light);
	text-align: center;
	font-size: 12px;
}

.admin-article-table th,
.admin-article-table td {
	vertical-align: top;
}

.admin-article-title {
	font-weight: 600;
	color: var(--primary-color);
	text-decoration: none;
}

.admin-article-title:hover {
	text-decoration: underline;
}

.admin-article-preview {
	max-width: 520px;
	white-space: normal;
	line-height: 1.4;
	color: var(--text-light);
}

.role-checkbox-group {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 15px;
}

.role-option {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: var(--text-dark);
}

.role-option input[type="checkbox"] {
	width: 16px;
	height: 16px;
}

/*-------------------------------------
       Responsive Design
--------------------------------------*/

@media (max-width: 768px) {
	#sidebar {
		position: fixed;
		top: 0;
		left: 0;
		width: 250px;
		max-width: 82vw;
		height: 100vh;
		padding: 12px;
		transform: translateX(-100%);
		transition: transform 0.2s ease;
		z-index: 1300;
	}

	.app-shell.is-sidebar-open #sidebar {
		transform: translateX(0);
	}

	#app-main {
		width: 100%;
	}

	.app-menu-toggle {
		display: inline-flex;
		position: fixed;
		top: 4px;
		left: 8px;
	}

	.sidebar-backdrop {
		display: block;
	}

	.app-shell.is-sidebar-open .sidebar-backdrop {
		opacity: 1;
		pointer-events: auto;
	}

	.app-topbar {
		height: 38px;
		padding: 0 12px 0 48px;
		grid-template-columns: auto minmax(120px, 1fr) auto;
		gap: 8px;
	}

	.app-topbar-logout-form {
		grid-column: 3 / 4;
	}

	.topbar-organization-label {
		display: none;
	}

	.topbar-organization-select {
		min-width: 120px;
		max-width: 160px;
		height: 28px;
		font-size: 11px;
		padding: 3px 6px;
	}

	.topbar-organization-single {
		max-width: 160px;
		font-size: 11px;
		padding: 3px 6px;
	}

	.logo-wordmark {
		font-size: 24px;
	}

	.sidebar-nav {
		gap: 6px;
	}

	.sidebar-bottom {
		margin-top: 8px;
	}

	.article-details {
		flex-direction: column;
	}

	.article-main {
		flex-direction: column;
	}

	.facet-section {
		flex: 1;
		max-width: 100%;
	}

	.vote-panel {
		flex: 1;
		border-right: none;
		border-bottom: 1px solid var(--border-light);
		flex-direction: row;
		justify-content: space-around;
		align-items: center;
		padding: 15px 20px;
	}

	.vote-score {
		margin: 0;
	}

	.vote-form {
		width: auto;
	}

	.vote-button {
		display: inline-block;
		width: auto;
		min-width: 80px;
	}

	.article-list {
		padding: 0 10px;
	}

	.compact-filters {
		grid-template-columns: 1fr;
	}

	.compact-filters .filter-search {
		grid-column: span 1;
	}

	.article-title {
		font-size: 16px;
	}

	.article-content {
		font-size: 13px;
	}

	.todo-toolbar {
		display: block;
	}

	.todo-filter-form {
		max-width: none;
	}

	.todo-tag-filter-row {
		grid-template-columns: 1fr;
		row-gap: 8px;
	}

	.todo-filter-header-row {
		grid-template-columns: 1fr;
		row-gap: 8px;
	}

	.todo-list-filter-select {
		max-width: none;
		width: 100%;
	}

	.todo-tag-filter-row select {
		min-width: 0;
		max-width: none;
		width: 100%;
	}

	.todo-filter-row-actions {
		justify-self: start;
	}

	.todo-filter-spacer {
		display: none;
	}
}

@media (max-width: 480px) {
	.article-inner-border {
		padding: 15px;
	}

	.article-title {
		font-size: 15px;
	}

	.vote-button {
		font-size: 11px;
		padding: 6px 8px;
	}

	.myButton {
		padding: 6px 12px;
		font-size: 12px;
	}

	#sidebar {
		padding: 10px;
	}
}

