/* ==========================================================================
   УЧЕНИЧЕСКИ ПАРЛАМЕНТ - СУ "П. Р. СЛАВЕЙКОВ", ГР. КЪРДЖАЛИ
   ДИЗАЙН СИСТЕМА КИМИ К3 (LIGHT / DARK THEME, GLASSMORPHISM, TOP-LAYER DIALOGS)
   ========================================================================== */

:root {
  /* Основни бранд цветове (СУ „П. Р. Славейков“ - Кърджали) */
  --slaveykov-gold-1: #c89b3c;
  --slaveykov-gold-2: #9b7522;
  --slaveykov-gold-3: #6b5013;
  --primary-gold: #835f11;
  --primary-gold-hover: #6b4d0c;
  --primary-gold-light: #dfb15b;
  --primary-gold-subtle: rgba(131, 95, 17, 0.12);
  --primary-gold-border: rgba(131, 95, 17, 0.35);

  --primary-red: #dc2626;
  --primary-red-hover: #b91c1c;
  --primary-red-subtle: rgba(220, 38, 38, 0.12);

  --accent-green: #10b981;
  --accent-green-hover: #059669;
  --accent-green-subtle: rgba(16, 185, 129, 0.14);

  --accent-blue: #2563eb;
  --accent-blue-subtle: rgba(37, 99, 235, 0.12);

  /* Светла тема (по подразбиране) */
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-glass: rgba(255, 255, 255, 0.88);
  --bg-banner: linear-gradient(135deg, #1e1b15 0%, #342813 45%, #594318 100%);
  --bg-hero: linear-gradient(135deg, #13120f 0%, #292010 40%, #4a3816 85%, #634b1c 100%);

  --text-dark: #0f172a;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-white: #ffffff;

  --border-light: #e2e8f0;
  --border-color: #cbd5e1;
  --border-focus: var(--primary-gold-light);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 6px 16px -2px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 14px 28px -4px rgba(0, 0, 0, 0.12);
  --shadow-gold: 0 8px 24px -4px rgba(200, 155, 60, 0.28);

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ==========================================================================
   ТЪМНА ТЕМА (DARK MODE) - ЕЛИТЕН КИМИ К3 ДИЗАЙН
   ========================================================================== */
[data-theme="dark"] {
  --bg-main: #0b0f19;
  --bg-surface: #111827;
  --bg-card: #151e32;
  --bg-subtle: #1e293b;
  --bg-glass: rgba(17, 24, 39, 0.92);
  --bg-banner: linear-gradient(135deg, #0a0907 0%, #1a150c 50%, #2f230f 100%);
  --bg-hero: linear-gradient(135deg, #07090e 0%, #111520 40%, #1e1910 80%, #2f2510 100%);

  --text-dark: #f8fafc;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --border-light: #1e293b;
  --border-color: #334155;
  --border-focus: var(--primary-gold-light);
  --primary-gold: #dfb15b;
  --primary-gold-hover: #ffda6a;
  --primary-gold-subtle: rgba(223, 177, 91, 0.18);
  --primary-gold-border: rgba(223, 177, 91, 0.4);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 18px 36px rgba(0, 0, 0, 0.65);
  --shadow-gold: 0 8px 24px -2px rgba(223, 177, 91, 0.22);
}

/* Базови правила */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
  touch-action: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

:focus-visible {
  outline: 2px solid var(--primary-gold-light);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 20px;
  background: var(--primary-gold);
  color: white;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  z-index: 9999;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 15px;
}

.container {
  width: 100%;
  max-width: 1260px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ==========================================================================
   ИНДИКАТОР ЗА ЧЕТЕНЕ (SCROLL PROGRESS BAR)
   ========================================================================== */
#scrollProgressBar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3.5px;
  background: linear-gradient(90deg, #c89b3c, #f3cf7a, #dc2626);
  z-index: 9999;
  box-shadow: 0 0 8px rgba(223, 177, 91, 0.7);
  transition: width 0.1s linear;
}


/* ==========================================================================
   БАНЕР ЗА ОБРАТНО БРОЕНЕ НА СЪБИТИЯ (COUNTDOWN STRIP)
   ========================================================================== */
.countdown-banner-strip {
  background: linear-gradient(90deg, #1c1508 0%, #30240d 50%, #1c1508 100%);
  color: white;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(223, 177, 91, 0.3);
  font-size: 0.825rem;
}

.countdown-content-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.countdown-event-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: #ffda6a;
}

.countdown-digits-grid {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.countdown-unit {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(223, 177, 91, 0.35);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
}

.countdown-val {
  font-weight: 800;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
}

.countdown-lbl {
  font-size: 0.675rem;
  color: #dfb15b;
  text-transform: uppercase;
}

/* ==========================================================================
   ДВУСТЕПЕНЕН ОФИЦИАЛЕН ХЕДЪР (SLAVEYKOV MASTER HEADER)
   ========================================================================== */
.main-school-header {
  background: var(--bg-banner);
  color: var(--text-white);
  padding: 12px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  z-index: 101;
}

.header-top-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  position: relative;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
  flex-shrink: 0;
  min-width: max-content;
}

.school-crest-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4));
  transition: transform var(--transition-spring);
  flex-shrink: 0;
}

.brand-wrapper:hover .school-crest-img {
  transform: scale(1.05) rotate(-2deg);
}

.brand-text-block {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.school-main-name {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #ffffff;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  text-transform: uppercase;
}

.parliament-sub-name {
  font-size: 0.875rem;
  color: #ffd875;
  font-weight: 700;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.parliament-sub-name::before {
  content: '★';
  color: #ffda6a;
  font-size: 0.75rem;
}

.school-motto-tag {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.72);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  margin-top: 1px;
}

/* ==========================================================================
   ЕЛИТЕН ХЕДЪР - ДЯСНА КОНТРОЛНА ЧАСТ (HEADER ACTIONS & USER PROFILE)
   ========================================================================== */
.header-top-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

/* 1. Обединен панел с помощни инструменти (Tools Cluster) */
.header-tools-cluster {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  height: 34px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 0 5px;
  border-radius: 9999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: border-color var(--transition-fast);
}

.header-tools-cluster:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

/* Бутон за търсене в клъстъра */
.cmd-palette-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  height: 26px;
  padding: 0 0.55rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.cmd-palette-trigger-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--primary-gold-light);
  color: #ffffff;
}

.cmd-icon {
  font-size: 0.8rem;
}

.kbd-shortcut-pill {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  padding: 0 4px;
  font-size: 0.625rem;
  font-family: monospace;
  letter-spacing: 0.3px;
  color: rgba(255, 255, 255, 0.85);
}

.tools-divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.18);
  margin: 0 1px;
}

/* Иконни бутони вътре в клъстъра */
.header-icon-btn,
.theme-toggle-btn,
.sound-toggle-btn,
.a11y-toggle-btn,
.notif-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.9);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.925rem;
  position: relative;
  transition: all var(--transition-fast);
  padding: 0;
  flex-shrink: 0;
}

.header-icon-btn:hover,
.theme-toggle-btn:hover,
.sound-toggle-btn:hover,
.a11y-toggle-btn:hover,
.notif-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: scale(1.08);
}

.a11y-toggle-btn svg {
  width: 15px;
  height: 15px;
  display: block;
  fill: currentColor;
  transition: transform var(--transition-fast);
}

.notif-badge {
  position: absolute;
  top: -2px;
  right: -3px;
  background: #dc2626;
  color: #ffffff;
  font-size: 0.58rem;
  font-weight: 800;
  min-width: 14px;
  height: 14px;
  line-height: 12px;
  text-align: center;
  border-radius: 9999px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  border: 1.5px solid #1a1712;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* Индикатор за връзка на живо (SSE) - скрит от лентата с инструменти */
.live-status-pill {
  display: none !important;
}

/* Разделител между секциите в хедъра */
.header-section-divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

/* 2. Потребителски сектор (User Account Section) */
.user-account-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

/* Компактен златен бутон за вход към Админ панела */
.header-admin-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 34px;
  padding: 0 0.65rem;
  background: linear-gradient(135deg, rgba(223, 177, 91, 0.22) 0%, rgba(200, 155, 60, 0.42) 100%);
  border: 1px solid rgba(223, 177, 91, 0.7);
  border-radius: 9999px;
  color: #fff2c4 !important;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: all var(--transition-fast);
  cursor: pointer;
  white-space: nowrap;
}

.header-admin-pill:hover {
  background: linear-gradient(135deg, rgba(223, 177, 91, 0.4) 0%, rgba(200, 155, 60, 0.65) 100%);
  border-color: #ffd875;
  box-shadow: 0 0 12px rgba(223, 177, 91, 0.45);
  transform: translateY(-1px);
  color: #ffffff !important;
}

.admin-crown {
  font-size: 0.8rem;
}

/* Контейнер за падащо меню на профила */
.user-profile-menu-container {
  position: relative;
}

