@font-face {
  font-family: "Google Sans";
  src: url("/assets/GoogleSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Google Sans";
  src: url("/assets/GoogleSans-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Google Sans";
  src: url("/assets/GoogleSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --page: #f4f5f7;
  --ink: #f9fafb;
  --muted: #c8c7cb;
  --muted-dark: #8c8e95;
  --card-border: #a7a7ad;
  --star: #fbbc04;
  --link: #1685ff;
  --blue: #1a73e8;
  --green: #34a853;
  --warning: #fbbc04;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: #1f2933;
  font-family: "Google Sans", Arial, sans-serif;
}

.admin-body {
  min-height: 100vh;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #151719;
  color: #ffffff;
}

.login-panel {
  width: min(440px, 100%);
  padding: 30px;
  border: 1px solid #3e444d;
  border-radius: 8px;
  background: #202327;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

.login-panel h1 {
  margin-bottom: 10px;
  font-size: 2.1rem;
}

.login-copy {
  color: #c8c7cb;
  line-height: 1.45;
}

.login-error {
  padding: 10px 12px;
  border: 1px solid rgba(251, 188, 4, 0.55);
  border-radius: 6px;
  background: rgba(251, 188, 4, 0.12);
  color: #ffe08a;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form label,
.field {
  display: grid;
  gap: 7px;
  color: #334155;
  font-size: 0.92rem;
  font-weight: 700;
}

.login-form label {
  color: #ffffff;
}

.login-form input,
.field input,
.field textarea,
.embed-panel textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #111827;
  font: inherit;
}

.login-form input,
.field input {
  min-height: 42px;
  padding: 0 12px;
}

.field textarea {
  min-height: 118px;
  padding: 12px;
  resize: vertical;
}

.shell {
  width: min(1920px, 100vw);
  margin: 0 auto;
  padding: 28px 0 56px;
}

.topbar,
.status-strip,
.store-panel,
.compact-widget-stage,
.review-manager {
  width: min(1180px, calc(100vw - 32px));
  margin-left: auto;
  margin-right: auto;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 4vw, 3.3rem);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.button {
  min-height: 42px;
  border: 1px solid var(--blue);
  border-radius: 6px;
  padding: 0 16px;
  background: var(--blue);
  color: white;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button.secondary {
  display: inline-flex;
  align-items: center;
  background: white;
  color: var(--blue);
}

.button.ghost {
  display: inline-flex;
  align-items: center;
  border-color: #cbd5e1;
  background: transparent;
  color: #334155;
}

.status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 50px;
  padding: 12px 16px;
  margin-bottom: 18px;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  background: #ffffff;
  color: #65758b;
  font-size: 0.94rem;
}

.status-strip > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #9aa4b2;
}

.status-dot.live {
  background: var(--green);
}

.status-dot.warning {
  background: var(--warning);
}

.widget-surface-preview {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 18px 0 0;
  background: #231f20;
}

.store-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 96px;
  padding: 16px 18px;
  margin-bottom: 18px;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  background: #ffffff;
}

.store-panel h2 {
  margin-bottom: 5px;
}

.store-panel p:not(.eyebrow) {
  margin: 0;
  color: #65758b;
}

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.store-button {
  min-height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0 14px;
  background: #ffffff;
  color: #334155;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.store-button.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
}

.control-grid {
  display: grid;
  grid-template-columns: minmax(280px, 410px) minmax(0, 1fr);
  gap: 16px;
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto 18px;
}

.control-panel {
  padding: 16px 18px;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  background: #ffffff;
}

.control-panel header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  padding: 3px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #f1f5f9;
}

.segment {
  min-height: 38px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #475569;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.segment.active {
  background: #ffffff;
  color: var(--blue);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin: 14px 0;
}

.toggle-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  color: #334155;
  font-size: 0.92rem;
  font-weight: 700;
}

.toggle-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.embed-panel textarea {
  min-height: 108px;
  resize: vertical;
  padding: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.86rem;
  line-height: 1.45;
}

