:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --text: #0f1724;
  --muted: #6b7280;
  --accent: #ff5a5f;
  --accent-2: #007a87;
  --border: #e6eef3;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hidden {
  display: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  display: block;
  height: 96px;
  width: auto;
  object-fit: contain;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: none;
  background: white;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  /* Unlike Booking's copy of this class (used over dark hero images), CMS
     has no dark backgrounds anywhere, so this stays readable on --surface. */
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

/* CMS shell */

.cms-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.cms-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cms-user-email {
  color: var(--muted);
  font-size: 0.9rem;
}

.cms-login-card {
  max-width: 420px;
  margin: 3rem auto;
}

.cms-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0 1.5rem;
}

.cms-tab {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.cms-tab.active {
  background: var(--text);
  color: var(--surface);
  border-color: var(--text);
}

.cms-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2rem 0 1rem;
}

.cms-property-list {
  display: grid;
  gap: 0.75rem;
}

.cms-property-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
}

.cms-property-id {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0.25rem 0 0;
}

.cms-role-badges {
  display: inline-flex;
  gap: 0.35rem;
  margin-left: 0.6rem;
}

.status-badge,
.role-badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: capitalize;
}

.status-badge {
  margin-left: 0.6rem;
}

.status-badge.active {
  background: rgba(0, 122, 135, 0.12);
  color: var(--accent-2);
}

.status-badge.draft {
  background: rgba(107, 114, 128, 0.15);
  color: var(--muted);
}

.role-badge {
  background: rgba(15, 23, 42, 0.06);
  color: var(--muted);
}

/* Forms (shared by the login and property-edit views) */

.form-grid {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 1.25rem;
}

.form-field {
  display: grid;
  gap: 0.35rem;
}

.form-field label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--muted);
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
textarea,
select {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  color: var(--text);
  background: var(--surface);
}

textarea {
  min-height: 6rem;
  resize: vertical;
}

.form-fieldset {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}

.form-fieldset legend {
  font-weight: 700;
  padding: 0 0.4rem;
}

.form-subgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.form-error {
  color: var(--accent);
  font-weight: 600;
}

.form-note {
  color: var(--muted);
  font-size: 0.9rem;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

/* Repeatable-row list editor (highlights/features/images/testimonials) */

.list-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.list-row input {
  flex: 1;
}

.list-row-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.list-row-remove {
  border: none;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.25rem 0.5rem;
}

.list-row-add {
  margin-top: 0.25rem;
}
