* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, sans-serif;
  background: #f6f9fc;
  color: #0f172a;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  width: min(48rem, 100%);
  flex: 1;
}

main.admin {
  max-width: 40rem;
}

header {
  text-align: center;
  padding-bottom: 1.5rem;
}

h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 8vw, 2.8rem);
}

h2 {
  margin-top: 0;
}

.card {
  background: #ffffff;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  margin-bottom: 1.5rem;
}

button {
  appearance: none;
  border: none;
  background: #1e88e5;
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 180ms ease;
}

button:hover {
  filter: brightness(1.08);
}

button.secondary {
  background: transparent;
  border: 2px solid #1e88e5;
  color: #1e88e5;
}

button.secondary:hover {
  filter: none;
  background: rgba(30, 136, 229, 0.08);
}

button:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.link {
  display: inline-block;
  margin-top: 1rem;
  color: #1e88e5;
  text-decoration: none;
  font-weight: 600;
}

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

.label-inline {
  display: block;
  margin: 1rem 0 0.4rem;
  font-weight: 600;
  color: #0f172a;
  text-align: left;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.75rem;
  border: 1px solid #cbd5f5;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  width: 100%;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #1e88e5;
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.15);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.admin form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.admin label {
  font-weight: 600;
  color: #0f172a;
  text-align: left;
}

.admin textarea {
  min-height: 7rem;
}

.event-list {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.event-item {
  border: 1px solid #dbe7fb;
  border-radius: 0.85rem;
  padding: 1rem;
  background: #f8fbff;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.event-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.event-item h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #0f172a;
}

.event-meta {
  font-size: 0.9rem;
  color: #475569;
}

.event-actions {
  margin-top: 0.6rem;
  display: flex;
  gap: 0.6rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(30, 136, 229, 0.12);
  color: #1e88e5;
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.badge.warning {
  background: rgba(251, 191, 36, 0.18);
  color: #b45309;
}

.badge.urgent {
  background: rgba(220, 38, 38, 0.18);
  color: #991b1b;
}

.recipient-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.recipient-row select {
  flex: 1 1 16rem;
}

.hint {
  display: block;
  color: #64748b;
  font-size: 0.85rem;
}

.status {
  color: #475569;
  font-size: 0.95rem;
}

.status.error {
  color: #dc2626;
}

.status.success {
  color: #15803d;
}

footer {
  text-align: center;
  padding: 1.5rem;
  color: #64748b;
}
