* { box-sizing: border-box; }

:root {
    --bg: #0f0f0f;
    --panel: #191919;
    --panel-soft: #202020;
    --border: #424242;
    --text: #f2f2f2;
    --muted: #9a9a9a;
    --green: #5f8f64;
    --gold: #c6b08a;
    --red: #a84c4c;
}

body {
    margin: 0;
    padding: 28px;
    background: var(--bg);
    color: var(--text);
    font-family: Segoe UI, Arial, sans-serif;
}

.topbar,
.sectionHead {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    margin-bottom: 28px;
}

h1, h2, h3, p { margin: 0; }
h1 { font-size: 28px; }
p { margin-top: 6px; color: var(--muted); }

.ghostLink,
button {
    border: 0;
    border-radius: 8px;
    padding: 10px 14px;
    background: #333;
    color: white;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.ghostLink:hover,
button:hover { background: #4a4a4a; }

.items {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 36px;
}

.item {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    background: var(--panel);
}

.itemHeader {
    display: grid;
    grid-template-columns: 76px 1fr auto;
    gap: 12px;
    align-items: start;
    margin-bottom: 14px;
}

.thumb {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border: 1px solid #555;
    background: #111;
    color: var(--gold);
    overflow: hidden;
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item h3 { font-size: 20px; margin-bottom: 5px; }
.itemSub, .itemDesc { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.itemDesc { margin-top: 8px; line-height: 1.4; }
.price { margin-top: 8px; color: var(--gold); font-weight: 800; }

.badge { color: var(--green); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.badge.reserved { color: #d2a545; }
.badge.sold { color: #b76666; }
.badge.hidden { color: #777; }

.itemActions { display: flex; flex-wrap: wrap; gap: 8px; }
.itemActions button, .itemActions a {
    margin: 0;
    border-radius: 7px;
    padding: 8px 10px;
    background: #303030;
    color: white;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}
.itemActions .danger { background: #3a2828; }
.itemActions .danger:hover { background: var(--red); }

.editor {
    border-top: 1px solid #2d2d2d;
    padding-top: 24px;
}
.editor h2 { margin-bottom: 18px; }

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

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

input,
select,
textarea {
    width: 100%;
    margin-top: 7px;
    padding: 12px;
    border: 0;
    border-radius: 10px;
    background: var(--panel-soft);
    color: white;
    font: inherit;
}

textarea { min-height: 130px; resize: vertical; }
.fileLine { margin-top: 14px; }
.actions { display: flex; gap: 10px; }
#cancelButton { display: none; }
body.editing #cancelButton { display: inline-block; }

@media (max-width: 1300px) { .items { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 800px) {
    body { padding: 18px; }
    .topbar, .sectionHead { align-items: stretch; flex-direction: column; }
    .items, .formGrid { grid-template-columns: 1fr; }
}