:root {
  --bg: #f3ede3;
  --bg-elevated: rgba(252, 247, 240, 0.94);
  --bg-panel: rgba(255, 251, 246, 0.98);
  --bg-soft: rgba(184, 145, 84, 0.08);
  --line: rgba(120, 93, 55, 0.14);
  --line-strong: rgba(120, 93, 55, 0.24);
  --text: #34291f;
  --text-soft: rgba(66, 52, 37, 0.76);
  --text-dim: rgba(92, 73, 50, 0.54);
  --primary: #b89154;
  --primary-strong: #d8bb82;
  --warn: #c59a63;
  --danger: #bf6f60;
  --success: #708d72;
  --shadow: 0 22px 56px rgba(104, 82, 50, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color-scheme: light;
  background:
    radial-gradient(circle at 12% 14%, rgba(216, 187, 130, 0.2), transparent 28%),
    radial-gradient(circle at 86% 14%, rgba(191, 111, 96, 0.08), transparent 24%),
    radial-gradient(circle at 72% 78%, rgba(184, 145, 84, 0.12), transparent 20%),
    linear-gradient(135deg, #faf6ef 0%, #f3ede3 52%, #efe7db 100%);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(147, 116, 72, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(147, 116, 72, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  cursor: pointer;
  border: 0;
}

.page-wrap {
  min-height: 100vh;
  padding: 24px;
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(360px, 520px) minmax(420px, 1fr);
  gap: 28px;
  align-items: stretch;
  min-height: calc(100vh - 48px);
}

.glass-card,
.panel-card,
.chart-card,
.table-card,
.info-card {
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.96), rgba(247, 241, 233, 0.96));
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.login-brand {
  position: relative;
  overflow: hidden;
  padding: 34px;
}

.login-brand::after {
  content: "";
  position: absolute;
  inset: auto -80px -120px auto;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(216, 187, 130, 0.2), transparent 64%);
}

.login-brand-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(184, 145, 84, 0.18);
  background: rgba(184, 145, 84, 0.08);
  color: #8a6a3c;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-title {
  margin: 22px 0 14px;
  font-size: 42px;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.brand-title small {
  display: block;
  margin-top: 8px;
  font-size: 18px;
  color: var(--text-soft);
  font-weight: 500;
}

.brand-visual {
  margin: 30px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  border-radius: var(--radius-xl);
  background: rgba(255, 251, 246, 0.4);
  border: 1px solid rgba(184, 145, 84, 0.08);
}

.brand-visual svg {
  width: 100%;
  max-width: 280px;
  height: auto;
  filter: drop-shadow(0 12px 24px rgba(184, 145, 84, 0.12));
}

