.ml-wrap,
.ml-owner-wrap {
  --text: #0f172a;
  --muted: #64748b;
  --line: #e5e7eb;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --card: #ffffff;
  --bg: #f8fafc;
  --soft: #eff6ff;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.08);
  --success-bg: #ecfdf5;
  --success-text: #047857;
  --success-line: #a7f3d0;
  --pending-bg: #fff7ed;
  --pending-text: #c2410c;
  --pending-line: #fdba74;
  --star: #d8ac23;
  --star-soft: #dfdad0;
  --star-hover: #977953;
}

.ml-wrap,
.ml-owner-wrap {
  max-width: 1200px;
  margin: 40px auto;
  padding: 16px;
  color: var(--text);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  background: transparent;
  box-sizing: border-box;
}

#ml-reviews,
#ml-owner-panel {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

/* SUMMARY */
.ml-summary {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 18px;
}

.ml-summary-top {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: start;
}

.ml-summary-label {
  font-weight: 800;
  font-size: 22px;
  margin-bottom: 10px;
}

.ml-summary-avg-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ml-summary-avg-number {
  font-size: 46px;
  line-height: 1;
  font-weight: 800;
  color: var(--star);
}

.ml-summary-stars {
  color: var(--star);
  font-size: 28px;
  letter-spacing: 2px;
  line-height: 1;
}

.ml-summary-count {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
}

.ml-summary-bars {
  display: grid;
  gap: 10px;
  padding-top: 2px;
}

.ml-summary-bar-row {
  display: grid;
  grid-template-columns: 28px 1fr 50px;
  gap: 10px;
  align-items: center;
  font-size: 14px;
}

.ml-summary-bar-label {
  color: var(--text);
}

.ml-summary-bar-track {
  width: 100%;
  height: 10px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.ml-summary-bar-fill {
  height: 100%;
  background: var(--star);
  border-radius: 999px;
}

.ml-summary-bar-pct {
  color: var(--muted);
  text-align: right;
}

/* FILTER CHIPS */
.ml-summary-filters-wrap {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.ml-summary-filters-label {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 10px;
  font-weight: 700;
}

.ml-summary-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ml-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid #dbeafe;
  background: #f8fbff;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1;
  color: #0369a1;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.ml-filter-chip:hover {
  background: #eef8ff;
  border-color: #93c5fd;
}

.ml-filter-chip.is-active {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}

.ml-filter-count {
  font-weight: 800;
}

/* HEAD */
.ml-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.ml-title,
.ml-owner-title {
  font-size: 28px;
  margin: 0;
  line-height: 1.1;
}

.ml-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.ml-stars,
.ml-item-stars,
.ml-owner-rating {
  font-size: 22px;
  color: var(--star);
  letter-spacing: 2px;
}

/* MAIN LAYOUT */
.ml-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 18px;
}

.ml-form-card,
.ml-list-card,
.ml-owner-shell,
.ml-owner-card,
.ml-owner-login,
.ml-owner-app {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  box-sizing: border-box;
}

.ml-form-card,
.ml-list-card,
.ml-owner-login,
.ml-owner-app {
  padding: 16px;
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 100% !important;
}

.ml-owner-shell {
  padding: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}

.ml-subtitle {
  margin: 0 0 8px 0;
  font-size: 18px;
  line-height: 1.2;
}

.ml-form {
  width: 100%;
}

.ml-form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.ml-form-row label,
.ml-owner-reply-label-2 {
  display: block;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  color: var(--text);
}

.ml-form-row input,
.ml-form-row textarea,
.ml-owner-reply-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 16px;
  line-height: 1.45;
  background: #fff;
  color: var(--text);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease;
}

.ml-form-row input:focus,
.ml-form-row textarea:focus,
.ml-owner-reply-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.ml-actions,
.ml-owner-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ml-btn {
  background: var(--brand);
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  min-height: 46px;
  transition:
    transform 0.12s ease,
    background-color 0.18s ease,
    opacity 0.18s ease;
}

.ml-btn:hover {
  background: var(--brand-dark);
}

.ml-btn:active {
  transform: translateY(1px);
}

.ml-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ml-msg {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.35;
}

/* REVIEWS GRID */
.ml-list,
.ml-owner-list {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.ml-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.ml-item,
.ml-owner-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.ml-item {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.ml-item-head,
.ml-owner-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.ml-item-name,
.ml-owner-name {
  font-weight: 800;
  font-size: 17px;
  line-height: 1.2;
}

.ml-item-date,
.ml-owner-date {
  color: var(--muted) !important;
  font-size: 12px !important;
  line-height: 1.2;
}

.ml-item-title,
.ml-owner-card-title {
  margin: 0 0 6px 0;
  font-weight: 800;
  font-size: 24px;
  line-height: 1.15;
  color: #0f2640;
}

.ml-badges,
.ml-owner-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 0;
}

.ml-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff;
  font-size: 13px;
  color: var(--text);
  line-height: 1;
  white-space: nowrap;
}

