:root {
  --bg: #fff5f8;
  --panel: #ffffff;
  --line: #ffd6e3;
  --line-strong: #f7a6bb;
  --text: #3d2b33;
  --muted: #9b7280;
  --primary: #f05a7a;
  --primary-dark: #d93f64;
  --blue: #4a9ee8;
  --gold: #f0a030;
  --danger: #ff4d5f;
  --green: #32a66a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1180px;
  color: var(--text);
  background: var(--bg);
}

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

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

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px;
  background: radial-gradient(circle at 50% 0%, #ffe1eb 0%, #fff5f8 44%, #fff 100%);
}

.login-card {
  width: 390px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(61, 43, 51, 0.12);
}

.login-desc {
  margin: 12px 0 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.login-label {
  display: block;
  margin: 16px 0 8px;
  color: var(--text);
  font-weight: 700;
}

.login-input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  background: #fff;
}

.login-button {
  width: 100%;
  height: 44px;
  margin-top: 24px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--primary);
  cursor: pointer;
  font-weight: 700;
}

.login-button:disabled,
.action-button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 18px;
  color: #fff;
  background: linear-gradient(180deg, #4a2f38 0%, #2f2027 100%);
}

.brand {
  padding: 4px 10px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
}

.brand-subtitle {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 24px;
}

.nav-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 0;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.76);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.nav-button.is-active,
.nav-button:hover {
  color: #fff;
  background: rgba(240, 90, 122, 0.28);
}

.main {
  padding: 28px 32px 48px;
}

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

.page-title {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
}

.page-desc {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.operator {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.logout-button {
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--primary-dark);
  background: #fff8fb;
  cursor: pointer;
}

.operator-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.kpi-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.kpi-card {
  padding: 18px;
}

.kpi-label {
  color: var(--muted);
  font-size: 13px;
}

.kpi-value {
  margin-top: 8px;
  font-size: 30px;
  font-weight: 700;
}

.kpi-hint {
  margin-top: 8px;
  color: var(--primary);
  font-size: 13px;
}

.panel {
  overflow: hidden;
}

.loading-line {
  margin: -4px 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.panel-title {
  margin: 0;
  font-size: 18px;
}

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

.search-input,
.filter-select {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  background: #fff;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 15px 20px;
  border-bottom: 1px solid #ffe9ef;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

.table th {
  color: var(--muted);
  font-weight: 600;
  background: #fff9fb;
}

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

.primary-text {
  font-weight: 700;
}

.sub-text {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: #fff0f5;
  font-size: 12px;
  font-weight: 600;
}

.tag.is-blue {
  color: #2476b8;
  background: #eaf5ff;
}

.tag.is-gold {
  color: #a86300;
  background: #fff3dd;
}

.tag.is-green {
  color: #19764a;
  background: #e9f8f0;
}

.tag.is-danger {
  color: #c92d3b;
  background: #fff0f2;
}

.action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.action-button {
  min-width: 68px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 11px;
  color: #fff;
  background: var(--primary);
  cursor: pointer;
}

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

.action-button.is-muted {
  color: var(--primary-dark);
  border-color: var(--line-strong);
  background: #fff;
}

.action-button.is-blue {
  background: var(--blue);
}

.action-button.is-gold {
  background: var(--gold);
}

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

.empty {
  padding: 50px 20px;
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  right: 28px;
  bottom: 28px;
  min-width: 220px;
  padding: 13px 16px;
  border-radius: 8px;
  color: #fff;
  background: rgba(61, 43, 51, 0.92);
  box-shadow: 0 16px 42px rgba(61, 43, 51, 0.18);
}

.toast[hidden] {
  display: none;
}

.detail-drawer {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  justify-content: flex-end;
  background: rgba(61, 43, 51, 0.28);
}

.detail-panel {
  width: 520px;
  height: 100vh;
  overflow-y: auto;
  padding: 26px;
  border-left: 1px solid var(--line);
  background: #fff;
  box-shadow: -18px 0 50px rgba(61, 43, 51, 0.16);
}

.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.detail-title {
  font-size: 20px;
  font-weight: 700;
}

.detail-sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.detail-close {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--primary-dark);
  background: #fff8fb;
  cursor: pointer;
}

.detail-section {
  margin-top: 22px;
}

.detail-section h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.detail-section p {
  margin: 8px 0;
  color: var(--text);
  line-height: 1.7;
}

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

.cert-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff9fb;
}

.cert-item small {
  color: var(--muted);
}

.photo-audit-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.photo-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff9fb;
}

.photo-preview {
  display: grid;
  place-items: center;
  height: 180px;
  overflow: hidden;
  border-radius: 8px;
  color: var(--muted);
  background: #ffeef4;
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0;
  color: var(--muted);
  font-size: 13px;
}

.empty-inline {
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  background: #fff9fb;
  text-align: center;
}
