/* ================================================================
   ОПК МГУ — осенняя тема (референс: тёмно-зелёный + крем + тыквы)
   ================================================================ */

:root {
  --opk-navy:        #1A3D2E;
  --opk-navy-dark:   #0F2A1F;
  --opk-navy-mid:    #2A5540;
  --opk-navy-faint:  rgba(237, 228, 208, 0.12);
  --opk-navy-border: rgba(237, 228, 208, 0.22);
  --opk-bg:          #1A3D2E;
  --opk-accent:      #E07A3D;
  --opk-green:       #1A3D2E;
  --opk-text:        #EDE4D0;
  --opk-text-soft:   #D4CBB8;
  --opk-cream:       #EDE4D0;
  --opk-fl-orange:   #E8913A;
  --opk-fl-rust:     #C45C3A;
  --opk-fl-leaf:     #D4692A;
  --opk-fl-stem:     #6B4A2A;
}

body {
  background-color: #1A3D2E !important;
  background-image: none !important;
  color: #D4CBB8 !important;
}
body::before {
  background:
    radial-gradient(ellipse 40% 40% at 8%  8%,  rgba(224,122,61,.18) 0%, transparent 100%),
    radial-gradient(ellipse 40% 40% at 92% 12%, rgba(196,92,58,.14)  0%, transparent 100%),
    radial-gradient(ellipse 40% 40% at 90% 90%, rgba(232,145,58,.12) 0%, transparent 100%),
    radial-gradient(ellipse 35% 35% at 10% 88%, rgba(237,228,208,.06) 0%, transparent 100%)
    !important;
}

