:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --line: #d9e0e7;
  --line-strong: #c3ccd6;
  --text: #1f2933;
  --muted: #697586;
  --accent: #0f766e;
  --accent-dark: #0b5f59;
  --amber: #a16207;
  --red: #b42318;
  --green: #087443;
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
}

.login-panel {
  width: min(100%, 390px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  display: grid;
  gap: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  display: inline-grid;
  place-items: center;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  line-height: 1.2;
}

h2 {
  font-size: 18px;
}

h3 {
  font-size: 15px;
}

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

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

input {
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
  outline: none;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .15);
}

.primary,
.secondary {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  padding: 8px 12px;
  font-weight: 700;
}

.primary {
  color: white;
  background: var(--accent);
}

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

.secondary {
  color: var(--text);
  background: #fff;
  border-color: var(--line-strong);
}

.app-shell {
  width: min(1160px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0 18px;
  border-bottom: 1px solid var(--line);
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  justify-content: flex-end;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr);
  gap: 14px;
  padding-top: 16px;
}

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

.panel {
  padding: 16px;
}

.stack {
  display: grid;
  gap: 12px;
}

.row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.row:last-child {
  border-bottom: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef7f6;
  color: #0b4f4a;
  font-size: 12px;
  font-weight: 700;
}

.pill.warn {
  background: #fff7ed;
  color: var(--amber);
}

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

.feedback-card {
  padding: 14px;
  display: grid;
  gap: 12px;
}

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

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

.section {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

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

.section p {
  white-space: pre-wrap;
  color: #354253;
}

.error {
  color: var(--red);
  min-height: 20px;
}

.password-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

@media (max-width: 820px) {
  .topbar,
  .grid,
  .password-panel {
    grid-template-columns: 1fr;
    display: grid;
  }

  .top-actions {
    justify-content: stretch;
  }

  .top-actions > *,
  .top-actions button {
    width: 100%;
  }

  .sections {
    grid-template-columns: 1fr;
  }
}