/* Елегантен профилен бейдж (User Badge Button) */
.header-user-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 34px;
  padding: 2px 0.75rem 2px 3px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9999px;
  color: #ffffff;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all var(--transition-fast);
}

.header-user-badge:hover,
.header-user-badge.active {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--primary-gold-light);
  box-shadow: 0 3px 12px rgba(223, 177, 91, 0.25);
  transform: translateY(-1px);
}

.user-badge-avatar {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.user-avatar-img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--primary-gold-light);
  display: block;
}

.user-avatar-initials {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c89b3c 0%, #6b5013 100%);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.725rem;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.user-badge-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.user-badge-name {
  font-size: 0.775rem;
  font-weight: 700;
  color: #ffffff;
}

.user-badge-grade {
  font-size: 0.65rem;
  font-weight: 700;
  color: #ffd875;
  background: rgba(200, 155, 60, 0.22);
  padding: 1px 5px;
  border-radius: 9999px;
  border: 1px solid rgba(200, 155, 60, 0.4);
}

.user-badge-caret {
  font-size: 0.65rem;
  opacity: 0.75;
  transition: transform var(--transition-fast);
  margin-left: 1px;
}

.header-user-badge:hover .user-badge-caret,
.header-user-badge.active .user-badge-caret {
  opacity: 1;
  transform: translateY(1px);
}

/* Луксозна падаща карта на потребителя (User Dropdown Card) */
.user-dropdown-card {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 290px;
  background: rgba(18, 16, 12, 0.97);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(223, 177, 91, 0.45);
  border-radius: var(--radius-md, 12px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 20px rgba(223, 177, 91, 0.15);
  z-index: 1000;
  padding: 0.85rem;
  animation: dropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .user-dropdown-card {
  background: rgba(11, 15, 25, 0.98);
  border-color: rgba(223, 177, 91, 0.35);
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dropdown-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
}

.dropdown-avatar {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.dropdown-avatar .user-avatar-img,
.dropdown-avatar .user-avatar-initials {
  width: 38px;
  height: 38px;
  font-size: 0.95rem;
}

.dropdown-details {
  flex: 1;
  min-width: 0;
}

.dropdown-fullname {
  font-size: 0.85rem;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-email {
  font-size: 0.725rem;
  color: rgba(255, 255, 255, 0.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25rem;
}

.dropdown-tags {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.dropdown-chip {
  font-size: 0.625rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.chip-admin {
  background: rgba(220, 38, 38, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(220, 38, 38, 0.4);
}

.chip-student {
  background: rgba(200, 155, 60, 0.2);
  color: #ffd875;
  border: 1px solid rgba(200, 155, 60, 0.35);
}

.chip-sso {
  background: rgba(66, 133, 244, 0.18);
  color: #93c5fd;
  border: 1px solid rgba(66, 133, 244, 0.35);
}

.dropdown-card-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
  margin: 0.5rem -0.85rem;
}

.dropdown-card-menu {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.25rem 0;
}

.dropdown-menu-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-xs, 6px);
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.775rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast);
}

.dropdown-menu-item:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  transform: translateX(3px);
}

.dropdown-menu-item.item-gold {
  background: rgba(223, 177, 91, 0.14);
  border: 1px solid rgba(223, 177, 91, 0.35);
  color: #ffd875;
}

.dropdown-menu-item.item-gold:hover {
  background: rgba(223, 177, 91, 0.25);
  border-color: #ffd875;
  color: #ffffff;
}

.item-emoji {
  font-size: 0.9rem;
  width: 18px;
  text-align: center;
}

.item-name {
  flex: 1;
}

.item-badge {
  font-size: 0.625rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--primary-gold);
  color: #ffffff;
}

.dropdown-card-footer {
  padding-top: 0.25rem;
}

.dropdown-logout-action {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-xs, 6px);
  background: transparent;
  border: 1px solid transparent;
  color: #fca5a5;
  font-size: 0.775rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.dropdown-logout-action:hover {
  background: rgba(220, 38, 38, 0.2);
  border-color: rgba(220, 38, 38, 0.4);
  color: #ffffff;
}

/* Компактен иконен бутон за бърз изход директно в хедъра */
.header-quick-logout-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0;
  flex-shrink: 0;
}

.header-quick-logout-icon:hover {
  background: rgba(220, 38, 38, 0.22);
  border-color: rgba(239, 68, 68, 0.6);
  color: #fca5a5;
  transform: scale(1.08);
}

/* 3. Бутон за официалния училищен сайт (SLAVEYKOV.BG ↗) */
.official-site-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 34px;
  padding: 0 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9999px;
  color: #ffffff;
  font-size: 0.725rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.official-site-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #ffffff;
  transform: translateY(-1px);
}

.ext-site-arrow {
  font-size: 0.8rem;
  transition: transform var(--transition-fast);
}

.official-site-btn:hover .ext-site-arrow {
  transform: translate(2px, -2px);
}

/* Ниво 2: Фиксирана навигационна лента (Sticky Glass Bar) */
.sticky-nav-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(18, 16, 12, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(200, 155, 60, 0.22);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

[data-theme="dark"] .sticky-nav-bar {
  background: rgba(11, 15, 25, 0.94);
  border-bottom: 1px solid rgba(200, 155, 60, 0.2);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
}

.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
}

