/* ===================================================
   Дени Спорт — глобален стил
   Тъмен (default) + светъл режим, mobile-first
   =================================================== */

:root {
  --bg:           #0a0a0a;
  --bg-elev:      #0f0f0f;
  --surface:      #171717;
  --surface-2:    #1f1f1f;
  --text:         #f5f5f5;
  --text-muted:   #a3a3a3;
  --border:       #262626;
  --accent:       #e7ff00;
  --accent-dark:  #c5d800;
  --danger:       #ff4d4d;
  --success:      #4ade80;
  --shadow:       0 20px 60px rgba(0,0,0,0.4);
  --header-h:     60px;
  --nav-row-h:    44px;
  --header-total: 104px;
  --radius:       12px;
  --radius-lg:    20px;
  --font-display: 'Bebas Neue', 'Inter', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s, color 0.25s;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

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

/* ============== HEADER ============== */
.header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--header-h);
  gap: 16px;
}
.header-left  { justify-self: start;  display: flex; align-items: center; }
.header-right { justify-self: end;    display: flex; align-items: center; gap: 10px; }

.brand {
  justify-self: center;
  display: flex; align-items: center;
}
.brand .logo {
  height: 44px;
  width: auto;
  display: block;
}

/* Nav row под header-а */
.nav-row {
  border-top: 1px solid var(--border);
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  height: var(--nav-row-h);
}
.nav-row-inner {
  display: flex; justify-content: center;
  gap: 32px;
  height: 100%;
  align-items: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.nav-row-inner::-webkit-scrollbar { display: none; }
.nav-row a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  padding: 4px 0;
  position: relative;
  transition: color 0.15s;
  letter-spacing: 0.02em;
}
.nav-row a:hover { color: var(--text); }
.nav-row a::after {
  content: ''; position: absolute; left: 0; bottom: -2px;
  width: 0; height: 2px; background: var(--accent);
  transition: width 0.2s;
}
.nav-row a:hover::after { width: 100%; }

/* Quick OPEN бутон (header — ляво) */
.btn-quick-open {
  background: var(--accent);
  color: #0a0a0a;
  border: none;
  padding: 9px 14px;
  border-radius: var(--radius);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-quick-open:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(231,255,0,0.3);
}
.btn-quick-open:disabled { opacity: 0.85; cursor: wait; }
.btn-quick-open.opening {
  animation: pulse-glow 1s ease-in-out infinite;
}
.btn-quick-open .quick-icon  { font-size: 1rem; line-height: 1; }
.btn-quick-open .quick-icon-svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}
.btn-quick-open .quick-label { white-space: nowrap; }

/* Profile бутон (header — дясно) */
.profile-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  padding: 0;
}
.profile-btn:hover {
  border-color: var(--accent);
  transform: scale(1.05);
}
.profile-btn.logged-in {
  background: var(--accent);
  color: #0a0a0a;
  border-color: var(--accent);
}
.profile-btn .profile-icon {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 100%; height: 100%;
  line-height: 1;
}

/* ============== BUTTONS ============== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: all 0.15s ease;
  border: 2px solid transparent;
  white-space: nowrap;
}
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 16px 32px; font-size: 1.05rem; }
.btn-block { width: 100%; }

.btn-primary {
  background: var(--accent);
  color: #0a0a0a;
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(231,255,0,0.25);
}
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--text); background: var(--surface); }

.btn-link {
  background: transparent;
  color: var(--text-muted);
  text-transform: none;
  font-weight: 500;
  padding: 8px;
}
.btn-link:hover { color: var(--text); }

.btn-open {
  /* CSS variables за цветовете — overridable от .status-* класовете */
  --btn-color:  #ff013c;  /* основен (диагонал) */
  --btn-accent: #00e6f6;  /* offset shadow + overlay accent */
  --btn-glitch: #f8f005;  /* text-shadow за glitch ефекта */
  --btn-text:   #fff;

  position: relative;
  width: 100%;
  padding: 22px 24px;
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: 0.12em;
  color: var(--btn-text);
  background: linear-gradient(45deg, transparent 5%, var(--btn-color) 5%);
  border: 0;
  border-radius: 0;
  box-shadow: 6px 0px 0px var(--btn-accent);
  outline: transparent;
  text-transform: none;
  cursor: pointer;
  overflow: visible;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: background-color 0.3s, box-shadow 0.3s;
}
.btn-open:disabled { cursor: wait; opacity: 0.95; }

.btn-open .btn-open-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  filter: drop-shadow(2px 0 0 #00e6f6) drop-shadow(-1px 1px 0 #f8f005);
}
.btn-open .btn-label {
  position: relative;
  z-index: 2;
  line-height: 1;
}

