/* ============================================
   KALENDÁRIUM - FRONTEND CSS
   ============================================ */

/* ============================================
   RESET & VARIABLES
   ============================================ */

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

:root {
  /* Colors */
  --primary: #667eea;
  --primary-dark: #5568d3;
  --secondary: #764ba2;
  --success: #4facfe;
  --warning: #f093fb;
  --danger: #e74c3c;
  --dark: #2c3e50;
  --light: #ecf0f1;
  --gray: #95a5a6;
  --gray-dark: #7f8c8d;
  --border: #dfe6e9;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;

  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --font-size-sm: 0.875rem;
  --font-size-md: 1rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;

  /* Borders */
  --border-radius: 8px;
  --border-radius-sm: 4px;
  --border-radius-lg: 12px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 20px rgba(0,0,0,0.15);

  /* Transitions */
  --transition: all 0.3s ease;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-md);
  line-height: 1.6;
  color: var(--dark);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

/* ============================================
   LOGIN SCREEN
   ============================================ */

.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--spacing-md);
  overflow: hidden;
  position: relative;
  background: linear-gradient(315deg, rgba(101,0,94,1) 3%, rgba(60,132,206,1) 38%, rgba(48,238,226,1) 68%, rgba(255,25,25,1) 98%);
  animation: loginGradient 15s ease infinite;
  background-size: 400% 400%;
  background-attachment: fixed;
}

@keyframes loginGradient {
  0% {
    background-position: 0% 0%;
  }
  50% {
    background-position: 100% 100%;
  }
  100% {
    background-position: 0% 0%;
  }
}

/* Animált hullámok */
.login-screen .wave {
  background: rgb(255 255 255 / 25%);
  border-radius: 1000% 1000% 0 0;
  position: absolute;
  width: 200%;
  height: 12em;
  animation: loginWave 10s -3s linear infinite;
  transform: translate3d(0, 0, 0);
  opacity: 0.8;
  bottom: 0;
  left: 0;
  z-index: 0;
}

.login-screen .wave:nth-of-type(2) {
  bottom: -1.25em;
  animation: loginWave 18s linear reverse infinite;
  opacity: 0.8;
}

.login-screen .wave:nth-of-type(3) {
  bottom: -2.5em;
  animation: loginWave 20s -1s reverse infinite;
  opacity: 0.9;
}

@keyframes loginWave {
  2% {
    transform: translateX(1);
  }
  25% {
    transform: translateX(-25%);
  }
  50% {
    transform: translateX(-50%);
  }
  75% {
    transform: translateX(-25%);
  }
  100% {
    transform: translateX(1);
  }
}

.login-container {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  padding: var(--spacing-xl);
  width: 100%;
  max-width: 400px;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(10px);
}

/* Login screen dark mode */
body.dark-mode .login-container {
  background: rgba(45, 55, 72, 0.95);
}

body.dark-mode .login-header h1 {
  color: #a0aec0;
}

body.dark-mode .login-header p {
  color: #718096;
}

body.dark-mode .login-form label {
  color: #e2e8f0;
}

body.dark-mode .login-form input {
  background: #1a202c;
  border-color: #4a5568;
  color: #e2e8f0;
}

body.dark-mode .login-form input:focus {
  border-color: #667eea;
}

body.dark-mode .login-form input::placeholder {
  color: #718096;
}

/* Login divider */
.login-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #ddd;
}

.login-divider span {
  padding: 0 15px;
  color: #999;
  font-size: 14px;
}

body.dark-mode .login-divider::before,
body.dark-mode .login-divider::after {
  background: #4a5568;
}

body.dark-mode .login-divider span {
  color: #718096;
}

/* Registration Steps */
.register-step {
  animation: fadeIn 0.3s ease;
}

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

/* Countdown Circle */
.verify-waiting {
  text-align: center;
  padding: 20px 0;
}

.countdown-circle {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto 20px;
}

.countdown-circle svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.countdown-bg {
  fill: none;
  stroke: #e0e0e0;
  stroke-width: 8;
}

.countdown-progress {
  fill: none;
  stroke: #667eea;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 283;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
}

.countdown-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 32px;
  font-weight: bold;
  color: #667eea;
}

body.dark-mode .countdown-bg {
  stroke: #4a5568;
}

body.dark-mode .countdown-text {
  color: #a0aec0;
}

.verify-info {
  color: #666;
  margin-bottom: 10px;
}

.verify-email-sent {
  color: #999;
  font-size: 14px;
  margin-bottom: 20px;
}

body.dark-mode .verify-info {
  color: #a0aec0;
}

body.dark-mode .verify-email-sent {
  color: #718096;
}

#resendSection {
  margin-bottom: 15px;
}

#resendEmailBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-link {
  background: none;
  border: none;
  color: #667eea;
  cursor: pointer;
  text-decoration: underline;
  font-size: 14px;
}

.btn-link:hover {
  color: #764ba2;
}

body.dark-mode .btn-link {
  color: #a0aec0;
}

/* Success Message */
.success-message {
  text-align: center;
  padding: 20px;
  background: #d4edda;
  border-radius: 8px;
  margin-bottom: 20px;
}

.success-message p {
  color: #155724;
  margin: 10px 0;
}

body.dark-mode .success-message {
  background: rgba(40, 167, 69, 0.2);
}

body.dark-mode .success-message p {
  color: #7dd3a3;
}

.login-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.login-header h1 {
  font-size: var(--font-size-xl);
  color: var(--primary);
  margin-bottom: var(--spacing-sm);
}

.login-header p {
  color: var(--gray);
}

.login-form .form-group {
  margin-bottom: var(--spacing-lg);
}

.error-message {
  background: #fee;
  color: var(--danger);
  padding: var(--spacing-sm);
  border-radius: var(--border-radius-sm);
  margin-top: var(--spacing-md);
  font-size: var(--font-size-sm);
}

/* Magic Link Login Styles */
.optional-label {
  font-weight: normal;
  font-size: 0.85em;
  color: var(--gray);
}

.login-hint {
  font-size: 0.85em;
  color: var(--gray);
  text-align: center;
  margin-top: var(--spacing-sm);
  margin-bottom: 0;
}

.btn-magic-link {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
  color: white !important;
}

.btn-magic-link:hover {
  background: linear-gradient(135deg, #218838 0%, #1aa179 100%) !important;
}

body.dark-mode .optional-label {
  color: #718096;
}

body.dark-mode .login-hint {
  color: #718096;
}

/* ============================================
   APP LAYOUT
   ============================================ */

.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: #f5f6fa;
}

.app-header {
  background: white;
  box-shadow: var(--shadow-sm);
  padding: var(--spacing-md) var(--spacing-lg);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  justify-content: flex-start;
}

.header-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  justify-content: flex-end;
}

.app-title {
  color: var(--primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
  position: relative;
  animation: fadeInGlow 1s ease-in-out;
  margin: 0;
}

.title-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
}

.title-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 2px;
}

.title-line-1,
.title-line-2 {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.title-domain {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-25deg);
  font-size: 0.75rem;
  font-weight: 800;
  color: rgba(102, 126, 234, 0.3);
  pointer-events: none;
  text-shadow: 0 0 10px rgba(102, 126, 234, 0.2);
  z-index: 1;
}

.app-title:hover {
  transform: scale(1.05);
  text-shadow: 0 0 20px rgba(102, 126, 234, 0.4);
}

.app-title:hover .title-domain {
  color: rgba(102, 126, 234, 0.5);
  text-shadow: 0 0 15px rgba(102, 126, 234, 0.4);
}

.app-title:hover .header-calendar-icon {
  transform: rotate(-5deg) scale(1.1);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

@keyframes fadeInGlow {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dinamikus naptár ikon (header) */
.header-calendar-icon {
  display: inline-flex;
  flex-direction: column;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.header-calendar-month {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  padding: 3px 0;
  letter-spacing: 0.5px;
  line-height: 1;
}

.header-calendar-day {
  background: #f8f9fa;
  color: #1a1a1a;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Dark mode támogatás */
body.dark-mode .header-calendar-day {
  background: #ffffff;
  color: #1a1a1a;
}

body.dark-mode .header-calendar-icon {
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

body.dark-mode .app-title {
  color: #90caf9;
}

body.dark-mode .title-domain {
  color: rgba(144, 202, 249, 0.3);
  text-shadow: 0 0 10px rgba(144, 202, 249, 0.2);
}

body.dark-mode .app-title:hover .title-domain {
  color: rgba(144, 202, 249, 0.5);
  text-shadow: 0 0 15px rgba(144, 202, 249, 0.4);
}

.project-selector {
  min-width: 300px;
}

.project-select {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  font-size: var(--font-size-md);
}

.user-info {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: var(--dark);
}

.badge {
  display: inline-block;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-sm);
  font-weight: 600;
}

.badge-admin {
  background: var(--primary);
  color: white;
}

.app-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
  width: 240px;
  background: white;
  box-shadow: var(--shadow-sm);
  overflow-y: auto;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.sidebar.collapsed {
  width: 60px;
}

.sidebar.collapsed .nav-text {
  display: none;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-md);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  color: var(--dark);
  text-decoration: none;
  border-radius: var(--border-radius);
  transition: var(--transition);
  margin-bottom: var(--spacing-xs);
}

.nav-item:hover {
  background: var(--light);
}

.nav-item.active {
  background: var(--primary);
  color: white;
}

.nav-icon {
  font-size: var(--font-size-lg);
}

.nav-divider {
  height: 1px;
  background: var(--border);
  margin: var(--spacing-md) 0;
}

.nav-section-title {
  font-size: var(--font-size-sm);
  color: var(--gray);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: var(--spacing-md) 0 var(--spacing-sm);
  padding: 0 var(--spacing-md);
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-lg);
}

.view-container {
  display: none;
}

.view-container.active {
  display: block;
}

.view-header {
  background: white;
  padding: var(--spacing-lg);
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
}

.view-header h2 {
  color: var(--dark);
  margin-bottom: var(--spacing-md);
}

/* Projektek view header - egy sorban */
#projectsView .view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#projectsView .view-header h2 {
  margin: 0;
}

.header-actions {
  display: flex;
  gap: var(--spacing-sm);
  align-items: center;
}

.view-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  margin-bottom: var(--spacing-md);
}

