/* espressonews.bg admin panel (ported from storiesweneed.com, 2026-09-15)
   Original header:
   storiesweneed.com admin panel — visual layer v2 (2026-09-12).
   Replaces the 2011 Althea.CMS skin. Same design tokens as the public site. */

:root {
  --paper: #f4f2ef; --card: #fff; --ink: #16191c; --body: #272b2e; --muted: #6b7074;
  --rule: #e3e0db; --rule-soft: #eeece8; --accent: #d2373a; --accent-dark: #a8292c; --accent-soft: #fbecec;
  --sage: #6f8f3a; --sage-soft: #eef3e3; --danger: #b3261e; --danger-soft: #fbe9e7; --amber: #b7791f; --amber-soft: #fdf3e1;
  --side: #16191c; --side-text: #ccd0d3; --side-active: #262b30;
  --sans: "Roboto", Arial, sans-serif; --serif: "Playfair Display", Georgia, serif;
  --shadow: 0 1px 2px rgba(31,35,38,.04), 0 8px 24px rgba(31,35,38,.06);
  --radius: 12px;
}
*, *:before, *:after { box-sizing: border-box; }
html { font-size: 15px; }
body { margin: 0; background: var(--paper); color: var(--body); font-family: var(--sans); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
h1, h2, h3, h4 { color: var(--ink); margin: 0 0 12px; line-height: 1.2; }
h1.lead-heading, h3.lead-heading { font-family: var(--serif); font-size: 26px; font-weight: 700; margin: 0 0 20px; }
p { margin: 0 0 12px; }
img { max-width: 100%; }
.clear, .clearfix:after { clear: both; }
.clearfix:after { content: ""; display: table; }
hr, hr.brake { border: 0; border-top: 1px solid var(--rule); margin: 22px 0; }

/* ---------- shell ---------- */
.adm { display: flex; min-height: 100vh; }
.adm-side { width: 236px; flex: none; background: var(--side); color: var(--side-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.adm-brand { display: flex; align-items: center; gap: 12px; padding: 20px 20px 18px; border-bottom: 1px solid rgba(255,255,255,.08); color: #fff; }
/* the Espresso wordmark is wide, not a square mark */
.adm-brand img { width: auto; height: 34px; border-radius: 6px; background: #fff; padding: 3px 6px; flex: none; }
.adm-brand b { font-family: var(--serif); font-size: 17px; font-weight: 700; display: block; line-height: 1.15; }
.adm-brand small { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--side-text); opacity: .7; }
.adm-nav { list-style: none; margin: 0; padding: 14px 12px; flex: 1; overflow-y: auto; }
.adm-nav li a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: var(--side-text); font-size: 14px; font-weight: 500; }
.adm-nav li a svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.adm-nav li a:hover { background: var(--side-active); color: #fff; }
.adm-nav li a.active { background: var(--accent); color: #fff; }
.adm-nav li.sep { margin: 10px 12px 6px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--side-text); opacity: .5; }
.adm-side-foot { padding: 14px 20px 18px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12.5px; }
.adm-side-foot a { color: var(--side-text); }
.adm-side-foot a:hover { color: #fff; }
.adm-side-foot .who { color: #fff; font-weight: 500; display: block; margin-bottom: 4px; }
.adm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.adm-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 32px; background: var(--card); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 20; }
.adm-top .crumbs { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.adm-top .crumbs a { color: var(--muted); }
.adm-top .crumbs a.active, .adm-top .crumbs a:hover { color: var(--ink); }
.adm-top .crumbs li + li:before { content: "/"; color: var(--rule); margin-right: 8px; }
.adm-top .crumbs ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.adm-top-actions { display: flex; align-items: center; gap: 10px; }
.adm-content { padding: 28px 32px 60px; max-width: 1280px; width: 100%; }
#subnav-con { display: contents; }
#sub-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.adm-footer { padding: 18px 32px; color: var(--muted); font-size: 12.5px; border-top: 1px solid var(--rule); margin-top: auto; }
#menu-toggle { display: none; }

/* ---------- buttons & inputs ---------- */
.btn, a.submit, .buttons a.submit, input[type=submit], input[type=button], button, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 18px;
  border-radius: 999px; border: 1px solid transparent; font: 500 14px var(--sans); cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, border-color .15s;
}
.btn, a.submit, .buttons a.submit, input[type=submit], button.primary { background: var(--accent); color: #fff; }
.btn:hover, a.submit:hover, input[type=submit]:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost, input[type=button], button, .btn.ghost { background: var(--card); color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover, input[type=button]:hover, button:hover, .btn.ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn.sm { height: 32px; padding: 0 14px; font-size: 13px; }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
label { display: block; font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
label em { color: var(--accent); font-style: normal; }
label a { color: inherit; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=date], input[type=time], textarea, select {
  width: 100%; font: 400 15px var(--sans); color: var(--ink); background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 9px 12px; outline: none; transition: border-color .15s, box-shadow .15s;
}
input[type=text]:focus, input[type=password]:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input.error, select.error, textarea.error { border-color: var(--danger); }
select { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%236d7275' stroke-width='1.8' stroke-linecap='round'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; }
input.large, input.medium, input.short, select.medium { width: 100%; }
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); vertical-align: -3px; margin: 0 6px 0 0; }
.field { margin-bottom: 18px; }
.field .field-right { width: 100%; }
.field label[style] { float: none !important; }
.field p.text-highlight { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }
.field .support { font-size: 13px; }
/* date selects */
.field select[id*="attrStartDate"], .field select[id*="attrEndDate"] { width: auto; display: inline-block; margin: 0 4px 6px 0; padding-right: 30px; }
/* keywords */
#keywordsStock { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; margin-bottom: 8px; }
.key_del, .key_add { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 13px; cursor: pointer; }
.key_del { background: var(--accent-soft); color: var(--accent-dark); }
.key_del:after { content: "×"; font-weight: 700; }
.key_del:hover { background: var(--danger-soft); color: var(--danger); }
.key_add { background: var(--sage-soft); color: var(--sage); }
.key_add:before { content: "+"; font-weight: 700; }
#fk { display: none; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
#fk[style*="block"] { display: flex !important; }
input#keyword { width: auto; min-width: 240px; display: inline-block; margin-right: 6px; }
/* tag checkboxes (Editor's choice / slider) */
table.tags-table td, .tags-block td { padding: 4px 10px 4px 0; font-size: 14px; }
.tags-block h3 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; font-family: var(--sans); }
.tags-block table { margin: 0; }
.tags-block td.label_checkbox { padding-right: 24px; }

/* ---------- cards ---------- */
.card, fieldset.drop-shadow, .box.drop-shadow { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin: 0 0 24px; }
fieldset { min-width: 0; }
.card h2, .card-title { font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; margin: 0 0 16px; }
.card-title .count { color: var(--ink); background: var(--paper); padding: 2px 8px; border-radius: 999px; margin-left: 6px; font-size: 12px; }

/* ---------- alerts ---------- */
.backend-msg, .msg, .error-msg, div.error { padding: 12px 16px; border-radius: 10px; margin: 0 0 20px; font-size: 14px; background: var(--amber-soft); color: #7a4f10; }
.error-msg, div.error { background: var(--danger-soft); color: var(--danger); }
.msg.ok, .success-msg { background: var(--sage-soft); color: var(--sage); }

/* ---------- dashboard ---------- */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.dash-head p { color: var(--muted); margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.stat b { display: block; font-family: var(--serif); font-size: 30px; color: var(--ink); line-height: 1.1; }
.stat span { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.shortcuts { display: grid; gap: 10px; }
.shortcuts a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 10px; color: var(--ink); background: var(--card); }
.shortcuts a:hover { border-color: var(--accent); color: var(--accent); }
.shortcuts a svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- lists / tables ---------- */
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.list-head form { display: flex; gap: 8px; align-items: center; flex: 1; max-width: 520px; }
.list-head form input[type=text] { flex: 1; }
.list-filters { display: flex; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.list-filters a, .chip { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--rule); color: var(--ink); font-size: 13px; }
.list-filters a:hover, .list-filters a.on { border-color: var(--accent); color: var(--accent); }
.list-note { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.table-list { width: 100%; }
.table-list .row.lead { display: none; }
ul.mainList { list-style: none; margin: 0; padding: 0; }
ul.mainList > li { border-top: 1px solid var(--rule-soft); }
ul.mainList > li:first-child { border-top: none; }
ul.mainList .row { display: flex; align-items: center; gap: 14px; padding: 12px 6px; }
ul.mainList .row:hover, ul.mainList .row.hover { background: var(--paper); }
ul.mainList .col-aa { flex: none; }
ul.mainList .col-aa img { width: 16px; height: 16px; opacity: .55; }
ul.mainList .col-a { flex: 1; min-width: 0; font-size: 15px; }
ul.mainList .col-a a { color: var(--ink); font-weight: 500; }
ul.mainList .col-a a:hover { color: var(--accent); }
ul.mainList .col-f { flex: none; width: 34px; display: flex; justify-content: center; }
ul.mainList .col-f a { display: inline-block; width: 30px; height: 30px; border-radius: 8px; background-repeat: no-repeat; background-position: center; opacity: .6; }
ul.mainList .col-f a:hover { background-color: var(--paper); opacity: 1; }
ul.mainList a.del, ul.mainList a.nodel { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b3261e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 6h18M8 6V4h8v2M6 6l1 14h10l1-14'/></svg>"); }
ul.mainList a.edit { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231f2326' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 20h9M16.5 3.5a2.1 2.1 0 013 3L7 19l-4 1 1-4z'/></svg>"); }
ul.mainList a.moveup { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236d7275' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 19V5M5 12l7-7 7 7'/></svg>"); }
ul.mainList a.movedown { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236d7275' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 5v14M19 12l-7 7-7-7'/></svg>"); }
ul.mainList .col-f.move { width: 64px; gap: 2px; }
ul.mainList a.status { width: auto; height: 26px; padding: 0 10px 0 22px; border-radius: 999px; background: var(--sage-soft); color: var(--sage); font-size: 12px; font-weight: 600; line-height: 26px; opacity: 1; position: relative; }
ul.mainList a.status:before { content: ""; position: absolute; left: 9px; top: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--sage); }
ul.mainList a.status:after { content: "Показана"; }
ul.mainList a.status.offline { background: var(--paper); color: var(--muted); }
ul.mainList a.status.offline:before { background: #b9b3a8; }
ul.mainList a.status.offline:after { content: "Скрита"; }
ul.mainList .col-f.st { width: 84px; }
ul.mainList .thumb { flex: none; width: 56px; height: 40px; border-radius: 6px; background: var(--paper) center/cover no-repeat; overflow: hidden; }
ul.mainList .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
ul.mainList .meta { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
ul.mainList .meta .tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; margin-left: 6px; }
ul.mainList .meta .tag.choice { background: var(--accent-soft); color: var(--accent-dark); }
ul.mainList .meta .tag.slider { background: var(--sage-soft); color: var(--sage); }
ul.mainList .ui-state-highlight { height: 48px; background: var(--accent-soft); border-radius: 8px; }
.buttons { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 16px; }
.buttons ul.actions { list-style: none; margin: 0 0 0 auto; padding: 0; display: flex; gap: 14px; font-size: 13px; }
.buttons ul.actions a { color: var(--muted); }
.buttons ul.actions a:hover, .buttons ul.actions a.delete-all { color: var(--danger); }
fieldset > .buttons:last-child { margin: 16px 0 0; }
.pages { display: flex; gap: 6px; margin: 0 0 18px; }
.pages a, .pages span, .pages li { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--rule); background: var(--card); color: var(--ink); font-size: 13px; }
.pages a:hover { border-color: var(--accent); color: var(--accent); }
.pages .active, .pages span.current, .pages a.selected { background: var(--accent); color: #fff; border-color: var(--accent); }
.pages ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }

/* ---------- editor ---------- */
.ed-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.ed-head h1 { margin: 0; }
.ed-head .ed-actions { display: flex; gap: 10px; align-items: center; }
.ed-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.ed-main .card, .ed-side .card { margin-bottom: 20px; }
.ed-side { position: sticky; top: 76px; }
.ed-title input { font-family: var(--serif); font-size: 26px; font-weight: 700; padding: 10px 14px; color: var(--ink); }
.ed-deck input { font-size: 17px; font-weight: 300; }
.ed-short textarea { min-height: 150px; font-size: 15px; }
.ed-ideas textarea { min-height: 130px; font-size: 14.5px; }
.hint { font-size: 12.5px; color: var(--muted); margin: -10px 0 14px; }
.ed-status .pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--paper); color: var(--muted); margin-bottom: 12px; }
.ed-status .pill.on { background: var(--sage-soft); color: var(--sage); }
.ed-status .pill.on:before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sage); }
.ed-side .field:last-child { margin-bottom: 0; }
.ed-side .buttons { margin: 0; }
.ed-save .buttons a.submit { width: 100%; height: 44px; font-size: 15px; }
details.card summary { cursor: pointer; font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; list-style: none; display: flex; justify-content: space-between; }
details.card summary:after { content: "+"; font-size: 16px; }
details.card[open] summary { margin-bottom: 16px; }
details.card[open] summary:after { content: "–"; }
details.card summary::-webkit-details-marker { display: none; }
.tox-tinymce { border: 1px solid var(--rule) !important; border-radius: 10px !important; }
.tox .tox-toolbar__primary { background: var(--paper) !important; }
.tox .tox-edit-area__iframe { background: #fff !important; }
.preview-link { font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; }
/* gallery */
.images-holder { display: flex; flex-wrap: wrap; gap: 12px; padding: 4px 0 0; min-height: 40px; }
#images-grid { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
#images-grid li, .images-holder .ui-state-default { width: 132px; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; background: var(--paper); position: relative; cursor: grab; }
#images-grid li img, .images-holder .ui-state-default img { width: 100%; height: 90px; object-fit: cover; display: block; }
.image-options { position: absolute; inset: auto 0 0 0; display: flex; justify-content: center; gap: 6px; padding: 6px; background: rgba(31,35,38,.75); opacity: 0; transition: opacity .15s; }
.images-holder .ui-state-default:hover .image-options, .image-options.hover { opacity: 1; }
.image-options a { color: #fff; font-size: 12px; }
.image-highlight { width: 132px; height: 92px; border: 2px dashed var(--accent); border-radius: 10px; }
#add_gallery_image { font-weight: 600; }

/* ---------- jQuery UI dialogs, restyled ---------- */
.ui-widget-overlay { background: rgba(31,35,38,.55) !important; opacity: 1 !important; }
.ui-dialog { background: var(--card) !important; border: 1px solid var(--rule) !important; border-radius: 14px !important; box-shadow: 0 24px 60px rgba(31,35,38,.25) !important; padding: 0 !important; font-family: var(--sans) !important; overflow: hidden; }
.ui-dialog .ui-dialog-titlebar { background: var(--paper) !important; border: 0 !important; border-bottom: 1px solid var(--rule) !important; border-radius: 0 !important; padding: 14px 20px !important; color: var(--ink) !important; font-weight: 600; }
.ui-dialog .ui-dialog-titlebar-close { border: 0 !important; background: none !important; }
.ui-dialog .ui-dialog-content { padding: 20px !important; color: var(--body) !important; font-size: 14.5px; }
.ui-dialog .ui-dialog-buttonpane { border-top: 1px solid var(--rule) !important; margin: 0 !important; padding: 12px 20px !important; background: var(--card) !important; }
.ui-dialog .ui-dialog-buttonpane button { border-radius: 999px !important; height: 36px; padding: 0 16px !important; font-family: var(--sans) !important; font-size: 14px !important; background: var(--card) !important; border: 1px solid var(--rule) !important; color: var(--ink) !important; }
.ui-dialog .ui-dialog-buttonpane button:first-child { background: var(--accent) !important; border-color: var(--accent) !important; color: #fff !important; }
.ui-dialog iframe { border: 0; width: 100%; }
.ui-icon-alert { display: none !important; }

/* ---------- login ---------- */
body.adm-login { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card { width: 380px; background: var(--card); border: 1px solid var(--rule); border-radius: 16px; box-shadow: var(--shadow); padding: 36px 36px 30px; }
.login-card .brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.login-card .brand img { width: auto; height: 38px; }
.login-card .brand b { font-family: var(--serif); font-size: 20px; display: block; color: var(--ink); }
.login-card .brand small { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.login-card fieldset { border: 0; padding: 0; margin: 0 0 16px; }
.login-card input[type=submit] { width: 100%; height: 44px; margin-top: 6px; }

/* ---------- small screens ---------- */
@media (max-width: 1100px) { .ed-grid { grid-template-columns: 1fr; } .ed-side { position: static; } .dash-grid { grid-template-columns: 1fr; } }
@media (max-width: 800px) {
  .adm-side { position: fixed; left: -240px; transition: left .2s; z-index: 50; }
  .adm.nav-open .adm-side { left: 0; }
  #menu-toggle { display: inline-flex; }
  .adm-content, .adm-top { padding-left: 16px; padding-right: 16px; }
  ul.mainList .col-f.move { display: none; }
}

/* fixes after first live check */
.card:after, fieldset.drop-shadow:after { content: ""; display: table; clear: both; }
.field div[style*="float"] { float: none !important; width: 100% !important; }
.tags-block h3 { font-size: 0; margin: 0 0 8px; }
.tags-block h3:after { content: "Показвай в"; font-size: 12.5px; }
ul.mainList .col-a { word-break: normal; }
.ui-dialog .ui-icon { display: none !important; }
.ui-dialog .ui-dialog-titlebar-close { width: 28px !important; height: 28px !important; right: 12px !important; top: 10px !important; margin: 0 !important; border-radius: 50% !important; }
.ui-dialog .ui-dialog-titlebar-close:after { content: "×"; font-size: 20px; line-height: 28px; color: var(--muted); display: block; text-align: center; }
.ui-dialog .ui-dialog-titlebar-close:hover:after { color: var(--ink); }

/* ---------- media library & uploads ---------- */
.dropzone { border: 2px dashed var(--rule); border-radius: 14px; background: var(--card); padding: 22px 24px; text-align: center; margin: 0 0 18px; transition: border-color .15s, background .15s; }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone p { margin: 0 0 4px; font-size: 15px; color: var(--ink); }
.dropzone small { color: var(--muted); font-size: 12.5px; }
.dropzone .pick { font-weight: 600; }
.up-list { text-align: left; margin-top: 10px; }
.up-item { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); padding: 5px 0; }
.up-item .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.up-item .bar { flex: 0 0 160px; height: 6px; background: var(--rule-soft); border-radius: 3px; overflow: hidden; }
.up-item .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .15s; }
.up-item.done .bar i { background: var(--sage); width: 100%; }
.up-item.err { color: var(--danger); }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.lib-card { background: var(--card); border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.lib-card.hidden { display: none; }
.lib-thumb { display: block; aspect-ratio: 4 / 3; background: var(--paper); overflow: hidden; }
.lib-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.lib-card:hover .lib-thumb img { transform: scale(1.03); }
.lib-body { padding: 10px 12px 6px; font-size: 13px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lib-body b { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-body .meta { color: var(--muted); font-size: 12px; }
.lib-body .used { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-body .used.muted { color: var(--muted); }
.lib-actions { display: flex; gap: 6px; padding: 6px 10px 10px; margin-top: auto; }
.lib-actions .btn { height: 30px; padding: 0 10px; font-size: 12.5px; }
.lib-actions .del-media { margin-left: auto; color: var(--danger); }
.lib-card.new { outline: 2px solid var(--sage); }

/* ---------- round 2: switches, date picker, row icons ---------- */
input[type=checkbox]:not([name=check]) {
  appearance: none; -webkit-appearance: none; width: 40px; height: 22px; border-radius: 999px; background: #d6d0c6; position: relative;
  vertical-align: middle; margin: 0 8px 0 0; cursor: pointer; transition: background .15s; flex: none;
}
input[type=checkbox]:not([name=check]):after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: left .15s; }
input[type=checkbox]:not([name=check]):checked { background: var(--sage); }
input[type=checkbox]:not([name=check]):checked:after { left: 21px; }
input[type=checkbox]:not([name=check]):focus-visible { outline: 3px solid var(--accent-soft); }
.tags-block td { vertical-align: middle; }
.tags-block td.label_checkbox { padding-right: 28px; font-size: 14px; }
.field input[type=checkbox] + label, .field label + input[type=checkbox] { display: inline-block; }
ul.mainList input[type=checkbox][name=check] { width: 16px; height: 16px; }
input[type=date], input[type=time] { width: auto; font-family: var(--sans); }
input[type=date] { min-width: 190px; }
/* publication day + time sit on one row inside the narrow side column */
.ed-date .dt-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ed-date .dt-row #startDay { flex: 1 1 140px; min-width: 0; }
.ed-date .dt-row #startTime { flex: 0 0 104px; min-width: 0; }
.row-icon { width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: block; }
ul.mainList .col-aa img { display: none; }
.tox .tox-dialog { border-radius: 14px !important; }
[hidden] { display: none !important; }
/* pagination: one frame per page button (the li was framed as well as the a) */
.pages li { border: 0; background: none; padding: 0; min-width: 0; height: auto; border-radius: 0; }
.pages li.selected a { background: var(--accent); color: #fff; border-color: var(--accent); pointer-events: none; }
/* TinyMCE dialogs (image, link, table…) styled like the rest of the panel */
.tox .tox-dialog { font-family: var(--sans) !important; box-shadow: 0 20px 60px rgba(0,0,0,.18) !important; border: 0 !important; }
.tox .tox-dialog__header, .tox .tox-dialog__body, .tox .tox-dialog__footer { background: var(--card) !important; }
.tox .tox-dialog__title { font-family: var(--serif) !important; font-size: 20px !important; color: var(--ink) !important; }
.tox .tox-dialog__body-nav-item { font-size: 13px !important; color: var(--muted) !important; }
.tox .tox-dialog__body-nav-item--active { color: var(--accent) !important; border-bottom-color: var(--accent) !important; }
.tox .tox-label { font-size: 11px !important; letter-spacing: .06em !important; text-transform: uppercase !important; color: var(--muted) !important; }
.tox .tox-textfield, .tox .tox-listbox, .tox .tox-selectfield select { border-radius: 10px !important; border-color: var(--rule) !important; font-family: var(--sans) !important; font-size: 14px !important; color: var(--ink) !important; }
.tox .tox-textfield:focus, .tox .tox-listbox:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 3px var(--accent-soft) !important; }
.tox .tox-button { border-radius: 999px !important; font-family: var(--sans) !important; font-weight: 500 !important; font-size: 13px !important; }
.tox .tox-button:not(.tox-button--secondary):not(.tox-button--naked):not(.tox-button--icon) { background: var(--accent) !important; border-color: var(--accent) !important; }
.tox .tox-button--secondary { background: transparent !important; border-color: var(--rule) !important; color: var(--ink) !important; }
.tox .tox-checkbox { display: inline-flex !important; align-items: center !important; }
.tox .tox-checkbox__icons { display: none !important; }
.tox .tox-checkbox__input { position: static !important; clip: auto !important; overflow: visible !important; opacity: 1 !important; width: 40px !important; height: 22px !important; margin: 0 10px 0 0 !important; }
.tox .tox-checkbox__label { font-size: 14px !important; color: var(--ink) !important; }
.tox .tox-dropzone { border-radius: 12px !important; border: 2px dashed var(--rule) !important; }
.tox .tox-dropzone p { color: var(--muted) !important; }

/* French version card (2026-09-13) */
.fr-card summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; }
.fr-card summary::-webkit-details-marker { display: none; }
.fr-card summary:before { content: "▸"; color: var(--muted); font-size: 14px; }
.fr-card[open] summary:before { content: "▾"; }
.fr-card .chip.ok { background: rgba(111,143,58,.15); color: var(--sage); }
.field.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 800px) { .field.two-col { grid-template-columns: 1fr; } }

/* ---------- subscribers, settings list (2026-09-13) ---------- */
.list-filters a b { margin-left: 6px; font-weight: 600; color: var(--muted); }
.list-filters a.on b { color: inherit; }
.list-note a { color: var(--accent); }
ul.mainList.sub-list a.status:after { content: "Confirmed"; }
ul.mainList.sub-list a.status.offline:after { content: "Pending"; }
ul.mainList .meta .tag.bad { background: var(--danger-soft); color: var(--danger); }
ul.mainList .meta .val { color: var(--ink); }
ul.mainList .meta .key { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; opacity: .7; margin-left: 6px; }
.pages li.gap span { border: 0; background: none; min-width: 0; padding: 0 4px; color: var(--muted); }
.card-title code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--ink); background: var(--paper); padding: 1px 6px; border-radius: 6px; }
ul.mainList.sub-list a.status.gone:after { content: "Unsubscribed"; }

/* ---------- gallery labels (2026-09-13): the old icon anchors were empty, so nothing showed ---------- */
#images-grid li .image-options { opacity: 1; position: absolute; left: 0; right: 0; bottom: 0; background: rgba(31,35,38,.72); padding: 5px 6px; gap: 10px; justify-content: center; }
#images-grid li .image-options a { color: #fff; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-decoration: none; cursor: pointer; }
#images-grid li .image-options a:hover { text-decoration: underline; }
#images-grid li .image-edit:before { content: "Редактирай"; }
#images-grid li .image-delete:before { content: "Изтрий"; color: #ffb3a0; }
#images-grid li { cursor: grab; }
#images-grid li .image-edit { display: none; }
