:root {
	font-family: "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
	--bg: #f3f4f8;
	--card: #ffffff;
	--text: #1f2933;
	--muted: #52606d;
	--border: #d9dde5;
	--accent: #1f8a70;
	--accent-hover: #156852;
	--danger: #d64545;
	--danger-hover: #b02a37;
	--shadow: rgba(15, 23, 42, 0.06);
}

[data-theme="dark"] {
	--bg: #0f1419;
	--card: #1a1f29;
	--text: #e2e8f0;
	--muted: #94a3b8;
	--border: #2d3748;
	--accent: #10b981;
	--accent-hover: #059669;
	--danger: #ef4444;
	--danger-hover: #dc2626;
	--shadow: rgba(0, 0, 0, 0.2);
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	transition: background-color 0.3s ease, color 0.3s ease;
}

.topbar {
	padding: 1.5rem 2rem;
	background: var(--card);
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid var(--border);
	transition: background-color 0.3s ease, border-color 0.3s ease;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
}

.brand-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 999px;
	border: 2px solid var(--accent);
	color: var(--accent);
	font-weight: 700;
	text-decoration: none;
	transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.brand-link:hover,
.brand-link:focus {
	background: var(--accent);
	color: #ffffff;
	transform: translateY(-1px);
}

.brand-title {
	font-size: 1.4rem;
	font-weight: 600;
}

.topbar-actions {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.theme-toggle {
	background: var(--card);
	border: 2px solid var(--border);
	border-radius: 999px;
	padding: 0.25rem;
	width: 3.2rem;
	height: 1.8rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: border-color 0.3s ease, background-color 0.3s ease, transform 0.2s ease;
	flex-shrink: 0;
}

.theme-toggle:hover {
	border-color: var(--accent);
}

.theme-toggle:active {
	transform: translateY(1px);
}

.theme-toggle .theme-icon {
	position: relative;
	width: 100%;
	height: 100%;
	display: block;
}

.theme-toggle .theme-icon::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 999px;
	background: rgba(31, 138, 112, 0.24);
	transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.theme-toggle .theme-icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 0.25rem;
	width: 1.1rem;
	height: 1.1rem;
	border-radius: 50%;
	background: var(--accent);
	transform: translate(0, -50%);
	transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
	box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
}

.theme-toggle[data-mode="dark"] .theme-icon::before {
	background: rgba(34, 211, 238, 0.25);
	box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.4);
}

.theme-toggle[data-mode="dark"] .theme-icon::after {
	background: var(--accent-hover);
	transform: translate(1.35rem, -50%);
	box-shadow: 0 2px 6px rgba(15, 23, 42, 0.35);
}

.theme-toggle:hover .theme-icon::before {
	box-shadow: inset 0 0 0 1px rgba(31, 138, 112, 0.35);
}

.theme-toggle[data-mode="dark"]:hover .theme-icon::before {
	box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.45);
}

.theme-toggle:active .theme-icon::after {
	transform: translate(0.05rem, -50%) scale(0.95);
}

.theme-toggle[data-mode="dark"]:active .theme-icon::after {
	transform: translate(1.4rem, -50%) scale(0.95);
}


.site-intro {
	max-width: 1080px;
	margin: 0 auto;
	padding: 1.5rem 2rem 0;
	color: var(--muted);
	line-height: 1.6;
}