.view-mode-selector {
  display: flex;
  gap: var(--spacing-xs);
}

.view-navigation {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.period-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--dark);
  min-width: 200px;
  text-align: center;
}

.view-actions {
  display: flex;
  gap: var(--spacing-sm);
}

.view-filters {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  align-items: center;
}

.search-input,
.filter-select {
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  font-size: var(--font-size-md);
  transition: all 0.2s ease;
}

.filter-select.filter-active {
  border-color: var(--primary);
  border-width: 2px;
  background-color: rgba(102, 126, 234, 0.1);
  font-weight: 600;
}

.search-input {
  min-width: 250px;
}

.filter-select {
  min-width: 150px;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-md);
  border: none;
  border-radius: var(--border-radius);
  font-size: var(--font-size-md);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  text-align: center;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--gray);
  color: white;
}

.btn-secondary:hover {
  background: var(--gray-dark);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #c0392b;
}

.btn-success {
  background: #27ae60;
  color: white;
}

.btn-success:hover {
  background: #229954;
}

.btn-sm {
  padding: var(--spacing-xs) var(--spacing-sm);
  font-size: var(--font-size-sm);
}

.btn-icon {
  padding: var(--spacing-sm);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: var(--font-size-lg);
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--light);
  border-radius: var(--border-radius);
}

/* Navigation buttons - bigger and more visible */
#prevPeriod,
#nextPeriod {
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  font-size: 24px;
  font-weight: bold;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

#prevPeriod:hover,
#nextPeriod:hover {
  background: var(--primary-dark);
  transform: scale(1.1);
  box-shadow: var(--shadow-md);
}

.btn-block {
  width: 100%;
}

.btn-remove {
  background: transparent;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0 var(--spacing-xs);
}

.btn-remove:hover {
  color: #c0392b;
}

/* ============================================
   CALENDAR - MONTH VIEW
   ============================================ */

.calendar-container {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  padding: var(--spacing-lg);
}

.calendar-month {
  overflow-x: auto;
}

