/* Izsoļu nams BALTARS — site styles. Brand: teal #0d6768, orange #ff8d00, gold #d1b14e. */
:root {
  --brand: #0d6768; --brand-dark: #094d4e; --accent: #ff8d00; --accent-dark: #d97400; --gold: #d1b14e;
  --ink: #1d1d1b; --muted: #6b6b66; --line: #e4e1da; --paper: #faf8f4; --card: #ffffff;
  --ok: #2e8131; --err: #ce4244; --warn: #b7791f;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 10px; --shadow: 0 1px 2px rgba(0,0,0,.06), 0 6px 18px -8px rgba(0,0,0,.12);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 var(--sans); color: var(--ink); background: var(--paper); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.narrow { max-width: 640px; margin-inline: auto; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.ok { color: var(--ok); } .err { color: var(--err); } .pending { color: var(--warn); }
.inline { display: inline; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px; z-index: 99; }
[hidden] { display: none !important; }

/* header */
.top { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top-row { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.logo img { width: 200px; height: auto; }
.nav { display: flex; align-items: center; gap: 4px 18px; flex: 1; flex-wrap: wrap; font-size: .95rem; }
.nav > a { color: var(--ink); padding: 6px 0; } .nav > a:hover { color: var(--brand); text-decoration: none; }
.nav-account { display: flex; align-items: center; gap: 14px; font-size: .95rem; }
.nav-account .btn-sm { padding: 6px 12px; }
.admin-link { color: var(--accent-dark) !important; font-weight: 600; }
.linkish { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 0; }
.linkish:hover { color: var(--ink); }
.bell { position: relative; }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--err); color: #fff; font-size: .72rem; line-height: 18px; text-align: center; font-weight: 700; vertical-align: middle; }
.burger { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 8px; background: #fff; position: relative; cursor: pointer; }
.burger span, .burger span::before, .burger span::after { content: ""; position: absolute; left: 10px; right: 10px; height: 2px; background: var(--ink); top: 50%; transition: .2s; }
.burger span::before { top: -7px; left: 0; right: 0; } .burger span::after { top: 7px; left: 0; right: 0; }
.lang { display: flex; align-items: center; font-size: .8rem; letter-spacing: .05em; }
.lang a { color: var(--muted); padding: 3px 7px; } .lang a + a { border-left: 1px solid var(--line); }
.lang a:hover { color: var(--brand); text-decoration: none; } .lang a.cur { color: var(--ink); font-weight: 700; }
.strip { color: #fff; background: var(--brand); font-size: .92rem; }
.strip-upcoming { background: var(--brand); } .strip-live { background: #1f7a3c; } .strip-ended { background: #555; }
.strip-row { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; padding: 7px 0; }
.strip a { color: #fff; } .strip-title { font-weight: 600; } .strip-dates { opacity: .9; } .strip-count { margin-left: auto; }
.strip-count b { font-variant-numeric: tabular-nums; }
.live-dot::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ffd966; margin-right: 6px; animation: pulse 1.5s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.notice { background: #fff3cd; color: #5c4300; padding: 10px 16px; margin-top: 12px; border-radius: var(--radius); }

/* layout bits */
main { padding: 28px 0 56px; min-height: 60vh; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 20px; }
.card + .card, .form + .form { margin-top: 20px; }
.two-col { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
.flash { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; border: 1px solid; }
.flash-ok { background: #edf7ee; border-color: #bfe0c2; color: #1f5a22; }
.flash-error { background: #fdeeee; border-color: #f2c2c3; color: #7a1f21; }
.flash-info { background: #eef4fb; border-color: #c6d9f0; color: #1f3f6b; }
.btn { display: inline-block; padding: 10px 18px; border-radius: 8px; border: 1px solid var(--brand); background: #fff; color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; line-height: 1.2; text-align: center; }
.btn:hover { background: #eef6f6; text-decoration: none; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #1d1d1b; }
.btn-accent:hover { background: #ffa033; }
.btn-danger { border-color: var(--err); color: var(--err); } .btn-danger:hover { background: #fdeeee; }
.btn-sm { padding: 6px 10px; font-size: .85rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .actions form { margin: 0; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; margin: 36px 0 14px; }
.crumbs { font-size: .9rem; margin-bottom: 14px; display: flex; justify-content: space-between; gap: 12px; }
.crumb-nav a { margin-left: 12px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.empty { padding: 40px; text-align: center; color: var(--muted); }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: center; padding: 20px 0 10px; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.hero-dates { font-size: 1.1rem; }
.hero-desc { color: var(--muted); max-width: 55ch; }
.count-big { font-size: 1.15rem; } .count-big b { font-variant-numeric: tabular-nums; color: var(--brand); font-size: 1.4rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.hero-art { position: relative; height: 360px; }
.hero-tile { position: absolute; border-radius: 12px; overflow: hidden; box-shadow: 0 20px 40px -18px rgba(0,0,0,.45); background: #fff; border: 6px solid #fff; }
.hero-tile img { width: 100%; height: 100%; object-fit: cover; }
.hero-tile.t0 { width: 58%; height: 70%; left: 0; top: 8%; z-index: 2; }
.hero-tile.t1 { width: 44%; height: 50%; right: 0; top: 0; }
.hero-tile.t2 { width: 40%; height: 44%; right: 6%; bottom: 0; }
.participate { margin-top: 12px; }
.participate form { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 10px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 12px; font-size: .85rem; color: var(--ink); }
.chip:hover { border-color: var(--brand); text-decoration: none; } .chip small { color: var(--muted); }
.steps { margin-top: 48px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.steps ol { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; padding: 0 0 0 1.2em; margin: 0 0 14px; }
.steps li { padding-right: 10px; }
.about-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 40px; }

/* catalogue */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 20px; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; color: var(--muted); }
.filters .grow { flex: 1; min-width: 180px; }
.filters select, .filters input { font: inherit; font-size: .95rem; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
/* catalogue: category sidebar (with a login card when logged out) + lots, as on the old site */
.catalogue { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: start; }
.main-col { min-width: 0; } .filters select { max-width: 100%; }
.side-login { margin-bottom: 20px; } .side-login h2 { font-size: 1.15rem; margin-bottom: 10px; } .side-login .field { margin-bottom: 10px; } .side-login p { margin: 0 0 8px; }
.cats { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cats a { display: flex; justify-content: space-between; gap: 8px; padding: 8px 14px; color: var(--ink); border-top: 1px solid var(--line); font-size: .92rem; }
.cats a:first-child { border-top: 0; font-weight: 600; }
.cats a:hover { background: var(--paper); text-decoration: none; }
.cats a.cur { background: var(--brand); color: #fff; }
.cats small { color: var(--muted); font-variant-numeric: tabular-nums; } .cats a.cur small { color: rgba(255,255,255,.85); }
.only-narrow { display: none; }
.lot-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink); transition: transform .15s, box-shadow .15s; position: relative; }
.lot-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.lot-img { position: relative; aspect-ratio: 4 / 3; background: #f1efe9; display: block; }
.lot-img img { width: 100%; height: 100%; object-fit: cover; }
.noimg { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); font-size: .85rem; }
.lot-no { position: absolute; left: 10px; top: 10px; background: rgba(29,29,27,.82); color: #fff; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.lot-flag { display: none; position: absolute; right: 10px; top: 10px; font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 6px; color: #fff; }
.lot-flag-lead { background: var(--ok); } .lot-flag-out { background: var(--err); }
.leading .lot-flag-lead, .outbid .lot-flag-out { display: inline-block; }
.lot-card.leading { border-color: var(--ok); } .lot-card.outbid { border-color: var(--err); }
.lot-body { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 14px; flex: 1; }
.lot-title { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lot-author { font-size: .9rem; color: var(--muted); }
.lot-meta { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: 4px; }
.lot-price { margin-top: auto; padding-top: 10px; display: flex; align-items: baseline; gap: 8px; }
.lot-price b { font-size: 1.2rem; font-variant-numeric: tabular-nums; } .lot-price small { color: var(--muted); }
.lot-foot { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); margin-top: 6px; }
.tleft { font-variant-numeric: tabular-nums; } .tleft.soon { color: var(--err); font-weight: 700; }
.phase-ended .lot-img img { filter: saturate(.6); }
.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 28px 0; }
.pager a, .pager span { min-width: 38px; padding: 8px 10px; text-align: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.pager a.cur { background: var(--brand); color: #fff; border-color: var(--brand); }

/* lot page */
.lot-page { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.gallery { position: relative; }
.main-img { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; }
.main-img img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }
.main-img.noimg { display: flex; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.thumbs a { width: 72px; height: 56px; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: #fff; }
.thumbs a.cur { border-color: var(--brand); } .thumbs img { width: 100%; height: 100%; object-fit: cover; }
.gallery .lot-flag { top: 14px; right: 14px; font-size: .85rem; z-index: 2; }
.lot-author-big { font-size: 1.1rem; color: var(--muted); margin-top: -6px; }
.specs { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 14px 0; font-size: .95rem; }
.specs dt { color: var(--muted); } .specs dd { margin: 0; }
.desc { white-space: normal; line-height: 1.6; }
.bid-box { position: sticky; top: 90px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.bid-box.phase-live { border-top: 4px solid var(--accent); }
.bb-label { text-transform: uppercase; font-size: .75rem; letter-spacing: .07em; color: var(--muted); font-weight: 700; margin: 0; }
.bb-price { font-family: var(--serif); font-size: 2.3rem; margin: 2px 0 6px; font-variant-numeric: tabular-nums; }
.bb-meta { font-size: .9rem; color: var(--muted); } .bb-meta b { color: var(--ink); font-variant-numeric: tabular-nums; }
.bb-meta b.soon { color: var(--err); }
.bb-mystate { font-weight: 700; padding: 8px 12px; border-radius: 8px; }
.bb-mystate.leading { background: #edf7ee; color: var(--ok); } .bb-mystate.outbid { background: #fdeeee; color: var(--err); }
.bid-form label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 10px; }
.bid-form input { display: block; width: 100%; font: inherit; font-size: 1.3rem; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.bb-actions { display: grid; gap: 8px; margin-bottom: 10px; }
.bb-actions .btn { width: 100%; }
.bb-why .btn { margin: 6px 6px 6px 0; }
.inv { width: 100%; border-collapse: collapse; margin: 10px 0; }
.inv td, .inv th { padding: 4px 0; text-align: left; } .inv td:last-child, .inv th:last-child { text-align: right; }
.inv th { border-top: 1px solid var(--line); }
.history { grid-column: 1 / -1; margin-top: 10px; }
.bids { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.bids th, .bids td { padding: 9px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: .95rem; }
.bids th { background: #f6f4ef; font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.bids tr.me td { background: #f3faf3; } .bids tr.cancelled td { text-decoration: line-through; color: var(--muted); }
.bids tr.new td { animation: flashrow 2s; }
@keyframes flashrow { from { background: #fff4e0; } }

/* forms */
.form .field { display: block; margin-bottom: 14px; }
.form .field > span, .form legend { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.form input:not([type=checkbox]):not([type=radio]), .form select, .form textarea { width: 100%; font: inherit; padding: 9px 11px; border: 1px solid #cfcbc2; border-radius: 8px; background: #fff; color: var(--ink); }
.form textarea.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; }
.form input:focus, .form select:focus, .form textarea:focus, .bid-form input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form fieldset { border: 0; padding: 0; margin: 0 0 14px; }
.form .radio { display: inline-flex; align-items: center; gap: 6px; margin-right: 18px; }
.form .check { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; font-size: .95rem; } .check input { margin-top: 4px; }
.field em, .check em { display: block; color: var(--err); font-style: normal; font-size: .85rem; margin-top: 3px; }
.field small { display: block; color: var(--muted); font-size: .8rem; margin-top: 3px; }
.has-error input { border-color: var(--err) !important; }
.company-only { display: none; } .form.is-company .company-only { display: grid; }

/* tables and misc */
.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: .95rem; }
.table th, .table td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { background: #f6f4ef; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.table.small { font-size: .85rem; } .table.small td { padding: 6px 8px; }
.table tr.dim td { color: var(--muted); } .table .thumb img { width: 56px; height: 42px; object-fit: cover; border-radius: 4px; }
.table tfoot th { background: #fff; font-size: 1rem; text-transform: none; color: var(--ink); }
.mybids tr.leading td:first-child { box-shadow: inset 4px 0 var(--ok); } .mybids tr.outbid td:first-child { box-shadow: inset 4px 0 var(--err); }
.status-approved, .status-won { color: var(--ok); font-weight: 600; } .status-pending { color: var(--warn); font-weight: 600; } .status-rejected { color: var(--err); font-weight: 600; }
.plain { list-style: none; padding: 0; } .plain li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.notes { list-style: none; padding: 0; } .notes li { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin-bottom: 8px; }
.archive-list { list-style: none; padding: 0; } .archive-list li a { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px 18px; margin-bottom: 8px; color: var(--ink); }
.archive-list li a:hover { border-color: var(--brand); text-decoration: none; }
.prose { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; line-height: 1.65; }
.prose h2 { margin-top: 1.6em; font-size: 1.25rem; } .prose h3 { margin-top: 1.3em; }
.prose table { border-collapse: collapse; } .prose td, .prose th { border: 1px solid var(--line); padding: 4px 10px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 24px; }
.cards .card small { display: block; color: var(--muted); text-transform: uppercase; font-size: .72rem; letter-spacing: .06em; } .cards .card b { font-size: 1.4rem; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 18px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-weight: 600; }
.admin-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.admin-imgs figure { margin: 0; } .admin-imgs img { border-radius: 6px; aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.admin-imgs figcaption { display: flex; gap: 4px; margin-top: 4px; } .admin-imgs form { margin: 0; }
.is-admin main { padding-top: 16px; }

/* footer */
.foot { background: #1f2a2a; color: #cfd8d8; font-size: .9rem; padding: 36px 0 20px; }
.foot a { color: #fff; }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.foot-links { display: flex; flex-direction: column; gap: 6px; }
.foot-copy { display: block; margin-top: 10px; color: #9fb0b0; font-size: .82rem; }

/* toasts and lightbox */
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 50; max-width: min(360px, 90vw); }
.toast { background: #1d1d1b; color: #fff; padding: 12px 16px; border-radius: 10px; box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); font-size: .95rem; animation: toastin .25s; }
.toast.ok { background: var(--ok); } .toast.err { background: var(--err); } .toast a { color: #fff; text-decoration: underline; }
@keyframes toastin { from { transform: translateY(10px); opacity: 0; } }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.9); display: flex; align-items: center; justify-content: center; z-index: 60; cursor: zoom-out; }
.lightbox img { max-width: 96vw; max-height: 94vh; object-fit: contain; }
.lb-close { position: absolute; top: 12px; right: 16px; font-size: 2rem; color: #fff; background: none; border: 0; cursor: pointer; }

@media (max-width: 1000px) {
  .lot-page { grid-template-columns: minmax(0, 1fr) 320px; }
  .lot-page .gallery { grid-column: 1 / -1; max-width: 640px; }
  .hero { grid-template-columns: 1fr; } .hero-art { height: 260px; }
  .catalogue { grid-template-columns: minmax(0, 1fr); } .side { display: none; } .only-narrow { display: flex; }
}
@media (max-width: 760px) {
  .lang { order: 1; margin-left: auto; }
  .burger { display: block; order: 2; }
  .nav, .nav-account { display: none; order: 3; width: 100%; flex-direction: column; align-items: flex-start; gap: 8px; }
  .nav { padding-top: 8px; } .nav-account { order: 4; padding-bottom: 14px; }
  .nav.open, .nav-account.open { display: flex; }
  .top-row { flex-wrap: wrap; gap: 12px; } .logo img { width: 170px; }
  .strip-count { margin-left: 0; }
  .two-col, .about-strip, .form .two { grid-template-columns: 1fr; }
  .lot-page { grid-template-columns: 1fr; } .bid-box { position: static; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .lot-body { padding: 10px; } .lot-price b { font-size: 1.05rem; }
  .prose { padding: 20px; }
  .table { display: block; overflow-x: auto; }
}
