:root {
	--app-blue: #0479ad;
	--app-green: #8bb725;
	--app-ink: #172033;
	--app-muted: #64748b;
	--app-surface: #ffffff;
	--app-bg: #f3f7fa;
}

:root[data-theme="dark"] {
	--app-ink: #e5edf8;
	--app-muted: #9fb0c7;
	color-scheme: dark;
}

body {
	color: var(--app-ink);
	background: var(--app-bg) !important;
}

.navbar {
	background: linear-gradient(110deg, #172554, #1d4ed8) !important;
	box-shadow: 0 3px 16px rgb(15 23 42 / 22%);
}

.app-navbar {
	background: linear-gradient(110deg, #035a83, #0479ad) !important;
}

.app-shell {
	max-width: 1600px;
}

.eyebrow {
	color: var(--app-blue);
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.14em;
}

.dashboard-intro {
	color: var(--app-muted);
	font-size: 0.9rem;
	margin-top: 0.45rem;
}

.btn-brand,
.btn-primary {
	background: #0479ad !important;
	border-color: #0479ad !important;
	color: #fff !important;
}

.btn-green {
	background: var(--app-green) !important;
	border-color: var(--app-green) !important;
	color: #ffffff !important;
	font-weight: 700;
}

.btn-green:hover {
	background: #71991d !important;
	border-color: #71991d !important;
}

.btn-success {
	background: #7da91f !important;
	border-color: #7da91f !important;
	color: #fff !important;
}

.metric-card,
.dashboard-panel {
	background: var(--app-surface);
	border: 1px solid #dbe6ed;
	border-radius: 1rem;
	box-shadow: 0 8px 24px rgb(4 58 85 / 7%);
}

.metric-card {
	min-height: 142px;
	padding: 1.25rem;
	position: relative;
	overflow: hidden;
}

.metric-card::after {
	background: currentColor;
	border-radius: 50%;
	content: "";
	height: 110px;
	opacity: 0.08;
	position: absolute;
	right: -35px;
	top: -35px;
	width: 110px;
}

.metric-blue { color: #0479ad; }
.metric-green { color: #6f9919; }
.metric-purple { color: #7356a8; }
.metric-orange { color: #c47928; }
.metric-label { color: #64748b; font-size: 0.78rem; font-weight: 700; }
.metric-value { color: var(--app-ink); font-size: 2.2rem; font-weight: 750; line-height: 1.2; margin-top: 0.45rem; }
.metric-caption { color: #8293a0; font-size: 0.78rem; }

.metric-green {
	border-top: 4px solid var(--app-green);
}

.dashboard-panel {
	padding: 1.25rem;
}

.panel-heading {
	align-items: center;
	border-bottom: 1px solid #e6eef3;
	display: flex;
	font-weight: 700;
	justify-content: space-between;
	margin-bottom: 1rem;
	padding-bottom: 0.8rem;
}

.panel-heading a {
	color: var(--app-blue);
	font-size: 0.82rem;
	text-decoration: none;
}

.panel-subtitle {
	color: var(--app-muted);
	font-size: 0.78rem;
	font-weight: 400;
	margin-top: 0.25rem;
}

.dashboard-statistics {
	border-top: 4px solid var(--app-green);
}

.dashboard-period-form {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	justify-content: flex-end;
}

.dashboard-period-form label {
	color: var(--app-muted);
	font-size: 0.78rem;
	font-weight: 700;
	margin-right: 0.2rem;
}

.dashboard-period-form input {
	background: var(--app-surface);
	border: 1px solid #cbd8e8;
	border-radius: 0.45rem;
	color: var(--app-ink);
	font-size: 0.82rem;
	padding: 0.38rem 0.5rem;
}

.stat-card {
	background: #f8fbfd;
	border: 1px solid #dbe6ed;
	border-left: 4px solid #94a3b8;
	border-radius: 0.75rem;
	min-height: 112px;
	padding: 0.85rem 1rem;
}

.stat-card span,
.stat-card small {
	color: var(--app-muted);
	display: block;
}

.stat-card span {
	font-size: 0.8rem;
	font-weight: 700;
}

.stat-card strong {
	color: var(--app-ink);
	display: block;
	font-size: 1.45rem;
	line-height: 1.2;
	margin: 0.4rem 0;
}

.stat-card small {
	font-size: 0.73rem;
}

.stat-card-green {
	border-left-color: var(--app-green);
}

.stat-card-blue {
	border-left-color: var(--app-blue);
}

.stat-card-orange {
	border-left-color: #c47928;
}

.statistics-list {
	background: #f8fbfd;
	border: 1px solid #dbe6ed;
	border-radius: 0.75rem;
	padding: 1rem;
}

.statistics-list h2 {
	color: var(--app-green);
	font-size: 0.95rem;
	font-weight: 750;
	margin: 0 0 0.65rem;
}

.statistics-list p {
	color: var(--app-muted);
	font-size: 0.82rem;
	line-height: 1.55;
}

.statistics-list-row {
	align-items: center;
	border-bottom: 1px solid #dbe6ed;
	display: flex;
	justify-content: space-between;
	padding: 0.48rem 0;
}

.statistics-list-row:last-child {
	border-bottom: 0;
}

.statistics-list-row span {
	color: var(--app-ink);
	font-size: 0.84rem;
}

.statistics-list-row strong {
	color: var(--app-green);
	font-size: 1rem;
}

.status-tile,
.quick-action {
	background: #f6fafc;
	border: 1px solid #e3edf2;
	border-radius: 0.75rem;
	padding: 0.9rem 1rem;
}

.status-tile {
	display: flex;
	justify-content: space-between;
}

.status-tile span { color: #64748b; font-size: 0.82rem; }
.status-tile strong { color: var(--app-blue); font-size: 1.2rem; }
.quick-actions { display: grid; gap: 0.65rem; }
.quick-action { color: var(--app-ink); display: flex; justify-content: space-between; text-decoration: none; }
.quick-action:hover { background: #e7f4f9; color: var(--app-blue); }

.incident-layout {
	display: grid;
	gap: 1.25rem;
	grid-template-columns: 220px minmax(0, 1fr);
}

.incident-sidebar {
	align-self: start;
	background: var(--app-surface);
	border: 1px solid #dbe6ed;
	border-radius: 1rem;
	box-shadow: 0 8px 24px rgb(4 58 85 / 7%);
	padding: 1rem 0.75rem;
	position: sticky;
	top: 1rem;
}

.incident-nav-link {
	border-radius: 0.55rem;
	color: #526575;
	display: block;
	font-size: 0.86rem;
	margin: 0.2rem 0;
	padding: 0.65rem 0.75rem;
	text-decoration: none;
}

.incident-nav-link:hover,
.incident-nav-link.active {
	background: #e7f4f9;
	color: #0479ad;
	font-weight: 650;
}

.incident-header {
	border-bottom: 1px solid #dbe6ed;
	padding-bottom: 1rem;
}

.incident-header h1 {
	font-size: clamp(1.35rem, 2.2vw, 2rem);
	font-weight: 750;
	margin-top: 0.35rem;
}

.incident-header-actions {
	max-width: 70%;
}

.incident-classification-badge {
	background: #e8f4c7;
	border: 1px solid #a7c94b;
	border-radius: 0.55rem;
	color: #49640d;
	font-size: 0.78rem;
	font-weight: 800;
	padding: 0.55rem 0.7rem;
}

.btn-filled-blue,
.btn-filled-green,
.btn-filled-red {
	border: 1px solid transparent !important;
	color: #ffffff !important;
	font-weight: 700;
}

.btn-filled-blue {
	background: var(--app-blue) !important;
	border-color: var(--app-blue) !important;
}

.btn-filled-green {
	background: var(--app-green) !important;
	border-color: var(--app-green) !important;
}

.btn-filled-red {
	background: #c9384f !important;
	border-color: #c9384f !important;
}

.btn-filled-blue:hover,
.btn-filled-green:hover,
.btn-filled-red:hover {
	color: #ffffff !important;
	filter: brightness(0.88);
	transform: translateY(-1px);
}

.incident-summary-card {
	background: var(--app-surface);
	border: 1px solid #dbe6ed;
	border-left: 5px solid #94a3b8;
	border-radius: 0.9rem;
	box-shadow: 0 8px 20px rgb(4 58 85 / 7%);
	min-height: 155px;
	padding: 1.25rem;
}

.incident-summary-card .summary-card-label {
	color: var(--app-muted);
	font-size: 0.82rem;
	font-weight: 750;
	letter-spacing: 0.02em;
}

.incident-summary-card strong {
	color: var(--app-ink);
	display: block;
	font-size: clamp(1.35rem, 2vw, 1.9rem);
	line-height: 1.2;
	margin: 0.65rem 0 0.35rem;
	overflow-wrap: anywhere;
}

.incident-summary-card small {
	color: var(--app-muted);
	font-size: 0.78rem;
}

.summary-workflow {
	border-left-color: var(--app-green);
}

.summary-site {
	border-left-color: var(--app-blue);
}

.summary-dynamic {
	border-left-color: #c47928;
}

.summary-urls {
	border-left-color: var(--app-green);
}

.reporting-card {
	border-top: 5px solid var(--app-green);
}

.reporting-card .card-header {
	align-items: center;
	display: flex;
	justify-content: space-between;
}

.section-kicker {
	color: var(--app-green);
	font-size: 0.74rem;
	font-weight: 800;
	letter-spacing: 0.03em;
}

.reporting-controls {
	background: #f8fbfd;
	border: 1px solid #dbe6ed;
	border-radius: 0.7rem;
	padding: 0.9rem;
}

.reporting-controls form {
	align-items: center;
	display: inline-flex;
	gap: 0.4rem;
}

.report-generation-action {
	align-items: center;
	background: #eef7d9;
	border: 1px solid #bedb67;
	border-radius: 0.75rem;
	display: flex;
	gap: 1rem;
	justify-content: space-between;
	margin-top: 1rem;
	padding: 1rem 1.1rem;
}

.report-generation-action strong,
.report-generation-action span {
	display: block;
}

.report-generation-action strong {
	color: #4c6911;
	font-size: 0.95rem;
}

.report-generation-action span {
	color: #63743d;
	font-size: 0.8rem;
	margin-top: 0.25rem;
}

.report-tasks-table {
	min-width: 1060px;
}

.report-tasks-table thead th {
	background: #eef7d9;
	color: #526e16;
}

.report-tasks-table tbody td {
	vertical-align: middle;
}

.report-task-actions {
	min-width: 530px;
}

.report-task-actions form,
.report-task-actions > a,
.report-task-actions > button {
	margin: 0.18rem 0.12rem;
	vertical-align: middle;
}

.incident-content .btn-outline-primary,
.incident-content .btn-outline-success,
.incident-content .btn-outline-info,
.incident-content .btn-outline-secondary,
.incident-content .btn-outline-dark,
.incident-content .btn-outline-warning,
.incident-content .btn-outline-danger {
	font-weight: 650;
	transition: filter 0.15s ease, transform 0.15s ease;
}

.incident-content .btn-outline-primary {
	background: #0479ad;
	border-color: #0479ad;
	color: #ffffff;
}

.incident-content .btn-outline-success {
	background: #6f9919;
	border-color: #6f9919;
	color: #ffffff;
}

.incident-content .btn-outline-info {
	background: #278da8;
	border-color: #278da8;
	color: #ffffff;
}

.incident-content .btn-outline-secondary,
.incident-content .btn-outline-dark {
	background: #536579;
	border-color: #536579;
	color: #ffffff;
}

.incident-content .btn-outline-warning {
	background: #b98518;
	border-color: #b98518;
	color: #ffffff;
}

.incident-content .btn-outline-danger {
	background: #c9384f;
	border-color: #c9384f;
	color: #ffffff;
}

.incident-content .btn-outline-primary:hover,
.incident-content .btn-outline-success:hover,
.incident-content .btn-outline-info:hover,
.incident-content .btn-outline-secondary:hover,
.incident-content .btn-outline-dark:hover,
.incident-content .btn-outline-warning:hover,
.incident-content .btn-outline-danger:hover {
	color: #ffffff;
	filter: brightness(0.86);
	transform: translateY(-1px);
}

.infrastructure-alert {
	background: #e7f4f9;
	border: 1px solid #9bcfe1;
	border-left: 8px solid var(--app-green);
	border-radius: 0.9rem;
	color: #173447;
	font-size: 0.95rem;
	padding: 1.2rem 1.3rem;
}

.infrastructure-alert strong {
	color: #0479ad;
	display: block;
	font-size: 1.3rem;
	font-weight: 800;
	margin-bottom: 0.45rem;
}

.infrastructure-alert .small {
	font-size: 0.86rem;
	margin-top: 0.4rem !important;
}

.infrastructure-alert code {
	color: #075d7f;
	font-weight: 700;
}

.source-url-tags,
.source-url-actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
}

.source-url-actions {
	border-top: 1px solid #dbe6ed;
	margin-top: 0.85rem;
	padding-top: 0.85rem;
}

.source-url-actions form,
.source-url-actions a,
.source-url-actions button {
	margin: 0;
}

.btn-action-large {
	font-size: 0.88rem;
	font-weight: 750;
	padding: 0.55rem 0.8rem;
}

.source-url-status-badge,
.ownership-badge,
.source-url-resolution,
.source-url-host {
	border-radius: 0.45rem;
	display: inline-block;
	font-size: 0.82rem;
	font-weight: 750;
	padding: 0.42rem 0.62rem;
}

.source-url-status-badge {
	background: #eef2f7;
	border: 1px solid #c4cfdd;
	color: #34455b;
}

.ownership-badge {
	background: #f9e4a8;
	border: 1px solid #d9aa2e;
	color: #6d4f00;
}

.source-url-resolution {
	background: #e7f4f9;
	border: 1px solid #9bcfe1;
	color: #17647d;
}

.source-url-host {
	background: #edf6df;
	border: 1px solid #c5dc80;
	color: #4c6911;
}

.source-url-item {
	padding: 1.1rem 1.15rem;
}

.analysis-status-hidden {
	display: none !important;
}

.email-data-card {
	border-top: 5px solid var(--app-blue);
}

.email-message-list {
	border-bottom: 1px solid #dbe6ed;
	padding-bottom: 0.5rem;
}

.email-message-list-heading {
	background: #edf6df;
	border-bottom: 1px solid #c5dc80;
	color: #4c6911;
	font-size: 0.88rem;
	font-weight: 800;
	padding: 0.75rem 1rem;
}

.email-data-card .card-header,
.sender-infrastructure-card .card-header,
.network-intelligence-card .card-header {
	background: #e7f4f9;
	color: #075d7f;
	font-size: 1rem;
	padding: 0.95rem 1.1rem;
}

.email-meta-grid dt {
	background: #f3f8fb;
	border-bottom: 1px solid #dbe6ed;
	color: #526575;
	font-size: 0.78rem;
	font-weight: 800;
	padding: 0.7rem 0.8rem;
}

.email-meta-grid dd {
	border-bottom: 1px solid #dbe6ed;
	color: var(--app-ink);
	font-size: 0.9rem;
	margin-bottom: 0;
	padding: 0.7rem 0.8rem;
	overflow-wrap: anywhere;
}

.sender-infrastructure-card {
	border-top: 5px solid var(--app-green);
}

.network-intelligence-card {
	border-top: 5px solid var(--app-green);
}

.sender-infrastructure-card .table,
.network-intelligence-card .table {
	font-size: 0.84rem;
}

.sender-infrastructure-card .table thead th,
.network-intelligence-card .table thead th {
	background: #f3f8fb;
	color: #526575;
}

.sender-infrastructure-card h2,
.network-intelligence-card h2 {
	border-left: 4px solid var(--app-green);
	color: var(--app-green);
	font-size: 0.95rem;
	margin-bottom: 0.65rem;
	padding-left: 0.65rem;
}

.sender-infrastructure-card .table-responsive,
.network-intelligence-card .table-responsive {
	border: 1px solid #dbe6ed;
	border-radius: 0.65rem;
}

.advanced-nav-link {
	border-left: 2px solid #d5e6ed;
	margin-left: 0.35rem;
}

.modal-content {
	border: 0;
	border-radius: 1rem;
	box-shadow: 0 20px 70px rgb(15 23 42 / 28%);
}

.modal-header {
	background: linear-gradient(110deg, #035a83, #0479ad);
	color: #fff;
}

.modal-header .btn-close {
	filter: invert(1);
}

.app-url-list {
	background: #f5f9fc;
	border: 1px solid #d7e5ed;
	border-radius: 0.75rem;
	color: #173447;
	font-family: var(--bs-font-monospace);
	font-size: 1rem;
	line-height: 1.65;
	max-height: 65vh;
	overflow: auto;
	padding: 1rem 1.15rem;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.card {
	border: 1px solid #cbd8e8;
	border-radius: 0.75rem;
	box-shadow: 0 6px 20px rgb(15 23 42 / 9%);
	overflow: hidden;
}

.card-header {
	background: linear-gradient(180deg, #ffffff, #f4f8fc);
	border-bottom: 1px solid #dbe6f2;
	font-weight: 600;
}

.card-header strong {
	color: #1e3a8a;
}

.row.g-3 > div > .card {
	border-top: 3px solid #2563eb;
}

.table {
	vertical-align: middle;
}

.table thead th {
	color: #475569;
	font-size: 0.76rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	white-space: nowrap;
}

.table tbody tr:hover {
	background: #e8f1ff;
}

.incident-table {
	background: var(--app-surface);
	border: 1px solid #cbd8e8;
	border-collapse: separate;
	border-radius: 0.75rem;
	border-spacing: 0;
	color: var(--app-ink) !important;
	min-width: 940px;
	overflow: hidden;
}

.incident-table thead th {
	background: #e7f4f9;
	border-bottom: 2px solid #b9d6e3;
	color: #234b61 !important;
	padding: 0.9rem 0.75rem;
}

.incident-table tbody td {
	border-bottom: 1px solid #dbe6ed;
	color: var(--app-ink) !important;
	font-size: 0.9rem;
	font-weight: 500;
	padding: 0.8rem 0.75rem;
	vertical-align: middle;
}

.incident-table tbody tr:last-child td {
	border-bottom: 0;
}

.incident-table tbody tr:nth-of-type(odd) td {
	background: #f8fbfd;
}

.incident-table tbody tr:hover td {
	background: #e7f4f9;
}

.incident-table tbody td:first-child a {
	color: #0479ad;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.incident-table .btn-danger {
	white-space: nowrap;
}

.incident-select-column {
	text-align: center;
	width: 42px;
}

.incident-select-column input {
	accent-color: var(--app-green);
	height: 1.1rem;
	width: 1.1rem;
}

.incident-bulk-toolbar {
	align-items: center;
	display: flex;
	gap: 0.75rem;
}

.incident-bulk-toolbar span {
	color: var(--app-muted);
	font-size: 0.85rem;
	font-weight: 700;
}

.bulk-report-summary {
	align-items: center;
	background: #edf6df;
	border: 1px solid #c5dc80;
	border-left: 5px solid var(--app-green);
	border-radius: 0.7rem;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	padding: 0.9rem 1rem;
}

.bulk-report-summary strong {
	color: #4c6911;
	font-size: 1.1rem;
}

.bulk-report-summary span {
	color: #526575;
	font-size: 0.85rem;
	font-weight: 700;
}

.bulk-report-cases {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0.65rem 0 1rem;
}

.bulk-report-cases span {
	background: #e7f4f9;
	border: 1px solid #9bcfe1;
	border-radius: 0.4rem;
	color: #17647d;
	font-size: 0.78rem;
	font-weight: 700;
	padding: 0.3rem 0.5rem;
}

.bulk-report-provider {
	border: 1px solid #dbe6ed;
	border-radius: 0.8rem;
	margin-top: 1rem;
	overflow: hidden;
}

.bulk-report-provider-header {
	align-items: center;
	background: #e7f4f9;
	display: flex;
	justify-content: space-between;
	padding: 0.8rem 1rem;
}

.bulk-report-provider-header h3 {
	color: #075d7f;
	font-size: 1rem;
	margin: 0;
}

.bulk-report-url-block,
.bulk-report-template {
	border-bottom: 1px solid #dbe6ed;
	padding: 1rem;
}

.bulk-report-subheading {
	color: var(--app-green);
	font-size: 0.85rem;
	font-weight: 800;
	margin-bottom: 0.45rem;
}

.bulk-report-url-block textarea,
.bulk-report-template textarea,
.bulk-report-field textarea {
	background: #f8fbfd;
	border: 1px solid #cbd8e8;
	border-radius: 0.5rem;
	color: var(--app-ink);
	display: block;
	font-size: 0.84rem;
	line-height: 1.45;
	margin-bottom: 0.55rem;
	min-height: 90px;
	padding: 0.6rem;
	resize: vertical;
	width: 100%;
}

.bulk-report-field {
	align-items: center;
	border-top: 1px solid #dbe6ed;
	display: grid;
	gap: 0.75rem;
	grid-template-columns: minmax(150px, 0.8fr) minmax(200px, 2fr) auto;
	padding: 0.75rem 0;
}

.bulk-report-field strong,
.bulk-report-field small {
	display: block;
}

.bulk-report-field strong {
	color: var(--app-ink);
	font-size: 0.84rem;
}

.bulk-report-field small {
	color: var(--app-muted);
	font-size: 0.72rem;
	margin-top: 0.25rem;
}

.bulk-report-field textarea {
	margin: 0;
	min-height: 54px;
}

code {
	color: #be185d;
	word-break: break-word;
}

.badge {
	font-weight: 600;
}

.alert {
	border: 0;
	border-left: 4px solid currentColor;
}

body.simple-view .advanced-section {
	display: none !important;
}

#view-mode-toggle {
	white-space: nowrap;
}

details > summary {
	cursor: pointer;
	list-style: none;
}

details > summary::-webkit-details-marker {
	display: none;
}

details > summary::after {
	content: "＋";
	color: var(--app-blue);
	float: right;
	font-size: 1.1rem;
}

details[open] > summary::after {
	content: "−";
}

:root[data-theme="dark"] body,
:root[data-theme="dark"] body.bg-light {
	background: #0f172a !important;
	color: #e5edf8;
}

:root[data-theme="dark"] .card,
:root[data-theme="dark"] .card-header,
:root[data-theme="dark"] .list-group-item,
:root[data-theme="dark"] .table {
	background-color: #172033;
	color: #e5edf8;
	border-color: #334155;
}

:root[data-theme="dark"] .card-header {
	background: #1e293b;
}

:root[data-theme="dark"] .table {
	--bs-table-bg: #172033;
	--bs-table-color: #e5edf8;
	--bs-table-border-color: #334155;
}

:root[data-theme="dark"] .incident-table {
	background: #172033;
	border-color: #40566d;
	color: #e5edf8 !important;
}

:root[data-theme="dark"] .incident-table thead th {
	background: #20364a;
	border-bottom-color: #45677d;
	color: #d9edf5 !important;
}

:root[data-theme="dark"] .incident-table tbody td {
	background: #172033;
	border-bottom-color: #334155;
	color: #e5edf8 !important;
}

:root[data-theme="dark"] .incident-table tbody tr:nth-of-type(odd) td {
	background: #1c293d;
}

:root[data-theme="dark"] .incident-table tbody tr:hover td {
	background: #21455a;
	color: #ffffff !important;
}

:root[data-theme="dark"] .incident-table tbody td:first-child a {
	color: #8dcce9;
}

:root[data-theme="dark"] .bulk-report-summary,
:root[data-theme="dark"] .bulk-report-cases span,
:root[data-theme="dark"] .bulk-report-provider-header,
:root[data-theme="dark"] .bulk-report-url-block textarea,
:root[data-theme="dark"] .bulk-report-template textarea,
:root[data-theme="dark"] .bulk-report-field textarea {
	background: #1e293b;
	border-color: #334155;
	color: #e5edf8;
}

:root[data-theme="dark"] .bulk-report-summary strong,
:root[data-theme="dark"] .bulk-report-provider-header h3 {
	color: #d9efa2;
}

:root[data-theme="dark"] .bulk-report-summary span,
:root[data-theme="dark"] .bulk-report-cases span {
	color: #b9e9f8;
}

:root[data-theme="dark"] .bulk-report-provider,
:root[data-theme="dark"] .bulk-report-url-block,
:root[data-theme="dark"] .bulk-report-template,
:root[data-theme="dark"] .bulk-report-field {
	border-color: #334155;
}

:root[data-theme="dark"] .bulk-report-field strong {
	color: #e5edf8;
}

:root[data-theme="dark"] .text-muted {
	color: #a9b8cb !important;
}

:root[data-theme="dark"] .form-control,
:root[data-theme="dark"] .form-select {
	background-color: #0f172a;
	border-color: #475569;
	color: #e5edf8;
}

:root[data-theme="dark"] .dropdown-menu {
	background-color: #1e293b;
	border-color: #475569;
}

:root[data-theme="dark"] .dropdown-item {
	color: #e5edf8;
}

:root[data-theme="dark"] .dropdown-item:hover {
	background-color: #334155;
}

:root[data-theme="dark"] .app-url-list {
	background: #0f172a;
	border-color: #40566d;
	color: #c9e7f2;
}

:root[data-theme="dark"] .metric-card,
:root[data-theme="dark"] .dashboard-panel,
:root[data-theme="dark"] .incident-sidebar {
	background: #172033;
	border-color: #334155;
}

:root[data-theme="dark"] .incident-summary-card,
:root[data-theme="dark"] .reporting-controls {
	background: #1e293b;
	border-color: #334155;
}

:root[data-theme="dark"] .incident-summary-card strong {
	color: #e5edf8;
}

:root[data-theme="dark"] .incident-classification-badge {
	background: #33451b;
	border-color: #71991d;
	color: #d9efa2;
}

:root[data-theme="dark"] .report-generation-action {
	background: #2c3d1b;
	border-color: #668b22;
}

:root[data-theme="dark"] .report-generation-action strong {
	color: #d9efa2;
}

:root[data-theme="dark"] .report-generation-action span {
	color: #bfd187;
}

:root[data-theme="dark"] .report-tasks-table thead th {
	background: #2c3d1b;
	color: #d9efa2;
}

:root[data-theme="dark"] .source-url-status-badge {
	background: #26364a;
	border-color: #52677e;
	color: #e5edf8;
}

:root[data-theme="dark"] .ownership-badge {
	background: #5e4816;
	border-color: #b98518;
	color: #ffe8a1;
}

:root[data-theme="dark"] .source-url-resolution {
	background: #173e4c;
	border-color: #277d9a;
	color: #b9e9f8;
}

:root[data-theme="dark"] .source-url-host {
	background: #2c3d1b;
	border-color: #668b22;
	color: #d9efa2;
}

:root[data-theme="dark"] .infrastructure-alert {
	background: #173e4c;
	border-color: #277d9a;
	color: #d9edf5;
}

:root[data-theme="dark"] .infrastructure-alert strong {
	color: #a8dcf0;
}

:root[data-theme="dark"] .infrastructure-alert code {
	color: #b9e9f8;
}

:root[data-theme="dark"] .source-url-actions {
	border-top-color: #334155;
}

:root[data-theme="dark"] .email-data-card .card-header,
:root[data-theme="dark"] .sender-infrastructure-card .card-header,
:root[data-theme="dark"] .network-intelligence-card .card-header {
	background: #20364a;
	color: #b9e9f8;
}

:root[data-theme="dark"] .card-header strong,
:root[data-theme="dark"] .reporting-card .card-header strong,
:root[data-theme="dark"] .email-data-card .card-header strong,
:root[data-theme="dark"] .sender-infrastructure-card .card-header strong,
:root[data-theme="dark"] .network-intelligence-card .card-header strong {
	color: #b9e9f8 !important;
}

:root[data-theme="dark"] .card-header {
	color: #d9edf5;
}

:root[data-theme="dark"] .email-meta-grid dt,
:root[data-theme="dark"] .sender-infrastructure-card .table thead th,
:root[data-theme="dark"] .network-intelligence-card .table thead th {
	background: #1e293b;
	color: #c9d9e8;
}

:root[data-theme="dark"] .email-meta-grid dt,
:root[data-theme="dark"] .email-meta-grid dd,
:root[data-theme="dark"] .sender-infrastructure-card .table-responsive,
:root[data-theme="dark"] .network-intelligence-card .table-responsive {
	border-color: #334155;
}

:root[data-theme="dark"] .dashboard-period-form input,
:root[data-theme="dark"] .stat-card,
:root[data-theme="dark"] .statistics-list {
	background: #1e293b;
	border-color: #334155;
}

:root[data-theme="dark"] .stat-card strong,
:root[data-theme="dark"] .statistics-list-row span {
	color: #e5edf8;
}

:root[data-theme="dark"] .statistics-list-row {
	border-bottom-color: #334155;
}

:root[data-theme="dark"] .status-tile,
:root[data-theme="dark"] .quick-action {
	background: #1e293b;
	border-color: #334155;
	color: #e5edf8;
}

:root[data-theme="dark"] .incident-nav-link {
	color: #a9b8cb;
}

:root[data-theme="dark"] .incident-nav-link:hover,
:root[data-theme="dark"] .incident-nav-link.active {
	background: #123d52;
	color: #8dcce9;
}

@media (max-width: 768px) {
	.container,
	.container-fluid {
		padding-left: 0.75rem;
		padding-right: 0.75rem;
	}

	.card-header {
		padding: 0.75rem;
	}

	.incident-bulk-toolbar {
		align-items: flex-start;
		flex-direction: column;
	}

	.bulk-report-field {
		grid-template-columns: 1fr;
	}

	.incident-header {
		display: block !important;
	}

	.incident-header-actions {
		margin-top: 1rem;
		max-width: none;
		justify-content: flex-start !important;
	}

	.reporting-card .card-header {
		align-items: flex-start;
		display: block;
	}

	.section-kicker {
		display: block;
		margin-top: 0.4rem;
	}

	.report-generation-action {
		align-items: flex-start;
		flex-direction: column;
	}

	.table {
		font-size: 0.85rem;
	}

	.incident-layout {
		grid-template-columns: 1fr;
	}

	.incident-sidebar {
		position: static;
	}
}
