/* momo platform · unified design system */
:root {
  --p-bg: #07070a;
  --p-bg-elevated: #111116;
  --p-surface: rgba(22, 22, 28, 0.72);
  --p-surface-solid: #16161c;
  --p-border: rgba(255, 255, 255, 0.08);
  --p-border-hover: rgba(255, 255, 255, 0.16);
  --p-text: #f4f4f5;
  --p-muted: #a1a1aa;
  --p-faint: #71717a;
  --p-violet: #a78bfa;
  --p-violet-dim: #7c3aed;
  --p-cyan: #22d3ee;
  --p-emerald: #34d399;
  --p-amber: #fbbf24;
  --p-rose: #fb7185;
  --p-radius: 16px;
  --p-radius-sm: 10px;
  --p-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
  --p-font: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --p-mono: ui-monospace, "Cascadia Code", monospace;
}

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

html { scroll-behavior: smooth; }

body.p-body {
  font-family: var(--p-font);
  color: var(--p-text);
  background: var(--p-bg);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.p-body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(124, 58, 237, 0.22), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 0%, rgba(34, 211, 238, 0.1), transparent 50%),
    radial-gradient(ellipse 40% 30% at 0% 100%, rgba(167, 139, 250, 0.08), transparent 50%),
    var(--p-bg);
}

body.p-body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
}

a { color: var(--p-violet); text-decoration: none; transition: color 0.15s; }
a:hover { color: #c4b5fd; }

.p-container { width: min(1120px, 100% - 2rem); margin-inline: auto; }
.p-container--narrow { width: min(440px, 100% - 2rem); margin-inline: auto; }

/* header */
.p-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--p-border);
  margin-bottom: 2rem;
}
.p-brand {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--p-text);
}
.p-brand span { color: var(--p-violet); }
.p-nav { display: flex; align-items: center; gap: 1.25rem; font-size: 0.875rem; }
.p-nav a { color: var(--p-muted); }
.p-nav a:hover, .p-nav a.is-active { color: var(--p-text); }
.p-nav button {
  background: none; border: none; cursor: pointer;
  color: var(--p-muted); font: inherit; font-size: 0.875rem;
}
.p-nav button:hover { color: var(--p-text); }

/* hero */
.p-hero { text-align: center; padding: 2.5rem 0 2rem; }
.p-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 30%, var(--p-violet) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.p-hero p { color: var(--p-muted); margin-top: 0.65rem; font-size: 0.95rem; max-width: 36em; margin-inline: auto; }
.p-eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--p-cyan);
  margin-bottom: 0.75rem;
}

/* cards */
.p-card {
  background: var(--p-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius);
  padding: 1.35rem 1.4rem;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.p-card:hover {
  border-color: var(--p-border-hover);
  transform: translateY(-2px);
  box-shadow: var(--p-shadow);
}
.p-card--accent-violet:hover { border-color: rgba(167, 139, 250, 0.45); }
.p-card--accent-cyan:hover { border-color: rgba(34, 211, 238, 0.4); }
.p-card--accent-emerald:hover { border-color: rgba(52, 211, 153, 0.4); }
.p-card h2, .p-card h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.02em; }
.p-card p { color: var(--p-muted); font-size: 0.875rem; margin-top: 0.45rem; line-height: 1.55; }

.p-grid { display: grid; gap: 1rem; }
.p-grid--2 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.p-grid--3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.p-bento {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(6, 1fr);
}
@media (max-width: 768px) { .p-bento { grid-template-columns: 1fr; } }
.p-bento .p-card--wide { grid-column: span 3; }
.p-bento .p-card--tall { grid-row: span 1; }
@media (max-width: 768px) {
  .p-bento .p-card--wide { grid-column: span 1; }
}

/* badges */
.p-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
  background: rgba(167, 139, 250, 0.15);
  color: #c4b5fd;
  border: 1px solid rgba(167, 139, 250, 0.25);
}
.p-badge--green {
  background: rgba(52, 211, 153, 0.12);
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.25);
}
.p-badge--amber {
  background: rgba(251, 191, 36, 0.12);
  color: #fcd34d;
  border-color: rgba(251, 191, 36, 0.25);
}
.p-badge--cyan {
  background: rgba(34, 211, 238, 0.12);
  color: #67e8f9;
  border-color: rgba(34, 211, 238, 0.25);
}

