.business-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: auto;
  padding: 14px 20px;

  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  color: #111827;
  text-decoration: none;
  font-size: 20px;
  font-weight: 800;
  white-space: nowrap;
}

.brand span {
  margin-left: 5px;
}

.business-nav {
  display: flex;
  gap: 18px;
  flex: 1;
  overflow-x: auto;
}

.business-nav a {
  color: #4b5563;
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
}

.business-nav a:hover {
  color: #2563eb;
}

.business-nav a.active {
  color: #2563eb;
  font-weight: 700;
}

.logout-btn {
  border: 0;
  background: #111827;
  color: #ffffff;

  padding: 9px 15px;
  border-radius: 7px;

  cursor: pointer;
}


.services-page {
  max-width: 1100px;
  margin: auto;

  padding: 40px 20px 80px;
}


.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;

  gap: 20px;
  margin-bottom: 25px;
}

.eyebrow {
  color: #2563eb;
  font-size: 13px;
  font-weight: 700;
}

.page-heading h1 {
  margin: 5px 0;

  font-size: 32px;
  color: #111827;
}

.page-heading p {
  margin: 0;
  color: #6b7280;
}


.primary-btn {
  border: 0;
  background: #2563eb;
  color: #ffffff;

  padding: 11px 18px;
  border-radius: 8px;

  font-weight: 700;
  cursor: pointer;
}

.primary-btn:hover {
  background: #1d4ed8;
}

.secondary-btn {
  border: 0;
  background: #f3f4f6;
  color: #374151;

  padding: 11px 18px;
  border-radius: 8px;

  font-weight: 700;
  cursor: pointer;
}


.message {
  padding: 13px 15px;
  border-radius: 8px;
  margin-bottom: 20px;

  font-size: 14px;
}

.message.hidden {
  display: none;
}

.message.success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.message.error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}


.service-stats {
  display: grid;

  grid-template-columns:
    repeat(3, 1fr);

  gap: 16px;

  margin-bottom: 20px;
}

.stat-card {
  background: #ffffff;

  border: 1px solid #e5e7eb;
  border-radius: 10px;

  padding: 20px;
}

.stat-card span {
  display: block;

  color: #6b7280;
  font-size: 13px;

  margin-bottom: 7px;
}

.stat-card strong {
  font-size: 26px;
  color: #111827;
}


.services-card {
  background: #ffffff;

  border: 1px solid #e5e7eb;
  border-radius: 12px;

  overflow: hidden;
}

.card-header {
  padding: 22px;

  border-bottom: 1px solid #eef0f3;

  display: flex;
  justify-content: space-between;
  align-items: center;

  gap: 20px;
}

.card-header h2 {
  margin: 0 0 5px;

  font-size: 20px;
  color: #111827;
}

.card-header p {
  margin: 0;

  color: #6b7280;
  font-size: 14px;
}

.service-search input {
  width: 230px;

  padding: 10px 12px;

  border: 1px solid #d1d5db;
  border-radius: 8px;

  outline: none;
}

.service-search input:focus {
  border-color: #2563eb;
}


.loading {
  padding: 40px;

  text-align: center;

  color: #6b7280;
}


.services-list {
  display: grid;
  gap: 0;
}


.service-item {
  padding: 20px 22px;

  border-bottom: 1px solid #eef0f3;

  display: flex;
  justify-content: space-between;
  align-items: center;

  gap: 20px;
}

.service-item:last-child {
  border-bottom: 0;
}

.service-main {
  min-width: 0;
  flex: 1;
}

.service-title {
  margin: 0 0 6px;

  font-size: 17px;
  color: #111827;
}

.service-description {
  margin: 0;

  color: #6b7280;

  font-size: 14px;
  line-height: 1.5;
}

.service-meta {
  display: flex;
  align-items: center;

  gap: 12px;

  margin-top: 10px;
}

.service-price {
  font-weight: 700;
  color: #111827;
}