.brand-tags {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.brand-tag {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(184, 145, 84, 0.08);
  border: 1px solid rgba(184, 145, 84, 0.14);
  color: var(--text-soft);
  font-size: 12px;
}

.stat-card .label,
.mini-card .label,
.detail-item .label {
  display: inline-flex;
  align-items: center;
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-card .value {
  display: block;
  margin-top: 10px;
  font-size: 28px;
  font-weight: 700;
}

.login-form-card {
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-panel-intro {
  display: grid;
  gap: 8px;
}

.panel-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(184, 145, 84, 0.08);
  color: #8a6a3c;
  font-size: 12px;
  letter-spacing: 0.08em;
}

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

.panel-title {
  margin: 0;
  font-size: 32px;
  line-height: 1.2;
}

.panel-subtitle {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.7;
  font-size: 13px;
}

.login-submit {
  min-width: 120px;
  margin-top: 4px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  background: rgba(184, 145, 84, 0.06);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.lang-btn {
  min-width: 58px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  font-size: 12px;
  transition: 0.2s ease;
}

.lang-btn.active {
  background: linear-gradient(135deg, rgba(216, 187, 130, 0.28), rgba(184, 145, 84, 0.16));
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(184, 145, 84, 0.2);
}

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

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

.field label {
  font-size: 13px;
  color: var(--text-soft);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid rgba(120, 93, 55, 0.14);
  background: rgba(255, 252, 248, 0.96);
  color: var(--text);
  padding: 10px 12px;
  outline: none;
  font-size: 13px;
  transition: 0.2s ease;
}

.field textarea {
  min-height: 130px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(184, 145, 84, 0.48);
  box-shadow: 0 0 0 4px rgba(184, 145, 84, 0.12);
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(92, 73, 50, 0.42);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

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

.btn:disabled {
  opacity: 0.56;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  color: #fffaf5;
  background: linear-gradient(135deg, #d3b06d, #b89154);
  box-shadow: 0 14px 30px rgba(184, 145, 84, 0.24);
}

.login-submit {
  width: 132px;
  justify-self: start;
}

.btn-secondary {
  color: var(--text);
  background: rgba(255, 251, 246, 0.84);
  border: 1px solid rgba(120, 93, 55, 0.14);
}

.btn-danger {
  color: #fff6f5;
  background: linear-gradient(135deg, rgba(223, 114, 104, 0.92), rgba(193, 67, 72, 0.92));
}

.btn-soft {
  color: #8a6a3c;
  background: rgba(184, 145, 84, 0.12);
}

.admin-shell {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 16px;
  min-height: calc(100vh - 48px);
}

.sidebar {
  padding: 18px 14px;
  position: sticky;
  top: 24px;
  height: calc(100vh - 48px);
  background:
    linear-gradient(180deg, rgba(74, 58, 42, 0.98), rgba(52, 40, 29, 0.98)),
    linear-gradient(135deg, rgba(216, 187, 130, 0.12), transparent 52%);
  color: #f8f1e7;
}

.sidebar-brand {
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(248, 233, 214, 0.12);
}

.sidebar-brand strong {
  display: block;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.sidebar-brand span {
  display: block;
  margin-top: 6px;
  color: rgba(248, 233, 214, 0.72);
  font-size: 11px;
  line-height: 1.5;
}

.nav-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 14px;
  color: rgba(248, 233, 214, 0.74);
  border: 1px solid transparent;
  font-size: 13px;
  transition: 0.2s ease;
}

.nav-item:hover,
.nav-item.active {
  color: #fffaf4;
  background: rgba(216, 187, 130, 0.14);
  border-color: rgba(248, 233, 214, 0.12);
}

.nav-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8d0a0, #c7a466);
  box-shadow: 0 0 14px rgba(184, 145, 84, 0.28);
}

.admin-main {
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  margin-bottom: 14px;
}

.topbar h1 {
  margin: 0;
  font-size: 24px;
}

.topbar p {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 13px;
}

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

.topbar-chip {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(184, 145, 84, 0.06);
  color: var(--text-soft);
  font-size: 12px;
}

.page-grid {
  display: grid;
  gap: 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat-card,
.mini-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 252, 248, 0.98), rgba(245, 238, 229, 0.96));
  box-shadow: var(--shadow);
}

.stat-card .value,
.brand-grid .value {
  margin-top: 8px;
  font-size: 22px;
}

.stat-card .meta {
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 12px;
}

.charts-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
}

.chart-card,
.table-card,
.panel-card {
  padding: 16px;
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.card-title-row h2,
.card-title-row h3 {
  margin: 0;
  font-size: 17px;
}

.card-title-row p {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 12px;
}

.chart-box {
  width: 100%;
  height: 320px;
}

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

.latest-item {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 251, 246, 0.92);
  border: 1px solid rgba(120, 93, 55, 0.1);
}

.latest-item strong {
  font-size: 14px;
}

.latest-item span {
  color: var(--text-soft);
  font-size: 12px;
}

.filters-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(140px, 0.95fr) minmax(120px, 0.8fr) auto;
  gap: 8px;
  margin-bottom: 10px;
  align-items: center;
}

.filters-bar input,
.filters-bar select {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(120, 93, 55, 0.14);
  background: rgba(255, 252, 248, 0.96);
  color: var(--text);
  font-size: 12px;
  line-height: 32px;
}

.filters-bar input::placeholder {
  color: rgba(92, 73, 50, 0.42);
}

.filters-bar .btn {
  min-height: 30px;
  height: 30px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: 999px;
  box-shadow: none;
}

.filters-bar .btn + .btn {
  margin-left: 0;
}

.table-wrap {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(120, 93, 55, 0.1);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

thead {
  background: rgba(184, 145, 84, 0.08);
}

th,
td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(120, 93, 55, 0.09);
  vertical-align: top;
}

th {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

td {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.45;
}

tbody tr:hover {
  background: rgba(184, 145, 84, 0.06);
}

.cell-title {
  display: grid;
  gap: 3px;
}

.cell-title strong {
  color: var(--text);
  font-size: 13px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.status-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-normal,
.status-resolved {
  color: #cbf5dd;
  background: rgba(94, 189, 140, 0.16);
}

.status-normal::before,
.status-resolved::before {
  background: var(--success);
}

.status-prohibit,
.status-closed {
  color: #ffd8d3;
  background: rgba(223, 114, 104, 0.16);
}

.status-prohibit::before,
.status-closed::before {
  background: var(--danger);
}

.status-pending {
  color: #ffe8c8;
  background: rgba(201, 123, 71, 0.16);
}

.status-pending::before {
  background: var(--warn);
}

.status-processing {
  color: #7f6337;
  background: rgba(184, 145, 84, 0.16);
}

.status-processing::before {
  background: var(--primary);
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.link-btn {
  padding: 0;
  background: transparent;
  color: #8a6a3c;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: var(--text-soft);
  font-size: 12px;
}

.pagination-actions {
  display: flex;
  gap: 10px;
}

.empty-state {
  padding: 42px 18px;
  text-align: center;
  color: var(--text-soft);
}

.drawer-mask,
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(58, 45, 31, 0.22);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  z-index: 90;
  transition: 0.2s ease;
}

.drawer-mask.show,
.modal-mask.show {
  opacity: 1;
  pointer-events: auto;
}

.drawer-panel {
  position: fixed;
  top: 20px;
  right: 20px;
  bottom: 20px;
  width: min(560px, calc(100vw - 40px));
  padding: 24px;
  background: linear-gradient(180deg, rgba(255, 252, 248, 0.98), rgba(245, 238, 229, 0.98));
  border: 1px solid rgba(120, 93, 55, 0.14);
  border-radius: 28px;
  box-shadow: var(--shadow);
  transform: translateX(24px);
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  transition: 0.24s ease;
  overflow: auto;
}

.drawer-panel.show {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

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

.drawer-head h3,
.modal-head h3 {
  margin: 0;
  font-size: 24px;
}

.close-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(184, 145, 84, 0.12);
  color: var(--text);
}

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

.detail-item {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 251, 246, 0.92);
}

.detail-item .value {
  display: block;
  margin-top: 10px;
  line-height: 1.7;
  color: var(--text);
  word-break: break-word;
}

.detail-block {
  margin-top: 18px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 251, 246, 0.92);
  border: 1px solid rgba(120, 93, 55, 0.1);
}

