:root {
  --page-bg: #f7f7f8;
  --surface: #ffffff;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --text: #111827;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --danger-bg: #fef2f2;
  --danger-text: #b91c1c;
  --success-bg: #eff6ff;
  --success-text: #1d4ed8;
}

html,
body {
  min-height: 100%;
  background: var(--page-bg);
  color: var(--text);
}

body,
button,
input,
textarea,
select {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: var(--accent);
}

.app-shell {
  min-height: 100vh;
  padding: 2rem 1rem 3rem;
}

.app-container {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

.brand {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.brand img {
  display: block;
  width: auto;
  height: 40px;
}

.panel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.auth-card {
  max-width: 520px;
  margin: 0 auto;
}

.panel-card .card-content {
  padding: 2rem;
}

.title-main {
  margin-bottom: 0.75rem !important;
  color: var(--text);
  font-size: 1.5rem !important;
  font-weight: 600 !important;
  letter-spacing: -0.03em;
}

.text-muted {
  color: var(--muted) !important;
  font-size: 0.95rem !important;
  line-height: 1.5;
}

.auth-step {
  display: none;
  width: 100%;
  max-width: 440px;
}

.auth-step.is-active {
  display: block;
}

.field-label {
  margin-bottom: 0.5rem;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
}

.form-narrow {
  width: 100%;
  max-width: 420px;
}

.input,
.button {
  border-radius: 12px;
}

.input {
  height: 46px;
  border-color: var(--border-strong);
  box-shadow: none;
}

.input:focus,
.input:active {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.05);
}

.button.is-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.button.is-accent:hover,
.button.is-accent:focus {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

.button.is-subtle {
  background: #fff;
  border-color: var(--border);
  color: var(--text);
}

.button.is-subtle:hover,
.button.is-subtle:focus {
  border-color: var(--border-strong);
  color: var(--text);
}

.button-offset-mobile {
  margin-left: 0.75rem;
}

.link-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.95rem;
  cursor: pointer;
}

.link-button:hover {
  color: var(--text);
}

.notice {
  display: none;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.45;
}

.notice.is-visible {
  display: block;
}

.notice.is-error {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.notice.is-success {
  background: var(--success-bg);
  color: var(--success-text);
}

.meta-note {
  margin-top: 1.25rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
}

.help-block {
  margin-top: 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.help-block strong {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--text);
  font-weight: 600;
}

.page-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.page-header .subtitle {
  margin-top: 0.5rem;
}

.badge-muted {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.events-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.event-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1rem 1.1rem;
  background: #fff;
}

.event-item h3 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1rem;
}

.event-grid strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.empty-box {
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  padding: 1rem;
  text-align: center;
  color: var(--muted);
}

.is-hidden {
  display: none !important;
}

@media (max-width: 768px) {
  .app-shell {
    padding-top: 1.25rem;
  }

  .panel-card .card-content {
    padding: 1.25rem;
  }

  .brand {
    margin-bottom: 1.25rem;
  }

  .brand img {
    height: 36px;
  }

  .page-header {
    flex-direction: column;
  }

  .badge-muted {
    align-self: flex-start;
  }

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

  .buttons.is-inline-mobile {
    flex-direction: column;
    align-items: stretch;
  }

  .buttons.is-inline-mobile .button {
    width: 100%;
  }

  .button-offset-mobile {
    margin-top: 0.75rem;
    margin-left: 0;
  }
}