/* Calendar weekdays header */
.calendar-weekdays {
  display: grid;
  grid-template-columns: 40px repeat(7, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.week-header {
  text-align: center;
  font-weight: 600;
  color: var(--primary);
  padding: 10px 5px;
  font-size: 12px;
  writing-mode: vertical-rl;
  transform: rotate(-180deg);
}

.day-header {
  text-align: center;
  font-weight: 600;
  color: var(--primary);
  padding: 10px;
  font-size: 14px;
  min-width: 0;
  overflow: hidden;
}

/* Calendar grid */
.calendar-grid {
  display: grid;
  grid-template-columns: 40px repeat(7, 1fr);
  gap: 10px;
  min-width: 0;
}

.week-label {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(102, 126, 234, 0.1);
  border-radius: 10px;
  min-height: 120px;
  writing-mode: vertical-rl;
  transform: rotate(-180deg);
  font-weight: 600;
  color: var(--primary);
  font-size: 11px;
  padding: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.week-label:hover {
  background: var(--primary);
  color: white;
  transform: rotate(-180deg) scale(1.05);
}

.day-cell {
  background: #f8f9fa;
  border-radius: 10px;
  min-height: 120px;
  min-width: 0;
  padding: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
}

.day-cell:hover {
  background: #e9ecef;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.day-cell.other-month {
  opacity: 0.3;
}

.day-cell.today {
  border-color: var(--primary);
  background: #f0f4ff;
}

.day-number {
  font-weight: 600;
  color: #333;
  font-size: 11px;
  margin-bottom: 4px;
}

.events {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  overflow-x: hidden;
}

.event {
  position: relative;
  background: var(--primary);
  color: white;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
  line-height: 1.3;
}

.event:hover {
  transform: translateX(2px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.event-time-compact {
  font-weight: 600;
  font-size: 9px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-project-compact {
  font-size: 9px;
  opacity: 0.9;
  margin-bottom: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-title-compact {
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================
   EVENT TOOLTIP
   ============================================ */

.event-tooltip {
  position: fixed;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 12px 16px;
  border-radius: var(--border-radius);
  font-size: 13px;
  line-height: 1.6;
  white-space: normal;
  z-index: 10000;
  pointer-events: none;
  max-width: 300px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.event-tooltip strong {
  font-weight: 700;
  color: #90caf9;
}

.event-tooltip em {
  font-style: italic;
  color: #e0e0e0;
}

.event-tooltip .markdown-list {
  margin: 4px 0;
  padding-left: 20px;
}

.event-tooltip ul.markdown-list {
  list-style-type: disc;
}

.event-tooltip ol.markdown-list {
  list-style-type: decimal;
}

.event-tooltip .markdown-list li {
  margin: 2px 0;
}

.event-tooltip.bottom::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: rgba(0, 0, 0, 0.9);
}

.event-tooltip::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.9);
}

/* ============================================
   CALENDAR - WEEK VIEW
   ============================================ */

.calendar-week {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.week-day {
  background: white;
  border-radius: var(--border-radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.week-day:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.week-day.today {
  border: 2px solid var(--success);
}

.week-day-header-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--light);
  padding: var(--spacing-sm) var(--spacing-md);
  border-bottom: 1px solid var(--border);
  gap: var(--spacing-sm);
}

.week-day-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-sm);
  transition: all 0.2s ease;
  color: var(--primary);
  flex-shrink: 0;
}

.week-day-toggle:hover {
  background: var(--primary);
  color: white;
}

.week-day-toggle .toggle-icon {
  transition: transform 0.2s ease;
}

.week-day.collapsed .week-day-toggle .toggle-icon {
  transform: rotate(-90deg);
}

.week-day-header {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.day-header-clickable {
  cursor: pointer;
  transition: all 0.2s ease;
  padding: var(--spacing-sm);
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.day-header-clickable:hover {
  background: var(--primary);
}

.day-header-clickable:hover .week-day-name,
.day-header-clickable:hover .week-day-date,
.day-header-clickable:hover .week-day-month {
  color: white;
}

.week-day-name {
  font-weight: 600;
  color: var(--gray);
  font-size: var(--font-size-sm);
}

.week-day-date {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--dark);
}

.week-day-month {
  font-size: var(--font-size-sm);
  color: var(--gray-dark);
}

.week-day-events {
  padding: var(--spacing-sm);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.no-events {
  color: var(--gray);
  font-size: var(--font-size-sm);
  text-align: center;
  padding: var(--spacing-md);
}

.event-item {
  position: relative;
  background: white;
  border-left: 4px solid var(--primary);
  padding: var(--spacing-sm);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.event-item:hover {
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  background: var(--light);
}

.event-time {
  font-weight: 600;
  color: var(--primary);
  font-size: var(--font-size-sm);
  margin-bottom: 4px;
}

.event-title {
  color: var(--dark);
  font-size: var(--font-size-sm);
  font-weight: 500;
}

.event-meta {
  color: var(--gray);
  font-size: 11px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Event Freshness Badges */
.event-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 3px;
  letter-spacing: 0.5px;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  z-index: 10;
  animation: badgePulse 2s ease-in-out infinite;
}

.event-badge-hot {
  background: linear-gradient(135deg, #ff3b3b 0%, #ff6b6b 100%);
  color: white;
  animation: badgePulseHot 1.5s ease-in-out infinite;
}

.event-badge-new {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  color: #333;
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulseHot {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(255, 59, 59, 0.6);
  }
}

@keyframes badgePulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
}

/* Dark mode adjustments */
body.dark-mode .event-badge-new {
  background: linear-gradient(135deg, #ffa500 0%, #ffc107 100%);
  color: #000;
}

body.dark-mode .event-badge-hot {
  background: linear-gradient(135deg, #ff1744 0%, #ff5252 100%);
  color: white;
}

.btn-add-event {
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  border: 2px dashed var(--primary);
  background: white;
  color: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-add-event:hover {
  background: var(--primary);
  color: white;
  border-style: solid;
  transform: scale(1.1);
}

/* ============================================
   CALENDAR - DAY VIEW
   ============================================ */

.calendar-day {
  max-width: 800px;
  margin: 0 auto;
}

.calendar-day-grouped,
.calendar-week-grouped {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 8px;
}

.calendar-week-grouped .week-day {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

.calendar-week-grouped .week-day.today {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

body.dark-mode .calendar-week-grouped .week-day {
  background: #2d3748;
  border-color: #4a5568;
}

body.dark-mode .calendar-week-grouped .week-day.today {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Stacked Day View - Full Width Cards */
.calendar-day-stacked {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  padding: var(--spacing-md);
}

.day-event-card {
  background: white;
  border-radius: 8px;
  border-left: 5px solid var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: var(--spacing-md);
  transition: all 0.3s ease;
}

.day-event-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.day-event-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-sm);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid var(--border);
}

.day-event-header .event-badge,
.day-event-card .event-badge {
  position: static !important;
  display: inline-block !important;
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
  margin: 0;
  opacity: 1 !important;
  visibility: visible !important;
  top: auto !important;
  right: auto !important;
}

.day-event-time {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
}

.day-event-date {
  font-weight: 400;
  color: var(--text-muted);
  margin-left: var(--spacing-sm);
}

.day-event-title-clickable {
  cursor: pointer;
  margin-bottom: var(--spacing-md);
  padding: var(--spacing-sm);
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.day-event-title-clickable:hover {
  background-color: rgba(102, 126, 234, 0.05);
}

.day-event-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}

.day-event-meta {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  padding: var(--spacing-xs) 0;
  font-size: 0.95rem;
}

.day-event-project {
  color: var(--primary);
  font-weight: 600;
}

.day-event-venue {
  color: var(--text-muted);
}

.day-event-section {
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 2px solid var(--border);
}

.day-event-section-toggle {
  width: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-xs) 0;
  margin-bottom: var(--spacing-sm);
  font-size: 1rem;
  color: var(--primary);
  transition: all 0.2s ease;
  text-align: left;
}

.day-event-section-toggle:hover {
  color: var(--primary-dark);
  background: rgba(102, 126, 234, 0.05);
  padding-left: var(--spacing-xs);
  border-radius: 4px;
}

.day-event-section-toggle .toggle-label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  flex-wrap: wrap;
}

.day-event-section-toggle strong {
  display: inline;
}

.day-event-section-toggle .toggle-icon {
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: var(--spacing-xs);
}

.day-event-section-toggle[aria-expanded="false"] .toggle-icon {
  transform: rotate(-90deg);
}

.day-event-section-toggle[aria-expanded="true"] .toggle-icon {
  transform: rotate(0deg);
}

/* Badge inside toggle button */
.day-event-section-toggle .event-badge {
  display: inline-block;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 600;
  margin-left: 6px;
  vertical-align: middle;
  white-space: nowrap;
}

.day-event-section-toggle .event-badge-hot {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
  animation: pulse 2s infinite;
}

.day-event-section-toggle .event-badge-new {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
  color: white;
}

.day-event-section-header {
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: var(--spacing-sm);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.day-event-section-content {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text);
  padding: var(--spacing-sm);
  background: rgba(236, 240, 241, 0.3);
  border-radius: 4px;
}

.day-event-section-content .markdown-list {
  margin: 8px 0;
  padding-left: 24px;
}

.day-event-section-content ul.markdown-list {
  list-style-type: disc;
}

.day-event-section-content ol.markdown-list {
  list-style-type: decimal;
}

.day-event-section-content .markdown-list li {
  margin: 4px 0;
  line-height: 1.5;
}

.day-event-section-content strong {
  font-weight: 700;
  color: var(--primary);
}

.day-event-section-content em {
  font-style: italic;
}

body.dark-mode .day-event-section-content {
  background: rgba(0, 0, 0, 0.2);
}

.day-event-comments-content {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.loading-comments {
  text-align: center;
  color: var(--text-secondary);
  font-style: italic;
  padding: var(--spacing-md);
}

.comment-item {
  background: white;
  padding: var(--spacing-sm);
  border-radius: 4px;
  border-left: 3px solid var(--primary);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-xs);
}

.comment-date {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.relative-time {
  cursor: help;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.relative-time:hover {
  color: var(--primary);
}

.comment-text {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text);
}

.comment-empty,
.comment-error {
  text-align: center;
  padding: var(--spacing-md);
  color: var(--text-secondary);
  font-style: italic;
}

.comment-error {
  color: var(--danger);
}

/* Dark mode support for stacked day view */
body.dark-mode .day-event-card {
  background: var(--dark-card);
  border-left-color: var(--primary);
}

body.dark-mode .day-event-title {
  color: var(--dark-text);
}

body.dark-mode .day-event-meta {
  background: transparent;
  border: none;
}

body.dark-mode .day-event-date {
  color: var(--dark-text-muted);
}

body.dark-mode .day-event-venue {
  color: var(--dark-text-muted);
}

body.dark-mode .day-event-project {
  color: var(--primary);
}

body.dark-mode .day-event-section {
  border-top: 1px solid rgba(108, 117, 125, 0.2);
}

body.dark-mode .day-event-section-content {
  background: rgba(44, 62, 80, 0.3);
  color: var(--dark-text);
}

body.dark-mode .comment-item {
  background: var(--dark-bg);
  color: var(--dark-text);
}

body.dark-mode .relative-time {
  color: var(--dark-text-muted);
}

body.dark-mode .relative-time:hover {
  color: var(--primary);
}

body.dark-mode .day-event-section-toggle {
  color: var(--primary);
}

body.dark-mode .day-event-section-toggle:hover {
  background: rgba(102, 126, 234, 0.1);
}

.day-events-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

/* Venue Cards - Horizontal Scroll Layout */
.venue-scroll-wrapper {
  position: relative;
  width: 100%;
  margin: var(--spacing-md) 0;
}

.venue-cards-container {
  display: flex;
  gap: var(--spacing-md);
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: var(--spacing-sm) 0;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--light);
}

.venue-cards-container::-webkit-scrollbar {
  height: 8px;
}

.venue-cards-container::-webkit-scrollbar-track {
  background: var(--light);
  border-radius: 4px;
}

.venue-cards-container::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

.venue-cards-container::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

.venue-card {
  min-width: 320px;
  max-width: 400px;
  flex-shrink: 0;
  background: white;
  border-radius: 8px;
  border-top: 4px solid var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
}

.venue-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.venue-card-header {
  padding: var(--spacing-md);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.venue-card-header h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.venue-event-count {
  background: rgba(255, 255, 255, 0.3);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
}

.venue-card-events {
  padding: var(--spacing-sm);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  max-height: 400px;
  overflow-y: auto;
}

.venue-card-events .event-item {
  margin-bottom: 0;
  border-left: none;
  background: var(--light);
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Clickable event body */
.event-item-clickable {
  cursor: pointer;
  padding: var(--spacing-sm);
  flex: 1;
  transition: background-color 0.2s ease;
}

.event-item-clickable:hover {
  background-color: rgba(102, 126, 234, 0.05);
}

/* Title wrapper */
.event-title-wrapper {
  display: flex;
  align-items: center;
}

.event-title {
  flex: 1;
  min-width: 0;
}

/* Event expand section wrapper */
.event-expand-section {
  border-top: 1px solid var(--border);
}

/* Expand/collapse button */
.event-expand-toggle {
  width: 100%;
  min-height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--primary);
  transition: all 0.2s ease;
  padding: 6px var(--spacing-sm);
  margin: 0;
  font-size: 0.9rem;
}

.event-expand-toggle:hover {
  background: rgba(102, 126, 234, 0.1);
  color: var(--primary-dark);
}

.event-expand-toggle .expand-label {
  font-weight: 500;
  flex: 1;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 6px;
}

.event-expand-toggle .expand-label .event-badge-hot,
.event-expand-toggle .expand-label .event-badge-new {
  font-size: 0.65rem;
  padding: 2px 6px;
  margin-left: 2px;
}

.event-expand-toggle .expand-icon {
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 8px;
}

.event-expand-toggle[aria-expanded="true"] .expand-icon {
  transform: rotate(180deg);
}

/* Expanded content */
.event-expanded-content {
  padding: var(--spacing-sm);
  background: rgba(236, 240, 241, 0.5);
  animation: slideDown 0.3s ease;
}

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

.expanded-text {
  font-size: 0.9rem;
  color: var(--dark);
  line-height: 1.5;
  white-space: normal;
  word-wrap: break-word;
  max-height: 200px;
  overflow-y: auto;
}

/* Markdown formázás */
.expanded-text strong {
  font-weight: 700;
  color: var(--primary);
}

.expanded-text em {
  font-style: italic;
  color: var(--gray-dark);
}

.expanded-text .markdown-list {
  margin: 8px 0;
  padding-left: 24px;
}

.expanded-text ul.markdown-list {
  list-style-type: disc;
}

.expanded-text ol.markdown-list {
  list-style-type: decimal;
}

.expanded-text .markdown-list li {
  margin: 4px 0;
  line-height: 1.6;
}

/* Comment items */
.comment-item {
  margin-bottom: var(--spacing-sm);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid var(--border);
}

.comment-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  gap: 8px;
}

.comment-header strong {
  font-size: 0.85rem;
  color: var(--primary);
}

.comment-author {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
}

.comment-time {
  font-size: 0.75rem;
  color: var(--gray);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

.comment-time-icon {
  cursor: pointer;
  font-size: 0.85rem;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.comment-time-icon:hover {
  opacity: 1;
}

.comment-date {
  font-size: 0.75rem;
  color: var(--gray);
  white-space: nowrap;
}

.comment-text {
  font-size: 0.9rem;
  color: var(--dark);
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.comment-empty,
.comment-error {
  font-size: 0.9rem;
  color: var(--gray);
  font-style: italic;
  text-align: center;
  padding: var(--spacing-sm) 0;
}

.comment-error {
  color: var(--danger);
}

.venue-scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.venue-scroll-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.venue-scroll-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.venue-scroll-left {
  left: -20px;
}

.venue-scroll-right {
  right: -20px;
}

/* Dark mode adjustments */
body.dark-mode .venue-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary);
}

body.dark-mode .venue-card-events {
  background: transparent;
}

body.dark-mode .venue-card-events .event-item {
  background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .venue-cards-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .venue-cards-container::-webkit-scrollbar-thumb {
  background: var(--primary);
}

.event-card {
  background: white;
  border-radius: var(--border-radius);
  border-left: 4px solid var(--primary);
  padding: var(--spacing-md);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition);
}

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

.event-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-sm);
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.event-card-time {
  font-weight: 600;
  color: var(--primary);
  font-size: var(--font-size-md);
}

.event-card-project {
  color: var(--secondary);
  font-size: var(--font-size-sm);
  font-weight: 500;
  background: rgba(118, 75, 162, 0.1);
  padding: 4px 8px;
  border-radius: var(--border-radius-sm);
}

.event-card-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--dark);
  margin-bottom: var(--spacing-sm);
}

.event-card-venue {
  color: var(--gray);
  font-size: var(--font-size-sm);
  margin-bottom: var(--spacing-sm);
}

.event-card-description {
  color: var(--gray-dark);
  font-size: var(--font-size-sm);
  margin-bottom: var(--spacing-sm);
  line-height: 1.5;
}

.event-card-notes {
  color: var(--gray-dark);
  font-size: var(--font-size-sm);
  font-style: italic;
  background: var(--light);
  padding: var(--spacing-sm);
  border-radius: var(--border-radius-sm);
  line-height: 1.5;
}

/* ============================================
   DATA LISTS
   ============================================ */

.data-list {
  border-radius: var(--border-radius);
}

.empty-state {
  text-align: center;
  padding: var(--spacing-xl);
  color: var(--gray);
  font-size: var(--font-size-lg);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: var(--spacing-md);
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  background: var(--light);
  font-weight: 600;
  color: var(--dark);
  font-size: var(--font-size-sm);
  text-transform: uppercase;
}

.data-table tr.clickable-row {
  cursor: pointer;
  transition: var(--transition);
}

.data-table tr.clickable-row:hover {
  background: var(--light);
}

/* ============================================
   USERS LIST
   ============================================ */

.users-filters {
  background: white;
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--spacing-md);
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 150px;
}

.filter-group label {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--gray-dark);
}

.filter-select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-sm);
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-select:hover {
  border-color: var(--primary);
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-results {
  margin-left: auto;
  padding: 8px 16px;
  background: rgba(102, 126, 234, 0.1);
  color: var(--primary);
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
}

.users-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: var(--spacing-md);
}

.user-card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
}

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

.user-card-header {
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.user-card-name {
  font-weight: 600;
  font-size: var(--font-size-lg);
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-icon {
  font-size: 20px;
}

.user-card-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.user-card-body {
  padding: var(--spacing-md);
}

.user-card-info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.user-info-item {
  font-size: var(--font-size-sm);
  color: var(--gray-dark);
}

.user-info-item strong {
  color: var(--dark);
  margin-right: 8px;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success {
  background: #d4edda;
  color: #155724;
}

.badge-secondary {
  background: #e2e3e5;
  color: #6c757d;
}

.badge-primary {
  background: rgba(102, 126, 234, 0.2);
  color: var(--primary);
}

.badge-warning {
  background: #fff3cd;
  color: #856404;
}

.badge-inactive {
  background: #e2e3e5;
  color: #6c757d;
}

/* Projekt adatlap megtekintés */
.project-details {
  padding: var(--spacing-md);
}

.detail-row {
  display: flex;
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--border);
}

.detail-row label {
  font-weight: 600;
  min-width: 200px;
  color: var(--gray);
}

.detail-row span {
  flex: 1;
  color: var(--dark);
}

.project-users-display {
  margin-top: var(--spacing-md);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--spacing-sm);
  max-height: 400px;
  overflow-y: auto;
}

.user-display-item {
  padding: var(--spacing-sm);
  background: var(--light);
  border-radius: var(--border-radius);
  border-left: 3px solid var(--primary);
}

.user-display-name {
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 4px;
}

.user-display-group {
  font-size: var(--font-size-sm);
  color: var(--primary);
}

.project-card-actions {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
}

.project-card-actions .btn {
  flex: 1;
}

/* Projekt felhasználók lista */
.project-users-list {
  max-height: 400px;
  overflow-y: auto;
  margin-top: var(--spacing-md);
}

.project-user-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-sm);
  gap: var(--spacing-sm);
}

.project-user-info {
  flex: 1;
}

.project-user-name {
  font-weight: 600;
  color: var(--dark);
}

.project-user-email {
  font-size: var(--font-size-sm);
  color: var(--gray);
}

.btn-toggle-comment {
  background: transparent;
  border: 2px solid var(--gray);
  color: var(--gray);
  padding: 4px 12px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: var(--font-size-sm);
  font-weight: 600;
  white-space: nowrap;
}

.btn-toggle-comment:hover {
  border-color: var(--primary);
  color: white;
  background: var(--primary);
  transform: scale(1.02);
}

.btn-toggle-comment.active {
  border-color: var(--success);
  color: white;
  background: var(--success);
}

.btn-toggle-comment.active:hover {
  border-color: #27ae60;
  background: #27ae60;
  transform: scale(1.02);
}

.project-user-groups {
  display: flex;
  gap: var(--spacing-xs);
  flex-wrap: wrap;
}

.project-user-group {
  padding: 4px 12px;
  background: rgba(102, 126, 234, 0.1);
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-sm);
  color: var(--primary);
  font-weight: 600;
}

.project-user-actions {
  display: flex;
  gap: var(--spacing-xs);
}

.project-user-remove {
  padding: var(--spacing-xs) var(--spacing-sm);
  background: transparent;
  border: 1px solid var(--danger);
  color: var(--danger);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-size: var(--font-size-sm);
  transition: all 0.2s ease;
  min-width: 28px;
  text-align: center;
}

.project-user-remove:hover {
  background: var(--danger);
  color: white;
}

/* Esemény adatlap megtekintés */
.event-details {
  padding: var(--spacing-md);
}

.event-participants-display {
  margin-top: var(--spacing-md);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--spacing-sm);
  max-height: 400px;
  overflow-y: auto;
}

/* Esemény résztvevők kezelése */
.participants-section {
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-lg);
  border-bottom: 1px solid var(--border);
}

