*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand: #1447e6;
  --brand-dark: #0f35b0;
  --green: #15803d;
  --green-bg: #dcfce7;
  --red: #dc2626;
  --red-bg: #fee2e2;
  --yellow-bg: #fef9c3;
  --yellow-text: #854d0e;
  --text-1: #0f172a;
  --text-2: #334155;
  --text-3: #64748b;
  --surface: #ffffff;
  --bg: #f8fafc;
  --border: #e2e8f0;
  --radius: 16px;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg);
  color: var(--text-1);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Card ─────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,.07), 0 10px 32px -4px rgba(0,0,0,.08);
  max-width: 520px;
  margin: 80px auto;
  padding: 40px;
}

.card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-top-row .logo { margin-bottom: 0; }

/* ── Logo ─────────────────────────────────────────── */
.logo {
  display: block;
  height: 40px;
  width: auto;
  margin-bottom: 24px;
}

/* ── Heading ──────────────────────────────────────── */
.card h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 4px;
  margin-top: 20px;
}

.greeting {
  font-size: 0.9375rem;
  color: var(--text-2);
  margin-bottom: 20px;
}

/* ── Login form ───────────────────────────────────── */
.input-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-3);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.input {
  display: block;
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--text-1);
  background: var(--bg);
  outline: none;
  margin-bottom: 16px;
  text-transform: uppercase;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(20, 71, 230, .12);
}
.input::placeholder {
  color: var(--text-3);
  font-weight: 400;
  letter-spacing: .05em;
  text-transform: none;
}
.input:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.login-error {
  background: var(--red-bg);
  color: var(--red);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
}

/* ── Reference badge ──────────────────────────────── */
.ref-badge {
  display: inline-block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: monospace;
  color: var(--text-3);
  letter-spacing: .08em;
  margin-bottom: 12px;
}

/* ── Logout button ────────────────────────────────── */
.btn-logout {
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text-3);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, border-color .15s;
}
.btn-logout:hover {
  background: var(--bg);
  border-color: var(--text-3);
}

/* ── Status badge ─────────────────────────────────── */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: capitalize;
  margin-bottom: 24px;
}
.status-badge.pending   { background: var(--yellow-bg); color: var(--yellow-text); }
.status-badge.confirmed { background: var(--green-bg);  color: var(--green); }
.status-badge.declined  { background: var(--red-bg);    color: var(--red); }
.status-badge.completed { background: var(--green-bg);  color: var(--green); }

/* ── Booking detail rows ──────────────────────────── */
.booking-details { border-top: 1px solid var(--border); margin-bottom: 24px; }

.booking-detail {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
}
.booking-detail .label { color: var(--text-3); font-weight: 500; flex-shrink: 0; min-width: 80px; }
.booking-detail .value { color: var(--text-1); font-weight: 500; text-align: right; }

/* ── Notes block ──────────────────────────────────── */
.notes-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 24px;
  white-space: pre-wrap;
}
.notes-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-3);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ── Buttons ──────────────────────────────────────── */
.btn {
  display: block;
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s;
  text-align: center;
  line-height: 48px;
  padding: 0 20px;
}
.btn:disabled { opacity: .6; cursor: not-allowed; }

.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover:not(:disabled) {
  background: var(--brand-dark);
  box-shadow: 0 4px 12px rgba(20,71,230,.35);
  transform: translateY(-1px);
}

.btn-confirm {
  background: var(--green);
  color: #fff;
  margin-bottom: 10px;
}
.btn-confirm:hover:not(:disabled) {
  background: #12702f;
  box-shadow: 0 4px 12px rgba(21,128,61,.35);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text-2);
  border: 1.5px solid var(--border);
  margin-top: 8px;
}
.btn-outline:hover:not(:disabled) { border-color: var(--text-3); background: var(--bg); }

/* ── Messages ─────────────────────────────────────── */
.message {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 0 8px;
  gap: 12px;
}
.message .icon { font-size: 2.5rem; line-height: 1; }
.message .msg-title { font-size: 1rem; font-weight: 600; }
.message .msg-body  { font-size: .9rem; color: var(--text-2); line-height: 1.6; max-width: 340px; }
.message.success .msg-title { color: var(--green); }
.message.error   .msg-title { color: var(--red); }

/* ── Bookings list ───────────────────────────────────── */
.bookings-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.booking-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

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

.booking-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-1);
}

.booking-card .booking-details {
  margin-bottom: 12px;
}

.booking-card .btn-confirm {
  margin-top: 8px;
  margin-bottom: 0;
}

.booking-card .status-badge {
  margin-bottom: 0;
}

/* ── Spinner ──────────────────────────────────────── */
.spinner {
  width: 36px; height: 36px;
  border: 3.5px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 600px) {
  .card { margin: 16px; padding: 24px; }
}
