:root {
  --bg: #0b1220;
  --panel: rgba(16, 24, 40, 0.92);
  --panel-2: rgba(15, 23, 42, 0.78);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e5eefb;
  --muted: #94a3b8;
  --accent: #4ea1ff;
  --accent-2: #66c2ff;
  --danger: #ff6b6b;
  --ok: #33d69f;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.34);
  --radius: 22px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top, rgba(78, 161, 255, 0.18), transparent 34%),
    radial-gradient(circle at bottom right, rgba(51, 214, 159, 0.10), transparent 30%),
    linear-gradient(180deg, #07101d, var(--bg));
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

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

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

.hidden { display: none !important; }

.container {
  width: min(1320px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.shell {
  background: rgba(7, 16, 29, 0.35);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand h1, .brand h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.02em;
}

.brand p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(420px, 1fr);
  gap: 20px;
  padding: 20px;
}

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

.panel {
  min-width: 0;
}

.card {
  padding: 24px;
  text-align: center;
}

.avatar-wrap {
  position: relative;
  width: 124px;
  height: 124px;
  margin: 8px auto 18px;
}

.avatar {
  width: 124px;
  height: 124px;
  border-radius: 999px;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,0.12);
  box-shadow: 0 14px 40px rgba(0,0,0,0.35);
}

.blue-v {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,0.35));
}

.name {
  margin: 4px 0 6px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.bag {
  margin: 0 0 16px;
  font-size: 15px;
  color: var(--accent-2);
  font-weight: 700;
}

.meta-list {
  display: grid;
  gap: 10px;
  text-align: left;
  margin: 18px 0 22px;
}

.meta-item {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--panel-2);
  border-radius: 16px;
  border: 1px solid var(--line);
}

.meta-item span:first-child {
  color: var(--muted);
}

.meta-item span:last-child {
  text-align: right;
  word-break: break-all;
}

.primary-btn, .secondary-btn, .danger-btn, .ghost-btn {
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  cursor: pointer;
  transition: transform 0.14s ease, opacity 0.14s ease, background 0.14s ease;
}

.primary-btn:hover, .secondary-btn:hover, .danger-btn:hover, .ghost-btn:hover {
  transform: translateY(-1px);
}

.primary-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  font-weight: 700;
}

.secondary-btn {
  background: rgba(255,255,255,0.08);
  color: var(--text);
  border: 1px solid var(--line);
}

.danger-btn {
  background: rgba(255, 107, 107, 0.16);
  color: #ffd2d2;
  border: 1px solid rgba(255, 107, 107, 0.26);
}

.ghost-btn {
  background: transparent;
  color: var(--muted);
  border: 1px dashed var(--line);
}

.button-row {
  display: grid;
  gap: 10px;
}

.small-note {
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.status {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 14px;
}

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

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

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

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

input, textarea {
  width: 100%;
  color: var(--text);
  background: rgba(8, 15, 28, 0.72);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
}

input:focus, textarea:focus {
  border-color: rgba(78, 161, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(78, 161, 255, 0.12);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

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

.toolbar .spacer {
  flex: 1;
}

.table-wrap {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(4, 10, 19, 0.42);
}

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

th, td {
  padding: 12px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  vertical-align: top;
  text-align: left;
  font-size: 13px;
}

th {
  color: var(--muted);
  font-weight: 600;
  position: sticky;
  top: 0;
  background: rgba(4, 10, 19, 0.9);
  backdrop-filter: blur(12px);
}

tbody tr:hover {
  background: rgba(78, 161, 255, 0.06);
}

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  background: rgba(78, 161, 255, 0.14);
  color: #cfe6ff;
  border: 1px solid rgba(78, 161, 255, 0.18);
}

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

.actions button {
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 12px;
}

.login-box {
  width: min(480px, calc(100% - 24px));
  margin: 48px auto;
  padding: 24px;
}

.login-box h1 {
  margin: 0 0 10px;
}

.login-box p {
  color: var(--muted);
  margin: 0 0 18px;
}

.login-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.preview {
  display: flex;
  gap: 14px;
  align-items: center;
}

.preview img {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  object-fit: cover;
}

@media (max-width: 960px) {
  .page-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 18px, 100%);
  }
  .topbar {
    padding: 16px;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
}