.service-status {
  display: inline-flex;

  padding: 4px 9px;

  border-radius: 20px;

  font-size: 12px;
  font-weight: 700;
}

.service-status.active {
  background: #ecfdf5;
  color: #047857;
}

.service-status.inactive {
  background: #f3f4f6;
  color: #6b7280;
}


.service-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  border: 1px solid #d1d5db;

  background: #ffffff;
  color: #374151;

  padding: 8px 12px;

  border-radius: 7px;

  cursor: pointer;

  font-size: 13px;
}

.action-btn:hover {
  background: #f9fafb;
}

.action-btn.delete {
  color: #b91c1c;
  border-color: #fecaca;
}


.empty-state {
  text-align: center;

  padding: 60px 25px;
}

.empty-state.hidden {
  display: none;
}

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

.empty-state h3 {
  margin: 0 0 8px;

  font-size: 20px;
}

.empty-state p {
  max-width: 500px;

  margin: 0 auto 20px;

  color: #6b7280;

  line-height: 1.6;
}


/* Modal */

.modal {
  position: fixed;

  inset: 0;

  z-index: 1000;

  display: flex;

  align-items: center;
  justify-content: center;

  padding: 20px;
}

.modal.hidden {
  display: none;
}

.modal-overlay {
  position: absolute;

  inset: 0;

  background: rgba(0, 0, 0, .45);
}

.modal-box {
  position: relative;

  z-index: 2;

  width: 100%;
  max-width: 600px;

  max-height: 90vh;

  overflow-y: auto;

  background: #ffffff;

  border-radius: 12px;

  box-shadow: 0 20px 50px rgba(0, 0, 0, .2);
}

.modal-header {
  padding: 20px;

  border-bottom: 1px solid #e5e7eb;

  display: flex;

  justify-content: space-between;

  gap: 20px;
}

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

.modal-header p {
  margin: 0;

  color: #6b7280;

  font-size: 13px;
}

.close-btn {
  border: 0;

  background: transparent;

  font-size: 28px;

  color: #6b7280;

  cursor: pointer;

  line-height: 1;
}


#serviceForm {
  padding: 20px;
}

.form-group {
  display: flex;

  flex-direction: column;

  gap: 7px;

  margin-bottom: 18px;
}

.form-group label {
  color: #374151;

  font-size: 14px;

  font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;

  box-sizing: border-box;

  padding: 11px 12px;

  border: 1px solid #d1d5db;

  border-radius: 8px;

  font-size: 14px;

  outline: none;

  background: #ffffff;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: #2563eb;
}

.form-group textarea {
  resize: vertical;
}

.form-group small {
  text-align: right;

  color: #6b7280;
}

.form-row {
  display: grid;

  grid-template-columns:
    1fr 1fr;

  gap: 15px;
}

.modal-actions {
  display: flex;

  justify-content: flex-end;

  gap: 10px;

  padding-top: 5px;
}


.business-footer {
  text-align: center;

  padding: 30px 20px;

  color: #6b7280;

  border-top: 1px solid #e5e7eb;
}


@media (max-width: 800px) {

  .header-inner {
    flex-wrap: wrap;
  }

  .business-nav {
    order: 3;

    width: 100%;
  }

  .page-heading {
    align-items: flex-start;

    flex-direction: column;
  }

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

  .card-header {
    align-items: flex-start;

    flex-direction: column;
  }

  .service-search {
    width: 100%;
  }

  .service-search input {
    width: 100%;

    box-sizing: border-box;
  }

  .service-item {
    align-items: flex-start;

    flex-direction: column;
  }

  .service-actions {
    width: 100%;
  }
}


@media (max-width: 550px) {

  .services-page {
    padding: 25px 12px 60px;
  }

  .page-heading h1 {
    font-size: 27px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .modal {
    padding: 10px;
  }

  .service-actions {
    flex-wrap: wrap;
  }
}