.nav-item {
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-link {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 16px;
  color: #f1f5f9;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  transition: background-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover {
  background-color: rgba(200, 155, 60, 0.15);
  color: var(--primary-gold-light);
}

.nav-link.active {
  color: var(--primary-gold-light);
  border-bottom: 3px solid var(--primary-gold);
}

[data-theme="dark"] .nav-link.active {
  color: var(--primary-gold-light);
  border-bottom-color: var(--primary-gold-light);
}

.nav-special-link {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 100%;
  padding: 0 16px;
  color: #ef4444;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  transition: background-color 0.2s ease;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-special-link:hover {
  background-color: rgba(220, 38, 38, 0.2);
}

.pulse-dot {
  width: 9px;
  height: 9px;
  background-color: var(--primary-red);
  border-radius: 50%;
  display: inline-block;
  animation: pulseDot 1.6s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 7px rgba(220, 38, 38, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

.sticky-brand-mini {
  display: none;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.sticky-crest-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
  flex-shrink: 0;
}

.sticky-brand-title {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #ffffff;
  white-space: nowrap;
}

.mobile-drawer-extra {
  display: none;
}

.mobile-menu-backdrop {
  display: none;
  position: fixed;
  top: 54px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 15, 25, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
}

.mobile-menu-backdrop.open {
  display: block;
}

.mobile-menu-btn {
  display: none;
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(223, 177, 91, 0.55);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  color: #ffffff;
  letter-spacing: 0.5px;
  transition: all var(--transition-fast);
  min-height: 40px;
  min-width: 88px;
}

.mobile-menu-btn:hover {
  background: rgba(223, 177, 91, 0.2);
  border-color: var(--primary-gold-light);
  color: var(--primary-gold-light);
}

.mobile-menu-btn.active {
  background: var(--primary-gold);
  border-color: var(--primary-gold);
  color: #1a1712;
}

.burger-icon {
  font-size: 1.05rem;
  line-height: 1;
}

.burger-text {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.4px;
}

/* ==========================================================================
   БУТОНИ И ОБЩИ ИНТЕРФЕЙСНИ КОМПОНЕНТИ
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-weight: 700;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-normal);
  border: none;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}

.btn:active::after {
  width: 250px;
  height: 250px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--slaveykov-gold-1), var(--slaveykov-gold-2));
  color: white;
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-gold-light), var(--slaveykov-gold-1));
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(200, 155, 60, 0.4);
}

.btn-red {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-red:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.4);
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-dark);
  border: 1.5px solid var(--border-color);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  border-color: var(--primary-gold);
  color: var(--primary-gold);
  background-color: var(--bg-subtle);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.775rem;
}

.header-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 36px;
  padding: 0 1rem;
  background: linear-gradient(135deg, rgba(200, 155, 60, 0.25) 0%, rgba(200, 155, 60, 0.45) 100%);
  border: 1.5px solid rgba(223, 177, 91, 0.65);
  border-radius: var(--radius-sm, 8px);
  color: #ffffff !important;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
}

.header-login-btn:hover {
  background: linear-gradient(135deg, rgba(200, 155, 60, 0.45) 0%, rgba(200, 155, 60, 0.7) 100%);
  border-color: #fbbf24;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(200, 155, 60, 0.35);
}

.header-login-btn:active {
  transform: translateY(0);
}

.header-login-btn span {
  color: #ffffff !important;
}

/* ==========================================================================
   HERO СЕКЦИЯ (КИМИ К3 CINEMATIC EXPERIENCE)
   ========================================================================== */
.hero-section {
  position: relative;
  background: var(--bg-hero);
  color: white;
  padding: 5rem 0 4rem;
  overflow: hidden;
  border-bottom: 4px solid var(--primary-gold);
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(223, 177, 91, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
  pointer-events: none;
  filter: blur(40px);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(223, 177, 91, 0.16);
  border: 1px solid var(--primary-gold-light);
  color: #ffda6a;
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 1.25rem;
  box-shadow: 0 0 15px rgba(223, 177, 91, 0.2);
}

.hero-title {
  font-size: clamp(2.1rem, 3.8vw, 3.2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.hero-title span {
  background: linear-gradient(135deg, #ffffff 20%, #ffe28a 70%, #dfb15b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: #e2e8f0;
  margin-bottom: 2rem;
  line-height: 1.7;
  max-width: 620px;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

/* Карта на председателя */
.president-card {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-top: 3px solid var(--primary-gold-light);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4);
  position: relative;
  transition: transform var(--transition-normal);
}

.president-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 218, 106, 0.5);
}

.president-badge {
  position: absolute;
  top: -12px;
  right: 18px;
  background: linear-gradient(135deg, var(--slaveykov-gold-1), var(--slaveykov-gold-2));
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  letter-spacing: 0.4px;
}

.president-header {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  margin-bottom: 1.15rem;
}

.president-img {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-gold-light);
  box-shadow: 0 0 15px rgba(223, 177, 91, 0.4);
}

.president-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: white;
}

.president-role {
  font-size: 0.85rem;
  color: #fce59f;
  font-weight: 600;
}

.president-quote {
  font-style: italic;
  font-size: 0.925rem;
  color: #f1f5f9;
  line-height: 1.65;
  margin-bottom: 1.5rem;
  padding-left: 1rem;
  border-left: 3px solid var(--primary-gold-light);
}

/* Жива статистика бар */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1.5rem 2rem;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  border-top: 4px solid var(--primary-gold);
  margin-top: 3.5rem;
  position: relative;
  z-index: 10;
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.stat-item {
  text-align: center;
  padding: 0.5rem;
  border-right: 1px solid var(--border-light);
}

.stat-item:last-child {
  border-right: none;
}

.stat-number {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--primary-gold);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

[data-theme="dark"] .stat-number {
  color: #ffda6a;
}

.stat-label {
  font-size: 0.775rem;
  color: var(--text-secondary);
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 0.35rem;
  letter-spacing: 0.4px;
}

/* ==========================================================================
   СЕКЦИИ И ТИПОГРАФИЯ
   ========================================================================== */
.section {
  padding: 4.5rem 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3rem;
}

.section-badge {
  display: inline-block;
  background-color: var(--primary-gold-subtle);
  color: var(--primary-gold);
  border: 1px solid var(--primary-gold-border);
  font-weight: 800;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  padding: 0.28rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
}

[data-theme="dark"] .section-badge {
  color: #ffda6a;
  border-color: rgba(255, 218, 106, 0.3);
}

.section-title {
  font-size: clamp(1.75rem, 2.6vw, 2.35rem);
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.25;
  margin-bottom: 0.75rem;
  letter-spacing: -0.3px;
}

.section-desc {
  font-size: 0.975rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ==========================================================================
   НОВИНИ И СЪБИТИЯ
   ========================================================================== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.75rem;
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-top: 3px solid var(--primary-gold);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-top-color: var(--primary-red);
}

.news-img-wrapper {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.news-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-card:hover .news-img {
  transform: scale(1.05);
}

.news-category-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(6px);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-xs);
  border-left: 3px solid var(--primary-gold-light);
}

.news-content {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-meta-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.775rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.news-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.news-card-text {
  font-size: 0.885rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

/* ==========================================================================
   СПЕЦИАЛНА КАМПАНИЯ: ДЕН НА УЧИТЕЛЯ
   ========================================================================== */
.teachers-day-section {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.05) 0%, rgba(223, 177, 91, 0.1) 50%, rgba(220, 38, 38, 0.04) 100%);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 3.5rem 0;
}

.teachers-day-badge {
  background: rgba(234, 179, 8, 0.2);
  color: #b45309;
  border: 1px solid rgba(234, 179, 8, 0.45);
  font-weight: 800;
}

[data-theme="dark"] .teachers-day-badge {
  color: #ffda6a;
}

.teachers-day-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 2rem;
  align-items: stretch;
}

.teachers-day-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.teachers-day-steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.teachers-day-step {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.teachers-day-step-num {
  font-weight: 800;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
}

.teachers-day-step-num-1 {
  background: rgba(30, 58, 138, 0.12);
  color: var(--primary);
}

.teachers-day-step-num-2 {
  background: rgba(223, 177, 91, 0.2);
  color: #b45309;
}

.teachers-day-step-num-3 {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
}

.teachers-day-tips {
  background: var(--bg-subtle);
  border-left: 3px solid var(--primary-gold);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-xs);
}

/* ==========================================================================
   РЪКОВОДСТВО И ЕКИП НА УЧЕНИЧЕСКИЯ ПАРЛАМЕНТ
   ========================================================================== */
.leadership-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.tab-btn {
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--text-dark);
  cursor: pointer;
  transition: var(--transition-normal);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.tab-btn:hover {
  border-color: var(--primary-gold);
  color: var(--primary-gold);
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--slaveykov-gold-1), var(--slaveykov-gold-2));
  color: white;
  border-color: transparent;
}

/* Превключвател: Органиграма / Профилни карти */
.leadership-view-switcher {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.view-switch-btn {
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-dark);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-xs);
}

.view-switch-btn:hover {
  border-color: var(--primary-gold);
  color: var(--primary-gold);
  transform: translateY(-1px);
}

.view-switch-btn.active {
  background: linear-gradient(135deg, var(--primary-gold), #b45309);
  color: #ffffff;
  border-color: transparent;
  box-shadow: var(--shadow-gold);
}

/* ==========================================================================
   ИНТЕРАКТИВНА ТРИСТЕПЕННА ОРГАНИГРАМА (СТРУКТУРНА ФИГУРА НА УП)
   ========================================================================== */
.organigram-wrapper {
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 3rem;
  position: relative;
}

.organigram-header-note {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--primary-gold);
  text-transform: uppercase;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed var(--border-color);
}

[data-theme="dark"] .organigram-header-note {
  color: #ffda6a;
}

.organigram-level {
  position: relative;
  margin-bottom: 2.25rem;
}

.organigram-level-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.organigram-level-num {
  background: var(--primary-gold);
  color: white;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-xs);
  letter-spacing: 0.5px;
}

.organigram-level-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-dark);
}

.organigram-president-row {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.organigram-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-xs);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
}

.organigram-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-gold);
}

.organigram-card-president {
  max-width: 440px;
  width: 100%;
  text-align: center;
  align-items: center;
  border: 2px solid var(--primary-gold-light);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(223, 177, 91, 0.12) 100%);
  box-shadow: var(--shadow-gold);
}

.organigram-card-vp {
  text-align: center;
  align-items: center;
  border: 2px solid rgba(99, 102, 241, 0.4);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(99, 102, 241, 0.1) 100%);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.15);
}

.org-card-crown {
  font-size: 1.6rem;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blue-crystal-crown-svg {
  display: inline-block;
  vertical-align: middle;
  filter: drop-shadow(0 2px 6px rgba(37, 99, 235, 0.45));
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
}

.organigram-card-president:hover .blue-crystal-crown-svg,
.member-card:hover .blue-crystal-crown-svg {
  transform: scale(1.12) translateY(-2px);
  filter: drop-shadow(0 4px 10px rgba(37, 99, 235, 0.65));
}

.blue-crystal-crown-mini {
  display: inline-block;
  vertical-align: -2px;
  filter: drop-shadow(0 1px 3px rgba(37, 99, 235, 0.35));
}

.org-card-badge {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--primary-gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.35rem;
}

[data-theme="dark"] .org-card-badge {
  color: #ffda6a;
}

.org-card-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.2rem;
}

.org-card-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.65rem;
}

.org-card-desc {
  font-size: 0.825rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.85rem;
}

.org-card-action {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--primary-gold);
  text-decoration: underline;
}

.organigram-board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 1rem;
  max-width: 650px;
  margin: 0 auto;
}

.org-card-icon {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.org-card-role {
  font-size: 0.925rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.3rem;
}

.org-card-vacancy {
  font-size: 0.72rem;
  font-weight: 800;
  color: #b45309;
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.35);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-xs);
  display: inline-block;
  margin-bottom: 0.5rem;
}

