:root {
  --bg: #fff6f9;
  --card: #ffffff;
  --text: #172033;
  --muted: #657186;
  --line: #ead7df;

  --primary: #d61f5c;
  --primary-dark: #b71a4d;
  --primary-soft: #fde7ef;

  --danger: #b42318;
  --success: #087443;

  --radius: 24px;
  --shadow: 0 20px 60px rgba(214, 31, 92, .12);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(214,31,92,.18), transparent 34rem),
    radial-gradient(circle at bottom right, rgba(214,31,92,.08), transparent 30rem),
    linear-gradient(180deg, #fffafc 0%, var(--bg) 100%);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

/* ===== LOGIN ===== */

.login-shell {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(460px, 100%);
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 32px;
  padding: 34px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.brand-logo {
  width: 220px;
  max-width: 100%;
  height: auto;
  display: block;
  margin-bottom: 24px;
}

.login-card h1 {
  margin: 0;
  letter-spacing: -.04em;
}

.login-card p {
  color: var(--muted);
  line-height: 1.5;
}

.login-form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

/* ===== HEADER ===== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 18px clamp(18px, 4vw, 48px);
  background: rgba(255,246,249,.90);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.top-logo {
  height: 44px;
  width: auto;
  display: block;
}

.topbar h1 {
  margin: 0;
  letter-spacing: -.04em;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ===== LAYOUT ===== */

.app-shell {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 30px clamp(14px, 4vw, 48px) 80px;
}

.survey-form {
  display: grid;
  gap: 22px;
}

.card,
.room-card {
  background: rgba(255,255,255,.94);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 12px 36px rgba(214,31,92,.07);
}

.card {
  padding: clamp(18px, 3vw, 30px);
}

.section-head,
.room-title,
.submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-head {
  margin-bottom: 22px;
}

.card h2 {
  margin: 0;
  letter-spacing: -.04em;
}

/* ===== TYPO ===== */

h1,
h2,
h3 {
  color: var(--text);
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 900;
}

.hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

/* ===== GRID / FORMS ===== */

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 8px;
  color: #2f3b4f;
  font-weight: 750;
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 14px 15px;
  color: var(--text);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

textarea {
  resize: vertical;
  min-height: 82px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(214,31,92,.15);
}

/* ===== BUTTONS / LINKS ===== */

button,
.admin-link,
.admin-open {
  border-radius: 14px;
  padding: 10px 14px;
  font-weight: 850;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button.primary,
.login-form button {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 18px 40px rgba(214,31,92,.35);
  transition: transform .2s ease, box-shadow .2s ease;
}

button.primary:hover,
.login-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 50px rgba(214,31,92,.45);
}

button.primary:disabled,
.login-form button:disabled {
  opacity: .65;
  cursor: not-allowed;
  transform: none;
}

button.secondary,
.admin-link {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border: 1px solid rgba(214,31,92,.20);
}

button.ghost {
  background: transparent;
  color: var(--danger);
  padding-inline: 10px;
}

.admin-open {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(214,31,92,.25);
}

/* ===== STATUS ===== */

.status-pill {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border: 1px solid rgba(214,31,92,.20);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 850;
  white-space: nowrap;
}

.alert,
.form-status {
  border-radius: 16px;
  padding: 13px 15px;
  font-weight: 750;
}

.alert.error,
.form-status.error {
  color: var(--danger);
  background: #fff1f0;
  border: 1px solid #ffd1cc;
}

.form-status {
  min-height: 48px;
  display: grid;
  align-items: center;
}

.form-status.ok {
  color: var(--success);
  background: #ecfdf3;
  border: 1px solid #b7f7d4;
}

/* ===== ROOMS ===== */

.room-card {
  padding: 20px;
  margin-bottom: 16px;
}

.room-title {
  margin-bottom: 16px;
}

.room-title h3 {
  margin: 0;
  font-size: 20px;
}

.room-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.room-metrics span {
  background: #fff6f9;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--muted);
}

.room-metrics strong {
  color: var(--text);
}

/* ===== ADMIN LEGACY TABLE FALLBACK ===== */

.admin-table-wrap {
  margin-top: 20px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 10px 30px rgba(214,31,92,.08);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  background: #fff6f9;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: .15em;
  color: var(--muted);
  padding: 14px;
  text-align: left;
}

.admin-table td {
  padding: 16px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.admin-table tr:hover {
  background: #fff8fb;
}

.admin-table td:nth-child(5),
.admin-table td:nth-child(6),
.admin-table th:nth-child(5),
.admin-table th:nth-child(6) {
  text-align: center;
  font-weight: 800;
}

.admin-table td strong {
  font-weight: 900;
}

/* ===== ADMIN ROW LIST FALLBACK ===== */

.admin-list {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 34px rgba(214,31,92,.07);
}

.admin-row {
  display: grid;
  grid-template-columns: 160px 1.6fr 1fr 1fr 70px 70px 100px;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.admin-row:last-child {
  border-bottom: 0;
}

.admin-row:not(.admin-row-head):hover {
  background: #fff8fb;
}

.admin-row-head {
  background: #fff6f9;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.admin-date {
  color: var(--muted);
  white-space: nowrap;
}

.admin-customer {
  display: grid;
  gap: 3px;
}

.admin-customer strong {
  font-weight: 900;
  color: var(--text);
}

.admin-customer span {
  color: var(--muted);
  font-size: 12px;
}

.admin-count {
  text-align: center;
  font-weight: 900;
}

.admin-action {
  display: flex;
  justify-content: flex-end;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 900px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .admin-link {
    width: 100%;
  }

  .admin-table {
    font-size: 13px;
  }

  .admin-row,
  .admin-row-head {
    grid-template-columns: 1fr;
  }

  .admin-row-head {
    display: none;
  }

  .admin-action {
    justify-content: flex-start;
  }
}

/* ===== HERO AUTOCOMPLETE ===== */

.hero-search-wrap {
  position: relative;
}

.hero-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 50;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(214, 31, 92, .16);
  overflow: hidden;
}

.hero-suggestion {
  width: 100%;
  border: 0;
  background: #fff;
  padding: 14px 16px;
  text-align: left;
  display: grid;
  gap: 4px;
  cursor: pointer;
}

.hero-suggestion:hover {
  background: #fff6f9;
}

.hero-suggestion strong {
  font-weight: 900;
  color: var(--text);
}

.hero-suggestion span {
  color: var(--muted);
  font-size: 13px;
}

.hero-suggestion small {
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 820px) {
  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }

  .section-head,
  .submit-row {
    align-items: stretch;
    flex-direction: column;
  }

  button {
    width: 100%;
  }

  .brand-logo {
    width: 190px;
  }

  .top-logo {
    height: 38px;
  }
}
.photo-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.photo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff8fb;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 800;
}

.photo-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-remove {
  border: 0;
  border-radius: 999px;
  background: #fff1f0;
  color: #b42318;
  padding: 8px 10px;
  font-weight: 900;
  cursor: pointer;
}