/* ===== Variables & Reset ===== */
:root {
  --green-900: #1a3d2e;
  --green-800: #234d38;
  --green-700: #2d6a4f;
  --green-600: #3a8a64;
  --green-500: #52b788;
  --green-400: #74c69d;
  --green-100: #d8f3dc;
  --green-50: #f0faf3;
  --green-light: #e8f5e9;
  --text: #1f2937;
  --text-muted: #6b7280;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --radius: 10px;
  --radius-sm: 8px;
  --header-h: 70px;
  --topbar-h: 40px;
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--gray-50);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--green-700); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--green-500); }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Top bar ===== */
.topbar {
  background: var(--green-900);
  color: rgba(255,255,255,0.9);
  font-size: 0.85rem;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.topbar a { color: rgba(255,255,255,0.9); }
.topbar a:hover { color: #fff; }

.topbar-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-cabinet {
  background: var(--green-600);
  color: #fff !important;
  padding: 6px 16px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background var(--transition);
}
.btn-cabinet:hover { background: var(--green-500); color: #fff !important; }

/* ===== Header / Nav ===== */
.header {
  background: var(--white);
  box-shadow: 0 1px 0 var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 900;
  height: var(--header-h);
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--green-900);
}
.logo:hover { color: var(--green-800); }

.logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--green-600), var(--green-800));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.logo-text strong {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.logo-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 8px 14px;
  border-radius: 6px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
}
.nav-link:hover { color: var(--green-700); background: var(--green-50); }
.nav-link.active {
  color: var(--green-700);
}
.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 14px;
  right: 14px;
  height: 2.5px;
  background: var(--green-600);
  border-radius: 2px;
}

.nav-search {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  margin-left: 8px;
}
.nav-search:hover { background: var(--gray-100); color: var(--green-700); }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.burger span {
  width: 22px;
  height: 2.5px;
  background: var(--green-900);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  height: 480px;
  overflow: hidden;
  background: var(--green-900);
}

.hero-slider {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: #1a3d2e;
  opacity: 0;
  transform: scale(1);
  transition: none;
  will-change: opacity, transform;
  z-index: 0;
}
/* Первая картинка видна сразу, без анимации появления */
.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}
/* Плавные переходы только после готовности слайдера */
.hero-slider.is-ready .hero-slide {
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1),
              transform 8s ease-out;
}
.hero-slider.is-ready .hero-slide.active {
  transform: scale(1.06);
}
.hero-slide.is-leaving {
  opacity: 0;
  transform: scale(1.02);
  z-index: 0;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1),
              transform 1.2s ease-out;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(90deg, rgba(26,61,46,0.85) 0%, rgba(26,61,46,0.45) 55%, rgba(26,61,46,0.2) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 560px;
  color: #fff;
  animation: heroFadeIn 1s ease 0.3s both;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 14px;
}
.hero h1 span { color: var(--green-400); }

.hero p {
  font-size: 1.1rem;
  opacity: 0.92;
  margin-bottom: 28px;
  max-width: 420px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--green-600);
  color: #fff;
}
.btn-primary:hover {
  background: var(--green-500);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(45,106,79,0.35);
}
.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.5);
  color: #fff;
}
.btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: #fff;
  color: #fff;
}
.btn-sm { padding: 8px 16px; font-size: 0.875rem; }
.btn-block { width: 100%; }
.btn-light {
  background: var(--white);
  color: var(--green-800);
  border: 1px solid var(--gray-200);
}
.btn-light:hover {
  background: var(--green-50);
  border-color: var(--green-400);
  color: var(--green-800);
}

.btn-danger {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.btn-danger:hover {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}

.poll-export-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.poll-admin-actions {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-200);
}
.poll-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-200);
}
.poll-edit .form-group {
  margin-bottom: 14px;
}

.hero-arrows {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  backdrop-filter: blur(6px);
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.hero-arrows:hover {
  background: rgba(255,255,255,0.4);
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 4px 18px rgba(0,0,0,0.25);
}
.hero-arrows:active { transform: translateY(-50%) scale(0.96); }
.hero-prev { left: 20px; }
.hero-next { right: 20px; }

.hero-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  gap: 10px;
  align-items: center;
}
.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease, width 0.3s ease;
  border: none;
  padding: 0;
}
.hero-dot:hover { background: rgba(255,255,255,0.75); transform: scale(1.15); }
.hero-dot.active {
  background: #fff;
  width: 28px;
  border-radius: 5px;
  transform: scale(1);
}