.org-card-scope {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.organigram-connector-arrow {
  text-align: center;
  color: var(--primary-gold);
  font-size: 0.8rem;
  font-weight: 800;
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

[data-theme="dark"] .organigram-connector-arrow {
  color: #ffda6a;
}

.org-arrow-down {
  font-size: 1.5rem;
  line-height: 1;
}

.organigram-committees-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 1.25rem;
}

.com-card-culture { border-top: 4px solid #8b5cf6; }
.com-card-charity { border-top: 4px solid #ef4444; }
.com-card-media { border-top: 4px solid #f59e0b; }
.com-card-sport { border-top: 4px solid #10b981; }

.organigram-volunteer-strip {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.06), rgba(223, 177, 91, 0.12));
  border: 1.5px dashed var(--primary-gold);
  border-radius: var(--radius-sm);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.org-vol-badge {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--primary-gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 0.25rem;
}

.org-vol-left h4 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.35rem;
}

.org-vol-left p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.5;
}

/* ==========================================================================
   КОНТРОЛИ ЗА СВИВАНЕ И РАЗГЪВАНЕ (LOAD MORE & ORGANIGRAM TOGGLES)
   ========================================================================== */
.load-more-wrap {
  text-align: center;
  margin-top: 2rem;
}

.load-more-btn {
  padding: 0.75rem 1.85rem;
  font-size: 0.925rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.load-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.organigram-toggle-wrap {
  text-align: center;
  margin: 1.75rem 0 0.5rem;
}

.organigram-expand-btn {
  padding: 0.75rem 1.85rem;
  font-size: 0.925rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  color: var(--text-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.organigram-expand-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-gold);
}

.animate-fade-in {
  animation: fadeInShort 0.35s ease-out forwards;
}

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

/* ==========================================================================
   ФИГУРАЛНИ АВАТАРИ ЗА СВОБОДНИ И ЗАЕТИ ПОЗИЦИИ
   ========================================================================== */
.member-vacancy-avatar {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(223, 177, 91, 0.15) 0%, rgba(15, 23, 42, 0.03) 75%);
  padding: 1.5rem 1rem;
  position: relative;
}

.vacancy-avatar-circle {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2.5px dashed var(--primary-gold);
  box-shadow: 0 4px 16px rgba(223, 177, 91, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  transition: transform var(--transition-spring);
}

.member-card:hover .vacancy-avatar-circle {
  transform: scale(1.08);
  border-style: solid;
}

.vacancy-icon {
  font-size: 2.4rem;
  line-height: 1;
}

.vacancy-banner-label {
  font-size: 0.725rem;
  font-weight: 900;
  letter-spacing: 0.8px;
  color: #b45309;
  background: rgba(234, 179, 8, 0.2);
  border: 1px solid rgba(234, 179, 8, 0.45);
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
}

.member-president-photo {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(30, 58, 138, 0.12) 0%, rgba(223, 177, 91, 0.18) 100%);
  padding: 1.5rem 1rem;
}

.president-crest-badge {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 3px solid var(--primary-gold-light);
  box-shadow: var(--shadow-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem;
  margin-bottom: 0.85rem;
  transition: transform var(--transition-spring);
}

.member-card:hover .president-crest-badge {
  transform: scale(1.06);
}

.president-crest-inner {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.president-banner-label {
  font-size: 0.725rem;
  font-weight: 900;
  letter-spacing: 0.8px;
  color: var(--primary);
  background: rgba(30, 58, 138, 0.15);
  border: 1px solid rgba(30, 58, 138, 0.3);
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
}

.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1.75rem;
}

.member-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-top: 3px solid var(--primary-gold);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.member-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-top-color: var(--primary-gold-light);
}

.member-photo-box {
  position: relative;
  height: 240px;
  background-color: var(--bg-subtle);
  overflow: hidden;
}

.member-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.member-card:hover .member-photo {
  transform: scale(1.04);
}

.member-level-tag {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(6px);
  color: #ffffff;
  font-size: 0.725rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-xs);
  border-left: 3px solid var(--primary-gold-light);
}

.member-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.member-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.member-role {
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--primary-gold);
  margin-bottom: 0.35rem;
}

[data-theme="dark"] .member-role {
  color: #ffda6a;
}

.member-grade {
  font-size: 0.775rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.85rem;
}

.member-quote {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.member-profile-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-subtle));
  color: var(--text-dark);
  border: 1.5px solid var(--border-color);
  padding: 0.6rem 0.95rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition-normal);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.member-profile-btn:hover {
  background: linear-gradient(135deg, var(--slaveykov-gold-1), var(--slaveykov-gold-2));
  color: white;
  border-color: var(--primary-gold-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(200, 155, 60, 0.35);
}

/* ==========================================================================
   СИСТЕМА ЗА АНКЕТИ И ЕЛЕКТРОННО ГЛАСУВАНЕ (VOTING SYSTEM)
   ========================================================================== */
.voting-section {
  background-color: var(--bg-subtle);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.voting-filter-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.auth-notice-card {
  background: var(--bg-card);
  border: 1.5px solid var(--primary-gold-border);
  border-left: 5px solid var(--primary-gold);
  border-radius: var(--radius-sm);
  padding: 1.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.75rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.auth-notice-text h4 {
  font-size: 1.15rem;
  color: var(--primary-gold);
  margin-bottom: 0.35rem;
  font-weight: 800;
}

[data-theme="dark"] .auth-notice-text h4 {
  color: #ffda6a;
}

.auth-notice-text p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.polls-list {
  display: grid;
  gap: 2rem;
}

.poll-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-top: 4px solid var(--primary-gold);
  border-radius: var(--radius-sm);
  padding: 2.25rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.poll-card:hover {
  box-shadow: var(--shadow-md);
}

.poll-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.poll-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.35;
}

.poll-legal-badge {
  font-size: 0.725rem;
  background: var(--primary-gold-subtle);
  color: var(--primary-gold);
  border: 1px solid var(--primary-gold-border);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-weight: 700;
}

[data-theme="dark"] .poll-legal-badge {
  color: #ffda6a;
}

.poll-desc {
  font-size: 0.925rem;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
  line-height: 1.65;
}

.poll-options-grid {
  display: grid;
  gap: 0.95rem;
  margin-bottom: 1.75rem;
}

.poll-option-item {
  position: relative;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.35rem;
  cursor: pointer;
  transition: var(--transition-normal);
  overflow: hidden;
}

.poll-option-item:hover {
  border-color: var(--primary-gold);
  background-color: var(--bg-surface);
  transform: translateX(3px);
}

.poll-option-item.selected {
  border-color: var(--primary-gold);
  background-color: var(--primary-gold-subtle);
}

.poll-progress-bg {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(223, 177, 91, 0.25), rgba(155, 117, 34, 0.4));
  transition: width 0.9s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.poll-option-content {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
}

.poll-option-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 0.925rem;
  color: var(--text-dark);
}

.poll-stats {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--primary-gold);
  white-space: nowrap;
}

[data-theme="dark"] .poll-stats {
  color: #ffda6a;
}

/* Демографска разбивка на гласовете по випуски */
.poll-demographics-container {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-color);
}

.demographics-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.demographics-bars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
}

.demo-grade-box {
  background: var(--bg-card);
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-light);
}

.demo-grade-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.demo-grade-bar-bg {
  height: 6px;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.demo-grade-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--slaveykov-gold-1), var(--primary-red));
  border-radius: var(--radius-full);
}

.poll-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==========================================================================
   ОБЩНОСТНА СТЕНА НА ИДЕИТЕ (IDEA HUB & STATUS TRACKER)
   ========================================================================== */
.ideas-layout-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.ideas-tracker-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--accent-blue);
  border-radius: var(--radius-sm);
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.tracker-search-box {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.tracker-search-input {
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--text-dark);
  font-size: 0.85rem;
}

/* Стена с обществени идеи */
.ideas-wall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1.75rem;
}

.idea-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-top: 3px solid var(--primary-gold);
  border-radius: var(--radius-sm);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  position: relative;
}

.idea-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.idea-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.idea-ref-pill {
  font-family: monospace;
  font-size: 0.75rem;
  background: var(--bg-subtle);
  color: var(--text-muted);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-xs);
}

.idea-card-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.65rem;
  line-height: 1.35;
}

.idea-card-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.idea-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

.upvote-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-dark);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-spring);
}

.upvote-btn:hover {
  border-color: var(--primary-red);
  color: var(--primary-red);
  transform: scale(1.08);
}

.upvote-btn.upvoted {
  background: var(--primary-red-subtle);
  border-color: var(--primary-red);
  color: var(--primary-red);
}

/* Статусни значки */
.status-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.status-done {
  background-color: var(--accent-green-subtle);
  color: var(--accent-green);
}

.status-progress {
  background-color: var(--primary-gold-subtle);
  color: var(--primary-gold);
}

[data-theme="dark"] .status-progress {
  color: #ffda6a;
}

.status-approved {
  background-color: var(--accent-blue-subtle);
  color: var(--accent-blue);
}

.status-new {
  background-color: rgba(148, 163, 184, 0.15);
  color: #64748b;
}

/* Времеви прогрес на сигнал (Timeline Stepper) */
.timeline-stepper {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin: 1.75rem 0 1.25rem;
}

.timeline-stepper::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 10px;
  right: 10px;
  height: 3px;
  background: var(--border-color);
  z-index: 1;
}

.timeline-step {
  position: relative;
  z-index: 2;
  text-align: center;
  flex: 1;
}

.timeline-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  margin: 0 auto 0.5rem;
  transition: var(--transition-normal);
}

.timeline-step.done .timeline-circle {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: white;
}

.timeline-step.active .timeline-circle {
  background: var(--primary-gold);
  border-color: var(--primary-gold-light);
  color: white;
  box-shadow: 0 0 12px rgba(223, 177, 91, 0.5);
}

