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

body {
  font-family: var(--font-primary);
  background: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  overflow: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* App Shell Layout */
#app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  position: relative;
}

/* Sidebar Styling */
#sidebar {
  width: 320px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-shrink: 0;
  z-index: 10;
  transition: background var(--transition-normal), border var(--transition-normal);
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--info));
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.sidebar-title h1 {
  font-size: 1.25rem;
  background: linear-gradient(to right, var(--text-main), var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Section styling */
.sidebar-section h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* User Switcher */
.user-switcher-container {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-select {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-primary);
  font-size: 0.9rem;
  color: var(--text-main);
  cursor: pointer;
  font-weight: 500;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  box-shadow: var(--card-shadow);
}

/* Sub-calendars list */
.sub-calendars-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sub-calendar-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
  background: transparent;
}

.sub-calendar-item:hover {
  background: var(--bg-hover);
}

.sub-calendar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.sub-calendar-color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}
[data-theme="dark"] .sub-calendar-color-dot {
  border-color: #1e293b;
}

.sub-calendar-name {
  font-size: 0.9rem;
  color: var(--text-main);
  user-select: none;
}

.sub-calendar-checkbox {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.sub-calendar-checkbox:checked {
  background-color: var(--team-color);
  border-color: var(--team-color);
}

.sub-calendar-checkbox:checked::after {
  content: "✓";
  color: white;
  font-size: 10px;
  font-weight: bold;
}

.sub-calendar-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.sub-calendar-item:hover .sub-calendar-actions {
  opacity: 1;
}

.sub-calendar-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sub-calendar-btn:hover {
  background: var(--border-color);
  color: var(--text-main);
}

.add-team-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border: 1px dashed var(--border-color);
  background: transparent;
  border-radius: var(--border-radius-md);
  color: var(--text-muted);
  font-family: var(--font-primary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-top: 6px;
}

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

/* Sidebar Stats Dashboard */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.stat-card {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: var(--border-radius-md);
  text-align: center;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: bold;
  font-family: var(--font-display);
  margin-bottom: 2px;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-completed .stat-value {
  color: var(--success);
}

.stat-overdue .stat-value {
  color: var(--danger);
}

.stat-pending .stat-value {
  color: var(--warning);
}

.stat-total .stat-value {
  color: var(--primary);
}

/* Sidebar Notifications Log */
.notifications-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.notifications-log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.clear-logs-btn {
  background: transparent;
  border: none;
  font-size: 0.75rem;
  color: var(--primary);
  cursor: pointer;
}

.clear-logs-btn:hover {
  text-decoration: underline;
}

.notifications-log-list {
  flex: 1;
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 10px;
  font-family: monospace;
  font-size: 0.75rem;
  overflow-y: auto;
  max-height: 180px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.log-entry {
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--border-color);
  line-height: 1.3;
}

.log-entry:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.log-time {
  color: var(--text-muted);
}

.log-type-sms {
  color: var(--info);
  font-weight: bold;
}

.log-type-email {
  color: var(--warning);
  font-weight: bold;
}

.log-type-system {
  color: var(--success);
  font-weight: bold;
}

.log-msg {
  color: var(--text-main);
  word-break: break-all;
}

/* Main Calendar Area styling */
#main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  position: relative;
}

/* Header */
#header {
  height: 80px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-sidebar);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 5;
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.today-btn {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: var(--border-radius-md);
  font-family: var(--font-primary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-main);
}

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

.nav-buttons {
  display: flex;
  gap: 4px;
}

.nav-btn {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  width: 36px;
  height: 36px;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.nav-btn:hover {
  background: var(--border-color);
}

.current-date-display {
  font-size: 1.4rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--text-main);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.view-tabs {
  display: flex;
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  padding: 4px;
  border-radius: var(--border-radius-lg);
}

.view-tab {
  background: transparent;
  border: none;
  padding: 8px 16px;
  font-family: var(--font-primary);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--border-radius-md);
  transition: all var(--transition-fast);
}

.view-tab.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--card-shadow);
}

