/* ===== RESET & VARIABLES ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --text: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --bg: #f8fafc;
  --white: #ffffff;
  --border: #e2e8f0;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow: 0 4px 16px rgba(0,0,0,.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.08);
  --transition: .2s ease;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 15px;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

/* ===== HEADER ===== */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.nav { display: flex; gap: 4px; }

.nav a {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all var(--transition);
}
.nav a svg { flex-shrink: 0; opacity: .7; }
.nav a:hover svg { opacity: 1; }
.nav a:hover { background: var(--bg); color: var(--text); }
.nav a.active { background: var(--primary-light); color: var(--primary); }

.header-actions { display: flex; align-items: center; gap: 12px; }

/* ===== USER MENU ===== */
.user-menu { position: relative; }

.user-menu-trigger {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--border); background: var(--white);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); padding: 0;
}
.user-menu-trigger:hover { border-color: var(--primary); }
.user-menu.open .user-menu-trigger { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }

.user-menu-avatar {
  width: 100%; height: 100%; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
  color: #fff; font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  line-height: 1; user-select: none;
}

.user-menu-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 220px; background: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 6px 0;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: all .15s ease; z-index: 200;
}
.user-menu.open .user-menu-dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}

.user-menu-header {
  padding: 10px 16px 8px; border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.user-menu-name {
  font-weight: 700; font-size: 14px; color: var(--text);
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.user-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; font-size: 14px; font-weight: 500;
  color: var(--text-secondary); text-decoration: none;
  transition: all var(--transition);
}
.user-menu-item:hover { background: var(--bg); color: var(--text); }
.user-menu-item svg { flex-shrink: 0; opacity: .6; }
.user-menu-item:hover svg { opacity: 1; }

.user-menu-divider { height: 1px; background: var(--border); margin: 4px 0; }

.user-menu-logout { color: #dc2626; }
.user-menu-logout:hover { background: #fef2f2; color: #b91c1c; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover { background: var(--primary-dark); color: white; transform: translateY(-1px); box-shadow: var(--shadow); }

.btn-accent {
  background: var(--accent);
  color: white;
}
.btn-accent:hover { background: var(--accent-dark); }

/* ===== HERO ===== */
.hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 32px;
  text-align: center;
}

.hero h1 {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero h1 span { color: var(--primary); }

.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 28px;
}

.search-box {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 14px 52px 14px 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: border var(--transition);
}

.search-box input:focus { border-color: var(--primary); }

.search-box .search-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 20px;
}

.stats-row {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 24px;
}

.stat { text-align: center; }
.stat-num { font-size: 24px; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ===== SECTION CARDS ===== */
.sections {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
}

.sections-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  color: inherit;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
}

.card-icon.blue { background: var(--primary-light); }
.card-icon.amber { background: #fef3c7; }
.card-icon.green { background: #d1fae5; }
.card-icon.purple { background: #ede9fe; }
.card-icon.rose { background: #ffe4e6; }
.card-icon.sky { background: #e0f2fe; }

.card h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }

.card p { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; }

.card-count {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bg);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ===== LATEST ARTICLES ===== */
.latest-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
}

.latest-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.latest-header h2 { font-size: 22px; font-weight: 700; }

.tabs { display: flex; gap: 4px; }

.tab {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.tab:hover { background: var(--bg); }
.tab.active { background: var(--primary); color: white; }

.articles-list { display: flex; flex-direction: column; gap: 12px; }

.article-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
  text-decoration: none;
  color: inherit;
}

.article-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  color: inherit;
}

.article-tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  align-self: flex-start;
}

.article-tag.lit { background: #ede9fe; color: #7c3aed; }
.article-tag.soc { background: #fef3c7; color: #d97706; }
.article-tag.obsh { background: #ffe4e6; color: #e11d48; }
.article-tag.eng { background: #d1fae5; color: #059669; }

.article-body { flex: 1; min-width: 0; }
.article-body h4 { font-size: 15px; font-weight: 600; margin-bottom: 4px; line-height: 1.4; }
.article-body p { font-size: 13px; color: var(--text-muted); }

/* ===== SIDEBAR LAYOUT ===== */
.main-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
}

.sidebar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.sidebar-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.sidebar-link {
  display: block;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--bg);
}

.sidebar-link:hover { color: var(--primary); }

.cta-card {
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 16px;
}

.cta-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; border: none; padding: 0; color: white; }
.cta-card p { font-size: 13px; opacity: .85; margin-bottom: 16px; }

.cta-card .btn {
  background: white;
  color: var(--primary);
  font-weight: 700;
}

/* ===== BREADCRUMB ===== */
.breadcrumb-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.breadcrumb {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb a { color: var(--text-secondary); font-weight: 500; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--border); }

/* ===== PAGE VIEW (sidebar layout) ===== */
.page-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 60px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
}

/* --- Article card --- */
.article-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.article-hero {
  background: linear-gradient(135deg, var(--primary-light), #ede9fe);
  padding: 32px 40px 28px;
  border-bottom: 1px solid var(--border);
}

.article-hero .tag {
  display: inline-block;
  padding: 4px 12px;
  background: white;
  color: var(--primary);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.article-hero h1 {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 8px;
}

.article-hero .subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.article-toolbar {
  padding: 12px 40px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.toolbar-left span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-inline {
  font-weight: 500;
  color: var(--text-secondary);
}

.tool-btn {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--white);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 4px;
}

.tool-btn:hover { border-color: var(--primary); color: var(--primary); }

.article-content {
  padding: 36px 40px 40px;
}

.article-content .page-body {
  font-size: 16px;
  line-height: 1.85;
  color: #334155;
  text-align: justify;
}

.article-content .page-body p {
  margin-bottom: 18px;
  text-indent: 1.5em;
}

.article-content .page-body h2 { font-size: 22px; font-weight: 700; margin: 28px 0 14px; text-indent: 0; }
.article-content .page-body h3 { font-size: 18px; font-weight: 700; margin: 24px 0 12px; text-indent: 0; }

.article-content .page-body blockquote {
  border-left: 3px solid var(--primary);
  padding: 14px 20px;
  margin: 24px 0;
  background: var(--primary-light);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text-secondary);
  font-size: 15px;
  text-indent: 0;
}

/* --- Actions bar --- */
.article-actions {
  padding: 20px 40px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* --- Исходный текст ЕГЭ --- */
.source-text-section {
  border-top: 2px solid var(--border);
  padding-top: 24px;
  margin-top: 24px;
}
.source-text-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}
.source-text-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.source-text-title {
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
}
.source-text-body {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg-alt, #f8f9fa);
  border-left: 3px solid var(--primary);
  padding: 16px 20px;
  border-radius: 0 6px 6px 0;
  max-height: 320px;
  overflow: hidden;
  position: relative;
  transition: max-height .3s ease;
}
.source-text-body.expanded {
  max-height: none;
}
.source-text-body:not(.expanded)::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: linear-gradient(transparent, var(--bg-alt, #f8f9fa));
  pointer-events: none;
}
.source-text-footer {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.source-text-link {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
}
.source-text-link:hover { text-decoration: underline; }
.source-text-toggle {
  font-size: 13px;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* --- Expert evaluation --- */
.expert-section {
  border-top: 2px solid var(--border);
  padding-top: 24px;
  margin-top: 24px;
}
.expert-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px;
}
.expert-avatar {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #5c35d5, #2d6be4);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 20px;
  box-shadow: 0 4px 12px rgba(92,53,213,.25);
}
.expert-name { font-weight: 700; font-size: 16px; }
.expert-role { font-size: 12px; color: var(--text-muted); }
.score-display {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #edfaf4 0%, #f0fdf4 100%);
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  margin-bottom: 16px;
}
.score-circle {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 24px; font-weight: 800;
  flex-shrink: 0;
}
.score-label { font-size: 14px; color: var(--text-secondary); }
.score-label strong { font-size: 18px; color: var(--text); display: block; }
.expert-comment {
  padding: 0;
  background: transparent;
  border: none;
  font-size: 16px;
  color: var(--text);
  line-height: 1.8;
}
.expert-comment p { margin-bottom: 8px; }

/* Секции критериев (I, II, III) */
.ec-section-title {
  font-weight: 800;
  font-size: 16px;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .3px;
  padding: 12px 16px 8px;
  margin: 16px 0 8px;
  border-bottom: 2px solid var(--primary);
  background: linear-gradient(135deg, rgba(37,99,235,.04), rgba(37,99,235,.08));
  border-radius: 8px 8px 0 0;
}
.ec-section-title:first-child { margin-top: 0; }

/* Карточка критерия */
.ec-criterion {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  overflow: hidden;
  transition: box-shadow .2s;
}
.ec-criterion:hover {
  box-shadow: 0 2px 12px rgba(37,99,235,.08);
}

/* Заголовок критерия с баллом */
.ec-criterion-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  gap: 12px;
}
.ec-criterion-label {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  flex: 1;
}
.ec-criterion-label .ec-k-tag {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 6px;
  margin-right: 8px;
  vertical-align: middle;
}

/* Бейдж с баллами */
.ec-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 15px;
  padding: 5px 14px;
  border-radius: 20px;
  flex-shrink: 0;
  white-space: nowrap;
}
.ec-score-badge.score-full {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}
.ec-score-badge.score-partial {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}
.ec-score-badge.score-zero {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

/* Комментарий под критерием */
.ec-criterion-body {
  padding: 0 16px 12px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
}
.ec-criterion-body:empty { display: none; }

/* Фолбэк — обычный текст */
.ec-fallback {
  padding: 16px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 16px;
  line-height: 1.8;
}

.actions-left {
  display: flex;
  gap: 8px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.action-btn:hover { border-color: var(--primary); color: var(--primary); }
.action-btn.liked { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }

.rating-inline {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 18px;
}

.star { color: #e2e8f0; cursor: pointer; transition: color var(--transition); }
.star.on { color: var(--accent); }
.star:hover { color: var(--accent); }

.rating-text { font-size: 13px; color: var(--text-muted); margin-left: 6px; }

/* --- Page sidebar --- */
.page-sidebar { display: flex; flex-direction: column; gap: 16px; }

.page-sidebar .sidebar-card h3 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: var(--text-secondary);
}

/* Score widget */
.score-widget {
  text-align: center;
  padding: 24px 20px;
}

.score-widget h3 { text-align: left; }

.big-score {
  font-size: 48px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.big-score span {
  font-size: 20px;
  color: var(--text-muted);
  font-weight: 600;
}

.score-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 8px 0 16px;
}

.criteria-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  text-align: left;
}

.crit-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: var(--bg);
  border-radius: 6px;
  font-size: 12px;
}

.crit-item .label { color: var(--text-secondary); font-weight: 500; }
.crit-item .val { font-weight: 700; color: var(--primary); }
.crit-item.warn .val { color: #dc2626; }

/* Author card */
.author-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), #ede9fe);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: var(--primary);
  flex-shrink: 0;
}

.author-name { font-weight: 700; font-size: 15px; }
.author-meta { font-size: 12px; color: var(--text-muted); }

.author-stats {
  display: flex;
  gap: 16px;
  margin-top: 12px;
}

.a-stat {
  text-align: center;
  flex: 1;
}

.a-stat .num { font-size: 18px; font-weight: 800; color: var(--primary); }
.a-stat .lbl { font-size: 11px; color: var(--text-muted); }

/* ===== AD: Проверка экспертом — Gradient card (Вариант B) ===== */
.ad-expert-gradient {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%);
  border-radius: var(--radius-lg);
  padding: 24px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.ad-expert-gradient::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  background: rgba(255,255,255,.08);
  border-radius: 50%;
  pointer-events: none;
}
.ad-expert-gradient::after {
  content: '';
  position: absolute;
  bottom: -20px; left: 40%;
  width: 80px; height: 80px;
  background: rgba(255,255,255,.05);
  border-radius: 50%;
  pointer-events: none;
}
.ad-expert-gradient__badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,.18);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 14px;
}
.ad-expert-gradient__title {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.3;
}
.ad-expert-gradient__desc {
  font-size: 13px;
  opacity: .85;
  margin-bottom: 18px;
  line-height: 1.5;
}
.ad-expert-gradient__stats {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
}
.ad-expert-gradient__stat-num {
  font-size: 18px;
  font-weight: 800;
}
.ad-expert-gradient__stat-label {
  font-size: 11px;
  opacity: .7;
}
.ad-expert-gradient__btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 12px 20px;
  background: rgba(255,255,255,.95);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 14px;
  border-radius: 8px;
  text-decoration: none;
  transition: all var(--transition);
  position: relative;
  z-index: 1;
}
.ad-expert-gradient__btn:hover {
  background: #fff;
  color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

/* ===== AD: Заказ сочинения — Accent border (Вариант C) ===== */
.ad-order-accent {
  background: var(--white);
  border: 2px solid #f59e0b;
  border-radius: var(--radius);
  padding: 22px;
  margin-top: 16px;
  box-shadow: var(--shadow-sm);
}
.ad-order-accent__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.ad-order-accent__icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  color: #fff;
  flex-shrink: 0;
}
.ad-order-accent__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.ad-order-accent__subtitle {
  font-size: 12px;
  color: #d97706;
  font-weight: 600;
}
.ad-order-accent__desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.5;
}
.ad-order-accent__guarantee {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #fffbeb;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 13px;
  color: #d97706;
  font-weight: 500;
  line-height: 1.4;
}
.ad-order-accent__btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 12px 20px;
  background: #f59e0b;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  border-radius: 8px;
  text-decoration: none;
  transition: all var(--transition);
}
.ad-order-accent__btn:hover {
  background: #d97706;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245,158,11,.3);
}