.btn-open::after {
  --slice-0: inset(50% 50% 50% 50%);
  --slice-1: inset(80% -6px 0 0);
  --slice-2: inset(50% -6px 30% 0);
  --slice-3: inset(10% -6px 85% 0);
  --slice-4: inset(40% -6px 43% 0);
  --slice-5: inset(80% -6px 5% 0);
  content: attr(data-text);
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(45deg, transparent 3%, var(--btn-accent) 3%, var(--btn-accent) 5%, var(--btn-color) 5%);
  text-shadow: -3px -3px 0px var(--btn-glitch), 3px 3px 0px var(--btn-accent);
  clip-path: var(--slice-0);
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: 0.12em;
  color: var(--btn-text);
  pointer-events: none;
  z-index: 1;
  animation: openGlitch 1s steps(2, end) infinite;
}

.btn-open.opening::after {
  animation-play-state: paused;
}

@keyframes openGlitch {
  0%   { clip-path: var(--slice-1); transform: translate(-20px, -10px); }
  10%  { clip-path: var(--slice-3); transform: translate(10px, 10px); }
  20%  { clip-path: var(--slice-1); transform: translate(-10px, 10px); }
  30%  { clip-path: var(--slice-3); transform: translate(0px, 5px); }
  40%  { clip-path: var(--slice-2); transform: translate(-5px, 0px); }
  50%  { clip-path: var(--slice-3); transform: translate(5px, 0px); }
  60%  { clip-path: var(--slice-4); transform: translate(5px, 10px); }
  70%  { clip-path: var(--slice-2); transform: translate(-10px, 10px); }
  80%  { clip-path: var(--slice-5); transform: translate(20px, -10px); }
  90%  { clip-path: var(--slice-1); transform: translate(-10px, 0px); }
  100% { clip-path: var(--slice-1); transform: translate(0); }
}

/* Pulse glow остава за quick header бутона */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(231,255,0,0.7); }
  50%      { box-shadow: 0 0 0 20px rgba(231,255,0,0); }
}

/* ============== STATUS COLOR VARIANTS ============== */
/* Без лимит — brand жълто (текст тъмен) */
.btn-open.status-unlimited {
  --btn-color:  #e7ff00;
  --btn-accent: #0a0a0a;
  --btn-glitch: #00e6f6;
  --btn-text:   #0a0a0a;
}
/* 15+ дни — зелено */
.btn-open.status-good {
  --btn-color:  #16a34a;
  --btn-accent: #fbbf24;
  --btn-glitch: #ffffff;
  --btn-text:   #fff;
}
/* 8-14 дни — лайм-зелено (warming) */
.btn-open.status-soon {
  --btn-color:  #84cc16;
  --btn-accent: #00e6f6;
  --btn-glitch: #fff;
  --btn-text:   #0a0a0a;
}
/* 4-7 дни — оранжево */
.btn-open.status-warning {
  --btn-color:  #f97316;
  --btn-accent: #00e6f6;
  --btn-glitch: #fff;
  --btn-text:   #fff;
}
/* 1-3 дни — ярко червено (current default) */
.btn-open.status-danger {
  --btn-color:  #ff013c;
  --btn-accent: #00e6f6;
  --btn-glitch: #f8f005;
  --btn-text:   #fff;
}
/* 0 дни (днес!) — критично тъмно червено */
.btn-open.status-critical {
  --btn-color:  #991b1b;
  --btn-accent: #ff0000;
  --btn-glitch: #fff;
  --btn-text:   #fff;
}

/* ============== Quick header бутон — statusи ============== */
.btn-quick-open.status-unlimited {
  background: var(--accent);
  color: #0a0a0a;
}
.btn-quick-open.status-good {
  background: #16a34a;
  color: #fff;
}
.btn-quick-open.status-soon {
  background: #84cc16;
  color: #0a0a0a;
}
.btn-quick-open.status-warning {
  background: #f97316;
  color: #fff;
}
.btn-quick-open.status-danger {
  background: #ff013c;
  color: #fff;
}
.btn-quick-open.status-critical {
  background: #991b1b;
  color: #fff;
  animation: criticalPulse 1.2s ease-in-out infinite;
}
@keyframes criticalPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7); }
  50%      { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); }
}
.btn-quick-open.status-unlimited:hover:not(:disabled) {
  box-shadow: 0 6px 16px rgba(231,255,0,0.3);
}
.btn-quick-open.status-good:hover:not(:disabled) { box-shadow: 0 6px 16px rgba(22,163,74,0.4); }
.btn-quick-open.status-soon:hover:not(:disabled) { box-shadow: 0 6px 16px rgba(132,204,22,0.4); }
.btn-quick-open.status-warning:hover:not(:disabled) { box-shadow: 0 6px 16px rgba(249,115,22,0.4); }
.btn-quick-open.status-danger:hover:not(:disabled) { box-shadow: 0 6px 16px rgba(255,1,60,0.4); }

