/* Unified login portal (https://admin.toolix.cn/). Same look as the 云朵儿童 admin (yunduo/admin.css); only this
   file and system fonts, no external resources. */

:root {
  color-scheme: light;
  --bg: #f6f1e8;
  --surface: #fffdf8;
  --surface-2: #f3ece0;
  --ink: #1d1b16;
  --muted: #6f675a;
  --line: #ddd2bf;
  --accent: #0d7a52;
  --accent-ink: #ffffff;
  --error: #a7371f;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(27, 23, 17, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
}

h1 {
  margin: 0;
}

a {
  color: inherit;
}

.mono {
  font-family: var(--mono);
  font-size: 0.92em;
}

.hint-text {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.noscript {
  margin: 40px 16px;
  text-align: center;
}

.portal {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 16px 40px;
}

.portal-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.portal-user {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

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

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

.brand-name {
  font-size: 17px;
  font-weight: 800;
}

.brand-sub {
  color: var(--muted);
  font-size: 13px;
}

.card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-card {
  max-width: 380px;
  margin: 0 auto;
}

.card-title,
.view-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
}

.view-title {
  margin-bottom: 16px;
}

.field-label {
  display: block;
  margin: 12px 0 6px 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.text-input {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  line-height: 1.45;
}

.text-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 122, 82, 0.14);
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.primary-button {
  padding: 10px 18px;
  border: 0;
  background: var(--accent);
  color: var(--accent-ink);
}

.primary-button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.ghost-button {
  padding: 7px 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
}

.ghost-button:hover {
  background: var(--surface-2);
}

.wide-button {
  width: 100%;
  margin-top: 20px;
  padding: 12px 18px;
}

.primary-button:focus-visible,
.ghost-button:focus-visible,
.app-card:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.message {
  min-height: 22px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.message.is-error {
  color: var(--error);
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.app-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease;
}

.app-card:hover:not(:disabled) {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.app-card:disabled {
  cursor: not-allowed;
  opacity: 0.75;
}

.app-mark {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--accent);
  color: #ffffff;
  font-size: 21px;
  font-weight: 800;
}

.app-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.app-name {
  font-size: 17px;
  font-weight: 800;
}

.app-desc {
  color: var(--muted);
  font-size: 13px;
}

.app-note {
  color: var(--error);
  font-size: 13px;
  font-weight: 600;
}

/* The busy card sits in the middle of the window, like the entry card of the app pages (yunduo/, deskmate/). */
.busy {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.busy-card {
  width: 100%;
  max-width: 380px;
  padding: 28px 24px 22px;
}

.busy-text {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.portal-foot {
  margin-top: 36px;
  text-align: center;
}

@media (max-width: 520px) {
  .portal {
    padding-top: 20px;
  }

  .card {
    padding: 20px 16px;
  }
}