.participants-section:last-child {
  border-bottom: none;
}

.participants-section h4 {
  margin-bottom: var(--spacing-md);
  color: var(--dark);
  font-size: 1.1rem;
}

.project-users-participants-list {
  max-height: 400px;
  overflow-y: auto;
}

.participant-user-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-sm);
  transition: background 0.2s ease;
}

.participant-user-item.is-participant {
  background: rgba(102, 126, 234, 0.05);
  border-left: 3px solid var(--primary);
}

.participant-user-info {
  flex: 1;
}

.participant-user-name {
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 2px;
}

.participant-user-groups {
  font-size: var(--font-size-sm);
  color: var(--gray);
}

.participant-group-badge {
  display: inline-block;
  padding: 2px 8px;
  margin-right: 6px;
  background: rgba(102, 126, 234, 0.1);
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-sm);
  color: var(--primary);
}

.participant-toggle-btn {
  padding: 6px 12px;
  border: 1px solid var(--primary);
  background: transparent;
  color: var(--primary);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-size: var(--font-size-sm);
  transition: all 0.2s ease;
  min-width: 100px;
}

.participant-toggle-btn:hover {
  background: var(--primary);
  color: white;
}

.participant-toggle-btn.is-participant {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}

.participant-toggle-btn.is-participant:hover {
  background: #c82333;
  border-color: #bd2130;
}

.btn-ban-comment {
  padding: 6px 12px;
  border: 2px solid var(--warning);
  background: transparent;
  color: var(--warning);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-size: var(--font-size-sm);
  transition: all 0.2s ease;
  white-space: nowrap;
  font-weight: 600;
  margin-right: var(--spacing-sm);
}

.btn-ban-comment:hover {
  background: var(--warning);
  color: white;
  transform: scale(1.02);
}

.btn-ban-comment.banned {
  border-color: var(--success);
  color: var(--success);
}

.btn-ban-comment.banned:hover {
  background: var(--success);
  color: white;
}

.add-external-user-form {
  margin-bottom: var(--spacing-md);
}

.external-participants-list {
  max-height: 300px;
  overflow-y: auto;
}

.external-participant-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-sm);
  background: rgba(255, 193, 7, 0.05);
  border-left: 3px solid #ffc107;
}

.external-participant-info {
  flex: 1;
}

.external-participant-name {
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 2px;
}

.external-participant-group {
  font-size: var(--font-size-sm);
  color: #856404;
}

.external-participant-remove {
  padding: var(--spacing-xs) var(--spacing-sm);
  background: transparent;
  border: 1px solid var(--danger);
  color: var(--danger);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-size: var(--font-size-sm);
  transition: all 0.2s ease;
}

.external-participant-remove:hover {
  background: var(--danger);
  color: white;
}

/* ============================================
   COMMENTS SECTION
   ============================================ */

.comments-section {
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-lg);
  border-top: 2px solid var(--border);
}

.comments-section h4 {
  margin-bottom: var(--spacing-md);
  color: var(--dark);
  font-size: 1.2rem;
}

#eventCommentsContainer {
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: var(--spacing-md);
}

.no-comments {
  text-align: center;
  padding: var(--spacing-lg);
  color: var(--gray);
  font-style: italic;
}

.comment-item {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  transition: all 0.2s ease;
}

.comment-item:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--primary);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-sm);
}

.comment-author {
  font-weight: 600;
  color: var(--dark);
  font-size: var(--font-size-md);
}

.comment-time {
  font-size: var(--font-size-sm);
  color: var(--gray);
}

.comment-body {
  margin-bottom: var(--spacing-sm);
}

.comment-text {
  color: var(--dark);
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.comment-actions {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: flex-end;
}

.comment-edit-btn,
.comment-delete-btn {
  padding: 4px 12px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-size: var(--font-size-sm);
  transition: all 0.2s ease;
}

.comment-edit-btn {
  color: var(--primary);
  border-color: var(--primary);
}

.comment-edit-btn:hover {
  background: var(--primary);
  color: white;
}

.comment-delete-btn {
  color: var(--danger);
  border-color: var(--danger);
}

.comment-delete-btn:hover {
  background: var(--danger);
  color: white;
}

.new-comment-form {
  margin-top: var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--light);
  border-radius: var(--border-radius);
  border: 1px solid var(--border);
}

.new-comment-form textarea {
  width: 100%;
  padding: var(--spacing-sm);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-sm);
  font-family: inherit;
  font-size: var(--font-size-md);
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.2s ease;
}