/* buttons */
.p-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--p-radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  text-decoration: none;
  font-family: inherit;
}
.p-btn:active { transform: scale(0.98); }
.p-btn--primary {
  background: linear-gradient(135deg, var(--p-violet-dim), #6d28d9);
  color: #fff;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
}
.p-btn--primary:hover { background: linear-gradient(135deg, #8b5cf6, var(--p-violet-dim)); color: #fff; }
.p-btn--cyan {
  background: linear-gradient(135deg, #0891b2, #0e7490);
  color: #fff;
  box-shadow: 0 4px 14px rgba(34, 211, 238, 0.25);
}
.p-btn--cyan:hover { color: #fff; filter: brightness(1.08); }
.p-btn--emerald {
  background: linear-gradient(135deg, #059669, #047857);
  color: #fff;
  box-shadow: 0 4px 14px rgba(52, 211, 153, 0.25);
}
.p-btn--emerald:hover { color: #fff; filter: brightness(1.08); }
.p-btn--ghost {
  background: transparent;
  color: var(--p-muted);
  border: 1px solid var(--p-border);
}
.p-btn--ghost:hover { color: var(--p-text); border-color: var(--p-border-hover); }
.p-btn--block { width: 100%; }
.p-btn--sm { padding: 0.4rem 0.85rem; font-size: 0.8rem; }
.p-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.p-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }

/* forms */
.p-panel {
  background: var(--p-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius);
  padding: 1.75rem;
  box-shadow: var(--p-shadow);
}
.p-field { margin-bottom: 1rem; }
.p-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--p-muted);
  margin-bottom: 0.4rem;
}
.p-input, .p-select, .p-textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius-sm);
  color: var(--p-text);
  font: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.p-input:focus, .p-select:focus, .p-textarea:focus {
  border-color: rgba(167, 139, 250, 0.5);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}
.p-input::placeholder { color: var(--p-faint); }
.p-check { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--p-muted); }
.p-check input { accent-color: var(--p-violet-dim); }

/* alerts */
.p-alert {
  padding: 0.75rem 1rem;
  border-radius: var(--p-radius-sm);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  border: 1px solid;
}
.p-alert--error {
  background: rgba(251, 113, 133, 0.1);
  border-color: rgba(251, 113, 133, 0.3);
  color: #fecdd3;
}
.p-alert--success {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.3);
  color: #a7f3d0;
}

/* section */
.p-section { margin-bottom: 2.5rem; }
.p-section-head { margin-bottom: 1.25rem; }
.p-section-head h2 { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.02em; }
.p-section-head p { font-size: 0.85rem; color: var(--p-faint); margin-top: 0.25rem; }

/* login shell */
.p-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.p-login-card { width: 100%; max-width: 400px; }
.p-login-card .p-hero { padding: 0 0 1.5rem; }
.p-login-card .p-hero h1 {
  font-size: 1.35rem;
  background: none;
  -webkit-text-fill-color: var(--p-text);
  color: var(--p-text);
}
.p-login-foot {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.78rem;
  color: var(--p-faint);
}

/* table */
.p-table-wrap {
  overflow: hidden;
  border-radius: var(--p-radius);
  border: 1px solid var(--p-border);
  background: var(--p-surface);
  backdrop-filter: blur(12px);
}
.p-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.p-table th {
  text-align: left;
  padding: 0.85rem 1rem;
  color: var(--p-faint);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--p-border);
}
.p-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--p-border);
  color: var(--p-text);
}
.p-table tr:last-child td { border-bottom: none; }
.p-table tr:hover td { background: rgba(255, 255, 255, 0.02); }
.p-table a { color: var(--p-muted); }
.p-table a:hover { color: var(--p-violet); }
.p-table .p-link-danger { color: var(--p-rose); }
.p-table .p-link-danger:hover { color: #fda4af; }

/* page header */
.p-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.p-page-head h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; }