.detail-block pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-soft);
}

.timeline {
  display: grid;
  gap: 16px;
  margin-top: 12px;
}

.timeline-item {
  position: relative;
  padding-left: 24px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--warn));
  box-shadow: 0 0 14px rgba(184, 145, 84, 0.2);
}

.timeline-item::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 22px;
  bottom: -16px;
  width: 1px;
  background: rgba(120, 93, 55, 0.16);
}

.timeline-item:last-child::after {
  display: none;
}

.timeline-item strong {
  display: block;
  margin-bottom: 6px;
}

.timeline-item span,
.timeline-item p {
  color: var(--text-soft);
  margin: 4px 0 0;
  line-height: 1.7;
}

.modal-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(480px, calc(100vw - 40px));
  padding: 24px;
  transform: translate(-50%, calc(-50% + 12px));
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  transition: 0.2s ease;
  background: linear-gradient(180deg, rgba(255, 252, 248, 0.98), rgba(245, 238, 229, 0.98));
  border-radius: 24px;
  border: 1px solid rgba(120, 93, 55, 0.14);
  box-shadow: var(--shadow);
}

.modal-panel.show {
  transform: translate(-50%, -50%);
  opacity: 1;
  pointer-events: auto;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
}

.toast-stack {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: grid;
  gap: 12px;
  z-index: 50;
}

.toast {
  min-width: 280px;
  max-width: 420px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 252, 248, 0.98);
  border: 1px solid rgba(120, 93, 55, 0.14);
  box-shadow: var(--shadow);
  color: var(--text);
}

.toast.error {
  border-color: rgba(223, 114, 104, 0.28);
}

.toast.success {
  border-color: rgba(94, 189, 140, 0.28);
}

.muted {
  color: var(--text-soft);
}

.legal-page {
  background:
    radial-gradient(circle at top, rgba(216, 187, 130, 0.16), transparent 34%),
    linear-gradient(180deg, #faf6ef 0%, #f3ede3 100%);
}

.legal-page::before {
  display: none;
}

.legal-shell {
  min-height: 100vh;
  padding: 20px 16px 32px;
}

.legal-container {
  width: min(100%, 760px);
  margin: 0 auto;
}

.legal-header {
  margin-bottom: 16px;
  padding: 20px 18px;
}

.legal-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(184, 145, 84, 0.08);
  color: #8a6a3c;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.legal-title {
  margin: 14px 0 0;
  font-size: 26px;
  line-height: 1.35;
}

.legal-desc {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.7;
}

.legal-card {
  padding: 20px 18px 24px;
}

.legal-line {
  margin: 0;
  font-size: 16px;
  line-height: 1.88;
  color: #2b2b2b;
  font-weight: 600;
  white-space: pre-wrap;
  word-break: break-word;
}

.legal-line + .legal-line {
  margin-top: 12px;
}

.legal-line.is-main-title {
  font-size: 24px;
  line-height: 1.4;
  font-weight: 800;
  color: #111111;
}

.legal-line.is-meta {
  font-size: 14px;
  line-height: 1.75;
  color: #4b5563;
  font-weight: 500;
}

.legal-line.is-section-title,
.legal-line.is-sub-title {
  font-weight: 800;
  color: #111111;
}

.legal-line.is-section-title {
  margin-top: 18px;
  font-size: 19px;
}

.legal-line.is-sub-title {
  margin-top: 10px;
  font-size: 17px;
}

@media (max-width: 1320px) {
  .login-layout,
  .admin-shell,
  .stats-grid,
  .charts-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .filters-bar {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .page-wrap {
    padding: 16px;
  }

  .brand-title {
    font-size: 38px;
  }

  .brand-grid,
  .detail-grid,
  .filters-bar {
    grid-template-columns: 1fr;
  }

  .topbar,
  .chart-card,
  .table-card,
  .panel-card,
  .login-form-card,
  .login-brand {
    padding: 18px;
  }

  .legal-shell {
    padding: 14px 12px 28px;
  }

  .legal-header,
  .legal-card {
    padding: 18px 16px;
  }

  .legal-title {
    font-size: 22px;
  }

  .legal-line {
    font-size: 15px;
  }

  .legal-line.is-main-title {
    font-size: 22px;
  }
}
