html {
  font-size: 15px;
}

:root {
  --p24-primary: #00ba77;
  --p24-primary-hover: #009e65;
  --p24-primary-deep: #007a52;
  --p24-primary-soft: #00c37b;
  --p24-primary-bg: #ecfdf5;
  --p24-primary-muted: #a7f3d0;
  --p24-primary-ring: rgba(0, 186, 119, 0.15);
  --p24-text: #1e293b;
  --p24-muted: #64748b;
  --p24-border: #e2e8f0;
  --p24-bg: #f8fafc;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--p24-text);
  background: var(--p24-bg);
  line-height: 1.5;
}
a { color: var(--p24-primary); text-decoration: none; }
a:hover { color: var(--p24-primary-hover); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--p24-border);
  padding: 14px 0;
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo { font-weight: 800; font-size: 1.35rem; color: var(--p24-text); }
.logo span { color: var(--p24-primary); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 14px;
}
.btn-primary { background: var(--p24-primary); color: #fff; }
.btn-primary:hover { background: var(--p24-primary-hover); color: #fff; }
.btn-outline { background: #fff; border: 1px solid var(--p24-border); color: var(--p24-text); }
.btn-danger { background: #ef4444; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

.card {
  background: #fff;
  border: 1px solid var(--p24-border);
  border-radius: 12px;
  padding: 20px;
}

.vacancy-list { list-style: none; padding: 0; margin: 0; }
.vacancy-list__row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.vacancy-list__logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
}
.vacancy-list__body { flex: 1; min-width: 0; }
.vacancy-single__head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.vacancy-single__logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  flex-shrink: 0;
}
.vacancy-single__head-text { flex: 1; min-width: 0; }
.vacancy-list li {
  padding: 14px 0;
  border-bottom: 1px dashed var(--p24-border);
}
.vacancy-list li:last-child { border-bottom: none; }
.vacancy-list .title { font-weight: 700; font-size: 1.05rem; }
.vacancy-list .meta { color: var(--p24-muted); font-size: 13px; margin-top: 4px; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.badge-vip { background: #fef3c7; color: #92400e; }
.badge-premium { background: #ede9fe; color: #5b21b6; }

/* Admin */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px;
  background: #0f172a;
  color: #e2e8f0;
  padding: 24px 16px;
  flex-shrink: 0;
}
.admin-sidebar a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #cbd5e1;
  margin-bottom: 4px;
  text-decoration: none;
}
.mod-nav-link__label {
  flex: 1;
  min-width: 0;
}
.mod-nav-badge {
  flex-shrink: 0;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fb923c 0%, #ea580c 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 22px;
  text-align: center;
  box-shadow: 0 0 0 2px #0f172a, 0 0 14px rgba(251, 146, 60, 0.85);
  animation: mod-badge-pulse 2s ease-in-out infinite;
}
@keyframes mod-badge-pulse {
  0%, 100% { box-shadow: 0 0 0 2px #0f172a, 0 0 12px rgba(251, 146, 60, 0.75); }
  50% { box-shadow: 0 0 0 2px #0f172a, 0 0 18px rgba(251, 146, 60, 1); }
}
.admin-sidebar a.active .mod-nav-badge {
  background: linear-gradient(180deg, #f87171 0%, #dc2626 100%);
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.5), 0 0 16px rgba(248, 113, 113, 0.95);
}
.admin-sidebar a:hover, .admin-sidebar a.active {
  background: var(--p24-primary-ring);
  color: #fff;
}
.admin-main { flex: 1; padding: 28px 32px; }
.admin-sidebar .brand { font-weight: 800; color: #fff; margin-bottom: 24px; font-size: 1.1rem; }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card { background: #fff; border-radius: 12px; padding: 20px; border: 1px solid var(--p24-border); }
.stat-card .num { font-size: 2rem; font-weight: 800; color: var(--p24-primary); }
.stat-card .lbl { color: var(--p24-muted); font-size: 13px; }

table.data { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; }
table.data th, table.data td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--p24-border); font-size: 14px; }
table.data th { background: #f1f5f9; font-weight: 700; }

.flash-ok {
  background: var(--p24-primary-bg);
  border: 1px solid var(--p24-primary-muted);
  color: #065f46;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
}

/* Moderation zone */
.mod-body { background: #eef1f4; }
.mod-sidebar__hr { border: none; border-top: 1px solid #334155; margin: 16px 0; }
.mod-page-head { margin-bottom: 24px; }
.mod-page-head__title { margin: 0 0 6px; font-size: 1.65rem; font-weight: 800; }
.mod-page-head__lead { margin: 0; color: var(--p24-muted); font-size: 14px; max-width: 560px; }
.mod-users-section__title { margin: 0 0 6px; font-size: 1.15rem; font-weight: 700; }
.mod-users-section__count {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--p24-primary);
  background: var(--p24-primary-bg);
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
}
.mod-users-section__lead { margin: 0 0 16px; color: var(--p24-muted); font-size: 14px; }
.mod-actions-card__title,
.mod-hint-card .mod-actions-card__title { margin: 0 0 12px; font-size: 1rem; font-weight: 700; }
.mod-hint-list { margin: 0; padding-left: 20px; color: var(--p24-muted); font-size: 14px; line-height: 1.6; }
.mod-login-card { max-width: 400px; }
.mod-login-card__badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--p24-primary);
  background: var(--p24-primary-bg);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
}
.mod-login-card__title { margin: 0 0 8px; font-size: 1.5rem; }
.mod-login-card__lead { margin: 0 0 20px; color: var(--p24-muted); font-size: 14px; line-height: 1.5; }
.mod-login-card__error { color: #b91c1c; font-size: 14px; margin: 0 0 12px; }

/* Вкладки-фильтры в модерации (кнопки, не текстовые ссылки) */
.mod-tabs,
.mod-ticket-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
  align-items: center;
}
.mod-tabs a,
.mod-ticket-filters a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 9px 18px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  color: #475569;
  background: #fff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.mod-tabs a:hover,
.mod-ticket-filters a:hover {
  border-color: var(--p24-primary);
  color: var(--p24-primary-deep);
  background: var(--p24-primary-bg);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}
.mod-tabs a.is-active,
.mod-ticket-filters a.is-active {
  background: var(--p24-primary);
  border-color: var(--p24-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}
.mod-tabs a.is-active:hover,
.mod-ticket-filters a.is-active:hover {
  background: var(--p24-primary-deep, #16a34a);
  border-color: var(--p24-primary-deep, #16a34a);
  color: #fff;
}
.mod-tabs__badge,
.mod-ticket-filters__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  background: rgba(15, 23, 42, 0.1);
  color: inherit;
}
.mod-tabs a.is-active .mod-tabs__badge,
.mod-tabs a.is-active .mod-ticket-filters__badge,
.mod-ticket-filters a.is-active .mod-ticket-filters__badge {
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card { width: 100%; max-width: 400px; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--p24-border);
  border-radius: 8px;
  font-size: 15px;
}

.mod-page-head--row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.mod-blog-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}
.mod-blog-form__field label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
}
.mod-blog-form__field input,
.mod-blog-form__field select,
.mod-blog-form__field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--p24-border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}
.mod-blog-form__field--full { grid-column: 1 / -1; }
.mod-blog-form__code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
}
.mod-blog-form__hint {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--p24-muted);
}
.mod-blog-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--p24-border);
}
.mod-blog-form__delete { margin-left: auto; color: #b91c1c; border-color: #fecaca; }
@media (max-width: 720px) {
  .mod-blog-form__grid { grid-template-columns: 1fr; }
}

/* Редактирование профиля в модерации */
.mod-profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.mod-profile-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #fff;
  border: 1px solid var(--p24-border);
  color: #334155;
}
.mod-profile-chip--muted {
  font-weight: 600;
  color: var(--p24-muted);
  background: #f8fafc;
}
.mod-profile-chip--verified {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}
.mod-profile-chip--pending {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}
.mod-profile-chip--none {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #64748b;
}
.mod-profile-alert { margin-bottom: 16px; }
.mod-profile-back {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-top: 20px;
  font-size: 14px;
  font-weight: 600;
}
.mod-profile-back a {
  color: var(--p24-primary);
  text-decoration: none;
}
.mod-profile-back a:hover { text-decoration: underline; }
.mod-profile-empty {
  padding: 24px;
  text-align: center;
  color: var(--p24-muted);
}
.mod-page-head__lead a {
  color: var(--p24-primary);
  text-decoration: none;
  font-weight: 600;
}
.mod-page-head__lead a:hover { text-decoration: underline; }