/* Мобилно — малко по-малък glitch бутон */
@media (max-width: 480px) {
  .btn-open { font-size: 1.4rem; padding: 18px 18px; }
  .btn-open::after { font-size: 1.4rem; }
  .btn-open .btn-open-icon { width: 24px; height: 24px; }
}

/* ============== HERO ============== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: var(--header-total) 0 80px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}
.hero-bg.default {
  background-image:
    radial-gradient(ellipse at 30% 20%, rgba(231,255,0,0.08), transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(231,255,0,0.05), transparent 50%),
    linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.2), rgba(0,0,0,0.7));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
}
.hero-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 16px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 12vw, 8rem);
  line-height: 0.9;
  letter-spacing: 0.04em;
  margin: 0 0 14px;
  font-weight: 400;
  background: linear-gradient(180deg, var(--text) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-tagline {
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  font-weight: 600;
  color: var(--text);
  margin: 0 0 10px;
}
.hero-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 36px;
}
.hero-cta {
  display: flex; gap: 14px;
  justify-content: center; flex-wrap: wrap;
}

.hero-scroll {
  position: absolute; left: 50%; bottom: 30px;
  transform: translateX(-50%);
  z-index: 2;
  width: 24px; height: 40px;
  border: 2px solid var(--text-muted);
  border-radius: 12px;
  opacity: 0.6;
}
.hero-scroll span {
  display: block;
  width: 3px; height: 8px;
  background: var(--text-muted);
  border-radius: 2px;
  margin: 6px auto;
  animation: scroll-down 1.6s ease-in-out infinite;
}
@keyframes scroll-down {
  0%   { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(14px); opacity: 0; }
}

/* ============== SECTIONS ============== */
.section {
  padding: 100px 0;
}
.section-alt {
  background: var(--bg-elev);
}
.section-head {
  text-align: center;
  margin-bottom: 56px;
}
.section-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  letter-spacing: 0.04em;
  margin: 0 0 14px;
  font-weight: 400;
  line-height: 1;
}
.section-sub {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1rem;
}