.new-comment-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.comment-actions {
  margin-top: var(--spacing-sm);
}

/* ============================================
   CARDS
   ============================================ */

.projects-grid,
.groups-grid,
.venues-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--spacing-md);
}

.project-card,
.group-card,
.venue-card {
  background: white;
  border-radius: var(--border-radius);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover,
.group-card:hover,
.venue-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Alapértelmezett projekt kiemelése */
.project-card.default-project {
  border: 2px solid var(--primary);
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, white 100%);
}

/* Inaktív (lezárt) projektek */
.project-card.inactive-project {
  opacity: 0.7;
  background: #f8f9fa;
}

.project-card.inactive-project:hover {
  opacity: 0.85;
}

/* Rendszer csoport kiemelése */
.group-card.system-group {
  border: 2px solid #f59e0b;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, white 100%);
}

body.dark-mode .group-card.system-group {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, #1f2937 100%);
}

.system-badge {
  display: inline-block;
  background: #f59e0b;
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  margin-left: 8px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Alapértelmezett helyszín kiemelése */
.venue-card.default-venue {
  border: 2px solid #3b82f6;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, white 100%);
}

body.dark-mode .venue-card.default-venue {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, #1f2937 100%);
}

.default-badge {
  display: inline-block;
  background: #3b82f6;
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  margin-left: 8px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Rendszer helyszín kiemelése */
.venue-card.system-venue {
  border: 2px solid #ef4444;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, white 100%);
}

body.dark-mode .venue-card.system-venue {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, #1f2937 100%);
}

.project-card h3,
.group-card h3,
.venue-card h3 {
  color: var(--dark);
  margin-bottom: var(--spacing-sm);
}

.project-dates,
.project-venue,
.project-stats,
.group-stats,
.venue-stats {
  color: var(--gray);
  font-size: var(--font-size-sm);
  margin-top: var(--spacing-xs);
}

.venue-color {
  width: 100%;
  height: 20px;
  border-radius: var(--border-radius-sm);
  margin: var(--spacing-sm) 0;
}

/* ============================================
   FORMS
   ============================================ */

.form-group {
  margin-bottom: var(--spacing-md);
}

.form-group label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 500;
  color: var(--dark);
}

.markdown-hint {
  display: block;
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--gray-dark);
  font-style: italic;
}

.markdown-hint code {
  background: rgba(102, 126, 234, 0.1);
  padding: 2px 4px;
  border-radius: 3px;
  font-family: monospace;
  font-size: 0.85em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  font-size: var(--font-size-md);
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
  display: block;
  margin-top: var(--spacing-xs);
  font-size: var(--font-size-sm);
  color: var(--gray);
}

/* Time input with controls */
.time-input-wrapper {
  display: flex;
  gap: 8px;
  align-items: center;
}

.time-input-wrapper input[type="time"] {
  flex: 1;
}

.time-controls {
  display: flex;
  gap: 4px;
}

.time-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border);
  background: white;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.time-btn:hover {
  background: var(--light);
  border-color: var(--primary);
}

.time-btn.time-up,
.time-btn.time-down {
  color: var(--primary);
  font-weight: bold;
}

.time-btn.time-clear {
  color: var(--danger);
}

.time-btn.time-clear:hover {
  background: rgba(231, 76, 60, 0.1);
}

/* Date input with clear button */
.date-input-wrapper {
  display: flex;
  gap: 8px;
  align-items: center;
}

.date-input-wrapper input[type="date"],
.date-input-wrapper input[type="text"] {
  flex: 1;
}

/* Projekt dátum mezők stílusa */
input[type="text"][id="projectStartDate"],
input[type="text"][id="projectEndDate"] {
  font-family: 'Courier New', monospace;
  letter-spacing: 0.5px;
}

/* Rejtett date picker */
.hidden-date-picker {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  pointer-events: auto;
}

.date-picker-btn {
  width: 32px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border);
  background: white;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: var(--primary);
}

.date-picker-btn:hover {
  background: rgba(102, 126, 234, 0.1);
  border-color: var(--primary);
}

.date-picker-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.clear-date-btn {
  width: 32px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border);
  background: white;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: var(--danger);
}

.clear-date-btn:hover {
  background: rgba(231, 76, 60, 0.1);
  border-color: var(--danger);
}

.clear-date-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Dark mode for date controls */
body.dark-mode .date-picker-btn {
  background: var(--light);
  border-color: var(--border);
}

body.dark-mode .date-picker-btn:hover {
  background: rgba(102, 126, 234, 0.2);
  border-color: var(--primary);
}

body.dark-mode .clear-date-btn {
  background: var(--light);
  border-color: var(--border);
}

body.dark-mode .clear-date-btn:hover {
  background: rgba(231, 76, 60, 0.2);
  border-color: var(--danger);
}

/* Dark mode for time controls */
body.dark-mode .time-btn {
  background: var(--light);
  border-color: var(--border);
  color: var(--dark);
}

body.dark-mode .time-btn:hover {
  background: rgba(102, 126, 234, 0.2);
  border-color: var(--primary);
}

body.dark-mode .time-btn.time-clear {
  color: #ff6b6b;
}

.form-row {
  display: flex;
  gap: var(--spacing-md);
}

.form-row .form-group {
  flex: 1;
}

.col-4 { flex: 0 0 33.333%; }
.col-6 { flex: 0 0 50%; }
.col-8 { flex: 0 0 66.666%; }

.checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
}

/* ============================================
   MULTI-DATE TIME ROWS
   ============================================ */

.date-times-section {
  margin: var(--spacing-md) 0;
  padding: var(--spacing-md);
  background: var(--color-bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

body.dark-mode .date-times-section {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
}

.section-header label {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-text);
  margin: 0;
}

.btn-add-date {
  padding: 6px 12px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-add-date:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}

.btn-add-date:active {
  transform: translateY(0);
}

#dateTimeRowsContainer {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.date-time-row {
  position: relative;
  padding: var(--spacing-md);
  background: white;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  transition: all 0.2s ease;
}

body.dark-mode .date-time-row {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.date-time-row:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body.dark-mode .date-time-row:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.date-time-row .form-row {
  align-items: flex-end;
}

.col-auto {
  flex: 0 0 auto;
}

.btn-remove-date {
  padding: 8px 14px;
  background: var(--color-danger);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 600;
  transition: all 0.2s ease;
  height: 38px;
  line-height: 1;
}

.btn-remove-date:hover {
  background: #c82333;
  transform: scale(1.05);
}

.btn-remove-date:active {
  transform: scale(0.95);
}

/* ============================================
   MODALS
   ============================================ */

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md);
}

.modal.active {
  display: flex;
}

.modal-dialog {
  background: white;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-dialog.modal-sm {
  max-width: 400px;
}

.modal-dialog.modal-lg {
  max-width: 800px;
}

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

.modal-header h3 {
  color: var(--dark);
  font-size: var(--font-size-lg);
}

.modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--gray);
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
}

.modal-close:hover {
  color: var(--dark);
}

.modal-body {
  padding: var(--spacing-lg);
  overflow-y: auto;
}

.modal-footer {
  padding: var(--spacing-lg);
  border-top: 1px solid var(--border);
  display: flex;
  gap: var(--spacing-md);
  justify-content: flex-end;
}

/* ============================================
   PARTICIPANTS
   ============================================ */

.participants-list {
  background: var(--light);
  border-radius: var(--border-radius);
  padding: var(--spacing-sm);
}

.no-participants {
  color: var(--gray);
  font-size: var(--font-size-sm);
  padding: var(--spacing-md);
  text-align: center;
}

.participant-list {
  list-style: none;
}

.participant-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-sm);
  background: white;
  border-radius: var(--border-radius-sm);
  margin-bottom: var(--spacing-xs);
}

.participant-controls {
  background: var(--light);
  border-radius: var(--border-radius);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.participant-bulk-actions {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-sm);
}

.participant-bulk-actions .btn {
  flex: 1;
}

/* ============================================
   LOADING
   ============================================ */

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.loading-overlay[style*="display: flex"] {
  opacity: 1;
  pointer-events: all;
}