.appointment-settings-panel {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto 18px;
  padding: 16px 18px;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  background: #ffffff;
}

.appointment-settings-panel > header,
.appointment-embed-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.appointment-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 16px;
}

.appointment-hours-card,
.appointment-closures-card,
.appointment-embed-card {
  display: grid;
  gap: 14px;
}

.hours-table {
  display: grid;
  gap: 8px;
}

.hours-row {
  display: grid;
  grid-template-columns: 120px 92px minmax(110px, 1fr) minmax(110px, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #d7dee8;
  border-radius: 7px;
  background: #f8fafc;
}

.hours-day {
  color: #334155;
  font-weight: 700;
}

.hours-row input[type="time"] {
  width: 100%;
  min-height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 8px;
  color: #111827;
  font: inherit;
}

.appointment-embed-card {
  margin-top: 4px;
}

.appointment-embed-card textarea {
  min-height: 92px;
  resize: vertical;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.86rem;
  line-height: 1.45;
}

.hint {
  margin: 10px 0 0;
  color: #65758b;
  font-size: 0.9rem;
}

.compact-widget-stage {
  display: flex;
  margin-bottom: 18px;
}

.compact-google-widget {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 661px;
  min-height: 84px;
  padding: 17px 20px;
  overflow: visible;
  background: transparent;
  color: #ffffff;
  font-family: "Google Sans", Arial, sans-serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.compact-google-widget strong,
.compact-google-widget span {
  color: #ffffff;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0;
}

.compact-google-widget b {
  font-weight: 700;
}

.compact-stars {
  width: 247px;
  height: 43px;
  flex: 0 0 247px;
}

.compact-google-icon {
  width: 49px;
  height: 43px;
  margin-left: auto;
  padding: 7px;
  border: 1px solid #d9d9d9;
  border-radius: 7px;
  background: #ffffff;
  object-fit: contain;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.google-reviews-widget {
  position: relative;
  display: grid;
  grid-template-columns: 276px 1fr;
  gap: 34px;
  align-items: center;
  width: 100%;
  margin-left: 0;
  min-height: 415px;
  padding: 50px 110px 26px 76px;
  overflow: visible;
  background: transparent;
  color: var(--ink);
}

.reviews-summary {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 275px;
}

.reviews-summary strong {
  display: block;
  margin-bottom: 14px;
  color: #ffffff;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: 0;
}

.reviews-summary p {
  margin: 9px 0 17px;
  color: #d7d5d7;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0;
}

.reviews-summary b {
  color: #ffffff;
  font-weight: 700;
}

.google-reviews-logo {
  width: 221px;
  height: auto;
  object-fit: contain;
}

.stars {
  --rating: 5;
  --star-size: 34px;
  --star-gap: 2px;
  position: relative;
  display: inline-block;
  width: calc((var(--star-size) * 5) + (var(--star-gap) * 8) + 10px);
  height: calc(var(--star-size) + 4px);
  overflow: visible;
  color: transparent;
  font-size: 0;
}

.stars::before,
.star-fill-layer::before {
  content: "★★★★★";
  position: absolute;
  inset: 0;
  font-size: var(--star-size);
  line-height: 1;
  letter-spacing: var(--star-gap);
  white-space: nowrap;
}

.stars::before {
  color: #b9bbc1;
}

.star-fill-layer {
  position: absolute;
  inset: 0;
  width: calc(var(--rating) * (var(--star-size) + var(--star-gap)));
  overflow: hidden;
}

.star-fill-layer::before {
  color: var(--star);
}

.summary-stars {
  --star-size: 46px;
  --star-gap: 4px;
  width: 278px;
  height: 52px;
}

.compact-stars {
  --star-size: 43px;
  --star-gap: 3px;
}

.reviews-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 480px;
  gap: 56px;
  overflow-x: auto;
  padding: 0;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.reviews-track::-webkit-scrollbar {
  display: none;
}

.review-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  min-height: 338px;
  padding: 25px 27px 28px;
  border: 2px solid var(--card-border);
  border-radius: 12px;
  background: transparent;
  color: #ffffff;
  scroll-snap-align: start;
}

.review-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.review-card .stars {
  --star-size: 39px;
  --star-gap: 2px;
  width: 232px;
  height: 44px;
}

.review-google-g {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex: 0 0 auto;
}

.review-date {
  display: block;
  margin: 10px 0 11px;
  color: var(--muted);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0;
}

.review-text {
  margin: 0;
  color: #ffffff;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.34;
  letter-spacing: 0;
}

.read-more {
  color: var(--link);
}

.reviewer-name {
  align-self: end;
  margin-top: 26px;
  color: var(--muted);
  font-size: 23px;
  font-weight: 500;
  line-height: 1.12;
}

.carousel-button {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid #4f555d;
  border-radius: 999px;
  background: #3f444a;
  color: #b8bec5;
  cursor: pointer;
}

.carousel-button span {
  transform: translateY(-1px);
  font-size: 52px;
  font-weight: 400;
  line-height: 0.6;
}

.carousel-button-left {
  left: 331px;
  top: 199px;
}

.carousel-button-right {
  right: 54px;
  top: 199px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 340px;
  border: 2px dashed #5f5a5d;
  border-radius: 12px;
  color: var(--muted);
  font-size: 20px;
  text-align: center;
  padding: 24px;
}

.review-manager {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  background: #ffffff;
}

.review-manager header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

#selectedCount {
  color: #65758b;
  font-size: 0.95rem;
}

.review-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.picker-card {
  display: grid;
  gap: 9px;
  min-height: 170px;
  padding: 14px;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  background: #fbfcff;
  color: #1f2933;
}

.picker-card label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  cursor: pointer;
}

