:root {
    --ink: #17212b;
    --muted: #637083;
    --line: #dfe5ea;
    --panel: #ffffff;
    --page: #f4f7f6;
    --brand: #0f766e;
    --brand-dark: #0b5f59;
    --accent: #d97706;
    --danger: #b91c1c;
    --ok: #137a42;
}

* {
    box-sizing: border-box;
}

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

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

.topbar {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 24px;
    justify-content: space-between;
    min-height: 66px;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    color: var(--ink);
    font-size: 20px;
    font-weight: 800;
}

nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: flex-end;
}

main {
    margin: 0 auto;
    max-width: 1180px;
    padding: 28px;
}

.hero {
    align-items: stretch;
    display: grid;
    gap: 28px;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
    min-height: 430px;
}

.hero > div:first-child {
    background: linear-gradient(135deg, rgba(15, 118, 110, .92), rgba(20, 83, 45, .88)), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='520' viewBox='0 0 900 520'%3E%3Crect width='900' height='520' fill='%23eef6f3'/%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.35' stroke-width='2'%3E%3Cpath d='M80 110h210v90H80zM360 90h360v70H360zM360 210h430v56H360zM80 260h250v70H80zM390 330h330v86H390z'/%3E%3C/g%3E%3C/svg%3E");
    background-size: cover;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(30px, 6vw, 72px);
}

.hero h1,
.page-title h1 {
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.05;
    margin: 8px 0 16px;
}

.hero p {
    font-size: 18px;
    max-width: 720px;
}

.eyebrow {
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    margin: 0;
    text-transform: uppercase;
}

.hero .eyebrow {
    color: #fde68a;
}

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

.login-panel {
    align-self: center;
}

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

h3 {
    font-size: 17px;
    margin: -8px 0 12px;
}

form {
    margin: 0;
}

label {
    color: var(--muted);
    display: grid;
    font-size: 13px;
    font-weight: 700;
    gap: 7px;
    margin-bottom: 14px;
}

input,
select {
    background: #fff;
    border: 1px solid #cbd5df;
    border-radius: 6px;
    color: var(--ink);
    font: inherit;
    min-height: 42px;
    padding: 9px 11px;
    width: 100%;
}

button,
.button {
    align-items: center;
    background: var(--brand);
    border: 1px solid var(--brand);
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 800;
    justify-content: center;
    min-height: 42px;
    padding: 9px 16px;
}

button:hover,
.button:hover {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
}

.secondary,
.ghost {
    background: #fff;
    border-color: #bac5cf;
    color: var(--ink);
}

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

.small {
    min-height: 34px;
    padding: 6px 11px;
}

.steps {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 22px;
}

.steps article {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 6px;
    padding: 18px;
}

.steps span,
.page-title p {
    color: var(--muted);
}

.page-title {
    margin-bottom: 24px;
}

.page-title h1 {
    margin-bottom: 8px;
}

.action-buttons {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 22px;
}

.action-card {
    background: #fff;
    border: 1px solid var(--brand);
    border-radius: 8px;
    color: var(--ink);
    display: grid;
    gap: 6px;
    min-height: 96px;
    padding: 16px;
}

.action-card:hover {
    background: #edf8f6;
}

.action-card strong {
    color: var(--brand-dark);
    font-size: 17px;
}

.action-card span {
    color: var(--muted);
    font-size: 13px;
}

.grid {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

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

.panel {
    margin-bottom: 20px;
    scroll-margin-top: 86px;
}

.narrow-panel {
    margin-left: auto;
    margin-right: auto;
    max-width: 620px;
}

.panel.highlight {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, .10);
}

.section-note {
    color: var(--muted);
    margin: -8px 0 18px;
}

.filters {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(6, minmax(130px, 1fr)) auto auto;
    margin-bottom: 20px;
}

.filters label {
    margin-bottom: 0;
}

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

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

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

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

.empty {
    color: var(--muted);
    text-align: center;
}

.empty.left {
    text-align: left;
}

.checkline {
    align-items: center;
    display: flex;
    gap: 8px;
    margin: 0;
    white-space: nowrap;
}

.checkline input {
    min-height: 18px;
    width: auto;
}

.compact-edit-form {
    border-top: 1px solid var(--line);
    margin-top: 18px;
    padding-top: 18px;
}

.compact-edit-form.is-hidden {
    display: none;
}

.secret-box {
    background: #f8faf9;
    border: 1px dashed var(--brand);
    border-radius: 8px;
    display: grid;
    gap: 6px;
    margin-bottom: 14px;
    padding: 14px;
}

.secret-box span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.secret-box strong {
    font-family: Consolas, Monaco, monospace;
    font-size: 20px;
    overflow-wrap: anywhere;
}

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

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

.inline input {
    min-width: 170px;
}

.inline button {
    white-space: nowrap;
}

.notice {
    border-radius: 8px;
    font-weight: 700;
    margin-bottom: 16px;
    padding: 12px 14px;
}

.notice.success {
    background: #e8f7ef;
    color: var(--ok);
}

.notice.error {
    background: #fee2e2;
    color: var(--danger);
}

footer {
    color: var(--muted);
    padding: 24px;
    text-align: center;
}

@media (max-width: 920px) {
    .hero,
    .grid.two,
    .steps,
    .action-buttons {
        grid-template-columns: 1fr;
    }

    .filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 620px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px;
    }

    main {
        padding: 16px;
    }

    .hero > div:first-child,
    .login-panel,
    .panel {
        padding: 18px;
    }

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