:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --panel: #ffffff;
  --text: #17191c;
  --muted: #66707d;
  --line: #dce2ea;
  --accent: #1f513b;
  --shadow: 0 24px 70px rgba(26, 35, 46, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(247, 248, 250, 0.72)),
    repeating-linear-gradient(90deg, rgba(33, 42, 54, 0.045) 0 1px, transparent 1px 80px),
    repeating-linear-gradient(0deg, rgba(33, 42, 54, 0.035) 0 1px, transparent 1px 80px),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  width: min(600px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 40px 0;
  align-items: center;
}

.auth-panel {
  min-width: 0;
}

.auth-card,
.workspace-card {
  width: 100%;
  padding: 34px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(213, 220, 229, 0.95);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.card-topline {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.section-label,
.form-message,
.empty-state {
  margin: 0;
}

.section-label {
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

.auth-card h1,
.workspace-card h1 {
  margin: 8px 0 28px;
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: 0;
}

.login-form {
  display: grid;
  gap: 11px;
}

.login-form label {
  color: #3d444d;
  font-size: 13px;
  font-weight: 650;
}

.login-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #c7ced8;
  border-radius: 7px;
  background: #fbfcfd;
  color: var(--text);
  outline: none;
}

.login-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 81, 59, 0.12);
}

.form-message {
  min-height: 20px;
  color: #9b2f2f;
  font-size: 13px;
}

.primary-button,
.ghost-button,
.language-switch button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.primary-button {
  min-height: 46px;
  margin-top: 4px;
  border: 1px solid #17191c;
  background: #17191c;
  color: #ffffff;
}

.primary-button:hover {
  background: #2a2d31;
}

.ghost-button {
  width: 100%;
  margin-top: 24px;
  border: 1px solid #c7ced8;
  background: #ffffff;
  color: #24282d;
}

.language-switch {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  min-width: 168px;
  padding: 3px;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f2f5f7;
}

.language-switch button {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.language-switch button.active {
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(26, 35, 46, 0.08);
}

.stats-table {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.stats-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 15px 16px;
  border-top: 1px solid var(--line);
  color: #22272e;
}

.stats-row:first-child {
  border-top: 0;
}

.stats-head {
  background: #f4f7f5;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.stats-row strong {
  font-size: 20px;
}

.empty-state {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--muted);
}

@media (max-width: 620px) {
  .login-shell {
    width: min(100vw - 28px, 560px);
    padding: 18px 0;
  }

  .auth-card,
  .workspace-card {
    padding: 22px;
  }

  .card-topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .language-switch {
    width: 100%;
  }

  .auth-card h1,
  .workspace-card h1 {
    font-size: 28px;
  }
}