.picker-card input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.picker-meta {
  color: #65758b;
  font-size: 0.88rem;
}

.picker-text {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #334155;
  font-size: 0.94rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

@media (max-width: 1160px) {
  .google-reviews-widget {
    grid-template-columns: 250px 1fr;
    gap: 24px;
    padding: 38px 72px 24px 42px;
  }

  .reviews-track {
    grid-auto-columns: minmax(340px, 430px);
    gap: 28px;
  }

  .carousel-button-left {
    left: 270px;
  }

  .carousel-button-right {
    right: 24px;
  }

  .review-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .shell {
    padding-top: 18px;
  }

  .topbar,
  .status-strip,
  .store-panel,
  .control-grid,
  .appointment-settings-panel,
  .compact-widget-stage,
  .review-manager {
    width: min(100vw - 24px, 680px);
  }

  .topbar,
  .status-strip,
  .store-panel,
  .review-manager header {
    align-items: stretch;
    flex-direction: column;
  }

  .actions {
    justify-content: flex-start;
  }

  .control-grid {
    grid-template-columns: 1fr;
  }

  .appointment-grid,
  .hours-row {
    grid-template-columns: 1fr;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .compact-google-widget {
    width: 100%;
    gap: 10px;
    min-height: 70px;
    padding: 14px;
    font-size: 20px;
  }

  .compact-google-widget strong,
  .compact-google-widget span {
    font-size: 20px;
  }

  .compact-stars {
    --star-size: 32px;
    --star-gap: 2px;
    width: 188px;
    height: 32px;
    flex-basis: 188px;
  }

  .compact-google-icon {
    width: 42px;
    height: 38px;
  }

  .google-reviews-widget {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 32px 18px 30px;
  }

  .reviews-summary {
    min-height: auto;
    align-items: flex-start;
    padding: 0 10px;
  }

  .reviews-track {
    grid-auto-columns: minmax(280px, 86vw);
    gap: 16px;
  }

  .review-card {
    min-height: 310px;
  }

  .review-card .stars {
    --star-size: 32px;
    --star-gap: 2px;
    width: 188px;
    height: 36px;
  }

  .review-google-g {
    width: 28px;
    height: 28px;
  }

  .review-text {
    font-size: 20px;
  }

  .carousel-button {
    display: none;
  }

  .review-picker {
    grid-template-columns: 1fr;
  }
}
