:root {
  --bg: #f4f1ea;
  --panel: #fffdf9;
  --ink: #182126;
  --muted: #5b6770;
  --line: #dfd8cb;
  --accent: #264653;
  --accent-2: #e9c46a;
  --danger: #b85042;
  --shadow: 0 18px 50px rgba(24, 33, 38, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(233, 196, 106, 0.18), transparent 30%),
    linear-gradient(180deg, #f9f5ee, var(--bg));
}

button,
input,
select,
textarea {
  font: inherit;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-shell,
.app-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.login-panel,
.panel {
  background: var(--panel);
  border: 1px solid rgba(24, 33, 38, 0.08);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.login-panel {
  max-width: 440px;
  padding: 36px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0 18px;
}

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

.page-nav {
  display: flex;
  gap: 8px;
}

.nav-link {
  text-decoration: none;
}

.nav-link.active {
  background: var(--accent);
  color: #fff;
}

.layout {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 18px;
  padding-bottom: 24px;
}

.admin-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding-bottom: 24px;
}

.sidebar,
.calendar-panel {
  min-width: 0;
}

.panel {
  padding: 20px;
}

.sidebar {
  display: grid;
  gap: 16px;
  align-content: start;
}

.calendar-panel {
  overflow: hidden;
}

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

h1,
h2 {
  margin: 0;
  font-weight: 600;
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h2 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.intro,
.muted,
.seed-note,
.user-chip span,
.legend span {
  color: var(--muted);
}

.stack {
  display: grid;
  gap: 14px;
}

.inset-form {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(38, 70, 83, 0.03);
  margin-bottom: 14px;
}

label {
  display: grid;
  gap: 8px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ghost-button {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(38, 70, 83, 0.25);
}

.danger {
  background: var(--danger);
}

.alert {
  border-radius: 14px;
  padding: 12px 14px;
}

.error {
  background: rgba(184, 80, 66, 0.12);
  color: #7d2d21;
}

.seed-note {
  margin-top: 18px;
  font-size: 0.95rem;
}

.user-chip {
  display: grid;
  gap: 4px;
  padding: 10px 14px;
  border-radius: 18px;
  background: rgba(38, 70, 83, 0.08);
}

.legend {
  display: grid;
  gap: 10px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(38, 70, 83, 0.1);
  color: var(--accent);
}

.swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: middle;
}

.approved {
  background: #2a9d8f;
}

.pending {
  background: #f4a261;
}

.rejected {
  background: #9aa0a6;
}

.approval-actions {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.car-row {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(38, 70, 83, 0.03);
}

.user-row {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(233, 196, 106, 0.08);
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pending-item,
.link-button {
  display: grid;
  gap: 4px;
  width: 100%;
  text-align: left;
  text-decoration: none;
}

.pending-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
}

.pending-item strong {
  color: var(--ink);
}

.link-button {
  margin-top: 16px;
  align-items: center;
  justify-content: center;
}

#calendar {
  min-height: 720px;
}

.fc .fc-toolbar-title {
  font-family: Georgia, "Times New Roman", serif;
}

.fc .fc-button {
  background: var(--accent);
  border-color: var(--accent);
}

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
  background: #193542;
  border-color: #193542;
}

@media (max-width: 980px) {
  .topbar,
  .layout,
  .admin-layout {
    grid-template-columns: 1fr;
    display: grid;
  }

  .topbar-actions {
    justify-content: start;
    flex-wrap: wrap;
  }

  #calendar {
    min-height: 560px;
  }
}
