* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f6f8fb;
  color: #172033;
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Header */

.business-header {
  height: 64px;
  background: #ffffff;
  border-bottom: 1px solid #e5e9f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
}

.brand strong {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #172033;
  color: #ffffff;
  font-size: 13px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-link {
  color: #445066;
}

.logout-btn {
  border: 0;
  background: transparent;
  cursor: pointer;
  color: #d33b3b;
}

/* Layout */

.business-layout {
  display: flex;
  min-height: calc(100vh - 64px);
}

.business-sidebar {
  width: 235px;
  background: #ffffff;
  border-right: 1px solid #e5e9f0;
  padding: 20px 12px;
}

.business-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.business-sidebar a {
  padding: 12px 14px;
  border-radius: 8px;
  color: #4c5870;
  font-size: 14px;
}

.business-sidebar a:hover {
  background: #f2f5f9;
}

.business-sidebar a.active {
  background: #edf3ff;
  color: #245bc4;
  font-weight: 600;
}

.business-main {
  flex: 1;
  min-width: 0;
  padding: 30px;
  max-width: 1500px;
}

/* Page Header */

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 25px;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  color: #7b8598;
  font-size: 13px;
  margin-bottom: 10px;
}

.breadcrumb a {
  color: #245bc4;
}

.page-header h1 {
  margin: 0 0 7px;
  font-size: 28px;
}

.page-header p {
  margin: 0;
  color: #6e788c;
}

.refresh-btn,
.primary-btn,
.secondary-btn {
  border: 0;
  border-radius: 8px;
  padding: 11px 17px;
  cursor: pointer;
  font-weight: 600;
}

.refresh-btn,
.secondary-btn {
  background: #ffffff;
  border: 1px solid #dfe4ec;
  color: #344054;
}

/* Alert */

.page-alert {
  padding: 13px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  background: #fff3cd;
  color: #745c00;
}

.hidden {
  display: none !important;
}

/* Summary */

.review-summary {
  display: grid;
  grid-template-columns: 230px 1fr 320px;
  gap: 18px;
  margin-bottom: 22px;
}

.rating-card,
.rating-breakdown,
.review-stats {
  background: #ffffff;
  border: 1px solid #e5e9f0;
  border-radius: 12px;
  padding: 24px;
}

.rating-card {
  text-align: center;
}

.rating-number {
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
}

.stars {
  margin: 12px 0 8px;
  color: #f5a623;
  font-size: 24px;
  letter-spacing: 2px;
}

.rating-label {
  color: #667085;
  font-size: 13px;
}

.review-count {
  margin-top: 8px;
  font-size: 14px;
  color: #475467;
}

.rating-row {
  display: grid;
  grid-template-columns: 42px 1fr 35px;
  align-items: center;
  gap: 10px;
  margin: 11px 0;
  font-size: 13px;
}

.rating-bar {
  height: 8px;
  background: #edf0f4;
  border-radius: 20px;
  overflow: hidden;
}

.rating-fill {
  height: 100%;
  width: 0;
  background: #f5a623;
  border-radius: 20px;
  transition: width .3s ease;
}

.review-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.stat-box {
  display: grid;
  grid-template-columns: 35px 1fr;
  column-gap: 10px;
  align-items: center;
  padding: 10px;
  background: #f8fafc;
  border-radius: 8px;
}

.stat-icon {
  grid-row: span 2;
  font-size: 20px;
}

.stat-box strong {
  font-size: 18px;
}

.stat-box small {
  color: #667085;
}

/* Reviews Panel */

.reviews-panel {
  background: #ffffff;
  border: 1px solid #e5e9f0;
  border-radius: 12px;
  overflow: hidden;
}

.panel-header {
  padding: 20px;
  border-bottom: 1px solid #e5e9f0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.panel-header h2 {
  margin: 0 0 5px;
  font-size: 19px;
}