/* ============== SCHEDULE ============== */
.schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}
.schedule-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 18px;
  text-align: center;
  transition: all 0.2s;
}
.schedule-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.schedule-day {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.schedule-hours {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ============== ABOUT ============== */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: center;
}
.about-text .section-title { text-align: left; }
.about-body {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  white-space: pre-line;
}
.about-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 22px 24px;
  display: flex; align-items: baseline; gap: 16px;
}
.stat-num {
  font-family: var(--font-display);
  font-size: 2.6rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  line-height: 1;
}
.stat-label {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

/* ============== GALLERY ============== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.gallery-item {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-2);
  cursor: pointer;
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-caption {
  position: absolute; inset: auto 0 0 0;
  padding: 16px;
  background: linear-gradient(0deg, rgba(0,0,0,0.8), transparent);
  font-size: 0.92rem;
  font-weight: 600;
  color: white;
  opacity: 0; transition: opacity 0.2s;
}
.gallery-item:hover .gallery-caption { opacity: 1; }
.gallery-empty {
  text-align: center; color: var(--text-muted); padding: 40px;
}

/* ============== CONTACT ============== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 60px;
  align-items: start;
}
.contact-info .section-title { text-align: left; }
.contact-list {
  list-style: none; padding: 0; margin: 30px 0;
  display: flex; flex-direction: column; gap: 18px;
}
.contact-list li, .contact-list a {
  display: flex; align-items: flex-start; gap: 14px;
  color: var(--text);
  transition: color 0.15s;
}
.contact-list a:hover { color: var(--accent); }
.contact-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.contact-label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 2px;
}
.social {
  display: flex; gap: 10px; margin-top: 24px;
}
.social a {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 1.1rem;
  transition: all 0.15s;
}
.social a:hover {
  background: var(--accent);
  color: #0a0a0a;
  border-color: var(--accent);
  transform: translateY(-2px);
}
.contact-map {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.contact-map iframe { width: 100%; height: 100%; border: 0; display: block; }
.contact-map-empty {
  display: flex; align-items: center; justify-content: center;
  height: 100%;
  color: var(--text-muted);
}

/* ============== FOOTER ============== */
.footer {
  border-top: 1px solid var(--border);
  padding: 30px 0;
  background: var(--bg-elev);
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.footer-brand {
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  font-size: 1.1rem;
}
.footer-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ============== MODAL ============== */
.modal {
  position: fixed; inset: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  padding-top: max(20px, env(safe-area-inset-top));
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  /* На iOS визуалният viewport се мени с клавиатурата — позиционираме спрямо него */
  height: 100vh;
  height: 100dvh;  /* dynamic viewport height — реагира на клавиатурата */
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fade-in 0.2s;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal-dialog {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  width: 100%; max-width: 440px;
  /* --vvh се update-ва от JS чрез window.visualViewport (за iOS с клавиатура) */
  /* Fallbacks: dvh за модерни browser-и, vh за стари */
  max-height: 90vh;
  max-height: 90dvh;
  max-height: calc(var(--vvh, 100vh) - 40px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: var(--shadow);
  animation: slide-up 0.25s ease;
}
@keyframes slide-up {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: all 0.15s;
}
.modal-close:hover { background: var(--surface-2); color: var(--text); }

.modal-tabs {
  display: flex; gap: 4px;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
}
.modal-tab {
  flex: 1;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.15s;
}
.modal-tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: 0.04em;
  margin: 0 0 18px;
  font-weight: 400;
}

.modal-form {
  display: flex; flex-direction: column; gap: 14px;
}
.modal-form label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 0.85rem; color: var(--text-muted);
  font-weight: 500;
}
.modal-form input {
  width: 100%;
  padding: 14px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 16px; /* предотвратява зум на iOS */
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  scroll-margin-top: 100px;
  scroll-margin-bottom: 100px;
}
.modal-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(231,255,0,0.15);
}
.modal-form button[type=submit] { margin-top: 6px; }

.form-msg { display: none; padding: 10px 12px; border-radius: 8px; font-size: 0.88rem; }
.form-msg.show { display: block; }
.form-msg.error { background: rgba(255,77,77,0.1); color: var(--danger); border: 1px solid rgba(255,77,77,0.25); }
.form-msg.ok    { background: rgba(74,222,128,0.1); color: var(--success); border: 1px solid rgba(74,222,128,0.25); }

/* OPEN pane (door control) */
.modal-pane[data-pane="open"] {
  display: flex; flex-direction: column; gap: 18px;
}
.open-greeting { text-align: center; }
.open-hello { color: var(--text-muted); font-size: 0.9rem; }
.open-name {
  font-family: var(--font-display);
  font-size: 2rem; margin: 4px 0 0;
  letter-spacing: 0.04em; font-weight: 400;
}
.open-info {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 14px 18px;
}
.open-info-row {
  display: flex; justify-content: space-between;
  padding: 6px 0;
  font-size: 0.92rem;
}
.open-info-row span { color: var(--text-muted); }
.open-info-row b { color: var(--text); }
.open-info-row b.warn { color: #ffb020; }
.open-info-row b.danger { color: var(--danger); }

.expire-banner {
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex; align-items: center; gap: 10px;
  line-height: 1.35;
}
.expire-banner.warn {
  background: rgba(255, 176, 32, 0.12);
  color: #ffb020;
  border: 1px solid rgba(255, 176, 32, 0.3);
}
.expire-banner.danger {
  background: rgba(255, 77, 77, 0.12);
  color: var(--danger);
  border: 1px solid rgba(255, 77, 77, 0.3);
  animation: pulse-warn 2s ease-in-out infinite;
}
@keyframes pulse-warn {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,77,77,0.4); }
  50%      { box-shadow: 0 0 0 6px rgba(255,77,77,0); }
}
.expire-banner-icon {
  font-size: 1.2rem; flex-shrink: 0;
}

/* ============== RESPONSIVE ============== */
@media (max-width: 900px) {
  .about-grid    { grid-template-columns: 1fr; gap: 40px; }
  .contact-grid  { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
  /* Hero на мобилно: снимката е зад текста, лек breathing room отгоре и без излишна празнина отдолу */
  .hero {
    align-items: flex-start;
    min-height: auto;  /* hero расте по съдържанието, без 100vh празно пространство */
    padding: calc(var(--header-total) + 14px) 0 32px;
    background: linear-gradient(180deg, #0a0a0a 0%, #141414 100%);
  }
  .hero-bg {
    top: calc(var(--header-total) + 14px);  /* лек padding между nav-а и снимката */
  }
  .hero-bg:not(.default) {
    background-size: contain;
    background-position: center top;
    background-repeat: no-repeat;
  }
  .hero-overlay {
    top: calc(var(--header-total) + 14px);
  }

  .section { padding: 70px 0; }
  .section-head { margin-bottom: 36px; }

  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }

  .schedule-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid  { grid-template-columns: repeat(2, 1fr); }

  .footer-inner { flex-direction: column; text-align: center; }

  .modal { padding: 0; align-items: flex-end; }
  .modal-dialog {
    max-width: 100%;
    max-height: 95vh;
    max-height: 95dvh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px));
    animation: slide-up-mobile 0.25s ease;
  }
  @keyframes slide-up-mobile {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }
  /* Когато клавиатурата е отворена — позволяваме повече place за input */
  .modal-form label { font-size: 0.82rem; }
  .modal-tabs { margin-bottom: 18px; }
}

