/* Bookuria – panou de administrare */
* { box-sizing: border-box; }
body.adm { margin: 0; font-family: 'Segoe UI', system-ui, sans-serif; font-size: 15px; color: #14161B; background: #F5F6F8; }
a { color: #2F2A8F; }
.adm-top { display: flex; align-items: center; gap: 24px; padding: 0 24px; height: 60px; background: #14161B; color: #fff; flex-wrap: wrap; }
.adm-logo { color: #fff; font-weight: 800; font-size: 20px; text-decoration: none; }
.adm-logo small { font-weight: 400; color: #9EA3AE; font-size: 13px; }
.adm-top nav { display: flex; gap: 18px; flex-wrap: wrap; }
.adm-top nav a, .adm-right a { color: #C9CCD4; text-decoration: none; }
.adm-top nav a:hover { color: #fff; }
.adm-right { margin-left: auto; display: flex; gap: 16px; align-items: center; }
.adm-right button { background: transparent; border: 1px solid #3A3E4A; color: #C9CCD4; border-radius: 8px; padding: 6px 12px; cursor: pointer; }
.adm-main { max-width: 1240px; margin: 0 auto; padding: 24px; }
h1 { margin: 0 0 18px; font-size: 28px; }
h2 { font-size: 18px; margin: 0 0 12px; }
.card { background: #fff; border: 1px solid #E3E5EA; border-radius: 14px; padding: 18px 20px; margin-bottom: 20px; overflow-x: auto; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpis div { background: #fff; border: 1px solid #E3E5EA; border-radius: 14px; padding: 16px 18px; }
.kpis span { display: block; font-size: 13px; color: #5B6170; }
.kpis strong { display: block; font-size: 28px; margin: 4px 0; }
.kpis small { color: #5B6170; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 600; color: #5B6170; border-bottom: 1px solid #E3E5EA; padding: 8px 10px; white-space: nowrap; }
td { border-bottom: 1px solid #EEF0F3; padding: 8px 10px; vertical-align: top; }
tr.dim td { opacity: .5; }
.muted { color: #5B6170; }
.small { font-size: 13px; }
.btn { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 10px; background: #2F2A8F; color: #fff; font: inherit; font-weight: 600; padding: 10px 18px; cursor: pointer; text-decoration: none; }
.btn:hover { background: #1E1A66; color: #fff; }
.btn-ghost { background: #fff; color: #14161B; border: 1px solid #D4D7DE; }
.btn-ghost:hover { background: #F0F1F4; color: #14161B; }
.btn-small { padding: 6px 12px; font-size: 13px; }
.btn:disabled { opacity: .6; cursor: wait; }
.form { display: flex; flex-direction: column; gap: 14px; max-width: 720px; }
.form.wide { max-width: none; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.form label small, .editor-label small { font-weight: 400; color: #5B6170; }
.form input:not([type=checkbox]), .form select, .form textarea, .searchbar input, .inline input {
  font: inherit; font-weight: 400; padding: 9px 12px; border: 1px solid #D4D7DE; border-radius: 9px; background: #fff; width: 100%; }
.form .check { flex-direction: row; align-items: center; font-weight: 400; }
.form fieldset { border: 1px solid #E3E5EA; border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.form legend { font-weight: 700; padding: 0 6px; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.editor-label { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-weight: 600; }
#editor { min-height: 380px; background: #fff; font-size: 16px; }
.searchbar { display: flex; gap: 10px; }
.inline { display: flex; gap: 8px; }
.inline input { max-width: 200px; }
.actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; }
.flash-ok { background: #E8F5EF; color: #0B5E42; }
.flash-err { background: #FDECEA; color: #9B1C1C; }
.st { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: #EEF0F3; }
.st-ok { background: #E8F5EF; color: #0B5E42; }
.st-error { background: #FDECEA; color: #9B1C1C; }
.st-running { background: #FFF4DB; color: #8A5A00; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 160px; }
.bars div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.bars span { width: 100%; max-width: 28px; background: #2F2A8F; border-radius: 4px 4px 0 0; }
.bars b { font-size: 11px; font-weight: 600; color: #3D424D; }
.bars small { font-size: 10px; color: #6B7180; }
.blk { border: 1px solid #E3E5EA; border-radius: 12px; margin-bottom: 14px; background: #FAFAFB; }
.blk-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid #E3E5EA; background: #fff; border-radius: 12px 12px 0 0; flex-wrap: wrap; }
.blk-anchor { font-size: 12px; color: #6B7180; font-family: Consolas, monospace; }
.blk-tools { margin-left: auto; display: flex; gap: 6px; }
.blk-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 14px; }
.fld { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; }
.fld textarea, .fld input, .fld select { font: inherit; font-weight: 400; padding: 8px 10px; border: 1px solid #D4D7DE; border-radius: 8px; background: #fff; }
.fld:has(textarea), .fld:has(.store-promos) { grid-column: 1 / -1; }
.store-promos { display: flex; flex-direction: column; gap: 6px; }
.sp { display: grid; grid-template-columns: 200px 1fr; gap: 10px; align-items: center; }
.sp .check { flex-direction: row; font-weight: 600; }
.add-block { display: flex; gap: 10px; }
.add-block select { font: inherit; padding: 8px 10px; border: 1px solid #D4D7DE; border-radius: 8px; }
.actions-cell { display: flex; flex-wrap: wrap; gap: 6px; }
.actions-cell form { margin: 0; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.inline-form input { font: inherit; padding: 7px 10px; border: 1px solid #D4D7DE; border-radius: 8px; width: 130px; }
.actions form { display: flex; gap: 8px; align-items: center; margin: 0; }
.actions select { font: inherit; padding: 8px; border: 1px solid #D4D7DE; border-radius: 8px; }
.offer-box { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.btn-go-admin { background: #0B7A55; }
.btn-go-admin:hover { background: #08623F; }
.swatch { display: inline-block; width: 22px; height: 22px; border-radius: 6px; border: 1px solid #D4D7DE; margin-right: 4px; vertical-align: middle; }
.brand-preview { display: flex; align-items: center; justify-content: center; border-radius: 10px; font-weight: 800; font-size: 18px; min-height: 44px; align-self: end; }
.logo-preview { max-height: 60px; max-width: 240px; padding: 8px; border-radius: 8px; align-self: flex-start; }
.offer-list { padding-left: 18px; display: flex; flex-direction: column; gap: 10px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
details.placement summary { cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
details.placement summary .check { flex-direction: row; font-size: 15px; }
.pl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 10px; }
.img-cur { display: flex; align-items: center; gap: 10px; }
.img-cur img { max-height: 60px; max-width: 220px; border-radius: 6px; border: 1px solid #E3E5EA; }
.chart { width: 100%; height: auto; display: block; }
.chart text { font-size: 12px; fill: #6B7180; }
.chart .grid-line { stroke: #EEF0F3; }
.chart .line { fill: none; stroke: #2F2A8F; stroke-width: 3; stroke-linejoin: round; }
.chart .dot { fill: #0B7A55; }
details summary { cursor: pointer; margin: 10px 0 6px; }
pre, code { background: #F0F1F4; border-radius: 8px; font-family: Consolas, monospace; font-size: 13px; }
pre { padding: 12px 14px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
code { padding: 1px 6px; }
ul.plain { padding-left: 18px; }
a.on { font-weight: 700; }
.adm-login { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.adm-login .box { background: #fff; padding: 32px; border-radius: 16px; width: 360px; display: flex; flex-direction: column; gap: 14px; border: 1px solid #E3E5EA; }
.adm-login label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.adm-login input { font: inherit; padding: 10px 12px; border: 1px solid #D4D7DE; border-radius: 9px; }
/* rapoarte: bara de perioadă, grafice, tabele compacte */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.seg { display: inline-flex; background: #fff; border: 1px solid #E3E5EA; border-radius: 11px; padding: 3px; }
.seg a { padding: 7px 14px; border-radius: 8px; text-decoration: none; color: #3D424D; font-size: 14px; font-weight: 600; }
.seg a.on { background: #14161B; color: #fff; }
.sync { display: flex; align-items: center; gap: 12px; }
.sync form { margin: 0; }
.card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px; }
.legend-inline { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: #5B6170; }
.legend-inline i, .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.chart rect { transition: opacity .15s; }
.chart g:hover rect[fill]:not([fill=transparent]) { opacity: .8; }
.empty { padding: 40px 0; text-align: center; color: #5B6170; }
.cols-60 { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.tbl-compact td { padding: 7px 10px; vertical-align: middle; }
.tbl-compact .num, .tbl-compact th.num { text-align: right; white-space: nowrap; }
.tbl-compact tr:hover td { background: #FAFAFB; }
.barcell { white-space: nowrap; min-width: 190px; }
.minibar { display: inline-block; width: 80px; height: 8px; background: #EEF0F3; border-radius: 4px; margin-right: 10px; vertical-align: middle; overflow: hidden; }
.minibar i { display: block; height: 100%; background: #2F2A8F; border-radius: 4px; }
.bad { color: #9B1C1C; font-weight: 700; }
.showmore { margin-top: 10px; }
.donut { display: grid; grid-template-columns: 170px 1fr; gap: 18px; align-items: center; }
.donut svg { width: 170px; height: 170px; }
.donut-big { font-size: 15px; font-weight: 800; fill: #14161B; }
.donut-small { font-size: 11px; fill: #6B7180; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 14px; }
.legend li { display: grid; grid-template-columns: 16px 1fr auto; column-gap: 4px; align-items: center; }
.legend b { font-size: 13px; }
.legend small { grid-column: 2 / 4; color: #6B7180; font-size: 12px; }
.hbars { display: flex; flex-direction: column; gap: 9px; }
.hb { display: grid; grid-template-columns: 140px 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.hb-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-t { height: 10px; background: #EEF0F3; border-radius: 5px; overflow: hidden; }
.hb-t i { display: block; height: 100%; border-radius: 5px; }
.hb b { font-size: 13px; white-space: nowrap; }
details.fold > summary { display: flex; align-items: baseline; gap: 14px; margin: 0; list-style: none; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary h2 { margin: 0; }
details.fold > summary h2::before { content: '▸ '; color: #9EA3AE; }
details.fold[open] > summary { margin-bottom: 16px; }
details.fold[open] > summary h2::before { content: '▾ '; }
@media (max-width: 900px) { .cols, .kpis, .row3, .cols-60 { grid-template-columns: 1fr; } .donut { grid-template-columns: 1fr; justify-items: center; } }

/* editorul de articole: căutarea de cărți / articole pentru casete */
.psearch { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 60; display: none; align-items: flex-start; justify-content: center; padding: 8vh 14px; }
.psearch.open { display: flex; }
.psearch-box { background: #fff; border-radius: 20px; width: 100%; max-width: 560px; padding: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.psearch-box input { width: 100%; border: 1.5px solid #E3E5EA; border-radius: 12px; padding: 12px; font: 16px Figtree, system-ui, sans-serif; }
.psearch-res { max-height: 55vh; overflow-y: auto; margin-top: 10px; }
.psearch-res button { display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; align-items: center; width: 100%; text-align: left; border: 0; background: none; padding: 8px; border-radius: 12px; cursor: pointer; font: 14px Figtree, system-ui, sans-serif; }
.psearch-res button:hover { background: #F5F6F8; }
.psearch-res img { width: 48px; height: 48px; object-fit: contain; background: #fff; border: 1px solid #E3E5EA; border-radius: 8px; }
.psearch-res b { font-weight: 600; } .psearch-res small { color: #5B6170; }
.st-plan { background: #E6F1FB; color: #185FA5; }
.fb-grid{display:grid;gap:18px;margin-bottom:18px}
@media (min-width:900px){.fb-grid{grid-template-columns:1fr 1fr}}
.fb-grid .card{margin:0}
.adm4 label.check{display:flex;gap:10px;align-items:flex-start;font-weight:600}
.adm4 label.check input{width:auto;margin-top:3px}
.fb-post{border:1px solid #E3E5EA;border-radius:12px;background:#fff;max-width:500px;overflow:hidden}
.fb-head{display:flex;gap:10px;align-items:center;padding:12px 14px 0}
.fb-head small{display:block;color:#65676b;font-size:12px}
.fb-av{width:38px;height:38px;border-radius:50%;background:#2F2A8F;color:#fff;display:grid;place-items:center;font-weight:800}
.fb-post>p{padding:0 14px;font-size:14px;line-height:1.45}
.fb-link img{width:100%;aspect-ratio:1.91;object-fit:cover;display:block}
.fb-link div{background:#f0f2f5;padding:10px 14px}
.fb-link small{color:#65676b;font-size:12px}
.fb-link b{display:block;font-size:15px}
.fb-steps{padding-left:20px;line-height:1.6}
.fb-steps li{margin-bottom:8px}
.fb-steps code{background:#f2efe6;padding:1px 6px;border-radius:6px;font-size:13px}
.fb-form{display:grid;gap:12px;margin-top:16px}
@media (min-width:720px){.fb-form{grid-template-columns:1fr 1fr}.fb-form .wide,.fb-form button{grid-column:1/-1}.fb-form button{justify-self:start}}
.fb-grid .form label:not(.check),.fb-form label{display:flex;flex-direction:column;gap:5px;margin-bottom:10px}
