/* ============================================================
   EVENTS PAGE — CONSOLIDATED STYLESHEET
   Last cleaned: 2026-03
   ============================================================ */

/* ─── RESET / BASE ────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
}

button,
input,
select,
textarea {
  padding: 0.5rem !important;
  font-size: 0.875rem !important;
}

select option {
  background-color: #1f2937 !important;
  color: white !important;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}


/* ============================================================
   SWIPE CARD
   ============================================================ */

/* ─── WRAPPER ─────────────────────────────────────────────── */
.swipe-wrap {
  position: relative;
  touch-action: pan-y;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 8px;
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
  transition: border-color 0.2s;
}

.swipe-wrap:hover {
  border-color: rgba(255, 255, 255, 0.13);
}

/* ─── SWIPE ACTIONS (mobile only, sits behind card) ───────── */
.swipe-actions {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  display: flex;
  align-items: stretch;
  pointer-events: none;
  /* JS adds .active to enable */
}

.swipe-actions.active {
  pointer-events: auto;
}

.swipe-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 68px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: filter 0.1s;
}

.swipe-action:active {
  filter: brightness(1.15);
}

.swipe-action .sa-icon {
  font-size: 16px;
  line-height: 1;
}

.swipe-action .sa-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.swipe-action.s-done {
  background: #15803d;
  color: #fff;
}

.swipe-action.s-missed {
  background: #b91c1c;
  color: #fff;
}

.swipe-action.s-edit {
  background: #4338ca;
  color: #fff;
}

.swipe-action.s-del {
  background: #1c1c1e;
  color: #a1a1aa;
  border-left: 0.5px solid rgba(255, 255, 255, 0.06);
}

/* ─── CARD FACE ───────────────────────────────────────────── */
.swipe-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  cursor: pointer;
  position: relative;
  background: rgba(20, 24, 34, 0.9);
  will-change: transform;
  transition: transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform: translate3d(0, 0, 0);
}

.swipe-card.dragging {
  transition: none;
}

/* ─── LEFT ACCENT BAR ─────────────────────────────────────── */
.card-accent {
  width: 3px;
  height: 38px;
  border-radius: 2px;
  flex-shrink: 0;
  transition: background 0.3s;
}

.card-accent.upcoming {
  background: #818cf8;
}

.card-accent.missed {
  background: #f87171;
}

.card-accent.done {
  background: #4ade80;
}

/* ─── CONTENT ─────────────────────────────────────────────── */
.card-content {
  flex: 1;
  min-width: 0;
}

.card-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 3px;
}

.card-title {
  font-size: 13px;
  font-weight: 600;
  color: #f4f4f5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  flex-shrink: 0;
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
}

.card-meta {
  font-size: 11px;
  color: #71717a;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #52525b;
  flex-shrink: 0;
}

.meta-workspace {
  color: #818cf8;
}

.card-participants {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.participant-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: #a5b4fc;
}

.participant-avatar+.participant-avatar {
  margin-left: -6px;
}

.participant-count {
  font-size: 10px;
  color: #52525b;
}

/* ─── RIGHT ZONE ──────────────────────────────────────────── */
.card-right {
  flex-shrink: 0;
  position: relative;
  width: 110px;
  height: 28px;
  display: flex;
  align-items: center;
}

.status-pill {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  transition: opacity 0.18s, transform 0.18s;
}

.status-pill.upcoming {
  background: rgba(99, 102, 241, 0.1);
  color: #a5b4fc;
}

.status-pill.missed {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
}

.status-pill.done {
  background: rgba(74, 222, 128, 0.1);
  color: #86efac;
}

.swipe-wrap:hover .status-pill {
  opacity: 0;
  transform: translateX(6px);
  pointer-events: none;
}

/* ─── DESKTOP HOVER ACTIONS ───────────────────────────────── */
.desktop-actions {
  position: absolute;
  inset: 0;
  display: none;
  /* shown at sm+ via media query */
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.18s, transform 0.18s;
  pointer-events: none;
}

@media (min-width: 640px) {
  .desktop-actions {
    display: flex;
  }

  .swipe-actions {
    display: none;
  }
}