header {
  background: linear-gradient(150deg, #0F2A1F 0%, #1A3D2E 50%, #244A38 100%) !important;
  border: 1px solid rgba(237,228,208,.18);
  box-shadow: 0 12px 48px rgba(0,0,0,.35) !important;
}
header h1,
header .tagline {
  color: #EDE4D0 !important;
}

.event-card {
  background: #F3EBD9 !important;
  box-shadow: 0 10px 36px rgba(0,0,0,.28) !important;
  border-color: rgba(237,228,208,.2) !important;
}
.event-description { color: #3A4A40 !important; }
.spots-row         { color: #566058 !important; }
.spots-count       { color: #1A3D2E !important; }
.spots-meter       { background: rgba(26,61,46,.12) !important; }

.register-btn {
  background: linear-gradient(135deg, #E07A3D 0%, #C45C3A 100%) !important;
  box-shadow: 0 8px 22px rgba(224,122,61,.35) !important;
  color: #fff !important;
}
.register-btn:hover:not(:disabled) {
  box-shadow: 0 12px 28px rgba(224,122,61,.5) !important;
}
.register-btn:disabled {
  background: #8a9088 !important;
  box-shadow: none !important;
}

.share-btn {
  background: rgba(26,61,46,.1) !important;
  color: #1A3D2E !important;
}
.share-btn:hover {
  background: rgba(26,61,46,.18) !important;
}

.admin-link {
  background: rgba(237,228,208,.12) !important;
  color: #EDE4D0 !important;
  border: 2px solid rgba(237,228,208,.28) !important;
}
.admin-link:hover {
  background: rgba(237,228,208,.22) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.2) !important;
}

.archive-btn {
  background: transparent !important;
  border: 2px solid rgba(237,228,208,.4) !important;
  color: #EDE4D0 !important;
}
.archive-btn:hover {
  background: rgba(237,228,208,.1) !important;
}
.archive-label { color: rgba(237,228,208,.65) !important; }

.empty-state {
  background: rgba(237,228,208,.08) !important;
  color: #EDE4D0 !important;
  border: 1px solid rgba(237,228,208,.18) !important;
}
.loading  { color: #EDE4D0 !important; }
.spinner  {
  border-color: rgba(237,228,208,.2) !important;
  border-top-color: #E07A3D !important;
}

.free-toggle { color: #EDE4D0 !important; }
#eventSearch {
  background: rgba(243,235,217,.95) !important;
  color: #1A2E24 !important;
}
#eventSearch:focus {
  border-color: #E07A3D !important;
  box-shadow: 0 8px 28px rgba(0,0,0,.25) !important;
}

.back-link {
  background: rgba(237,228,208,.12) !important;
  color: #EDE4D0 !important;
  border-color: rgba(237,228,208,.28) !important;
}
.back-link:hover {
  background: rgba(237,228,208,.2) !important;
}

label            { color: #1A3D2E !important; }
.required        { color: #d63031 !important; }
input:focus, textarea:focus, select:focus {
  border-color: #1A3D2E !important;
  box-shadow: 0 0 0 3px rgba(26,61,46,.15) !important;
}
.spots-badge {
  background: linear-gradient(135deg, #1A3D2E, #0F2A1F) !important;
}
.submit-btn {
  background: linear-gradient(135deg, #E07A3D 0%, #C45C3A 100%) !important;
}
.submit-btn:hover:not(:disabled) {
  box-shadow: 0 10px 30px rgba(224,122,61,.4) !important;
}
.submit-btn:disabled {
  background: #8a9088 !important;
  cursor: not-allowed;
  transform: none !important;
}

.share-modal-content {
  background: #F3EBD9 !important;
}
.share-modal-content h3 { color: #1A3D2E !important; }
.share-link-row button,
.share-native {
  background: linear-gradient(135deg, #E07A3D 0%, #C45C3A 100%) !important;
}

.form-container,
.auth-section {
  background: #F3EBD9 !important;
}

/* ---- осенние украшения ---- */
.page-flowers {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.flower-corner {
  position: absolute;
  opacity: .55;
  line-height: 0;
}
.flower-tl { top: -6px;  left: -6px; }
.flower-tr { top: -6px;  right: -6px; transform: scaleX(-1); }
.flower-bl { bottom: -6px; left: -6px; }
.flower-br { bottom: -6px; right: -6px; transform: scaleX(-1); }

@media (max-width: 900px) {
  .flower-corner { opacity: .38; }
  .flower-corner svg { width: 130px; height: 130px; }
}
@media (max-width: 600px) {
  .flower-corner { display: none; }
}

@media (max-width: 480px) {
  html, body { overflow-x: hidden; }
  .container { padding: 0.85rem !important; }
  .register-btn,
  .submit-btn,
  .archive-btn,
  .btn-primary {
    min-height: 44px;
    touch-action: manipulation;
  }
  .share-btn { min-height: 44px; }
  .share-modal { padding: 1rem; }
  .share-modal-content { border-radius: 14px; }
  .event-date-badge { font-size: 0.68rem; padding: 0.35rem 0.65rem; }
  .success-actions > * { flex: 1 1 100%; }
}

/* ---- admin: карточки на тёмно-зелёном фоне ---- */
body.admin-theme {
  color: #D4CBB8 !important;
}
body.admin-theme h1 {
  color: #EDE4D0 !important;
}
body.admin-theme .back-link,
body.admin-theme .back-link:hover {
  color: #EDE4D0 !important;
}
body.admin-theme .auth-section {
  background: rgba(243,235,217,.95) !important;
  border: 1px solid rgba(237,228,208,.25) !important;
  backdrop-filter: blur(8px);
  color: #3A4A40 !important;
}
body.admin-theme .auth-section h2 {
  color: #1A3D2E !important;
}
body.admin-theme .admin-panel {
  background: transparent !important;
}
body.admin-theme .event-item {
  background: rgba(243,235,217,.95) !important;
  border-color: rgba(237,228,208,.2) !important;
  color: #3A4A40 !important;
}
body.admin-theme .event-item h3      { color: #1A3D2E !important; }
body.admin-theme .panel-header h2    { color: #EDE4D0 !important; }
body.admin-theme .info-label         { color: #1A3D2E !important; opacity: .7; }
body.admin-theme input, body.admin-theme textarea, body.admin-theme select {
  background: #fff !important;
  color: #1A2E24 !important;
  border-color: rgba(26,61,46,.25) !important;
}
body.admin-theme .dashboard {
  background: rgba(243,235,217,.9) !important;
  border-color: rgba(237,228,208,.2) !important;
}
body.admin-theme .stat-card {
  background: rgba(26,61,46,.1) !important;
  color: #1A3D2E !important;
}
body.admin-theme .stat-card.accent .stat-value { color: #2d7a4a !important; }
body.admin-theme .stat-card.warn   .stat-value { color: #c97a00 !important; }
body.admin-theme .dashboard-header h2 { color: #1A3D2E !important; }
body.admin-theme .globalMessage { color: #EDE4D0 !important; }
body.admin-theme .mini-meter {
  background: rgba(26,61,46,.15) !important;
}