/* ===== AD: SochBot — Inline banner (Вариант D) ===== */
.ad-bot-inline {
  background: linear-gradient(90deg, #ede9fe 0%, var(--white) 100%);
  border: 1px solid #c4b5fd;
  border-radius: var(--radius);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 24px 0;
}
.ad-bot-inline__left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ad-bot-inline__icon {
  width: 46px; height: 46px;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  color: #fff;
  flex-shrink: 0;
}
.ad-bot-inline__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.ad-bot-inline__desc {
  font-size: 13px;
  color: var(--text-secondary);
}
.ad-bot-inline__right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ad-bot-inline__new {
  background: #7c3aed;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.ad-bot-inline__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 9px 18px;
  background: #7c3aed;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--transition);
}
.ad-bot-inline__btn:hover {
  background: #6d28d9;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124,58,237,.3);
}

/* ===== AD: Expert Compact (Вариант C — sidebar) ===== */
.ad-expert-compact {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 4px var(--radius) var(--radius) 4px;
  padding: 18px 22px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}
.ad-expert-compact__icon {
  width: 42px; height: 42px; flex-shrink: 0;
  background: var(--primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff;
}
.ad-expert-compact__title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.ad-expert-compact__desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 10px; line-height: 1.4; }
.ad-expert-compact__price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 12px; }
.ad-expert-compact__price strong { font-size: 20px; font-weight: 800; color: var(--primary); }
.ad-expert-compact__price span { font-size: 13px; color: var(--text-muted); }
.ad-expert-compact__btn {
  display: inline-flex; padding: 8px 16px; background: var(--primary); color: #fff;
  font-weight: 600; font-size: 13px; border-radius: 8px; text-decoration: none;
  transition: all var(--transition);
}
.ad-expert-compact__btn:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); }