.swipe-wrap:hover .desktop-actions {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.act-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #a1a1aa;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.act-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.act-btn[data-action="attended"]:hover {
  background: rgba(22, 163, 74, 0.18);
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.25);
}

.act-btn[data-action="missed"]:hover {
  background: rgba(220, 38, 38, 0.18);
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.25);
}

.act-btn[data-action="delete"]:hover {
  background: rgba(220, 38, 38, 0.15);
  color: #f87171;
}


/* ============================================================
   TIMELINE VIEW
   ============================================================ */
.timeline-item {
  position: relative;
  padding-left: 32px;
  margin-bottom: 24px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 18px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #818cf8;
  box-shadow: 0 0 10px rgba(129, 140, 248, 0.6);
  z-index: 2;
}

.timeline-item::after {
  content: '';
  position: absolute;
  left: 7.5px;
  top: 30px;
  bottom: -24px;
  width: 1px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 1;
}

.timeline-item:last-child::after {
  display: none;
}

.event-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.25rem;
  transition: background 0.2s ease-out, border-color 0.2s ease-out, transform 0.2s ease-out;
}

.event-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}


/* ============================================================
   CALENDAR
   ============================================================ */
.calendar-day {
  transition: all 0.2s ease-out;
}

/* 5-day strip */
.day-strip-btn {
  min-width: 65px;
  height: 85px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  padding: 12px 6px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.day-strip-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

.day-strip-btn:active {
  transform: scale(0.95);
}

.day-strip-btn.selected {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.3);
}

.day-strip-top {
  font-size: 12px;
  color: rgba(161, 161, 170, 1);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}

.day-strip-date {
  font-size: 20px;
  font-weight: 600;
  color: white;
  line-height: 1;
  transition: color 0.2s;
}

.day-strip-btn.selected .day-strip-top,
.day-strip-btn.selected .day-strip-date {
  color: #818cf8;
}

.event-indicator {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #818cf8;
  margin-top: 2px;
}

/* Month grid */
.cal-day {
  height: 42px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 6px;
  gap: 2px;
  transition: background 0.15s ease;
}

.cal-day:hover {
  background: rgba(255, 255, 255, 0.08);
}

.cal-day:active {
  transform: scale(0.98);
}

.cal-day.today {
  border-color: rgba(99, 102, 241, 0.55);
  background: rgba(99, 102, 241, 0.15);
  color: #fff;
  font-weight: 700;
}

.cal-day.selected {
  border-color: rgba(168, 85, 247, 0.65);
  background: rgba(168, 85, 247, 0.18);
  color: #fff;
  font-weight: 700;
}

.cal-day.has-event::after {
  content: "";
  display: block;
  width: 4.5px;
  height: 4.5px;
  border-radius: 999px;
  background: #818cf8;
}

.day-number {
  position: relative;
  z-index: 1;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
}

.event-indicator-small {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #818cf8;
}


/* ============================================================
   SIDEBAR
   ============================================================ */
:root {
  --sidebar-bg: linear-gradient(165deg, rgba(22, 28, 38, 0.9) 0%, rgba(13, 17, 23, 0.95) 100%);
  --sidebar-border: rgba(255, 255, 255, 0.08);
  --item-hover-bg: rgba(255, 255, 255, 0.05);
  --item-active-bg: rgba(99, 102, 241, 0.12);
  --text-muted: rgba(255, 255, 255, 0.5);
  --text-bright: rgba(255, 255, 255, 0.95);
}

#sidebar {
  background: var(--sidebar-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--sidebar-border);
  box-shadow: 10px 0 50px rgba(0, 0, 0, 0.3);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 1rem;
  height: calc(100vh - 2rem);
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  z-index: 40;
}

.sidebar-header {
  padding: 2rem 1.5rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-brand {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--sidebar-border);
}

.nav-container {
  flex: 1;
  padding: 0.5rem 1rem;
  overflow-y: auto;
  scrollbar-width: none;
}

