:root {
    color-scheme: light;
    --bg: #f5f7fa;
    --panel: #ffffff;
    --text: #172033;
    --muted: #657184;
    --line: #d8dee8;
    --accent: #13715f;
    --accent-dark: #0f5a4d;
    --danger: #b3261e;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 32px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
}

h1 {
    margin: 0;
    font-size: 24px;
}

h2 {
    margin: 0 0 16px;
    font-size: 18px;
}

nav,
.toolbar,
.actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

nav a,
a {
    color: var(--accent-dark);
    text-decoration: none;
    font-weight: 600;
}

main {
    width: min(1180px, calc(100% - 32px));
    margin: 24px auto;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 18px;
}

.form-narrow {
    max-width: 420px;
}

.form-wide {
    max-width: 920px;
}

.grid.two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

label {
    display: block;
    margin-bottom: 14px;
    color: var(--muted);
    font-weight: 650;
}

label.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}

input,
select,
textarea {
    width: 100%;
    margin-top: 6px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

textarea {
    resize: vertical;
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 14px;
    border: 0;
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

button:hover,
.button:hover {
    background: var(--accent-dark);
}

.button.secondary,
nav button {
    background: #e8edf3;
    color: var(--text);
}

button.link {
    min-height: 0;
    padding: 0;
    background: transparent;
    color: var(--accent-dark);
}

button.link.danger {
    color: var(--danger);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th,
td {
    padding: 11px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

code {
    display: inline-block;
    max-width: 300px;
    overflow-wrap: anywhere;
    padding: 2px 5px;
    border-radius: 4px;
    background: #eef2f6;
    color: #263447;
}

.alert {
    padding: 12px 14px;
    border-radius: 6px;
    margin-bottom: 14px;
}

.alert.error {
    background: #fdebea;
    color: var(--danger);
}

.status.sent {
    color: var(--accent-dark);
    font-weight: 700;
}

.status.failed {
    color: var(--danger);
    font-weight: 700;
}

@media (max-width: 760px) {
    header {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px;
    }

    .grid.two {
        grid-template-columns: 1fr;
    }

    table {
        display: block;
        overflow-x: auto;
    }
}

