* { box-sizing: border-box; }

#view-login, #view-admin-notice, #view-app { width: 100%; }

body {
  margin: 0;
  background: #0f0d14;
  color: #eee;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px;
}

@media (min-width: 900px) {
  .container { max-width: 900px; }
}

@media (min-width: 1200px) {
  .container { max-width: 1080px; }
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid #2a2635;
}
.header .title { color: #c9b6ff; font-weight: 700; font-size: 15px; flex-shrink: 0; }
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.header .email { color: #9a93ab; font-size: 12px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header button.link { color: #9a93ab; font-size: 13px; }

.tabs { display: flex; justify-content: center; gap: 10px; padding: 10px 16px 0; }
.event-tabs { padding-left: 0; padding-right: 0; }
.tab {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #2a2635;
  background: transparent;
  color: #eee;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.tab.active { background: #7c4dff; border-color: #7c4dff; }

.hidden { display: none !important; }

h2.heading { color: #eee; font-size: 16px; font-weight: 700; margin: 20px 0 10px; }
.heading-row { display: flex; align-items: center; justify-content: space-between; }

.events-context {
  background: #211b2d;
  border: 1px solid #40335a;
  border-radius: 10px;
  padding: 14px;
  margin-top: 4px;
  color: #d8d0e8;
  font-size: 13px;
  line-height: 1.5;
}
.events-context-title { color: #c9b6ff; font-weight: 700; margin-bottom: 6px; }
.events-context p { margin: 0; }
.events-context p + p { margin-top: 8px; }

label.field-label { display: block; color: #9a93ab; font-size: 12px; margin: 10px 0 4px; }

input[type="text"], input[type="email"], input[type="date"], input[type="time"], textarea, select {
  width: 100%;
  background: #17141f;
  border: 1px solid #2a2635;
  border-radius: 8px;
  padding: 10px;
  color: #eee;
  font-size: 14px;
}
textarea { min-height: 80px; resize: vertical; }

.row { display: flex; gap: 10px; margin-top: 10px; }
.row-item { flex: 1; }

.day-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.day-label { display: flex; align-items: center; gap: 4px; color: #eee; font-size: 13px; }
.day-row.disabled .day-label { color: #686272; }
.day-row.disabled input { opacity: 0.55; }
.repeat-hint { margin-top: 6px; }

button {
  font-family: inherit;
  border: none;
  cursor: pointer;
}
button.primary {
  flex: 1;
  background: #7c4dff;
  color: #fff;
  border-radius: 8px;
  padding: 12px;
  font-weight: 700;
  font-size: 14px;
}
button.secondary {
  flex: 1;
  background: #2a2635;
  color: #fff;
  border-radius: 8px;
  padding: 12px;
  font-weight: 700;
  font-size: 14px;
}
button.add-button {
  background: #7c4dff;
  color: #fff;
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 14px;
}
button.link, span.link {
  background: none;
  color: #c9b6ff;
  font-size: 13px;
  padding: 0;
  margin-top: 10px;
  margin-right: 16px;
}
span.link { display: inline-block; }
button:disabled { opacity: 0.6; cursor: default; }

.muted { color: #9a93ab; font-size: 13px; margin-top: 4px; }
.error { color: #ff6b6b; margin-top: 10px; font-size: 13px; }

.venue-row {
  padding: 8px 0;
  border-bottom: 1px solid #2a2635;
  cursor: pointer;
  background: none;
  width: 100%;
  text-align: left;
  color: #eee;
}
.venue-request-button { margin-top: 8px; }
.venue-modal-overlay { position: fixed; inset: 0; z-index: 10; background: rgba(0, 0, 0, 0.7); display: flex; align-items: center; justify-content: center; padding: 16px; }
.venue-modal { width: min(100%, 520px); max-height: 85vh; overflow: auto; background: #17141f; border: 1px solid #40335a; border-radius: 10px; padding: 16px; }
.venue-modal .heading { margin-top: 0; }
.venue-row-text { color: #eee; font-size: 14px; }

.card {
  background: #17141f;
  border: 1px solid #2a2635;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
}
.card-header-row { display: flex; align-items: center; justify-content: space-between; }
.card-title { color: #eee; font-weight: 700; font-size: 15px; }

.status-pill {
  padding: 2px 8px;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  text-transform: uppercase;
}
.status-button { font-family: inherit; cursor: pointer; }
.status-button:hover { filter: brightness(1.15); }
.status-new { background: #555; }
.status-submitted, .status-pending { background: #a67c00; }
.status-approved { background: #1a7f37; }
.status-rejected { background: #a11; }
.status-revoked { background: #555; }

.editors-panel { margin-top: 10px; border-top: 1px solid #2a2635; padding-top: 10px; }
.editors-heading { color: #9a93ab; font-size: 12px; margin-bottom: 6px; }
.editor-row { display: flex; align-items: center; justify-content: space-between; padding: 4px 0; }
.editor-email { color: #eee; flex: 1; margin-right: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.add-row { display: flex; gap: 8px; margin-top: 8px; }
.add-row input { flex: 1; }

.login-box { max-width: 320px; margin: 4rem auto; padding: 20px; }
.login-box h2 { text-align: center; color: #c9b6ff; margin-top: 0; }
.login-box form { display: flex; flex-direction: column; gap: 10px; }
.login-tip { color: #9a93ab; font-size: 12px; line-height: 1.4; margin: -2px 0 0; }

.notice { text-align: center; padding: 40px 20px; color: #9a93ab; }
