:root {
	--brm-bg: #0b0b0e;
	--brm-card: #18181b;
	--brm-card-alt: #202024;
	--brm-border: #2e2e33;
	--brm-text: #f4f4f5;
	--brm-muted: #a1a1aa;
	--brm-accent: #ec4899;
	--brm-accent-hover: #db2777;
	--brm-accent-soft: rgba(236, 72, 153, 0.14);
}

/* Card shell shared by the submission form and its login gate */
.brm-form-card {
	max-width: 640px;
	margin: 0 auto;
	background: var(--brm-card);
	border: 1px solid var(--brm-border);
	border-radius: 16px;
	padding: 2em 2em 1.8em;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
	font-family: inherit;
	color: var(--brm-text);
}

.brm-form-header {
	display: flex;
	align-items: flex-start;
	gap: 0.9em;
	margin-bottom: 1.6em;
	padding-bottom: 1.4em;
	border-bottom: 1px solid var(--brm-border);
}

.brm-form-icon {
	flex: none;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.4em;
	background: var(--brm-accent-soft);
	border-radius: 12px;
}

.brm-form-header-text {
	flex: 1;
	min-width: 0;
}

.brm-form-icon-img {
	padding: 0;
	overflow: hidden;
	background: var(--brm-card-alt);
}

.brm-form-icon-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.brm-dashboard-link {
	flex: none;
	align-self: center;
	color: var(--brm-accent);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.88em;
	white-space: nowrap;
}

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

.brm-dashboard-link-row {
	margin: 1em 0 0;
}

.brm-new-report-link-row {
	margin: 0 0 1em;
}

.brm-open-tickets-card {
	margin-top: 1.5em;
	padding: 1.6em 1.8em;
}

.brm-open-tickets-title {
	margin: 0 0 1em;
	font-size: 0.95em;
	color: var(--brm-text);
}

.brm-open-tickets-table {
	width: 100%;
	border-collapse: collapse;
}

.brm-open-tickets-table th,
.brm-open-tickets-table td {
	text-align: left;
	padding: 0.55em 0.6em;
	border-bottom: 1px solid var(--brm-border);
	font-size: 0.9em;
}

.brm-open-tickets-table th {
	color: var(--brm-muted);
	font-weight: 600;
	font-size: 0.78em;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.brm-open-tickets-table td {
	color: var(--brm-text);
}

.brm-open-tickets-table tr:last-child td {
	border-bottom: none;
}

/* Public board */
.brm-board-card {
	max-width: 760px;
}

.brm-board-tabs {
	display: flex;
	gap: 0.5em;
	margin-bottom: 1.2em;
}

.brm-board-tab {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	padding: 0.5em 1em;
	border-radius: 999px;
	background: var(--brm-card-alt);
	border: 1px solid var(--brm-border);
	color: var(--brm-muted);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.88em;
}

.brm-board-tab:hover {
	border-color: var(--brm-accent);
	color: var(--brm-text);
}

.brm-board-tab.is-active {
	background: var(--brm-accent-soft);
	border-color: var(--brm-accent);
	color: var(--brm-accent);
}

.brm-board-tab-count {
	background: rgba(255, 255, 255, 0.08);
	border-radius: 999px;
	padding: 0.05em 0.55em;
	font-size: 0.85em;
}

.brm-board-tab.is-active .brm-board-tab-count {
	background: rgba(236, 72, 153, 0.25);
}

.brm-board-table td:first-child {
	max-width: 320px;
}

.brm-board-row {
	cursor: pointer;
}

.brm-board-row:hover td {
	background: var(--brm-card-alt);
}

.brm-board-row:focus-visible {
	outline: 2px solid var(--brm-accent);
	outline-offset: -2px;
}

.brm-board-metoo-col {
	width: 1%;
	white-space: nowrap;
}

.brm-metoo-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	padding: 0.35em 0.8em;
	border-radius: 999px;
	background: var(--brm-card-alt);
	border: 1px solid var(--brm-border);
	color: var(--brm-text);
	font-weight: 600;
	font-size: 0.85em;
	cursor: pointer;
	transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.brm-metoo-btn:hover:not(:disabled) {
	border-color: var(--brm-accent);
	color: var(--brm-accent);
}

.brm-metoo-btn.is-voted {
	background: var(--brm-accent-soft);
	border-color: var(--brm-accent);
	color: var(--brm-accent);
}

.brm-metoo-btn:disabled {
	cursor: default;
}

.brm-metoo-count {
	background: rgba(255, 255, 255, 0.08);
	border-radius: 999px;
	padding: 0.05em 0.5em;
	font-size: 0.9em;
}

.brm-metoo-btn.is-voted .brm-metoo-count {
	background: rgba(236, 72, 153, 0.25);
}

.brm-metoo-btn-large {
	font-size: 0.95em;
	padding: 0.6em 1.2em;
}

/* Board detail modal */
.brm-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 4vh 1em;
	z-index: 100000;
	overflow-y: auto;
}

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

