:root {
    color-scheme: light;
    --ink: #1d232b;
    --muted: #687383;
    --line: #dbe1e8;
    --paper: #ffffff;
    --soft: #f5f7fa;
    --brand: #0b7a75;
    --brand-dark: #075d59;
    --danger: #b42318;
}

* {
    box-sizing: border-box;
}

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

a {
    color: inherit;
}

.topbar {
    align-items: center;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    min-height: 64px;
    padding: 0 20px;
}

.brand {
    color: var(--brand-dark);
    font-size: 22px;
    font-weight: 700;
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 10px;
}

.nav a,
.button,
button {
    background: var(--brand);
    border: 0;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    display: inline-flex;
    font-size: 14px;
    font-weight: 700;
    justify-content: center;
    padding: 10px 14px;
    text-decoration: none;
}

.button.secondary,
.nav a.secondary {
    background: #e7ecef;
    color: var(--ink);
}

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

.wrap {
    margin: 0 auto;
    max-width: 1120px;
    padding: 24px 20px 48px;
}

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

.flash {
    background: #e8f6f2;
    border: 1px solid #bde4dc;
    border-radius: 6px;
    margin-bottom: 16px;
    padding: 12px 14px;
}

.grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.item-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.item-card img {
    aspect-ratio: 1;
    background: #eef1f5;
    display: block;
    object-fit: cover;
    width: 100%;
}

.item-body {
    padding: 12px;
}

.item-body h2 {
    font-size: 16px;
    line-height: 1.3;
    margin: 0 0 8px;
}

.price {
    color: var(--brand-dark);
    font-size: 17px;
    font-weight: 700;
    margin: 0;
}

.form-grid {
    display: grid;
    gap: 14px;
}

label {
    display: grid;
    gap: 6px;
    font-weight: 700;
}

input,
select {
    border: 1px solid var(--line);
    border-radius: 6px;
    font: inherit;
    padding: 11px 12px;
    width: 100%;
}

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

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

.thumb {
    border-radius: 6px;
    height: 56px;
    object-fit: cover;
    width: 56px;
}

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

.preview-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    margin: 0 0 18px;
}

.preview-grid img {
    aspect-ratio: 1;
    border-radius: 6px;
    object-fit: cover;
    width: 100%;
}

.empty {
    color: var(--muted);
    padding: 32px 0;
    text-align: center;
}

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

    .nav {
        width: 100%;
    }

    .nav a {
        flex: 1;
    }

    .table,
    .table tbody,
    .table tr,
    .table td {
        display: block;
        width: 100%;
    }

    .table thead {
        display: none;
    }
}
