/* KudaBiz */
:root {
  --accent: #2f54eb;
  --accent-dark: #1d39c4;
  --hot: #fa541c;
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #1f2430;
  --muted: #7a8194;
  --border: #e6e8f0;
  --ok: #237804;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(31, 41, 71, .07);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font: 16px/1.55 -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1 { font-size: 1.9rem; margin-bottom: .8em; line-height: 1.25; }
h2 { font-size: 1.4rem; margin-bottom: .7em; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.page { padding: 28px 20px 56px; }
.page-narrow { max-width: 720px; }
.center { text-align: center; padding-top: 60px; }
.count { color: var(--muted); font-weight: 400; font-size: .8em; }
.empty { color: var(--muted); padding: 24px 0; }

/* Header */
.site-header { background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { font-size: 1.45rem; font-weight: 800; color: var(--text); letter-spacing: -.5px; }
.logo span { color: var(--accent); }
.logo .logo-tld { color: var(--muted); font-style: normal; font-weight: 800; }
.site-footer .logo .logo-tld { color: #aab1c7; }
.logo:hover { text-decoration: none; }
.main-nav { display: flex; gap: 18px; flex: 1; }
.main-nav a { color: var(--text); font-weight: 500; }
.header-actions { display: flex; gap: 10px; }
.burger { display: none; background: none; border: 0; font-size: 1.5rem; cursor: pointer; }
.admin-bar { background: #101322; }
.admin-bar .container { display: flex; gap: 18px; padding-top: 8px; padding-bottom: 8px; }
.admin-bar a { color: #cdd4f0; font-size: .9rem; }

/* Buttons */
.btn { display: inline-block; padding: 10px 18px; border-radius: 10px; border: 0; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; opacity: .92; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-danger { background: var(--hot); color: #fff; }
.btn-light { background: #fff; color: var(--accent); }
.btn-ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); padding: 8.5px 16px; }
.btn-block { display: block; text-align: center; margin-top: 12px; }
.btn-reg { display: flex; flex-direction: column; align-items: center; gap: 2px; white-space: normal; line-height: 1.15; padding: 10px 14px; width: 100%; }
.btn-reg-main { font-size: 1.1rem; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; }
.btn-reg-sub { font-size: .8rem; font-weight: 500; opacity: .92; }
.link-btn { background: none; border: 0; cursor: pointer; font-size: 1rem; color: var(--accent); }

/* Hero */
.hero { background: linear-gradient(135deg, #1d2547 0%, #2f54eb 100%); color: #fff; padding: 64px 0; }
.hero h1 { font-size: 2.4rem; max-width: 760px; }
.hero-sub { opacity: .85; max-width: 640px; margin-bottom: 26px; }
.hero-search { display: flex; gap: 10px; max-width: 760px; background: #fff; padding: 8px; border-radius: 14px; }
.hero-search input[type=search] { flex: 1; border: 0; padding: 10px 14px; font: inherit; outline: none; min-width: 0; }
.hero-search select { border: 0; background: var(--bg); border-radius: 8px; padding: 0 10px; font: inherit; }
.hero-chips { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.hero-chips a { color: #fff; background: rgba(255,255,255,.14); padding: 6px 14px; border-radius: 999px; font-size: .9rem; }

/* Sections */
.section { padding: 40px 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; }
.section-featured { background: linear-gradient(180deg, #fffdf4, var(--bg)); }
.cta-strip { background: var(--accent); color: #fff; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }

/* Grid & cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 20px; }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .15s; }
.card:hover { transform: translateY(-3px); }
.card--highlight { outline: 2px solid #faad14; background: #fffbea; }
.card-img { position: relative; display: block; aspect-ratio: 16/9; background: #eceef5; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-noimg { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 2.4rem; opacity: .4; }
.badge { position: absolute; top: 10px; left: 10px; font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; color: #fff; }
.badge-pin { background: var(--accent); }
.badge-hot { background: var(--hot); top: auto; bottom: 10px; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-meta { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); gap: 8px; }
.card-cat { color: var(--accent); font-weight: 600; }
.card-title { font-size: 1.02rem; line-height: 1.35; flex: 1; }
.card-title a { color: var(--text); }
.card-bottom { display: flex; justify-content: space-between; font-size: .87rem; color: var(--muted); }
.card-price { font-weight: 700; color: var(--text); }

/* Featured: адаптивная сетка 1/2/3 с широкими карточками (картинка справа) */
.featured-grid { display: grid; gap: 20px; }
.feat-1 { grid-template-columns: 1fr; }
.feat-2 { grid-template-columns: 1fr 1fr; }
.feat-3 { grid-template-columns: repeat(3, 1fr); }
.card-wide { display: flex; flex-direction: row; overflow: hidden; }
.card-wide-body { padding: 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 0; }
.feat-1 .card-wide-body { padding: 28px 32px; }
.feat-1 .card-title { font-size: 1.4rem; }
.card-wide-desc { color: var(--muted); font-size: .93rem; line-height: 1.55; }
.card-wide-btn { align-self: flex-start; margin-top: auto; }
.card-wide-img { flex: none; width: 42%; display: block; }
.feat-3 .card-wide-img { width: 38%; }
.card-wide-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 1000px) {
  .feat-3 { grid-template-columns: 1fr; }
  .feat-3 .card-wide-img { width: 42%; }
}
@media (max-width: 860px) {
  .feat-2, .feat-3 { grid-template-columns: 1fr; }
  .card-wide { flex-direction: column-reverse; } /* на мобильном картинка сверху */
  .card-wide-img { width: 100% !important; aspect-ratio: 16/9; }
}

/* Categories */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.cat-tile { display: flex; justify-content: space-between; background: var(--card); padding: 14px 18px; border-radius: 10px; box-shadow: var(--shadow); color: var(--text); font-weight: 600; }
.cat-tile small { color: var(--muted); }
.cat-tile:hover { text-decoration: none; outline: 2px solid var(--accent); }

/* Filters, forms */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; background: var(--card); padding: 14px; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 24px; }
.filters input[type=search] { flex: 1; min-width: 200px; }
.filters input, .filters select, .form input, .form select, .form textarea {
  border: 1.5px solid var(--border); border-radius: 9px; padding: 9px 12px; font: inherit; background: #fff;
}
.filters input:focus, .form input:focus, .form textarea:focus, .form select:focus { border-color: var(--accent); outline: none; }
.check { display: flex; align-items: center; gap: 7px; font-size: .95rem; cursor: pointer; }
.form { display: flex; flex-direction: column; gap: 16px; background: var(--card); padding: 24px; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .93rem; }
.form label.check { flex-direction: row; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-inline { flex-direction: row; align-items: flex-end; flex-wrap: wrap; }
.form-preview { max-width: 220px; border-radius: 8px; margin-top: 8px; }

/* Инлайн-валидация форм */
.field-invalid { border-color: #a8071a !important; background: #fff6f6; }
.field-err { color: #a8071a; font-size: .82rem; font-weight: 500; margin-top: 5px; }
.email-hint { margin-top: 6px; font-size: .84rem; color: #ad6800; cursor: pointer; }
.email-hint b { text-decoration: underline; }
.phone-field { position: relative; display: flex; gap: 8px; }
.phone-field input { flex: 1; min-width: 0; }
.phone-cc { flex: none; border: 1.5px solid var(--border); background: #fff; border-radius: 9px; padding: 9px 12px; font: inherit; cursor: pointer; white-space: nowrap; }
.phone-cc:hover { border-color: var(--accent); }
.phone-menu { position: absolute; top: 100%; left: 0; z-index: 30; margin-top: 4px; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); max-height: 260px; overflow-y: auto; min-width: 240px; }
.phone-menu-item { display: flex; justify-content: space-between; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 9px 14px; font: inherit; cursor: pointer; }
.phone-menu-item:hover { background: var(--bg); }
.phone-menu-item span { color: var(--muted); }

/* Flash & statuses */
.flash { padding: 12px 18px; border-radius: 10px; margin: 16px 0; }
.flash-ok { background: #ecf9e8; color: var(--ok); }
.flash-err { background: #fff1f0; color: #a8071a; }
.flash-info { background: #e6f4ff; color: #0958d9; }
.status { font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.status-published { background: #ecf9e8; color: var(--ok); }
.status-pending, .status-manual { background: #fff7e6; color: #ad6800; }
.status-rejected { background: #fff1f0; color: #a8071a; }
.status-archived { background: #f0f0f0; color: var(--muted); }

/* Tables */
.table-wrap { overflow-x: auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.table tr:last-child td { border-bottom: 0; }
.actions { display: flex; gap: 8px; align-items: center; }
.amount-plus { color: var(--ok); font-weight: 700; }
.amount-minus { color: #a8071a; font-weight: 700; }

/* Event page */
.breadcrumbs { font-size: .87rem; color: var(--muted); margin-bottom: 16px; }
.event-layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; /* stretch: колонка сайдбара во всю высоту, иначе sticky-карточке некуда прилипать */ }
.event-side { min-height: 100%; }
.event-img { border-radius: var(--radius); margin: 0 0 20px; display: block; }
.event-desc p { margin-bottom: 1em; }
.event-desc ul, .event-desc ol { margin: 0 0 1em 1.4em; }
.event-desc li { margin-bottom: .4em; }
.event-desc h3, .event-desc h4, .event-desc h5 { margin: 1.2em 0 .5em; line-height: 1.3; }
.event-desc blockquote { border-left: 3px solid var(--accent); padding-left: 14px; margin: 0 0 1em; color: var(--muted); }
.event-desc a { text-decoration: underline; }
.side-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; position: sticky; top: 84px; }
.side-row { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.side-row:last-of-type { border-bottom: 0; }
.side-row span { font-size: 1.2rem; }

/* LK */
.lk-top { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-bottom: 28px; }
.balance-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 22px; display: flex; align-items: center; gap: 16px; }
.balance-card b { font-size: 1.3rem; }
.balance-card small { color: var(--muted); }

/* Promo */
.promo-list { display: flex; flex-direction: column; gap: 14px; }
.promo-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 22px; display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.promo-info p { color: var(--muted); font-size: .92rem; }
.promo-buy { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.promo-buy select { border: 1.5px solid var(--border); border-radius: 9px; padding: 9px 12px; font: inherit; }
.promo-hint { color: var(--muted); width: 100%; }
.pay-methods { color: var(--muted); align-self: center; }

/* Admin moderation */
.mod-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; display: flex; gap: 18px; margin-bottom: 16px; }
.mod-card > img { width: 180px; height: 110px; object-fit: cover; border-radius: 8px; }
.mod-body { flex: 1; }
.mod-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.mod-flags { color: #a8071a; font-size: .95rem; font-weight: 600; }
.mod-full { max-height: 280px; overflow-y: auto; background: #fafbff; border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; margin: 8px 0; font-size: .92rem; }
.mod-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.mod-actions input { border: 1.5px solid var(--border); border-radius: 9px; padding: 9px 12px; font: inherit; min-width: 260px; }

/* Pagination */
.pagination { display: flex; gap: 8px; margin-top: 28px; flex-wrap: wrap; }
.pagination a { background: var(--card); padding: 8px 14px; border-radius: 8px; box-shadow: var(--shadow); }
.pagination a.current { background: var(--accent); color: #fff; }

/* Footer */
.site-footer { background: #101322; color: #aab1c7; margin-top: 40px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding: 40px 20px 20px; }
.site-footer .logo { color: #fff; }
.site-footer b { color: #fff; display: block; margin-bottom: 10px; }
.site-footer a { display: block; color: #aab1c7; margin-bottom: 6px; }
.copyright { padding: 16px 20px 28px; font-size: .85rem; border-top: 1px solid #23283d; }

/* Cookie bar */
.cookie-bar { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 100; background: #101322; color: #cdd4f0; border-radius: 14px; padding: 14px 20px; display: flex; align-items: center; gap: 18px; box-shadow: 0 6px 24px rgba(0,0,0,.25); font-size: .9rem; max-width: 860px; margin: 0 auto; }
.cookie-bar[hidden] { display: none; }
.cookie-bar a { color: #fff; text-decoration: underline; }
.cookie-bar .btn { padding: 8px 18px; white-space: nowrap; }

/* Legal pages */
.legal-page { max-width: 860px; }
.legal-page h1 { font-size: 1.5rem; margin-bottom: .5em; }
.legal-page h2 { font-size: 1.15rem; margin: 1.4em 0 .5em; }
.legal-page p { margin-bottom: .7em; }
.legal-page .legal-date { color: var(--muted); font-size: .9rem; margin-bottom: 1.5em; }

/* TG button + consent */
.btn-tg { background: #2aabee; color: #fff; }
.subscribe-row { display: flex; gap: 10px; flex-wrap: wrap; }
.subscribe-row input[type=email] { flex: 1; min-width: 200px; }
.consent-check { font-size: .85rem; color: var(--muted); font-weight: 400; margin-top: 10px; }

/* Reg + subscribe boxes on event page */
.reg-box, .subscribe-box { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; margin-top: 24px; }
#regForm { scroll-margin-top: 90px; }
.reg-box h2, .subscribe-box h2 { margin-bottom: .4em; }
.reg-box p, .subscribe-box p { color: var(--muted); margin-bottom: 16px; }
.reg-box .form, .subscribe-box .form { padding: 0; box-shadow: none; background: none; margin: 0; }
.subscribe-box { background: linear-gradient(135deg, #f0f4ff, #fff); }
.subscribe-box .form-inline input[type=email] { flex: 1; min-width: 200px; }

/* Moderation log */
.mod-score { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; font-size: .85rem; }
.mod-score-bad code { color: #a8071a; font-weight: 700; }
.mod-bar { width: 90px; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; flex: none; }
.mod-bar span { display: block; height: 100%; background: var(--accent); }
.mod-score-bad .mod-bar span { background: var(--hot); }

/* Mini editor */
.editor-toolbar { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.editor-toolbar button { border: 1.5px solid var(--border); background: #fff; border-radius: 7px; padding: 5px 10px; cursor: pointer; font: inherit; font-size: .9rem; }
.editor-toolbar button:hover { border-color: var(--accent); color: var(--accent); }
.editor-area { border: 1.5px solid var(--border); border-radius: 9px; padding: 10px 12px; min-height: 180px; background: #fff; font-weight: 400; overflow-y: auto; max-height: 420px; }
.editor-area:focus { border-color: var(--accent); outline: none; }
.editor-area ul, .editor-area ol { margin-left: 1.3em; }

/* Options at event creation */
.opt-choose { display: flex; flex-direction: column; gap: 10px; background: #f7f9ff; border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.opt-choose label.check { align-items: flex-start; font-weight: 400; }
.opt-choose small { color: var(--muted); }

/* Sold out */
.soldout { display: block; text-align: center; background: #f0f0f0; color: var(--muted); font-weight: 800; padding: 12px; border-radius: 10px; margin-top: 12px; }

/* Support chat */
.chat-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.chat-msg { display: flex; }
.chat-me { justify-content: flex-end; }
.chat-support { justify-content: flex-start; }
.chat-bubble { max-width: 80%; padding: 10px 16px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }
.chat-me .chat-bubble { background: #e8edff; border-bottom-right-radius: 4px; }
.chat-support .chat-bubble { border-bottom-left-radius: 4px; }
.chat-time { color: var(--muted); font-size: .75rem; margin-top: 6px; }

/* Admin stats */
.stats-tabs { margin-bottom: 22px; }
.stats-tabs a { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.stats-tabs a.active { background: var(--accent); color: #fff; }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 30px; }
.stat-tile { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 20px; }
.stat-tile small { color: var(--muted); display: block; margin-bottom: 4px; }
.stat-tile b { font-size: 1.5rem; }
.chart { display: flex; align-items: flex-end; gap: 3px; height: 190px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.chart-col { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.chart-col:hover .chart-bar { background: var(--hot); }
.chart-bar { width: 100%; background: var(--accent); border-radius: 3px 3px 0 0; }
.chart-legend { display: flex; justify-content: space-between; color: var(--muted); font-size: .8rem; padding: 6px 16px 24px; }
.stats-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 28px; }
.setting-current { color: var(--muted); font-weight: 400; }

/* Mobile */
@media (max-width: 860px) {
  .main-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--card); flex-direction: column; padding: 16px 20px; gap: 14px; border-bottom: 1px solid var(--border); }
  .main-nav.open { display: flex; }
  .burger { display: block; }
  .header-actions .btn-ghost { display: none; }
  .hero h1 { font-size: 1.7rem; }
  .hero-search { flex-wrap: wrap; }
  .hero-search input[type=search] { width: 100%; }
  .event-layout { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .mod-card { flex-direction: column; }
  .stats-cols { grid-template-columns: 1fr; }
}