body.brm-modal-open {
	overflow: hidden;
}

.brm-modal {
	position: relative;
	width: 100%;
	max-width: 640px;
	background: var(--brm-card);
	border: 1px solid var(--brm-border);
	border-radius: 16px;
	padding: 2em;
	color: var(--brm-text);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.brm-modal-close {
	position: absolute;
	top: 0.8em;
	right: 0.8em;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: none;
	background: var(--brm-card-alt);
	color: var(--brm-muted);
	font-size: 1.3em;
	line-height: 1;
	cursor: pointer;
}

.brm-modal-close:hover {
	color: var(--brm-text);
}

.brm-modal-title {
	margin: 0 0 0.4em;
	padding-right: 2em;
	font-size: 1.25em;
}

.brm-modal-badges {
	display: flex;
	gap: 0.5em;
	margin-bottom: 0.6em;
}

.brm-modal-badges .brm-badge-outline {
	background: transparent;
	border: 1px solid var(--brm-border);
}

.brm-modal-meta p {
	margin: 0.2em 0;
	color: var(--brm-muted);
}

.brm-modal-field-row {
	display: flex;
	gap: 1.5em;
	margin: 1em 0;
}

.brm-modal-field-row > div {
	flex: 1;
	min-width: 0;
}

.brm-modal-vote-row {
	margin-top: 1.6em;
	padding-top: 1.4em;
	border-top: 1px solid var(--brm-border);
	text-align: center;
}

.brm-modal .brm-manage-desc,
.brm-modal .brm-readonly-block {
	background: var(--brm-card-alt);
	border: 1px solid var(--brm-border);
	border-radius: 8px;
	padding: 0.8em 1em;
	color: var(--brm-text);
	white-space: pre-wrap;
}

.brm-modal .brm-manage-sub {
	color: var(--brm-muted);
	margin: 0 0 1em;
}

.brm-modal .brm-screenshot-gallery {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 0.6em;
}

.brm-modal .brm-screenshot-gallery img {
	max-width: 160px;
	border-radius: 8px;
	border: 1px solid var(--brm-border);
}

.brm-modal .brm-comment-thread {
	margin: 0.8em 0 0;
}

.brm-modal .brm-comment {
	background: var(--brm-card-alt);
	border: 1px solid var(--brm-border);
}

.brm-modal .brm-comment-staff {
	background: rgba(99, 102, 241, 0.12);
	border-color: rgba(99, 102, 241, 0.35);
}

.brm-modal .brm-comment-meta {
	color: var(--brm-muted);
}

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

@media (max-width: 600px) {
	.brm-modal-field-row {
		flex-direction: column;
		gap: 1em;
	}
}

.brm-form-title {
	margin: 0 0 0.2em;
	font-size: 1.3em;
	font-weight: 700;
	color: var(--brm-text);
}

.brm-form-subtitle {
	margin: 0;
	color: var(--brm-muted);
	font-size: 0.95em;
}

.brm-form-section {
	margin-bottom: 1.6em;
	padding-bottom: 1.4em;
	border-bottom: 1px solid var(--brm-border);
}

.brm-form-section:last-of-type {
	border-bottom: none;
	padding-bottom: 0;
}

.brm-form-section-title {
	margin: 0 0 0.9em;
	font-size: 0.78em;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--brm-accent);
	position: relative;
	padding-left: 0.8em;
}

