/* Admin area, 2026 redesign ("Option A": navy sidebar). Replaces style.css. */
:root {
	--navy: #1f3a8a;
	--navy-deep: #172b66;
	--navy-line: #2b4389;
	--side-text: #dbe3f7;
	--side-muted: #8193c4;
	--orange: #f7811e;
	--orange-btn: #c2560a;
	--orange-soft: #fff3e6;
	--orange-ink: #a84a06;
	--green: #15803d;
	--green-soft: #e6f4ee;
	--red: #b42318;
	--red-soft: #fdecea;
	--teal: #0f766e;
	--teal-soft: #e6f3f4;
	--blue-soft: #e7ecfa;
	--ground: #f4f6f8;
	--card: #ffffff;
	--line: #e2e6ec;
	--line-soft: #eef1f5;
	--text: #1c2230;
	--muted: #5f6b7a;
	--radius: 14px;
}

* { box-sizing: border-box; }
html, body.adm { margin: 0; padding: 0; }
body.adm { background: var(--ground); color: var(--text); font: 14px/1.5 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; }
body.adm a { color: var(--navy); }
body.adm a:hover { color: var(--navy-deep); }

/* ---------- shell ---------- */
.adm-shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.adm-side { background: var(--navy-deep); color: var(--side-text); padding: 20px 14px; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.adm-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px; text-decoration: none; }
.adm-brand span { display: flex; flex-direction: column; line-height: 1.2; }
.adm-brand b { color: #fff; font-size: 15px; font-weight: 800; }
.adm-brand small { color: #9fb0dc; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.adm-site { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--navy-line); background: var(--navy); }
.adm-site-logo { width: 30px; height: 30px; border-radius: 8px; background: var(--orange); color: var(--text); display: grid; place-items: center; font-weight: 800; font-size: 12px; flex-shrink: 0; }
.adm-site-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.adm-site-name b { color: #fff; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-site-name small { color: #9fb0dc; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-nav { display: flex; flex-direction: column; gap: 1px; }
.adm-nav-h { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--side-muted); padding: 12px 12px 4px; }
body.adm .adm-nav-a { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 10px; color: var(--side-text); text-decoration: none; font-weight: 600; }
body.adm .adm-nav-a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
body.adm .adm-nav-a.on { background: var(--orange); color: var(--text); }
.adm-nav-a span { flex-grow: 1; }
.adm-badge { background: var(--orange); color: var(--text); font-size: 11px; font-weight: 800; border-radius: 999px; padding: 1px 8px; }
.adm-nav-a.on .adm-badge { background: #fff; }
.adm-side-foot { margin-top: auto; border-top: 1px solid var(--navy-line); padding: 14px 8px 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
body.adm .adm-side-foot a { display: flex; align-items: center; gap: 8px; color: var(--side-text); text-decoration: none; }
body.adm .adm-side-foot a:hover { color: #fff; }
.adm-side-foot span { color: var(--side-muted); font-size: 12px; }

.adm-main { display: flex; flex-direction: column; min-width: 0; }
.adm-top { height: 68px; background: var(--card); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 32px; position: sticky; top: 0; z-index: 20; }
.adm-search { display: flex; align-items: center; gap: 8px; background: var(--ground); border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; height: 40px; width: 420px; max-width: 100%; color: var(--muted); }
body.adm .adm-search input { border: 0; background: transparent; font: inherit; flex-grow: 1; outline: none; color: var(--text); padding: 0; height: 38px; box-shadow: none; }
.adm-grow { flex-grow: 1; }
.adm-menu-btn { display: none; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; place-items: center; }
.adm-page { padding: 28px 32px; flex-grow: 1; }
.adm-foot { padding: 16px 32px 24px; color: var(--muted); font-size: 12px; }

/* ---------- buttons ---------- */
body.adm .adm-btn, body.adm input[type=submit], body.adm input[type=button], body.adm button.adm-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px;
	font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; border: 1px solid var(--navy); background: var(--navy); color: #fff; width: auto;
}
body.adm .adm-btn:hover, body.adm input[type=submit]:hover, body.adm input[type=button]:hover { background: var(--navy-deep); color: #fff; }
body.adm .adm-btn.adm-btn-primary, body.adm button.adm-btn-primary { background: var(--orange-btn); border-color: var(--orange-btn); color: #fff; }
body.adm .adm-btn.adm-btn-primary:hover { background: #a84a06; border-color: #a84a06; color: #fff; }
body.adm .adm-btn.adm-btn-ghost, body.adm button.adm-btn-ghost, body.adm input.adm-btn-ghost { background: var(--card); color: var(--text); border-color: var(--line); }
body.adm .adm-btn.adm-btn-ghost:hover, body.adm input.adm-btn-ghost:hover { background: var(--ground); color: var(--text); }
body.adm .adm-btn.adm-btn-ok, body.adm button.adm-btn-ok { background: var(--green); border-color: var(--green); color: #fff; }
body.adm .adm-btn.adm-btn-sm, body.adm button.adm-btn-sm, body.adm input.adm-btn-sm, body.adm summary.adm-btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }

/* ---------- form controls ---------- */
body.adm input[type=text], body.adm input[type=password], body.adm input[type=search], body.adm input[type=email], body.adm input[type=url],
body.adm input:not([type]), body.adm select, body.adm textarea {
	font: inherit; color: var(--text); background: #fff; border: 1px solid #c9d1db; border-radius: 8px; padding: 7px 10px; max-width: 100%; position: static;
}
body.adm input[type=text], body.adm input[type=password], body.adm input:not([type]), body.adm select { min-height: 38px; }
body.adm textarea { min-height: 80px; }
body.adm input:focus, body.adm select:focus, body.adm textarea:focus { outline: 2px solid rgba(31, 58, 138, .25); outline-offset: 1px; border-color: var(--navy); }
body.adm input[type=checkbox], body.adm input[type=radio] { width: 18px; height: 18px; accent-color: var(--navy); vertical-align: middle; position: static; }
body.adm input[type=file] { font: inherit; }

/* "Label: field" rows of the settings forms */
.frow { display: grid; grid-template-columns: minmax(200px, 340px) minmax(0, 1fr); gap: 6px 20px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.frow .flabel { font-weight: 600; color: var(--text); }
.frow .fctl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.frow .fctl input[type=text], .frow .fctl input:not([type]), .frow .fctl textarea { width: min(100%, 480px); }
.frow .fctl input[size="7"], .frow .fctl input[size="3"], .frow .fctl input[size="5"], .frow .fctl input[size="8"] { width: 110px; }

/* ---------- page content (the original pages, restyled) ---------- */
.content { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; color: var(--text); font-size: 14px; }
.content > table, .content table[width="100%"] { width: 100%; border-collapse: collapse; }
.content div[style*="margin-left:20px"], .content div[style*="margin-left: 20px"] { margin-left: 0 !important; }
.content h1 { font-size: 24px; font-weight: 800; margin: 0 0 14px; color: var(--text); }
.content h2 { font-size: 17px; font-weight: 700; margin: 18px 0 10px; color: var(--text); }
.content h3 { font-size: 15px; margin: 14px 0 8px; }
.content b[style*="color:red"], .content b[style*="color: red"], .content h2[style*="color: red"] { color: var(--red) !important; }
.content code { background: var(--ground); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
hr.adm-sep { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.leftdoted { border: 0; }
.clear { clear: both; }
.hiden { display: none; }

/* lists of links (Link Management) */
.navlinks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.navlinks b { display: contents; }
body.adm .navlinks a { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); text-decoration: none; font-weight: 600; }
body.adm .navlinks a[style*="text-decoration:none"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.pages { margin: 12px 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pages a, .pages .bbold { display: inline-flex; min-width: 34px; height: 34px; align-items: center; justify-content: center; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; background: var(--card); }
.pages .bbold { background: var(--navy); color: #fff; border-color: var(--navy); }

.content div[id^="link_"] { border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin: 0 0 16px; background: #fbfcfd; }
.content div[id^="link_"] > a[href^="javascript"], .content div[id^="link_"] > b > a[href^="javascript"], .content div[id^="link_"] > a[href^="disp.php"] {
	display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: #fff; text-decoration: none; font-weight: 700; font-size: 13px; color: var(--text); margin: 0 2px 6px 0;
}
.content div[id^="link_"] > a[href*="ap_link"], .content div[id^="link_"] > b > a[href*="save_ap_link"] { background: var(--green); border-color: var(--green); color: #fff; }
.content div[id^="link_"] > a[href*="del_link"] { color: var(--red); }
.content .link { line-height: 1.9; }
.content .link input.linkinput, .content .link textarea.linkinput { width: min(100%, 640px); }
.content .link select { max-width: 360px; }

/* legacy bits */
.menu2, .container1 { display: none; }
.content table td { vertical-align: top; }
.content .ss { font: inherit; }
.footer { display: none; }

/* ---------- dashboard ---------- */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.dash-head h1 { margin: 0; font-size: 26px; font-weight: 800; }
.dash-head p { margin: 4px 0 0; color: var(--muted); }
.dash-alert { background: var(--red-soft); border: 1px solid #f5b5ae; color: var(--red); border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; font-weight: 600; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--text); }
body.adm a.kpi { color: var(--text); }
body.adm a.kpi:hover { border-color: var(--navy); color: var(--text); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-weight: 600; }
.kpi-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; }
.kpi-ic.or { background: var(--orange-soft); color: var(--orange-ink); }
.kpi-ic.nv { background: var(--blue-soft); color: var(--navy); }
.kpi-ic.gr { background: var(--green-soft); color: var(--green); }
.kpi-ic.tl { background: var(--teal-soft); color: var(--teal); }
.kpi-val { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.kpi-note { font-size: 12px; color: var(--muted); }
/* One-line stat under the tiles: discarded free submissions (2026). */
.kpi-strip { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding: 8px 16px; margin-bottom: 18px; font-size: 14px; }
.kpi-strip-name { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; }
.kpi-strip .kpi-ic { width: 26px; height: 26px; border-radius: 8px; }
.kpi-strip-nums { color: var(--muted); }
.kpi-strip-nums b { color: var(--text); font-weight: 800; }
.kpi-strip .kpi-note { margin-left: auto; }
.kpi-ic.gy { background: #eef1f5; color: var(--muted); }
.kpi-rows { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; font-size: 13px; }
.kpi-rows span { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 4px; }
.kpi-rows i { font-style: normal; color: var(--muted); }
.kpi-rows b { font-weight: 800; }
.kpi-foot { margin-top: auto; }
.kpi-list { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; counter-reset: k; }
.kpi-list li { display: flex; align-items: center; gap: 8px; min-width: 0; counter-increment: k; }
.kpi-list li::before { content: counter(k); width: 18px; height: 18px; flex-shrink: 0; border-radius: 6px; background: var(--line-soft); color: var(--muted); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.kpi-list li.empty { padding: 0; color: var(--muted); }
.kpi-list li.empty::before { display: none; }
.kpi-list a { flex-grow: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); text-decoration: none; }
.kpi-list a:hover { color: var(--navy); text-decoration: underline; }
.kpi-list .pill { font-size: 10px; padding: 1px 6px; }
.kpi-list b { font-weight: 800; flex-shrink: 0; }
.kpi-list b.soon { color: var(--red); }
.kpi-more { margin-top: auto; padding-top: 4px; font-size: 12px; font-weight: 600; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; margin-bottom: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; }
.card-h h2 { margin: 0; font-size: 16px; }
.card-h span, .card-h a { font-size: 13px; }
.chart { display: flex; align-items: flex-end; gap: 12px; height: 200px; border-bottom: 1px solid var(--line); padding: 0 4px; }
.chart .bar { flex: 1 1 0; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; position: relative; }
.chart .bar i { display: block; background: var(--navy); border-radius: 4px 4px 0 0; min-height: 2px; }
.chart .bar em { position: absolute; left: 0; right: 0; text-align: center; font-style: normal; font-size: 11px; color: var(--muted); }
.chart-x { display: flex; gap: 12px; padding: 6px 4px 0; }
.chart-x span { flex: 1 1 0; text-align: center; font-size: 11px; color: var(--muted); }
.chart-empty { color: var(--muted); padding: 70px 0; text-align: center; }
.mini-list { display: flex; flex-direction: column; gap: 10px; }
.mini { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.mini-ic { width: 40px; height: 40px; border-radius: 10px; background: var(--orange-soft); color: var(--orange-ink); display: grid; place-items: center; font-weight: 800; flex-shrink: 0; }
.mini-t { display: flex; flex-direction: column; flex-grow: 1; min-width: 0; }
.mini-t b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-t span { font-size: 12px; color: var(--muted); }
.empty { color: var(--muted); padding: 10px 0; }
.tbl-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; }
.tbl-card .card-h { padding: 16px 20px; margin: 0; border-bottom: 1px solid var(--line); }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; padding: 10px; }
.tbl td { padding: 12px 10px; border-top: 1px solid var(--line-soft); vertical-align: middle; }
.tbl th:first-child, .tbl td:first-child { padding-left: 20px; }
.tbl th:last-child, .tbl td:last-child { padding-right: 20px; text-align: right; }
.tbl .sub { font-size: 12px; color: var(--muted); }
.pill { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 10px; background: var(--line-soft); color: #3d4757; white-space: nowrap; }
.pill.nv { background: var(--blue-soft); color: var(--navy); }
.pill.or { background: var(--orange-soft); color: var(--orange-ink); }
.pill.gr { background: var(--green-soft); color: #166534; }
.dash-facts { display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--muted); font-size: 13px; }
.dash-facts b { color: var(--text); }

/* ---------- login ---------- */
body.adm-login { min-height: 100vh; display: grid; place-items: center; background: var(--navy-deep); padding: 24px; }
.login-card { background: var(--card); border-radius: 18px; padding: 32px; width: 100%; max-width: 400px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.login-card .adm-brand b { color: var(--text); }
.login-card .adm-brand small { color: var(--muted); }
.login-card h1 { font-size: 22px; margin: 22px 0 4px; }
.login-card p { color: var(--muted); margin: 0 0 20px; }
.login-card label { display: block; font-weight: 600; margin: 0 0 14px; }
body.adm .login-card input[type=text], body.adm .login-card input[type=password] { display: block; width: 100%; margin-top: 6px; height: 44px; }
body.adm .login-card input[type=submit] { width: 100%; height: 46px; background: var(--orange-btn); border-color: var(--orange-btn); margin-top: 6px; }
.login-err { background: var(--red-soft); color: var(--red); border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; font-weight: 600; }
.login-links { display: flex; justify-content: space-between; margin-top: 18px; font-size: 13px; }

/* ---------- small screens ---------- */
@media (max-width: 1100px) {
	.kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
	.adm-shell { grid-template-columns: 1fr; }
	.adm-side { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
	.adm-side.open { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .4); }
	.adm-menu-btn { display: grid; }
	.adm-top { padding: 0 16px; }
	.adm-search { width: auto; flex-grow: 1; }
	.adm-hide-sm { display: none !important; }
	.adm-page { padding: 16px; }
	.content { padding: 16px; }
	.frow { grid-template-columns: 1fr; }
	.tbl .hide-sm { display: none; }
}
@media (max-width: 560px) {
	.kpis { grid-template-columns: 1fr; }
	.adm-top .adm-btn-primary { padding: 0 12px; }
}

/* ---------- messages (saved / error / warning) ---------- */
.msg-ok, .msg-err, .msg-warn { display: flex; align-items: flex-start; gap: 10px; border-radius: 12px; padding: 12px 16px; margin: 0 0 18px; border: 1px solid; font-size: 14px; }
.msg-ok { background: var(--green-soft); border-color: #a7d7bd; color: #14532d; }
.msg-ok svg { flex-shrink: 0; margin-top: 1px; color: var(--green); }
.msg-err { background: var(--red-soft); border-color: #f5b5ae; color: var(--red); font-weight: 600; }
.msg-warn { display: block; background: #fff8e1; border-color: #f0d78c; color: #7a5300; }

/* field help, errors and stacked controls (Add listing) */
.fctl-stack { flex-direction: column; align-items: flex-start !important; }
.fctl-stack label { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.fhelp { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.ferr { display: block; width: 100%; color: var(--red); font-size: 13px; font-weight: 600; }
.fctl textarea { width: min(100%, 480px); }
.fctl select { max-width: min(100%, 480px); }
.fsubmit { padding: 20px 0 4px; }

/* wide old content (long category names in drop-downs, big tables) scrolls inside its card instead of widening the page */
.adm-page { min-width: 0; }
.content { overflow-x: auto; }
body.adm select { max-width: 100%; }

/* ---------- Listings table (listings.php) ---------- */
.lst-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
body.adm .lst-tabs a { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); text-decoration: none; font-weight: 600; }
.lst-tabs a b { font-size: 12px; background: var(--line-soft); border-radius: 999px; padding: 0 7px; }
body.adm .lst-tabs a.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.lst-tabs a.on b { background: rgba(255, 255, 255, .2); }
.lst-filter { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin: 0 0 14px; }
.lst-filter label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.lst-filter .lst-q { flex: 1 1 260px; }
body.adm .lst-filter .lst-q input { width: 100%; }
.lst-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.lst-all { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.lst-range { margin-left: auto; color: var(--muted); font-size: 13px; }
.tbl.lst td { vertical-align: top; }
.lst-cb { width: 34px; }
.tbl.lst td.lst-cb { padding-right: 0; }
.lst-main { min-width: 220px; }
body.adm a.lst-title { font-weight: 700; color: var(--text); text-decoration: none; }
body.adm a.lst-title:hover { color: var(--navy); text-decoration: underline; }
.lst-main .sub a { color: var(--muted); text-decoration: none; }
.lst-act { white-space: nowrap; }
.tbl.lst td.lst-act { text-align: right; }
.lst-act .adm-btn { margin-left: 4px; }
.lst-more { display: inline-block; position: relative; margin-left: 4px; }
.lst-more summary { list-style: none; }
.lst-more summary::-webkit-details-marker { display: none; }
.lst-menu { position: absolute; right: 0; top: 36px; z-index: 30; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(23, 43, 102, .15); padding: 6px; min-width: 200px; display: flex; flex-direction: column; text-align: left; }
body.adm .lst-menu a, body.adm .lst-menu button { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none; font: inherit; color: var(--text); text-decoration: none; border-radius: 6px; cursor: pointer; height: auto; }
body.adm .lst-menu a:hover, body.adm .lst-menu button:hover { background: var(--ground); color: var(--text); }
body.adm .lst-menu .lst-del { color: var(--red); }
.lst-qe td { background: #fbfcfd; }
.lst-qe-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; text-align: left; }
.lst-qe-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
body.adm .lst-qe-grid input, body.adm .lst-qe-grid textarea { width: 100%; }
.lst-qe-wide { grid-column: 1 / -1; }
.lst-qe-btns { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lst-qe-btns a { margin-left: auto; font-size: 13px; }
.lst-pages { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; margin: 4px 0 18px; }
body.adm .lst-pages a { display: inline-flex; min-width: 38px; height: 38px; align-items: center; justify-content: center; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); text-decoration: none; font-weight: 600; }
body.adm .lst-pages a.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.lst-pages span { color: var(--muted); padding: 0 4px; }
.pill.rd { background: var(--red-soft); color: var(--red); }
@media (max-width: 900px) {
	.lst-act { white-space: normal; }
	.lst-qe-grid { grid-template-columns: 1fr; }
}
body.adm .adm-btn.adm-btn-ok:hover { background: #166534; border-color: #166534; }

/* tables with a "..." menu: let the menu show outside the card */
.tbl-card.tbl-menu-ok { overflow: visible; }
.tbl-card.tbl-menu-ok .tbl tr:last-child td { border-bottom: 0; }
.lst-more[open] summary { background: var(--ground); }

/* E-mail template editor */
.mt-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.mt-field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; margin: 0 0 16px; }
body.adm .mt-field input[type=text], body.adm .mt-field textarea { width: 100%; font-weight: 400; }
body.adm .mt-field textarea { min-height: 320px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; line-height: 1.55; }
.mt-field .fhelp { font-weight: 400; }
.mt-help { background: var(--ground); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; font-size: 13px; }
.mt-help h3 { margin: 0 0 8px; font-size: 14px; }
.mt-help h3 + .mt-sec, .mt-help dl + h3 { margin-top: 14px; }
.mt-sec { margin: 10px 0 4px; color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: .05em; }
.mt-help dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; }
.mt-help dt { font-family: ui-monospace, Consolas, monospace; color: var(--navy); white-space: nowrap; }
.mt-help dd { margin: 0; color: var(--text); }
@media (max-width: 1100px) { .mt-grid { grid-template-columns: 1fr; } }
.mt-help dl.mt-fmt { grid-template-columns: 1fr; gap: 0; }
.mt-help dl.mt-fmt dt { white-space: normal; margin-top: 8px; }
.mt-help dl.mt-fmt dd { color: var(--muted); }

/* page address field (Listings quick edit, listing details) */
.lst-addr { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; font-weight: 400; color: var(--muted); }
body.adm .lst-addr input { width: 320px; max-width: 100%; color: var(--text); }
.lst-slug-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0; }

/* settings section headings */
.opt-h { font-size: 17px; margin: 26px 0 4px; }
/* A section of a long settings page (Listing submission > Listing expiry, Prices & payments): a band to see where it starts. */
.content h1.sec-band { margin: 34px 0 16px; padding: 12px 16px; background: var(--blue-soft); border-left: 5px solid var(--navy); border-radius: 10px; font-size: 21px; color: var(--navy-deep); scroll-margin-top: 90px; }
.content h1.sec-band small { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-top: 2px; }
.content h1.sec-band:target { background: var(--orange-soft); border-left-color: var(--orange); }
.opt-h small { font-weight: 400; color: var(--muted); font-size: 13px; }

/* articles (2026) */
.art-row { display: flex; align-items: center; gap: 10px; }
.art-thumb { width: 56px; height: 38px; object-fit: cover; border-radius: 6px; flex: none; }
.ae-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.ae-card { padding: 16px 18px; overflow: visible; }
.ae-card h2 { font-size: 15px; margin: 0 0 10px; }
.ae-field { display: flex; flex-direction: column; gap: 5px; margin: 0 0 14px; font-weight: 600; }
.ae-field > span:first-child small { font-weight: 400; }
body.adm .ae-field input[type=text], body.adm .ae-field input[type=datetime-local], body.adm .ae-field textarea, body.adm .ae-field select, body.adm .ae-card > select, body.adm .ae-card > input[type=text] { width: 100%; max-width: none; font-weight: 400; }
body.adm .ae-field .lst-addr input { width: 320px; }
body.adm input.ae-title { font-size: 20px; padding: 10px 12px; }
body.adm textarea.ae-body { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; line-height: 1.5; }
.ae-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.ae-check { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 10px; font-weight: 500; }
.ae-check input { margin-top: 3px; }
.ae-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.ae-img { display: block; width: 100%; height: auto; border-radius: 8px; margin: 0 0 8px; }
.ae-side input[type=file] { max-width: 100%; margin: 4px 0; }
@media (max-width: 1100px) { .ae-grid { grid-template-columns: 1fr; } .ae-two { grid-template-columns: 1fr; } }

/* news desk (2026) */
.nd-card { padding: 18px 20px; overflow: visible; }
.nd-card h2, .nd-sec-head h2 { font-size: 16px; margin: 0 0 8px; }
.nd-sec-head { padding: 14px 18px 4px; }
.nd-sec-top { margin: 0 0 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kpi-val.nd-small { font-size: 20px; }
.nd-run-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.nd-run-head .fhelp { max-width: 640px; }
.nd-run-btns { display: flex; gap: 8px; align-items: center; }
.nd-ptext { font-weight: 600; margin: 14px 0 8px; }
.nd-bar { height: 8px; background: var(--line-soft); border-radius: 999px; overflow: hidden; margin-bottom: 12px; }
.nd-bar span { display: block; height: 100%; width: 0; background: var(--navy); border-radius: 999px; transition: width .3s; }
.nd-made { margin: 0 0 10px; padding-left: 18px; }
.nd-made li { margin-bottom: 4px; }
.nd-log { white-space: pre-wrap; font: 12px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; background: var(--ground); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; max-height: 320px; overflow: auto; margin: 6px 0 0; }
.nd-runlog summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.nd-steps { padding-left: 20px; margin: 8px 0; }
.nd-steps li { margin-bottom: 12px; }
.nd-copy { display: flex; align-items: center; gap: 8px; margin: 6px 0 4px; flex-wrap: wrap; }
.nd-copy code { background: var(--ground); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; font-size: 12px; word-break: break-all; }
.nd-inline { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0; }
.nd-rename input[type=text] { width: 220px; max-width: 100%; }
.nd-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 12px; }
body.adm #nd-cats { width: 100%; max-width: none; font-weight: 400; }
.nd-sugg { margin-top: 12px; }
.nd-sugg summary { cursor: pointer; font-weight: 600; }
.nd-sugg ul, .nd-preview { list-style: none; padding: 0; margin: 10px 0; }
.nd-sugg li, .nd-preview li { margin-bottom: 8px; }
.nd-big { font-size: 15px; font-weight: 700; }
#schedule p { margin: 0 0 8px; }
/* phones: the top bar's Add listing button shows only its + icon; long feed addresses wrap */
@media (max-width: 520px) {
	.adm-top .adm-top-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	.adm-top { padding: 0 12px; }
	.adm-search { min-width: 0; }
}
.nd-card .sub, .tbl .sub { overflow-wrap: anywhere; }
@media (max-width: 520px) {
	.tbl.nd-stack thead { display: none; }
	.tbl.nd-stack tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
	.tbl.nd-stack td { display: block; border: 0; padding: 4px 16px; }
	.tbl.nd-stack td.hide-sm { display: none; }
	.nd-rename input[type=text] { width: 100%; }
}
/* phones: listings / business pages / articles tables stack each row (checkbox on the left, cells below each other);
   the card keeps overflow visible, so the "..." menu opens across the actions cell instead of scrolling the table */
@media (max-width: 520px) {
	.tbl.lst, .tbl.lst tbody { display: block; }
	.tbl.lst thead { display: none; }
	.tbl.lst tr { display: grid; grid-template-columns: 44px minmax(0, 1fr); border-top: 1px solid var(--line-soft); padding: 8px 0; }
	.tbl.lst tr.lst-qe { display: block; border-top: 0; padding-top: 0; }
	.tbl.lst tr[hidden] { display: none; }
	.tbl.lst td { display: block; grid-column: 2; border: 0; padding: 4px 16px 4px 0; text-align: left; }
	.tbl.lst td.lst-cb { grid-column: 1; grid-row: 1 / span 10; width: auto; padding: 4px 0 0 16px; }
	.tbl.lst td.hide-sm { display: none; }
	.tbl.lst tr.lst-qe td { padding: 8px 16px; }
	.lst-main { min-width: 0; }
	.tbl.lst td.lst-act { position: relative; text-align: left; white-space: normal; display: flex; flex-wrap: wrap; gap: 6px; }
	.lst-act .adm-btn, .lst-more { margin-left: 0; }
	.lst-more { position: static; }
	.lst-menu { left: 0; right: 16px; top: calc(100% - 2px); min-width: 0; }
}
/* key fields: plain text so browsers do not fill in saved passwords */
body.adm input.nd-key { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; width: min(100%, 420px); }
/* API keys (2026) */
.ak-reveal { border-color: var(--orange); }
.ak-reveal .nd-copy code { font-size: 14px; padding: 8px 12px; }
.ak-perms { margin: 4px 0 10px; }
.ak-perms summary { cursor: pointer; color: var(--navy); font-weight: 600; margin-bottom: 8px; }
.ak-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 18px; }
.ak-off { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 18px; }
.ak-pre { white-space: pre-wrap; word-break: break-word; font-size: 12px; background: var(--ground); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 6px 0 0; max-width: 70ch; }
/* Updates and templates (2026) */
.up-new { border: 1px solid var(--orange); background: var(--orange-soft); border-radius: 12px; padding: 12px 16px; margin: 0 0 12px; }
.up-new p { margin: 0 0 8px; }
.up-notes { font-size: 13px; color: var(--text); margin: 0 0 10px; max-width: 75ch; }
.tp-h { font-size: 17px; margin: 6px 0 12px; }
.tp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.tp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin: 0 0 22px; }
.tp-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.tp-card.on { border-color: var(--green); box-shadow: 0 0 0 2px var(--green-soft); }
.tp-shot { aspect-ratio: 16 / 10; background: var(--blue-soft); display: grid; place-items: center; overflow: hidden; max-width: 100%; }
.tp-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tp-shot span { font-weight: 800; font-size: 20px; color: var(--navy); padding: 12px; text-align: center; }
.tp-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.tp-body h3 { margin: 0; font-size: 16px; }
.tp-body p { margin: 0; }
.tp-body form { margin-top: auto; padding-top: 8px; align-items: center; }
.tp-use { margin: 0; font-size: 13px; }