/* empty */
.p-empty {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--p-faint);
  font-size: 0.875rem;
  border: 1px dashed var(--p-border);
  border-radius: var(--p-radius);
}

/* footer */
.p-footer {
  text-align: center;
  padding: 2.5rem 0 1.5rem;
  font-size: 0.8rem;
  color: var(--p-faint);
}
.p-footer a { color: var(--p-muted); }
.p-footer span { margin: 0 0.5rem; opacity: 0.4; }

/* misc */
.p-loading { text-align: center; color: var(--p-faint); padding: 3rem; }
.p-code {
  font-family: var(--p-mono);
  font-size: 0.8em;
  background: rgba(0, 0, 0, 0.35);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  color: var(--p-cyan);
}
.p-muted { color: var(--p-muted); font-size: 0.875rem; }
.p-dash-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.p-dash-card {
  display: block;
  padding: 1.35rem;
  border-radius: var(--p-radius);
  border: 1px solid var(--p-border);
  background: var(--p-surface);
  transition: border-color 0.2s, transform 0.2s;
  text-decoration: none;
  color: inherit;
}
.p-dash-card:hover { border-color: rgba(167, 139, 250, 0.4); transform: translateY(-2px); color: inherit; }
.p-dash-card h2 { font-size: 1rem; font-weight: 700; }
.p-dash-card p { font-size: 0.8rem; color: var(--p-muted); margin-top: 0.35rem; }

/* team app specifics */
.p-steps { display: flex; gap: 0.5rem; justify-content: center; margin-bottom: 1.25rem; }
.p-step-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--p-border);
  transition: background 0.2s, transform 0.2s;
}
.p-step-dot.is-active { background: var(--p-violet); transform: scale(1.2); }
.p-step-dot.is-done { background: var(--p-emerald); }

.p-confirm-banner {
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.25);
  border-radius: var(--p-radius-sm);
  padding: 1rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}
.p-confirm-banner strong { display: block; color: var(--p-violet); margin-bottom: 0.35rem; }
.p-confirm-banner p { color: var(--p-muted); }

.p-highlight-field {
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: var(--p-radius-sm);
  padding: 0.85rem;
  margin-bottom: 0.75rem;
  animation: p-pulse 1.2s ease-in-out 2;
}
@keyframes p-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.25); }
  50% { box-shadow: 0 0 0 6px rgba(251, 191, 36, 0); }
}
.p-field-hint { font-size: 0.75rem; color: var(--p-faint); margin: 0.25rem 0 0.5rem; }

.p-done {
  text-align: center;
  padding: 1rem 0;
}
.p-done-icon {
  width: 56px; height: 56px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: var(--p-emerald);
  font-size: 1.5rem;
  line-height: 56px;
  font-weight: 700;
}
.p-group-tag { color: var(--p-cyan); font-weight: 600; margin-top: 0.5rem; }

.p-list-item {
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius-sm);
  padding: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.2);
}
.p-list-item .p-badge { margin-left: 0.5rem; margin-bottom: 0; vertical-align: middle; }
.p-list-item .meta { color: var(--p-faint); font-size: 0.75rem; margin: 0.4rem 0; }

.p-err { min-height: 1.2em; font-size: 0.8rem; color: var(--p-rose); margin-top: 0.5rem; }

.p-wrap-team { max-width: 440px; margin: 0 auto; padding: 2rem 1rem 3rem; }
.p-wrap-team .p-hero { padding-top: 0.5rem; padding-bottom: 1.25rem; }
.p-wrap-team .p-hero h1 { font-size: 1.4rem; }
.p-wrap-wide { max-width: 640px; margin: 0 auto; padding: 2rem 1rem 3rem; }

/* pagination */
.p-pagination nav { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.p-pagination a, .p-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  font-size: 0.8rem;
  border: 1px solid var(--p-border);
  color: var(--p-muted);
  text-decoration: none;
}
.p-pagination a:hover { border-color: var(--p-border-hover); color: var(--p-text); }
.p-pagination span[aria-current="page"] {
  background: rgba(124, 58, 237, 0.2);
  border-color: rgba(167, 139, 250, 0.35);
  color: var(--p-violet);
}