.theme-toggle-btn {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  width: 42px;
  height: 42px;
  border-radius: var(--border-radius-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  transition: all var(--transition-fast);
}

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

.add-event-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  border: none;
  padding: 10px 20px;
  border-radius: var(--border-radius-lg);
  color: white;
  font-family: var(--font-primary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.add-event-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.add-event-btn:active {
  transform: translateY(1px);
}

/* Calendar Views Layout Container */
#calendar-view-container {
  flex: 1;
  overflow-y: auto;
  background: var(--bg-card);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* MONTH VIEW STYLING */
.month-view-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: 40px repeat(6, 1fr);
  height: 100%;
  min-height: 600px;
}

.month-view-day-header {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  border-right: 1px solid var(--calendar-grid-border);
  background: var(--calendar-header-bg);
}

.month-view-day-header:nth-child(7) {
  border-right: none;
}

.month-view-day-cell {
  background: var(--calendar-day-bg);
  border-bottom: 1px solid var(--calendar-grid-border);
  border-right: 1px solid var(--calendar-grid-border);
  display: flex;
  flex-direction: column;
  padding: 6px;
  min-height: 90px;
  position: relative;
  transition: background var(--transition-fast);
  cursor: pointer;
}

.month-view-day-cell:hover {
  background: var(--bg-hover);
}

.month-view-day-cell-wrapper:nth-child(7n) .month-view-day-cell {
  border-right: none;
}

.month-view-day-cell.other-month {
  color: var(--calendar-other-month-text);
  background: rgba(0, 0, 0, 0.01);
}
[data-theme="dark"] .month-view-day-cell.other-month {
  background: rgba(255, 255, 255, 0.01);
}

.month-view-day-cell.today {
  background: var(--calendar-today-bg);
}

.month-view-day-number-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.month-view-day-number {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.month-view-day-cell.today .month-view-day-number {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.month-view-events-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

/* WEEK VIEW STYLING */
.week-view-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 700px;
}

.week-view-header {
  display: grid;
  grid-template-columns: 70px repeat(7, 1fr);
  border-bottom: 1px solid var(--border-color);
  background: var(--calendar-header-bg);
  position: sticky;
  top: 0;
  z-index: 2;
}

.week-view-time-header {
  border-right: 1px solid var(--calendar-grid-border);
}

.week-view-day-col-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-right: 1px solid var(--calendar-grid-border);
  font-size: 0.85rem;
}

.week-view-day-col-header:last-child {
  border-right: none;
}

.week-view-day-name {
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  margin-bottom: 2px;
}

.week-view-day-date {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.95rem;
}

.week-view-day-col-header.today .week-view-day-date {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.week-view-body {
  display: grid;
  grid-template-columns: 70px repeat(7, 1fr);
  flex: 1;
  overflow-y: auto;
  position: relative;
}

.week-view-time-col {
  border-right: 1px solid var(--calendar-grid-border);
  background: var(--calendar-header-bg);
}

.week-view-time-slot {
  height: 60px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding-right: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  transform: translateY(-8px);
}

.week-view-day-col {
  border-right: 1px solid var(--calendar-grid-border);
  background: var(--calendar-day-bg);
  position: relative;
  height: 1440px; /* 24 hours * 60px */
}

.week-view-day-col:last-child {
  border-right: none;
}

.week-view-day-col.today {
  background: var(--calendar-today-bg);
}

.week-view-hour-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.week-view-hour-line {
  height: 60px;
  border-bottom: 1px solid var(--calendar-grid-border);
}

/* DAY VIEW STYLING */
.day-view-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.day-view-header {
  display: grid;
  grid-template-columns: 70px 1fr;
  border-bottom: 1px solid var(--border-color);
  background: var(--calendar-header-bg);
  position: sticky;
  top: 0;
  z-index: 2;
}

.day-view-body {
  display: grid;
  grid-template-columns: 70px 1fr;
  flex: 1;
  overflow-y: auto;
  position: relative;
}

/* AGENDA VIEW STYLING */
.agenda-view-container {
  padding: 30px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.agenda-day-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.agenda-day-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.agenda-day-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.agenda-events-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.agenda-event-card {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-left: 6px solid var(--team-color);
  padding: 16px;
  border-radius: var(--border-radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.agenda-event-card:hover {
  transform: translateX(4px);
  background: var(--bg-hover);
}

.agenda-event-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.agenda-event-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.agenda-event-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
}

.agenda-event-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 500px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agenda-event-time {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  min-width: 120px;
}

.agenda-event-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.agenda-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 1rem;
}

/* EVENT ITEM COMPONENT STYLING */
.event-item {
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-main);
  background: var(--event-bg);
  border-left: 4px solid var(--event-border-color);
  cursor: pointer;
  user-select: none;
  transition: transform var(--transition-fast), filter var(--transition-fast);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.event-item:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}
[data-theme="dark"] .event-item:hover {
  filter: brightness(1.1);
}

.event-item-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-item-time {
  font-size: 0.65rem;
  color: var(--text-muted);
  opacity: 0.85;
}

/* Absolute Event position (Week/Day Views) */
.event-item.absolute-event {
  position: absolute;
  left: 4px;
  right: 4px;
  z-index: 1;
}

/* Event multi-calendar representation (Stripes) */
.event-stripe-bg {
  /* Dynamic multi-calendar striped gradients are loaded inline via JavaScript */
}

/* Event Status Signifiers */
.event-completed {
  opacity: 0.5;
  text-decoration: line-through;
}

.event-completed .event-item-title {
  text-decoration: line-through;
}

.event-completed::after {
  content: "✓";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--success);
  font-size: 10px;
  font-weight: bold;
}

.event-overdue {
  border: 1px solid var(--danger) !important;
  box-shadow: 0 0 4px var(--danger-light);
}

.event-overdue-pulse {
  animation: overdue-pulse-animation 1.5s infinite;
}

@keyframes overdue-pulse-animation {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 5px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.badge-overdue {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid var(--danger);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-completed {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid var(--success);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
}

.event-badge-row {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.team-badge {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  color: white;
}

/* MODAL / DIALOG */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--border-radius-xl);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

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

.modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: var(--bg-hover);
  color: var(--text-main);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select,
input[type="datetime-local"],
input[type="time"],
input[type="date"] {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  border-radius: var(--border-radius-md);
  font-family: var(--font-primary);
  font-size: 0.95rem;
  color: var(--text-main);
  outline: none;
  transition: all var(--transition-fast);
  width: 100%;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus,
input[type="datetime-local"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Multiselect Badge Pill container */
.calendar-pill-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.calendar-pill {
  padding: 6px 12px;
  border-radius: var(--border-radius-lg);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  border: 2px solid transparent;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.calendar-pill.selected {
  border-color: var(--text-main);
  box-shadow: var(--card-shadow);
}

/* Participant List / Checkboxes */
.participants-selector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: var(--border-radius-md);
}

.participant-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  cursor: pointer;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-footer-right {
  display: flex;
  gap: 12px;
}

.btn {
  padding: 10px 20px;
  border-radius: var(--border-radius-md);
  font-family: var(--font-primary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
}

.btn-secondary {
  background: var(--bg-hover);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--border-color);
}

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

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

.btn-danger {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid var(--danger);
}

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

/* Event details page specific widgets */
.event-metadata-box {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: var(--border-radius-md);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.85rem;
}

.event-meta-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.event-meta-label {
  color: var(--text-muted);
  font-weight: 500;
}

.event-meta-val {
  font-weight: 600;
  color: var(--text-main);
}

/* TOASTER NOTIFICATION CONTAINER */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
  width: 100%;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 6px solid var(--primary);
  border-radius: var(--border-radius-md);
  padding: 16px;
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: translateX(120%);
  animation: toast-slide-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  transition: opacity 0.25s, transform 0.25s;
}

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

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

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

.toast-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toast-title {
  font-weight: 700;
  font-size: 0.9rem;
  font-family: var(--font-display);
}

.toast-close-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
}

.toast-message {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

@keyframes toast-slide-in {
  to { transform: translateX(0); }
}

/* Custom Calendar Color Modals */
.color-picker-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.color-option {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: transform var(--transition-fast);
}

.color-option.selected {
  border-color: var(--text-main);
  transform: scale(1.1);
}

/* RESPONSIVE MEDIA QUERIES */
@media (max-width: 900px) {
  #sidebar {
    position: absolute;
    left: -320px;
    top: 0;
    bottom: 0;
    transition: left var(--transition-normal);
  }
  
  #sidebar.active {
    left: 0;
  }
  
  .sidebar-toggle-btn {
    display: flex !important;
  }
}

.sidebar-toggle-btn {
  display: none;
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  width: 36px;
  height: 36px;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
}

/* Authentication Screen */
.auth-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-app);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--border-radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: toast-slide-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.auth-header {
  text-align: center;
}

.auth-header h2 {
  font-size: 1.8rem;
  font-family: var(--font-display);
  background: linear-gradient(135deg, var(--primary), var(--info));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}

.auth-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-toggle-link {
  font-size: 0.85rem;
  color: var(--primary);
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  margin-top: 8px;
}

.auth-toggle-link:hover {
  text-decoration: underline;
}

.auth-error-msg {
  color: var(--danger);
  background: var(--danger-light);
  border: 1px solid var(--danger);
  padding: 10px;
  border-radius: var(--border-radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
}

/* Settings View specific styles */
.settings-nav-btn.active {
  background: var(--bg-hover) !important;
  color: var(--primary) !important;
}

.settings-panel {
  animation: panel-fade-in 0.25s ease-out;
}

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

table tr.settings-user-row:hover {
  background: var(--bg-hover);
}

/* Event Attachments Layout */
#evt-attachments-list {
  transition: all var(--transition-normal);
}

#evt-attachments-list img:hover {
  transform: scale(1.05);
  transition: transform var(--transition-fast);
}

.btn-remove-attachment:hover {
  color: var(--danger) !important;
  transform: scale(1.1);
  transition: transform var(--transition-fast);
}
