:root {
    --bg-top: #e8eee6;
    --bg-mid: #dde6dc;
    --bg-bottom: #e9efe7;

    --surface: rgba(244, 247, 243, 0.94);
    --surface-strong: #f3f7f2;
    --surface-soft: #e8efe7;

    --text-main: #18241a;
    --text-soft: #394b3c;
    --text-muted: #55665a;

    --border-soft: rgba(49, 72, 53, 0.16);
    --border-mid: rgba(49, 72, 53, 0.24);

    --accent: #48674d;
    --accent-dark: #35513a;
    --accent-soft: #cfddcc;

    --water-soft: #dbe7df;
    --warn-soft: #f5e7d3;
    --warn-text: #6e4f22;

    --danger: #8f4e4e;
    --danger-dark: #743d3d;

    --success-bg: #e4efe3;
    --success-border: #bfd2bd;
    --success-text: #24462a;

    --error-bg: #f4e4e0;
    --error-border: #e3bdb5;
    --error-text: #6d2d25;

    --info-bg: #e5eef1;
    --info-border: #c3d3da;
    --info-text: #294b58;

    --shadow-soft: 0 4px 14px rgba(0, 0, 0, 0.07);
    --shadow-card: 0 10px 28px rgba(0, 0, 0, 0.08);

    --radius: 18px;
    --radius-small: 12px;
    --content-width: 1120px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.65;
    color: var(--text-main);
    background:
        linear-gradient(
            180deg,
            var(--bg-top) 0%,
            var(--bg-mid) 42%,
            #d9e3db 72%,
            var(--bg-bottom) 100%
        );
}

img {
    max-width: 100%;
    height: auto;
}

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

a:hover {
    text-decoration: underline;
}

.site-shell {
    width: min(var(--content-width), calc(100% - 2rem));
    margin: 0 auto;
    padding: 1.25rem 0 2rem;
}

.site-header {
    position: sticky;
    top: 0.75rem;
    z-index: 20;
    padding: 1rem 1.2rem;
    border-radius: calc(var(--radius) + 4px);
    background: var(--surface);
    backdrop-filter: blur(6px);
    border: 1px solid var(--border-mid);
    box-shadow:
        0 3px 14px rgba(0, 0, 0, 0.06),
        0 10px 24px rgba(0, 0, 0, 0.05);
}

.brand-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.brand-title {
    display: inline-block;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-main);
}

.brand-title:hover {
    text-decoration: none;
    color: var(--accent-dark);
}

.brand-subtitle {
    margin-top: 0.2rem;
    font-size: 0.96rem;
    color: var(--text-soft);
}

.user-tools,
.main-nav,
.admin-nav,
.section-head,
.actions-cell,
.inline-form,
.meta-line,
.check-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.user-tools {
    justify-content: flex-end;
}

.main-nav {
    padding-top: 0.8rem;
    border-top: 1px solid var(--border-soft);
}

.main-nav a,
.admin-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 2.35rem;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    color: var(--text-main);
    font-weight: 600;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.15s ease;
}

.main-nav a:hover,
.admin-nav a:hover {
    background: var(--water-soft);
    color: var(--accent-dark);
    text-decoration: none;
    transform: translateY(-1px);
}

.site-main {
    padding: 1.2rem 0;
}

.site-footer {
    padding: 1rem 0 0;
    text-align: center;
    color: var(--text-soft);
    font-size: 0.95rem;
}

.card {
    margin-bottom: 1rem;
    padding: 1.25rem;
    border-radius: var(--radius);
    background: var(--surface-strong);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-card);
}

