* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f4f8fb;
  color: #18323d;
  font-family: Arial, sans-serif;
  line-height: 1.5;
}

a {
  color: #008ca0;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 5%;
  background: #fff;
  box-shadow: 0 2px 12px rgba(24, 50, 61, 0.08);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: #00a4b8;
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
  line-height: 1;
}

.logo-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  object-fit: contain;
  background: #f2fafb;
  box-shadow: 0 0 0 2px rgba(0, 164, 184, 0.12);
  flex-shrink: 0;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.header-menu {
  display: flex;
  align-items: center;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 8px;
  background: #e7f8fa;
  color: #007d8e;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.main-nav a {
  font-weight: 600;
  text-decoration: none;
}

.logged-user {
  color: #607982;
  font-size: 0.9rem;
  font-weight: 700;
}

.nav-button,
.category-button,
.site-footer button {
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1rem;
  font: inherit;
  cursor: pointer;
}

.nav-button {
  background: #e7f8fa;
  color: #007d8e;
}

.received-messages-notice {
  margin: 0.75rem 0;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: #fff3cd;
  color: #765800;
  font-weight: 700;
  font-size: 0.9rem;
}

.profile-page {
  width: min(100% - 2rem, 1100px);
  margin: 0 auto;
  padding: 3rem 0;
}

.profile-page .login-container {
  width: min(100%, 560px);
  margin: 0 auto 3rem;
}

.profile-businesses {
  margin-top: 2rem;
}

.profile-business-card {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(24, 50, 61, 0.08);
}

.profile-business-card h3,
.profile-business-card h4 {
  margin-bottom: 0.5rem;
}

.profile-business-actions {
  margin: 1rem 0 1.5rem;
}

.profile-product-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e4eef0;
}

