:root {
    color: #17211b;
    background: #f5f7f4;
    --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-family: var(--font-sans);
}

body {
    margin: 0;
}

a {
    color: inherit;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
}

.guest-shell {
    display: block;
}

.sidebar {
    background: #10251b;
    color: #f7fbf4;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.brand {
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
}

.sidebar nav {
    display: grid;
    gap: 8px;
}

.sidebar nav a,
.ghost-button {
    border: 0;
    color: #dce7d9;
    background: transparent;
    text-align: left;
    text-decoration: none;
    padding: 8px 0;
    cursor: pointer;
}

.main-panel {
    padding: 32px;
    min-width: 0;
}

.login-panel {
    width: min(460px, calc(100vw - 40px));
    margin: 18vh auto 0;
    background: #ffffff;
    border: 1px solid #d8e0d5;
    border-radius: 8px;
    padding: 28px;
    display: grid;
    gap: 22px;
    box-shadow: 0 12px 30px rgb(16 37 27 / 8%);
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

h1 {
    margin: 0;
    font-size: 30px;
    line-height: 1.15;
}

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

.eyebrow {
    margin: 0 0 6px;
    color: #597064;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.muted,
small {
    color: #627066;
}

.toolbar,
.actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 18px;
}

.actions.compact {
    margin-bottom: 0;
}

.check-field {
    display: flex;
    gap: 10px;
    align-items: center;
    font-weight: 600;
}

.check-field input {
    width: auto;
}

.grid {
    display: grid;
    gap: 16px;
}

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

.field {
    display: grid;
    gap: 6px;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #cbd6c8;
    border-radius: 6px;
    background: #ffffff;
    padding: 10px 12px;
    font: inherit;
    box-sizing: border-box;
}

textarea {
    resize: vertical;
}

.monospace,
pre {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.primary-button,
.secondary-button,
.danger-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 40px;
    border-radius: 6px;
    border: 1px solid transparent;
    padding: 0 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.primary-button {
    background: #19633b;
    color: #ffffff;
}

.secondary-button {
    background: #ffffff;
    color: #173522;
    border-color: #cbd6c8;
}

.danger-button {
    background: #9f1d24;
    color: #ffffff;
}

.table-wrap,
.panel {
    background: #ffffff;
    border: 1px solid #d8e0d5;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.panel {
    padding: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 14px 16px;
    border-bottom: 1px solid #e4e9e2;
    vertical-align: top;
}

th {
    color: #597064;
    font-size: 12px;
    text-transform: uppercase;
}

td strong,
td span,
td small {
    display: block;
}

.text-link {
    color: #19633b;
    font-weight: 700;
}

.editor {
    display: grid;
    gap: 16px;
}

.notice {
    background: #e6f3e8;
    border: 1px solid #b7d7bd;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 18px;
}

.notice-error {
    background: #fae6e6;
    border-color: #e1b1b1;
}

.details {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 18px;
}

.details dt {
    color: #597064;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.details dd {
    margin: 2px 0 0;
}

pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    margin: 0;
}

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

    .sidebar {
        position: static;
    }

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

    .page-header,
    .toolbar,
    .actions {
        align-items: stretch;
        flex-direction: column;
    }
}
