/* Shared visual foundation. This file only normalizes typography and surface rhythm. */
:root {
  --ui-font-sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  --ui-data-font-size: 14px;
  --ui-data-font-weight: 400;
  --ui-data-line-height: 1.55;
  --ui-label-font-size: 12px;
  --ui-label-font-weight: 500;
  --ui-text: #1f2937;
  --ui-muted: #667085;
  --ui-subtle: #98a2b3;
  --ui-line: #e5e7eb;
  --ui-surface: #ffffff;
  --ui-surface-soft: #f8fafc;
  --ui-primary: #7c3aed;
}

html {
  font-size: 16px;
  text-rendering: optimizeLegibility;
}

body,
button,
input,
select,
textarea {
  font-family: var(--ui-font-sans);
  letter-spacing: 0;
}

body {
  color: var(--ui-text);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font-size: inherit;
  line-height: 1.45;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--ui-text);
  line-height: 1.35;
  letter-spacing: 0;
}

p,
li,
td,
th,
label {
  line-height: 1.65;
}

small,
.text-sm,
.text-xs {
  line-height: 1.5;
}

::placeholder {
  color: var(--ui-subtle);
  opacity: 1;
}

/* Standalone utility/database pages use the same restrained reading rhythm. */
.page-container,
.main-container,
.content-container,
.panel-content,
.settings-panel,
.task-panel {
  font-family: var(--ui-font-sans);
}

.page-container h1,
.main-container h1,
.content-container h1 {
  font-size: 26px;
  font-weight: 650;
  margin: 0 0 18px;
}

.page-container h2,
.main-container h2,
.content-container h2 {
  font-size: 21px;
  font-weight: 650;
  margin: 24px 0 12px;
}

.page-container h3,
.main-container h3,
.content-container h3 {
  font-size: 17px;
  font-weight: 650;
  margin: 18px 0 10px;
}

.page-container p,
.main-container p,
.content-container p {
  margin: 0 0 12px;
}

.page-container table,
.main-container table,
.content-container table {
  font-size: 14px;
}

.page-container th,
.page-container td,
.main-container th,
.main-container td,
.content-container th,
.content-container td {
  line-height: 1.55;
  padding: 10px 12px;
}

/* Keep the public auth surfaces calm and flat while preserving their layouts. */
.login-container,
.bg-gradient-custom {
  background: #f7f8fb !important;
}

.login-container::before,
.login-container::after {
  display: none !important;
}

.btn-purple {
  background: var(--ui-primary) !important;
  background-image: none !important;
}

@media (max-width: 768px) {
  body {
    font-size: 14px;
    line-height: 1.6;
  }

  .page-container h1,
  .main-container h1,
  .content-container h1 {
    font-size: 22px;
  }

  .page-container h2,
  .main-container h2,
  .content-container h2 {
    font-size: 18px;
  }
}
