/* ===== Event24.uz — Design System ===== */
:root {
  /* Brand (derived from logo: petrol navy + white) */
  --brand: #1F3A4D;
  --brand-600: #2A4E63;
  --brand-700: #162D3A;
  --accent: #C99A3F;        /* warm gold — Events / premium highlights */
  --breaking: #D7263D;      /* urgent only */

  --bg: #F6F7F8;
  --card: #FFFFFF;
  --border: #E4E8EB;
  --text: #18242C;
  --muted: #5C6B75;
  --muted-2: #8896A0;

  --link: #1F3A4D;
  --shadow-sm: 0 1px 2px rgba(22,45,58,.06);
  --shadow: 0 6px 24px rgba(22,45,58,.08);

  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Roboto', system-ui, -apple-system, sans-serif;

  --r-sm: 4px;
  --r-md: 8px;
  --maxw: 1240px;
}

[data-theme="dark"] {
  --brand: #2E5871;
  --brand-600: #366683;
  --brand-700: #0E181E;
  --accent: #D7B36A;
  --bg: #0E181E;
  --card: #16242D;
  --border: #25394A;
  --text: #EAEFF2;
  --muted: #9DB0BC;
  --muted-2: #6E8492;
  --link: #BFE0F2;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow: 0 8px 28px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

h1,h2,h3,h4 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .4em; font-weight: 700; letter-spacing: -.01em; }