.nav-container::-webkit-scrollbar {
  display: none;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 0.85rem 1.25rem;
  margin-bottom: 0.5rem;
  border-radius: 16px;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.nav-item:hover {
  background: var(--item-hover-bg);
  color: var(--text-bright);
  transform: translateX(4px);
  border-color: rgba(255, 255, 255, 0.05);
}

.nav-item:active {
  transform: scale(0.98) translateX(2px);
}

.nav-item.active {
  background: var(--item-active-bg);
  color: #818cf8;
  border-color: rgba(99, 102, 241, 0.2);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  width: 4px;
  height: 20px;
  background: #818cf8;
  border-radius: 0 4px 4px 0;
}

.nav-icon {
  width: 20px;
  height: 20px;
  margin-right: 1rem;
  opacity: 0.6;
  transition: opacity 0.3s;
  stroke-width: 1.5;
}

.nav-label {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  transition: opacity 0.3s, visibility 0.3s;
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
  opacity: 1;
}

/* Mini sidebar */
@media (min-width: 768px) {
  .main-content-shifted {
    margin-left: 18rem;
    transition: margin-left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  #sidebar.sidebar-mini {
    width: 88px;
    padding: 1.5rem 0.75rem;
  }

  #sidebar.sidebar-mini .sidebar-header {
    padding: 1.5rem 0;
    justify-content: center;
  }

  #sidebar.sidebar-mini .sidebar-brand {
    display: none;
  }

  #sidebar.sidebar-mini .nav-container {
    padding: 0.5rem;
  }

  #sidebar.sidebar-mini .nav-item {
    padding: 0.85rem;
    justify-content: center;
    margin-bottom: 0.75rem;
  }

  #sidebar.sidebar-mini .nav-icon {
    margin-right: 0;
  }

  #sidebar.sidebar-mini .nav-label {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    width: 0;
    overflow: hidden;
  }

  #sidebar.sidebar-mini:hover {
    width: 16rem;
    z-index: 1000;
    background: rgba(13, 17, 23, 0.98);
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.5);
  }

  #sidebar.sidebar-mini:hover .sidebar-header {
    padding: 2rem 1.5rem 1.5rem;
    justify-content: space-between;
  }

  #sidebar.sidebar-mini:hover .sidebar-brand {
    display: block;
  }

  #sidebar.sidebar-mini:hover .nav-container {
    padding: 0.5rem 1rem;
  }

  #sidebar.sidebar-mini:hover .nav-item {
    padding: 0.85rem 1.25rem;
    justify-content: flex-start;
  }

  #sidebar.sidebar-mini:hover .nav-icon {
    margin-right: 1rem;
  }

  #sidebar.sidebar-mini:hover .nav-label {
    opacity: 1;
    visibility: visible;
    position: static;
    width: auto;
  }

  #sidebar.sidebar-mini:hover .sidebar-footer {
    padding: 1.5rem;
    justify-content: flex-start;
  }

  #sidebar.sidebar-mini~.main-content-shifted {
    margin-left: 0;
    padding-left: 88px;
    padding-right: 88px;
  }
}

@media (max-width: 767px) {
  #sidebar {
    margin: 0;
    height: 100vh;
    border-radius: 0 28px 28px 0;
    width: 280px !important;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    position: fixed;
  }

  #sidebar.open {
    transform: translateX(0);
  }

  .main-content-shifted {
    margin-left: 0 !important;
  }
}


/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.premium-input {
  width: 100%;
  height: 48px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 0 16px !important;
  color: white;
  font-size: 14px !important;
  transition: all 0.25s ease;
}

.premium-input:focus {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
  outline: none;
}

.premium-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='rgba(255,255,255,0.4)'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  padding-right: 44px !important;
}

.premium-textarea {
  height: auto !important;
  min-height: 100px;
  padding: 12px 16px !important;
  line-height: 1.5;
}

.advanced-section {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.advanced-section.show {
  max-height: 2000px;
  opacity: 1;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.toggle-advanced-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
}

.toggle-advanced-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: white;
}

.toggle-advanced-btn svg {
  transition: transform 0.3s ease;
}

.toggle-advanced-btn.active svg {
  transform: rotate(180deg);
}

.hidden-field {
  display: none;
}

.hidden-field.show {
  display: block;
}


/* ============================================================
   EVENT DETAILS MODAL
   ============================================================ */
.details-row {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.details-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.5);
}

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

.details-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 4px;
  font-weight: 600;
}

.details-value {
  font-size: 14px;
  color: white;
  line-height: 1.4;
}

.details-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}


