:root {
  --bg: #eef6f2;
  --panel: #ffffff;
  --ink: #0b2b25;
  --muted: #6b867d;
  --soft: #dcece6;
  --line: #d6e5df;
  --green: #0f8f7c;
  --green-strong: #087566;
  --mint: #e6f7f1;
  --red: #d94a5f;
  --amber: #c88312;
  --shadow: 0 12px 28px rgba(24, 88, 74, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
}

button,
input,
select,
textarea {
  font: inherit;
}

button { cursor: pointer; }

.admin-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 18px;
  background: #073f36;
  color: #fff;
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 22px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #dff8ed;
  color: #073f36;
  font-weight: 900;
  font-size: 22px;
}

.brand-title { font-size: 18px; font-weight: 850; }
.brand-sub { margin-top: 3px; font-size: 12px; color: rgba(255,255,255,0.62); }

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.72);
  background: transparent;
  text-align: left;
}

.nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-item.active { background: #e9fff6; color: #073f36; font-weight: 800; }
.nav-ico { width: 22px; text-align: center; font-weight: 900; }

.sidebar-foot {
  margin-top: auto;
  padding: 14px 8px 0;
}

.config-row {
  display: grid;
  margin-top: 8px;
  margin-bottom: 12px;
}

.config-row-save {
  grid-template-columns: 1fr 36px;
  gap: 8px;
  margin-bottom: 0;
}

.workspace {
  min-width: 0;
  padding: 24px 28px 38px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.page-kicker {
  color: var(--green);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.06em;
}

h1 {
  margin: 4px 0 0;
  font-size: 30px;
  line-height: 1.2;
}

h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.health-pill {
  min-width: 74px;
  height: 34px;
  border-radius: 999px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #7f5b0c;
  background: #fff5d8;
  border: 1px solid #f0d99b;
}

.admin-user-pill {
  min-width: 86px;
  height: 34px;
  border-radius: 999px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #076456;
  background: #dff8ed;
  border: 1px solid #bce6d6;
  font-size: 13px;
  font-weight: 800;
}

.health-pill.ok {
  color: #076456;
  background: #dff8ed;
  border-color: #bce6d6;
}

.btn,
.icon-btn {
  border: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
}

.btn {
  height: 38px;
  padding: 0 14px;
}

.btn-xs {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.btn-primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 143, 124, 0.24);
}

.btn-primary:hover { background: var(--green-strong); }

.btn-secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-secondary:hover { background: var(--mint); }
.btn-danger { background: #fff1f3; color: #ad2238; border: 1px solid #f2c3cb; }
.btn-warning { background: #fff5df; color: #915d00; border: 1px solid #edd1a2; }
.btn:disabled { opacity: 0.48; cursor: not-allowed; }

.icon-btn {
  height: 36px;
  width: 36px;
  background: #e9fff6;
  color: #073f36;
}

.input,
.select {
  height: 38px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.input:focus,
.select:focus {
  border-color: rgba(15,143,124,0.72);
  box-shadow: 0 0 0 3px rgba(15,143,124,0.12);
}

.input-sm {
  height: 36px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-color: rgba(255,255,255,0.18);
}

.table-input,
.table-select {
  width: 100%;
  min-width: 112px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 9px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.table-input:focus,
.table-select:focus {
  border-color: rgba(15,143,124,0.72);
  box-shadow: 0 0 0 3px rgba(15,143,124,0.1);
}

.toggle-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.field-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 7px;
}

.sidebar .field-label { color: rgba(255,255,255,0.66); }

.view { display: none; }
.view.active { display: block; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.overview-metric-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 18px;
  margin-bottom: 18px;
}

.metric-card,
.panel {
  background: var(--panel);
  border: 1px solid rgba(15, 143, 124, 0.08);
  box-shadow: var(--shadow);
}

.metric-card {
  position: relative;
  min-height: 126px;
  overflow: hidden;
  padding: 18px;
  border-radius: 8px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.overview-metric-grid .metric-card {
  min-height: 154px;
  padding: 22px 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(244, 251, 248, 0.92)),
    var(--panel);
}

.overview-metric-grid .metric-card::before {
  width: 58px;
  height: 58px;
  top: 22px;
  right: 24px;
  font-size: 24px;
}

.overview-metric-grid .metric-card::after {
  right: -34px;
  bottom: -52px;
  width: 150px;
  height: 150px;
}

.overview-metric-grid .metric-card strong {
  margin-top: 10px;
  font-size: 44px;
}

.overview-metric-grid .metric-card small {
  margin-top: 4px;
  font-size: 14px;
}

.metric-card[data-jump] {
  cursor: pointer;
}

.metric-card[data-jump]:hover {
  border-color: rgba(15, 143, 124, 0.28);
  box-shadow: 0 16px 34px rgba(24, 88, 74, 0.12);
  transform: translateY(-1px);
}

.metric-card::before {
  content: attr(data-icon);
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--green);
  box-shadow: 0 12px 22px rgba(15, 143, 124, 0.16);
  font-size: 19px;
  font-weight: 900;
}

.metric-card::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -46px;
  width: 118px;
  height: 118px;
  border-radius: 999px;
  background: rgba(15, 143, 124, 0.08);
}

.metric-card > * {
  position: relative;
  z-index: 2;
}

.metric-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 34px;
  letter-spacing: 0;
  color: #082f29;
}

.metric-card small {
  display: block;
  margin-top: 2px;
  color: #8aa199;
}

.metric-blue::before { background: #3b82f6; box-shadow: 0 12px 22px rgba(59, 130, 246, 0.16); }
.metric-blue::after { background: rgba(59, 130, 246, 0.08); }
.metric-amber::before { background: #f59e0b; box-shadow: 0 12px 22px rgba(245, 158, 11, 0.16); }
.metric-amber::after { background: rgba(245, 158, 11, 0.1); }
.metric-teal::before { background: #14b8a6; box-shadow: 0 12px 22px rgba(20, 184, 166, 0.16); }
.metric-teal::after { background: rgba(20, 184, 166, 0.09); }
.metric-red::before { background: #e05266; box-shadow: 0 12px 22px rgba(224, 82, 102, 0.16); }
.metric-red::after { background: rgba(224, 82, 102, 0.09); }
.metric-purple::before { background: #8b5cf6; box-shadow: 0 12px 22px rgba(139, 92, 246, 0.16); }
.metric-purple::after { background: rgba(139, 92, 246, 0.09); }

.overview-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "user active"
    "module community";
  gap: 16px;
  margin-bottom: 16px;
}

.chart-panel {
  min-height: 354px;
}

.chart-panel-user { grid-area: user; }
.chart-panel-active { grid-area: active; }
.chart-panel-community { grid-area: community; }
.chart-panel-module { grid-area: module; }

.chart-panel-module {
  min-height: 318px;
}

.chart-empty {
  min-height: 164px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background:
    linear-gradient(135deg, rgba(223, 248, 237, 0.78), rgba(255, 255, 255, 0.86)),
    #f7fbf9;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  padding: 18px;
}

.chart-empty-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #076456;
  background: #dff8ed;
  font-size: 18px;
  font-weight: 900;
}

.chart-empty strong {
  color: var(--ink);
  font-size: 16px;
}

.chart-empty small {
  max-width: 340px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.chart-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.chart-summary-item {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfefd;
}

.chart-summary-icon {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.chart-summary-item strong,
.chart-summary-item small {
  display: block;
  min-width: 0;
}

.chart-summary-item strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.1;
}

.chart-summary-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.bar-chart,
.grouped-chart {
  height: 210px;
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 7px;
  align-items: end;
  padding-top: 8px;
}

.line-chart {
  position: relative;
  height: 210px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 2px;
  padding-top: 4px;
}

.line-chart svg {
  width: 100%;
  height: 184px;
  overflow: visible;
}

.line-grid {
  stroke: #dbe9e3;
  stroke-width: 1;
}

.line-axis {
  stroke: #c8dad3;
  stroke-width: 1.2;
}

.line-path {
  fill: none;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 5px 8px rgba(24, 88, 74, 0.12));
}

.line-dot {
  stroke: #fff;
  stroke-width: 2.4;
}

.line-hover-layer {
  position: absolute;
  top: 4px;
  left: 0;
  right: 0;
  height: 184px;
  pointer-events: none;
}

.line-hover-point {
  position: absolute;
  z-index: 4;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  transform: translate(calc(-50% + var(--point-shift, 0px)), -50%);
  pointer-events: auto;
  cursor: default;
}

.line-hover-point::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  background: var(--point-color, var(--green));
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(24, 88, 74, 0.16);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.line-hover-point::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  min-width: 122px;
  max-width: 220px;
  padding: 7px 10px;
  border-radius: 8px;
  color: #fff;
  background: rgba(6, 47, 41, 0.94);
  box-shadow: 0 12px 28px rgba(6, 47, 41, 0.18);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-50%) translateY(4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  pointer-events: none;
}

.line-hover-point:hover {
  z-index: 6;
}

.line-hover-point:hover::before {
  transform: scale(1.55);
  box-shadow: 0 6px 18px rgba(24, 88, 74, 0.24);
}

.line-hover-point:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.line-y-label {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.line-labels {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 4px;
  padding-left: 34px;
  padding-right: 18px;
}

.line-labels span {
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
  white-space: nowrap;
}

.bar-cell,
.group-cell {
  min-width: 0;
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 4px;
  height: 100%;
}

.group-cell {
  grid-template-rows: 1fr auto;
}

.bar-track,
.group-bars {
  height: 156px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 3px;
  border-bottom: 1px solid var(--line);
}

.bar-stack {
  width: 70%;
  min-height: 0;
  display: flex;
  flex-direction: column-reverse;
  overflow: hidden;
  border-radius: 7px 7px 3px 3px;
  background: #edf6f2;
}

.bar-segment,
.group-bar {
  display: block;
  flex-shrink: 0;
}

.group-bar {
  width: 9px;
  border-radius: 7px 7px 3px 3px;
}

.bar-value {
  min-height: 16px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
  text-align: center;
}

.bar-label {
  color: var(--muted);
  font-size: 10px;
  text-align: center;
  white-space: nowrap;
}

.horizontal-chart {
  display: grid;
  gap: 13px;
}

.horizontal-row {
  display: grid;
  gap: 7px;
}

.horizontal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.horizontal-head strong {
  color: var(--ink);
  font-size: 15px;
}

.horizontal-track {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: #edf6f2;
}

.horizontal-bar {
  display: block;
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
}

.chart-green { background: #0f8f7c; }
.chart-blue { background: #3b82f6; }
.chart-amber { background: #f59e0b; }
.chart-teal { background: #14b8a6; }
.chart-red { background: #e05266; }
.chart-purple { background: #8b5cf6; }

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.two-col-form {
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
  margin-bottom: 16px;
}

.panel {
  border-radius: 8px;
  padding: 18px;
  min-width: 0;
}

.panel + .panel { margin-top: 16px; }

.compliance-banner {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  color: #7a5710;
  background: #fff8e8;
  border: 1px solid rgba(200, 131, 18, 0.24);
  font-size: 13px;
  line-height: 1.55;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.salon-create-panel {
  margin-bottom: 16px;
  background:
    linear-gradient(135deg, rgba(223, 248, 237, 0.92), rgba(255, 255, 255, 0.96) 42%),
    var(--panel);
}

.salon-create-form {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) minmax(220px, 0.9fr) minmax(140px, 0.45fr) auto;
  gap: 14px;
  align-items: end;
}

.salon-create-form .btn {
  min-width: 150px;
}

.salon-main-layout {
  display: grid;
  grid-template-columns: minmax(360px, 430px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.salon-main-layout > .panel + .panel {
  margin-top: 0;
}

.salon-list-panel,
.salon-detail-panel {
  min-height: calc(100vh - 260px);
}

.salon-list-panel {
  position: sticky;
  top: 24px;
}

.salon-list-panel .salon-columns {
  gap: 14px;
  max-height: calc(100vh - 370px);
  overflow: auto;
  padding-right: 2px;
}

.salon-list-panel .list-card {
  min-height: 142px;
}

.salon-detail-panel .chat-box {
  min-height: calc(100vh - 520px);
  max-height: calc(100vh - 420px);
  background: linear-gradient(180deg, #f4fbf8, #edf6f2);
}

.salon-detail-panel .msg {
  max-width: 100%;
}

.salon-detail-panel .msg-bubble {
  max-width: min(720px, calc(100% - 88px));
  word-break: break-word;
  white-space: pre-wrap;
}

.split-view {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
  gap: 16px;
}

.list {
  display: grid;
  gap: 10px;
}

.salon-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.salon-column {
  min-width: 0;
}

.column-head {
  min-height: 34px;
  margin-bottom: 10px;
  padding: 0 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  font-weight: 900;
  background: #f4fbf8;
  border: 1px solid var(--line);
}

.column-head small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.list-card,
.todo-item,
.post-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
}

.list-card {
  padding: 13px;
}

.list-card.active {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(15,143,124,0.1);
}

.salon-card {
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.salon-card:hover {
  border-color: rgba(15,143,124,0.42);
  box-shadow: 0 12px 24px rgba(24, 88, 74, 0.1);
  transform: translateY(-1px);
}

.salon-card.active {
  background: linear-gradient(180deg, #ffffff, #f3fbf8);
}

.salon-card-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.salon-card-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  flex: 0 0 auto;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(15,143,124,0.11);
}

.salon-card-dot.warn {
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(200,131,18,0.14);
}

.salon-card-dot.gray {
  background: #9aa8a4;
  box-shadow: 0 0 0 4px rgba(100,115,111,0.12);
}

.salon-card-meta {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.salon-card-progress {
  height: 8px;
  margin-top: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #edf6f2;
}

.salon-card-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f8f7c, #65c8a2);
}

.salon-card .list-actions .btn {
  height: 32px;
  padding: 0 11px;
  font-size: 12px;
}

.salon-detail-meta {
  margin-bottom: 14px;
}

.salon-detail-hero {
  padding: 16px;
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  background:
    linear-gradient(135deg, rgba(223, 248, 237, 0.92), rgba(255, 255, 255, 0.98) 62%);
  border: 1px solid rgba(15, 143, 124, 0.12);
}

.salon-detail-kicker {
  display: block;
  margin-bottom: 7px;
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
}

.salon-detail-hero h3 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.35;
}

.salon-detail-stats {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1.1fr 0.75fr 1.15fr;
  gap: 10px;
}

.salon-detail-stats > div {
  min-width: 0;
  padding: 12px;
  border-radius: 8px;
  background: #f7fbf9;
  border: 1px solid var(--line);
}

.salon-detail-stats span,
.salon-progress-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.salon-detail-stats strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.salon-progress {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
}

.salon-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.salon-progress-head strong {
  color: var(--green);
  font-size: 13px;
}

.salon-progress-track {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #edf6f2;
}

.salon-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f8f7c, #78d5aa);
}

.salon-empty-detail {
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #f7fbf9;
  text-align: center;
  padding: 24px;
}

.salon-empty-detail strong {
  color: var(--ink);
  font-size: 18px;
}

.salon-empty-detail span {
  max-width: 360px;
  font-size: 13px;
  line-height: 1.6;
}

.salon-empty-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #073f36;
  background: #dff8ed;
  font-weight: 900;
}

.list-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.list-title {
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-meta {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

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

.badge {
  height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
  color: #076456;
  background: #def7ed;
}

.badge.warn { color: #8a5a02; background: #fff1cd; }
.badge.danger { color: #a32337; background: #ffe1e6; }
.badge.gray { color: #64736f; background: #eef2f0; }

.score-pill {
  min-width: 54px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #8a5a02;
  background: #fff1cd;
  font-size: 12px;
  font-weight: 850;
}

.score-pill.good {
  color: #076456;
  background: #def7ed;
}

.score-pill.danger {
  color: #a32337;
  background: #ffe1e6;
}

.feedback-comment {
  min-width: 240px;
  max-width: 520px;
  color: #274b44;
  line-height: 1.58;
  white-space: pre-wrap;
  word-break: break-word;
}

.stack-list {
  display: grid;
  gap: 10px;
}

.todo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 13px;
}

.todo-title { font-weight: 800; }
.todo-sub { color: var(--muted); font-size: 13px; margin-top: 3px; }

.panel-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 7px 10px;
  border-radius: 999px;
  background: #edf6f2;
  border: 1px solid var(--line);
  white-space: nowrap;
}

.chat-box {
  min-height: 440px;
  max-height: 62vh;
  overflow: auto;
  background: #edf6f2;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.reply-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 12px;
}

.chat-box-tall {
  min-height: 360px;
}

.msg {
  max-width: 76%;
  margin-bottom: 11px;
}

.msg.self { margin-left: auto; }

.msg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.msg-name {
  color: var(--muted);
  font-size: 12px;
  min-width: 0;
}

.link-danger {
  border: 0;
  background: transparent;
  color: #dc2626;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  padding: 2px 0;
  white-space: nowrap;
}

.link-danger:hover { color: #991b1b; }

.msg-bubble {
  display: inline-block;
  border-radius: 8px;
  padding: 9px 12px;
  line-height: 1.55;
  font-size: 14px;
  background: #fff;
  border: 1px solid rgba(15,143,124,0.08);
}

.msg.self .msg-bubble {
  background: #c9f6d2;
  border-color: #b0eabe;
}

.msg-plan {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #076456;
  background: #def7ed;
  font-size: 13px;
  line-height: 1.5;
}

.msg-disclaimer {
  margin-top: 5px;
  color: #8aa199;
  font-size: 12px;
  line-height: 1.45;
}

.empty {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  padding: 32px 12px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  background: #f7fbf9;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.03em;
}

tr:last-child td { border-bottom: 0; }

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.community-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.82fr);
  gap: 16px;
  align-items: start;
}

.community-layout .post-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.post-card {
  padding: 14px;
  min-height: 210px;
  display: flex;
  flex-direction: column;
}

.post-card.active {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(15,143,124,0.1);
}

.post-title {
  margin-top: 10px;
  font-weight: 900;
  line-height: 1.35;
}

.post-content {
  margin-top: 8px;
  color: #395851;
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-foot {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.comment-admin-panel {
  position: sticky;
  top: 24px;
}

.comment-admin-list {
  max-height: calc(100vh - 190px);
  overflow: auto;
  display: grid;
  gap: 10px;
  padding-right: 2px;
}

.comment-admin-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.comment-admin-item.is-reply {
  margin-left: 24px;
  background: #f7fbf9;
}

.comment-admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.comment-admin-author {
  font-size: 13px;
  font-weight: 850;
  color: var(--ink);
  line-height: 1.35;
  word-break: break-all;
}

.comment-admin-meta,
.comment-admin-stats {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.comment-admin-content {
  margin-top: 10px;
  color: #274b44;
  font-size: 14px;
  line-height: 1.58;
  white-space: pre-wrap;
  word-break: break-word;
}

.search-input { max-width: 280px; }

.user-table-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.page-size-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.page-size-select .select {
  width: 86px;
}

.pagination-bar {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.pagination-info {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.pagination-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%) translateY(20px);
  min-width: 260px;
  max-width: min(560px, calc(100vw - 32px));
  padding: 14px 18px;
  border-radius: 8px;
  background: #062f29;
  color: #fff;
  text-align: center;
  box-shadow: 0 18px 42px rgba(0,0,0,0.34);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 90;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
  word-break: break-word;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 63, 54, 0.72);
  backdrop-filter: blur(8px);
}

.login-overlay.hidden {
  display: none;
}

.login-card {
  width: min(420px, 100%);
  display: grid;
  gap: 15px;
  padding: 28px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.login-card h2 {
  font-size: 24px;
}

.login-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #073f36;
  background: #dff8ed;
  font-size: 24px;
  font-weight: 900;
}

.login-submit {
  width: 100%;
  margin-top: 2px;
}

.login-foot {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 1100px) {
  .admin-shell { grid-template-columns: 88px 1fr; }
  .brand div:not(.brand-mark),
  .nav-item span:last-child,
  .sidebar-foot { display: none; }
  .nav-item { justify-content: center; }
  .metric-grid,
  .overview-chart-grid,
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col,
  .two-col-form,
  .split-view,
  .salon-main-layout,
  .community-layout,
  .salon-columns { grid-template-columns: 1fr; }
  .salon-create-form { grid-template-columns: 1fr; }
  .comment-admin-panel { position: static; }
  .salon-list-panel { position: static; }
  .salon-list-panel .salon-columns {
    max-height: none;
    overflow: visible;
  }
  .salon-detail-stats { grid-template-columns: 1fr; }
  .salon-list-panel,
  .salon-detail-panel { min-height: auto; }
  .salon-detail-panel .chat-box {
    min-height: 420px;
    max-height: 62vh;
  }
}

@media (max-width: 720px) {
  .admin-shell { display: block; }
  .sidebar {
    position: static;
    height: auto;
    padding: 12px;
  }
  .brand { padding-bottom: 10px; }
  .brand div:not(.brand-mark),
  .nav-item span:last-child { display: block; }
  .nav-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .nav-item { justify-content: flex-start; }
  .workspace { padding: 18px 14px 28px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .metric-grid,
  .overview-chart-grid,
  .post-grid,
  .community-layout .post-grid { grid-template-columns: 1fr; }
  .overview-chart-grid {
    grid-template-areas:
      "user"
      "module"
      "active"
      "community";
  }
  .chart-summary { grid-template-columns: 1fr; }
  .panel-head { flex-direction: column; }
}