/* COMMENT AREA */
.ml-item-body {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.ml-item-content {
  line-height: 1.65;
  color: var(--text);
  word-wrap: break-word;
  overflow-wrap: anywhere;
  margin: 0;
}

.ml-item-content.is-collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ml-item-content.is-expanded {
  display: block;
}

.ml-readmore {
  margin-top: 10px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  color: #0ea5e9;
  font-weight: 700;
  font-size: 14px;
  align-self: flex-start;
}

.ml-readmore:hover {
  text-decoration: underline;
}

.ml-owner-review {
  margin: 10px 0 0 0;
  line-height: 1.65;
  color: var(--text);
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.ml-pager {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.ml-pager button,
.ml-item-actions button,
.ml-cancel,
.ml-owner-logout {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--text) !important;
  font-size: 14px !important;
  line-height: 1 !important;
  min-width: 92px;
  min-height: 44px;
  transition:
    border-color 0.18s ease,
    background-color 0.18s ease,
    transform 0.12s ease;
}

.ml-pager button:hover,
.ml-item-actions button:hover,
.ml-cancel:hover,
.ml-owner-logout:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.ml-pager button:active,
.ml-item-actions button:active,
.ml-cancel:active,
.ml-owner-logout:active {
  transform: translateY(1px);
}

.ml-item-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.ml-stars-input {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ml-stars-input .ml-star {
  -webkit-appearance: none;
  appearance: none;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  line-height: 1;
  font-size: 34px;
  cursor: pointer;
  color: var(--star-soft);
  transition:
    transform 0.12s ease,
    color 0.12s ease,
    opacity 0.12s ease;
  padding: 0;
}

.ml-stars-input .ml-star.is-active,
.ml-stars-input .ml-star.is-hover {
  color: var(--star);
  transform: scale(1.05);
  opacity: 1;
}

.ml-stars-input .ml-star:hover {
  color: var(--star-hover);
}

.ml-stars-input .ml-star:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 8px;
}

/* PUBLIC OWNER REPLY */
.ml-owner-reply {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #dcfce7;
  background: #f6fff9;
  border-radius: 14px;
}

.ml-owner-reply-label {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #15803d;
  margin-bottom: 6px;
}

.ml-owner-reply-content {
  line-height: 1.65;
  color: var(--text);
}

.ml-owner-reply-date {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

/* PRIVATE ACCESS CARD */
.ml-owner-login {
  max-width: 700px;
  margin: 0 auto;
}

.ml-owner-welcome {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ml-owner-hello {
  margin: 0;
  font-size: 26px;
  line-height: 1.1;
  font-weight: 800;
  color: #0f2640;
}

.ml-owner-welcome-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 16px;
}

.ml-owner-open-login {
  width: 100%;
  margin-top: 6px;
  font-size: 18px;
  min-height: 52px;
  border-radius: 14px;
}

.ml-owner-login-form {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* OWNER PANEL */
.ml-owner-app {
  padding: 16px;
}

.ml-owner-text {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.ml-owner-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.ml-owner-card {
  padding: 14px;
}

.ml-owner-rating-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.ml-owner-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid transparent;
}

.ml-owner-status-done {
  background: var(--success-bg);
  color: var(--success-text);
  border-color: var(--success-line);
}

.ml-owner-status-pending {
  background: var(--pending-bg);
  color: var(--pending-text);
  border-color: var(--pending-line);
}

.ml-owner-reply-editor {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.ml-owner-reply-input {
  min-height: 140px;
  resize: vertical;
}

.ml-owner-saved-date {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.ml-empty {
  color: var(--muted);
  margin: 8px 0;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .ml-summary-top {
    grid-template-columns: 1fr;
  }

  .ml-list {
    grid-template-columns: 1fr;
  }

  .ml-owner-login {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .ml-wrap,
  .ml-owner-wrap {
    padding: 12px;
    margin: 24px auto;
  }

  .ml-title,
  .ml-owner-title {
    font-size: 24px;
  }

  .ml-owner-hello {
    font-size: 24px;
  }

  .ml-item-title,
  .ml-owner-card-title {
    font-size: 20px;
  }

  .ml-head,
  .ml-owner-topbar,
  .ml-item-head,
  .ml-owner-card-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .ml-owner-rating-wrap {
    align-items: flex-start;
  }

  .ml-stars-input .ml-star {
    width: 48px;
    height: 48px;
    font-size: 40px;
  }

  .ml-btn,
  .ml-owner-logout,
  .ml-pager button,
  .ml-item-actions button,
  .ml-cancel {
    width: 100%;
  }

  .ml-actions,
  .ml-owner-actions,
  .ml-item-actions,
  .ml-pager {
    flex-direction: column;
    align-items: stretch;
  }

  .ml-owner-reply-input {
    min-height: 160px;
  }

  .ml-badge {
    white-space: normal;
  }

  .ml-summary-avg-number {
    font-size: 38px;
  }

  .ml-summary-stars {
    font-size: 24px;
  }
}
.ml-title {
  color: var(--star) !important;
}
