:root {
    --bg: #f5f7f2;
    --panel: #ffffff;
    --ink: #20252a;
    --muted: #69727d;
    --line: #d9dfd4;
    --accent: #116a5c;
    --accent-strong: #0a4d42;
    --blue: #27548a;
    --danger: #b42318;
    --warning: #b54708;
    --ok: #16764f;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.45;
}

a {
    color: var(--blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.topbar {
    background: #ffffff;
    border-bottom: 1px solid var(--line);
}

.topbar-inner {
    align-items: center;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin: 0 auto;
    max-width: 1180px;
    min-height: 64px;
    padding: 0 20px;
}

.brand {
    align-items: center;
    color: var(--ink);
    display: inline-flex;
    font-size: 18px;
    font-weight: 700;
    gap: 10px;
    min-width: 0;
}

.brand:hover {
    text-decoration: none;
}

.brand-logo {
    flex: 0 0 auto;
    height: 42px;
    object-fit: contain;
    width: auto;
}

.brand-text {
    overflow-wrap: anywhere;
}

.nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nav a,
.nav span,
.logout-button {
    border-radius: 8px;
    color: var(--muted);
    display: inline-flex;
    padding: 8px 10px;
}

.nav a.active {
    background: #e6f1ed;
    color: var(--accent-strong);
    font-weight: 700;
}

.logout-form {
    margin: 0;
}

.logout-button {
    background: transparent;
    border: 0;
    cursor: pointer;
    font: inherit;
}

.logout-button:hover {
    color: var(--ink);
}

.page {
    margin: 0 auto;
    max-width: 1180px;
    padding: 24px 20px 44px;
}

.page-title {
    align-items: flex-end;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.page-title h1 {
    font-size: 24px;
    line-height: 1.2;
    margin: 0;
}

.grid {
    display: grid;
    gap: 18px;
    grid-template-columns: 360px minmax(0, 1fr);
}

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

.section-spaced {
    margin-top: 18px;
}

.panel h2 {
    font-size: 17px;
    margin: 0 0 14px;
}

.field {
    display: grid;
    gap: 6px;
    margin-bottom: 14px;
}

.field label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.field-hint {
    color: var(--muted);
    font-size: 12px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"],
textarea {
    background: #fff;
    border: 1px solid #c8d0c4;
    border-radius: 8px;
    color: var(--ink);
    font: inherit;
    min-height: 42px;
    padding: 10px 11px;
    width: 100%;
}

textarea {
    min-height: 96px;
    resize: vertical;
}

.check-row {
    align-items: center;
    display: flex;
    gap: 10px;
    margin: 4px 0 18px;
}

.check-row input {
    height: 18px;
    width: 18px;
}

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

.button:hover {
    background: var(--accent-strong);
    text-decoration: none;
}

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

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

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

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

.status {
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
}

.status.ok {
    background: #e5f4ec;
    color: var(--ok);
}

.status.warn {
    background: #fff1df;
    color: var(--warning);
}

.status.bad {
    background: #fde8e5;
    color: var(--danger);
}

.status.neutral {
    background: #eef1f4;
    color: #54606b;
}

.deploy-error {
    color: var(--danger);
    font-size: 13px;
    line-height: 1.35;
    margin-top: 6px;
    max-width: 320px;
}

.flash {
    border-radius: 8px;
    margin-bottom: 18px;
    padding: 12px 14px;
}

.flash.success {
    background: #e5f4ec;
    border: 1px solid #b8ddcc;
    color: #0e5f42;
}

.flash.error {
    background: #fde8e5;
    border: 1px solid #f3b8b1;
    color: #8e1d13;
}

.login-shell {
    align-items: center;
    display: grid;
    min-height: 100vh;
    padding: 20px;
}

.login-panel {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin: 0 auto;
    max-width: 420px;
    padding: 24px;
    width: 100%;
}

.login-brand {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0 0 24px;
    text-align: center;
    width: 100%;
}

.login-logo {
    flex: 0 0 auto;
    height: 170px;
    max-width: 220px;
    object-fit: contain;
    width: auto;
}

.login-panel h1 {
    font-size: 24px;
    line-height: 1.2;
    margin: 0;
    text-align: center;
    width: 100%;
}

.muted {
    color: var(--muted);
}

.mono {
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
}

@media (max-width: 860px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .topbar-inner,
    .page-title {
        align-items: flex-start;
        flex-direction: column;
        justify-content: flex-start;
        padding-bottom: 12px;
        padding-top: 12px;
    }

    .page {
        padding-left: 14px;
        padding-right: 14px;
    }

    .brand-logo {
        height: 40px;
    }

    .login-logo {
        height: 150px;
        max-width: 200px;
    }
}
