:root {
  --bg: #f3f4f6;
  --card-bg: #ffffff;
  --accent: #4f46e5;
  --accent-soft: #eef2ff;
  --accent-2: #ec4899;
  --text-main: #111827;
  --text-muted: #6b7280;
  --border-subtle: #e5e7eb;
  --radius-lg: 14px;
  --danger: #b91c1c;
  --success: #15803d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text-main);
}

/* Header (same style family as admin panel) */
.site-header {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  padding: 10px 20px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.main-nav {
  display: flex;
  gap: 16px;
  font-size: 14px;
}
.main-nav a {
  color: #e5e7eb;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}
.main-nav a:hover,
.main-nav a.active {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.page-main {
  max-width: 1100px;
  margin: 22px auto 40px;
  padding: 0 16px;
}

.hero {
  background: linear-gradient(135deg, var(--accent-soft), #fee2e2);
  border-radius: var(--radius-lg);
  padding: 22px 22px 18px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}
.hero-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}
.hero-text {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  max-width: 640px;
}
.hero-ref {
  font-size: 13px;
  margin-top: 4px;
  color: #4b5563;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 16px 16px 14px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
}

.booking-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.booking-hotel {
  font-size: 18px;
  font-weight: 600;
}
.booking-ref {
  font-size: 12px;
  color: var(--text-muted);
}

.status-pill {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: #ecfccb;
  color: #3f6212;
  white-space: nowrap;
  text-transform: uppercase;
}
.status-pill.pending {
  background: #fef3c7;
  color: #92400e;
}
.status-pill.cancelled {
  background: #fee2e2;
  color: #b91c1c;
}
.status-pill.confirmed {
  background: #dcfce7;
  color: #166534;
}
.status-pill.requested {
  background: #e0f2fe;
  color: #075985;
}

.booking-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 8px 0 12px;
  font-size: 13px;
}
.booking-grid strong {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.price-box {
  border-radius: 12px;
  border: 1px dashed var(--border-subtle);
  padding: 10px 12px;
  background: #f9fafb;
  font-size: 13px;
  margin-top: 2px;
}
.price-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3px;
}
.price-row span:last-child {
  font-weight: 500;
}
.price-row.total {
  margin-top: 4px;
  font-weight: 700;
}
.price-row.discount {
  color: #059669;
}
.price-note {
  margin-top: 5px;
  font-size: 11px;
  color: var(--text-muted);
}

.actions-row {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.btn-danger {
  border-radius: 999px;
  border: none;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  background: linear-gradient(135deg, #f97316, #dc2626);
  color: #fff;
  font-weight: 600;
}
.btn-secondary {
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  background: #fff;
  color: var(--text-main);
}
.btn-danger:disabled,
.btn-secondary:disabled {
  opacity: 0.6;
  cursor: default;
}

.msg {
  margin-top: 8px;
  font-size: 12px;
  min-height: 1.2em;
}
.msg.success {
  color: var(--success);
}
.msg.error {
  color: var(--danger);
}

.empty-state {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px dashed var(--border-subtle);
  background: #f9fafb;
  font-size: 13px;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 20px;
  }
}


/* ===== Manage Booking – lookup form styling ===== */

.lookup-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: flex-end;
  margin-bottom: 10px;
  font-size: 13px;
}

.lookup-field {
  flex: 1 1 220px;
  min-width: 0;
}

.lookup-field label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.lookup-field input {
  width: 100%;
  padding: 6px 9px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  font-size: 13px;
  background: #f9fafb;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    background-color 0.15s ease;
}

.lookup-field input:focus {
  border-color: var(--accent);
  background-color: #ffffff;
  box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.2);
}

.lookup-field .optional {
  font-weight: 400;
  color: #9ca3af;
}

.lookup-actions {
  flex: 0 0 auto;
}

/* Gradient primary button (matches home button style) */
.btn-primary {
  border-radius: 999px;
  border: none;
  padding: 8px 18px;
  font-size: 13px;
  cursor: pointer;
  background: linear-gradient(135deg, #4f46e5, #ec4899);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.4);
  transition: transform 0.1s ease, box-shadow 0.1s ease, opacity 0.1s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(79, 70, 229, 0.5);
  opacity: 0.98;
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.4);
}

/* Booking details panel shown after lookup */
.booking-details {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: #f9fafb;
  font-size: 13px;
  color: var(--text-main);
}

.booking-details p {
  margin: 0 0 4px;
}

.booking-details p:last-child {
  margin-bottom: 0;
}

/* Mobile layout */
@media (max-width: 640px) {
  .lookup-form {
    flex-direction: column;
    align-items: stretch;
  }

  .lookup-actions {
    width: 100%;
  }

  .btn-primary {
    width: 100%;
    justify-content: center;
  }
}