.timeline-label {
  font-size: 0.725rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* ==========================================================================
   ДОКУМЕНТИ И ДИГИТАЛЕН ЧЕТЕЦ
   ========================================================================== */
.documents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.75rem;
}

.doc-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-top: 3px solid var(--primary-gold);
  border-radius: var(--radius-sm);
  padding: 1.85rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition-normal);
}

.doc-card:hover {
  border-top-color: var(--primary-red);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.doc-icon-box {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: var(--radius-sm);
  background: var(--primary-gold-subtle);
  color: var(--primary-gold);
  border: 1px solid var(--primary-gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  margin-bottom: 1rem;
}

[data-theme="dark"] .doc-icon-box {
  color: #ffda6a;
}

.doc-meta {
  display: flex;
  gap: 0.5rem;
  font-size: 0.725rem;
  font-weight: 700;
  color: var(--primary-gold);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

[data-theme="dark"] .doc-meta {
  color: #ffda6a;
}

.doc-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.65rem;
  line-height: 1.35;
}

.doc-summary {
  font-size: 0.885rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.doc-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* Форматирана бланка за официален документ */
.doc-official-paper {
  background: var(--bg-surface);
  padding: 2.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  line-height: 1.75;
}

.doc-official-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.doc-official-header h4 {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.doc-official-header p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.doc-official-divider {
  width: 120px;
  height: 3px;
  background: var(--primary-gold);
  margin: 0.75rem auto 0;
}

/* Четец лента за инструменти */
.doc-reader-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.25rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.doc-zoom-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.doc-search-inline {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.doc-search-input {
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  background: var(--bg-card);
  color: var(--text-dark);
  font-size: 0.8rem;
}

mark.doc-highlight {
  background: #fef08a;
  color: #854d0e;
  padding: 0.1rem 0.25rem;
  border-radius: 2px;
}

/* ==========================================================================
   МОДУЛ ЗА ДОБРОВОЛЦИ И РАБОТНИ ЕКИПИ
   ========================================================================== */
.volunteer-cta-card {
  background: linear-gradient(135deg, rgba(155, 117, 34, 0.15), rgba(220, 38, 38, 0.1));
  border: 1.5px solid var(--primary-gold-border);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 3.5rem;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}

.volunteer-badge-preview {
  background: var(--bg-card);
  border: 2px solid var(--primary-gold-light);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  width: 260px;
  text-align: center;
  box-shadow: var(--shadow-gold);
}

.volunteer-badge-crest {
  width: 50px;
  height: 50px;
  margin: 0 auto 0.75rem;
}

/* ==========================================================================
   COMMAND PALETTE (`Ctrl + K` / `Cmd + K`)
   ========================================================================== */
#commandPaletteModal {
  max-width: 680px;
  width: 92vw;
  padding: 0;
  border: none;
  background: transparent;
}

.cmd-palette-box {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.cmd-search-header {
  display: flex;
  align-items: center;
  padding: 1.15rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  gap: 0.85rem;
}

.cmd-search-input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-dark);
  font-size: 1.1rem;
  font-weight: 600;
  outline: none;
}

.cmd-results-list {
  max-height: 380px;
  overflow-y: auto;
  padding: 0.75rem;
}

.cmd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.15s ease;
  color: var(--text-dark);
}

.cmd-item:hover, .cmd-item.active {
  background: var(--primary-gold-subtle);
  color: var(--primary-gold);
}

.cmd-footer {
  padding: 0.75rem 1.5rem;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   ТОП-СЛОЙ АНИМАЦИИ ЗА <dialog> (MODERN-WEB-GUIDANCE COMPLIANT)
   ========================================================================== */
dialog {
  border: none;
  border-radius: var(--radius-md);
  border-top: 4px solid var(--primary-gold);
  padding: 0;
  max-width: 640px;
  width: 90vw;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  background: var(--bg-surface);
  color: var(--text-dark);
  margin: auto;

  /* Поддръжка на преходи за топ слоя */
  opacity: 0;
  transform: scale(0.92);
  transition-property: opacity, transform, display, overlay;
  transition-duration: 0.25s;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  transition-behavior: allow-discrete;
}

dialog[open] {
  opacity: 1;
  transform: scale(1);

  @starting-style {
    opacity: 0;
    transform: scale(0.92);
  }
}

dialog::backdrop {
  background-color: rgba(11, 15, 25, 0);
  transition: display 0.25s allow-discrete, overlay 0.25s allow-discrete, background-color 0.25s ease-out;
}

dialog[open]::backdrop {
  background-color: rgba(11, 15, 25, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  @starting-style {
    background-color: rgba(11, 15, 25, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  dialog {
    transform: none;
    transition-duration: 0.1s;
  }
  dialog[open] {
    @starting-style {
      transform: none;
    }
  }
}

.modal-header {
  padding: 1.35rem 1.85rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-dark);
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.3rem;
  line-height: 1;
  transition: color 0.15s ease;
}

.modal-close-btn:hover {
  color: var(--primary-red);
}

.modal-body {
  padding: 1.85rem;
  max-height: 75vh;
  overflow-y: auto;
}

/* ==========================================================================
   ОФИЦИАЛНО ДОСИЕ НА ПРЕДСТАВИТЕЛ (MEMBER PROFILE DOSSIER)
   ========================================================================== */
.member-duty-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.885rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding: 0.55rem 0.85rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-xs);
  border-left: 3px solid var(--primary-gold);
}

.member-duty-bullet {
  color: var(--primary-gold);
  font-weight: 800;
}

/* ==========================================================================
   ДИГИТАЛНА РАЗПИСКА ЗА ВОТ (VOTING RECEIPT)
   ========================================================================== */
.vote-receipt-card {
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-subtle) 100%);
  border: 2px solid var(--primary-gold-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  position: relative;
  box-shadow: var(--shadow-gold);
  text-align: center;
}

.receipt-stamp {
  position: absolute;
  top: 15px;
  right: 15px;
  border: 2px dashed var(--accent-green);
  color: var(--accent-green);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-xs);
  font-size: 0.75rem;
  font-weight: 800;
  transform: rotate(5deg);
  text-transform: uppercase;
}

.receipt-token-code {
  font-family: monospace;
  font-size: 1.15rem;
  font-weight: 800;
  background: var(--bg-subtle);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-color);
  color: var(--primary-gold);
  margin: 1rem 0;
  letter-spacing: 1px;
}

/* ==========================================================================
   КОНФЕТИ CANVAS
   ========================================================================== */
#confettiCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10000;
}

/* ==========================================================================
   ТОАСТ НОТИФИКАЦИИ
   ========================================================================== */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  animation: toastSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  background: var(--bg-surface);
  color: var(--text-dark);
  border-left: 4px solid var(--primary-gold);
  box-shadow: var(--shadow-lg);
  padding: 0.95rem 1.35rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border-top: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