/* ===== Quick actions ===== */
.quick-actions {
  margin-top: -40px;
  position: relative;
  z-index: 10;
  padding-bottom: 40px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  background: var(--white);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  padding: 8px;
}

.quick-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 22px 12px;
  border-radius: 10px;
  color: var(--text);
  transition: all var(--transition);
}
.quick-card:hover {
  background: var(--green-50);
  color: var(--green-800);
}
.quick-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--green-50);
  color: var(--green-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 12px;
  transition: all var(--transition);
}
.quick-card:hover .quick-icon {
  background: var(--green-100);
  color: var(--green-700);
}
.quick-card strong {
  font-size: 0.95rem;
  margin-bottom: 4px;
  display: block;
}
.quick-card span {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* ===== Main content sections ===== */
.section {
  padding: 48px 0;
}
.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--green-900);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2.5px solid var(--green-500);
  display: inline-block;
}

.home-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.85fr;
  gap: 28px;
}

/* News list */
.news-list { display: flex; flex-direction: column; gap: 0; }
.news-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--gray-200);
}
.news-item:last-child { border-bottom: none; }
.news-date {
  font-size: 0.8rem;
  color: var(--green-600);
  font-weight: 600;
  margin-bottom: 4px;
}
.news-item h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}
.news-item h3 a:hover { color: var(--green-600); }
.news-item p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Announcements */
.ann-list { display: flex; flex-direction: column; gap: 10px; }
.ann-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--green-50);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  transition: background var(--transition);
}
.ann-item:hover { background: var(--green-100); }
.ann-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
  color: var(--green-600);
}

/* Quick access sidebar */
.access-list { display: flex; flex-direction: column; gap: 10px; }
.access-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--green-50);
  border-radius: 10px;
  color: var(--green-800);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all var(--transition);
}
.access-btn:hover {
  background: var(--green-100);
  color: var(--green-900);
  transform: translateX(3px);
}
.access-btn .icon {
  width: 28px;
  text-align: center;
  font-size: 1.1rem;
}

/* ===== Page header (inner pages) ===== */
.page-header {
  background: linear-gradient(135deg, var(--green-800), var(--green-700));
  color: #fff;
  padding: 40px 0 36px;
}
.page-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.page-header p { opacity: 0.85; font-size: 1rem; }

/* ===== Cards / content blocks ===== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  border: 1px solid var(--gray-200);
}
.card + .card { margin-top: 16px; }

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.doc-card, .gallery-item {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.doc-card:hover, .gallery-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.doc-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
}
.doc-card .icon {
  font-size: 1.8rem;
  color: var(--green-600);
}
.doc-card h3 { font-size: 1rem; margin-bottom: 2px; }
.doc-card p { font-size: 0.85rem; color: var(--text-muted); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.gallery-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.gallery-item .cap {
  padding: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ===== Auth / Cabinet ===== */
