/* Rasprodaja Zek-Pro – modern take on the zekpro.hr look (green bar, blue logo, Trebuchet headings) */

:root {
  --green: #1c8a5b;
  --green-d: #0e6b44;
  --green-l: #e7f4ec;
  --green-grad: linear-gradient(180deg, #4aa878 0%, #2b8f5e 55%, #1f7d50 100%);
  --blue: #0f6fb0;
  --ink: #1d2a33;
  --muted: #5d6b75;
  --line: #e1e7e4;
  --bg: #f3f6f4;
  --card: #fff;
  --red: #c0392b;
  --amber: #a86408;
  --r: 14px;
  --shadow: 0 1px 2px rgba(16, 40, 28, .05), 0 4px 16px rgba(16, 40, 28, .05);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Trebuchet MS", "Segoe UI", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.55 var(--font); color: var(--ink); background: var(--bg); }
img { max-width: 100%; display: block; }
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5em; }
h2 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.icon { width: 1.1em; height: 1.1em; flex: none; vertical-align: -.15em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.warn { color: var(--amber); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 16px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font: 600 .95rem/1.2 var(--font); text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { border-color: #c5d1cb; background: #f8faf9; }
.btn:focus-visible, .chip:focus-visible, .card:focus-visible { outline: 3px solid rgba(28, 138, 91, .35); outline-offset: 2px; }
.btn-primary { background: var(--green); border-color: var(--green-d); color: #fff; }
.btn-primary:hover { background: var(--green-d); border-color: var(--green-d); }
.btn-light { background: #fff; border-color: #fff; color: var(--green-d); }
.btn-light:hover { background: #f1faf5; }
.btn-outline-light { background: transparent; border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn-outline-light:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-danger { color: var(--red); border-color: #efc9c4; }
.btn-danger:hover { background: #fdf1ef; border-color: #e3a79f; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .875rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---- Header ---- */
.site-header, .admin-header { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .96); backdrop-filter: saturate(1.4) blur(8px); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 66px; }
.stripe { height: 5px; background: var(--green-grad); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand img { width: 48px; height: auto; }
.brand strong { display: block; font-family: var(--font-head); font-size: 1.15rem; letter-spacing: .06em; text-transform: uppercase; color: var(--green-d); line-height: 1.1; }
.brand small { display: block; font-size: .78rem; color: var(--muted); }
.header-actions { display: flex; gap: 8px; }
.hide-sm { display: none; }
@media (min-width: 640px) { .hide-sm { display: inline; } }

/* ---- Hero ---- */
.hero { padding: 20px 0 4px; }
.hero-card {
  position: relative; overflow: hidden; color: #fff;
  background: var(--green-grad); border-radius: 20px; padding: 28px 22px 26px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06), 0 10px 30px rgba(20, 90, 55, .18);
}
.hero-card::after { /* tennis-ball nod to the logo */
  content: ""; position: absolute; right: -70px; top: -70px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle at 38% 38%, #e4f36b, #b9d634 58%, #8fb01c);
  opacity: .22; pointer-events: none;
}
.hero-card > * { position: relative; z-index: 1; }
.eyebrow { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; opacity: .85; margin-bottom: 8px; }
.hero h1 { font-size: clamp(1.6rem, 4.5vw, 2.5rem); margin-bottom: 10px; }
.lead { max-width: 64ch; opacity: .95; margin-bottom: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-stat { margin: 16px 0 0; font-size: .95rem; opacity: .9; }
.hero-stat strong { font-size: 1.15rem; }
@media (min-width: 768px) { .hero-card { padding: 40px 44px 36px; } }

/* ---- Toolbar, search, chips ---- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 22px 0 12px; }
.search {
  flex: 1 1 240px; display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; color: var(--muted);
}
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; color: var(--ink); padding: 10px 0; }
.search:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(28, 138, 91, .15); }
.select, .status-select, .field select {
  appearance: none; -webkit-appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235d6b75' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat right 12px center / 12px;
}
.select { min-height: 46px; padding: 0 36px 0 12px; border: 1px solid var(--line); border-radius: 12px; font: inherit; color: var(--ink); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 8px 14px; border-radius: 999px; white-space: nowrap; font-size: .9rem;
  background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none;
}
.chip span { color: var(--muted); margin-left: 2px; font-size: .8rem; }
.chip:hover { border-color: #c5d1cb; }
.chip.is-active { background: var(--green); border-color: var(--green); color: #fff; }
.chip.is-active span { color: rgba(255, 255, 255, .8); }
.results-info { color: var(--muted); font-size: .9rem; margin: 0 0 14px; }

/* ---- Item grid ---- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 48px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 1040px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card {
  display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(16, 40, 28, .06), 0 12px 28px rgba(16, 40, 28, .1); }
.card-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #edf1ef; }
/* Absolutely positioned so tall photos can't stretch the 4:3 box */
.card-img img, .gallery-main img, .preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-img .noimg { position: absolute; inset: 0; }
.noimg { display: grid; place-items: center; width: 100%; height: 100%; color: #a7b5ae; }
.noimg .icon { width: 44px; height: 44px; }
.card-body { display: flex; flex-direction: column; gap: 3px; flex: 1; padding: 10px 12px 14px; }
.card-cat { font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--green); }
.card-title {
  margin: 0; font: 600 .98rem/1.35 var(--font);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; }
.price { font-size: 1.12rem; font-weight: 800; color: var(--green-d); white-space: nowrap; }
.qty { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.card.is-sold .card-img img { filter: grayscale(1); opacity: .55; }
.card.is-sold .price { color: var(--muted); text-decoration: line-through; font-weight: 600; }
.badge {
  position: absolute; left: 10px; top: 10px; padding: 4px 10px; border-radius: 999px;
  font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--ink);
}
.badge-sold { background: var(--red); }
.badge-reserved { background: var(--amber); }
.empty { text-align: center; padding: 56px 16px; color: var(--muted); }
.empty .icon { width: 48px; height: 48px; color: #b3c0b9; margin-bottom: 8px; }
.empty h1 { color: var(--ink); }

/* ---- Item detail ---- */
.back { display: inline-flex; align-items: center; gap: 6px; margin: 18px 0 12px; font-size: .95rem; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--ink); }
.detail-grid { display: grid; gap: 22px; margin-bottom: 48px; }
@media (min-width: 900px) {
  .detail-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 34px; align-items: start; }
  .gallery { position: sticky; top: 90px; }
}
.gallery-main {
  position: relative; display: block; width: 100%; padding: 0; border: 1px solid var(--line); cursor: zoom-in;
  aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--r); background: #fff;
}
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-main.is-sold img { filter: grayscale(1); opacity: .7; }
.gallery-empty { cursor: default; background: #edf1ef; }
.zoom, .img-count { position: absolute; bottom: 10px; color: #fff; background: rgba(0, 0, 0, .55); border-radius: 8px; }
.zoom { right: 10px; display: grid; padding: 7px; }
.img-count { left: 10px; padding: 4px 9px; font-size: .8rem; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; margin-top: 10px; padding-bottom: 4px; }
.thumb { flex: none; width: 74px; aspect-ratio: 1; padding: 0; overflow: hidden; cursor: pointer; background: #edf1ef; border: 2px solid transparent; border-radius: 10px; opacity: .75; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-active, .thumb:hover { border-color: var(--green); opacity: 1; }

.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cat-link { font-size: .8rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--green); text-decoration: none; }
.detail h1 { font-size: clamp(1.45rem, 3.2vw, 2rem); margin: 10px 0 4px; }
.price-big { font-size: 2rem; font-weight: 800; color: var(--green-d); margin-bottom: 16px; }
.price-big.is-sold { color: var(--muted); text-decoration: line-through; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-available { background: var(--green-l); color: var(--green-d); }
.status-reserved { background: #fdf2de; color: var(--amber); }
.status-sold { background: #fdeceA; color: var(--red); }
.facts {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 0 0 18px;
  background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
.facts div { background: #fff; padding: 10px 12px; }
.facts dt { font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.desc { margin-bottom: 20px; overflow-wrap: anywhere; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 16px; }
.contact-panel p:first-child { margin-bottom: 12px; }
.contact-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.address { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; }
.inquiry h2 { margin-bottom: 14px; }
.form-note { margin: 10px 0 0; text-align: center; }

/* ---- Forms ---- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; margin-bottom: 6px; font-size: .9rem; font-weight: 600; }
.field input, .field textarea, .field select, .input {
  width: 100%; padding: 11px 12px; border: 1px solid #cdd7d2; border-radius: 10px;
  font: inherit; color: inherit; background-color: #fff;
}
.field select { padding-right: 36px; }
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus, .field select:focus, .input:focus {
  outline: 0; border-color: var(--green); box-shadow: 0 0 0 3px rgba(28, 138, 91, .15);
}
.field small { display: block; margin-top: 5px; font-size: .8rem; color: var(--muted); }
.field.has-error input, .field.has-error textarea { border-color: var(--red); }
.field-error { display: block; margin-top: 5px; font-size: .85rem; font-style: normal; color: var(--red); }
.row-2 { display: grid; gap: 0 12px; }
@media (min-width: 520px) { .row-2 { grid-template-columns: 1fr 1fr; } }
.captcha label span { display: block; margin-bottom: 6px; font-size: .9rem; font-weight: 600; }
.captcha-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.captcha-row img { height: 52px; width: auto; border: 1px solid #cdd7d2; border-radius: 10px; }
.captcha-row .captcha-new { height: 52px; min-width: 46px; padding: 0 12px; font-size: 1.3rem; }
.field .captcha-row input { flex: 1 1 110px; width: auto; min-width: 0; height: 52px; font-size: 1.25rem; letter-spacing: .25em; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { display: flex; gap: 8px; align-items: flex-start; padding: 12px 14px; margin-bottom: 14px; border-radius: 10px; font-size: .95rem; }
.alert .icon { margin-top: 3px; }
.alert-ok { background: var(--green-l); color: var(--green-d); border: 1px solid #bfe2cd; }
.alert-err { background: #fdecea; color: #8f2418; border: 1px solid #f1c0b9; }
.alert-warn { background: #fdf5e6; color: #7a4a06; border: 1px solid #f1dcb2; }

/* ---- Footer ---- */
.site-footer { margin-top: 24px; padding: 32px 0 22px; background: #133b2a; color: #c3d3cb; font-size: .92rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 18px; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-logo { width: 44px; height: auto; margin-bottom: 10px; background: #fff; border-radius: 8px; padding: 3px; }
.site-footer strong { color: #fff; }
.muted-light { color: #8fa89c; }
.copy { margin-top: 22px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .8rem; color: #8fa89c; }

/* ---- Lightbox ---- */
.lightbox {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: rgba(8, 14, 11, .95); color: #fff;
}
.lightbox::backdrop { background: rgba(8, 14, 11, .95); }
.lb-stage { position: absolute; inset: 0; display: grid; place-items: center; padding: 60px 12px; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.lb-btn {
  position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer;
}
.lb-btn:hover { background: rgba(255, 255, 255, .25); }
.lb-btn .icon { width: 24px; height: 24px; }
.lb-close { top: 10px; right: 10px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 10px; }
.lb-next { right: 10px; }
.lb-count { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); font-size: .9rem; opacity: .8; }

/* ================= Admin ================= */
.admin-header { border-bottom: 1px solid var(--line); }
.admin-header .bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; min-height: 62px; padding-top: 8px; padding-bottom: 8px; }
.admin-header .brand img { width: 40px; }
.admin-nav { order: 3; flex-basis: 100%; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.admin-nav a { padding: 8px 12px; border-radius: 8px; white-space: nowrap; font-weight: 600; color: var(--ink); text-decoration: none; }
.admin-nav a:hover { background: #f1f5f3; }
.admin-nav a.is-active { background: var(--green-l); color: var(--green-d); }
.admin-user { margin-left: auto; display: flex; gap: 6px; }
@media (min-width: 900px) { .admin-nav { order: 0; flex-basis: auto; flex: 1; } .admin-user { margin-left: 0; } }
.count { display: inline-block; min-width: 20px; margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: .72rem; text-align: center; }
.admin-main { padding-top: 20px; padding-bottom: 60px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.page-head h1 { margin: 0; font-size: 1.55rem; }
.page-head .back { margin: 0 0 4px; }
.page-head p { margin: 4px 0 0; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 4px; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { display: block; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; }
.stat b { display: block; font-size: 1.45rem; line-height: 1.2; }
.stat span { font-size: .8rem; color: var(--muted); }
.stat.is-active { border-color: var(--green); box-shadow: 0 0 0 2px rgba(28, 138, 91, .18); }
.stat-available b { color: var(--green-d); }
.stat-reserved b { color: var(--amber); }
.stat-sold b { color: var(--red); }

.a-list { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: 14px; }
.a-row { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; padding: 12px; border-top: 1px solid var(--line); }
.a-row:first-child { border-top: 0; }
.a-thumb { grid-row: span 2; display: grid; place-items: center; width: 60px; height: 60px; overflow: hidden; border-radius: 10px; background: #edf1ef; color: #a7b5ae; text-decoration: none; align-self: start; }
.a-thumb img { width: 100%; height: 100%; object-fit: cover; }
.a-title { font-weight: 600; color: var(--ink); text-decoration: none; }
.a-title:hover { color: var(--green-d); text-decoration: underline; }
.a-price { font-weight: 700; white-space: nowrap; text-align: right; align-self: start; }
.a-tools { grid-column: 2 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
@media (min-width: 900px) {
  .a-row { grid-template-columns: 60px minmax(0, 1fr) 120px auto; }
  .a-thumb { grid-row: auto; }
  .a-price, .a-thumb { align-self: center; }
  .a-tools { grid-column: auto; flex-wrap: nowrap; }
}
.status-form { display: inline-flex; }
.status-select { min-height: 36px; padding: 0 30px 0 10px; border: 1px solid var(--line); border-radius: 8px; font: 600 .85rem var(--font); cursor: pointer; background-position: right 10px center; }
.status-select.s-available { background-color: var(--green-l); color: var(--green-d); border-color: #bfe2cd; }
.status-select.s-reserved { background-color: #fdf2de; color: var(--amber); border-color: #f1dcb2; }
.status-select.s-sold { background-color: #fdecea; color: var(--red); border-color: #f1c0b9; }

.form-grid { display: grid; gap: 16px; }
.col-main, .col-side { min-width: 0; }
@media (min-width: 960px) {
  .form-grid { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .col-side { position: sticky; top: 84px; }
}
.status-pills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span { display: block; padding: 9px 6px; border: 1px solid #cdd7d2; border-radius: 10px; text-align: center; font-size: .85rem; font-weight: 600; cursor: pointer; background: #fff; }
.pill input:focus-visible + span { box-shadow: 0 0 0 3px rgba(28, 138, 91, .25); }
.pill-available input:checked + span { background: var(--green-l); border-color: var(--green); color: var(--green-d); }
.pill-reserved input:checked + span { background: #fdf2de; border-color: var(--amber); color: var(--amber); }
.pill-sold input:checked + span { background: #fdecea; border-color: var(--red); color: var(--red); }
.save-panel .btn-ghost { margin-top: 6px; }
.upload-status { margin: 8px 0 0; text-align: center; min-height: 1.2em; }

.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 14px; }
.img-tile { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #edf1ef; }
.img-tile img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.tile-actions { display: flex; gap: 4px; padding: 6px; background: #fff; }
.tile-actions .btn { flex: 1; min-height: 32px; padding: 4px 6px; font-size: .78rem; }
.cover-badge { position: absolute; left: 6px; top: 6px; padding: 2px 8px; border-radius: 999px; background: var(--green); color: #fff; font-size: .7rem; font-weight: 700; }
.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 16px;
  border: 2px dashed #b9cfc3; border-radius: 12px; background: #f7fbf9; color: var(--green-d); text-align: center; cursor: pointer;
}
.dropzone:hover, .dropzone.is-drag { border-color: var(--green); background: var(--green-l); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone small { color: var(--muted); }
.previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 10px; }
.previews:empty { display: none; }
.preview { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: #edf1ef; }
.preview img { width: 100%; height: 100%; object-fit: cover; }
.preview button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; font-size: 1rem; line-height: 1; cursor: pointer; }
[data-upload-note] { margin: 10px 0 0; }

.danger-zone { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; border-color: #f1d3cf; }
.danger-zone p { margin: 2px 0 0; }

.login-wrap { min-height: 65vh; display: grid; place-items: center; }
.login-card { width: 100%; max-width: 380px; }
.login-card h1 { margin-bottom: 2px; }

.inline-form { display: flex; gap: 8px; margin-bottom: 16px; }
.grow { flex: 1 1 200px; min-width: 0; }
.cat-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.cat-row:first-child { border-top: 0; }
.sort-field { display: inline-flex; align-items: center; gap: 6px; }
.sort-field .input { width: 76px; padding: 7px 8px; }
.cat-row .input.grow { padding: 8px 10px; }
.cat-count { min-width: 50px; }

.seg { display: inline-flex; padding: 3px; background: #e6ece9; border-radius: 10px; }
.seg a { padding: 7px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .9rem; font-weight: 600; }
.seg a.is-active { background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.inq.is-done { opacity: .7; }
.inq-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.inq-item { margin-bottom: 10px; }
.inq-msg { padding: 12px 14px; margin-bottom: 12px; background: #f6f8f7; border-radius: 10px; overflow-wrap: anywhere; }
.inq-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.inq-actions { display: flex; gap: 6px; margin-left: auto; }
.inq .warn { margin: 10px 0 0; }

.settings-grid { display: grid; gap: 16px; margin-bottom: 16px; }
.settings-grid .panel + .panel { margin-top: 0; }
@media (min-width: 900px) { .settings-grid { grid-template-columns: 1.4fr 1fr; align-items: start; } }