body.dark-mode .loading-overlay {
  background: rgba(0, 0, 0, 0.5);
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

body.dark-mode .spinner {
  border-color: rgba(255, 255, 255, 0.2);
  border-top-color: var(--primary);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .app-header {
    flex-direction: column;
    gap: var(--spacing-md);
  }

  .header-left,
  .header-center,
  .header-right {
    width: 100%;
    justify-content: space-between;
  }

  .project-selector {
    min-width: auto;
    width: 100%;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1100;
    transform: translateX(-100%);
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .calendar-week {
    grid-template-columns: 1fr;
  }

  .projects-grid,
  .groups-grid,
  .venues-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    flex-direction: column;
  }

  .col-4,
  .col-6,
  .col-8 {
    flex: 0 0 100%;
  }

  .view-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .view-navigation {
    justify-content: space-between;
  }

  /* Mobile responsive - Inline expansion */
  .event-expand-toggle {
    font-size: 0.85rem;
    padding: 4px var(--spacing-xs);
  }

  .expanded-text {
    font-size: 0.85rem;
    max-height: 150px;
  }

  .comment-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .comment-date {
    align-self: flex-end;
  }

  /* Stacked Day View Mobile */
  .calendar-day-stacked {
    padding: var(--spacing-sm);
    gap: var(--spacing-md);
  }

  .day-event-card {
    padding: var(--spacing-sm);
  }

  .day-event-title {
    font-size: 1.2rem;
  }

  .day-event-meta {
    flex-direction: column;
  }

  .day-event-project,
  .day-event-venue {
    font-size: 0.9rem;
  }
}

/* ============================================
   DARK MODE
   ============================================ */

body.dark-mode {
  --dark: #e0e0e0;
  --light: #2a2a3e;
  --border: #3a3a5e;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

body.dark-mode .app-container {
  background: transparent;
}

body.dark-mode .app-header,
body.dark-mode .sidebar,
body.dark-mode .view-header,
body.dark-mode .calendar-container,
body.dark-mode .modal-dialog {
  background: #1e1e2e;
  color: #e0e0e0;
}

body.dark-mode .btn-icon {
  background: rgba(102, 126, 234, 0.2);
  color: #e0e0e0;
  border: 1px solid rgba(102, 126, 234, 0.3);
}

body.dark-mode .btn-icon:hover {
  background: rgba(102, 126, 234, 0.4);
  border-color: rgba(102, 126, 234, 0.5);
}

body.dark-mode .day-cell {
  background: #2a2a3e;
  border-color: #3a3a5e;
}

body.dark-mode .day-cell:hover {
  background: #3a3a5e;
}

body.dark-mode .day-cell.today {
  background: #2a3a5e;
  border-color: #667eea;
}

body.dark-mode .week-label {
  background: rgba(102, 126, 234, 0.2);
}

body.dark-mode .nav-item:hover {
  background: #3a3a5e;
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
  background: #2a2a3e;
  color: #e0e0e0;
  border-color: #3a3a5e;
}

body.dark-mode .markdown-hint {
  color: #b0b0b0;
}

body.dark-mode .markdown-hint code {
  background: rgba(144, 202, 249, 0.15);
  color: #90caf9;
}

body.dark-mode .project-card,
body.dark-mode .group-card,
body.dark-mode .venue-card,
body.dark-mode .event-card,
body.dark-mode .user-card,
body.dark-mode .week-day,
body.dark-mode .event-item {
  background: #2a2a3e;
  color: #e0e0e0;
  border-color: #3a3a5e;
}

body.dark-mode .user-card-header {
  border-bottom-color: #3a3a5e;
}

body.dark-mode .user-card-name,
body.dark-mode .user-info-item strong {
  color: #e0e0e0;
}

body.dark-mode .user-info-item {
  color: #999;
}

body.dark-mode .badge-success {
  background: rgba(76, 175, 80, 0.2);
  color: #81c784;
}

body.dark-mode .badge-secondary {
  background: rgba(108, 117, 125, 0.2);
  color: #999;
}

body.dark-mode .badge-warning {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
}

body.dark-mode .users-filters {
  background: #2a2a3e;
  border-color: #3a3a5e;
}

body.dark-mode .filter-group label {
  color: #999;
}

body.dark-mode .filter-select {
  background: #1e1e2e;
  border-color: #3a3a5e;
  color: #e0e0e0;
}

body.dark-mode .filter-select:hover,
body.dark-mode .filter-select:focus {
  border-color: var(--primary);
}

body.dark-mode .filter-select.filter-active {
  border-color: var(--primary);
  background-color: rgba(102, 126, 234, 0.2);
}

body.dark-mode .filter-results {
  background: rgba(102, 126, 234, 0.2);
  color: #667eea;
}

body.dark-mode .event-item:hover {
  background: #3a3a5e;
}

body.dark-mode .week-day-header-wrapper,
body.dark-mode .week-day-header {
  background: #2a2a3e;
  border-bottom-color: #3a3a5e;
}

body.dark-mode .week-day.today {
  border-color: #667eea;
}

body.dark-mode .week-day-toggle {
  color: #667eea;
}

body.dark-mode .week-day-toggle:hover {
  background: #667eea;
  color: white;
}

body.dark-mode .day-header-clickable:hover {
  background: rgba(102, 126, 234, 0.3);
}

body.dark-mode .day-header-clickable:hover .week-day-name,
body.dark-mode .day-header-clickable:hover .week-day-date,
body.dark-mode .day-header-clickable:hover .week-day-month {
  color: white;
}

/* Dark mode - Comments section */
body.dark-mode .comments-section {
  background: #2a2a3e;
  border-top-color: #3a3a5e;
}

body.dark-mode .comments-section h4 {
  color: #e0e0e0;
}

body.dark-mode .comment-item {
  background: #1e1e2e;
  border-color: #3a3a5e;
}

body.dark-mode .comment-author {
  color: #667eea;
}

body.dark-mode .comment-date {
  color: #999;
}

body.dark-mode .comment-text {
  color: #e0e0e0;
}

body.dark-mode .comment-edit-btn,
body.dark-mode .comment-delete-btn {
  background: #2a2a3e;
  border-color: #3a3a5e;
}

body.dark-mode .comment-edit-btn {
  color: #667eea;
}

body.dark-mode .comment-edit-btn:hover {
  background: #667eea;
  color: white;
}

body.dark-mode .comment-delete-btn {
  color: #e74c3c;
}

body.dark-mode .comment-delete-btn:hover {
  background: #e74c3c;
  color: white;
}

body.dark-mode .new-comment-form {
  background: #1e1e2e;
  border-color: #3a3a5e;
}

body.dark-mode .new-comment-form textarea {
  background: #2a2a3e;
  color: #e0e0e0;
  border-color: #3a3a5e;
}

body.dark-mode .new-comment-form textarea:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

body.dark-mode .btn-ban-comment {
  background: #2a2a3e;
  border-color: #ffc107;
  color: #ffc107;
}

body.dark-mode .btn-ban-comment:hover {
  background: #ffc107;
  color: #1e1e2e;
}

body.dark-mode .btn-ban-comment.banned {
  border-color: #4caf50;
  color: #4caf50;
}

body.dark-mode .btn-ban-comment.banned:hover {
  background: #4caf50;
  color: #1e1e2e;
}

/* Dark mode - Inline expansion */
body.dark-mode .event-item-clickable:hover {
  background-color: rgba(102, 126, 234, 0.15);
}

body.dark-mode .event-expand-section {
  border-top-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .event-expand-toggle:hover {
  background: rgba(102, 126, 234, 0.2);
}

body.dark-mode .event-expanded-content {
  background: rgba(0, 0, 0, 0.3);
}

body.dark-mode .expanded-text {
  color: #e0e0e0;
}

body.dark-mode .expanded-text strong {
  color: #90caf9;
}

body.dark-mode .expanded-text em {
  color: #b0b0b0;
}

body.dark-mode .comment-item {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .comment-header strong {
  color: var(--primary);
}

body.dark-mode .comment-date {
  color: #888;
}

body.dark-mode .comment-text {
  color: #e0e0e0;
}

body.dark-mode .comment-empty,
body.dark-mode .comment-error {
  color: #888;
}

body.dark-mode .comment-error {
  color: var(--danger);
}

body.dark-mode .btn-add-event {
  background: #2a2a3e;
  border-color: var(--primary);
  color: var(--primary);
}

body.dark-mode .btn-add-event:hover {
  background: var(--primary);
  color: white;
}

body.dark-mode .event-meta {
  color: #999;
}

body.dark-mode .day-number,
body.dark-mode .week-day-name,
body.dark-mode .week-day-date,
body.dark-mode .event-time,
body.dark-mode .event-title {
  color: #e0e0e0;
}

/* ============================================
   SIDEBAR OVERLAY
   ============================================ */

.sidebar {
  position: fixed;
  left: 0;
  top: 60px;
  bottom: 0;
  width: 280px;
  transform: translateX(-100%);
  z-index: 999;
  display: flex;
  flex-direction: column;
}

.sidebar.active {
  transform: translateX(0);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
}

.sidebar-footer {
  border-top: 1px solid var(--border);
  padding: var(--spacing-md);
  background: inherit;
}

.user-profile {
  margin-bottom: var(--spacing-md);
}

.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.user-info-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-sm);
  color: var(--dark);
  font-weight: 500;
}

.btn-link {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  padding: var(--spacing-xs) 0;
  font-size: var(--font-size-sm);
  text-decoration: underline;
  transition: var(--transition);
}

.btn-link:hover {
  color: var(--primary-dark);
}

/* Sidebar backdrop */
.sidebar-backdrop {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  display: none;
}

.sidebar-backdrop.active {
  display: block;
}

/* Main content full width when sidebar is overlay */
.main-content {
  margin-left: 0;
  width: 100%;
}

/* ============================================
   UTILITIES
   ============================================ */

.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: var(--spacing-md); }
.hidden { display: none; }

/* ============================================
   TOAST NOTIFICATION SYSTEM
   ============================================ */

/* CSS Variables for Toast */
:root {
    --toast-success: #10b981;
    --toast-error: #ef4444;
    --toast-warning: #f59e0b;
    --toast-info: #3b82f6;
    --toast-bg: #ffffff;
    --toast-text: #1f2937;
    --toast-close-color: #9ca3af;
    --toast-close-hover: #4b5563;
    --toast-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(0, 0, 0, 0.08);
}

body.dark-mode {
    --toast-bg: #1f2937;
    --toast-text: #e5e7eb;
    --toast-close-color: #9ca3af;
    --toast-close-hover: #d1d5db;
    --toast-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 4px 10px rgba(0, 0, 0, 0.2);
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    max-width: 420px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.toast {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--toast-bg);
    color: var(--toast-text);
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 8px;
    box-shadow: var(--toast-shadow);
    min-width: 320px;
    max-width: 420px;
    overflow: hidden;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.toast-show {
    opacity: 1;
    transform: translateX(0);
}

.toast.toast-hide {
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease-in;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.toast-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
}

.toast-success .toast-icon {
    background: rgba(16, 185, 129, 0.15);
    color: var(--toast-success);
}

.toast-error .toast-icon {
    background: rgba(239, 68, 68, 0.15);
    color: var(--toast-error);
}

.toast-warning .toast-icon {
    background: rgba(245, 158, 11, 0.15);
    color: var(--toast-warning);
}

.toast-info .toast-icon {
    background: rgba(59, 130, 246, 0.15);
    color: var(--toast-info);
}

.toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--toast-close-color);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    margin-left: 8px;
}