@keyframes toastSlideDown {
  from { opacity: 0; transform: translateY(-16px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.toast.toast-success {
  border-left-color: var(--accent-green);
}

/* ==========================================================================
   ФУТЕР
   ========================================================================== */
.site-footer {
  background-color: #0f121a;
  color: #94a3b8;
  padding: 4rem 0 1.75rem;
  border-top: 4px solid var(--primary-gold);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-logo {
  color: white;
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-desc {
  font-size: 0.875rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
  max-width: 330px;
}

.footer-title {
  color: #ffda6a;
  font-size: 0.925rem;
  font-weight: 700;
  margin-bottom: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-link {
  font-size: 0.85rem;
  transition: var(--transition-normal);
}

.footer-link:hover {
  color: #ffffff;
  padding-left: 5px;
}

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

/* ==========================================================================
   СТИЛОВЕ ЗА ПЕЧАТ (@MEDIA PRINT)
   ========================================================================== */
@media print {
  body {
    background: white !important;
    color: black !important;
  }

  .main-school-header,
  .sticky-nav-bar,
  .countdown-banner-strip,
  .site-footer,
  .btn,
  .modal-close-btn,
  #scrollProgressBar,
  .toast-container,
  #confettiCanvas {
    display: none !important;
  }

  dialog {
    position: static !important;
    display: block !important;
    max-width: 100% !important;
    width: 100% !important;
    box-shadow: none !important;
    border: none !important;
  }

  .doc-official-paper {
    border: none !important;
    padding: 0 !important;
  }
}

/* ==========================================================================
   АДАПТИВНИ МЕДИЙНИ ЗАЯВКИ (RESPONSIVE RULES)
   ========================================================================== */
@media (max-width: 1150px) {
  .school-motto-tag {
    display: none;
  }
  .cmd-text {
    display: none;
  }
}

@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stats-strip {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 2.25rem;
    gap: 1.25rem;
  }

  .stat-item:nth-child(2) {
    border-right: none;
  }

  .header-top-grid {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

  .header-top-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.6rem;
  }
}

@media (max-width: 768px) {
  /* 1. Контейнер и общи отстъпи (без странично преливане) */
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* 2. Мобилен мини бранд в залепващата лента */
  .sticky-brand-mini {
    display: inline-flex;
  }

  .mobile-drawer-extra {
    display: block;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border-light);
  }

  /* 3. Горен бар действия */
  .header-top-actions {
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
  }

  .header-tools-cluster {
    height: 38px;
    padding: 0 6px;
    gap: 0.35rem;
  }

  .header-icon-btn,
  .theme-toggle-btn,
  .sound-toggle-btn,
  .a11y-toggle-btn,
  .notif-btn {
    width: 30px;
    height: 30px;
  }

  .cmd-palette-trigger-btn {
    height: 30px;
    padding: 0 0.5rem;
  }

  /* Скриване на бутона към официалния сайт в хедъра (достъпен е през мобилното меню) */
  .official-site-btn {
    display: none;
  }

  /* 4. Поправка на мобилното меню и висок контраст на линковете */
  .nav-list {
    display: none;
    position: fixed;
    top: 54px;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    flex-direction: column;
    height: auto;
    max-height: calc(100dvh - 54px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-bottom: 3px solid var(--primary-gold);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
    z-index: 999;
    padding: 0.5rem 0 1.5rem;
  }

  .nav-list.open {
    display: flex;
  }

  .nav-item {
    width: 100%;
    height: auto;
  }

  .nav-link {
    width: 100%;
    padding: 13px 20px;
    color: var(--text-dark) !important;
    font-size: 0.925rem;
    font-weight: 700;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color var(--transition-fast), color var(--transition-fast);
  }

  [data-theme="dark"] .nav-link {
    color: #f8fafc !important;
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }

  .nav-link:hover, .nav-link:active {
    background-color: var(--primary-gold-subtle);
    color: var(--primary-gold) !important;
  }

  .nav-link.active {
    color: var(--primary-gold) !important;
    background-color: var(--primary-gold-subtle);
    border-left: 4px solid var(--primary-gold);
    border-bottom: 1px solid var(--border-light);
  }

  .nav-special-link {
    width: 100%;
    padding: 13px 20px;
    border-left: none;
    border-bottom: 1px solid var(--border-light);
    color: var(--primary-red) !important;
    font-size: 0.925rem;
    font-weight: 800;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  /* 5. Предотвратяване на iOS Safari Zoom Bug */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="search"],
  select,
  textarea,
  .form-control,
  .ms-input-box,
  .doc-search-input,
  .tracker-search-input,
  .cmd-search-input {
    font-size: 16px !important;
  }

  /* 6. Скриване на десктоп клавишни шорткъти и показване на затваряне за тъчскрийн */
  .kbd-shortcut-pill,
  .desktop-only-shortcut,
  .desktop-only-help {
    display: none !important;
  }

  .cmd-modal-close-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    background: transparent;
    border: none;
    color: var(--text-muted);
    min-width: 40px;
    min-height: 40px;
    border-radius: var(--radius-xs);
  }

  /* 7. Оптимизация на вътрешните отстъпи на карти и модали */
  .poll-card {
    padding: 1.25rem 1rem;
  }

  .poll-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .poll-title {
    font-size: 1.15rem;
  }

  .poll-option-item {
    padding: 0.85rem 1rem;
  }

  .modal-body {
    padding: 1.25rem 1rem;
  }

  .modal-header {
    padding: 1rem 1.25rem;
  }

  .president-card {
    padding: 1.5rem 1.25rem;
  }

  .organigram-wrapper {
    padding: 1.5rem 1rem;
  }

  .petition-form-box {
    padding: 1.25rem 1rem;
  }

  .petition-preview-paper {
    padding: 1.25rem 1rem;
  }

  .petition-signatures-block {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  /* 8. Hero Секция */
  .hero-section {
    padding: 3rem 0 2.25rem;
  }

  .hero-title {
    font-size: 1.7rem;
    line-height: 1.25;
  }

  .hero-subtitle {
    font-size: 0.925rem;
    line-height: 1.55;
    margin-bottom: 1.5rem;
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
    gap: 0.65rem;
  }

  .hero-cta-group .btn {
    width: 100%;
  }

  /* 9. Превключвател за изглед на Ръководството */
  .leadership-view-switcher {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    width: 100%;
    margin-bottom: 1.5rem;
  }

  .view-switch-btn {
    width: 100%;
    justify-content: center;
    padding: 0.6rem 0.5rem;
    font-size: 0.775rem;
    text-align: center;
  }

  /* 10. Достъпност и тъч зони */
  .modal-close-btn {
    min-width: 44px;
    min-height: 44px;
  }

  .auth-notice-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .volunteer-cta-card {
    flex-direction: column;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.85rem;
    text-align: center;
  }
}

@media (max-width: 640px) {
  /* Компактна и прегледна 2x2 матрица за живата статистика */
  .stats-strip {
    grid-template-columns: repeat(2, 1fr);
    padding: 0.85rem;
    gap: 0.65rem;
    margin-top: 2rem;
  }

  .stat-item {
    border-right: none;
    border-bottom: none;
    padding: 0.65rem 0.5rem;
    background: var(--bg-subtle);
    border-radius: var(--radius-xs);
    border: 1px solid var(--border-light);
  }

  .stat-number {
    font-size: 1.6rem;
  }

  .stat-label {
    font-size: 0.75rem;
  }

  /* Чатбот мобилен Bottom-Sheet / Full screen */
  .ai-launcher-btn {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 52px;
    height: 52px;
  }

  .ai-chat-widget {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border: none;
    z-index: 10001;
  }

  /* Тоаст нотификации на малък екран */
  .toast-container {
    top: 12px;
    left: 12px;
    right: 12px;
    width: auto;
  }

  .toast {
    width: 100%;
    font-size: 0.825rem;
    padding: 0.75rem 1rem;
  }

  /* Календар филтри */
  .calendar-controls-row {
    padding: 0.85rem 1rem;
  }

  .calendar-filters-group {
    width: 100%;
  }

  .cal-filter-btn {
    flex: 1;
    min-width: 120px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .brand-wrapper {
    min-width: 0;
    flex-shrink: 1;
    gap: 0.65rem;
  }

  .school-crest-img {
    width: 40px;
    height: 40px;
  }

  .school-main-name {
    font-size: 0.925rem;
    white-space: normal;
    line-height: 1.25;
  }

  .parliament-sub-name {
    font-size: 0.775rem;
    white-space: normal;
  }

  .header-top-actions {
    gap: 0.4rem;
  }

  .header-login-btn {
    padding: 0 0.75rem;
    font-size: 0.75rem;
    height: 34px;
  }

  .ms-mon-card {
    padding: 24px 16px 20px 16px;
  }
}

/* ==========================================================================
   PWA & NOTIFICATION CONTROLS
   ========================================================================== */
.pwa-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.775rem;
  font-weight: 800;
  color: #1a1a1a;
  background: linear-gradient(135deg, #dfb15b, #c89b3c);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(200, 155, 60, 0.4);
  transition: all 0.2s ease;
}
.pwa-install-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(200, 155, 60, 0.6);
}

/* ==========================================================================
   УЧИЛИЩЕН КАЛЕНДАР (CALENDAR COMPONENT)
   ========================================================================== */
.calendar-controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  background: var(--bg-card);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.calendar-filters-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.calendar-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .calendar-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.event-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--primary-gold);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .event-card {
  background: #141c2e;
  border-color: #27354f;
  border-top-color: var(--primary-gold);
}

.event-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-gold);
}

.event-card.featured-event {
  border-top: 4px solid var(--primary-gold);
}

.event-date-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.775rem;
  font-weight: 800;
  color: var(--primary-gold);
  background: var(--primary-gold-subtle);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.85rem;
  align-self: flex-start;
}

[data-theme="dark"] .event-date-badge {
  background: rgba(223, 177, 91, 0.15);
  color: #dfb15b;
  border: 1px solid rgba(223, 177, 91, 0.3);
}

.event-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.event-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex: 1;
}

.event-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--border-light);
}

.event-actions-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.event-actions-bar .btn {
  flex: 1;
  min-width: 130px;
  justify-content: center;
  font-size: 0.775rem;
  padding: 0.45rem 0.75rem;
}

/* ==========================================================================
   ГЕНЕРАТОР НА ОФИЦИАЛНИ МОЛБИ И БЛАНКИ (PETITION GENERATOR)
   ========================================================================== */
.petitions-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 900px) {
  .petitions-container {
    grid-template-columns: 1fr;
  }
}

.petition-form-box {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.petition-preview-paper {
  background: #ffffff;
  color: #111827;
  border: 1px solid #d1d5db;
  border-radius: var(--radius-sm);
  padding: 2.25rem;
  box-shadow: var(--shadow-md);
  font-family: 'Segoe UI', Arial, sans-serif;
  min-height: 480px;
  display: flex;
  flex-direction: column;
}

.petition-header-block {
  text-align: right;
  font-size: 0.825rem;
  line-height: 1.5;
  color: #374151;
  margin-bottom: 2rem;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 1rem;
}

.petition-title-block {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 800;
  color: #111827;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1.5rem;
}

.petition-content-block {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #1f2937;
  margin-bottom: 2.5rem;
  flex: 1;
}

.petition-signatures-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px dashed #9ca3af;
}

