:root {
  --ink: #18231f;
  --muted: #68736e;
  --line: #d9ded7;
  --paper: #fffdf8;
  --bg: #f6f4ee;
  --brand: #20352d;
  --brand-2: #d1a451;
  --danger: #b63d3d;
  --ok: #227553;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.topbar {
  align-items: center;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: max(16px, env(safe-area-inset-top)) 20px 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(24px, 4vw, 34px);
  letter-spacing: 0;
}

h2 {
  font-size: 17px;
}

.eyebrow {
  color: var(--brand-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 390px;
  padding: 18px;
}

.calendar-section,
.panel,
.login-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(24, 35, 31, 0.06);
}

.calendar-section {
  min-width: 0;
  padding: 14px;
}

.side-panel {
  display: grid;
  gap: 14px;
}

.panel {
  padding: 16px;
}

.panel.compact {
  padding: 14px;
}

.panel-title {
  align-items: baseline;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.panel-title span,
.small {
  color: var(--muted);
  font-size: 13px;
}

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

label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
}

input,
textarea {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  min-height: 42px;
  padding: 10px 11px;
  width: 100%;
}

textarea {
  resize: vertical;
}

.two-col {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.check-row {
  align-items: center;
  display: flex;
  gap: 8px;
}

.check-row input {
  min-height: auto;
  width: auto;
}

button {
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
  min-height: 40px;
  padding: 10px 13px;
}

.primary {
  background: var(--brand);
  color: #fff;
}

.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}

.icon-danger {
  background: #fff3f2;
  color: var(--danger);
  min-height: 32px;
  padding: 7px 9px;
}

.notice {
  background: #fff6dd;
  border: 1px solid #e7c46b;
  border-radius: 6px;
  color: #664b00;
  margin-bottom: 12px;
  padding: 10px 12px;
}

.notice.error {
  background: #fff0f0;
  border-color: #e5a3a3;
  color: #7a2020;
}

.feed-url {
  font-size: 13px;
  margin-bottom: 9px;
}

.feed-source {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 7px;
  padding-top: 10px;
}

.poll-form {
  margin-top: 10px;
}

.booking-list,
.log-list {
  display: grid;
  gap: 10px;
}

.booking-row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding-top: 10px;
}

.booking-row strong,
.booking-row span {
  display: block;
}

.booking-row span {
  color: var(--muted);
  font-size: 13px;
}

.source {
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  padding: 5px 8px;
  text-transform: uppercase;
}

.source.airbnb {
  background: #e85d8f;
}

.source.agoda {
  background: #d64545;
}

.source.traveloka {
  background: #286eea;
}

.source.tiket {
  background: #159b65;
}

.source.whatsapp,
.source.manual {
  background: #74777f;
}

.log-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(0, 1fr);
}

.dot {
  border-radius: 50%;
  display: inline-block;
  height: 9px;
  width: 9px;
}

.dot.success {
  background: var(--ok);
}

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

.dot.pending {
  background: var(--brand-2);
}

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

.login-panel {
  max-width: 420px;
  padding: 24px;
  width: 100%;
}

.login-panel h1 {
  margin-bottom: 18px;
}

.fc {
  --fc-border-color: var(--line);
  --fc-button-bg-color: var(--brand);
  --fc-button-border-color: var(--brand);
  --fc-button-active-bg-color: #14241d;
  --fc-button-active-border-color: #14241d;
  --fc-today-bg-color: rgba(209, 164, 81, 0.15);
}

.fc .fc-toolbar-title {
  font-size: 22px;
}

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

@media (max-width: 640px) {
  .layout {
    gap: 12px;
    padding: 10px;
  }

  .topbar {
    padding-left: 14px;
    padding-right: 14px;
  }

  .calendar-section,
  .panel {
    border-radius: 8px;
  }

  .two-col,
  .booking-row {
    grid-template-columns: 1fr;
  }

  .fc .fc-toolbar {
    align-items: stretch;
    display: grid;
    gap: 8px;
  }

  .fc .fc-toolbar-title {
    font-size: 18px;
  }
}
