:root {
  color-scheme: light;
  --bg: #f6f8f4;
  --panel: #ffffff;
  --text: #193225;
  --muted: #5b7063;
  --border: #d4ddd4;
  --primary: #1f7a4c;
  --primary-hover: #185d3a;
  --danger: #c84343;
  --danger-hover: #a23535;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #eef3eb 0%, var(--bg) 100%);
  color: var(--text);
}

.dashboard {
  padding: 24px;
}

.dashboard__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.dashboard__header h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.dashboard__header p {
  margin: 0;
  color: var(--muted);
}

.dashboard__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

button {
  border: none;
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
}

button:hover {
  background: var(--primary-hover);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

button.secondary {
  background: #eef4ef;
  color: var(--text);
}

button.secondary:hover {
  background: #dde8df;
}

button.danger {
  background: var(--danger);
}

button.danger:hover {
  background: var(--danger-hover);
}

.dashboard__table-wrap {
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(33, 63, 44, 0.08);
}

.dashboard__groups {
  display: grid;
  gap: 18px;
}

.dashboard__group {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(33, 63, 44, 0.08);
  overflow: hidden;
}

.dashboard__group-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #f8fbf8 0%, #f1f6f2 100%);
}

.dashboard__group-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.dashboard__group-meta {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.dashboard__group-table-wrap {
  overflow: auto;
}

.dashboard__license-banner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(200, 67, 67, 0.28);
  border-radius: 16px;
  background: rgba(200, 67, 67, 0.08);
}

.dashboard__license-banner strong {
  display: block;
  margin-bottom: 6px;
  color: var(--danger);
}

.dashboard__license-banner p {
  margin: 0;
  color: #7f3131;
}

.dashboard__table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1200px;
}

.dashboard__table th,
.dashboard__table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  line-height: 1.5;
}

.dashboard__table th {
  position: sticky;
  top: 0;
  background: #f0f5f1;
  z-index: 1;
}

.dashboard__table tr:nth-child(even) td {
  background: #fbfcfa;
}

.dashboard__table a {
  color: var(--primary);
  text-decoration: none;
}

.dashboard__table a:hover {
  text-decoration: underline;
}

.dashboard__table th[data-column="website"],
.dashboard__table td[data-column="website"] {
  min-width: 220px;
  width: 220px;
  word-break: break-all;
}

.dashboard__table th[data-column="phone"],
.dashboard__table td[data-column="phone"] {
  min-width: 220px;
  width: 220px;
  white-space: nowrap;
}

.dashboard__table th[data-column="email"],
.dashboard__table td[data-column="email"] {
  min-width: 220px;
  width: 220px;
  word-break: break-word;
}

.dashboard__table th[data-column="address"],
.dashboard__table td[data-column="address"] {
  min-width: 240px;
  width: 240px;
}

.dashboard__cell-text {
  white-space: normal;
  word-break: break-word;
}

.dashboard__cell-text--collapsed {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.dashboard__cell-toggle {
  margin-top: 6px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.dashboard__cell-toggle:hover {
  background: transparent;
  color: var(--primary-hover);
}

@media (max-width: 900px) {
  .dashboard {
    padding: 16px;
  }

  .dashboard__header {
    flex-direction: column;
  }

  .dashboard__license-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard__group-head {
    flex-direction: column;
    align-items: flex-start;
  }
}
