:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f6f7fb;
  --card: #ffffff;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

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

img {
  max-width: 100%;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.nav {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius);
  color: #fff;
  background: var(--primary);
  font-size: 14px;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 8px 10px;
  color: var(--muted);
  border-radius: var(--radius);
}

.nav-link:hover {
  background: #eef2ff;
  color: var(--primary);
}

.hero {
  padding: 34px 0 20px;
}

.hero-panel {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 22px;
  align-items: stretch;
}

.notice-card,
.card,
.product-card,
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.notice-card {
  padding: 26px;
}

.notice-card h1 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: 0;
}

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

.quick-card {
  padding: 22px;
  display: grid;
  gap: 12px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 26px 0 14px;
}

.section-title h2 {
  margin: 0;
  font-size: 20px;
}

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0 18px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
}

.chip.is-active,
.chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #eff6ff;
}

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

.product-card {
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  border-color: #bfdbfe;
  box-shadow: 0 14px 36px rgba(37, 99, 235, 0.12);
}

.product-cover {
  height: 138px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
  color: var(--primary);
  font-weight: 700;
  font-size: 20px;
}

.product-card-body {
  padding: 16px;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.product-name {
  margin: 10px 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.price-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.price {
  color: #ef4444;
  font-weight: 800;
  font-size: 22px;
}

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

.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
  white-space: nowrap;
}

.btn:hover {
  background: var(--primary-dark);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
}

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

.btn.secondary {
  background: #fff;
  color: var(--text);
  border-color: var(--line);
}

.btn.secondary:hover {
  color: var(--primary);
  border-color: #bfdbfe;
  background: #eff6ff;
  box-shadow: none;
}

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

.btn.warning {
  background: var(--warning);
}

.btn.small {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
}

.btn[disabled],
.btn.is-loading {
  opacity: 0.72;
  pointer-events: none;
}

.ripple {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(1);
  animation: ripple 0.5s ease-out;
  background: rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

@keyframes ripple {
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(18);
  }
}

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

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

.field label {
  color: #374151;
  font-weight: 600;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

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

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.panel {
  padding: 18px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 18px;
  align-items: start;
  margin: 26px 0;
}

.prose h1,
.prose h2,
.prose h3 {
  margin: 0 0 10px;
}

.prose p {
  color: var(--muted);
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

.status.success {
  background: #dcfce7;
  color: #166534;
}

.status.danger {
  background: #fee2e2;
  color: #991b1b;
}

.status.muted {
  background: #f3f4f6;
  color: #4b5563;
}

.flash-stack,
.toast-stack {
  position: fixed;
  top: 82px;
  right: 18px;
  z-index: 60;
  display: grid;
  gap: 10px;
}

.flash,
.toast {
  min-width: 240px;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: var(--radius);
  color: #fff;
  background: #111827;
  box-shadow: var(--shadow);
}

.flash.success,
.toast.success {
  background: var(--success);
}

.flash.error,
.toast.error {
  background: var(--danger);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

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

.table th,
.table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.table th {
  color: #374151;
  background: #f9fafb;
  font-weight: 700;
}

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

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

.secret-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px dashed #bfdbfe;
  border-radius: var(--radius);
  background: #eff6ff;
  font-family: Consolas, Monaco, monospace;
}

.footer {
  padding: 28px 0;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 900px) {
  .hero-panel,
  .detail-layout,
  .form-grid,
  .grid {
    grid-template-columns: 1fr;
  }

  .nav {
    height: auto;
    padding: 12px 0;
    align-items: flex-start;
  }

  .nav-links {
    justify-content: flex-end;
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .notice-card h1 {
    font-size: 23px;
  }

  .price-row {
    align-items: start;
    flex-direction: column;
  }
}

