:root {
  --bg: #f2f5f9;
  --panel: #ffffff;
  --line: #e5eaf1;
  --text: #1f2937;
  --muted: #7a8494;
  --blue: #0f66e8;
  --blue-dark: #0756d4;
  --blue-soft: #eaf2ff;
  --green: #18a957;
  --red: #dc3c3c;
  --warning: #f5a623;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  font-family:
    "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

button {
  font: inherit;
}

.topbar {
  height: 56px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
}

.brand strong {
  display: block;
  font-size: 14px;
  line-height: 1;
}

.brand span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-chip strong {
  display: block;
  font-size: 13px;
  line-height: 1;
}

.user-chip span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.page {
  max-width: 860px;
  margin: 36px auto;
  padding: 0 20px;
  display: grid;
  gap: 18px;
}

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

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

.card-title h2 {
  margin: 0;
  font-size: 15px;
}

.login-card {
  max-width: 460px;
  margin: 10vh auto 0;
  text-align: center;
  padding: 48px 40px;
}

.login-card h1 {
  margin: 0 0 10px;
  font-size: 22px;
}

.login-card p {
  color: var(--muted);
  margin: 0 0 26px;
  line-height: 1.7;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.workspace-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.workspace-head h1 {
  margin: 0 0 6px;
  font-size: 20px;
}

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

.pill {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.pill.ok {
  background: #e7f7ee;
  color: var(--green);
}

.pill.warn {
  background: #fdf3e0;
  color: var(--warning);
}

.pill.error {
  background: #fdeaea;
  color: var(--red);
}

.pill.neutral {
  background: #eef1f5;
  color: var(--muted);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.meta-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.meta-grid strong {
  font-size: 13px;
  word-break: break-all;
}

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

.primary-button {
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 22px;
  font-weight: 600;
  cursor: pointer;
}

.primary-button:hover {
  background: var(--blue-dark);
}

.primary-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ghost-button {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: 500;
  cursor: pointer;
}

.ghost-button:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.ghost-button.danger:hover {
  border-color: var(--red);
  color: var(--red);
}

.text-button {
  background: none;
  border: none;
  color: var(--blue);
  cursor: pointer;
  padding: 0;
}

.signup-hint {
  margin-top: 20px;
  font-size: 13px;
}

.signup-form {
  display: grid;
  gap: 14px;
  text-align: left;
}

.signup-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.signup-form input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 11px;
  font: inherit;
  color: var(--text);
  outline: none;
}

.signup-form input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(15, 102, 232, 0.12);
}

.signup-form .primary-button {
  justify-self: center;
  margin-top: 6px;
}

.error-box {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: #fdeaea;
  color: var(--red);
  font-size: 13px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

th {
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%) translateY(16px);
  background: #111827;
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.error {
  background: var(--red);
}
