:root {
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #172033;
  background: #f6f8fc;
  font-synthesis: none;
  --green: #293c8f;
  --muted: #526079;
  --border: #dfe5ef;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 9px 14px;
  background: white;
  color: inherit;
}
button:hover {
  background: #eef2ff;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
a {
  color: var(--green);
}
[hidden] {
  display: none !important;
}
.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.primary:hover {
  background: #203174;
}
.full {
  width: 100%;
}
.logo {
  display: inline-grid;
  place-items: center;
  width: 35px;
  height: 35px;
  color: white;
  background: var(--green);
  border-radius: 9px;
  font-size: 21px;
  font-weight: 800;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-weight: 750;
  letter-spacing: 1px;
  text-decoration: none;
  color: inherit;
}
.brand small {
  display: block;
  font-size: 14px;
  letter-spacing: 1px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 4px;
}
.login-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
.login-story {
  padding: 64px;
  background: #edf1ff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-image: radial-gradient(
    circle at 85% 60%,
    #d7e0ff 0,
    transparent 45%
  );
}
h1 {
  font-size: 44px;
  line-height: 1.45;
  letter-spacing: -1.5px;
  margin: 18px 0;
}
.login-story p {
  line-height: 1.9;
  color: #455575;
}
.eyebrow {
  font-size: 14px;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--green);
}
.login-panel {
  display: grid;
  place-items: center;
  background: white;
  padding: 32px;
}
.login-panel form {
  width: min(380px, 100%);
}
h2 {
  font-size: 25px;
  letter-spacing: -0.5px;
}
.muted {
  color: var(--muted);
  line-height: 1.7;
}
.login-panel label {
  margin: 24px 0;
}
.login-panel .primary {
  margin-top: 10px;
}
label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #28374f;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #cdd6e5;
  border-radius: 6px;
  padding: 11px;
  background: white;
  margin-top: 7px;
  color: #172033;
  min-width: 0;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #c5d0ff;
  border-color: var(--green);
}
input[type="checkbox"] {
  width: auto;
  margin: 0 9px 0 0;
}
textarea {
  min-height: 90px;
}
.shell {
  display: flex;
  min-height: 100vh;
}
aside {
  width: 226px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.nav-caption {
  font-size: 14px;
  letter-spacing: 2px;
  color: #526079;
  margin: 43px 14px 15px;
}
nav a {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border-radius: 7px;
  margin: 3px 0;
  text-decoration: none;
  color: #33435e;
  font-size: 14px;
}
nav a.active {
  background: #edf1ff;
  color: #293c8f;
  font-weight: 650;
}
nav .symbol {
  font-size: 16px;
  width: 19px;
}
.aside-footer {
  margin-top: auto;
  font-size: 14px;
  line-height: 2;
  color: #526079;
  padding: 20px 10px 0;
}
.aside-footer small {
  font-size: 14px;
  color: #526079;
}
.dot {
  display: inline-block;
  background: #45a875;
  border-radius: 50%;
  width: 6px;
  height: 6px;
  margin-right: 7px;
}
.main {
  flex: 1;
  min-width: 0;
}
header {
  height: 73px;
  border-bottom: 1px solid var(--border);
  background: #ffffffa8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 38px;
  font-size: 14px;
  color: #526079;
}
header > div {
  display: flex;
  align-items: center;
  gap: 15px;
}
.text-button {
  border: 0;
  background: transparent;
  font-size: 14px;
}
main {
  padding: 34px 38px 60px;
  max-width: 1640px;
  margin: auto;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 26px;
}
.page-heading h1 {
  font-size: 28px;
  margin: 4px 0;
  letter-spacing: -0.8px;
}
.page-heading p {
  font-size: 14px;
  color: var(--muted);
  margin: 8px 0;
}
.date-pill {
  font-size: 14px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 12px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 17px;
  margin: 24px 0;
}
.stat {
  padding: 23px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.stat.feature {
  background: #293c8f;
  color: white;
  border-color: #293c8f;
}
.stat-label {
  font-size: 14px;
  color: #526079;
}
.stat.feature .stat-label {
  color: #edf1ff;
}
.stat-value {
  font-size: 31px;
  font-weight: 650;
  letter-spacing: -1px;
  margin: 17px 0;
}
.stat-sub {
  font-size: 14px;
  color: #526079;
}
.stat.feature .stat-sub {
  color: #edf1ff;
}
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 22px;
  overflow: hidden;
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 21px 23px;
  border-bottom: 1px solid #e9edf4;
  gap: 12px;
}
.card-head h3 {
  font-size: 14px;
  margin: 0;
}
.card-head p {
  font-size: 14px;
  color: var(--muted);
  margin: 7px 0 0;
}
.card-body {
  padding: 24px;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 21px;
}
.chart {
  height: 175px;
  display: flex;
  gap: 9px;
  align-items: flex-end;
  padding: 10px 3px 0;
}
.bar-wrap {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  flex: 1;
  gap: 10px;
  min-width: 0;
}
.bar {
  width: 100%;
  max-width: 34px;
  background: #3c53aa;
  border-radius: 4px 4px 0 0;
  min-height: 3px;
}
.bar-wrap span {
  font-size: 14px;
  color: #526079;
}
.onboard {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid #e9edf4;
}
.onboard:last-child {
  border: 0;
}
.step {
  border: 1px solid #dfe5ef;
  color: var(--green);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-size: 14px;
  flex-shrink: 0;
}
.onboard h4 {
  margin: 0 0 6px;
  font-size: 14px;
}
.onboard p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  white-space: nowrap;
  font-size: 14px;
  text-align: left;
}
th {
  font-weight: 500;
  color: #455575;
  background: #f8faff;
  font-size: 14px;
  padding: 14px 19px;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 16px 19px;
  border-bottom: 1px solid #e9edf4;
}
tr:last-child td {
  border-bottom: 0;
}
td small {
  display: block;
  font-size: 14px;
  color: #526079;
  margin-top: 4px;
}
td button {
  padding: 5px 9px;
  font-size: 14px;
  margin: 2px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  padding: 5px 8px;
  border-radius: 5px;
  background: #eaf5ed;
  color: #35754e;
}
.badge.warn {
  color: #997031;
  background: #fbf3df;
}
.badge.off {
  color: #8e6a6a;
  background: #f5eded;
}
.empty {
  text-align: center;
  padding: 50px 20px;
  color: var(--muted);
  font-size: 14px;
}
.empty strong {
  display: block;
  font-size: 16px;
  color: #28374f;
  margin-bottom: 10px;
}
.notice {
  font-size: 14px;
  padding: 14px 18px;
  border: 1px solid #e6d9b1;
  background: #fcf8e9;
  color: #89703d;
  border-radius: 7px;
  margin-bottom: 22px;
  line-height: 1.8;
}
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
}
.toolbar input,
.toolbar select {
  margin: 0;
  max-width: 220px;
  font-size: 14px;
  padding: 8px;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 15px;
  padding: 15px;
  font-size: 14px;
  color: var(--muted);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-grid .span2 {
  grid-column: 1/-1;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 25px;
}
dialog {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0;
  width: min(650px, 92vw);
  max-height: 90vh;
  box-shadow: 0 22px 100px #10251930;
}
dialog::backdrop {
  background: #17352860;
  backdrop-filter: blur(2px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 19px 25px;
  border-bottom: 1px solid var(--border);
}
.dialog-heading h2 {
  font-size: 18px;
  margin: 0;
}
.dialog-heading button {
  border: 0;
  font-size: 22px;
  padding: 0 4px;
}
#dialog-body {
  padding: 25px;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f3f6fc;
  border: 1px solid var(--border);
  padding: 15px;
  font-size: 14px;
  line-height: 1.7;
  border-radius: 6px;
}
#toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  max-width: 450px;
  background: #243675;
  color: white;
  border-radius: 8px;
  padding: 15px 22px;
  font-size: 14px;
  box-shadow: 0 8px 30px #0002;
  z-index: 100;
}
.error {
  color: #b03c3c;
  font-size: 14px;
}
.import-page {
  max-width: 720px;
  margin: 70px auto;
  padding: 25px;
}
.import-page .brand {
  margin-bottom: 40px;
}
.import-page h1 {
  font-size: 30px;
}
.import-page .card {
  padding: 30px;
}
.import-page a.primary {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 6px;
  text-decoration: none;
}
.mono {
  font-family: Consolas, monospace;
}
.checkbox-label {
  display: flex;
  align-items: center;
  padding-top: 20px;
}
footer {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  margin-top: 24px;
}
@media (max-width: 1100px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  main {
    padding: 24px;
  }
  header {
    padding: 0 24px;
  }
}
@media (max-width: 750px) {
  aside {
    width: 68px;
    padding: 22px 10px;
  }
  .brand > span:not(.logo),
  aside .brand small,
  .nav-caption,
  .aside-footer,
  nav .nav-label {
    display: none;
  }
  nav {
    margin-top: 35px;
  }
  nav a {
    padding: 12px;
  }
  .logo {
    width: 34px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading h1 {
    font-size: 23px;
  }
  .date-pill {
    display: none;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 17px;
  }
  .stat-value {
    font-size: 25px;
  }
  main {
    padding: 18px 13px;
  }
  header {
    padding: 0 14px;
  }
  #admin-email {
    display: none;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .span2 {
    grid-column: auto;
  }
  .login-wrap {
    grid-template-columns: 1fr;
  }
  .login-story {
    display: none;
  }
  .login-panel {
    min-height: 100vh;
  }
  .import-page {
    margin: 20px auto;
  }
  .toolbar {
    flex-wrap: wrap;
  }
}

.stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.stat {
  min-width: 0;
}
.stat-value {
  overflow-wrap: anywhere;
}
@media (max-width: 1100px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 430px) {
  .stats {
    grid-template-columns: 1fr;
  }
}

/* Aoma: original SaaS-style presentation; existing application contracts retained. */
:root {
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  --brand: #293c8f;
}
body {
  font-size: 16px;
}
button,
input,
select,
textarea {
  font-size: 16px;
}
button {
  min-height: 44px;
  border-radius: 9px;
  font-weight: 600;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #8298ed;
}
.logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  background: white;
  border: 1px solid #e4e9f2;
  border-radius: 12px;
  flex-shrink: 0;
}
.brand {
  letter-spacing: 0;
  font-size: 22px;
  line-height: 1.35;
}
.brand small {
  font-size: 14px;
  color: #526079;
  font-weight: 500;
}
aside {
  width: 264px;
  padding: 28px 18px;
}
aside .brand {
  padding: 0 8px;
}
.nav-caption {
  font-size: 14px;
  margin-top: 40px;
}
nav a {
  font-size: 16px;
  min-height: 50px;
  padding: 12px 16px;
  margin: 6px 0;
  border: 1px solid transparent;
}
nav a:hover {
  background: #f4f6fc;
}
nav a.active {
  background: #edf1ff;
  color: #243675;
  border-color: #dce3fa;
}
nav .symbol {
  font-size: 21px;
  width: 24px;
  text-align: center;
}
.aside-footer {
  border-top: 1px solid var(--border);
  font-size: 14px;
}
.aside-footer small {
  font-size: 14px;
}
.aside-footer .dot {
  background: #293c8f;
}
header {
  height: 80px;
  background: #fff;
  font-size: 14px;
  padding: 0 32px;
}
#admin-email {
  color: #33435e;
}
main {
  padding: 32px;
  max-width: 1760px;
}
.page-heading h1 {
  font-size: 32px;
  letter-spacing: -0.6px;
  font-weight: 750;
}
.page-heading p {
  font-size: 16px;
}
.page-heading .eyebrow {
  font-size: 14px;
  color: var(--brand);
}
.date-pill {
  font-size: 14px;
  padding: 10px 16px;
}
.stats {
  gap: 20px;
}
.stat,
.card {
  border-radius: 14px;
  box-shadow: 0 2px 4px #192a4910;
}
.stat {
  padding: 24px;
}
.stat-label {
  font-size: 16px;
  font-weight: 600;
  color: #33435e;
}
.stat-value {
  font-size: 32px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.stat-sub {
  font-size: 14px;
  line-height: 1.7;
}
.stat.feature {
  background: linear-gradient(125deg, #293c8f, #344fa8);
  border-color: #293c8f;
}
.card-head {
  padding: 22px 24px;
  background: #fff;
}
.card-head h3 {
  font-size: 18px;
  font-weight: 700;
}
.card-head p {
  font-size: 14px;
}
.dashboard-grid {
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr);
  gap: 24px;
}
.chart {
  height: 230px;
}
.bar-wrap span {
  font-size: 14px;
}
.step {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: #f1f4ff;
  font-size: 14px;
  font-weight: 700;
}
.onboard {
  gap: 16px;
  padding: 18px 0;
}
.onboard h4 {
  font-size: 16px;
}
.onboard p {
  font-size: 14px;
}
table {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
th {
  font-size: 14px;
  font-weight: 650;
  padding: 16px 22px;
}
td {
  padding: 20px 22px;
}
tbody tr:hover {
  background: #f8faff;
}
td small {
  font-size: 14px;
}
td button {
  font-size: 14px;
  min-height: 38px;
  padding: 7px 12px;
}
.badge {
  font-size: 14px;
  padding: 5px 10px;
}
.badge.warn {
  color: #77500b;
  background: #fff4d7;
}
.badge.off {
  color: #923b3b;
  background: #fff0f0;
}
label {
  font-size: 16px;
  color: #28374f;
}
input,
select,
textarea {
  padding: 12px 14px;
  border-radius: 9px;
  min-height: 46px;
}
input[type="checkbox"] {
  min-height: 20px;
  width: 20px;
  accent-color: var(--brand);
}
.toolbar {
  flex-wrap: wrap;
}
.toolbar input,
.toolbar select {
  font-size: 16px;
  padding: 10px 12px;
}
.empty {
  font-size: 16px;
  padding: 56px 24px;
}
.empty strong {
  font-size: 18px;
}
.notice {
  font-size: 14px;
  color: #6b501d;
  background: #fffaf0;
  border-color: #eadcb9;
}
.pagination {
  font-size: 14px;
}
dialog {
  width: min(800px, 94vw);
  border-radius: 16px;
  color: #172033;
  box-shadow: 0 24px 100px #14254a30;
}
dialog::backdrop {
  background: #15213c66;
}
.dialog-heading {
  padding: 22px 28px;
}
.dialog-heading h2 {
  font-size: 22px;
}
#dialog-body {
  padding: 28px;
}
pre {
  font-size: 14px;
}
.error {
  font-size: 14px;
  color: #b42332;
}
#toast {
  font-size: 16px;
  max-width: min(480px, calc(100vw - 32px));
}
.login-story {
  padding: 56px;
  background: #edf1ff;
  background-image: radial-gradient(
    circle at 80% 70%,
    #d4ddff,
    transparent 55%
  );
}
.login-story h1 {
  font-size: clamp(36px, 3.4vw, 56px);
  line-height: 1.35;
  color: #243675;
  letter-spacing: -1px;
}
.login-story p {
  font-size: 18px;
}
.login-story .eyebrow {
  font-size: 14px;
}
.login-story small {
  font-size: 16px;
}
.login-panel {
  padding: 48px;
}
.login-panel form {
  width: min(420px, 100%);
}
.login-panel h2 {
  font-size: 32px;
  margin: 20px 0 12px;
}
.login-mark {
  width: 84px;
  height: 84px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 18px;
}
.login-panel .full {
  min-height: 52px;
}
.import-page {
  max-width: 880px;
  margin: 48px auto;
}
.import-page h1 {
  font-size: 36px;
  line-height: 1.4;
}
.import-page .card {
  padding: 32px;
}
.import-page button,
.import-page a.primary {
  margin: 8px 8px 8px 0;
}
.import-page footer {
  font-size: 14px;
}
@media (max-width: 1200px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  main {
    padding: 26px;
  }
  aside {
    width: 244px;
  }
}
@media (max-width: 750px) {
  .shell {
    display: block;
  }
  aside {
    position: relative;
    width: 100%;
    height: auto;
    padding: 18px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  aside .brand > span:not(.logo),
  aside .brand small,
  nav .nav-label {
    display: block;
  }
  aside .brand {
    font-size: 20px;
  }
  aside .logo {
    width: 46px;
    height: 46px;
  }
  nav {
    display: flex;
    overflow-x: auto;
    margin-top: 16px;
    gap: 6px;
  }
  nav a {
    flex-shrink: 0;
    margin: 0;
    font-size: 14px;
    min-height: 44px;
    padding: 8px 12px;
  }
  nav .symbol {
    font-size: 18px;
    width: 20px;
  }
  .nav-caption,
  .aside-footer {
    display: none;
  }
  header {
    height: 60px;
    padding: 0 18px;
  }
  main {
    padding: 24px 16px;
  }
  .page-heading {
    flex-wrap: wrap;
  }
  .page-heading h1 {
    font-size: 28px;
  }
  .page-heading p {
    font-size: 16px;
  }
  .page-heading .eyebrow {
    font-size: 14px;
  }
  .stat {
    padding: 20px;
  }
  .stat-value {
    font-size: 30px;
  }
  .stats {
    gap: 14px;
  }
  .login-panel {
    padding: 28px;
  }
  .login-story {
    display: none;
  }
  .import-page {
    margin: 12px auto;
    padding: 22px 16px;
  }
  .import-page h1 {
    font-size: 28px;
  }
  .import-page .card {
    padding: 24px;
  }
  .brand {
    font-size: 19px;
  }
  .brand .logo {
    width: 48px;
    height: 48px;
  }
  .card-head {
    flex-wrap: wrap;
  }
  .toolbar input,
  .toolbar select {
    max-width: 100%;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  #dialog-body {
    padding: 22px;
  }
}
@media (max-width: 430px) {
  .stats {
    grid-template-columns: 1fr;
  }
  .stat-value {
    font-size: 32px;
  }
}
