:root {
  --primary: #f23a2e;
  --primary-dark: #d92e23;
  --bg: #fff8f6;
  --card: #ffffff;
  --text: #2f2f2f;
  --muted: #6f6f6f;
  --border: #f0d5d2;
  --success-bg: #ecfdf3;
  --success-text: #027a48;
  --danger-bg: #fff1f0;
  --danger-text: #b42318;
  --shadow: 0 18px 50px rgba(242, 58, 46, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(135deg, #fffaf8 0%, #ffecea 100%);
  color: var(--text);
  min-height: 100vh;
}

.app-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #eee;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.nav-logo img {
  height: 42px;
  display: block;
}

.nav-links {
  display: flex;
  gap: 26px;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: #333;
  font-weight: 700;
  position: relative;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
  border-radius: 999px;
}

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

.nav-button {
  background: var(--primary);
  color: white;
  padding: 8px 14px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 800;
  border: 0;
  cursor: pointer;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
}

.logout-btn {
  border: none;
  background: #eee;
  padding: 7px 11px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}

.logout-btn:hover {
  background: #ddd;
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 20px 56px;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 22px;
}

h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  letter-spacing: -0.04em;
}

.subhead {
  margin-top: 7px;
  color: var(--muted);
  font-size: 1rem;
}

.pill {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.88rem;
  white-space: nowrap;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.event-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.event-image {
  height: 170px;
  background: linear-gradient(135deg, #f23a2e 0%, #ffb1aa 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: -0.08em;
}

.event-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.event-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.event-type {
  width: fit-content;
  background: #fff2f0;
  color: var(--primary-dark);
  border: 1px solid #ffd7d2;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.event-title {
  margin: 0;
  font-size: 1.22rem;
  letter-spacing: -0.03em;
}

.event-description {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.event-meta {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: auto;
}

.meta-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.meta-label {
  font-weight: 900;
  color: var(--text);
  min-width: 72px;
}

.sessions-list {
  display: grid;
  gap: 4px;
}

.event-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.primary-button,
.ghost-button {
  border: 0;
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 900;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.18s ease, opacity 0.18s ease;
  width: 100%;
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

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

.ghost-button {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
}

.empty-state,
.loading,
.error {
  border: 1px dashed var(--border);
  border-radius: 20px;
  padding: 28px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.9);
  text-align: center;
  box-shadow: var(--shadow);
}

.error {
  color: var(--danger-text);
  background: var(--danger-bg);
  border-color: #ffd7d2;
}

@media (max-width: 980px) {
  .events-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .nav-container {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .nav-right {
    width: 100%;
    justify-content: flex-start;
  }

  .page {
    width: 100%;
    max-width: 540px;
    padding: 16px 12px 36px;
  }

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

  .events-grid {
    grid-template-columns: 1fr;
  }

  .event-card {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 20px;
  }

  .event-actions {
    flex-direction: column;
  }
}
