:root {
  color-scheme: light;
  --bg: #f6efe4;
  --panel: rgba(255, 251, 245, 0.9);
  --ink: #13242e;
  --muted: #53626e;
  --accent: #d95d39;
  --accent-dark: #9f3418;
  --border: rgba(19, 36, 46, 0.12);
  --shadow: 0 24px 60px rgba(19, 36, 46, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Avenir Next', 'Segoe UI', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(
      circle at top left,
      rgba(217, 93, 57, 0.18),
      transparent 30%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(30, 144, 255, 0.18),
      transparent 26%
    ),
    linear-gradient(135deg, #f7eddc 0%, #efe9de 52%, #f8f5ef 100%);
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 40px auto;
}

.brand {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.brand__logo {
  width: min(150px, 45vw);
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 16px rgba(19, 36, 46, 0.18));
}

.panel {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--panel);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.panel--auth {
  max-width: 520px;
  margin: 72px auto;
}

.panel__header {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.panel__header--auth {
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  color: var(--accent);
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3.4rem);
  line-height: 0.95;
}

.panel__copy {
  margin: 12px 0 0;
  max-width: 720px;
  color: var(--muted);
  line-height: 1.5;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  cursor: pointer;
  transition:
    transform 160ms ease,
    opacity 160ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

.button--secondary {
  color: var(--ink);
  background: rgba(19, 36, 46, 0.1);
}

.button--success {
  background: linear-gradient(135deg, #1f7a4f, #0f5b3a);
}

.button--success:disabled {
  opacity: 0.85;
  cursor: not-allowed;
}

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

.logout-form {
  margin: 0;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-form__field {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 600;
}

.auth-form__field input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
}

.auth-form__field input:focus {
  outline: 2px solid rgba(217, 93, 57, 0.25);
  border-color: rgba(217, 93, 57, 0.35);
}

.auth-form__error {
  margin: 0;
  color: #b42318;
  font-weight: 700;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.legend__item {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--muted);
}

.legend__item i {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
}

.status {
  min-height: 24px;
  margin-bottom: 14px;
  color: var(--muted);
  font-weight: 600;
}

.status[data-error='true'] {
  color: #b42318;
}

#calendar {
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
}

.fc .fc-toolbar-title {
  font-size: clamp(1.35rem, 2vw, 1.8rem);
}

.fc .fc-button-primary {
  border: 0;
  background: #13242e;
}

.fc .fc-daygrid-day-number {
  color: var(--ink);
  font-weight: 700;
}

.fc .fc-bg-event {
  opacity: 0.4;
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 18px, 1120px);
    margin: 18px auto;
  }

  .brand {
    margin-bottom: 14px;
  }

  .panel {
    padding: 18px;
    border-radius: 20px;
  }

  .panel__header {
    flex-direction: column;
  }

  .actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  button {
    width: 100%;
  }
}
