:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #64748b;
  --faint: #8a98ab;
  --line: #dfe6ef;
  --soft-line: #edf1f6;
  --page: #f3f6fa;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --blue: #1769ff;
  --blue-2: #0f57df;
  --blue-soft: #e8f1ff;
  --green: #09935d;
  --green-soft: #e8f7ef;
  --orange: #b76b00;
  --orange-soft: #fff3dc;
  --red: #d92d50;
  --red-soft: #fff0f3;
  --nav: #08233b;
  --nav-2: #0c3a5c;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

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

body {
  background: var(--page);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

a {
  color: inherit;
  text-decoration: none;
}

.cloud-login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(8, 35, 59, 0.06), rgba(23, 105, 255, 0.05)),
    var(--page);
}

.cloud-login-shell {
  width: min(100%, 1120px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  min-height: 680px;
  overflow: hidden;
  border: 1px solid #ccd7e5;
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-side {
  padding: 34px;
  background:
    linear-gradient(145deg, rgba(8, 35, 59, 0.96), rgba(12, 58, 92, 0.92)),
    var(--nav);
  color: #eef6ff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}

.login-side.light {
  background:
    linear-gradient(145deg, rgba(247, 252, 249, 0.98), rgba(236, 247, 241, 0.95)),
    #f8fcf9;
  color: #17311f;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
}

.brand-subtitle {
  margin-top: 3px;
  color: rgba(238, 246, 255, 0.68);
  font-size: 12px;
}

.login-side.light .brand-subtitle {
  color: #607466;
}

.login-copy h1 {
  margin: 0 0 14px;
  max-width: 12ch;
  font-size: clamp(40px, 4.5vw, 58px);
  line-height: 0.98;
  letter-spacing: 0;
}

.login-copy p {
  margin: 0;
  max-width: 58ch;
  color: rgba(238, 246, 255, 0.72);
  font-size: 14px;
  line-height: 1.8;
}

.login-side.light .login-copy p {
  color: #607466;
}

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

.route-card {
  min-height: 92px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
}

.login-side.light .route-card {
  border-color: #dbe8dd;
  background: rgba(255, 255, 255, 0.7);
}

.route-card b {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
}

.route-card span {
  display: block;
  color: rgba(238, 246, 255, 0.66);
  font-size: 12px;
  line-height: 1.55;
}

.login-side.light .route-card span {
  color: #6a7b70;
}

.login-panel {
  padding: 42px 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--panel);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid #cfe0f8;
  border-radius: var(--radius);
  background: var(--blue-soft);
  color: var(--blue-2);
  font-size: 12px;
  font-weight: 700;
}

.login-panel h2 {
  margin: 16px 0 8px;
  font-size: 28px;
  line-height: 1.15;
}

.panel-note {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.field {
  margin-bottom: 13px;
}

.field label {
  display: block;
  margin-bottom: 7px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  outline: none;
}

.field input:focus,
.field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(23, 105, 255, 0.12);
}

.btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.btn.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.btn.success {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.btn.danger {
  border-color: #f1bdca;
  background: var(--red-soft);
  color: var(--red);
}

.btn.ghost {
  background: var(--panel-soft);
}

.btn.wide {
  width: 100%;
}

.form-error,
.hint {
  min-height: 18px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.form-error {
  color: var(--red);
}

.hint.success {
  color: var(--green);
}

.hint.error {
  color: var(--red);
}

.helper-row,
.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.helper-row {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.link {
  color: var(--blue-2);
  font-weight: 700;
}

.admin-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
}

.admin-nav {
  min-height: 100vh;
  padding: 18px 12px;
  background: linear-gradient(180deg, var(--nav), #061b2f);
  color: #eaf3ff;
}

.admin-nav .brand-row {
  padding: 0 4px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 14px;
}

.nav-stack {
  display: grid;
  gap: 6px;
}

.nav-btn {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: rgba(234, 243, 255, 0.78);
  text-align: left;
  font-size: 13px;
  font-weight: 700;
}

.nav-btn.active {
  background: rgba(23, 105, 255, 0.95);
  color: #fff;
}

.nav-dot {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 11px;
}

.admin-main {
  min-width: 0;
  padding: 18px;
  background: var(--page);
}

.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.topbar h1 {
  margin: 0;
  font-size: 23px;
  line-height: 1.1;
}

.topbar p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.metric-card,
.work-card,
.table-card,
.side-card,
.phone-card,
.service-band {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.metric-card {
  min-height: 104px;
  padding: 14px;
}

.metric-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric-value {
  margin: 9px 0 5px;
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
}

.metric-sub {
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.8fr);
  gap: 12px;
}

.table-card,
.side-card,
.work-card {
  padding: 14px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.card-head h2,
.card-head h3 {
  margin: 0;
  font-size: 16px;
}

.card-head span {
  color: var(--muted);
  font-size: 12px;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--soft-line);
  text-align: left;
  vertical-align: top;
  font-size: 12px;
}

th {
  color: var(--muted);
  font-weight: 800;
}

.section-panel {
  display: none;
}

.section-panel.active {
  display: block;
}

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

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

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.pill.ok {
  border-color: #bfe8d0;
  background: var(--green-soft);
  color: var(--green);
}

.pill.warn {
  border-color: #f2d6a9;
  background: var(--orange-soft);
  color: var(--orange);
}

.pill.bad {
  border-color: #f6c6d2;
  background: var(--red-soft);
  color: var(--red);
}

.empty {
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

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

.flow-item {
  min-height: 92px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.flow-item b {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.flow-item span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.phone-login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(180deg, #f7fbff, #edf3fa),
    var(--page);
}

.phone-frame {
  width: min(100%, 390px);
  min-height: 760px;
  border: 8px solid #101318;
  border-radius: 34px;
  overflow: hidden;
  background: #f6f8fb;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
}

.phone-screen {
  min-height: 744px;
  display: flex;
  flex-direction: column;
  background: #f7f9fc;
}

.phone-status {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 0;
  color: #111827;
  font-size: 12px;
  font-weight: 800;
}

.phone-header {
  padding: 12px 18px 10px;
}

.address-pill {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #556275;
  font-size: 12px;
}

.phone-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
}

.phone-title-row h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
}

.phone-content {
  flex: 1;
  padding: 0 18px 16px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.phone-card {
  padding: 12px;
}

.account-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dcebff;
  color: var(--blue);
  font-weight: 800;
}

.phone-card h2 {
  margin: 0 0 10px;
  font-size: 15px;
}

.mobile-input {
  width: 100%;
  min-height: 40px;
  margin-top: 8px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  outline: none;
}

.mobile-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(23, 105, 255, 0.12);
}

.mobile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.mobile-actions .btn {
  min-height: 40px;
}

.preview-list {
  display: grid;
  gap: 8px;
}

.preview-row {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--soft-line);
  font-size: 13px;
}

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

.bottom-tabs {
  min-height: 58px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  background: #fff;
}

.bottom-tab {
  display: grid;
  place-items: center;
  color: #627083;
  font-size: 12px;
  font-weight: 800;
}

.bottom-tab.active {
  color: var(--blue);
}

.phone-login-frame {
  min-height: 780px;
  background: #f7f9fc;
}

.phone-login-screen {
  min-height: 764px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(23, 105, 255, 0.08), transparent 34%),
    #f7f9fc;
}

.phone-login-hero {
  padding: 42px 28px 24px;
  display: grid;
  justify-items: center;
  text-align: center;
}

.phone-login-logo {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(180deg, #1769ff, #0753ee);
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(23, 105, 255, 0.28);
}

.phone-login-hero h1 {
  margin: 18px 0 8px;
  color: #101828;
  font-size: 22px;
  line-height: 1.15;
}

.phone-login-hero p {
  max-width: 260px;
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.65;
}

.phone-login-meta {
  width: 100%;
  min-height: 34px;
  margin-top: 18px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid #dfe6ef;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #64748b;
  font-size: 12px;
}

.phone-login-meta span:first-child {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: #e8f1ff;
  color: #0f57df;
  font-weight: 800;
}

.phone-login-meta span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}

.phone-login-content {
  gap: 12px;
  padding-bottom: 26px;
}

.phone-login-card {
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.login-account-head {
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  box-shadow: none;
}

.login-account-head h2 {
  margin: 0 0 3px;
  font-size: 16px;
}

.login-account-head div:last-child div {
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.login-field {
  margin-top: 10px;
}

.login-field label,
.advanced-panel label {
  display: block;
  margin-bottom: 7px;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

.phone-login-card .mobile-input {
  min-height: 48px;
  margin-top: 0;
  padding: 0 13px;
  border-color: #d9e2ee;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
}

.phone-login-options {
  min-height: 36px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.remember-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.remember-row input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--blue);
}

.plain-link {
  border: 0;
  background: transparent;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.login-primary-btn {
  min-height: 48px;
  margin-top: 10px;
  border-radius: 8px;
  font-size: 15px;
  box-shadow: 0 12px 22px rgba(23, 105, 255, 0.24);
}

.login-demo-btn {
  min-height: 46px;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
}

.login-divider {
  height: 32px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  color: #667085;
  font-size: 12px;
}

.login-divider::before,
.login-divider::after {
  content: "";
  height: 1px;
  background: #e4eaf2;
}

.advanced-toggle {
  width: 100%;
  min-height: 34px;
  margin-top: 8px;
}

.advanced-panel {
  margin-top: 8px;
  padding: 12px;
  border: 1px solid #e4eaf2;
  border-radius: 8px;
  background: #f8fafc;
}

.advanced-panel p {
  margin: 8px 0 0;
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forgot-card h2 {
  font-size: 15px;
}

@media (max-width: 1020px) {
  .cloud-login-shell {
    grid-template-columns: 1fr;
  }

  .route-cards,
  .metric-grid,
  .flow-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  .cloud-login-page,
  .phone-login-page {
    padding: 12px;
  }

  .cloud-login-shell {
    min-height: 0;
  }

  .login-side,
  .login-panel {
    padding: 22px;
  }

  .route-cards,
  .metric-grid,
  .flow-row,
  .two-col {
    grid-template-columns: 1fr;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-nav {
    min-height: auto;
  }

  .admin-main {
    padding: 12px;
  }

  .topbar {
    height: auto;
    align-items: flex-start;
    flex-direction: column;
  }

  .phone-frame {
    border-width: 0;
    border-radius: 12px;
    min-height: calc(100vh - 24px);
  }

  .phone-screen {
    min-height: calc(100vh - 24px);
  }

  .phone-login-frame {
    min-height: calc(100vh - 24px);
  }

  .phone-login-screen {
    min-height: calc(100vh - 24px);
  }

  .phone-login-hero {
    padding-top: 34px;
  }
}