@media (max-width: 420px) {
  .container { padding: 0 16px; }
  .schedule-grid { grid-template-columns: 1fr; }
  .gallery-grid  { grid-template-columns: 1fr; }
  .btn-open { padding: 24px; font-size: 1.3rem; }

  /* Header — по-компактен на малки телефони */
  .header-grid { gap: 8px; }
  .brand .logo { height: 36px; }
  .profile-btn { width: 36px; height: 36px; font-size: 0.95rem; }
  /* Quick OPEN — само икона на мобилно */
  .btn-quick-open { padding: 0; width: 38px; height: 38px; justify-content: center; }
  .btn-quick-open .quick-label { display: none; }
  .btn-quick-open .quick-icon { font-size: 1.15rem; }
  /* Nav row — по-компактен */
  .nav-row-inner { gap: 20px; font-size: 0.82rem; padding: 0 12px; }

  /* Hero — по-малък текст за да се събере всичко */
  .hero { padding: var(--header-total) 0 40px; }
  .hero-eyebrow { font-size: 0.68rem; letter-spacing: 0.2em; }
  .hero-subtitle { margin-bottom: 24px; }

  /* Modal — съдържанието не може да е под header-а */
  .modal-dialog { padding: 22px 18px calc(20px + env(safe-area-inset-bottom, 0px)); }
  .modal-title { font-size: 1.5rem; }

  /* Admin modal — header по-компактен */
  .admin-header { padding: 12px 14px; }
  .admin-title { font-size: 1.2rem; }
  .admin-back, .admin-refresh { width: 36px; height: 36px; font-size: 1.15rem; }
}

/* ============== ADMIN MODAL ============== */
.admin-modal {
  position: fixed; inset: 0;
  z-index: 110;
  background: var(--bg);
  display: flex; flex-direction: column;
  animation: fade-in 0.2s ease;
  /* iOS safe area */
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.admin-modal[hidden] { display: none; }
.admin-modal-inner {
  display: flex; flex-direction: column;
  height: 100%;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}
.admin-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev);
  position: sticky; top: 0; z-index: 5;
}
.admin-back, .admin-refresh {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  font-size: 1.3rem;
  color: var(--text);
  transition: background 0.15s;
}
.admin-back:hover, .admin-refresh:hover { background: var(--surface); }
.admin-title {
  flex: 1;
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  margin: 0;
  font-weight: 400;
}

.admin-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  gap: 4px;
}
.admin-tab {
  padding: 14px 18px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.92rem;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}
.admin-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.admin-tab:hover:not(.active) { color: var(--text); }

.admin-pane {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 60px;
}
.admin-pane[hidden] { display: none; }

/* ============== ADMIN TOOLBAR (search + filters) ============== */
.admin-toolbar {
  position: sticky; top: 0;
  background: var(--bg);
  padding: 12px 0 14px;
  margin: -12px 0 12px;
  z-index: 5;
  display: flex; flex-direction: column;
  gap: 12px;
  box-shadow: 0 8px 12px -8px var(--bg);
}
.admin-toolbar input[type="search"] {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}
.admin-toolbar input[type="search"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(231,255,0,0.15);
}

/* ============== FILTER CHIPS ============== */
.admin-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
  scrollbar-width: thin;
  margin: 0 -4px;
  padding-left: 4px;
  padding-right: 4px;
}
.admin-filters::-webkit-scrollbar { height: 4px; }
.admin-filters::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.filter-chip {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
  flex-shrink: 0;
}
.filter-chip:hover {
  color: var(--text);
  border-color: var(--text-muted);
}
.filter-chip.active {
  background: var(--accent);
  color: #0a0a0a;
  border-color: var(--accent);
}
.chip-count {
  background: rgba(0,0,0,0.18);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.72rem;
  min-width: 22px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.filter-chip:not(.active) .chip-count {
  background: var(--surface-2);
  color: var(--text-muted);
}

.admin-list {
  display: flex; flex-direction: column; gap: 10px;
}
.admin-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 20px;
  font-size: 0.95rem;
}

