body {
    margin: 0;
    background: #f5f7fa;
    color: #172033;
    font: 14px/1.45 system-ui, -apple-system, Segoe UI, sans-serif;
}
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 28px;
    background: #fff;
    border-bottom: 1px solid #d7dee8;
}
h1, h2 { margin: 0 0 14px; }
a { color: #1f6f5b; }
.home {
    max-width: 1100px;
    margin: 0 auto;
}
.login, .card, .flash {
    max-width: 1100px;
    margin: 22px auto;
    padding: 20px;
    background: #fff;
    border: 1px solid #d7dee8;
    border-radius: 8px;
}
.login { max-width: 420px; }
.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    max-width: 1142px;
    margin: 0 auto;
}
.tab {
	max-width: 1142px;
	margin: 22px auto 0;
	overflow: hidden;
	border: 1px solid #d7dee8;
	background: #eef2f6;
}
.tab button {
	float: left;
	min-height: 42px;
	padding: 0 16px;
	border: none;
	border-radius: 0;
	background: inherit;
	color: #172033;
	font-weight: 800;
	cursor: pointer;
	transition: background-color .15s ease;
}
.tab button:hover {
	background: #dfe7ef;
}
.tab button.active {
	background: #fff;
	color: #1f6f5b;
}
.tabcontent {
	display: none;
	max-width: 1142px;
	margin: 0 auto;
	padding: 0;
	border-top: none;
}
label {
    display: grid;
    gap: 6px;
    margin: 0 0 12px;
    font-weight: 700;
}
input, select {
    min-height: 36px;
    padding: 6px 8px;
    border: 1px solid #bac7d5;
    border-radius: 6px;
}
button {
    min-height: 36px;
    padding: 6px 12px;
    border: 0;
    border-radius: 6px;
    background: #1f6f5b;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}
.button-link {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 6px;
    background: #1f6f5b;
    color: #fff;
    font-weight: 800;
    text-decoration: none;
}
.button-link.secondary {
    background: #eef2f6;
    color: #172033;
}
.small-button {
	min-height: 28px;
	padding: 3px 8px;
	margin-left: 6px;
	font-size: 12px;
}
.danger-button {
	background: #b42318;
}
.danger-button:hover {
	background: #8a1f1f;
}
code {
    padding: 2px 5px;
    border-radius: 4px;
    background: #eef2f6;
}
.key-value {
    word-break: break-all;
}
.muted {
    display: block;
    margin-top: 4px;
    color: #667085;
    font-size: 12px;
}
.filters {
	display: grid;
	grid-template-columns: minmax(180px, 1fr) minmax(160px, 220px) minmax(150px, 190px) auto auto;
	gap: 12px;
	align-items: end;
	margin: 0 0 16px;
}
.settings-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px 18px;
}
.settings-grid .check-row,
.settings-grid .form-actions {
	grid-column: 1 / -1;
}
.check-row {
	display: flex;
	align-items: center;
	gap: 8px;
}
.check-row input {
	min-height: 0;
}
.test-email-form {
	margin-top: 16px;
	align-items: end;
}
.table-note {
	margin: -4px 0 12px;
	color: #667085;
	font-weight: 700;
}
.status-pill {
	display: inline-flex;
	align-items: center;
	min-height: 24px;
	padding: 0 8px;
	border-radius: 999px;
	background: #eef2f6;
	color: #344054;
	font-size: 12px;
	font-weight: 800;
	text-transform: uppercase;
}
.status-pill.sent {
	background: #e6f4ed;
	color: #14513d;
}
.status-pill.failed {
	background: #fdecec;
	color: #8a1f1f;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 9px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: top;
}
th a {
    color: #172033;
    text-decoration: none;
}
th a:hover {
    text-decoration: underline;
}
.inline {
    display: flex;
    gap: 8px;
    align-items: center;
}
.inline.compact {
    display: inline-flex;
    margin: 6px 0 0;
}
.error {
    padding: 10px;
    background: #fdecec;
    color: #8a1f1f;
    border-radius: 6px;
}
.flash {
    background: #e6f4ed;
    color: #14513d;
}
.warning {
	padding: 10px 12px;
	background: #fff4d6;
	color: #7a4b00;
	border-radius: 6px;
	font-weight: 700;
}
@media (max-width: 760px) {
	.grid { grid-template-columns: 1fr; margin: 0 16px; }
	.filters { grid-template-columns: 1fr; }
	.settings-grid { grid-template-columns: 1fr; }
	.card, .flash { margin: 16px; }
}
