/* lazer.lv admin: desktop-first, the site's ink colour as the accent. */
:root {
  --ink: #253850; --ink-2: #3b5070; --bg: #f4f6f9; --card: #fff; --line: #dde2ea; --muted: #6b7686;
  --warn: #b25e00; --warn-bg: #fff4e5; --danger: #c62828; --ok: #1a7f37; --ok-bg: #e8f5ec;
  --st-new: #1565c0; --st-called: #b25e00; --st-booked: #1a7f37; --st-declined: #6b7686;
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: #1d2733;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
a { color: var(--ink-2); }
h1 { font-size: 24px; margin: 0 0 16px; color: var(--ink); }
h2 { font-size: 17px; margin: 0 0 12px; color: var(--ink); }
small { color: var(--muted); }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-wrap; margin: 0; }
.inline { display: inline; margin: 0; }
[hidden] { display: none !important; }

.top { display: flex; align-items: center; gap: 28px; padding: 0 28px; height: 56px; background: var(--ink); color: #fff; }
.brand { color: #fff; font-weight: 700; text-decoration: none; font-size: 17px; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { color: #d6deea; text-decoration: none; padding: 8px 14px; border-radius: 6px; }
.nav a:hover, .nav a.on { background: rgba(255, 255, 255, .12); color: #fff; }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 10px; background: #e53935;
  color: #fff; font-size: 12px; line-height: 20px; text-align: center; font-weight: 700; }
.who { display: flex; align-items: center; gap: 14px; color: #d6deea; }
.who select { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .3); border-radius: 6px; padding: 4px 6px; }
.who select option { color: #000; }
.who .link { color: #d6deea; }

.page { max-width: 1280px; margin: 0 auto; padding: 28px; }
.narrow { max-width: 440px; margin: 72px auto; padding: 0 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; margin-bottom: 20px; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.head h1 { margin: 0; }
.cols { display: grid; grid-template-columns: 1fr 300px; gap: 20px; }
.cols .card { margin-bottom: 0; }
.cols + .card { margin-top: 20px; }

label { display: block; font-weight: 600; color: var(--ink); }
input, select, textarea, button { font: inherit; }
input:not([type=hidden]), select, textarea { display: block; width: 100%; margin-top: 6px; padding: 8px 10px;
  border: 1px solid #c3cbd6; border-radius: 6px; background: #fff; font-weight: 400; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ink-2); outline-offset: 0; border-color: var(--ink-2); }
input[readonly] { background: var(--bg); }
.stack { display: grid; gap: 14px; }
.stack small { display: block; font-weight: 400; margin-top: 4px; }
button { padding: 8px 16px; border: 1px solid #c3cbd6; border-radius: 6px; background: #fff; color: var(--ink); cursor: pointer; }
button:hover { border-color: var(--ink-2); }
button.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
button.primary:hover { background: var(--ink-2); }
button.link { border: 0; background: none; padding: 0; text-decoration: underline; color: var(--ink-2); }
button.danger, .danger { color: var(--danger); }
button:disabled { opacity: .55; cursor: default; }

.error { color: var(--danger); background: #fdecec; padding: 10px 12px; border-radius: 6px; }
.notice { padding: 10px 14px; border-radius: 6px; background: #e9eef6; }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.notice.ok { background: var(--ok-bg); color: var(--ok); }
.ok { color: var(--ok); }
.langs { display: flex; gap: 10px; margin: -6px 0 14px; }
.langs a { text-decoration: none; color: var(--muted); }
.langs a.on { color: var(--ink); font-weight: 700; }
.qr { display: flex; justify-content: center; margin: 12px 0; }
.qr svg { width: 220px; height: 220px; }
.secret { display: block; margin: 8px 0 16px; word-break: break-all; font-size: 14px; }
details { margin-bottom: 14px; }

.tabs { display: flex; gap: 6px; margin: 16px 0 12px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 8px 14px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.tabs a.warn .n { background: var(--warn-bg); color: var(--warn); }
.tabs .n { display: inline-block; padding: 0 7px; border-radius: 10px; background: #e9eef6; font-size: 12px; }
.filters { display: flex; gap: 10px; margin-bottom: 14px; }
.filters select { width: 200px; margin: 0; }
.filters input { width: 360px; margin: 0; }
.exports a { margin-left: 10px; }

table.list { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.list th, .list td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.list th { background: #eef1f5; font-size: 13px; color: var(--muted); font-weight: 600; }
.list tbody tr[data-href] { cursor: pointer; }
.list tbody tr:hover { background: #f8fafc; }
.list tr.unseen td { font-weight: 700; }
.list tr.unseen td:first-child { box-shadow: inset 3px 0 0 var(--st-new); }
.list tr.expired td { background: var(--warn-bg); }
.list tr.warn td { color: var(--warn); }
.empty { padding: 40px; text-align: center; color: var(--muted); background: var(--card); border: 1px dashed var(--line); border-radius: 10px; }
.pager { display: flex; gap: 16px; justify-content: center; margin-top: 16px; }

.st { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 13px; font-weight: 600; color: #fff; }
.st-new { background: var(--st-new); }
.st-called { background: var(--st-called); }
.st-booked { background: var(--st-booked); }
.st-declined { background: var(--st-declined); }
.statuses { display: grid; gap: 8px; }
.st-btn { width: 100%; text-align: left; background: #fff; color: var(--ink); }
.st-btn.on { color: #fff; }
.st-btn.st-new, .st-btn.st-called, .st-btn.st-booked, .st-btn.st-declined { background: #fff; }
.st-btn.on.st-new { background: var(--st-new); border-color: var(--st-new); }
.st-btn.on.st-called { background: var(--st-called); border-color: var(--st-called); }
.st-btn.on.st-booked { background: var(--st-booked); border-color: var(--st-booked); }
.st-btn.on.st-declined { background: var(--st-declined); border-color: var(--st-declined); }
.danger-zone { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }

dl.fields { display: grid; grid-template-columns: 160px 1fr; gap: 10px 16px; margin: 0; }
dl.fields dt { color: var(--muted); }
dl.fields dd { margin: 0; }
.note { padding: 10px 0; border-bottom: 1px solid var(--line); }
.note:last-of-type { margin-bottom: 14px; }

/* forms on wide pages: readable field widths, buttons sized to their text */
.page .stack { max-width: 640px; }
.page .stack > button { justify-self: start; }

/* content editing */
.page.wide { max-width: 1600px; }
.mt { margin-top: 20px; }
.small, .notice.small { font-size: 13px; }
h3 { font-size: 14px; margin: 0; color: var(--muted); letter-spacing: .04em; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.grid2 h2 + ul { margin-bottom: 18px; }
ul.links { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 6px; }
ul.links small { display: block; }
.badge.draft { background: #e7a23a; }
.badge.warnb { background: var(--warn); font-weight: 600; }
.badge.muteb { background: var(--st-declined); }
.badge.okb { background: var(--ok); }
.langcols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: start; }
.page .langcols .stack { max-width: none; }
.langcols textarea { margin-top: 0; resize: vertical; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 18px 0; }
.actions .tr { display: inline-flex; align-items: center; gap: 6px; }
.actions .tr select { width: auto; margin: 0; }
label.check { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; }
label.check input { width: auto; margin: 0; }
.thumbcell { width: 64px; }
img.thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; display: block; }
tr.is-hidden td { opacity: .6; }
.imgfield { display: flex; gap: 20px; align-items: flex-start; }
.preview-img { width: 220px; height: 220px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.btnlink { display: inline-block; padding: 8px 16px; border: 1px solid #c3cbd6; border-radius: 6px; background: #fff;
  color: var(--ink); text-decoration: none; }
.btnlink.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.head > div { display: flex; gap: 10px; align-items: center; }
table.prices td { vertical-align: top; }
table.prices input, table.prices textarea { margin-top: 2px; }
table.prices .names { min-width: 380px; }
table.prices .next { min-width: 170px; background: #fafbfc; }
.w-nr { width: 56px !important; }
.w-p { width: 90px !important; }
.draft-card.conflict { border-color: var(--warn); }
table.diff { width: 100%; border-collapse: collapse; font-size: 14px; }
.diff td { padding: 6px 8px; border-top: 1px solid var(--line); vertical-align: top; }
.diff .dpath { color: var(--muted); width: 18%; word-break: break-all; }
.diff .dold { background: #fdecec; width: 41%; text-decoration: line-through; text-decoration-color: rgba(198, 40, 40, .4); }
.diff .dnew { background: var(--ok-bg); width: 41%; }
pre.small { font-size: 12px; max-height: 300px; overflow: auto; background: var(--bg); padding: 10px; }

/* news editor */
.default-submit { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.block-card .head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.block-card .head h3 { margin: 0; }
.block-card .head button { padding: 2px 10px; }
.add-blocks { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0 24px; }
.links-table input { width: 100%; }
label.w-date { display: inline-block; width: 200px; }
.row-fields { display: flex; gap: 24px; align-items: flex-end; flex-wrap: wrap; }
.preview-img.small-img { width: 120px; height: 120px; object-fit: cover; }
label.check.big { font-size: 17px; font-weight: 600; }
.preview-img.small-img { width: 120px; height: 120px; object-fit: cover; }
label.check.big { font-size: 17px; font-weight: 600; }