/* ============== USER CARD ============== */
.user-card {
  display: flex; align-items: stretch; gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 10px 14px 16px;
  transition: border-color 0.15s;
}
.user-card:hover { border-color: var(--text-muted); }
.user-card-main {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.user-card-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 2px;
}
.user-card-name {
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-card-email {
  color: var(--text-muted);
  font-size: 0.85rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-card-meta {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.user-card-meta span:first-child { color: var(--text); font-weight: 600; }
.user-card-phone {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 0 2px;
  margin-top: 4px;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.user-card-phone:hover { text-decoration: underline; }
.user-card-phone:active { opacity: 0.7; }

.user-card-action {
  width: 40px;
  font-size: 1.5rem;
  color: var(--text-muted);
  border-radius: 10px;
  transition: all 0.15s;
  flex-shrink: 0;
  align-self: center;
}
.user-card-action:hover { background: var(--surface-2); color: var(--text); }

.admin-mark { font-size: 0.95rem; }

.exempt-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(96, 165, 250, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.4);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ============== STATUS BADGES ============== */
.status-badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.status-active  { background: rgba(74,222,128,0.15);  color: var(--success); }
.status-pending { background: rgba(255,176,32,0.15);  color: #ffb020; }
.status-blocked { background: rgba(255,77,77,0.15);   color: var(--danger); }
.status-expired { background: rgba(163,163,163,0.18); color: var(--text-muted); }

/* ============== ACTION MENU ============== */
.action-menu {
  position: fixed; inset: 0;
  z-index: 120;
  display: flex; align-items: flex-end; justify-content: center;
}
.action-menu[hidden] { display: none; }
.action-menu-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fade-in 0.15s;
}
.action-menu-content {
  position: relative;
  width: 100%; max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 12px;
  margin: 0 16px;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.3);
  animation: slide-up-mobile 0.2s ease;
  max-height: 90vh;
  overflow-y: auto;
}
.action-menu-title {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 8px 14px 12px;
  text-align: center;
  word-break: break-all;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.action-menu-item {
  width: 100%;
  padding: 14px 16px;
  text-align: left;
  font-size: 0.95rem;
  color: var(--text);
  border-radius: 10px;
  transition: background 0.15s;
}
.action-menu-item:hover:not(.cancel) { background: var(--surface-2); }
.action-menu-item.danger { color: var(--danger); }
.action-menu-item.cancel {
  text-align: center;
  color: var(--text-muted);
  margin-top: 6px;
  border: 1px solid var(--border);
}
.action-menu-item.cancel:hover { background: var(--surface-2); color: var(--text); }
.action-menu-sep {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

@media (min-width: 600px) {
  .action-menu { align-items: center; }
  .action-menu-content {
    border-radius: var(--radius-lg);
    margin: 0 20px;
    animation: slide-up 0.2s ease;
  }
}

/* ============== ADMIN LOGS ============== */
.log-row {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.92rem;
}
.log-when {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.log-who {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.log-act {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.log-act.ok  { background: rgba(74,222,128,0.15); color: var(--success); }
.log-act.err { background: rgba(255,77,77,0.15);  color: var(--danger); }

@media (max-width: 480px) {
  .admin-tabs { padding: 0 8px; }
  .admin-pane { padding: 12px 14px 60px; }
  .log-row {
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    padding: 12px 14px;
  }
  .log-when {
    grid-column: 1 / -1;
    font-size: 0.78rem;
    order: -1;
  }
  .log-who {
    font-size: 0.95rem;
  }
  /* User cards — по-компактни на мобилно */
  .user-card { padding: 12px 8px 12px 14px; }
  .user-card-name { font-size: 0.95rem; }
  .user-card-email { font-size: 0.78rem; }
  .user-card-meta { font-size: 0.78rem; gap: 8px; }
  .user-card-action { width: 36px; font-size: 1.3rem; }

  /* Filter chips — мъничко по-компактни */
  .filter-chip { padding: 7px 12px; font-size: 0.8rem; }
  .chip-count { padding: 2px 7px; font-size: 0.68rem; min-width: 20px; }
}

/* ============== HEADER TOAST (за quick OPEN) ============== */
.header-toast {
  position: fixed;
  top: calc(var(--header-total) + 12px);
  right: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  z-index: 200;
  transform: translateY(-12px);
  opacity: 0;
  transition: all 0.25s ease;
  pointer-events: none;
}
.header-toast[hidden] { display: none !important; }
.header-toast.show { transform: translateY(0); opacity: 1; }
.header-toast.ok  { color: var(--success); border-color: rgba(74,222,128,0.4); }
.header-toast.err { color: var(--danger);  border-color: rgba(255,77,77,0.4); }

@media (max-width: 480px) {
  .header-toast { right: 10px; left: 10px; text-align: center; }
}

/* ============== HIDE-WHEN-EMPTY UTILITIES ============== */
/* Когато няма карта — contact-grid става 1 колона */
body.no-map .contact-grid { grid-template-columns: 1fr; }
body.no-map .contact-info { max-width: 640px; margin: 0 auto; }
body.no-map .contact-map  { display: none; }

/* Скриваме секции с празно съдържание */
section[hidden] { display: none !important; }
li[hidden] { display: none !important; }
p[hidden]  { display: none !important; }

/* ============== UTILITIES ============== */
.is-hidden { display: none !important; }
[hidden] { display: none !important; }

/* ============== GPS BANNER (sticky под header) ============== */
.gps-banner {
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #0a0a0a;
  background: var(--accent);
  border-bottom: 1px solid rgba(0,0,0,0.15);
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}
.gps-banner.info {
  background: var(--accent);
  color: #0a0a0a;
}
.gps-banner.error {
  background: #ff4d4d;
  color: #fff;
  animation: gpsBannerPulse 2s ease-in-out infinite;
}
@keyframes gpsBannerPulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(255,77,77,0.35); }
  50%      { box-shadow: 0 4px 24px rgba(255,77,77,0.65); }
}
.gps-banner-icon { font-size: 1.1rem; flex-shrink: 0; }
.gps-banner-text { flex: 1; line-height: 1.3; }
.gps-banner-btn {
  background: #0a0a0a;
  color: #fff;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  flex-shrink: 0;
  transition: transform 0.15s, background 0.15s;
}
.gps-banner.error .gps-banner-btn {
  background: #fff;
  color: #ff4d4d;
}
.gps-banner-btn:hover { transform: scale(1.04); }
.gps-banner-btn:active { transform: scale(0.97); }
.gps-banner-close {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,0.12);
  color: inherit;
  font-size: 0.85rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gps-banner.error .gps-banner-close { background: rgba(255,255,255,0.2); }
.gps-banner-close:hover { background: rgba(0,0,0,0.22); }
@media (max-width: 480px) {
  .gps-banner { font-size: 0.8rem; padding: 9px 10px; gap: 7px; }
  .gps-banner-btn { padding: 6px 10px; font-size: 0.74rem; }
  .gps-banner-close { width: 26px; height: 26px; }
}

/* ============== INSTALL BANNER ============== */
.install-banner {
  position: sticky;
  top: 0;
  z-index: 85;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
  border-bottom: 1px solid var(--border);
}
.install-banner-icon { font-size: 1.2rem; flex-shrink: 0; }
.install-banner-text { flex: 1; line-height: 1.3; }
.install-banner-btn {
  background: var(--accent);
  color: #0a0a0a;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  flex-shrink: 0;
}
.install-banner-btn:hover { background: var(--accent-dark); }
.install-banner-close {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 0.85rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.install-banner-close:hover { background: rgba(255,255,255,0.18); }
@media (max-width: 480px) {
  .install-banner { font-size: 0.8rem; padding: 9px 10px; gap: 7px; }
  .install-banner-btn { padding: 6px 10px; font-size: 0.74rem; }
}

/* ============== LOCATION HELP MODAL ============== */
.loc-help-modal,
.ios-install-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.loc-help-modal[hidden],
.ios-install-modal[hidden] { display: none; }

.loc-help-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
}
.loc-help-dialog {
  position: relative;
  width: 100%;
  max-width: 500px;
  max-height: 92vh;
  max-height: 92dvh;
  max-height: calc(var(--vvh, 100vh) - 32px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 24px 22px 22px;
  padding-bottom: max(22px, env(safe-area-inset-bottom));
  box-shadow: var(--shadow);
  animation: locHelpSlideUp 0.3s ease;
}
@keyframes locHelpSlideUp {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
@media (min-width: 600px) {
  .loc-help-modal,
  .ios-install-modal { align-items: center; }
  .loc-help-dialog { border-radius: var(--radius-lg); }
}
.loc-help-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.loc-help-close:hover { background: #2a2a2a; }
.loc-help-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  color: var(--text);
}
.loc-help-sub {
  margin: 0 0 14px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.loc-help-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.loc-help-tab {
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.15s;
}
.loc-help-tab:hover { color: var(--text); }
.loc-help-tab.active {
  background: var(--accent);
  color: #0a0a0a;
}
.loc-help-callout {
  background: rgba(231,255,0,0.08);
  border: 1px solid rgba(231,255,0,0.3);
  border-left: 3px solid var(--accent);
  padding: 11px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text);
}
.loc-help-steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
}
.loc-help-steps li {
  counter-increment: step;
  position: relative;
  padding: 9px 0 9px 38px;
  font-size: 0.92rem;
  line-height: 1.45;
  border-bottom: 1px dashed var(--border);
}
.loc-help-steps li:last-child { border-bottom: none; }
.loc-help-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 9px;
  width: 26px;
  height: 26px;
  background: var(--accent);
  color: #0a0a0a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.78rem;
}
.loc-help-hint {
  margin-top: 14px;
  padding: 11px 14px;
  background: var(--surface-2);
  border-radius: 8px;
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.loc-help-hint b { color: var(--text); }
.loc-help-done {
  margin-top: 18px;
}

@media (max-width: 480px) {
  .loc-help-dialog { padding: 22px 18px 18px; }
  .loc-help-title { font-size: 1.4rem; }
  .loc-help-tab { padding: 6px 10px; font-size: 0.72rem; }
  .loc-help-steps li { font-size: 0.86rem; padding-left: 34px; }
  .loc-help-steps li::before { width: 24px; height: 24px; font-size: 0.74rem; }
}

/* ============== PASSWORD MODALS (forgot / reset / change) ============== */
.btn-link-forgot {
  display: block;
  margin: 12px auto 0;
  padding: 6px 12px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}
.btn-link-forgot:hover { color: var(--accent); }

.pw-modal-sub {
  margin: 0 0 16px;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Гарантира че pw-модалите изглеждат като main модала */
.pw-modal .modal-dialog {
  max-width: 440px;
}

/* ============== ADMIN PUSH COMPOSER ============== */
.push-composer {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.push-composer-title {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  color: var(--text);
}
.push-composer label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 12px;
  position: relative;
}
.push-composer input[type="text"],
.push-composer input[type="email"],
.push-composer textarea {
  display: block;
  width: 100%;
  margin-top: 5px;
  padding: 10px 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  outline: none;
  transition: border-color 0.15s;
}
.push-composer input:focus,
.push-composer textarea:focus {
  border-color: var(--accent);
}
.push-composer textarea {
  resize: vertical;
  min-height: 70px;
  line-height: 1.4;
}
.push-counter {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.push-target-group {
  margin: 0 0 14px;
  padding: 12px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.push-target-group legend {
  padding: 0 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.push-radio {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  margin: 0 !important;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.push-radio input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.push-radio span {
  flex: 1;
}
#push-target-email {
  margin-top: 8px;
}
#push-target-email[hidden] { display: none !important; }

.push-test-mode {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(231,255,0,0.06);
  border: 1px solid rgba(231,255,0,0.25);
  border-radius: 8px;
  margin-bottom: 14px !important;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.push-test-mode input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.push-composer .form-msg { margin: 0 0 12px; }

/* ============== ADMIN PUSH HISTORY ============== */
.push-history {
  padding: 12px 18px 24px;
}
.push-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 12px;
}
.push-history-header h4 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.push-history-refresh {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.push-history-refresh:hover { background: #2a2a2a; }

.push-history-item {
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.push-history-item.err { border-left-color: var(--danger); }

.push-hist-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.push-hist-time { font-weight: 600; }
.push-hist-type {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.push-hist-type.marketing {
  background: rgba(231,255,0,0.18);
  color: var(--accent);
}
.push-hist-type.transactional {
  background: rgba(96,165,250,0.18);
  color: #60a5fa;
}
.push-hist-count {
  margin-left: auto;
  font-weight: 600;
  color: var(--text);
}
.push-hist-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}
.push-hist-body {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 6px;
}
.push-hist-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.push-hist-err {
  color: var(--danger);
  font-weight: 500;
}

@media (max-width: 480px) {
  .push-composer { padding: 14px 14px; }
  .push-composer-title { font-size: 1.2rem; }
  .push-history { padding: 10px 14px 24px; }
  .push-history-item { padding: 10px; }
}

/* ============== PUSH OPT-OUT TOGGLE (в Profile) ============== */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  margin-top: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
}
.toggle-row[hidden] { display: none !important; }
.toggle-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
}
.toggle-icon { font-size: 1.2rem; line-height: 1.2; flex-shrink: 0; }
.toggle-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.9rem;
  color: var(--text);
}
.toggle-text b { font-weight: 700; font-size: 0.92rem; }
.toggle-text small {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.35;
}
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  background: #404040;
  border-radius: 24px;
  cursor: pointer;
  transition: 0.25s;
}
.toggle-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.25s;
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--accent);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
  background: #0a0a0a;
}

/* ============== PUSH PERMISSION MODAL ============== */
.push-perm-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.push-perm-modal[hidden] { display: none; }
.push-perm-dialog {
  text-align: center;
  padding: 28px 24px 22px !important;
}
@media (min-width: 600px) {
  .push-perm-modal { align-items: center; }
}
.push-perm-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  background: rgba(231,255,0,0.12);
  border: 2px solid var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  animation: pushPermPulse 1.5s ease-in-out infinite;
}
@keyframes pushPermPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(231,255,0,0.5); }
  50%      { box-shadow: 0 0 0 12px rgba(231,255,0,0); }
}
.push-perm-title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: 0.04em;
  color: var(--text);
}
.push-perm-text {
  margin: 0 0 14px;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.push-perm-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  text-align: left;
}
.push-perm-list li {
  padding: 8px 12px;
  margin-bottom: 6px;
  background: var(--surface-2);
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.4;
}
.push-perm-list b { font-weight: 700; }
.push-perm-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.push-perm-actions .btn { margin: 0 !important; }

@media (max-width: 480px) {
  .push-perm-dialog { padding: 24px 20px 18px !important; }
  .push-perm-icon { width: 64px; height: 64px; font-size: 2rem; }
  .push-perm-title { font-size: 1.5rem; }
}
