:root {
  color-scheme: light;
  --bg: #f8fafd;
  --surface: #ffffff;
  --surface-variant: #f1f4f9;
  --text: #1f1f1f;
  --muted: #5f6368;
  --line: #dadce0;
  --primary: #1a73e8;
  --primary-hover: #1558b0;
  --primary-soft: #e8f0fe;
  --primary-container: #d3e3fd;
  --on-primary-container: #0842a0;
  --ok: #188038;
  --warn: #f29900;
  --danger: #d93025;
  --shadow-1: 0 1px 2px rgba(60, 64, 67, 0.18), 0 1px 3px rgba(60, 64, 67, 0.12);
  --shadow-2: 0 2px 6px rgba(60, 64, 67, 0.16), 0 8px 24px rgba(60, 64, 67, 0.08);
  font-family: Roboto, "Noto Sans SC", "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 220px;
  background: linear-gradient(180deg, #e8f0fe 0%, rgba(232, 240, 254, 0) 100%);
  pointer-events: none;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 4px;
  font-size: 34px;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: 0;
}

h2 {
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
}

.material-symbols-rounded {
  font-family: "Material Symbols Rounded";
  font-weight: normal;
  font-style: normal;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}

.shell {
  position: relative;
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
  display: grid;
  gap: 20px;
}

.top-app-bar {
  min-height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.top-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.header-chip,
.status-chip {
  min-height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--on-primary-container);
  background: var(--primary-container);
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
  white-space: nowrap;
}

.header-chip {
  padding: 0 10px;
}

.header-chip .material-symbols-rounded {
  font-size: 18px;
}

.brand-lockup {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--primary);
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 1px rgba(26, 115, 232, 0.08);
}

.brand-mark .material-symbols-rounded {
  font-size: 26px;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.surface,
.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-1);
}

.login-surface {
  width: min(460px, 100%);
  padding: 24px;
  display: grid;
  gap: 22px;
}

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

.login-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: var(--primary-soft);
}

.login-mark .material-symbols-rounded {
  font-size: 24px;
}

.form-grid {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
}

.field-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 14px;
  background: #ffffff;
  color: var(--text);
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.14);
}

.filled-button,
.wake-button {
  min-height: 44px;
  border-radius: 6px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #ffffff;
  background: var(--primary);
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-1);
  transition: background 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.filled-button:hover,
.wake-button:hover {
  background: var(--primary-hover);
  box-shadow: var(--shadow-2);
}

.filled-button:active,
.wake-button:active {
  transform: translateY(1px);
}

.filled-button:disabled,
.wake-button:disabled {
  opacity: 0.72;
  cursor: wait;
  transform: none;
}

.icon-button {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}

.icon-button:hover {
  color: var(--text);
  background: rgba(60, 64, 67, 0.08);
}

.dashboard {
  display: grid;
  gap: 16px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.metric {
  min-height: 118px;
  padding: 18px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: 14px;
  align-items: start;
}

.metric-icon {
  width: 44px;
  height: 44px;
  grid-row: span 2;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--primary);
  background: var(--primary-soft);
}

.metric span:not(.material-symbols-rounded) {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}

.metric strong {
  display: block;
  min-width: 0;
  margin-top: 8px;
  overflow-wrap: anywhere;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 700;
}

.wake-surface {
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
}

.wake-copy {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.section-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.status-chip {
  width: fit-content;
  padding: 0 11px;
  color: var(--ok);
  background: #e6f4ea;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.section-title .material-symbols-rounded {
  color: var(--primary);
}

.section-title.compact {
  margin-bottom: 14px;
}

.wake-surface p,
.message {
  color: var(--muted);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.wake-button {
  min-width: 156px;
}

.detail-surface {
  padding: 20px 22px;
}

.detail-surface dl {
  margin: 0;
  display: grid;
  gap: 0;
}

.detail-surface div {
  min-height: 48px;
  padding: 12px 0;
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  border-top: 1px solid var(--line);
}

.detail-surface div:first-child {
  border-top: 0;
}

dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

.ok,
.ok-text {
  color: var(--ok);
}

.warn-text {
  color: var(--warn);
}

.error {
  color: var(--danger);
}

@media (max-width: 720px) {
  body::before {
    height: 180px;
  }

  .shell {
    width: min(100% - 24px, 1040px);
    padding: 24px 0;
    gap: 16px;
  }

  h1 {
    font-size: 28px;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .header-chip {
    display: none;
  }

  .metric-grid,
  .wake-surface,
  .detail-surface div {
    grid-template-columns: 1fr;
  }

  .metric {
    min-height: 104px;
  }

  .wake-button,
  .filled-button {
    width: 100%;
  }
}