.panel-header p {
  margin: 0;
  color: #778196;
  font-size: 13px;
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filters select {
  padding: 9px 12px;
  border: 1px solid #dce1e9;
  border-radius: 7px;
  background: #fff;
}

/* Review Card */

.reviews-list {
  padding: 0 20px;
}

.review-card {
  padding: 22px 0;
  border-bottom: 1px solid #edf0f4;
}

.review-top {
  display: flex;
  justify-content: space-between;
  gap: 15px;
}

.customer-info {
  display: flex;
  gap: 12px;
  align-items: center;
}

.customer-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #edf3ff;
  color: #245bc4;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.customer-name {
  font-weight: 600;
}

.review-date {
  color: #8992a3;
  font-size: 12px;
  margin-top: 4px;
}

.review-rating {
  color: #f5a623;
  white-space: nowrap;
}

.review-text {
  margin: 15px 0;
  color: #465268;
  line-height: 1.65;
}

.business-reply {
  background: #f7f9fc;
  border-left: 3px solid #245bc4;
  padding: 13px 15px;
  margin-top: 15px;
  border-radius: 0 8px 8px 0;
}

.business-reply strong {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
}

.business-reply p {
  margin: 0;
  color: #58657a;
  font-size: 14px;
  line-height: 1.5;
}

.review-actions {
  margin-top: 15px;
  display: flex;
  gap: 8px;
}

.reply-btn {
  border: 1px solid #cfd7e5;
  background: #ffffff;
  color: #245bc4;
  padding: 8px 13px;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 600;
}

.reply-btn:hover {
  background: #f1f5ff;
}

/* Loading / Empty */

.loading-state,
.empty-state {
  padding: 55px 20px;
  text-align: center;
  color: #727d90;
}

.empty-icon {
  font-size: 42px;
  margin-bottom: 10px;
}

.empty-state h3 {
  color: #263247;
  margin: 5px 0;
}

.empty-state p {
  margin: 0;
}

/* Pagination */

.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 20px;
}

.page-btn {
  min-width: 36px;
  height: 36px;
  border: 1px solid #dce2eb;
  background: #fff;
  border-radius: 7px;
  cursor: pointer;
}

.page-btn.active {
  background: #245bc4;
  color: #fff;
  border-color: #245bc4;
}

/* Modal */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .55);
}

.modal-box {
  position: relative;
  width: min(600px, calc(100% - 30px));
  margin: 8vh auto;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}

.modal-header,
.modal-footer {
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header {
  border-bottom: 1px solid #e7ebf1;
}

.modal-header h2 {
  margin: 0 0 5px;
}

.modal-header p {
  margin: 0;
  color: #778196;
  font-size: 13px;
}

.modal-close {
  border: 0;
  background: transparent;
  font-size: 25px;
  cursor: pointer;
}

.modal-body {
  padding: 20px;
}

.modal-body label {
  display: block;
  margin: 15px 0 8px;
  font-weight: 600;
}

.modal-body textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid #d9dfe8;
  border-radius: 8px;
  padding: 12px;
  font: inherit;
}

.character-count {
  text-align: right;
  color: #8a93a4;
  font-size: 12px;
  margin-top: 5px;
}

.modal-footer {
  border-top: 1px solid #e7ebf1;
  justify-content: flex-end;
  gap: 10px;
}

.primary-btn {
  background: #245bc4;
  color: #ffffff;
}

.form-error {
  color: #c0392b;
  margin-top: 10px;
  font-size: 13px;
}

/* Responsive */

@media (max-width: 1050px) {
  .review-summary {
    grid-template-columns: 1fr 1fr;
  }

  .review-stats {
    grid-column: span 2;
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 800px) {
  .business-sidebar {
    display: none;
  }

  .business-main {
    padding: 20px 15px;
  }

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

  .review-stats {
    grid-column: auto;
    grid-template-columns: repeat(3, 1fr);
  }

  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .filters {
    width: 100%;
  }

  .filters select {
    flex: 1;
  }
}

@media (max-width: 520px) {
  .business-header {
    padding: 0 14px;
  }

  .brand span {
    display: none;
  }

  .header-link {
    display: none;
  }

  .page-header {
    flex-direction: column;
  }

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

  .review-top {
    flex-direction: column;
  }
}