:root {
    --bg: #f5f7fb;
    --ink: #1c2430;
    --muted: #667085;
    --line: #d9e0ea;
    --panel: #ffffff;
    --accent: #126c57;
    --accent-dark: #0d4f40;
    --danger: #b42318;
    --danger-bg: #fff0ee;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
}

.topbar {
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 24px;
    justify-content: space-between;
    padding: 22px clamp(18px, 4vw, 48px);
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    font-size: clamp(24px, 4vw, 36px);
    margin-bottom: 6px;
}

h2 {
    font-size: 20px;
}

p,
small,
.section-title span {
    color: var(--muted);
}

.layout {
    display: grid;
    gap: 22px;
    margin: 0 auto;
    max-width: 1180px;
    padding: 26px 18px 44px;
}

.panel,
.login-box {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 22px;
}

.auth {
    align-items: center;
    display: flex;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    margin: 0 auto;
    max-width: 420px;
    width: 100%;
}

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

label {
    color: #344054;
    display: grid;
    font-weight: 700;
    gap: 8px;
}

.wide {
    grid-column: 1 / -1;
}

input,
textarea {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    color: var(--ink);
    font: inherit;
    padding: 11px 12px;
    width: 100%;
}

textarea {
    resize: vertical;
}

button,
.link-button {
    align-items: center;
    background: var(--accent);
    border: 0;
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 700;
    justify-content: center;
    min-height: 42px;
    padding: 10px 14px;
    text-decoration: none;
    white-space: nowrap;
}

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

.danger {
    background: var(--danger-bg);
    color: var(--danger);
}

.danger:hover {
    background: #ffd8d3;
}

.warning {
    background: #fff7e6;
    color: #9a5b00;
}

.warning:hover {
    background: #ffe4ad;
}

.alert {
    border-radius: 8px;
    font-weight: 700;
    padding: 14px 16px;
}

.alert.ok {
    background: #e8f6ef;
    color: #146c43;
}

.alert.bad {
    background: #fff0ee;
    color: var(--danger);
}

.section-title {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
}

.table-wrap {
    overflow-x: auto;
}

table {
    border-collapse: collapse;
    min-width: 980px;
    width: 100%;
}

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

th {
    color: #475467;
    font-size: 13px;
    text-transform: uppercase;
}

td small {
    display: block;
    margin-top: 4px;
}

.copy-field {
    background: #f8fafc;
    min-width: 320px;
}

.status {
    border-radius: 999px;
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 10px;
}

.status.on {
    background: #e8f6ef;
    color: #146c43;
}

.status.off {
    background: #f2f4f7;
    color: #667085;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.actions form {
    margin: 0;
}

.empty {
    border: 1px dashed var(--line);
    border-radius: 8px;
    margin: 0;
    padding: 22px;
    text-align: center;
}

@media (max-width: 760px) {
    .topbar,
    .section-title {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .panel,
    .login-box {
        padding: 18px;
    }
}