/* ===== AD: Order Inline banner ===== */
.ad-order-inline {
  background: linear-gradient(90deg, #fffbeb 0%, var(--white) 100%);
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 18px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 24px 0;
}
.ad-order-inline__left { display: flex; align-items: center; gap: 14px; }
.ad-order-inline__icon {
  width: 46px; height: 46px; flex-shrink: 0;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff;
}
.ad-order-inline__title { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.ad-order-inline__desc { font-size: 13px; color: var(--text-secondary); }
.ad-order-inline__right { flex-shrink: 0; }
.ad-order-inline__btn {
  display: inline-flex; padding: 9px 18px; background: #f59e0b; color: #fff;
  font-weight: 600; font-size: 13px; border-radius: 8px; text-decoration: none;
  white-space: nowrap; transition: all var(--transition);
}
.ad-order-inline__btn:hover { background: #d97706; color: #fff; transform: translateY(-1px); }

/* ===== AD: SochBot Chat card ===== */
.ad-bot-chat {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.ad-bot-chat__header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ad-bot-chat__avatar {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: #fff;
}
.ad-bot-chat__name { font-weight: 700; font-size: 14px; }
.ad-bot-chat__status {
  font-size: 12px; color: #10b981; display: flex; align-items: center; gap: 4px;
}
.ad-bot-chat__status::before {
  content: ''; width: 6px; height: 6px; background: #10b981; border-radius: 50%;
}
.ad-bot-chat__messages { margin-bottom: 14px; }
.ad-bot-chat__msg {
  padding: 10px 14px; border-radius: 14px; font-size: 13px;
  margin-bottom: 8px; max-width: 85%; line-height: 1.4;
}
.ad-bot-chat__msg--user {
  background: var(--primary); color: #fff; margin-left: auto;
  border-bottom-right-radius: 4px;
}
.ad-bot-chat__msg--bot {
  background: var(--bg); color: var(--text); border-bottom-left-radius: 4px;
}
.ad-bot-chat__btn {
  display: block; width: 100%; text-align: center; padding: 11px 20px;
  background: #7c3aed; color: #fff; font-weight: 700; font-size: 14px;
  border-radius: 8px; text-decoration: none; transition: all var(--transition);
}
.ad-bot-chat__btn:hover { background: #6d28d9; color: #fff; transform: translateY(-1px); }

/* ===== AD: Combo 3-in-1 ===== */
.ad-combo {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 24px 0;
}
.ad-combo__item {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; text-align: center; box-shadow: var(--shadow-sm);
}
.ad-combo__icon { font-size: 28px; margin-bottom: 8px; }
.ad-combo__title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.ad-combo__desc { font-size: 12px; color: var(--text-secondary); margin-bottom: 12px; line-height: 1.4; }
.ad-combo__btn {
  display: block; width: 100%; text-align: center; padding: 9px 14px;
  font-weight: 700; font-size: 13px; border-radius: 8px; text-decoration: none;
  transition: all var(--transition);
}
.ad-combo__btn--primary { background: var(--primary); color: #fff; }
.ad-combo__btn--primary:hover { background: var(--primary-dark); color: #fff; }
.ad-combo__btn--accent { background: #f59e0b; color: #fff; }
.ad-combo__btn--accent:hover { background: #d97706; color: #fff; }
.ad-combo__btn--purple { background: #7c3aed; color: #fff; }
.ad-combo__btn--purple:hover { background: #6d28d9; color: #fff; }

/* ===== AD: mid_text container (вставляется JS-ом между абзацами) ===== */
.ad-mid-text-container {
  margin: 24px 0;
  clear: both;
}

/* AD blocks responsive */
@media (max-width: 768px) {
  .ad-bot-inline, .ad-order-inline {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .ad-bot-inline__right, .ad-order-inline__right {
    width: 100%;
    justify-content: flex-start;
  }
  .ad-bot-inline__btn, .ad-order-inline__btn {
    flex: 1;
    justify-content: center;
  }
  .ad-expert-gradient__stats {
    gap: 10px;
  }
  .ad-expert-gradient__stat-num {
    font-size: 16px;
  }
  .ad-combo {
    grid-template-columns: 1fr;
  }
  .ad-expert-compact {
    flex-direction: column;
  }
}

/* --- Related --- */
.related-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-top: 16px;
}
.related-section h3 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.related-section ul {
  list-style: disc;
  padding-left: 20px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.related-section ul li a {
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.4;
}
.related-section ul li a:hover { text-decoration: underline; }

/* --- Comments --- */
.comments-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 40px;
  margin-top: 16px;
}

.comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.comments-header h3 { font-size: 18px; font-weight: 700; }

.comment-form {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.comment-form input {
  flex: 1;
  padding: 10px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border var(--transition);
}

.comment-form input:focus { border-color: var(--primary); }

.comment {
  padding: 14px 0;
  border-bottom: 1px solid var(--bg);
}

.comment:last-child { border-bottom: none; }

.comment-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.comment-ava {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fef3c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: var(--accent-dark);
  flex-shrink: 0;
}

.comment-name { font-weight: 600; font-size: 13px; }
.comment-date { font-size: 12px; color: var(--text-muted); }
.comment-text { font-size: 14px; color: var(--text-secondary); line-height: 1.5; padding-left: 40px; }

/* ===== FOOTER ===== */
.footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  margin-top: 48px;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-brand { font-size: 13px; color: var(--text-muted); max-width: 280px; margin-top: 10px; line-height: 1.6; }

.footer h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: 12px; }

.footer-links a { display: block; padding: 4px 0; font-size: 14px; color: var(--text-secondary); }
.footer-links a:hover { color: var(--primary); }

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1000px) {
  .page-layout { grid-template-columns: 1fr; }
  .page-sidebar { order: -1; }
}

@media (max-width: 900px) {
  .main-layout { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .nav { display: none; }
  .hero h1 { font-size: 30px; }
  .stats-row { gap: 24px; }
}

@media (max-width: 600px) {
  .cards-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero h1 { font-size: 26px; }
  .header-inner { padding: 0 16px; }
  .stats-row { flex-wrap: wrap; gap: 16px; }
  .article-item { flex-direction: column; gap: 8px; }
  .article-hero { padding: 24px 20px; }
  .article-hero h1 { font-size: 20px; }
  .article-content { padding: 24px 20px; }
  .article-content .page-body { font-size: 15px; }
  .article-toolbar { padding: 10px 20px; flex-direction: column; gap: 8px; }
  .article-actions { padding: 16px 20px; flex-direction: column; }
  .criteria-grid { grid-template-columns: 1fr; }
  .comments-section { padding: 20px; }
  .expert-section { padding-top: 16px; margin-top: 16px; }
  .score-display { flex-direction: column; text-align: center; }
}

/* ============================================================
   AUTH PAGES (login / register)
   ============================================================ */
.auth-page {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  background: var(--bg);
}

.auth-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 40px;
  width: 100%;
  max-width: 420px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 24px;
}

.auth-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  text-align: center;
  margin-bottom: 24px;
}

.auth-error {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  margin-bottom: 16px;
  text-align: center;
}

/* VK button */
.btn-vk {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 18px;
  background: #4a76a8;
  color: #fff;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  margin-bottom: 16px;
}
.btn-vk:hover {
  background: #3a5f8a;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  color: #fff;
}

/* Divider "или" */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 20px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Form fields */
.auth-form { display: flex; flex-direction: column; gap: 16px; }

.auth-field { display: flex; flex-direction: column; gap: 6px; }

.auth-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.auth-field input {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color var(--transition);
}
.auth-field input:focus { border-color: var(--primary); }
.auth-field input::placeholder { color: var(--text-muted); }

.auth-submit {
  width: 100%;
  justify-content: center;
  padding: 11px 18px;
  font-size: 15px;
  margin-top: 4px;
}

/* Password field with toggle */
.auth-password-wrap {
  position: relative; display: flex; align-items: center;
}
.auth-password-wrap input { flex: 1; padding-right: 42px; }
.auth-password-toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--text-muted);
  padding: 4px; display: flex; align-items: center; transition: var(--transition);
}
.auth-password-toggle:hover { color: var(--text); }

/* Generate button */
.auth-generate-btn {
  background: none; border: 1px dashed var(--border); border-radius: 8px;
  padding: 8px 12px; font-size: 13px; font-weight: 500; color: var(--primary);
  cursor: pointer; transition: var(--transition); width: 100%; text-align: center;
  margin-top: 6px; font-family: inherit;
}
.auth-generate-btn:hover { border-color: var(--primary); background: var(--primary-light); }

/* Generated password notice */
.auth-generated-notice {
  margin-top: 8px; background: #fffbeb; border: 1px solid #fde68a;
  border-radius: 8px; padding: 10px 12px;
}
.auth-generated-notice-text {
  display: flex; align-items: center; gap: 8px; font-size: 13px; color: #92400e;
}
.auth-generated-notice-text svg { flex-shrink: 0; }
.auth-copy-btn {
  background: none; border: none; color: var(--primary); font-weight: 600;
  cursor: pointer; text-decoration: underline; font-size: 13px; padding: 0;
  font-family: inherit;
}
.auth-copy-btn:hover { color: var(--primary-dark); }
.auth-copy-ok {
  margin-top: 6px; font-size: 12px; font-weight: 600; color: #059669;
  display: flex; align-items: center; gap: 4px;
}

.auth-footer {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 20px;
}
.auth-footer a { color: var(--primary); font-weight: 600; text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

@media (max-width: 480px) {
  .auth-card { padding: 28px 20px; }
}

/* ===== AUTH MODAL ===== */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: authFadeIn .2s ease;
}

@keyframes authFadeIn { from { opacity: 0; } to { opacity: 1; } }

.auth-modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,.15);
  padding: 32px;
  width: 100%;
  max-width: 420px;
  position: relative;
  animation: authSlideUp .25s ease;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

@keyframes authSlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.auth-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color var(--transition);
}
.auth-modal-close:hover { color: var(--text); }

.auth-modal-tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
  gap: 0;
}

.auth-modal-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 10px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
}
.auth-modal-tab:hover { color: var(--text); }
.auth-modal-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.auth-modal-error {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  margin-bottom: 16px;
  text-align: center;
}

@media (max-width: 480px) {
  .auth-modal { padding: 24px 18px; }
}

/* ============================================================
   PROF PAGE (личный кабинет)
   ============================================================ */
.prof-page { background: var(--bg); min-height: calc(100vh - 64px); }

/* Hero */
.prof-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
  color: #fff;
  padding: 32px 0;
}
.prof-hero-inner {
  max-width: 960px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 20px;
}
.prof-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.prof-username { font-size: 22px; font-weight: 800; margin: 0 0 6px; }
.prof-badge {
  display: inline-block; padding: 2px 10px;
  background: rgba(255,255,255,.2); border-radius: 20px;
  font-size: 12px; font-weight: 600;
}

/* Body */
.prof-body { max-width: 960px; margin: 0 auto; padding: 32px 24px; }

/* Stats */
.prof-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 28px; }
.prof-stat-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow-sm);
}
.prof-stat-card.prof-stat-primary { border-color: var(--primary); }
.prof-stat-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.prof-stat-value { font-size: 28px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.prof-stat-card.prof-stat-primary .prof-stat-value { color: var(--primary); }
.prof-stat-sub { font-size: 12px; color: var(--text-muted); margin-top: 8px; }

/* Progress bars */
.prof-bar-step {
  height: 6px; background: var(--border); border-radius: 3px; margin: 3px 0; overflow: hidden;
}
.prof-bar-fill { height: 100%; background: var(--text-muted); border-radius: 3px; transition: width .4s; }
.prof-bar-fill.done { background: #22c55e; }

/* Section */
.prof-section {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.prof-section-title { font-size: 17px; font-weight: 700; color: var(--text); margin: 0 0 16px; }

/* Balance table */
.prof-balance-table { display: flex; flex-direction: column; gap: 0; }
.prof-balance-row {
  display: grid; grid-template-columns: 100px 1fr auto;
  align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.prof-balance-row:last-child { border-bottom: none; }
.prof-balance-total { padding-top: 12px; }
.prof-balance-sum { font-weight: 600; color: var(--text); text-align: right; }
.prof-balance-badge {
  display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; white-space: nowrap;
}
.badge-author  { background: #dbeafe; color: #1e40af; }
.badge-expert  { background: #d1fae5; color: #065f46; }
.badge-paid    { background: #fce7f3; color: #9d174d; }
.badge-ref     { background: #fef3c7; color: #92400e; }

/* Notices */
.prof-notice {
  background: #fef3c7; border: 1px solid #fcd34d;
  border-radius: 8px; padding: 14px 16px; font-size: 14px; color: var(--text);
}
.prof-notice-info { background: #dbeafe; border-color: #93c5fd; }

/* Select in withdrawal form */
.auth-form select {
  padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 15px; font-family: inherit; color: var(--text); background: var(--white);
  outline: none; transition: border-color var(--transition); width: 100%;
}
.auth-form select:focus { border-color: var(--primary); }

/* Tariffs */
.prof-tariff-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px;
}
.prof-tariff-row:last-of-type { border-bottom: none; }
.prof-tariff-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.prof-tariff-dot.green { background: #22c55e; }
.prof-tariff-dot.red   { background: #ef4444; }
.prof-tariff-rate { margin-left: auto; font-weight: 600; color: var(--text-secondary); }
.prof-note { font-size: 12px; color: var(--text-muted); margin: 10px 0 0; }

/* Payout table */
.prof-payout-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.prof-payout-table th, .prof-payout-table td {
  padding: 10px 12px; text-align: left;
  border-bottom: 1px solid var(--border);
}
.prof-payout-table th { font-weight: 600; color: var(--text-secondary); background: var(--bg); }
.payout-status { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.payout-status.green { background: #d1fae5; color: #065f46; }
.payout-status.blue  { background: #dbeafe; color: #1e40af; }
.payout-status.red   { background: #fee2e2; color: #991b1b; }

/* Chart */
.prof-chart-wrap { position: relative; height: 220px; }

/* Publications list */
.prof-pub-list { display: flex; flex-direction: column; gap: 0; }
.prof-pub-item {
  display: block; padding: 14px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none; color: var(--text);
  transition: background var(--transition);
}
.prof-pub-item:last-child { border-bottom: none; }
.prof-pub-item:hover { color: var(--primary); }
.prof-pub-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; line-height: 1.4; }
.prof-pub-meta {
  display: flex; gap: 12px; flex-wrap: wrap;
  font-size: 12px; color: var(--text-muted);
}
.prof-pub-cat {
  background: var(--bg); padding: 1px 8px; border-radius: 4px;
  font-weight: 500; color: var(--text-secondary);
}

/* Profile info table */
.prof-info-table {
  width: 100%; border-collapse: collapse; font-size: 14px;
}
.prof-info-table th {
  text-align: left; padding: 8px 16px 8px 0; color: var(--text-secondary);
  font-weight: 600; white-space: nowrap; vertical-align: top; width: 180px;
}
.prof-info-table td {
  padding: 8px 0; color: var(--text); line-height: 1.5;
}
.prof-info-table tr + tr th,
.prof-info-table tr + tr td { border-top: 1px solid var(--border); }

/* Profile edit toggle button */
.prof-edit-toggle {
  display: inline-block; font-size: 13px; font-weight: 500;
  color: var(--primary); background: none; border: none; cursor: pointer;
  margin-left: 12px; padding: 0;
}
.prof-edit-toggle:hover { text-decoration: underline; }

/* Profile edit form */
.prof-edit { max-width: 560px; }
.prof-field { margin-bottom: 20px; }
.prof-label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 6px;
}
.prof-input {
  display: block; width: 100%; padding: 8px 12px;
  font-size: 14px; border: 1px solid var(--border); border-radius: 6px;
  background: #fff; color: var(--text); box-sizing: border-box;
}
.prof-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37,99,235,.12); }
.prof-textarea { resize: vertical; min-height: 80px; font-family: inherit; }
.prof-privacy {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-muted); margin-top: 6px; cursor: pointer;
}
.prof-privacy input[type="checkbox"] { margin: 0; }
.prof-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

@media (max-width: 640px) {
  .prof-stats { grid-template-columns: 1fr; }
  .prof-balance-row { grid-template-columns: 80px 1fr auto; font-size: 13px; }
  .prof-hero-inner { gap: 14px; }
  .prof-username { font-size: 18px; }
  .prof-info-table th { width: auto; padding-right: 12px; }
}

/* =============================================
   ЛИЧНЫЙ КАБИНЕТ АВТОРА (/lk)
   ============================================= */

.lk-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

/* Заголовок */
.lk-page-header {
  margin-bottom: 24px;
}
.lk-heading {
  font-size: 24px;
  font-weight: 800;
  margin: 0;
  color: var(--text);
}

/* ---- Карточки-статистики (3 шт.) ---- */
.lk-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.lk-stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  transition: box-shadow var(--transition);
}
.lk-stat-card:hover { box-shadow: var(--shadow); }

.lk-stat-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}

.lk-stat-balance .lk-stat-icon { background: var(--primary-light); color: var(--primary); }
.lk-stat-pubs    .lk-stat-icon { background: #fef3c7; color: var(--accent-dark); }
.lk-stat-rate    .lk-stat-icon { background: #d1fae5; color: #059669; }

.lk-stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.lk-stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}
.lk-stat-unit { font-size: 14px; font-weight: 600; color: var(--text-muted); }

.lk-stat-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 12px;
  overflow: hidden;
}
.lk-stat-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width .5s ease;
}

.lk-stat-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ---- Универсальная карточка ---- */
.lk-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}

.lk-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.lk-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.lk-card-total {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}

/* ---- Структура баланса: горизонтальный layout ---- */
.lk-balance-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: center;
}

.lk-balance-chart {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lk-balance-details {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.lk-detail-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.lk-detail-item:last-child { border-bottom: none; }

.lk-detail-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.lk-detail-info { flex: 1; min-width: 0; }

.lk-detail-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.lk-detail-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

.lk-detail-amount { text-align: right; white-space: nowrap; }

.lk-detail-sum {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.lk-detail-units {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* ---- Промо-карточка (реферальная программа) ---- */
.lk-promo-card {
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  border-radius: var(--radius);
  padding: 28px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
}

.lk-promo-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  flex: 1;
}

.lk-promo-badge {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(255,255,255,.2);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
  width: fit-content;
}

.lk-promo-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 8px;
}

.lk-promo-desc {
  font-size: 13px;
  opacity: .85;
  line-height: 1.5;
}

.lk-promo-btn {
  display: inline-block;
  padding: 8px 20px;
  background: white;
  color: var(--primary);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--transition);
  width: fit-content;
}
.lk-promo-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  color: var(--primary);
}

.lk-promo-pct {
  font-size: 56px;
  font-weight: 900;
  line-height: 1;
  opacity: .25;
  flex-shrink: 0;
}

/* ---- Уведомления ---- */
.lk-notice {
  background: #fef9e7;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: #78350f;
  line-height: 1.5;
}
.lk-notice.lk-notice-info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

.lk-text-warn { color: #ef4444; font-weight: 700; }
.lk-text-success { color: #059669; }

/* ---- Вкладки ---- */
.lk-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.lk-tab-btn {
  background: none;
  border: none;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition);
}
.lk-tab-btn:hover { color: var(--text); }
.lk-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.lk-tab-panel {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.lk-tab-panel p { margin: 0 0 10px; }

/* Фильтры публикаций */
.pub-filters {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.pub-filter-group { display: flex; flex-direction: column; gap: 4px; min-width: 180px; }
.pub-filter-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.pub-filter-select {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text);
  background: var(--white);
  cursor: pointer;
  transition: border-color var(--transition);
}
.pub-filter-select:focus { outline: none; border-color: var(--primary); }

/* Легенда тарифов */
.lk-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

/* Индикаторные точки */
.lk-dot-green  { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #22c55e; vertical-align: middle; margin-right: 5px; }
.lk-dot-yellow { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #f59e0b; vertical-align: middle; margin-right: 5px; }
.lk-dot-red    { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #ef4444; vertical-align: middle; margin-right: 5px; }

/* ---- Соцсети ---- */
.lk-socials-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.lk-socials-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.lk-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
}

.lk-social-vk {
  background: #e7edf6;
  color: #4a76a8;
}
.lk-social-vk:hover {
  background: #4a76a8;
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* ---- Форма выплаты ---- */
.lk-withdraw-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 560px;
}

.lk-form-group { display: flex; flex-direction: column; gap: 6px; }

.lk-form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.lk-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color var(--transition);
  box-sizing: border-box;
}
.lk-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}

.lk-btn-submit {
  grid-column: 1 / -1;
  justify-content: center;
  padding: 11px 28px;
  font-size: 14px;
}

.lk-form-error {
  grid-column: 1 / -1;
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
}

/* ---- Таблица выплат ---- */
.lk-payout-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.lk-payout-table th,
.lk-payout-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.lk-payout-table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .3px;
  background: var(--bg);
}
.lk-payout-table tbody tr:hover { background: var(--bg); }

.lk-payout-method { color: var(--text-muted); font-size: 12px; }

.lk-payout-total td { font-weight: 700; border-bottom: none; }

.lk-payout-status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}
.lk-payout-status.green { background: #d1fae5; color: #065f46; }
.lk-payout-status.blue  { background: #dbeafe; color: #1e40af; }
.lk-payout-status.red   { background: #fee2e2; color: #991b1b; }

/* ---- Пагинация публикаций ---- */
.lk-pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.lk-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  background: #fff;
  transition: all var(--transition);
  cursor: pointer;
}

.lk-page-link:hover {
  background: var(--bg);
  border-color: var(--primary);
  color: var(--primary);
}

.lk-page-link.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
  cursor: default;
}

.lk-page-dots {
  display: inline-flex;
  align-items: center;
  padding: 0 4px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .lk-stats-grid   { grid-template-columns: 1fr; }
  .lk-balance-layout { grid-template-columns: 1fr; }
  .lk-balance-chart { margin-bottom: 8px; }
  .lk-promo-pct    { display: none; }
  .lk-withdraw-form { grid-template-columns: 1fr; }
  .lk-stat-value   { font-size: 22px; }
  .lk-tab-btn      { padding: 8px 12px; font-size: 12px; }
  .lk-page-header  { flex-direction: column; gap: 4px; }
}

@media (min-width: 769px) and (max-width: 960px) {
  .lk-stats-grid { grid-template-columns: 1fr 1fr; }
  .lk-stats-grid .lk-stat-rate { grid-column: 1 / -1; }
}

/* ================================================
   EARN BANNER (главная страница)
   ================================================ */
.earn-banner { max-width: 1280px; margin: 0 auto 24px; padding: 0 24px; }
.earn-banner-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  border-radius: var(--radius-lg); padding: 20px 28px;
  color: #fff; text-decoration: none;
  transition: var(--transition);
}
.earn-banner-inner:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: #fff; }
.earn-banner-title { font-size: 17px; font-weight: 700; margin-bottom: 2px; }
.earn-banner-desc { font-size: 13px; opacity: .85; }
.earn-banner-desc b { color: #fef3c7; font-weight: 700; }
.earn-banner-btn {
  flex-shrink: 0; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.35);
  padding: 10px 20px; border-radius: 8px; font-size: 13px; font-weight: 600; white-space: nowrap;
}
.earn-banner-inner:hover .earn-banner-btn { background: rgba(255,255,255,.3); }

@media (max-width: 600px) {
  .earn-banner-inner { flex-direction: column; text-align: center; padding: 16px 20px; }
  .earn-banner-btn { width: 100%; text-align: center; }
}

/* ================================================
   LANDING PAGE — /earn
   ================================================ */

/* Hero */
.landing-hero { max-width: 1280px; margin: 0 auto; padding: 60px 24px 40px; }
.landing-hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.landing-hero-text h1 { font-size: 40px; font-weight: 800; line-height: 1.15; margin-bottom: 16px; }
.landing-highlight {
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.landing-hero-text p { font-size: 16px; color: var(--text-secondary); margin-bottom: 28px; max-width: 440px; }
.landing-hero-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary); color: #fff; padding: 14px 32px; border-radius: 10px;
  font-size: 16px; font-weight: 700; border: none; cursor: pointer; transition: var(--transition);
  font-family: inherit;
}
.landing-hero-btn:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.landing-hero-note { font-size: 12px; color: var(--text-muted); margin-top: 12px; }

/* Calculator */
.landing-calc {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 32px; box-shadow: var(--shadow-lg);
}
.landing-calc h3 { font-size: 17px; font-weight: 700; margin-bottom: 20px; text-align: center; }
.landing-calc-field { margin-bottom: 20px; }
.landing-calc-field label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.landing-slider {
  width: 100%; appearance: none; -webkit-appearance: none; height: 6px;
  border-radius: 3px; background: var(--border); outline: none;
}
.landing-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary); cursor: pointer;
}
.landing-slider::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%; background: var(--primary);
  cursor: pointer; border: none;
}
.landing-calc-range { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: var(--text-muted); }
.landing-calc-current { font-size: 15px; font-weight: 700; color: var(--primary); }
.landing-calc-result {
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5); border: 1px solid #bbf7d0;
  border-radius: var(--radius); padding: 20px; text-align: center; margin-top: 8px;
}
.landing-calc-result-label { font-size: 12px; color: #166534; text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.landing-calc-result-amount { font-size: 36px; font-weight: 800; color: #059669; margin: 4px 0; }
.landing-calc-result-note { font-size: 13px; color: var(--text-muted); }

/* Features Strip */
.landing-features-strip {
  max-width: 1280px; margin: 0 auto 24px; padding: 0 24px;
}
.landing-features-inner {
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
}
.landing-feature-item { padding: 28px 24px; text-align: center; border-right: 1px solid var(--border); }
.landing-feature-item:last-child { border-right: none; }
.landing-feature-icon { font-size: 28px; margin-bottom: 8px; }
.landing-feature-item h4 { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.landing-feature-item p { font-size: 12px; color: var(--text-secondary); margin: 0; }

/* Sections */
.landing-section { max-width: 1280px; margin: 0 auto; padding: 48px 24px; }
.landing-section-white {
  background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  max-width: 100%; padding-left: calc((100% - 1232px) / 2); padding-right: calc((100% - 1232px) / 2);
}
.landing-section-title { font-size: 28px; font-weight: 800; text-align: center; margin-bottom: 12px; }
.landing-section-desc { font-size: 15px; color: var(--text-secondary); text-align: center; max-width: 500px; margin: 0 auto 40px; }

/* Payout Banner */
.landing-payout-banner {
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: var(--radius);
  padding: 20px 28px; display: flex; align-items: center; gap: 16px;
}
.landing-payout-icon { font-size: 28px; }
.landing-payout-text { font-size: 15px; color: #166534; }

/* Process Steps */
.landing-process { display: flex; flex-direction: column; gap: 16px; max-width: 680px; margin: 0 auto; }
.landing-process-item {
  display: flex; gap: 20px; align-items: flex-start;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; transition: var(--transition);
}
.landing-section-white .landing-process-item { background: var(--bg); }
.landing-process-item:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.landing-process-num {
  width: 44px; height: 44px; border-radius: 12px; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px; flex-shrink: 0;
}
.landing-process-item h4 { font-size: 15px; font-weight: 700; margin: 0 0 4px; }
.landing-process-item p { font-size: 13px; color: var(--text-secondary); margin: 0; }

/* Tiers Bar */
.landing-tiers { display: flex; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); max-width: 800px; margin: 0 auto; }
.landing-tier {
  flex: 1; padding: 24px 16px; text-align: center; background: var(--white);
  border-right: 1px solid var(--border); transition: var(--transition);
}
.landing-tier:last-child { border-right: none; }
.landing-tier:hover { background: var(--primary-light); }
.landing-tier-active { background: linear-gradient(180deg, var(--primary), var(--primary-dark)); color: #fff; }
.landing-tier-active:hover { background: linear-gradient(180deg, var(--primary), var(--primary-dark)); }
.landing-tier-count { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; opacity: .7; }
.landing-tier-price { font-size: 28px; font-weight: 800; margin: 4px 0; }
.landing-tier-active .landing-tier-price { color: #fff; }
.landing-tier-per { font-size: 11px; opacity: .6; }

/* Comparison */
.landing-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 800px; margin: 0 auto; }
.landing-compare-card { border-radius: var(--radius-lg); padding: 32px 28px; }
.landing-compare-card ul { list-style: none; padding: 0; margin: 0; }
.landing-compare-card li { font-size: 14px; padding: 6px 0 6px 24px; position: relative; color: var(--text-secondary); }
.landing-compare-card li::before { content: ''; position: absolute; left: 0; top: 12px; width: 12px; height: 12px; border-radius: 50%; }
.landing-compare-card h3 { font-size: 18px; font-weight: 700; margin: 0 0 12px; }
.landing-compare-others { background: #fff1f2; border: 1px solid #fecdd3; }
.landing-compare-others li::before { background: #fca5a5; }
.landing-compare-us { background: #f0fdf4; border: 1px solid #bbf7d0; }
.landing-compare-us li::before { background: #6ee7b7; }
.landing-compare-tag { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 4px 10px; border-radius: 20px; margin-bottom: 16px; color: #fff; }
.landing-compare-tag-red { background: #e11d48; }
.landing-compare-tag-green { background: #059669; }

/* Testimonial */
.landing-testimonial {
  max-width: 600px; margin: 0 auto; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px; text-align: center;
}
.landing-testimonial-quote { font-size: 16px; font-style: italic; color: var(--text-secondary); line-height: 1.7; margin-bottom: 16px; }
.landing-testimonial-author { font-size: 14px; font-weight: 600; }
.landing-testimonial-role { font-size: 12px; color: var(--text-muted); }

/* Video */
.landing-video {
  max-width: 640px; margin: 0 auto; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg); aspect-ratio: 16/9;
}
.landing-video iframe { width: 100%; height: 100%; border: none; }

/* CTA Grid */
.landing-cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.landing-cta-text h2 { font-size: 32px; font-weight: 800; margin: 0 0 12px; }
.landing-cta-text p { color: var(--text-secondary); margin: 0 0 24px; }
.landing-cta-buttons { display: flex; flex-direction: column; gap: 12px; }
.landing-btn-vk, .landing-btn-email {
  display: block; width: 100%; padding: 14px; border-radius: 10px; font-size: 15px;
  font-weight: 700; text-align: center; border: none; cursor: pointer;
  transition: var(--transition); font-family: inherit;
}
.landing-btn-vk { background: #0077ff; color: #fff; }
.landing-btn-vk:hover { background: #0066dd; }
.landing-btn-email { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.landing-btn-email:hover { border-color: var(--primary); color: var(--primary); }
.landing-cta-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.landing-cta-stat { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; }
.landing-cta-stat-num { font-size: 24px; font-weight: 800; color: var(--primary); }
.landing-cta-stat-label { font-size: 12px; color: var(--text-muted); }

/* Landing Responsive */
@media (max-width: 900px) {
  .landing-hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .landing-hero-text h1 { font-size: 32px; }
  .landing-features-inner { grid-template-columns: 1fr; }
  .landing-feature-item { border-right: none; border-bottom: 1px solid var(--border); }
  .landing-feature-item:last-child { border-bottom: none; }
  .landing-tiers { flex-direction: column; }
  .landing-tier { border-right: none; border-bottom: 1px solid var(--border); }
  .landing-tier:last-child { border-bottom: none; }
  .landing-comparison { grid-template-columns: 1fr; }
  .landing-cta-grid { grid-template-columns: 1fr; }
  .landing-section-white { padding-left: 24px; padding-right: 24px; }
}

@media (max-width: 600px) {
  .landing-hero { padding: 32px 16px 24px; }
  .landing-hero-text h1 { font-size: 26px; }
  .landing-calc { padding: 20px; }
  .landing-calc-result-amount { font-size: 28px; }
  .landing-section { padding: 32px 16px; }
  .landing-section-title { font-size: 22px; }
}

/* ===== CONTACT PAGE ===== */
.contact-page {
  min-height: 60vh;
  padding: 48px 16px;
  background: var(--bg);
}

.contact-container {
  max-width: 680px;
  margin: 0 auto;
}

.contact-container h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.contact-desc {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.contact-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.contact-tab {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--white);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: var(--transition);
}

.contact-tab:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.contact-tab.active {
  color: var(--white);
  background: var(--primary);
  border-color: var(--primary);
}

.contact-legal {
  background: var(--white);
  padding: 28px 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 28px;
  border-left: 4px solid var(--primary);
}

.contact-legal h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.contact-legal h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-top: 20px;
  margin-bottom: 8px;
}

.contact-legal p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.contact-legal ul,
.contact-legal ol {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 8px 0 12px 20px;
}

.contact-legal li {
  margin-bottom: 4px;
}

.contact-error {
  background: #fef2f2;
  color: #dc2626;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 20px;
  border: 1px solid #fecaca;
}

.contact-form {
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.contact-field {
  margin-bottom: 20px;
}

.contact-field label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.contact-field .required {
  color: #dc2626;
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  transition: var(--transition);
}

.contact-field input:focus,
.contact-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.contact-field textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  padding: 12px 28px;
}

/* Успешная отправка */
.contact-success {
  text-align: center;
  padding: 64px 24px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.contact-success svg {
  margin-bottom: 16px;
}

.contact-success h1 {
  font-size: 24px;
  margin-bottom: 12px;
}

.contact-success p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* Footer links */
.footer-plagiarism-link,
.footer-contact-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.footer-plagiarism-link:hover,
.footer-contact-link:hover {
  color: var(--primary);
}

@media (max-width: 600px) {
  .contact-row { grid-template-columns: 1fr; }
  .contact-form { padding: 20px; }
  .contact-container h1 { font-size: 22px; }
  .contact-tabs { gap: 4px; }
  .contact-tab { padding: 6px 12px; font-size: 13px; }
}

/* ===== LK ADD ESSAY PAGE ===== */
.lk-back-btn {
  font-size: 13px;
  padding: 8px 16px;
  white-space: nowrap;
}

.lk-add-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 4px 0;
}

.lk-textarea {
  resize: vertical;
  min-height: 320px;
  font-family: inherit;
  line-height: 1.7;
}

.lk-required { color: #ef4444; }

.lk-char-counter {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.lk-char-hint {
  color: var(--text-muted);
  font-size: 12px;
}

.lk-notice.lk-notice-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
}

/* Searchable category select */
.lk-select-search { position: relative; }

.lk-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  cursor: pointer;
  font-size: 15px;
  color: var(--text);
  transition: var(--transition);
  min-height: 44px;
}

.lk-select-trigger:hover { border-color: var(--primary); }

.lk-select-arrow { flex-shrink: 0; color: var(--text-muted); }

.lk-select-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  max-height: 360px;
  display: none;
  flex-direction: column;
}

.lk-select-dropdown.open {
  display: flex;
}

.lk-select-search-wrap {
  padding: 8px;
  border-bottom: 1px solid var(--border);
}

.lk-select-search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  outline: none;
}

.lk-select-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.lk-select-options {
  overflow-y: auto;
  max-height: 300px;
  padding: 4px 0;
}

.lk-select-option {
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  transition: background .15s;
  line-height: 1.4;
}

.lk-select-option:hover { background: var(--bg); }

.lk-select-option.selected {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.lk-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

/* =============================================
   АДМИН-ПАНЕЛЬ (/admin)
   ============================================= */

.admin-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.admin-page-header { margin-bottom: 16px; }

.admin-heading {
  font-size: 24px;
  font-weight: 800;
  margin: 0;
  color: var(--text);
}

/* Навигация */
.admin-nav {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
  flex-wrap: wrap;
}

.admin-nav-link {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.admin-nav-link:hover { color: var(--text); }
.admin-nav-link.active { color: var(--primary); border-bottom-color: var(--primary); }

/* Сгруппированная навигация (dropdown) */
.nav-group {
  position: relative;
  display: inline-flex;
  align-items: stretch;
}
.nav-group-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
  user-select: none;
}
.nav-group:hover .nav-group-btn { color: var(--text); }
.nav-group.grp-active .nav-group-btn { color: var(--primary); border-bottom-color: var(--primary); }
.nav-arr { font-size: 10px; opacity: 0.55; transition: transform 0.18s; }
.nav-group:hover .nav-arr { transform: rotate(180deg); }
.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  min-width: 185px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,.1);
  z-index: 200;
  padding: 5px 0;
}
.nav-group:hover .nav-dropdown { display: block; }
.nav-dd-link {
  display: block;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--transition);
}
.nav-dd-link:hover { background: var(--bg-soft); color: var(--text); }
.nav-dd-link.active { color: var(--primary); background: #eff6ff; }
@media (max-width: 600px) {
  .nav-group-btn { padding: 8px 12px; font-size: 13px; }
}

.admin-badge {
  background: #ef4444;
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 4px;
}

/* Карточки статистики */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.admin-stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: box-shadow var(--transition);
}
.admin-stat-card:hover { box-shadow: var(--shadow); }
.stat-tab-link { transition: box-shadow var(--transition), border-color var(--transition); }
.stat-tab-link.stat-active { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.paid-price-filter, .moder-reason-filter { padding: 5px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); color: var(--text); cursor: pointer; font-size: 13px; transition: background var(--transition), color var(--transition), border-color var(--transition); }
.paid-price-filter:hover, .moder-reason-filter:hover { border-color: var(--primary); color: var(--primary); }
.paid-price-filter.active, .moder-reason-filter.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.modal-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:1000; align-items:center; justify-content:center; }
.modal-overlay.active { display:flex; }
.modal-box { background:#fff; border-radius:12px; padding:28px 24px; width:480px; max-width:92vw; box-shadow:0 8px 32px rgba(0,0,0,.2); }
.modal-box h3 { margin:0 0 16px; font-size:18px; }
.modal-box select { width:100%; padding:8px 10px; border:1px solid #e2e8f0; border-radius:6px; font-size:14px; font-family:inherit; margin-bottom:10px; }
.modal-btns { display:flex; gap:8px; justify-content:flex-end; }

.admin-stat-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  font-size: 18px;
}

.admin-stat-queue .admin-stat-icon { background: #fee2e2; color: #ef4444; }
.admin-stat-pages .admin-stat-icon { background: var(--primary-light); color: var(--primary); }
.admin-stat-users .admin-stat-icon { background: #d1fae5; color: #059669; }
.admin-stat-payouts .admin-stat-icon { background: #fef3c7; color: var(--accent-dark); }

.admin-stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.admin-stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.admin-stat-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Карточки */
.admin-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}

.admin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.admin-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

/* Фильтры */
.admin-filters {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.admin-input {
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color var(--transition);
}
.admin-input:focus { border-color: var(--primary); }

.admin-select {
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  outline: none;
}

/* Таблица */
.admin-table-wrap { overflow-x: auto; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table th,
.admin-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-table td:last-child,
.admin-table th:last-child { white-space: nowrap; width: 1%; }

.admin-table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .3px;
  background: var(--bg);
  white-space: nowrap;
}

.admin-table tbody tr:hover { background: var(--bg); }

.admin-table a { color: var(--primary); }
.admin-table a:hover { text-decoration: underline; }

/* Бейджи статусов */
.admin-state-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
.admin-state-published { background: #d1fae5; color: #059669; }
.admin-state-queued { background: #fef3c7; color: var(--accent-dark); }

/* Уникальность */
.admin-un-good, .admin-table a.admin-un-good { color: #059669; font-weight: 700; text-decoration: none; }
.admin-un-bad, .admin-table a.admin-un-bad { color: #ef4444; font-weight: 700; text-decoration: none; }
.admin-un-pending, .admin-table a.admin-un-pending { color: var(--text-muted); font-style: italic; text-decoration: none; }
.admin-table a.admin-un-good:hover { text-decoration: underline; }
.admin-table a.admin-un-bad:hover { text-decoration: underline; }
.admin-table a.admin-un-pending:hover { text-decoration: underline; }

/* AntiGPT */
.admin-ag-good, .admin-table a.admin-ag-good { color: #059669; font-weight: 700; text-decoration: none; }
.admin-ag-warn, .admin-table a.admin-ag-warn { color: #d97706; font-weight: 700; text-decoration: none; }
.admin-ag-bad,  .admin-table a.admin-ag-bad  { color: #ef4444; font-weight: 700; text-decoration: none; }
.admin-table a.admin-ag-good:hover { text-decoration: underline; }
.admin-table a.admin-ag-warn:hover { text-decoration: underline; }
.admin-table a.admin-ag-bad:hover  { text-decoration: underline; }
.admin-ag-pending { color: #2563eb; font-style: italic; font-size: 0.85em; }

/* Модерация — панель */
.moder-panel { margin-top: 16px; }
.expert-status-check { color: #059669; }
.expert-status-working { color: #ef4444; }
.expert-status-addcheck { color: #2563eb; font-weight: 600; }
.time-expired { color: #ef4444; font-weight: 500; }
.time-remaining { color: var(--text-secondary); font-size: 13px; }
.tariff-unpaid { color: #ef4444; font-weight: 600; }

/* Бейджи групп */
.admin-group-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
.admin-group-all { background: var(--bg); color: var(--text-secondary); }
.admin-group-1 { background: #fce7f3; color: #be185d; }
.admin-group-2 { background: var(--bg); color: var(--text-muted); }
.admin-group-3 { background: #fee2e2; color: #ef4444; }
.admin-group-4 { background: var(--bg); color: var(--text-secondary); }
.admin-group-5 { background: var(--primary-light); color: var(--primary); }
.admin-group-6 { background: #d1fae5; color: #059669; }
.admin-group-7 { background: #fef3c7; color: var(--accent-dark); }
.admin-group-8 { background: #ede9fe; color: #7c3aed; }

/* Статистика групп */
.admin-group-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.admin-group-stat-item {
  display: flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  border-radius: 6px;
  padding: 4px 8px 4px 4px;
  border: 1px solid transparent;
  transition: border-color 0.15s, background 0.15s;
}
.admin-group-stat-item:hover {
  border-color: var(--border);
  background: var(--bg);
}
.admin-group-stat-item.active {
  border-color: var(--primary);
  background: var(--primary-light);
}
.admin-group-stat-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  min-width: 18px;
  text-align: right;
}

/* Кнопки */
.btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 6px; }
.btn-success { background: #059669; color: white; border: none; cursor: pointer; transition: background var(--transition); }
.btn-success:hover { background: #047857; }
.btn-danger { background: #ef4444; color: white; border: none; cursor: pointer; transition: background var(--transition); }
.btn-danger:hover { background: #dc2626; }
.btn-warning { background: #f59e0b; color: white; border: none; cursor: pointer; transition: background var(--transition); }
.btn-warning:hover { background: #d97706; }

/* Inline-форма отклонения */
.admin-reject-form {
  margin-top: 8px;
  padding: 8px;
  background: var(--bg);
  border-radius: 6px;
}
.admin-reject-form textarea {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 12px;
  font-family: inherit;
  resize: vertical;
  min-height: 40px;
  margin-bottom: 6px;
}

/* Форма редактирования */
.admin-form-row {
  margin-bottom: 16px;
}
.admin-form-row:last-child { margin-bottom: 0; }

.admin-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.admin-form .admin-input,
.admin-form .admin-select {
  width: 100%;
  box-sizing: border-box;
}

/* Действия в ячейке */
.admin-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}
.admin-actions-row {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}

/* Пагинация */
.admin-pagination {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

.admin-pagination a,
.admin-pagination span {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.admin-pagination a {
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.admin-pagination a:hover { background: var(--bg); }

.admin-pagination .current {
  background: var(--primary);
  color: white;
  border: 1px solid var(--primary);
}

/* Роль — выпадающий список */
.admin-role-form {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.admin-role-select {
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 12px;
  font-family: inherit;
  max-width: 100px;
}

/* Пустое состояние */
.admin-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* Responsive */
@media (max-width: 900px) {
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .admin-stats-grid { grid-template-columns: 1fr; }
  .admin-page { padding: 20px 12px 40px; }
  .admin-nav-link { padding: 8px 12px; font-size: 13px; }
  .admin-stat-value { font-size: 22px; }
  .admin-filters { flex-direction: column; align-items: stretch; }
}

/* ===== CATEGORY PAGE ===== */
.cat-header {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 0;
}
.cat-header h1 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 6px;
}
.cat-desc {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 8px;
}
.cat-count {
  display: inline-block;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.cat-subcategories {
  max-width: 1280px;
  margin: 16px auto 0;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cat-subcat-link {
  display: inline-block;
  padding: 6px 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.cat-subcat-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.cat-toolbar {
  max-width: 1280px;
  margin: 16px auto 0;
  padding: 0 24px;
}
.cat-sort {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text-muted);
}
.cat-sort a {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.cat-sort a:hover { background: var(--bg); color: var(--text); }
.cat-sort a.active { background: var(--primary-light); color: var(--primary); }

.article-date {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}
.article-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.article-score {
  display: inline-block;
  padding: 2px 8px;
  background: #d1fae5;
  color: #065f46;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.cat-types {
  max-width: 1280px;
  margin: 16px auto 0;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cat-type-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.cat-type-link:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.cat-type-link.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.cat-type-count {
  font-size: 11px;
  opacity: .7;
}

.cat-works {
  max-width: 1280px;
  margin: 12px auto 0;
  padding: 0 24px;
}
.cat-works-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 500;
}
.cat-works-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
}
.cat-work-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.cat-work-link:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.cat-work-link.active {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
  font-weight: 600;
}

.cat-group-header {
  padding: 12px 16px 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.cat-group-header:first-child {
  border-top: none;
  margin-top: 0;
}

.cat-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 24px 0;
}
.cat-pagination a,
.cat-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
}
.cat-pagination a {
  color: var(--text-secondary);
  border: 1px solid var(--border);
  background: var(--white);
}
.cat-pagination a:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}
.cat-pagination .current {
  background: var(--primary);
  color: white;
  border: 1px solid var(--primary);
}
.cat-pagination .dots {
  color: var(--text-muted);
  border: none;
}

@media (max-width: 768px) {
  .cat-header { padding: 20px 16px 0; }
  .cat-header h1 { font-size: 22px; }
  .cat-subcategories { padding: 0 16px; }
  .cat-types { padding: 0 16px; }
  .cat-works { padding: 0 16px; }
  .cat-toolbar { padding: 0 16px; }
  .cat-sort { flex-wrap: wrap; }
  .cat-works-list { max-height: 150px; }
  .article-meta { flex-direction: row; gap: 8px; }
}