/* Печат на молба */
@media print {
  body * {
    visibility: hidden;
  }
  #petitionPrintArea, #petitionPrintArea * {
    visibility: visible;
  }
  #petitionPrintArea {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 2rem;
    border: none;
    box-shadow: none;
    background: white;
    color: black;
  }
}

/* ==========================================================================
   ДИГИТАЛНИ QR КОДОВЕ (FEATURE 1)
   ========================================================================== */
#receiptQrContainer svg,
#petitionQrBox svg {
  width: 100%;
  height: 100%;
  display: block;
}

.receipt-qr-wrap {
  animation: fadeIn 0.4s ease-out;
}


@keyframes livePulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.35);
    opacity: 0.6;
  }
}

/* ==========================================================================
   ПУБЛИЧЕН РЕГИСТЪР НА ЗАСЕДАНИЯТА И ПРОТОКОЛИТЕ (FEATURE 2)
   ========================================================================== */
.meetings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.75rem;
}

.meeting-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-top: 3px solid var(--primary-gold);
  border-radius: var(--radius-sm);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition-normal);
  position: relative;
}

.meeting-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-top-color: var(--primary-red);
}

.meeting-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.meeting-protocol-pill {
  background: var(--primary-gold-subtle);
  color: var(--primary-gold);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid var(--primary-gold-border);
  letter-spacing: 0.3px;
}

[data-theme="dark"] .meeting-protocol-pill {
  color: #ffda6a;
}

.meeting-date-pill {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.meeting-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.meeting-card-excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex: 1;
}

.meeting-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.8rem;
}

.meeting-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent-green);
  font-weight: 700;
}

/* ==========================================================================
   ИНТЕЛИГЕНТЕН АСИСТЕНТ „СЛАВЕЙКОВЕЦ AI“ (FEATURE 3)
   ========================================================================== */
.ai-launcher-btn {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
  border: 2px solid var(--primary-gold);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(30, 58, 138, 0.4), 0 0 15px rgba(223, 177, 91, 0.4);
  z-index: 999;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s ease;
}

.ai-launcher-btn:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 12px 30px rgba(30, 58, 138, 0.5), 0 0 25px rgba(223, 177, 91, 0.6);
}

.ai-launcher-icon {
  font-size: 1.65rem;
  line-height: 1;
}

.ai-launcher-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--primary-gold);
  color: #1e3a8a;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.ai-launcher-tooltip {
  position: absolute;
  right: 70px;
  white-space: nowrap;
  background: rgba(15, 23, 42, 0.95);
  color: #ffffff;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-xs);
  font-size: 0.775rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateX(10px);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(223, 177, 91, 0.3);
}

.ai-launcher-btn:hover .ai-launcher-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* Chat Widget */
.ai-chat-widget {
  position: fixed;
  bottom: 5.75rem;
  right: 1.75rem;
  width: 380px;
  max-width: calc(100vw - 2.5rem);
  height: 540px;
  max-height: calc(100vh - 7rem);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-top: 3px solid var(--primary-gold);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
  animation: slideUpFade 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.ai-chat-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: #ffffff;
  padding: 0.85rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-chat-avatar-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.ai-chat-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(223, 177, 91, 0.2);
  border: 1.5px solid var(--primary-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.ai-chat-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.2px;
}

.ai-chat-subtitle {
  font-size: 0.685rem;
  color: var(--primary-gold-light);
  font-weight: 600;
}

.ai-chat-header-actions {
  display: flex;
  gap: 0.35rem;
}

.ai-btn-icon {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.15rem;
  cursor: pointer;
  padding: 0.35rem 0.55rem;
  border-radius: 4px;
  transition: background 0.2s ease, color 0.2s ease;
  min-width: 36px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ai-btn-icon:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.ai-chat-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: var(--bg-subtle);
}

.ai-msg {
  display: flex;
  flex-direction: column;
  max-width: 86%;
  animation: fadeIn 0.25s ease;
}

.ai-msg-bot {
  align-self: flex-start;
}

.ai-msg-user {
  align-self: flex-end;
}

.ai-msg-bubble {
  padding: 0.75rem 0.95rem;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.55;
}

.ai-msg-bot .ai-msg-bubble {
  background: var(--bg-card);
  color: var(--text-dark);
  border: 1px solid var(--border-light);
  border-top-left-radius: 2px;
  box-shadow: var(--shadow-sm);
}

.ai-msg-user .ai-msg-bubble {
  background: linear-gradient(135deg, var(--primary-red) 0%, #b91c1c 100%);
  color: #ffffff;
  border-top-right-radius: 2px;
  box-shadow: 0 2px 8px rgba(185, 28, 28, 0.25);
}

.ai-msg-legal-citation {
  margin-top: 0.5rem;
  padding-top: 0.4rem;
  border-top: 1px dashed var(--border-color);
  font-size: 0.72rem;
  color: var(--primary-gold);
  font-weight: 700;
}

[data-theme="dark"] .ai-msg-legal-citation {
  color: #ffda6a;
}

.ai-msg-time {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  padding: 0 0.35rem;
}

.ai-msg-user .ai-msg-time {
  text-align: right;
}

.ai-suggestions-wrap {
  display: flex;
  gap: 0.4rem;
  padding: 0.6rem 0.85rem;
  overflow-x: auto;
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
  scrollbar-width: none;
}

.ai-suggestions-wrap::-webkit-scrollbar {
  display: none;
}

.ai-chip {
  background: var(--primary-gold-subtle);
  color: var(--text-dark);
  border: 1px solid var(--primary-gold-border);
  border-radius: 9999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-chip:hover {
  background: var(--primary-gold);
  color: #1e3a8a;
  transform: translateY(-1px);
}

.ai-chat-form {
  display: flex;
  padding: 0.75rem;
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
  gap: 0.5rem;
}

.ai-chat-input {
  flex: 1;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  background: var(--bg-subtle);
  color: var(--text-dark);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.ai-chat-input:focus {
  border-color: var(--primary-gold);
}

.ai-chat-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-red);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.2s ease, transform 0.15s ease;
}

.ai-chat-send-btn:hover {
  background: #991b1b;
  transform: scale(1.05);
}

/* Typing animation */
.ai-typing-dots {
  display: inline-flex;
  gap: 4px;
  padding: 4px 8px;
}

.ai-typing-dots span {
  width: 6px;
  height: 6px;
  background: var(--primary-gold);
  border-radius: 50%;
  animation: typingBounce 1.2s infinite ease-in-out;
}

.ai-typing-dots span:nth-child(1) { animation-delay: 0s; }
.ai-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-5px); }
}

/* =========================================================================
   ДОСТЪПНОСТ (ACCESSIBILITY - WCAG 2.1 AA)
   ========================================================================= */

/* Фокусни рамки за клавиатурна навигация */
:focus-visible {
  outline: 3px solid var(--primary-gold) !important;
  outline-offset: 2px !important;
}

/* Бутони за настройки в а11y модала */
.a11y-font-btn.active,
.a11y-contrast-btn.active,
.a11y-spacing-btn.active {
  background: var(--primary-gold) !important;
  color: #000000 !important;
  border-color: var(--primary-gold) !important;
  font-weight: 700 !important;
}

/* Размери на шрифта */
html[data-a11y-font="large"] {
  font-size: 115% !important;
}

html[data-a11y-font="xlarge"] {
  font-size: 130% !important;
}

/* Разреждане на текста / Дислексия */
html[data-a11y-spacing="wide"] body {
  letter-spacing: 0.04em !important;
  line-height: 1.85 !important;
  word-spacing: 0.1em !important;
}

/* Режим висок контраст (High Contrast Mode) */
html[data-a11y-contrast="high"] {
  --bg-primary: #000000 !important;
  --bg-surface: #0a0a0a !important;
  --bg-card: #121212 !important;
  --bg-subtle: #1a1a1a !important;
  --text-dark: #ffffff !important;
  --text-primary: #ffffff !important;
  --text-secondary: #fefefe !important;
  --text-muted: #e2e8f0 !important;
  --border-color: #facc15 !important;
  --border-light: #eab308 !important;
  --primary-gold: #fbbf24 !important;
  --primary-blue: #38bdf8 !important;
}

html[data-a11y-contrast="high"] .event-card,
html[data-a11y-contrast="high"] .news-card,
html[data-a11y-contrast="high"] .poll-card,
html[data-a11y-contrast="high"] .idea-card,
html[data-a11y-contrast="high"] .team-card,
html[data-a11y-contrast="high"] .petition-preview-paper {
  border: 2px solid #fbbf24 !important;
  background: #050505 !important;
  color: #ffffff !important;
}