.toast-close:hover {
    color: var(--toast-close-hover);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: rgba(0, 0, 0, 0.1);
    animation: toast-progress 4000ms linear forwards;
}

body.dark-mode .toast-progress {
    background: rgba(255, 255, 255, 0.1);
}

.toast-success .toast-progress {
    background: var(--toast-success);
}

.toast-error .toast-progress {
    background: var(--toast-error);
}

.toast-warning .toast-progress {
    background: var(--toast-warning);
}

.toast-info .toast-progress {
    background: var(--toast-info);
}

@keyframes toast-progress {
    to {
        width: 0;
    }
}

.toast-loading .toast-icon {
    background: rgba(59, 130, 246, 0.15);
}

.toast-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(59, 130, 246, 0.3);
    border-top-color: var(--toast-info);
    border-radius: 50%;
    animation: toast-spin 0.8s linear infinite;
}

@keyframes toast-spin {
    to {
        transform: rotate(360deg);
    }
}

.toast-loading .toast-progress {
    display: none;
}

/* Mobile Responsive Toast */
@media screen and (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: 100%;
    }

    .toast {
        min-width: auto;
        max-width: 100%;
        margin-bottom: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .toast {
        transition: opacity 0.3s ease;
        transform: none;
    }

    .toast.toast-show {
        transform: none;
    }

    .toast.toast-hide {
        transform: none;
    }

    .toast-spinner {
        animation: none;
        border-top-color: var(--toast-info);
    }
}

@media (prefers-contrast: high) {
    .toast {
        border: 2px solid var(--toast-text);
    }

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

    .toast-error {
        border-color: var(--toast-error);
    }

    .toast-warning {
        border-color: var(--toast-warning);
    }

    .toast-info {
        border-color: var(--toast-info);
    }
}

/* ===========================
   NOTIFICATION CENTER STYLES
   =========================== */

/* Notification Center Container */
/* ============================================
   RATE LIMIT STATUS (Sidebar)
   ============================================ */

.rate-limit-status {
    margin: 12px 0;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.rate-limit-header-small {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #495057;
}

.rate-limit-header-small button {
    background: transparent;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s;
}

.rate-limit-header-small button:hover {
    transform: rotate(180deg);
}

.rate-limit-bar-small {
    width: 100%;
    height: 16px;
    background: #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 6px;
}

.rate-limit-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #ffc107, #dc3545);
    transition: width 0.3s ease;
}

.rate-limit-text-small {
    font-size: 11px;
    color: #495057;
    font-weight: 500;
    text-align: center;
    margin-bottom: 4px;
}

.rate-limit-reset-small {
    font-size: 10px;
    color: #6c757d;
    text-align: center;
}

/* Dark mode support */
body.dark-mode .rate-limit-status {
    background: #2c3e50;
    border-color: #34495e;
}

body.dark-mode .rate-limit-header-small {
    color: #ecf0f1;
}

body.dark-mode .rate-limit-bar-small {
    background: #34495e;
}

body.dark-mode .rate-limit-text-small {
    color: #ecf0f1;
}

body.dark-mode .rate-limit-reset-small {
    color: #95a5a6;
}

/* ============================================
   NOTIFICATION CENTER
   ============================================ */

.notification-center {
    position: relative;
    display: inline-block;
    margin-right: 16px;
}

/* Notification Bell Button */
.notification-bell {
    position: relative;
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    transition: transform 0.2s;
}

.notification-bell:hover {
    transform: scale(1.1);
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: 0;
    right: -2px;
    background: #e74c3c;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    display: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    border: 2px solid white;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

body.dark-mode .notification-badge {
    border-color: #1a1a2e;
}

/* Notification Dropdown */
.notification-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    width: 400px;
    max-height: 600px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.notification-dropdown.hidden {
    display: none;
}

/* Notification Header */
.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #eee;
    background: #f9f9f9;
}

.notification-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

#mark-all-read {
    background: transparent;
    border: none;
    color: #3498db;
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
}

#mark-all-read:hover {
    color: #2980b9;
}

/* Notification List */
.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

/* Notification Item */
.notification-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
}

.notification-item:hover {
    background: #f9f9f9;
}

.notification-item.unread {
    background: #e3f2fd;
}

.notification-item.unread:hover {
    background: #d1e7fd;
}

.notification-icon {
    font-size: 24px;
    margin-right: 12px;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: #333;
}

.notification-message {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}

.notification-time {
    font-size: 11px;
    color: #999;
}

.notification-delete {
    background: transparent;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    flex-shrink: 0;
}

.notification-delete:hover {
    color: #e74c3c;
}

/* Empty State */
.notification-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.notification-empty p {
    margin: 0;
    font-size: 14px;
}

/* Notification Footer */
.notification-footer {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    border-top: 1px solid #eee;
    background: #f9f9f9;
}

.notification-footer a {
    font-size: 12px;
    color: #3498db;
    text-decoration: none;
}

.notification-footer a:hover {
    text-decoration: underline;
}

/* Notification Filters (Full modal) */
.notification-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: #f0f0f0;
}

.filter-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* Notification List Full (Modal) */
.notification-list-full {
    max-height: 500px;
    overflow-y: auto;
}

/* Preferences Table */
.preferences-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.preferences-table th,
.preferences-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.preferences-table th {
    background: #f9f9f9;
    font-weight: 600;
    font-size: 14px;
}

.preferences-table td {
    font-size: 13px;
}

.preferences-table input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

/* Dark Mode Support */
body.dark-mode .notification-dropdown {
    background: #2c2c3e;
    border-color: #444;
}

body.dark-mode .notification-header {
    background: #1e1e2e;
    border-bottom-color: #444;
}

body.dark-mode .notification-header h3 {
    color: #e0e0e0;
}

body.dark-mode .notification-item {
    border-bottom-color: #444;
}

body.dark-mode .notification-item:hover {
    background: #3a3a4e;
}

body.dark-mode .notification-item.unread {
    background: #2a3a5a;
}

body.dark-mode .notification-item.unread:hover {
    background: #3a4a6a;
}

body.dark-mode .notification-title {
    color: #e0e0e0;
}

body.dark-mode .notification-message {
    color: #b0b0b0;
}

body.dark-mode .notification-footer {
    background: #1e1e2e;
    border-top-color: #444;
}

body.dark-mode .notification-footer a {
    color: #64b5f6;
}

body.dark-mode .notification-empty {
    color: #999;
}

body.dark-mode .filter-btn {
    background: #2c2c3e;
    border-color: #444;
    color: #e0e0e0;
}

body.dark-mode .filter-btn:hover {
    background: #3a3a4e;
}

body.dark-mode .filter-btn.active {
    background: #3498db;
    color: white;
}

body.dark-mode .preferences-table th {
    background: #1e1e2e;
    color: #e0e0e0;
    border-bottom-color: #444;
}

body.dark-mode .preferences-table td {
    color: #b0b0b0;
    border-bottom-color: #444;
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .notification-dropdown {
        width: 320px;
        right: -50px;
    }

    .notification-center {
        margin-right: 8px;
    }
}

/* ============================================
   EVENT DETAILS VIEW
   ============================================ */

#eventDetailsView {
  padding: 2rem;
  overflow-y: auto;
}

.event-nav-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.event-nav-buttons button {
  padding: 0.5rem 1rem;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.event-nav-buttons button:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.event-nav-buttons button:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* Dark mode for nav buttons */
body.dark-mode .event-nav-buttons button {
  background: #2563eb;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

body.dark-mode .event-nav-buttons button:hover {
  background: #3b82f6;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
}

.event-details-card {
  max-width: 900px;
  margin: 2rem auto;
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.event-info-grid {
  display: grid;
  gap: 0;
}

.info-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e0e0e0;
}

.info-row:last-child {
  border-bottom: none;
}

.info-row label {
  font-weight: 600;
  color: #555;
  padding-top: 2px;
}

.info-value {
  color: #333;
  line-height: 1.6;
}

/* Countdown stílusok az esemény részletekhez */
.countdown-now {
  color: #dc2626;
  font-weight: bold;
  animation: pulse 1s infinite;
}

.countdown-soon {
  color: #ea580c;
  font-weight: 600;
}

.countdown-today {
  color: #d97706;
  font-weight: 500;
}

.countdown-tomorrow {
  color: #16a34a;
  font-weight: 500;
}

.countdown-future {
  color: #6b7280;
  font-style: italic;
}

.countdown-past {
  color: #9ca3af;
  font-style: italic;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.event-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid #e0e0e0;
  flex-wrap: wrap;
}

.event-actions button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  font-size: 0.95rem;
}

.event-actions .btn-primary {
  background: #28a745;
  color: white;
}

.event-actions .btn-primary:hover {
  background: #218838;
}

.event-actions .btn-secondary {
  background: #6c757d;
  color: white;
}

.event-actions .btn-secondary:hover {
  background: #5a6268;
}

.event-actions .btn-danger {
  background: #dc3545;
  color: white;
}

.event-actions .btn-danger:hover {
  background: #c82333;
}

.event-comments-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 2px solid #e0e0e0;
}

.event-comments-section h3 {
  margin-bottom: 1rem;
  color: #333;
}

.participants-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.no-participants,
.no-comments {
  color: #999;
  font-style: italic;
  padding: 0.5rem 0;
}

/* Dark mode support */
body.dark-mode #eventDetailsView {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

body.dark-mode .event-details-card {
  background: #2d3748;
  color: #e0e0e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .info-row {
  border-bottom-color: #4a5568;
}

body.dark-mode .info-row label {
  color: #a0aec0;
}

body.dark-mode .info-value {
  color: #e0e0e0;
}

