@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&display=swap');

body {
  background: #ffffff;
  font-family: 'DM Sans', system-ui, Arial, sans-serif;
  color: #333;
  margin: 0;
  min-height: 100vh;
}

#container {
  max-width: 1200px;
  margin: 36px auto 0 auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 32px #551bba18;
  padding: 32px 32px 24px 32px;
}

h1, h2, h3 {
  color: #333333;
  font-weight: 700;
  margin-top: 0;
  font-family: 'DM Sans', system-ui, Arial, sans-serif;
  letter-spacing: -0.02rem;
}

button, .action-btn {
    background: #551bba;
color: #fff;
border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 1em;
  font-family: 'DM Sans', system-ui, Arial, sans-serif;
  text-align: center;
  transition: background 0.15s, color 0.15s, border 0.15s;
  text-decoration: none;
}
button:hover, .action-btn:hover {
  background: #3d148a;
  color: #fff;
  border: none;
  text-decoration: none;
}
.delete-btn {
  background: #b00;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 1em;
  font-family: 'DM Sans', system-ui, Arial, sans-serif;
  text-align: center;
  transition: background 0.15s, color 0.15s, border 0.15s;
}
.delete-btn:hover {
  background: rgb(144, 0, 0);
  color: #fff;
  border: none;
  text-decoration: none;
}

.secondary-btn {
  background: #fff;
  color: #551bba;
  border: 2px solid #551bba;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 1em;
  font-family: 'DM Sans', system-ui, Arial, sans-serif;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border 0.15s;
  text-align: center;
  text-decoration: none;
  display: inline-block;
}
.secondary-btn:hover, .secondary-btn:focus {
  background: #f3edfd;
  color: #3d148a;
  border-color: #3d148a;
}

#events-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px #551bba0c;
}
#events-table th, #events-table td {
  border: none;
  padding: 14px 10px;
  text-align: left;
  font-family: 'DM Sans', system-ui, Arial, sans-serif;
}
#events-table th {
  background: #e7e0fa;
  color: #551bba;
  font-size: 1.05em;
  font-weight: 600;
}
#events-table tr {
  border-bottom: 1px solid #e7e0fa;
}
#events-table tr:last-child {
  border-bottom: none;
}

input[type="text"], input[type="email"], select, textarea {
  border: 1.5px solid #e1e5e9;
  border-radius: 7px;
  padding: 8px 10px;
  font-size: 1em;
  font-family: 'DM Sans', system-ui, Arial, sans-serif;
  background: #fff;
  margin-top: 2px;
  margin-bottom: 8px;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.15s ease;
}
input[type="text"]:focus, input[type="email"]:focus, select:focus, textarea:focus {
  border: 1.5px solid #551bba;
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(85, 27, 186, 0.1);
}

/* Checkbox styling - keep purple */
input[type="checkbox"] {
  accent-color: #551bba;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.date-input-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}
input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: #fff;
  border: 1.5px solid #e1e5e9;
  border-radius: 7px;
  padding: 8px 38px 8px 12px;
  font-size: 1em;
  font-family: 'DM Sans', system-ui, Arial, sans-serif;
  color: #333;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.15s ease;
  outline: none;
  height: 40px;
}
input[type="date"]:focus {
  border: 1.5px solid #551bba;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(85, 27, 186, 0.1);
}
.date-input-wrapper .ph-calendar {
  position: absolute;
  right: 12px;         /* adjust as needed */
  top: 50%;            /* adjust as needed */
  transform: translateY(-50%); /* adjust as needed */
  color: #6c757d;
  font-size: 1.2em;
  pointer-events: cursor;
}

/* Modal styles */
#modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(85, 27, 186, 0.10);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
#modal {
  background: #fff;
  padding: 28px 32px 18px 32px;
  border-radius: 16px;
  max-width: 420px;
  width: 95vw;
  box-shadow: 0 4px 32px #551bba22;
  border: 2.5px solid #e7e0fa;
  position: relative;
  font-family: 'DM Sans', system-ui, Arial, sans-serif;
}
#close-modal-btn {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 1.2em;
  background: none;
  border: none;
  color: #551bba;
  cursor: pointer;
  font-family: 'DM Sans', system-ui, Arial, sans-serif;
}
#close-modal-btn:hover {
  color: #3d148a;
}

/* Misc */
ul {
  margin: 0;
  padding-left: 18px;
  font-family: 'DM Sans', system-ui, Arial, sans-serif;
}

.events-list-modern {
  width: 100%;
  margin-top: 20px;
}
.events-header-row {
  display: flex;
  background: #e7e0fa;
  color: #551bba;
  font-weight: 600;
  font-size: 1.0rem;
  border-radius: 14px 14px 0 0;
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: 0 2px 8px #551bba0a;
}
.events-header-cell {
  flex: 1 1 0;
  padding: 16px 10px;
  min-width: 120px;
  text-align: center;
}
.events-header-cell:last-child {
  min-width: 140px;
  text-align: center;
}
.event-card-row {
  display: flex;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px #551bba0c;
  margin-bottom: 18px;
  align-items: flex-start;
  transition: box-shadow 0.15s;
}
.event-card-row:hover {
  box-shadow: 0 4px 24px #551bba18;
}
.event-card-cell {
  flex: 1 1 0;
  padding: 18px 10px 18px 10px;
  min-width: 120px;
  word-break: break-word;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.event-card-cell.event-actions {
  min-width: 140px;
  align-items: center;
  justify-content: center;
  display: flex;
}
.action-btns-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}
@media (max-width: 800px) {
  .events-header-row, .event-card-row {
    flex-direction: column;
  }
  .events-header-cell, .event-card-cell {
    min-width: 0;
    padding: 12px 6px;
  }
  .event-card-cell.event-actions {
    min-width: 0;
    align-items: flex-start;
  }
  
  /* Header responsive */
  .global-header {
    padding: 12px 16px;
  }
  
  .header-nav {
    gap: 16px;
  }
  
  .header-user {
    gap: 12px;
  }
  
  .header-user-name {
    display: none;
  }
  
  .header-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}

.ph, .ph-bold, .ph-fill, .ph-light, .ph-regular, .ph-thin {
  font-family: 'Phosphor', sans-serif !important;
  font-style: normal !important;
  font-weight: normal !important;
  font-variant: normal !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  margin-right: 0.25rem;
  vertical-align: middle;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Global Header */
.global-header {
  background: white;
  border-bottom: 1px solid #e2e8f0;
  padding: 16px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  display: block;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.header-logo img {
  height: 40px;
  width: auto;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.header-user-name {
  font-weight: 500;
  color: #374151;
}

.header-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.header-btn-primary {
  background: #551bba;
  color: white;
}

.header-btn-primary:hover {
  background: #7c3aed;
}

.header-btn-secondary {
  background: transparent;
  color: #551bba;
  border: 1px solid #551bba;
}

.header-btn-secondary:hover {
  background: #f3edfd;
}

/* Adjust main content for header */
body {
  padding-top: 0;
}

/* Pill/Tag styling */
.pill-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  align-items: flex-start;
}

.pill-container .pill:first-child {
  margin-left: 0;
}

/* Label with icon layout */
.label-with-icon {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.label-with-icon i {
  margin-right: 0;
}

/* Align pills with text labels */
#finalize-section .pill-container {
  margin-left: 0;
  padding-left: 1.45rem;
}

.pill {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pill-date,
.pill-participant,
.pill-email,
.pill-tz,
.pill-vote,
.pill-popular,
.pill-common,
.pill-none {
  background: #f8f9fa;
  color: #495057;
  border: 1px solid #e9ecef;
}

.pill-tz {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}