.brm-form-section-title::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.15em;
	bottom: 0.15em;
	width: 3px;
	border-radius: 2px;
	background: var(--brm-accent);
}

.brm-bug-form {
	max-width: 100%;
	margin: 0;
}

.brm-field {
	margin-bottom: 1.1em;
}

.brm-field-submit {
	margin-top: 1.4em;
	margin-bottom: 0.6em;
}

.brm-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.4em;
	color: var(--brm-text);
	font-size: 0.92em;
}

.brm-field input[type="text"],
.brm-field input[type="url"],
.brm-field textarea,
.brm-field select {
	width: 100%;
	box-sizing: border-box;
	padding: 0.65em 0.85em;
	border: 1px solid var(--brm-border);
	border-radius: 8px;
	font-size: 1em;
	background-color: var(--brm-card-alt);
	color: var(--brm-text);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.brm-field input[type="text"]:focus,
.brm-field input[type="url"]:focus,
.brm-field textarea:focus,
.brm-field select:focus {
	outline: none;
	border-color: var(--brm-accent);
	box-shadow: 0 0 0 3px var(--brm-accent-soft);
}

.brm-field input[type="text"]::placeholder,
.brm-field textarea::placeholder {
	color: #7a7a82;
	opacity: 1;
}

.brm-field select {
	color: var(--brm-text);
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23a1a1aa'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.7em center;
	background-size: 1.1em;
	padding-right: 2.4em;
}

.brm-field select option {
	color: #1a1a1a;
	background-color: #fff;
}

.brm-field-row {
	display: flex;
	gap: 1.2em;
}

.brm-field-row .brm-field {
	flex: 1;
	min-width: 0;
}

/* Custom-styled file input */
.brm-file-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	background: var(--brm-card-alt);
	border: 1px solid var(--brm-border);
	border-radius: 8px;
	padding: 0.6em 1em;
	cursor: pointer;
	font-weight: 600;
	font-size: 0.92em;
	color: var(--brm-text);
	position: relative;
	overflow: hidden;
}

.brm-file-btn:hover {
	border-color: var(--brm-accent);
}

.brm-file-btn input[type="file"] {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
}

.brm-file-btn-status {
	display: block;
	margin-top: 0.5em;
	color: var(--brm-muted);
	font-size: 0.85em;
}

.brm-file-btn-hint {
	display: block;
	margin-top: 0.35em;
	color: var(--brm-muted);
	font-size: 0.8em;
	font-style: italic;
}

.brm-submit-btn {
	background: linear-gradient(135deg, var(--brm-accent), var(--brm-accent-hover));
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 0.8em 1.8em;
	font-size: 1em;
	font-weight: 700;
	cursor: pointer;
	width: 100%;
	box-shadow: 0 6px 16px rgba(236, 72, 153, 0.28);
	transition: transform 0.1s ease, box-shadow 0.15s ease;
}

.brm-submit-btn:hover {
	box-shadow: 0 8px 20px rgba(236, 72, 153, 0.38);
	transform: translateY(-1px);
}

.brm-submit-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

.brm-form-message {
	margin-top: 1em;
	padding: 0.7em 1em;
	border-radius: 8px;
	display: none;
	font-size: 0.92em;
}

.brm-form-message.brm-success {
	display: block;
	background: rgba(34, 197, 94, 0.12);
	border: 1px solid rgba(34, 197, 94, 0.35);
	color: #86efac;
}

.brm-form-message.brm-error {
	display: block;
	background: rgba(239, 68, 68, 0.12);
	border: 1px solid rgba(239, 68, 68, 0.35);
	color: #fca5a5;
}

.brm-login-gate {
	text-align: center;
	padding: 1em 0.5em;
}

.brm-login-gate .brm-form-icon {
	margin: 0 auto 0.8em;
}

.brm-discord-login-btn {
	display: inline-block;
	background: #5865F2;
	color: #fff !important;
	text-decoration: none;
	padding: 0.75em 1.75em;
	border-radius: 8px;
	font-weight: 600;
	margin-top: 0.8em;
}