/* Dark mode countdown stílusok */
body.dark-mode .countdown-now {
  color: #f87171;
}

body.dark-mode .countdown-soon {
  color: #fb923c;
}

body.dark-mode .countdown-today {
  color: #fbbf24;
}

body.dark-mode .countdown-tomorrow {
  color: #4ade80;
}

body.dark-mode .countdown-future {
  color: #9ca3af;
}

body.dark-mode .countdown-past {
  color: #6b7280;
}

body.dark-mode .event-actions {
  border-top-color: #4a5568;
}

body.dark-mode .event-comments-section {
  border-top-color: #4a5568;
}

body.dark-mode .event-comments-section h3 {
  color: #e0e0e0;
}

body.dark-mode .no-participants,
body.dark-mode .no-comments {
  color: #718096;
}

/* Comments list in event details view */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.comment-item {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
  border-left: 3px solid var(--primary-color);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.comment-user {
  font-weight: 600;
  color: #333;
}

.comment-date {
  font-size: 0.85rem;
  color: #666;
}

.comment-body {
  color: #444;
  line-height: 1.5;
  white-space: pre-wrap;
}

.comment-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e0e0e0;
}

.comment-edit-btn,
.comment-delete-btn {
  padding: 0.25rem 0.75rem;
  font-size: 0.85rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.comment-edit-btn {
  background: #e3f2fd;
  color: #1976d2;
}

.comment-edit-btn:hover {
  background: #bbdefb;
}

.comment-delete-btn {
  background: #ffebee;
  color: #c62828;
}

.comment-delete-btn:hover {
  background: #ffcdd2;
}

/* New comment form in view */
.new-comment-form-view {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e0e0e0;
}

.new-comment-form-view textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

.new-comment-form-view textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.comment-form-actions {
  margin-top: 0.75rem;
  display: flex;
  justify-content: flex-end;
}

/* Dark mode for comments */
body.dark-mode .comment-item {
  background: #374151;
  border-left-color: var(--primary-color);
}

body.dark-mode .comment-user {
  color: #e0e0e0;
}

body.dark-mode .comment-date {
  color: #9ca3af;
}

body.dark-mode .comment-body {
  color: #d1d5db;
}

body.dark-mode .comment-actions {
  border-top-color: #4b5563;
}

body.dark-mode .comment-edit-btn {
  background: #1e3a5f;
  color: #60a5fa;
}

body.dark-mode .comment-edit-btn:hover {
  background: #1e40af;
}

body.dark-mode .comment-delete-btn {
  background: #4a1e1e;
  color: #f87171;
}

body.dark-mode .comment-delete-btn:hover {
  background: #7f1d1d;
}

body.dark-mode .new-comment-form-view {
  border-top-color: #4b5563;
}

body.dark-mode .new-comment-form-view textarea {
  background: #374151;
  border-color: #4b5563;
  color: #e0e0e0;
}

body.dark-mode .new-comment-form-view textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
  #eventDetailsView {
    padding: 1rem;
  }

  .event-nav-buttons {
    flex-direction: column;
  }

  .event-nav-buttons button {
    width: 100%;
  }

  .event-details-card {
    margin: 1rem auto;
    padding: 1rem;
  }

  .info-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
    padding: 0.5rem 0;
  }

  .info-row label {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
  }

  .event-actions {
    flex-direction: column;
  }

  .event-actions button {
    width: 100%;
  }
}

/* ============================================
   EVENT HIGHLIGHT ANIMATION
   ============================================ */

/* Highlight animation for returning from event details */
@keyframes eventHighlightPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    transform: scale(1);
  }
  25% {
    box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.4);
    transform: scale(1.02);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(59, 130, 246, 0.2);
    transform: scale(1);
  }
  75% {
    box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.4);
    transform: scale(1.02);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    transform: scale(1);
  }
}

/* Month view event highlight - more prominent */
.calendar-month .event.event-highlighted {
  animation: eventHighlightPulseMonth 2s ease-in-out 2;
  position: relative;
  z-index: 100;
  background: linear-gradient(135deg, #fef08a 0%, #fde047 100%) !important;
  border: 2px solid #f59e0b !important;
  border-left-width: 5px !important;
  border-radius: 4px;
  transform-origin: center;
}

@keyframes eventHighlightPulseMonth {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.8);
    transform: scale(1);
  }
  15% {
    box-shadow: 0 0 0 10px rgba(245, 158, 11, 0.5), 0 0 20px rgba(245, 158, 11, 0.4);
    transform: scale(1.08);
  }
  30% {
    box-shadow: 0 0 0 15px rgba(245, 158, 11, 0.3), 0 0 30px rgba(245, 158, 11, 0.2);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(245, 158, 11, 0.5), 0 0 20px rgba(245, 158, 11, 0.4);
    transform: scale(1.08);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(245, 158, 11, 0.3), 0 0 30px rgba(245, 158, 11, 0.2);
    transform: scale(1);
  }
  85% {
    box-shadow: 0 0 0 10px rgba(245, 158, 11, 0.5), 0 0 20px rgba(245, 158, 11, 0.4);
    transform: scale(1.05);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    transform: scale(1);
  }
}

/* Week view event highlight */
.calendar-week-grouped .event-item.event-highlighted {
  animation: eventHighlightPulse 2s ease-in-out 2;
  position: relative;
  z-index: 10;
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%) !important;
}

/* Day view event card highlight */
.calendar-day-stacked .day-event-card.event-highlighted {
  animation: eventHighlightPulse 2s ease-in-out 2;
  position: relative;
  z-index: 10;
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%) !important;
}

/* Dark mode highlight colors */
body.dark-mode .calendar-month .event.event-highlighted {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
  border-color: #fbbf24 !important;
  color: #1f2937 !important;
}

body.dark-mode .calendar-week-grouped .event-item.event-highlighted {
  background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%) !important;
}

body.dark-mode .calendar-day-stacked .day-event-card.event-highlighted {
  background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%) !important;
}

@keyframes eventHighlightPulseDark {
  0% {
    box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.7);
    transform: scale(1);
  }
  25% {
    box-shadow: 0 0 0 8px rgba(96, 165, 250, 0.4);
    transform: scale(1.02);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(96, 165, 250, 0.2);
    transform: scale(1);
  }
  75% {
    box-shadow: 0 0 0 8px rgba(96, 165, 250, 0.4);
    transform: scale(1.02);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(96, 165, 250, 0);
    transform: scale(1);
  }
}

/* Dark mode uses same orange animation for month view */
body.dark-mode .calendar-month .event.event-highlighted {
  animation: eventHighlightPulseMonth 2s ease-in-out 2 !important;
}

body.dark-mode .calendar-week-grouped .event-item.event-highlighted,
body.dark-mode .calendar-day-stacked .day-event-card.event-highlighted {
  animation: eventHighlightPulseDark 2s ease-in-out 2 !important;
}

/* ============================================
   PROFILE PAGE
   ============================================ */

.profile-page {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--spacing-lg);
}

.profile-card {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-xl);
  margin-bottom: var(--spacing-lg);
  box-shadow: var(--shadow-md);
}

.profile-section-title {
  font-size: var(--font-size-lg);
  color: var(--primary);
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--border);
}

.profile-description {
  color: var(--gray-dark);
  font-size: var(--font-size-sm);
  margin-bottom: var(--spacing-md);
}

.profile-form .form-group {
  margin-bottom: var(--spacing-md);
}

.profile-form label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 600;
  color: var(--dark);
}

.profile-form input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  font-size: var(--font-size-md);
  transition: var(--transition);
}

.profile-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.profile-form input:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
  color: var(--gray-dark);
}

.form-hint {
  display: block;
  font-size: 12px;
  color: var(--gray);
  margin-top: var(--spacing-xs);
}

.profile-actions {
  margin-top: var(--spacing-lg);
  text-align: right;
}

.admin-controls {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.admin-controls .checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  cursor: pointer;
  font-size: var(--font-size-md);
}

.admin-controls input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.email-change-section,
.password-change-section {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.email-pending-notice {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: var(--border-radius);
  color: #92400e;
}

.pending-icon {
  font-size: 24px;
}

#passwordMatchError {
  color: var(--danger);
  font-size: var(--font-size-sm);
  padding: var(--spacing-sm);
  background: #fee2e2;
  border-radius: var(--border-radius-sm);
}

/* Dark Mode Profile */
body.dark-mode .profile-card {
  background: #2d3748;
  border: 1px solid #4a5568;
}

body.dark-mode .profile-section-title {
  color: #90cdf4;
  border-bottom-color: #4a5568;
}

body.dark-mode .profile-description {
  color: #a0aec0;
}

body.dark-mode .profile-form label {
  color: #e2e8f0;
}

body.dark-mode .profile-form input {
  background: #1a202c;
  border-color: #4a5568;
  color: #e2e8f0;
}

body.dark-mode .profile-form input:focus {
  border-color: #90cdf4;
  box-shadow: 0 0 0 3px rgba(144, 205, 244, 0.1);
}

body.dark-mode .profile-form input:disabled {
  background: #2d3748;
  color: #718096;
}

body.dark-mode .form-hint {
  color: #718096;
}

body.dark-mode .admin-controls .checkbox-label {
  color: #e2e8f0;
}

body.dark-mode .email-pending-notice {
  background: #744210;
  border-color: #d69e2e;
  color: #faf089;
}

body.dark-mode #passwordMatchError {
  background: #742a2a;
  color: #feb2b2;
}

/* Responsive Profile */
@media (max-width: 768px) {
  .profile-page {
    padding: var(--spacing-md);
  }

  .profile-card {
    padding: var(--spacing-lg);
  }

  .profile-actions {
    text-align: center;
  }

  .profile-actions .btn {
    width: 100%;
  }
}
