:root {
    --bg: #f6f7f9;
    --panel: #ffffff;
    --text: #172026;
    --muted: #64727d;
    --line: #dfe5ea;
    --brand: #0b7d78;
    --brand-strong: #065f5b;
    --accent: #c84f31;
    --warn: #b26a00;
    --danger: #a61b2b;
    --ok: #1b7f45;
}

* {
    box-sizing: border-box;
}

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

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

a:hover {
    text-decoration: underline;
}

.auth-page {
    align-items: center;
    display: flex;
    min-height: 100vh;
    padding: 24px;
    justify-content: center;
}

.auth-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 14px 30px rgba(23, 32, 38, 0.08);
    max-width: 420px;
    padding: 28px;
    width: 100%;
}

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

.sidebar {
    background: #142126;
    color: #f4f7f8;
    padding: 24px 18px;
}

.brand {
    display: block;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0;
    margin-bottom: 24px;
}

.nav {
    display: grid;
    gap: 6px;
}

.nav a,
.nav button {
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: #dce6e8;
    cursor: pointer;
    display: block;
    font: inherit;
    padding: 10px 12px;
    text-align: left;
    width: 100%;
}

.nav a:hover,
.nav button:hover,
.nav .active {
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
    text-decoration: none;
}

.main {
    min-width: 0;
}

.topbar {
    align-items: center;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    min-height: 68px;
    padding: 14px 28px;
}

.content {
    padding: 28px;
}

.page-head {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 20px;
}

h1,
h2,
h3 {
    margin: 0 0 12px;
}

h1 {
    font-size: 28px;
}

h2 {
    font-size: 20px;
}

h3 {
    font-size: 16px;
}

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

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

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

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

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

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

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

.stat strong {
    display: block;
    font-size: 30px;
}

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

.field {
    display: grid;
    gap: 6px;
}

.field.full {
    grid-column: 1 / -1;
}

label {
    color: #26343b;
    font-weight: 700;
}

input,
select,
textarea {
    background: #fff;
    border: 1px solid #cfd8de;
    border-radius: 6px;
    color: var(--text);
    font: inherit;
    padding: 10px 11px;
    width: 100%;
}

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

.checks {
    display: grid;
    gap: 8px;
}

.check-row {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: auto 1fr;
}

.check-row input {
    width: auto;
}

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

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

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

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

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

.button,
button.button {
    background: var(--brand);
    border: 1px solid var(--brand);
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 700;
    padding: 9px 12px;
}

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

.button.secondary {
    background: #fff;
    border-color: #c7d1d7;
    color: var(--text);
}

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

.badge {
    background: #e7f3f2;
    border-radius: 999px;
    color: var(--brand-strong);
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
}

.notice,
.errors {
    border-radius: 8px;
    margin-bottom: 16px;
    padding: 12px 14px;
}

.notice {
    background: #e9f7ef;
    border: 1px solid #b8e2c8;
    color: var(--ok);
}

.errors {
    background: #fff0f1;
    border: 1px solid #f0b6bf;
    color: var(--danger);
}

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

.subtle {
    background: #f8fafb;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
}

.item-box {
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 14px;
    padding: 14px;
}

.image-list {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.thumb {
    background: #edf2f4;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.thumb img {
    display: block;
    height: 120px;
    object-fit: cover;
    width: 100%;
}

.thumb-body {
    padding: 8px;
}

.pagination {
    margin-top: 16px;
}

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

    .sidebar {
        position: static;
    }

    .form-grid,
    .grid.two,
    .grid.three,
    .stats,
    .tabs {
        grid-template-columns: 1fr;
    }

    .page-head,
    .topbar {
        display: grid;
    }
}