/* ============================================================
   SCROLLBARS
   ============================================================ */
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.no-scrollbar::-webkit-scrollbar {
  width: 0;
  height: 0;
}

#syncResultsList::-webkit-scrollbar,
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

#syncResultsList::-webkit-scrollbar-track,
.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

#syncResultsList::-webkit-scrollbar-thumb,
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.3);
  border-radius: 10px;
}

#syncResultsList::-webkit-scrollbar-thumb:hover,
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.5);
}


/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardStagger {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.tab-content {
  animation: fadeIn 0.3s ease-out;
}

.page-container {
  animation: fadeIn 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.header-section {
  animation: slideInFromLeft 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) 0.1s both;
}

.tab-section {
  animation: slideInFromRight 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) 0.2s both;
}

.filter-section {
  animation: cardStagger 0.4s cubic-bezier(0.22, 0.61, 0.36, 1) 0.3s both;
}

.skeleton-loader {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.05) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

.dropdown-menu {
  transition: all 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
  transform-origin: top right;
}

.dropdown-menu.show {
  animation: fadeIn 0.3s ease-out forwards;
}

.tab-button {
  transition: all 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.tab-button:hover {
  transform: translateY(-1px);
}

.pulse-on-click {
  transition: all 0.2s ease;
}

.pulse-on-click:active {
  transform: scale(0.95);
}


/* ============================================================
   MOBILE PERFORMANCE OVERRIDES  (max-width: 768px)
   ============================================================ */
@media (max-width: 768px) {

  /* Kill expensive blur */
  .swipe-card,
  #sidebar {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Solid backgrounds instead of glass */
  .swipe-card {
    background: #161a23;
    border: 1px solid rgba(255, 255, 255, 0.05);
    contain: layout paint;
  }

  #sidebar {
    background: #0d1117;
    box-shadow: none;
  }

  /* Disable hover transforms (no hover on touch) */
  .nav-item:hover,
  .event-card:hover,
  .day-strip-btn:hover {
    transform: none;
    box-shadow: none;
  }

  /* Lightweight transitions only */
  .event-card,
  .nav-item,
  .tab-button,
  .day-strip-btn {
    transition: transform 0.18s ease;
  }

  .swipe-card {
    transition: transform 0.16s ease;
  }

  .act-btn {
    transition: transform 0.15s ease;
  }

  .act-btn:hover {
    transform: none;
  }

  .cal-day {
    transition: background 0.15s ease;
  }

  /* Kill all page-load animations */
  .page-container,
  .header-section,
  .tab-section,
  .filter-section,
  .event-card {
    animation: none !important;
  }

  /* Fast scroll lists */
  .nav-container,
  .custom-scrollbar,
  #syncResultsList {
    -webkit-overflow-scrolling: touch;
  }
}
























/* ========== Premium Glassmorphic Sidebar ========== */
:root {
  --sidebar-bg: linear-gradient(165deg, rgba(22, 28, 38, 0.9) 0%, rgba(13, 17, 23, 0.95) 100%);
  --sidebar-border: rgba(255, 255, 255, 0.08);
  --sidebar-glow: rgba(99, 102, 241, 0.15);
  --item-hover-bg: rgba(255, 255, 255, 0.05);
  --item-active-bg: rgba(99, 102, 241, 0.12);
  --text-muted: rgba(255, 255, 255, 0.5);
  --text-bright: rgba(255, 255, 255, 0.95);
}