.add-product-form {
  display: grid;
  grid-template-columns: 1fr 180px auto;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.add-product-form input,
.add-product-form button {
  min-width: 0;
}

.remove-product-button {
  border: 0;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  background: #fff0f0;
  color: #b42318;
  cursor: pointer;
}

@media (max-width: 760px) {
  .site-header,
  .main-nav {
    flex-wrap: wrap;
  }

  body.home-page .category-menu-toggle {
    display: inline-flex;
  }

  body.home-page .category-menu-panel {
    display: none;
  }

  body.home-page .category-section.is-open .category-menu-panel {
    display: block;
  }

  body.home-page .site-header {
    align-items: center;
  }

  body.home-page .header-menu {
    position: relative;
    display: block;
    margin-left: auto;
  }

  body.home-page .logged-user {
    margin-left: auto;
    text-align: right;
  }

  body.home-page .menu-toggle {
    display: inline-flex;
  }

  body.home-page .main-nav {
    display: none;
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    z-index: 10;
    width: min(85vw, 280px);
    align-items: stretch;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid #dcebed;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(24, 50, 61, 0.14);
  }

  body.home-page .main-nav.is-open {
    display: flex;
  }

  body.home-page .main-nav a,
  body.home-page .main-nav .logged-user,
  body.home-page .main-nav .nav-button {
    text-align: center;
  }

  .main-nav {
    gap: 0.75rem;
  }

  .add-product-form {
    grid-template-columns: 1fr;
  }
}

.hero-section {
  padding: 5rem 5%;
  background: linear-gradient(135deg, #006d80, #00bcd4);
  color: #fff;
}

.hero-section > div,
.home-content,
.info-section {
  width: min(100% - 2rem, 1100px);
  margin: 0 auto;
}

.hero-section h1 {
  max-width: 700px;
  margin: 0.25rem 0 1rem;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.1;
}

.hero-section p:not(.eyebrow) {
  max-width: 600px;
  font-size: 1.1rem;
}

.eyebrow {
  margin: 0;
  color: #008ca0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-section .eyebrow {
  color: #b8f5fa;
}

.home-content {
  padding: 4rem 0;
}

.section-heading h2 {
  margin: 0.25rem 0;
}

.search-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 1rem;
  margin: 1.5rem 0 3rem;
  padding: 1.5rem;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(24, 50, 61, 0.08);
}

.search-form label {
  display: grid;
  gap: 0.4rem;
  font-weight: 700;
}

.search-form input,
.search-form select {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid #c9d9df;
  border-radius: 7px;
  font: inherit;
}

.form-fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.search-form > button {
  padding: 0.8rem 1.4rem;
  border: 0;
  border-radius: 7px;
  background: #00a4b8;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.category-section {
  margin-bottom: 3rem;
}

.category-menu-toggle {
  display: none;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.8rem 1rem;
  border: 0;
  border-radius: 8px;
  background: #e7f8fa;
  color: #007d8e;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.category-menu-panel {
  display: block;
}

.compact-heading p,
.results-heading p {
  margin-top: 0;
  color: #607982;
}

.category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.category-button {
  background: #dff4f6;
  color: #007d8e;
}

.category-button.active,
.category-button:hover {
  background: #00a4b8;
  color: #fff;
}

.results-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.business-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.business-card {
  display: flex;
  position: relative;
  gap: 1rem;
  padding: 1.25rem;
  background: #fff;
  border: 1px solid #e2edf0;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(24, 50, 61, 0.06);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.business-card:hover,
.business-card:focus {
  outline: none;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(24, 50, 61, 0.12);
}

.business-icon {
  display: grid;
  flex: 0 0 46px;
  height: 46px;
  place-items: center;
  border-radius: 12px;
  background: #dff4f6;
  color: #008ca0;
  font-size: 1.3rem;
  font-weight: 700;
}

.business-logo {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
}

.business-card .business-icon {
  flex-basis: 72px;
  width: 72px;
  height: 72px;
}

.edit-business-button,
.details-edit-button {
  align-self: flex-start;
  margin-left: auto;
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  background: #e7f8fa;
  color: #007d8e;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}

.business-card h3 {
  margin: 0.1rem 0 0.35rem;
}

.business-card p {
  margin: 0;
  color: #607982;
}

.business-card .card-category {
  color: #008ca0;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 2rem;
  border: 1px dashed #9fc8ce;
  border-radius: 12px;
  color: #607982;
  text-align: center;
}

.info-section {
  padding: 3rem 0;
  border-top: 1px solid #dcebed;
}

.page-shell {
  width: min(100% - 2rem, 1100px);
  margin: 0 auto;
}

.page-hero {
  padding: 5rem 0;
  background: linear-gradient(135deg, #006d80, #00bcd4);
  color: #fff;
}

.page-hero h1 {
  max-width: 760px;
  margin: 0.25rem 0 1rem;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.1;
}

.page-hero p:not(.eyebrow) {
  max-width: 650px;
  margin-bottom: 0;
  font-size: 1.1rem;
}

.page-hero-compact {
  padding: 4rem 0;
}

.content-section {
  padding: 4rem 0;
}

.content-intro {
  max-width: 720px;
}

.responsibility-note {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid #f0c56a;
  border-left: 6px solid #d99d13;
  border-radius: 16px;
  background: linear-gradient(135deg, #fffaf0, #fff0c8);
  box-shadow: 0 8px 24px rgba(217, 157, 19, 0.16);
}

.responsibility-note-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: #d99d13;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.responsibility-note-content {
  flex: 1;
}

.responsibility-note p {
  margin: 0.5rem 0;
  color: #5c4a1b;
}

.responsibility-note p:first-child {
  margin-top: 0;
}

.responsibility-note p:last-child {
  margin-bottom: 0;
}

.content-intro h2,
.contact-details h2 {
  margin: 0.25rem 0 0.75rem;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2.5rem 0;
}

.value-card {
  padding: 1.5rem;
  background: #fff;
  border: 1px solid #e2edf0;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(24, 50, 61, 0.06);
}

.value-card h2 {
  margin: 0.5rem 0;
  font-size: 1.2rem;
}

.value-card p,
.contact-details > p,
.contact-item p {
  color: #607982;
}

.value-number {
  color: #00a4b8;
  font-size: 0.85rem;
  font-weight: 700;
}

.callout-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem;
  background: #e7f8fa;
  border-radius: 16px;
}

.callout-section h2 {
  margin: 0.25rem 0 0.5rem;
}

.callout-section p:not(.eyebrow) {
  margin-bottom: 0;
}

.primary-link,
.contact-form button {
  display: inline-block;
  padding: 0.8rem 1.2rem;
  border: 0;
  border-radius: 7px;
  background: #00a4b8;
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.primary-link:hover,
.contact-form button:hover {
  background: #008ca0;
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 4rem;
}

.contact-list {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-icon {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: #dff4f6;
  color: #008ca0;
  font-weight: 700;
}

.contact-item h3,
.contact-item p {
  margin: 0;
}

.contact-item h3 {
  font-size: 1rem;
}

.contact-form {
  display: grid;
  gap: 0.45rem;
  padding: 1.5rem;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(24, 50, 61, 0.08);
}

.contact-form label {
  margin-top: 0.35rem;
  font-weight: 700;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid #c9d9df;
  border-radius: 7px;
  font: inherit;
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-form button {
  margin-top: 0.75rem;
}

.form-feedback {
  min-height: 1.5em;
  margin: 0.25rem 0 0;
  color: #007d8e;
  font-weight: 700;
}

.info-section h2 {
  margin: 0.25rem 0 0.5rem;
}

.details-page {
  width: min(100% - 2rem, 900px);
  margin: 0 auto;
  padding: 4rem 0;
}

.details-card {
  padding: 2rem;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 5px 20px rgba(24, 50, 61, 0.08);
}

.details-hero {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #dcebed;
}

.details-hero h1 {
  margin: 0.2rem 0;
}

.details-hero p:not(.eyebrow) {
  margin: 0;
  color: #607982;
}

.details-logo,
.details-icon {
  display: grid;
  flex: 0 0 100px;
  width: 100px;
  height: 100px;
  place-items: center;
  border-radius: 18px;
  background: #dff4f6;
  color: #008ca0;
  font-size: 2.5rem;
  font-weight: 700;
  object-fit: cover;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

.detail-item {
  padding: 1rem;
  background: #f4f8fb;
  border-radius: 10px;
}

.detail-item h2 {
  margin-top: 0;
  font-size: 1.05rem;
}

.detail-item p {
  color: #607982;
  white-space: pre-line;
}

.products-item {
  grid-column: 1 / -1;
}

.products-item li {
  margin-bottom: 0.35rem;
}

.details-edit-button {
  display: inline-block;
  margin-left: 0;
}

.details-chat-button {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 7px;
  background: #00a4b8;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.details-chat-button:hover {
  background: #008ca0;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 5%;
  background: #18323d;
  color: #fff;
}

.site-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: #fff;
  font-weight: 700;
}

.site-footer p {
  margin: 0;
}

.site-footer button {
  background: #28515d;
  color: #fff;
}

body.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(135deg, #e8f9fd 0%, #edf5ff 35%, #f7fbff 100%);
}

body.login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(30, 136, 229, 0.12), transparent 32%),
    radial-gradient(circle at bottom right, rgba(61, 220, 151, 0.18), transparent 28%);
  pointer-events: none;
}

.login-page-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin: 0 auto 1rem;
  color: #00a4b8;
  text-align: center;
}

.login-page-brand h1 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.3rem);
}

.login-page-logo {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.9rem;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(0, 164, 184, 0.12);
}

.login-container {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, 440px);
  margin: 0 auto 4rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(0, 164, 184, 0.08);
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(24, 50, 61, 0.12);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.login-container h2 {
  margin-top: 0;
  color: #00bcd4;
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.login-container form {
  display: grid;
  gap: 1rem;
}

.login-container input,
.login-container textarea,
.login-container button {
  box-sizing: border-box;
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid #cfe5eb;
  border-radius: 12px;
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.login-container input:focus,
.login-container textarea:focus {
  border-color: #00a4b8;
  box-shadow: 0 0 0 4px rgba(0, 164, 184, 0.12);
  outline: none;
}

.login-container button {
  border: 0;
  background: linear-gradient(135deg, #00a4b8, #00bcd4);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 12px 20px rgba(0, 164, 184, 0.22);
}

.login-container button:hover {
  background: linear-gradient(135deg, #0092a6, #00a8bf);
  transform: translateY(-1px);
}

.login-container p {
  margin-top: 1.1rem;
  text-align: center;
  color: #607982;
}

.login-container p a {
  color: #007d8e;
  font-weight: 700;
  text-decoration: none;
}

.login-container p a:hover {
  text-decoration: underline;
}

.login-container textarea {
  min-height: 110px;
  resize: vertical;
}

.form-field {
  display: grid;
  gap: 0.4rem;
  color: #18323d;
  font-weight: 700;
}

.form-field small {
  color: #607982;
  font-size: 0.78rem;
  font-weight: 400;
}

.image-preview {
  width: 100%;
  max-height: 180px;
  border-radius: 10px;
  object-fit: cover;
}

.products-editor {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid #dcebed;
  border-radius: 10px;
  background: #f4f8fb;
}

.products-editor h3 {
  margin: 0;
}

.products-editor p {
  margin: 0.25rem 0 0;
  color: #607982;
  font-size: 0.85rem;
  font-weight: 400;
}

.product-rows {
  display: grid;
  gap: 0.75rem;
}

.product-edit-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  padding: 0.85rem;
  background: #fff;
  border: 1px solid #dcebed;
  border-radius: 8px;
}

.product-edit-fields {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 0.65rem;
}

.product-edit-fields label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.product-edit-fields input {
  width: 100%;
  padding: 0.65rem;
  border: 1px solid #c9d9df;
  border-radius: 6px;
  font: inherit;
}

.product-edit-preview {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  object-fit: cover;
}

.remove-product-button,
.secondary-form-button {
  padding: 0.55rem 0.75rem;
  border: 1px solid #e3a4a4;
  border-radius: 6px;
  background: transparent;
  color: #a23838;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.secondary-form-button {
  justify-self: start;
  border-color: #9fc8ce;
  color: #007d8e;
}

.empty-products {
  padding: 0.75rem;
  border: 1px dashed #9fc8ce;
  border-radius: 7px;
  text-align: center;
}

.public-products {
  display: grid;
  gap: 0.75rem;
}

.public-product {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border: 1px solid #dcebed;
  border-radius: 10px;
  background: #fff;
}

.product-image {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
}

.product-image-placeholder {
  display: grid;
  place-items: center;
  background: #dff4f6;
  font-size: 1.6rem;
}

.public-product-info h3 {
  margin: 0 0 0.3rem;
}

.public-product-info strong {
  color: #008ca0;
}

@media (max-width: 700px) {
  .main-nav,
  .site-footer {
    flex-direction: column;
  }

  .main-nav {
    gap: 0.75rem;
  }

  .search-form {
    grid-template-columns: 1fr;
  }

  .form-fields-row {
    grid-template-columns: 1fr;
  }

  .results-heading {
    display: block;
  }

  .details-hero,
  .details-grid {
    display: block;
  }

  .values-grid,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .contact-layout {
    gap: 2rem;
  }

  .callout-section {
    align-items: flex-start;
    flex-direction: column;
  }

  .details-icon,
  .details-logo {
    margin-bottom: 1rem;
  }

  .detail-item {
    margin-bottom: 1rem;
  }
}

.results {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.card {
  background: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card h3 {
  margin-bottom: 0.5rem;
  color: #00bcd4;
}

.card p {
  margin: 0.3rem 0;
  color: #555;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

body.dark-mode {
  background: #10252d;
  color: #e8f5f7;
}

body.dark-mode a {
  color: #66d9e8;
}

body.dark-mode .site-header,
body.dark-mode .search-form,
body.dark-mode .business-card,
body.dark-mode .details-card,
body.dark-mode .login-container,
body.dark-mode .value-card,
body.dark-mode .contact-form {
  background: #193943;
  border-color: #2b5661;
}

body.dark-mode .main-nav {
  background: #193943;
  border-color: #2b5661;
}

body.dark-mode .logo {
  color: #66d9e8;
}

body.dark-mode .logged-user,
body.dark-mode .business-card p,
body.dark-mode .compact-heading p,
body.dark-mode .results-heading p,
body.dark-mode .value-card p,
body.dark-mode .contact-details > p,
body.dark-mode .contact-item p,
body.dark-mode .details-hero p:not(.eyebrow),
body.dark-mode .detail-item p {
  color: #b7d1d6;
}

body.dark-mode .info-section {
  border-top-color: #2b5661;
}

body.dark-mode .search-form input,
body.dark-mode .search-form select,
body.dark-mode .contact-form input,
body.dark-mode .contact-form textarea,
body.dark-mode .login-container input,
body.dark-mode .login-container textarea {
  background: #10252d;
  border-color: #47717a;
  color: #e8f5f7;
}

body.dark-mode .detail-item,
body.dark-mode .callout-section {
  background: #214852;
}

body.dark-mode .form-field {
  color: #e8f5f7;
}

body.dark-mode .form-field small {
  color: #b7d1d6;
}

body.dark-mode .products-editor,
body.dark-mode .public-product {
  background: #214852;
  border-color: #2b5661;
}

body.dark-mode .product-edit-row {
  background: #193943;
  border-color: #2b5661;
}

body.dark-mode .products-editor p {
  color: #b7d1d6;
}

body.dark-mode .product-edit-fields input {
  background: #10252d;
  border-color: #47717a;
  color: #e8f5f7;
}

body.dark-mode .nav-button {
  background: #28515d;
  color: #b8f5fa;
}

.chat-layout {
  width: min(100% - 2rem, 1100px);
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.chat-panel {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) 1.6fr;
  min-height: 70vh;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e2edf0;
  border-radius: 16px;
  box-shadow: 0 5px 20px rgba(24, 50, 61, 0.08);
}

.conversation-sidebar {
  padding: 0.9rem;
  background: #f4f8fb;
  border-right: 1px solid #dcebed;
}

.sidebar-heading,
.conversation-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.sidebar-heading h2 {
  margin: 0.2rem 0 1.25rem;
}

.small-button,
.secondary-link {
  padding: 0.5rem 0.7rem;
  border: 1px solid #9fc8ce;
  border-radius: 7px;
  background: transparent;
  color: #007d8e;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.small-button:hover,
.secondary-link:hover {
  background: #dff4f6;
}

.conversation-list {
  display: grid;
  gap: 0.6rem;
}

.conversation-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.7rem;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.conversation-item:hover,
.conversation-item.active {
  background: #dff4f6;
  border-color: #b8e2e7;
}

.conversation-avatar {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: #00a4b8;
  color: #fff;
  font-weight: 700;
}

.conversation-summary {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 0.15rem;
}

.conversation-summary strong,
.conversation-summary small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-summary small,
.conversation-item time,
.empty-list {
  color: #607982;
  font-size: 0.78rem;
}

.conversation-item time {
  align-self: flex-start;
  white-space: nowrap;
}

.empty-list {
  padding: 1rem 0;
  text-align: center;
}

.conversation-area {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.empty-conversation,
.new-conversation {
  width: min(100% - 1.5rem, 520px);
  margin: auto;
  padding: 1.5rem 0;
  text-align: center;
}

.empty-conversation h2,
.new-conversation h2 {
  margin: 0.5rem 0;
}

.empty-conversation p,
.new-conversation > p {
  color: #607982;
}

.chat-empty-icon {
  display: block;
  font-size: 2.5rem;
}

.conversation-content {
  display: flex;
  min-height: 600px;
  flex-direction: column;
}

.conversation-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #dcebed;
}

.conversation-header h2 {
  margin: 0.2rem 0;
}

.conversation-header p:not(.eyebrow) {
  margin: 0;
  color: #607982;
  font-size: 0.9rem;
}

.message-list {
  display: grid;
  align-content: start;
  flex: 1;
  gap: 0.75rem;
  max-height: 440px;
  overflow-y: auto;
  padding: 1rem 1rem 1.25rem;
  background: #f4f8fb;
}

.message {
  display: flex;
}

.message-own {
  justify-content: flex-end;
}

.message-bubble {
  max-width: min(80%, 520px);
  padding: 0.75rem 1rem;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(24, 50, 61, 0.08);
}

.message-own .message-bubble {
  background: #dff4f6;
}

.message-bubble strong {
  color: #007d8e;
  font-size: 0.8rem;
}

.message-bubble p {
  margin: 0.25rem 0;
  white-space: pre-line;
}

.message-bubble time {
  display: block;
  color: #607982;
  font-size: 0.7rem;
  text-align: right;
}

.message-form {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid #dcebed;
}

.message-form textarea,
.new-conversation-form textarea,
.new-conversation-form select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #c9d9df;
  border-radius: 7px;
  background: #fff;
  color: #18323d;
  font: inherit;
}

.message-form button,
.new-conversation-form button {
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 7px;
  background: #00a4b8;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.new-conversation-form {
  display: grid;
  gap: 0.5rem;
  margin-top: 1.5rem;
  text-align: left;
}

.new-conversation-form label {
  margin-top: 0.35rem;
  font-weight: 700;
}

.new-conversation-form button {
  margin-top: 0.75rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.dark-mode .chat-intro p:not(.eyebrow),
body.dark-mode .empty-conversation p,
body.dark-mode .new-conversation > p,
body.dark-mode .conversation-summary small,
body.dark-mode .conversation-item time,
body.dark-mode .message-bubble time {
  color: #b7d1d6;
}

body.dark-mode .chat-panel {
  background: #193943;
  border-color: #2b5661;
}

body.dark-mode .conversation-sidebar,
body.dark-mode .message-list {
  background: #102d36;
}

body.dark-mode .conversation-sidebar,
body.dark-mode .conversation-header,
body.dark-mode .message-form {
  border-color: #2b5661;
}

body.dark-mode .conversation-item:hover,
body.dark-mode .conversation-item.active,
body.dark-mode .message-own .message-bubble {
  background: #28515d;
  border-color: #47717a;
}

body.dark-mode .message-bubble,
body.dark-mode .message-form textarea,
body.dark-mode .new-conversation-form textarea,
body.dark-mode .new-conversation-form select {
  background: #193943;
  border-color: #47717a;
  color: #e8f5f7;
}

@media (max-width: 760px) {
  .chat-panel {
    grid-template-columns: 1fr;
  }

  .conversation-sidebar {
    border-right: 0;
    border-bottom: 1px solid #dcebed;
  }

  .conversation-list {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .conversation-content {
    min-height: 540px;
  }

  .message-form {
    align-items: stretch;
    flex-direction: column;
  }
}

.admin-layout {
  width: min(100% - 2rem, 1200px);
  margin: 0 auto;
  padding: 3rem 0 4rem;
}

.admin-intro {
  margin-bottom: 2rem;
}

.admin-intro h1 {
  margin: 0.25rem 0 0.5rem;
}

.admin-intro p:not(.eyebrow) {
  margin: 0;
  color: #607982;
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.admin-summary article {
  display: grid;
  gap: 0.2rem;
  padding: 1.25rem;
  background: #e7f8fa;
  border-radius: 12px;
}

.admin-summary strong {
  color: #007d8e;
  font-size: 1.8rem;
}

.admin-summary span {
  color: #607982;
  font-size: 0.9rem;
  font-weight: 700;
}

.admin-card {
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background: #fff;
  border: 1px solid #e2edf0;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(24, 50, 61, 0.06);
}

.admin-card-heading h2 {
  margin: 0.25rem 0 1.25rem;
}

.admin-form {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.admin-form-inline {
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
}

.admin-form input,
.admin-form select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid #c9d9df;
  border-radius: 7px;
  background: #fff;
  color: #18323d;
  font: inherit;
}

.admin-form button {
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 7px;
  background: #00a4b8;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.admin-form button:disabled {
  background: #9fb7bc;
  cursor: not-allowed;
}

.admin-table-wrapper {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 650px;
}

.admin-table th,
.admin-table td {
  padding: 0.85rem 0.65rem;
  border-bottom: 1px solid #dcebed;
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  color: #607982;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.admin-table td small {
  display: block;
  margin-top: 0.2rem;
  color: #607982;
}

.admin-badge {
  display: inline-block;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: #e7f8fa;
  color: #007d8e;
  font-size: 0.75rem;
  font-weight: 700;
}

.admin-badge-master {
  background: #fff1cf;
  color: #8b5f00;
}

.admin-badge-inactive {
  background: #fbe4e4;
  color: #a23838;
}

.table-actions {
  white-space: nowrap;
}

.table-action {
  padding: 0.4rem 0.6rem;
  border: 1px solid #9fc8ce;
  border-radius: 6px;
  background: transparent;
  color: #007d8e;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.table-action:hover {
  background: #dff4f6;
}

.table-action.danger {
  margin-left: 0.35rem;
  border-color: #e3a4a4;
  color: #a23838;
}

.table-action.danger:hover {
  background: #fbe4e4;
}

.table-empty {
  color: #607982;
  text-align: center !important;
}

.admin-category-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.65rem;
}

.admin-category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid #dcebed;
  border-radius: 8px;
  background: #f4f8fb;
  font-weight: 700;
}

.admin-category-item small {
  color: #607982;
  font-size: 0.75rem;
  font-weight: 400;
}

body.dark-mode .admin-intro p:not(.eyebrow),
body.dark-mode .admin-summary span,
body.dark-mode .admin-table th,
body.dark-mode .admin-table td small,
body.dark-mode .table-empty {
  color: #b7d1d6;
}

body.dark-mode .admin-summary article {
  background: #214852;
}

body.dark-mode .admin-card {
  background: #193943;
  border-color: #2b5661;
}

body.dark-mode .admin-form input,
body.dark-mode .admin-form select {
  background: #10252d;
  border-color: #47717a;
  color: #e8f5f7;
}

body.dark-mode .admin-table th,
body.dark-mode .admin-table td {
  border-color: #2b5661;
}

body.dark-mode .admin-category-item {
  background: #214852;
  border-color: #2b5661;
}

body.dark-mode .admin-category-item small {
  color: #b7d1d6;
}

@media (max-width: 800px) {
  .admin-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-form-inline {
    grid-template-columns: 1fr;
  }
}