html[data-a11y-contrast="high"] a,
html[data-a11y-contrast="high"] button {
  text-decoration: underline !important;
}

html[data-a11y-contrast="high"] .btn {
  border: 2px solid #fbbf24 !important;
}

/* ==========================================================================
   MICROSOFT ENTRA ID И GOOGLE SINGLE SIGN-ON (SSO) СТИЛИ
   ========================================================================== */
.btn-google-sso {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.8rem 1.15rem;
  background-color: #ffffff;
  color: #1f2937;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-xs, 6px);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.btn-google-sso:hover {
  background-color: #f8fafc;
  border-color: #94a3b8;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.btn-google-sso:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.btn-google-sso:focus-visible {
  outline: 2px solid #4285f4;
  outline-offset: 2px;
}

.btn-google-sso svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

[data-theme="dark"] .btn-google-sso {
  background-color: #1e293b;
  color: #f8fafc;
  border-color: #334155;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .btn-google-sso:hover {
  background-color: #273549;
  border-color: #475569;
}

.btn-ms-sso {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.8rem 1.15rem;
  background-color: #ffffff;
  color: #1e293b;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-xs, 6px);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.btn-ms-sso:hover {
  background-color: #f8fafc;
  border-color: #94a3b8;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.btn-ms-sso:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.btn-ms-sso:focus-visible {
  outline: 2px solid #00a4ef;
  outline-offset: 2px;
}

.btn-ms-sso svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.35rem 0;
  color: var(--text-muted, #64748b);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.auth-divider span {
  padding: 0 0.75rem;
}

.sso-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.725rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  background: rgba(0, 164, 239, 0.12);
  color: #0284c7;
  border: 1px solid rgba(0, 164, 239, 0.3);
  margin-left: 0.5rem;
}

.sso-badge svg {
  width: 12px;
  height: 12px;
}

.sso-badge.sso-badge-google {
  background: rgba(66, 133, 244, 0.12);
  color: #2563eb;
  border-color: rgba(66, 133, 244, 0.3);
}

[data-theme="dark"] .sso-badge.sso-badge-google {
  background: rgba(66, 133, 244, 0.2);
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.4);
}

[data-theme="dark"] .btn-ms-sso {
  background-color: #1e293b;
  color: #f8fafc;
  border-color: #334155;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .btn-ms-sso:hover {
  background-color: #273549;
  border-color: #475569;
}

/* ==========================================================================
   МИНИСТЕРСТВО НА ОБРАЗОВАНИЕТО И НАУКАТА (МОН) MICROSOFT КАРТА ЗА ВХОД
   1:1 ПИКСЕЛ-ПЪРФЕКТ ИМПЛЕМЕНТАЦИЯ СЪГЛАСНО ДИЗАЙНА НА MICROSOFT ENTRA ID
   ========================================================================== */

#authModal {
  max-width: 440px !important;
  width: 92vw !important;
  background: #ffffff !important;
  color: #1b1b1b !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-top: none !important;
  border-radius: 4px !important;
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(0, 0, 0, 0.1) !important;
  padding: 0 !important;
  margin: auto;
  position: relative;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif !important;
  overflow: visible !important;
}

#authModal::backdrop {
  background-color: rgba(11, 15, 25, 0.65) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
}

.ms-mon-card {
  padding: 40px 40px 36px 40px;
  position: relative;
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .ms-mon-card {
    padding: 28px 20px 24px 20px;
  }
}

/* Бутон за затваряне на картата горе вдясно */
.ms-mon-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 50%;
  color: #605e5c;
  font-size: 1.25rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 10;
}

.ms-mon-close-btn:hover {
  background: #f3f2f1;
  color: #1b1b1b;
}

/* Хедър с емблема на МОН */
.ms-mon-header {
  margin-bottom: 24px;
}

.ms-mon-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ms-mon-emblem {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 2px;
}

.ms-mon-brand-title {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #002b66;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.3px;
  line-height: 1.25;
  text-transform: uppercase;
}

/* Заглавие на екрана */
.ms-card-title {
  font-size: 24px;
  font-weight: 600;
  color: #1b1b1b;
  margin: 0 0 24px 0;
  line-height: 1.2;
}

/* Списък с акаунти (Избор на акаунт) */
.ms-account-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.ms-account-tile {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 4px;
  cursor: pointer;
  background: transparent;
  transition: background-color 0.15s ease;
  user-select: none;
  border: none;
  width: 100%;
  text-align: left;
  box-sizing: border-box;
}

.ms-account-tile:hover {
  background-color: #f3f2f1;
}

.ms-account-tile:active {
  background-color: #edebe9;
}

/* Кръгла икона на плочката */
.ms-tile-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: #e1dfdd;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 14px;
  flex-shrink: 0;
  color: #323130;
}

/* Текстове на плочката */
.ms-tile-info {
  flex: 1;
  min-width: 0;
}

.ms-tile-primary-text {
  font-size: 15px;
  font-weight: 400;
  color: #1b1b1b;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ms-tile-status-text {
  font-size: 12px;
  color: #605e5c;
  line-height: 1.2;
  margin-top: 2px;
}

/* Меню бутон с три точки (Kebab) */
.ms-kebab-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #605e5c;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
  margin-left: 8px;
  flex-shrink: 0;
}

.ms-kebab-btn:hover {
  background-color: #edebe9;
  color: #1b1b1b;
}

/* Падащо меню за трите точки */
.ms-context-menu {
  position: absolute;
  right: 12px;
  top: 56px;
  background: #ffffff;
  border: 1px solid #d2d0ce;
  border-radius: 2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 50;
  min-width: 220px;
  padding: 4px 0;
}

.ms-context-item {
  width: 100%;
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: #1b1b1b;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
}

.ms-context-item:hover {
  background: #f3f2f1;
}

/* Навигация назад (стрелка) */
.ms-back-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.ms-back-btn {
  border: none;
  background: transparent;
  color: #1b1b1b;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background 0.15s ease;
  font-family: inherit;
}

.ms-back-btn:hover {
  background: #f3f2f1;
}

/* Поле за въвеждане на акаунт в изгледа "Вход" */
.ms-input-container {
  margin-bottom: 24px;
}

.ms-input-box {
  width: 100%;
  padding: 8px 10px;
  font-size: 15px;
  color: #1b1b1b;
  border: 1px solid #605e5c;
  border-bottom: 2px solid #1b1b1b;
  border-radius: 2px;
  box-sizing: border-box;
  background: #ffffff;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.ms-input-box:focus {
  border-color: #0067b8;
  border-bottom-color: #0067b8;
}

.ms-input-hint {
  font-size: 12px;
  color: #605e5c;
  margin-top: 6px;
  line-height: 1.35;
}

.ms-input-error {
  font-size: 12px;
  color: #a80000;
  margin-top: 6px;
  line-height: 1.35;
  display: none;
}

/* Бутони за действие (Напред) */
.ms-action-row {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.ms-btn-primary {
  background: #0067b8;
  color: #ffffff;
  border: none;
  border-radius: 2px;
  padding: 8px 28px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  min-width: 108px;
  text-align: center;
  transition: background 0.15s ease;
  font-family: inherit;
}

.ms-btn-primary:hover {
  background: #005da6;
}

.ms-btn-primary:active {
  background: #004e8c;
}

.ms-btn-primary:disabled {
  background: #c8c6c4;
  color: #ffffff;
  cursor: not-allowed;
}

.ms-sso-action-btn {
  background: #0067b8 !important;
  color: #ffffff !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 4px rgba(0, 103, 184, 0.25);
  transition: all 0.2s ease !important;
}

.ms-sso-action-btn:hover {
  background: #005da6 !important;
  box-shadow: 0 4px 8px rgba(0, 103, 184, 0.35);
  transform: translateY(-1px);
}

.ms-sso-action-btn:active {
  background: #004e8c !important;
  transform: translateY(0);
}

.ms-btn-secondary {
  background: #edebe9;
  color: #1b1b1b;
  border: none;
  border-radius: 2px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
  font-family: inherit;
}

.ms-btn-secondary:hover {
  background: #e1dfdd;
}

/* Долен панел за алтернативни опции и сигурност */
.ms-footer-links {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid #edebe9;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ms-text-link {
  background: none;
  border: none;
  color: #0067b8;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  text-align: left;
}

.ms-text-link:hover {
  text-decoration: underline;
  color: #004e8c;
}

/* ==========================================================================
   ПОТРЕБИТЕЛСКИ ПРОФИЛ И АВАТАР (USER PROFILE & ONBOARDING)
   ========================================================================== */

.user-avatar-img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--primary-gold);
  flex-shrink: 0;
}

.user-avatar-initials {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-gold);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}

.profile-receipt-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  transition: var(--transition-fast);
}

.profile-receipt-item:hover {
  border-color: var(--primary-gold-border);
  background: var(--bg-subtle);
}

.profile-receipt-token {
  font-family: monospace;
  font-weight: 800;
  color: var(--primary-gold);
  font-size: 0.8rem;
}