.soft-card {
    background: linear-gradient(180deg, #eef4ec 0%, var(--surface-soft) 100%);
}

.hero-card {
    background: linear-gradient(
        135deg,
        rgba(241, 245, 240, 0.98) 0%,
        rgba(224, 233, 223, 0.95) 100%
    );
}

.admin-highlight {
    background: linear-gradient(180deg, #edf4ee 0%, #e2ebe4 100%);
}

.narrow-card {
    max-width: 700px;
}

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

.hero h1 {
    margin-bottom: 0.9rem;
}

.eyebrow {
    margin-bottom: 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
}

h1,
h2,
h3 {
    margin-top: 0;
    color: var(--text-main);
    line-height: 1.2;
}

h1 {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    margin-bottom: 0.9rem;
}

h2 {
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    margin-bottom: 0.75rem;
}

h3 {
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
}

.button,
button,
input,
textarea,
select {
    font: inherit;
}

.button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 2.5rem;
    padding: 0.68rem 1rem;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: var(--accent);
    color: #f8faf7;
    transition:
        background 0.2s ease,
        transform 0.15s ease,
        box-shadow 0.2s ease;
}

.button:hover,
button:hover {
    background: var(--accent-dark);
    text-decoration: none;
    transform: translateY(-1px);
}

.button-secondary {
    background: var(--accent-soft);
    color: var(--text-main);
    border: 1px solid var(--border-mid);
}

.button-secondary:hover {
    background: #c3d4c1;
    color: var(--text-main);
}

.button-danger {
    background: var(--danger);
}

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

.button-small {
    min-height: 2rem;
    padding: 0.45rem 0.78rem;
    font-size: 0.9rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 0.8rem 0.92rem;
    border-radius: var(--radius-small);
    border: 1px solid var(--border-mid);
    background: #f7faf6;
    color: var(--text-main);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(72, 103, 77, 0.16);
}

textarea {
    min-height: 9rem;
    resize: vertical;
}

label {
    font-weight: 700;
    color: var(--text-main);
}

.stack-form > * + * {
    margin-top: 0.85rem;
}

.check-row {
    font-weight: 500;
    color: var(--text-main);
}

.check-row input {
    width: auto;
    margin: 0;
}

.alert {
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    border: 1px solid transparent;
    box-shadow: var(--shadow-soft);
}

.alert ul {
    margin: 0;
    padding-left: 1.1rem;
}

.alert-success {
    background: var(--success-bg);
    border-color: var(--success-border);
    color: var(--success-text);
}

.alert-error {
    background: var(--error-bg);
    border-color: var(--error-border);
    color: var(--error-text);
}

.alert-info {
    background: var(--info-bg);
    border-color: var(--info-border);
    color: var(--info-text);
}

.grid {
    display: grid;
    gap: 1rem;
}

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

.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.stat-card {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-dark);
}

.stat-label {
    color: var(--text-soft);
}

.section-head {
    justify-content: space-between;
    margin-bottom: 1rem;
}

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

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

th,
td {
    padding: 0.78rem;
    border-bottom: 1px solid var(--border-soft);
    text-align: left;
    vertical-align: top;
}

th {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-soft);
}

tbody tr:hover {
    background: rgba(207, 221, 204, 0.30);
}

.tag,
.user-badge,
.meta-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.92rem;
    color: var(--text-soft);
}

.user-badge {
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(207, 221, 204, 0.72);
    border: 1px solid var(--border-soft);
}

.tag {
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    background: var(--water-soft);
    color: var(--accent-dark);
    font-weight: 700;
}

.tag-warn {
    background: var(--warn-soft);
    color: var(--warn-text);
}

.prose {
    color: var(--text-main);
}

.prose p:first-child {
    margin-top: 0;
}

.prose p:last-child {
    margin-bottom: 0;
}

.list-clean {
    margin: 0;
    padding-left: 1.1rem;
}

.meta-line {
    margin-bottom: 0.8rem;
}

.meta-inline {
    color: var(--text-soft);
}

.inline-form {
    margin: 0;
}

.small-text {
    margin-top: 0.35rem;
    color: var(--text-soft);
    font-size: 0.92rem;
}

.page-header-media {
    margin: 0 0 1.2rem 0;
    padding: 0.5rem;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(49, 72, 53, 0.16);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
    background: #dde6dc;
    text-align: center;
}

.page-header-media img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 420px;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .two-cols,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .brand-row {
        flex-direction: column;
    }

    .user-tools {
        justify-content: flex-start;
    }

    .site-shell {
        width: min(100% - 1rem, var(--content-width));
    }

    .site-header {
        position: static;
    }
}

@media (max-width: 640px) {
    .site-shell {
        padding-top: 0.6rem;
    }

    .site-header,
    .card {
        padding: 1rem;
    }

    th,
    td {
        padding: 0.65rem;
    }

    .button,
    button {
        width: auto;
    }
}
