/* ts-zhiyuan · 液态玻璃设计系统（浅色通透风） */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --font: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --text: #0f172a;
  --text-secondary: #64748b;
  --text-meta: #94a3b8;
  --brand: #14b8a6;
  --brand-strong: #0d9488;
  --brand-soft: rgba(20, 184, 166, 0.18);
  --ok: #10b981;
  --warn: #fbbf24;
  --danger: #f43f5e;
  --radius: 1rem;
  --radius-lg: 1.25rem;
  --gap: 1rem;
  --gap-lg: 1.5rem;
  --shadow-glass: 0 10px 30px rgba(148, 163, 184, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.65);
  --shadow-float: 0 18px 40px rgba(100, 116, 139, 0.22);
  --blur: 24px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(900px 520px at 8% -10%, rgba(34, 211, 238, 0.28), transparent 55%),
    radial-gradient(780px 480px at 92% 0%, rgba(45, 212, 191, 0.24), transparent 50%),
    radial-gradient(700px 420px at 50% 110%, rgba(56, 189, 248, 0.18), transparent 55%),
    linear-gradient(135deg, rgba(240, 249, 255, 0.95), rgba(236, 254, 255, 0.92), rgba(240, 253, 250, 0.95));
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 30%, rgba(45, 212, 191, 0.22), transparent 35%),
    radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.2), transparent 32%),
    radial-gradient(circle at 60% 80%, rgba(20, 184, 166, 0.16), transparent 40%);
  animation: glow-drift 18s ease-in-out infinite alternate;
}

@keyframes glow-drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(2%, 2%, 0) scale(1.05); }
}

a {
  color: var(--brand-strong);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--brand);
}

/* —— 液态玻璃公式 —— */
.glass-panel {
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow-glass);
  border-radius: var(--radius-lg);
}

.glass-panel-soft {
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-glass);
  border-radius: var(--radius);
}

.glass-input,
.glass-select,
.glass-textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.35) !important;
  background-color: rgba(255, 255, 255, 0.35) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #0f172a !important;
  caret-color: #0f172a;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  outline: none;
  color-scheme: light;
}
.glass-input::placeholder,
.glass-textarea::placeholder {
  color: #94a3b8;
  opacity: 1;
}
.glass-input:focus,
.glass-select:focus,
.glass-textarea:focus {
  background: rgba(255, 255, 255, 0.55) !important;
  background-color: rgba(255, 255, 255, 0.55) !important;
  border-color: rgba(20, 184, 166, 0.45);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18);
}
.glass-input:-webkit-autofill,
.glass-input:-webkit-autofill:hover,
.glass-input:-webkit-autofill:focus,
.glass-textarea:-webkit-autofill {
  -webkit-text-fill-color: #0f172a;
  box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.72) inset;
  transition: background-color 99999s ease-out;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.1rem;
  border-radius: 0.85rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
  user-select: none;
}
.btn:active {
  transform: scale(0.95);
}
.btn-primary {
  background: rgba(20, 184, 166, 0.82);
  backdrop-filter: blur(8px);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  box-shadow: 0 10px 24px rgba(20, 184, 166, 0.22);
}
.btn-primary:hover {
  background: #14b8a6;
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(20, 184, 166, 0.28);
  color: #fff;
}
.btn-secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.45);
  color: #334155;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.65);
  transform: translateY(-2px);
  color: #0f172a;
}
.btn-danger {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.25);
  color: #e11d48;
}
.btn-danger:hover {
  background: rgba(244, 63, 94, 0.2);
  transform: translateY(-1px);
}
.btn-edit {
  background: rgba(96, 165, 250, 0.2);
  border: 1px solid rgba(96, 165, 250, 0.35);
  color: #1d4ed8;
  padding: 0.35rem 0.75rem;
  border-radius: 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
}
.btn-edit:hover {
  background: rgba(96, 165, 250, 0.32);
  transform: translateY(-1px);
  color: #1e40af;
}
.btn-del {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.28);
  color: #e11d48;
  padding: 0.35rem 0.75rem;
  border-radius: 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
}
.btn-del:hover {
  background: rgba(248, 113, 113, 0.22);
  transform: translateY(-1px);
}
.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  border-radius: 0.65rem;
}
.btn-ghost {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.45rem 0.7rem;
}
.btn-ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.25);
}
.btn:disabled,
.btn.disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* Typography */
.text-hero {
  font-size: clamp(1.875rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}
.text-h1 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
}
.text-h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}
.text-body {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}
.text-meta {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-meta);
}
.page-head {
  margin-bottom: var(--gap-lg);
}
.page-head .text-h1 {
  margin-bottom: 0.25rem;
}
.page-head .text-meta {
  margin: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.field > label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.field-error {
  font-size: 0.75rem;
  color: var(--danger);
  margin: 0;
}

.skeleton {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 0.75rem;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1.25rem;
  color: var(--text-secondary);
}
.empty-state .icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.75rem;
  border-radius: 1rem;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: var(--text-meta);
  font-size: 1.25rem;
}
.empty-state p {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
}
.empty-state .text-meta {
  margin-top: 0.35rem;
}

.toast-host {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  min-width: 220px;
  max-width: 360px;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 0.9rem;
  box-shadow: var(--shadow-float);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  animation: toast-in 0.25s ease;
}
.toast.toast-ok {
  border-color: rgba(15, 118, 110, 0.35);
  color: #0f766e;
}
.toast.toast-err {
  border-color: rgba(225, 29, 72, 0.35);
  color: #be123c;
}
.toast.toast-leave {
  animation: toast-out 0.22s ease forwards;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-6px); }
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.12);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.2);
}
::-webkit-scrollbar-track {
  background: transparent;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.2s ease;
}
.pill:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.4);
  color: var(--text);
}
.pill.is-active {
  background: rgba(20, 184, 166, 0.18);
  border-color: rgba(20, 184, 166, 0.35);
  color: var(--brand-strong);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
}
.badge-ok {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}
.badge-off {
  background: rgba(148, 163, 184, 0.2);
  color: #64748b;
}