#sidebar {
  background: var(--sidebar-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-right: 1px solid var(--sidebar-border);
  box-shadow: 10px 0 50px rgba(0, 0, 0, 0.3);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 1rem;
  height: calc(100vh - 2rem);
  border-radius: 28px;
  border: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.sidebar-floating {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
}

.sidebar-header {
  padding: 2rem 1.5rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-brand {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.9;
}

.nav-container {
  flex: 1;
  padding: 0.5rem 1rem;
  overflow-y: auto;
  scrollbar-width: none;
}

.nav-container::-webkit-scrollbar {
  display: none;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 0.85rem 1.25rem;
  margin-bottom: 0.5rem;
  border-radius: 16px;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  border: 1px solid transparent;
}

.nav-item:hover {
  background: var(--item-hover-bg);
  color: var(--text-bright);
  transform: translateX(4px);
  border-color: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
  background: var(--item-active-bg);
  color: #818cf8;
  border-color: rgba(99, 102, 241, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2),
    inset 0 0 10px rgba(99, 102, 241, 0.1);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  width: 4px;
  height: 20px;
  background: #818cf8;
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.nav-icon {
  width: 20px;
  height: 20px;
  margin-right: 1rem;
  opacity: 0.6;
  transition: opacity 0.3s ease;
  stroke-width: 1.5;
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
  opacity: 1;
}

.nav-label {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Enhanced Select Options Visibility Fix */
select option {
  background-color: #1f2937 !important;
  color: white !important;
}

/* Mini Sidebar Styles */
@media (min-width: 768px) {
  #sidebar.sidebar-mini {
    width: 88px;
    padding: 1.5rem 0.75rem;
  }

  #sidebar.sidebar-mini .sidebar-header {
    padding: 1.5rem 0;
    justify-content: center;
  }

  #sidebar.sidebar-mini .sidebar-brand {
    display: none;
  }

  #sidebar.sidebar-mini #sidebarToggle {
    margin-left: 0;
  }

  #sidebar.sidebar-mini .nav-container {
    padding: 0.5rem 0.5rem;
  }

  #sidebar.sidebar-mini .nav-item {
    padding: 0.85rem;
    justify-content: center;
    margin-bottom: 0.75rem;
  }

  #sidebar.sidebar-mini .nav-icon {
    margin-right: 0;
  }

  #sidebar.sidebar-mini .nav-label {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    width: 0;
    overflow: hidden;
  }

  /* Hover Expansion for Mini Sidebar */
  #sidebar.sidebar-mini:hover {
    width: 16rem;
    /* Original width */
    padding: 1.5rem 0.75rem;
    z-index: 1000;
    background: rgba(13, 17, 23, 0.98);
    /* Less transparent on hover */
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.5);
  }

  #sidebar.sidebar-mini:hover .sidebar-header {
    padding: 2rem 1.5rem 1.5rem;
    justify-content: space-between;
  }

  #sidebar.sidebar-mini:hover .sidebar-brand {
    display: block;
    opacity: 0.9;
  }

  #sidebar.sidebar-mini:hover .nav-container {
    padding: 0.5rem 1rem;
  }

  #sidebar.sidebar-mini:hover .nav-item {
    padding: 0.85rem 1.25rem;
    justify-content: flex-start;
  }

  #sidebar.sidebar-mini:hover .nav-icon {
    margin-right: 1rem;
  }

  #sidebar.sidebar-mini:hover .nav-label {
    opacity: 1;
    visibility: visible;
    position: static;
    width: auto;
  }

  #sidebar.sidebar-mini:hover .sidebar-footer {
    padding: 1.5rem;
    justify-content: flex-start;
  }

  /* Prevent content shift when hovering the mini sidebar */
  #sidebar.sidebar-mini:hover+.main-content-shifted {
    margin-left: 7rem;
  }
}

.sidebar-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--sidebar-border);
}

/* Neumorphic shadow for active interaction */
.nav-item:active {
  transform: scale(0.98) translateX(2px);
}

/* Adjust main content for floating sidebar */
@media (min-width: 768px) {
  .main-content-shifted {
    margin-left: 18rem;
    transition: margin-left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  #sidebar.sidebar-mini+.main-content-shifted {
    margin-left: 7rem;
  }
}

@media (max-width: 767px) {
  #sidebar {
    margin: 0;
    height: 100vh;
    border-radius: 0 28px 28px 0;
    transform: translateX(-100%);
  }

  #sidebar.open {
    transform: translateX(0);
  }
}

/* Mobile Webview Optimizations */
@media (max-width: 768px) {

  .backdrop-blur-xl,
  .backdrop-blur-sm,
  .backdrop-blur-md {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(15, 23, 42, 0.95) !important;
  }

  .smooth-hover {
    transition: none !important;
  }

  /* Force hardware acceleration */
  .workspace-card,
  .nav-item,
  .tab-btn,
  tr {
    will-change: transform;
    transform: translateZ(0);
  }
}

/* Realtime optimization: Disable expensive effects during updates */
.updating {
  transition: none !important;
  opacity: 0.8;
}