/* ===== Top bar ===== */
.topbar {
  background: var(--brand-700);
  color: #cdd9e0;
  font-size: 13px;
}
.topbar .container { display: flex; align-items: center; gap: 18px; height: 38px; }
.topbar .tb-left { display: flex; gap: 16px; align-items: center; }
.topbar .tb-right { margin-left: auto; display: flex; gap: 14px; align-items: center; }
.topbar a { color: #cdd9e0; }
.tb-widget { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.tb-widget b { color: #fff; font-weight: 600; }
.lang-switch button, .icon-btn {
  background: transparent; border: 1px solid transparent; color: #cdd9e0;
  cursor: pointer; font: inherit; padding: 3px 7px; border-radius: var(--r-sm);
}
.lang-switch button.active { background: rgba(255,255,255,.12); color: #fff; }
.icon-btn:hover, .lang-switch button:hover { background: rgba(255,255,255,.12); }

/* ===== Header ===== */
.header { background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.header .container { display: flex; align-items: center; gap: 22px; height: 68px; transition: height .2s; }
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand img { width: 38px; height: 38px; border-radius: var(--r-sm); }
.brand .word { font-family: var(--serif); font-weight: 700; font-size: 26px; color: var(--text); letter-spacing: -.02em; }
.brand .word span { color: var(--accent); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--text); font-weight: 500; font-size: 15px; padding: 8px 11px; border-radius: var(--r-sm); }
.nav a:hover { background: var(--bg); text-decoration: none; }
.nav a.events { color: var(--accent); }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.search-btn, .theme-btn, .burger {
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  width: 40px; height: 40px; border-radius: var(--r-sm); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.search-btn:hover, .theme-btn:hover, .burger:hover { border-color: var(--brand); }
.burger { display: none; }
.scrolled .header .container { height: 56px; }

/* ===== Breaking strip ===== */
.breaking {
  background: var(--breaking); color: #fff; font-size: 14px;
  display: flex; align-items: center; gap: 12px;
}
.breaking .container { display: flex; align-items: center; gap: 14px; height: 40px; }
.breaking .tag { background: rgba(0,0,0,.18); font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; padding: 3px 9px; border-radius: var(--r-sm); font-size: 12px; }
.breaking a { color: #fff; font-weight: 500; }

/* ===== Layout ===== */
main { padding: 26px 0 48px; }
.grid-main { display: grid; grid-template-columns: 1fr 320px; gap: 34px; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin: 38px 0 16px;
  border-bottom: 2px solid var(--brand); padding-bottom: 8px; }
.section-head h2 { margin: 0; font-size: 24px; }
.section-head a.more { margin-left: auto; font-size: 14px; font-family: var(--sans);
  font-weight: 500; color: var(--brand-600); }
.section-head.accent { border-color: var(--accent); }
.section-head.accent h2 { color: var(--accent); }

/* ===== Cards / labels ===== */
.label { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; padding: 3px 8px; border-radius: var(--r-sm); margin-bottom: 8px; }
.label.rubric { background: var(--brand); color: #fff; }
.label.event { background: var(--accent); color: #1c1305; }
.label.opinion { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.label.ad { background: var(--bg); color: var(--muted-2); border: 1px solid var(--border); }
.meta { font-size: 13px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.meta .dot::before { content: "•"; margin-right: 12px; color: var(--muted-2); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; }
.hero-main { position: relative; border-radius: var(--r-md); overflow: hidden; background: var(--brand-700); min-height: 420px; }
.hero-main img { width: 100%; height: 100%; min-height: 420px; object-fit: cover; opacity: .9; }
.hero-main .overlay { position: absolute; inset: auto 0 0 0; padding: 28px;
  background: linear-gradient(transparent, rgba(14,24,30,.92)); color: #fff; }
.hero-main h1 { color: #fff; font-size: 34px; margin: 8px 0 8px; }
.hero-main .lead { color: #dfe7ec; font-size: 16px; max-width: 90%; }
.hero-main .meta { color: #b8c6d0; }
.hero-side { display: flex; flex-direction: column; gap: 18px; }
.hero-side .item { padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.hero-side .item:last-child { border-bottom: 0; }
.hero-side h3 { font-size: 18px; }
.hero-side h3 a { color: var(--text); }

/* Card grid */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card .thumb { aspect-ratio: 16/10; background: var(--brand-700); overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 14px 16px 18px; }
.card h3 { font-size: 19px; margin-bottom: 8px; }
.card h3 a { color: var(--text); }
.card h3 a:hover { color: var(--brand-600); text-decoration: none; }
.card p { color: var(--muted); font-size: 14px; margin: 0 0 10px; }

/* Rubric block: 1 big + list */
.rubric-block { display: grid; grid-template-columns: 1.3fr 1fr; gap: 26px; }
.rubric-list { display: flex; flex-direction: column; }
.rubric-list a.row { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border); color: var(--text); }
.rubric-list a.row:last-child { border-bottom: 0; }
.rubric-list a.row:hover { text-decoration: none; color: var(--brand-600); }
.rubric-list .time { color: var(--accent); font-size: 12px; font-weight: 600; min-width: 44px; }
.rubric-list .row h4 { font-size: 16px; margin: 0; font-weight: 600; line-height: 1.35; }

/* Events horizontal scroll */
.events-row { display: grid; grid-auto-flow: column; grid-auto-columns: 240px; gap: 18px;
  overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x mandatory; }
.event-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md);
  overflow: hidden; scroll-snap-align: start; }
.event-card .poster { aspect-ratio: 3/4; background: var(--brand-700); position: relative; overflow: hidden; }
.event-card .poster img { width: 100%; height: 100%; object-fit: cover; }
.event-card .date-badge { position: absolute; top: 10px; left: 10px; background: var(--accent);
  color: #1c1305; border-radius: var(--r-sm); padding: 5px 8px; text-align: center; line-height: 1; }
.event-card .date-badge b { display: block; font-size: 18px; font-weight: 700; }
.event-card .date-badge span { font-size: 11px; text-transform: uppercase; }
.event-card .ev-body { padding: 12px 14px 16px; }
.event-card h4 { font-size: 16px; margin: 0 0 6px; }
.event-card .place { font-size: 13px; color: var(--muted); }
.event-card .price { font-size: 13px; color: var(--accent); font-weight: 600; margin-top: 6px; }

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: 28px; }
.widget { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md); padding: 18px; }
.widget h3 { font-size: 17px; border-bottom: 2px solid var(--accent); padding-bottom: 8px; margin-bottom: 12px; }
.toplist { counter-reset: top; list-style: none; margin: 0; padding: 0; }
.toplist li { counter-increment: top; display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--border); }
.toplist li:last-child { border-bottom: 0; }
.toplist li::before { content: counter(top); font-family: var(--serif); font-weight: 700;
  font-size: 22px; color: var(--accent); min-width: 24px; }
.toplist a { color: var(--text); font-weight: 500; font-size: 15px; line-height: 1.35; }
.ad-slot { background: repeating-linear-gradient(45deg, var(--bg), var(--bg) 10px, var(--card) 10px, var(--card) 20px);
  border: 1px dashed var(--border); border-radius: var(--r-md); min-height: 250px;
  display: flex; align-items: center; justify-content: center; color: var(--muted-2); font-size: 13px; }
.sidebar .sticky { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 28px; }

/* Live feed widget */
.live-feed a.row { display: block; padding: 10px 0; border-bottom: 1px dashed var(--border); color: var(--text); }
.live-feed a.row:last-child { border-bottom: 0; }
.live-feed .t { color: var(--accent); font-size: 12px; font-weight: 600; }
.live-feed .live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--breaking); margin-right: 6px; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

/* CTA Telegram block */
.tg-cta { background: var(--brand); color: #fff; border-radius: var(--r-md); padding: 28px 26px;
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 40px; }
.tg-cta .tg-icon { width: 54px; height: 54px; flex-shrink: 0; background: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; }
.tg-cta h3 { color: #fff; margin: 0 0 4px; font-size: 22px; }
.tg-cta p { margin: 0; color: #cfdde6; }
.tg-cta .btn { margin-left: auto; }

.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--sans); font-weight: 600;
  font-size: 15px; padding: 11px 22px; border-radius: var(--r-sm); cursor: pointer; border: 1px solid transparent; }
.btn-primary { background: var(--accent); color: #1c1305; }
.btn-primary:hover { filter: brightness(1.06); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--muted); border-color: var(--border); }
.btn-ghost:hover { color: var(--text); text-decoration: none; }
.btn-tg { background: #fff; color: var(--brand); }

/* ===== Footer ===== */
.footer { background: var(--brand-700); color: #b9c7d0; margin-top: 50px; padding: 44px 0 26px; }
.footer .cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 30px; }
.footer h4 { color: #fff; font-family: var(--sans); font-size: 14px; text-transform: uppercase;
  letter-spacing: .05em; margin-bottom: 14px; }
.footer a { color: #b9c7d0; display: block; padding: 5px 0; font-size: 14px; }
.footer a:hover { color: #fff; }
.footer .fbrand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer .fbrand .word { font-family: var(--serif); font-size: 22px; color: #fff; }
.footer .fbrand .word span { color: var(--accent); }
.footer .copy { border-top: 1px solid rgba(255,255,255,.12); margin-top: 30px; padding-top: 18px;
  font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ===== Telegram popup modal ===== */
.tg-modal-backdrop { position: fixed; inset: 0; background: rgba(14,24,30,.6); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; z-index: 200; padding: 20px;
  opacity: 0; transition: opacity .25s; }
.tg-modal-backdrop.show { display: flex; opacity: 1; }
.tg-modal { background: var(--card); border-radius: 14px; max-width: 420px; width: 100%;
  padding: 34px 30px 26px; text-align: center; box-shadow: var(--shadow);
  transform: translateY(14px); transition: transform .25s; }
.tg-modal-backdrop.show .tg-modal { transform: translateY(0); }
.tg-modal .tg-badge { width: 68px; height: 68px; margin: 0 auto 16px; background: var(--brand);
  border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.tg-modal h3 { font-size: 22px; margin: 0 0 10px; }
.tg-modal p { color: var(--muted); margin: 0 0 22px; }
.tg-modal .actions { display: flex; gap: 12px; }
.tg-modal .actions .btn { flex: 1; justify-content: center; }

/* ===== Article page ===== */
.article-wrap { display: grid; grid-template-columns: 56px minmax(0,720px) 320px; gap: 30px; justify-content: center; }
.share-rail { display: flex; flex-direction: column; gap: 12px; }
.share-rail.sticky { position: sticky; top: 90px; align-self: start; }
.share-rail button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--card); cursor: pointer; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.share-rail button:hover { border-color: var(--brand); color: var(--brand); }
.breadcrumbs { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.article h1 { font-size: 40px; line-height: 1.15; margin: 8px 0 14px; }
.article .lead { font-size: 21px; line-height: 1.5; color: var(--muted); font-family: var(--serif);
  margin-bottom: 20px; }
.article .author-meta { display: flex; align-items: center; gap: 12px; padding: 14px 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 22px; }
.article .author-meta .avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; }
.article .author-meta .reader-tools { margin-left: auto; display: flex; gap: 8px; }
.article figure { margin: 0 0 22px; }
.article figure img { width: 100%; border-radius: var(--r-md); }
.article figcaption { font-size: 13px; color: var(--muted-2); margin-top: 8px; }
.article-body { font-family: var(--serif); font-size: 19px; line-height: 1.75; }
.article-body p { margin: 0 0 1.3em; }
.article-body blockquote { border-left: 3px solid var(--accent); margin: 1.4em 0; padding: 6px 0 6px 22px;
  font-size: 24px; line-height: 1.45; color: var(--text); }
.article-body h2 { font-size: 27px; margin: 1.4em 0 .5em; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 28px 0; }
.tags a { background: var(--bg); border: 1px solid var(--border); border-radius: 20px;
  padding: 5px 13px; font-size: 13px; color: var(--muted); }
.tags a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.read-progress { position: fixed; top: 0; left: 0; height: 3px; background: var(--accent); width: 0; z-index: 60; }

.comments-off { background: var(--bg); border: 1px dashed var(--border); border-radius: var(--r-md);
  padding: 22px; text-align: center; color: var(--muted); margin-top: 30px; }

/* ===== Lenta page ===== */
.lenta-day { font-family: var(--serif); font-size: 20px; margin: 26px 0 8px; color: var(--brand-600);
  border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.lenta-item { display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.lenta-item .ltime { color: var(--accent); font-weight: 600; font-size: 14px; min-width: 52px; }
.lenta-item .lbody h3 { font-size: 18px; margin: 0 0 4px; }
.lenta-item .lbody h3 a { color: var(--text); }
.lenta-item .lbody .lmeta { font-size: 13px; color: var(--muted); }
.lenta-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.lenta-filter button { background: var(--card); border: 1px solid var(--border); border-radius: 20px;
  padding: 7px 15px; font: inherit; font-size: 14px; cursor: pointer; color: var(--text); }
.lenta-filter button.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.load-more { display: block; margin: 28px auto 0; background: var(--card); border: 1px solid var(--brand);
  color: var(--brand); font-weight: 600; padding: 13px 32px; border-radius: var(--r-sm); cursor: pointer; font: inherit; font-weight: 600; }
.load-more:hover { background: var(--brand); color: #fff; }

.page-title { font-size: 32px; margin: 6px 0 4px; }
.page-sub { color: var(--muted); margin: 0 0 22px; }

/* ===== Event detail page ===== */
.event-hero { display: grid; grid-template-columns: 360px 1fr; gap: 30px; align-items: start; margin-bottom: 14px; }
.event-hero .poster-lg { border-radius: var(--r-md); overflow: hidden; background: var(--brand-700); aspect-ratio: 3/4; }
.event-hero .poster-lg img { width: 100%; height: 100%; object-fit: cover; }
.event-hero h1 { font-size: 32px; margin: 10px 0 14px; }
.event-facts { list-style: none; margin: 0 0 18px; padding: 0; }
.event-facts li { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.event-facts li:last-child { border-bottom: 0; }
.event-facts .k { color: var(--muted); min-width: 110px; }
.event-facts .v { font-weight: 500; }
.event-facts .v.free { color: var(--accent); font-weight: 700; }
.event-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.event-desc { font-family: var(--serif); font-size: 18px; line-height: 1.7; max-width: 760px; }
.map-stub { height: 220px; border-radius: var(--r-md); background:
  linear-gradient(135deg, var(--brand-700), var(--brand-600)); display: flex; align-items: center;
  justify-content: center; color: #cdd9e0; font-size: 14px; margin: 16px 0; }
@media (max-width: 720px) { .event-hero { grid-template-columns: 1fr; } }

/* ===== Search page ===== */
.search-box { display: flex; gap: 10px; margin: 8px 0 18px; }
.search-box input { flex: 1; font: inherit; font-size: 16px; padding: 13px 16px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--card); color: var(--text); }
.search-box input:focus { outline: none; border-color: var(--brand); }
.search-box button { background: var(--brand); color: #fff; border: 0; font: inherit; font-weight: 600;
  padding: 0 24px; border-radius: var(--r-sm); cursor: pointer; }
.search-result { padding: 16px 0; border-bottom: 1px solid var(--border); }
.search-result h3 { font-size: 19px; margin: 6px 0 4px; }
.search-result h3 a { color: var(--text); }
.search-result p { color: var(--muted); margin: 0; font-size: 14px; }
.search-result mark { background: rgba(201,154,63,.28); color: inherit; padding: 0 2px; border-radius: 2px; }

/* ===== Calendar / afisha filter ===== */
.afisha-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.afisha-cats button { background: var(--card); border: 1px solid var(--border); border-radius: 20px;
  padding: 7px 15px; font: inherit; font-size: 14px; cursor: pointer; color: var(--text); }
.afisha-cats button.active { background: var(--accent); color: #1c1305; border-color: var(--accent); }
.afisha-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 980px) { .afisha-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 720px) { .afisha-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 460px) { .afisha-grid { grid-template-columns: 1fr; } }

/* ===== Admin settings mockup ===== */
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-side { background: var(--brand-700); color: #cdd9e0; padding: 22px 16px; }
.admin-side .fbrand { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.admin-side .fbrand .word { font-family: var(--serif); font-size: 20px; color: #fff; }
.admin-side .fbrand .word span { color: var(--accent); }
.admin-side a { display: block; color: #cdd9e0; padding: 10px 12px; border-radius: var(--r-sm); font-size: 14px; }
.admin-side a:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.admin-side a.active { background: var(--brand); color: #fff; }
.admin-main { padding: 30px 34px; background: var(--bg); }
.admin-main h1 { font-size: 26px; }
.admin-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 22px 24px; margin-bottom: 18px; max-width: 720px; }
.admin-card h2 { font-size: 18px; margin: 0 0 4px; }
.admin-card .hint { color: var(--muted); font-size: 13px; margin: 0 0 18px; }
.setting-row { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--border); }
.setting-row:first-of-type { border-top: 0; }
.setting-row .st-text { flex: 1; }
.setting-row .st-text b { display: block; font-size: 15px; }
.setting-row .st-text span { font-size: 13px; color: var(--muted); }
.switch { position: relative; width: 48px; height: 27px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: var(--border); border-radius: 27px; cursor: pointer; transition: .2s; }
.switch .slider::before { content: ""; position: absolute; width: 21px; height: 21px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: .2s; box-shadow: var(--shadow-sm); }
.switch input:checked + .slider { background: var(--brand); }
.switch input:checked + .slider::before { transform: translateX(21px); }
.switch input:disabled + .slider { opacity: .5; cursor: not-allowed; }
.admin-save { background: var(--accent); color: #1c1305; border: 0; font: inherit; font-weight: 600;
  padding: 11px 26px; border-radius: var(--r-sm); cursor: pointer; }
.admin-side .group-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted-2); padding: 16px 12px 6px; }
.admin-side .badge-count { float: right; background: var(--accent); color: #1c1305; font-size: 11px;
  font-weight: 700; border-radius: 10px; padding: 1px 7px; }

/* Admin topbar (page header) */
.admin-topbar { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.admin-topbar h1 { margin: 0; font-size: 24px; }
.admin-topbar .crumb { font-size: 13px; color: var(--muted); width: 100%; margin-bottom: 4px; }
.admin-topbar .spacer { margin-left: auto; }

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 26px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md); padding: 18px; }
.stat-card .num { font-family: var(--serif); font-size: 30px; font-weight: 700; line-height: 1; }
.stat-card .lbl { color: var(--muted); font-size: 13px; margin-top: 6px; }
.stat-card .delta { font-size: 12px; font-weight: 600; margin-top: 8px; }
.stat-card .delta.up { color: #1a8a4b; }
.stat-card .delta.down { color: var(--breaking); }
@media (max-width: 820px) { .stat-grid { grid-template-columns: repeat(2,1fr); } }

/* Toolbar */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar input[type="search"], .toolbar select { font: inherit; font-size: 14px; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--card); color: var(--text); }
.toolbar input[type="search"] { flex: 1; min-width: 180px; }
.toolbar .spacer { margin-left: auto; }

/* Buttons */
.btn-sm { font-size: 13px; padding: 8px 14px; border-radius: var(--r-sm); border: 1px solid var(--border);
  background: var(--card); color: var(--text); cursor: pointer; font-family: var(--sans); font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.btn-sm:hover { border-color: var(--brand); text-decoration: none; }
.btn-acc { background: var(--accent); border-color: var(--accent); color: #1c1305; font-weight: 600; }
.btn-acc:hover { filter: brightness(1.05); }
.btn-danger { color: var(--breaking); border-color: var(--breaking); background: transparent; }
.btn-danger:hover { background: var(--breaking); color: #fff; }

/* Table */
.table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-md); overflow: hidden; }
.table th, .table td { text-align: left; padding: 13px 16px; font-size: 14px; border-bottom: 1px solid var(--border); }
.table th { background: var(--bg); color: var(--muted); font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: .04em; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--bg); }
.table .t-title { font-weight: 600; color: var(--text); }
.table .t-title a { color: var(--text); }
.table .t-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.table .actions-cell { white-space: nowrap; text-align: right; }
.table .actions-cell a, .table .actions-cell button { margin-left: 6px; }

/* Status badge */
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: .03em; }
.badge.pub { background: rgba(26,138,75,.14); color: #1a8a4b; }
.badge.draft { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.badge.sched { background: rgba(201,154,63,.18); color: #9a7320; }
.badge.pending { background: rgba(215,38,61,.12); color: var(--breaking); }

/* Pagination */
.pagination { display: flex; gap: 6px; margin-top: 18px; justify-content: flex-end; }
.pagination a { min-width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--text); font-size: 14px; }
.pagination a.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.pagination a:hover { border-color: var(--brand); text-decoration: none; }

/* Editor */
.editor-grid { display: grid; grid-template-columns: 1fr 300px; gap: 22px; align-items: start; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; }
.field .desc { color: var(--muted); font-size: 12px; font-weight: 400; }
.field input[type="text"], .field input[type="datetime-local"], .field select, .field textarea {
  width: 100%; font: inherit; font-size: 15px; padding: 11px 13px; border: 1px solid var(--border);
  border-radius: var(--r-sm); background: var(--card); color: var(--text); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); }
.field textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
.field textarea.body { min-height: 320px; font-family: var(--serif); font-size: 17px; }
.field .title-input { font-family: var(--serif); font-size: 22px; font-weight: 700; }
.editor-toolbar { display: flex; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }
.editor-toolbar button { width: 36px; height: 34px; border: 1px solid var(--border); background: var(--card);
  border-radius: var(--r-sm); cursor: pointer; color: var(--text); font-weight: 600; }
.editor-toolbar button:hover { border-color: var(--brand); }
.editor-side .panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 16px 18px; margin-bottom: 16px; }
.editor-side .panel h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
  font-family: var(--sans); margin: 0 0 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chips .chip { background: var(--bg); border: 1px solid var(--border); border-radius: 20px; padding: 4px 11px;
  font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.chips .chip b { cursor: pointer; color: var(--muted-2); font-weight: 700; }
.cover-drop { border: 2px dashed var(--border); border-radius: var(--r-md); padding: 26px 14px; text-align: center;
  color: var(--muted); font-size: 13px; cursor: pointer; }
.cover-drop:hover { border-color: var(--brand); }
.editor-actions { display: flex; gap: 10px; }
.editor-actions .btn-acc, .editor-actions .btn-sm { flex: 1; justify-content: center; }

/* Comment moderation card */
.mod-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 16px 18px; margin-bottom: 12px; }
.mod-item .mod-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.mod-item .mod-head .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand);
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.mod-item .mod-head .who { font-weight: 600; font-size: 14px; }
.mod-item .mod-head .ctx { color: var(--muted); font-size: 12px; }
.mod-item .mod-text { font-size: 15px; margin: 0 0 12px; }
.mod-item .mod-actions { display: flex; gap: 8px; }
.notice { background: rgba(201,154,63,.12); border: 1px solid rgba(201,154,63,.4); border-radius: var(--r-md);
  padding: 14px 16px; font-size: 14px; color: var(--text); margin-bottom: 18px; }

@media (max-width: 820px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { display: none; }
  .editor-grid { grid-template-columns: 1fr; }
}

/* ===== Mobile bottom nav ===== */
.mobile-nav { display: none; }

/* ===== Responsive ===== */
@media (max-width: 1080px) {
  .grid-main { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; flex-wrap: wrap; }
  .sidebar .sticky { position: static; flex-direction: row; flex-wrap: wrap; width: 100%; }
  .widget { flex: 1; min-width: 260px; }
  .article-wrap { grid-template-columns: 1fr; }
  .share-rail { flex-direction: row; }
  .share-rail.sticky { position: static; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .rubric-block { grid-template-columns: 1fr; }
  .footer .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .nav, .topbar .tb-left .tb-widget:nth-child(n+2) { display: none; }
  .burger { display: inline-flex; }
  .cards { grid-template-columns: 1fr; }
  .hero-main h1 { font-size: 26px; }
  .article h1 { font-size: 28px; }
  .article-body { font-size: 18px; }
  .footer .cols { grid-template-columns: 1fr; }
  .tg-cta { flex-direction: column; align-items: flex-start; }
  .tg-cta .btn { margin-left: 0; }
  body { padding-bottom: 64px; }
  .mobile-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; height: 60px;
    background: var(--card); border-top: 1px solid var(--border); z-index: 80; }
  .mobile-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; font-size: 11px; color: var(--muted); }
  .mobile-nav a.active { color: var(--brand); }
  .mobile-nav svg { width: 22px; height: 22px; }
}