.auth-page {
  min-height: calc(100vh - var(--topbar-h) - var(--header-h) - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.auth-box {
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  padding: 36px 32px;
  border: 1px solid var(--gray-200);
}
.auth-box h1 {
  font-size: 1.5rem;
  color: var(--green-900);
  margin-bottom: 6px;
  text-align: center;
}
.auth-box .subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: 0.95rem;
  transition: border-color var(--transition);
  background: var(--white);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(82,183,136,0.2);
}
.form-group textarea { min-height: 100px; resize: vertical; }

.form-error {
  background: #fef2f2;
  color: #b91c1c;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.875rem;
  margin-bottom: 16px;
  display: none;
}
.form-error.show { display: block; }

.form-success {
  background: var(--green-50);
  color: var(--green-800);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.875rem;
  margin-bottom: 16px;
  display: none;
}
.form-success.show { display: block; }

.demo-accounts {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-200);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.demo-accounts strong { color: var(--text); }
.demo-accounts code {
  background: var(--gray-100);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* Cabinet layout */
.cabinet-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  padding: 32px 0 48px;
  min-height: 500px;
}

.cabinet-sidebar {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  padding: 20px 0;
  height: fit-content;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}

.cabinet-user {
  padding: 0 20px 16px;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 12px;
}
.cabinet-user .name {
  font-weight: 600;
  color: var(--green-900);
}
.cabinet-user .role {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.cabinet-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  color: var(--text);
  font-size: 0.95rem;
  transition: all var(--transition);
}
.cabinet-nav a:hover,
.cabinet-nav a.active {
  background: var(--green-50);
  color: var(--green-700);
}
.cabinet-nav a.active { font-weight: 600; border-right: 3px solid var(--green-600); }

.cabinet-content h2 {
  font-size: 1.35rem;
  color: var(--green-900);
  margin-bottom: 20px;
}

/* Polls */
.poll-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
}
.poll-card h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}
.poll-desc {
  font-size: 0.95rem;
  color: var(--text);
  margin: 0 0 12px;
  line-height: 1.45;
}
.poll-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.poll-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 0.9rem;
}
.poll-status .poll-period {
  font-size: 0.85rem;
  opacity: 0.9;
}
.status-open {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.status-closed {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.status-upcoming {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.poll-preview-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.poll-preview-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--text);
}
.poll-preview-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green-800);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.poll-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all var(--transition);
}
.poll-option:hover { border-color: var(--green-400); background: var(--green-50); }
.poll-option.selected {
  border-color: var(--green-600);
  background: var(--green-50);
}
.poll-option input { accent-color: var(--green-600); }
.poll-bar {
  height: 8px;
  background: var(--gray-100);
  border-radius: 4px;
  margin-top: 6px;
  overflow: hidden;
}
.poll-bar-fill {
  height: 100%;
  background: var(--green-500);
  border-radius: 4px;
  transition: width 0.4s ease;
}
.poll-result {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-top: 4px;
  color: var(--text-muted);
}

.poll-voters {
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--green-50);
  border-radius: 8px;
  border: 1px solid rgba(45, 106, 79, 0.12);
}
.poll-voters-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--green-800);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.poll-voters-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.poll-voters-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text);
}
.voter-plot {
  font-weight: 700;
  color: var(--green-700);
  min-width: 52px;
  flex-shrink: 0;
}
.voter-name {
  color: var(--text);
}

/* Table */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th, td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}
th {
  background: var(--green-50);
  font-weight: 600;
  color: var(--green-900);
  font-size: 0.85rem;
}
tr:hover td { background: var(--gray-50); }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-admin { background: #fef3c7; color: #92400e; }
.badge-member { background: var(--green-100); color: var(--green-800); }

/* ===== Footer ===== */
.footer {
  background: var(--green-900);
  color: rgba(255,255,255,0.85);
  padding: 48px 0 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr 1.2fr;
  gap: 32px;
  padding-bottom: 36px;
}

.footer h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 14px;
  font-weight: 600;
}
.footer p, .footer a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.6;
}
.footer a:hover { color: #fff; }

.footer-brand p { margin-top: 8px; }
.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}
.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #fff;
}
.footer-social a:hover { background: var(--green-600); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
}