.user-actions {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.user-label strong {
	font-weight: 700;
}

.user-actions button {
	border: 1px solid var(--accent);
	background: none;
	color: var(--accent);
	padding: 0.45rem 1rem;
	border-radius: 8px;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.user-actions button:hover,
.user-actions button:focus {
	background: var(--accent);
	color: #ffffff;
	transform: translateY(-1px);
}

main {
	max-width: 1080px;
	margin: 0 auto;
	padding: 2rem 1.5rem 4rem;
	display: grid;
	gap: 1.5rem;
}

.card {
	background: var(--card);
	border-radius: 16px;
	border: 1px solid var(--border);
	box-shadow: 0 12px 28px var(--shadow);
	padding: 1.75rem;
	transition: background-color 0.3s ease, border-color 0.3s ease;
}

.card.controls {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
}

.view-toggle {
	display: inline-flex;
	gap: 0.5rem;
}

.view-button {
	border: 1px solid var(--border);
	background: none;
	padding: 0.6rem 1.2rem;
	border-radius: 999px;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.view-button.active {
	background: var(--accent);
	color: #ffffff;
	border-color: var(--accent);
}

.filters {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.filters label {
	display: flex;
	flex-direction: column;
	font-weight: 600;
	color: var(--muted);
}

select,
input,
textarea {

#loginMessage {
	margin-top: 1.25rem;
}
	font-family: inherit;
	font-size: 1rem;
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 0.5rem 0.75rem;
	background: var(--card);
	color: var(--text);
	transition: all 0.2s ease;
}

select:focus,
input:focus,
textarea:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 3px rgba(31, 138, 112, 0.2);
}

[data-theme="dark"] select:focus,
[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus {
	box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.form-group {
	margin-bottom: 1.25rem;
}

.form-actions {
	display: flex;
	justify-content: flex-end;
	gap: 0.75rem;
}

.form-actions button,
.issue-actions button {
	background: var(--accent);
	color: #ffffff;
	border: none;
	padding: 0.55rem 1.2rem;
	border-radius: 10px;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}

.issue-actions button + button {
	margin-left: 0.5rem;
}

.issue.issue-hidden {
	border-color: var(--danger);
	box-shadow: 0 0 0 2px rgba(214, 69, 69, 0.15);
}

.issue-actions button:hover,
.issue-actions button:focus,
.form-actions button:hover,
.form-actions button:focus {
	background: var(--accent-hover);
	transform: translateY(-1px);
}

.issue-actions .danger {
	background: var(--danger);
}

.issue-actions .danger:hover,
.issue-actions .danger:focus {
	background: var(--danger-hover);
}

.message {
	padding: 0;
	border-radius: 12px;
	border: 1px solid transparent;
	transition: all 0.3s ease;
	margin-bottom: 0.5rem;
}

.message:not(:empty) {
	padding: 0.85rem 1.1rem;
}

.message.info {
	background: rgba(31, 138, 112, 0.12);
	border-color: rgba(31, 138, 112, 0.25);
	color: #156852;
}

[data-theme="dark"] .message.info {
	background: rgba(16, 185, 129, 0.15);
	border-color: rgba(16, 185, 129, 0.3);
	color: #6ee7b7;
}

.message.success {
	background: rgba(34, 197, 94, 0.12);
	border-color: rgba(34, 197, 94, 0.3);
	color: #059669;
}

[data-theme="dark"] .message.success {
	background: rgba(34, 197, 94, 0.15);
	border-color: rgba(34, 197, 94, 0.3);
	color: #6ee7b7;
}

.message.error {
	background: rgba(239, 68, 68, 0.12);
	border-color: rgba(239, 68, 68, 0.3);
	color: #dc2626;
}

[data-theme="dark"] .message.error {
	background: rgba(239, 68, 68, 0.15);
	border-color: rgba(239, 68, 68, 0.3);
	color: #fca5a5;
}

.issue-list {
	display: grid;
	gap: 1.5rem;
}

.issue header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 1rem;
}

.issue-title {
	margin: 0;
}

.issue-id {
	margin: 0.1rem 0 0;
	color: var(--muted);
}

.issue-body {
	margin-top: 1rem;
	line-height: 1.6;
}

.issue-body p {
	margin: 0.4rem 0;
}

.issue-details {
	padding: 0;
	list-style: none;
	margin: 1rem 0 0;
}

.issue-details li {
	margin: 0.3rem 0;
	color: var(--muted);
}

.note-list {
	list-style: none;
	padding: 0;
	margin: 1rem 0;
	border-left: 3px solid var(--border);
}

.note-list li {
	padding: 0.5rem 0.75rem;
	border-bottom: 1px solid var(--border);
}

.note-list li:last-child {
	border-bottom: none;
}

.note-form textarea {
	width: 100%;
	margin: 0.5rem 0;
}

.empty {
	text-align: center;
	color: var(--muted);
}

.hidden {
	display: none;
}

.modal {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 1200;
	font-family: inherit;
}

.modal.open {
	display: flex;
}

.modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
}

.modal-content {
	position: relative;
	max-width: 420px;
	width: calc(100% - 2rem);
	background: var(--card);
	border-radius: 16px;
	border: 1px solid var(--border);
	box-shadow: 0 24px 48px rgba(15, 23, 42, 0.25);
	padding: 1.85rem;
	z-index: 1;
	outline: none;
}

.modal-content h2 {
	margin-top: 0;
	margin-bottom: 0.75rem;
}

.modal-content p {
	margin: 0;
	color: var(--muted);
}

.modal-content strong {
	color: var(--text);
}

.modal-actions {
	margin-top: 1.5rem;
	display: flex;
	justify-content: flex-end;
}

.modal-close {
	background: var(--accent);
	color: #ffffff;
	border: none;
	border-radius: 999px;
	padding: 0.6rem 1.4rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.modal-close:hover,
.modal-close:focus {
	background: var(--accent-hover);
	transform: translateY(-1px);
}

@media (max-width: 768px) {
	.topbar {
		flex-direction: column;
		align-items: flex-start;
		gap: 1rem;
	}

	.brand {
		gap: 0.5rem;
	}

	.topbar-actions {
		width: 100%;
		justify-content: space-between;
	}

	.site-intro {
		padding: 1rem 1.5rem 0;
	}

	.card.controls {
		flex-direction: column;
		align-items: stretch;
	}

	.filters {
		width: 100%;
		flex-direction: column;
		align-items: flex-start;
	}

	.issue header {
		flex-direction: column;
	}

	.issue-actions {
		display: flex;
		flex-direction: column;
		gap: 0.5rem;
	}

	.issue-actions button {
		width: 100%;
		margin-left: 0 !important;
	}
}
