:root { --red: #e86500; --orange: #f7700a; --blue: #0062bc; --navy: #003272; --ink: #16181d; --muted: #6b7280; --line: #e5e7eb; --bg: #f3f4f6; --font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 var(--font); color: var(--ink); background: var(--bg); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 24px; margin: 0 0 18px; }
h2 { font-size: 17px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 0 0 10px; }
.side { position: fixed; inset: 0 auto 0 0; width: 230px; background: var(--navy); color: #cbd0d8; display: flex; flex-direction: column; overflow-y: auto; }
.side .logo { display: block; padding: 14px 14px 10px; border-bottom: 1px solid rgba(255,255,255,.12); color: #c5d3e8; font-size: 12px; text-align: center; }
.side .logo img { display: block; width: 100%; background: #fff; border-radius: 8px; padding: 6px 8px; margin-bottom: 6px; }
.side .logo b { color: #ff4b50; }
.side .logo small { display: block; font: 12px var(--font); color: #8b919c; }
.side nav { display: flex; flex-direction: column; padding: 10px 0; }
.side nav a { color: #cbd0d8; padding: 9px 18px; border-left: 3px solid transparent; }
.side nav a:hover { background: rgba(255,255,255,.08); text-decoration: none; color: #fff; }
.side nav a.active { border-left-color: var(--orange); background: rgba(255,255,255,.1); color: #fff; font-weight: 600; }
.side .me { margin-top: auto; padding: 16px 18px; border-top: 1px solid rgba(255,255,255,.12); font-size: 13px; }
.side .me a { color: #ffb37a; }
.main { margin-left: 230px; padding: 24px 28px 60px; }
.main-full { padding: 40px 16px; }

.panel { background: #fff; border-radius: 10px; padding: 18px; margin-bottom: 18px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.panel.narrow { max-width: 720px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.cols-2-1 { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); }
.row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.row > label { flex: 1; }
.muted { color: var(--muted); } .small { font-size: 13px; }

label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 12px; }
input:not([type=checkbox]):not([type=file]):not([type=color]), select, textarea {
  display: block; width: 100%; margin-top: 4px; padding: 9px 11px; border: 1px solid #d1d5db; border-radius: 7px; font: 15px var(--font); background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(247,112,10,.25); border-color: var(--red); }
label.big input { font-size: 20px; font-weight: 700; padding: 12px; }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
label.urg { color: #d7141a; font-weight: 700; }
label small, .counter { display: block; font-weight: 400; color: var(--muted); margin-top: 3px; }
.counter.bad { color: #b45309; }
input[type=file] { margin-bottom: 12px; }

.btn { display: inline-block; border: 1px solid #d1d5db; background: #fff; color: var(--ink); padding: 9px 16px; border-radius: 7px; font: 600 14px var(--font); cursor: pointer; }
.btn:hover { text-decoration: none; background: #f9fafb; }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: #c95500; }
.btn:disabled { opacity: .6; cursor: wait; }
.link { background: none; border: 0; color: var(--red); cursor: pointer; font: inherit; padding: 0; }
.danger { color: #b91c1c; }

.flash { padding: 11px 14px; border-radius: 8px; margin-bottom: 14px; font-weight: 500; }
.flash-ok { background: #dcfce7; color: #14532d; }
.flash-error { background: #fee2e2; color: #7f1d1d; }
.flash-warn { background: #fef3c7; color: #78350f; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: #fff; border-radius: 10px; padding: 14px 16px; }
.stat b { display: block; font-size: 28px; }
.stat span { color: var(--muted); font-size: 13px; }
.bars { display: flex; gap: 6px; align-items: end; height: 160px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: end; align-items: center; }
.bar i { display: block; width: 100%; background: var(--red); border-radius: 4px 4px 0 0; min-height: 2px; }
.bar small { color: var(--muted); font-size: 11px; margin-top: 4px; }
ul.simple, ol.simple { margin: 0; padding-left: 18px; }
.simple li { padding: 5px 0; border-bottom: 1px solid var(--line); }
.simple small { color: var(--muted); }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filters input, .filters select { width: auto !important; min-width: 180px; margin: 0 !important; }
.table-wrap { overflow-x: auto; background: #fff; border-radius: 10px; margin-bottom: 18px; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr.off td { opacity: .55; }
.table .title { color: var(--ink); font-weight: 600; }
.actions { white-space: nowrap; }
.actions form { display: inline; margin-left: 10px; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: #e5e7eb; color: #374151; margin-left: 4px; }
.b-published { background: #dcfce7; color: #166534; } .b-review { background: #fef3c7; color: #92400e; } .b-draft { background: #e5e7eb; color: #374151; }
.b-feat { background: #dbeafe; color: #1e40af; } .b-urg { background: #d7141a; color: #fff; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }
.ad-thumb { width: 70px; height: 40px; object-fit: cover; border-radius: 4px; vertical-align: middle; margin-right: 8px; }
.cover-preview { max-width: 100%; border-radius: 8px; margin-bottom: 10px; }
.pagination { display: flex; gap: 6px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 6px 12px; background: #fff; border-radius: 6px; }
.pagination .current { background: var(--red); color: #fff; }
code { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; font-size: 13px; }

.editor-form { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.editor-main { background: #fff; border-radius: 10px; padding: 18px; }
.editor-side { position: sticky; top: 16px; }
.seo { margin-top: 14px; padding: 14px; background: #fafafa; }
.seo summary { font-weight: 700; cursor: pointer; margin-bottom: 10px; }
.serp { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; font-family: Arial, sans-serif; }
.serp-url { font-size: 13px; color: #202124; }
.serp-title { color: #1a0dab; font-size: 19px; line-height: 1.3; margin: 3px 0; }
.serp-desc { color: #4d5156; font-size: 14px; }
.jodit-container { margin-top: 4px; font-weight: 400; }

.login { max-width: 380px; margin: 8vh auto; background: #fff; padding: 30px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.08); }
.login h1 { margin: 0; } .login h1 img { display: block; width: 100%; max-width: 300px; margin: 0 auto 6px; }
.login h1 b { color: var(--red); }
.login p { color: var(--muted); margin-top: 4px; text-align: center; }
.login .btn { width: 100%; padding: 11px; }
.progress { height: 14px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 14px 0 8px; }
.progress i { display: block; height: 100%; width: 0; background: var(--red); transition: width .3s; }
.errors { color: #b91c1c; font-size: 13px; max-height: 240px; overflow: auto; }

@media (max-width: 900px) {
  .side { position: static; width: auto; }
  .side nav { flex-direction: row; flex-wrap: wrap; }
  .main { margin-left: 0; padding: 16px; }
  .cols, .cols-2-1, .editor-form { grid-template-columns: 1fr; }
  .editor-side { position: static; }
}