/* ===== Utilities ===== */
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.hidden { display: none !important; }
.text-center { text-align: center; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .quick-grid { grid-template-columns: repeat(3, 1fr); }
  .home-grid { grid-template-columns: 1fr 1fr; }
  .home-grid > *:last-child { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cabinet-layout { grid-template-columns: 1fr; }
  .cabinet-sidebar { position: static; }
}

@media (max-width: 768px) {
  .topbar-left span:not(.topbar-item) { display: none; }
  .burger { display: flex; }
  .nav {
    position: fixed;
    top: calc(var(--topbar-h) + var(--header-h));
    left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 12px 16px 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 800;
  }
  .nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-link { width: 100%; padding: 12px 16px; }
  .nav-link.active::after { display: none; }
  .nav-link.active { background: var(--green-50); }

  .hero { height: 400px; }
  .hero-content { max-width: 100%; padding-right: 20px; }
  .hero-arrows { display: none; }

  .quick-grid { grid-template-columns: 1fr 1fr; }
  .home-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 480px) {
  .quick-grid { grid-template-columns: 1fr; }
  .topbar-right .topbar-item:not(.btn-cabinet) { display: none; }
}


.logout-link {
  color: #b91c1c !important;
  font-weight: 500;
}
.logout-link:hover {
  background: #fef2f2 !important;
  color: #991b1b !important;
}


.gallery-caption {
  padding: 10px 12px;
  font-size: 0.9rem;
  color: var(--text);
  background: #fff;
}
.gallery-item {
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}


/* Предупреждение о долге в кабинете */
.debt-warning {
  margin-bottom: 20px;
  border-radius: 12px;
  border: 1px solid #fbbf24;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  box-shadow: 0 2px 8px rgba(180, 83, 9, 0.12);
}
.debt-warning-inner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
}
.debt-warning-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}
.debt-warning-text {
  flex: 1;
  min-width: 0;
}
.debt-warning-text strong {
  color: #92400e;
  display: block;
  margin-bottom: 4px;
  font-size: 1.02rem;
}
.debt-warning-text p {
  margin: 0;
  color: #78350f;
  font-size: 0.92rem;
  line-height: 1.45;
}
.debt-warning-close {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: #92400e;
  cursor: pointer;
  padding: 0 4px;
  opacity: 0.7;
}
.debt-warning-close:hover {
  opacity: 1;
}


/* Заявки на регистрацию — бейдж */
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-left: 6px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}
.cabinet-nav a.has-notify {
  background: #fef2f2;
  color: #991b1b;
  font-weight: 600;
}
.reg-status {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}
.reg-status.status-pending {
  background: #fef3c7;
  color: #92400e;
}
.reg-status.status-accepted {
  background: #d1fae5;
  color: #065f46;
}
.reg-status.status-rejected {
  background: #f3f4f6;
  color: #6b7280;
}
.reg-app-pending {
  border-color: #fbbf24;
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.35);
}


.news-item-photo {
  margin-bottom: 10px;
  border-radius: 10px;
  overflow: hidden;
}
.news-item-photo img {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  display: block;
}




/* Выбор иконки */
.icon-picker {
  position: relative;
  display: inline-block;
}
.icon-picker-btn {
  width: 48px;
  height: 48px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.icon-picker-btn:hover {
  border-color: var(--green-600, #2d6a4f);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.12);
}
.icon-picker-popup {
  position: absolute;
  z-index: 50;
  top: calc(100% + 6px);
  left: 0;
  width: 280px;
  max-height: 220px;
  overflow: auto;
  padding: 10px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
.icon-picker-popup.hidden {
  display: none;
}
.icon-option {
  width: 100%;
  aspect-ratio: 1;
  border: none;
  border-radius: 8px;
  background: #f9fafb;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.icon-option:hover {
  background: #ecfdf5;
  transform: scale(1.08);
}


/* Памятка по оплате */
.pay-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.pay-modal.hidden {
  display: none !important;
}
.pay-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}
.pay-modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.18);
}
.pay-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 4px 8px;
}
.pay-modal-close:hover { color: #0f172a; }
.pay-modal-card h2 {
  margin: 0 0 12px;
  font-size: 1.25rem;
  color: var(--green-800, #1b4332);
}
.pay-modal-lead {
  margin: 0 0 18px;
  font-size: 0.98rem;
  line-height: 1.5;
  color: #334155;
}
.pay-codes {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.pay-code-item {
  border: 1px solid #bbf7d0;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border-radius: 12px;
  padding: 14px 16px;
  text-align: center;
}
.pay-code-item-alt {
  border-color: #bfdbfe;
  background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
}
.pay-code-label {
  font-size: 0.9rem;
  color: #475569;
  margin-bottom: 6px;
  font-weight: 500;
}
.pay-code-value {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--green-800, #14532d);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.pay-code-item-alt .pay-code-value {
  color: #1e40af;
}
.pay-modal-note {
  font-size: 0.85rem;
  margin: 0 0 18px;
  line-height: 1.45;
}
.pay-modal-card .btn {
  width: 100%;
}


.archive-item-head {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  padding: 0;
  font: inherit;
  color: inherit;
}
.archive-item-head:hover strong { color: var(--green-700, #2d6a4f); }
.archive-chevron { color: #94a3b8; font-size: 0.75rem; }
.archive-item-body {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}


.badge-board {
  background: #dbeafe;
  color: #1e40af;
}