/* Форма профиля в модерации (не зависит от profile.css на сервере) */
.mod-user-edit-card {
  padding: 28px 32px 32px;
  max-width: 920px;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.06);
}
.mod-user-edit-card .profile-form { margin-top: 0; }
.mod-user-edit-card .profile-avatar-block {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding: 20px 22px;
  background: linear-gradient(135deg, #f0fdf4 0%, #f8fafc 100%);
  border: 1px solid rgba(0, 186, 119, 0.15);
  border-radius: 14px;
}
.mod-user-edit-card .profile-avatar-block__ring {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  overflow: hidden;
  background: #f1f5f9;
  border: 2px solid rgba(0, 186, 119, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mod-user-edit-card .profile-avatar-block__ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mod-user-edit-card .profile-avatar-block__upload span {
  display: inline-block;
  padding: 8px 14px;
  background: var(--p24-primary-bg);
  color: var(--p24-primary);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.mod-user-edit-card .profile-avatar-block__upload input { display: none; }
.mod-user-edit-card .profile-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}
.mod-user-edit-card .profile-form__field--full { grid-column: 1 / -1; }
.mod-user-edit-card .profile-form__section-head {
  grid-column: 1 / -1;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}
.mod-user-edit-card .profile-form__section-head--first {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.mod-user-edit-card .profile-form__section-title {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}
.mod-user-edit-card .profile-form__section-lead {
  margin: 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.45;
}
.mod-user-edit-card .profile-form__field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--p24-text);
}
.mod-user-edit-card .profile-form__field input,
.mod-user-edit-card .profile-form__field select,
.mod-user-edit-card .profile-form__field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--p24-border);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  box-sizing: border-box;
}
.mod-user-edit-card .profile-form__field input:focus,
.mod-user-edit-card .profile-form__field select:focus,
.mod-user-edit-card .profile-form__field textarea:focus {
  outline: none;
  border-color: var(--p24-primary);
  box-shadow: 0 0 0 3px var(--p24-primary-ring);
}
.mod-user-edit-card .profile-form__readonly,
.mod-user-edit-card .profile-form__field input[readonly] {
  background: #f8fafc;
  color: var(--p24-muted);
}
.mod-user-edit-actions {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
@media (max-width: 768px) {
  .mod-user-edit-card .profile-form__grid { grid-template-columns: 1fr; }
  .mod-user-edit-card { padding: 20px 16px 24px; }
}