.brm-discord-login-btn:hover {
	background: #4752c4;
}

.brm-logged-in-as {
	color: var(--brm-muted);
	margin-bottom: 1.5em;
	font-size: 0.9em;
}

.brm-user-bug-list {
	width: 100%;
	border-collapse: collapse;
}

.brm-user-bug-list th,
.brm-user-bug-list td {
	text-align: left;
	padding: 0.6em 0.8em;
	border-bottom: 1px solid #e5e5e5;
}

.brm-badge {
	display: inline-block;
	padding: 0.15em 0.7em;
	border-radius: 999px;
	font-size: 0.85em;
	font-weight: 600;
	background: #eee;
	color: #333;
}

.brm-status-new { background: #dbeafe; color: #1e3a8a; }
.brm-status-acknowledged { background: #fef9c3; color: #713f12; }
.brm-status-in-progress { background: #fde68a; color: #78350f; }
.brm-status-fixed { background: #dcfce7; color: #14532d; }
.brm-status-wont-fix { background: #f3f4f6; color: #4b5563; }
.brm-status-duplicate { background: #f3f4f6; color: #4b5563; }

.brm-priority-low { background: #e5f5ea; color: #1e5631; }
.brm-priority-medium { background: #fef3c7; color: #78350f; }
.brm-priority-high { background: #fee2e2; color: #7f1d1d; }
.brm-priority-critical { background: #7f1d1d; color: #fff; }

/* Dashboard: list view */
.brm-dashboard {
	max-width: 720px;
	margin: 0 auto;
}

.brm-dashboard-summary {
	display: flex;
	gap: 0.6em;
	margin-bottom: 1em;
}

.brm-summary-pill {
	padding: 0.3em 1em;
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.9em;
}

.brm-summary-open { background: #fef3c7; color: #78350f; }
.brm-summary-closed { background: #dcfce7; color: #14532d; }

.brm-view-link {
	color: var(--brm-accent);
	text-decoration: none;
	font-weight: 600;
	white-space: nowrap;
}

/* Dashboard: single-report detail view */
.brm-back-link {
	display: inline-block;
	margin-bottom: 1em;
	color: var(--brm-accent);
	text-decoration: none;
	font-weight: 600;
}

.brm-detail-title {
	margin-bottom: 0.3em;
}

.brm-detail-badges {
	display: flex;
	gap: 0.5em;
	margin-bottom: 1em;
}

.brm-detail-meta p {
	margin: 0.2em 0;
	color: #666;
}

.brm-detail-desc {
	color: #333;
}

.brm-error {
	color: #7f1d1d;
}

/* Comment thread */
.brm-comment-thread {
	margin: 1em 0 1.5em;
	display: flex;
	flex-direction: column;
	gap: 0.8em;
}

.brm-no-comments {
	color: #888;
	font-style: italic;
}

.brm-comment {
	padding: 0.8em 1em;
	border-radius: 8px;
	background: #f6f7f7;
	border: 1px solid #e5e5e5;
}

.brm-comment-staff {
	background: #eef2ff;
	border-color: #c7d2fe;
}

.brm-comment-meta {
	display: flex;
	gap: 0.6em;
	align-items: center;
	margin-bottom: 0.3em;
	font-size: 0.85em;
	color: #555;
}

.brm-comment-author {
	font-weight: 700;
	color: #1a1a1a;
}

.brm-staff-badge {
	background: var(--brm-accent);
	color: #fff;
	padding: 0.1em 0.6em;
	border-radius: 999px;
	font-size: 0.75em;
	font-weight: 700;
}

.brm-comment-date {
	margin-left: auto;
}

.brm-comment-content {
	color: #222;
}

.brm-comment-content p {
	margin: 0.3em 0;
}

.brm-comment-form textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 0.6em 0.8em;
	border: 1px solid #ccc;
	border-radius: 6px;
	margin-bottom: 0.6em;
	background: #fff;
	color: #1a1a1a;
	font-family: inherit;
}
