:root {
  color-scheme: light;
  font-family: system-ui, "Microsoft YaHei", sans-serif;
  color: #152a36;
  background: #eff4f7;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  align-items: start;
  justify-items: center;
  padding: clamp(1rem, 8vh, 5rem) 1rem 2rem;
}

.account {
  width: min(100%, 28rem);
  background: white;
  border: 1px solid #dbe4e9;
  border-radius: 1rem;
  padding: clamp(1.25rem, 6vw, 2rem);
}

.brand { color: #145f60; font-weight: 700; }
h1 { margin: 1rem 0 .6rem; font-size: clamp(1.5rem, 6vw, 2rem); }
p, small { color: #415762; line-height: 1.6; }
p { margin: 0 0 1rem; }
p:empty { display: none; }
#message:not(:empty), #error { margin: 1rem 0; }
#error { color: #9c2929; background: #fff2f0; padding: .65rem .8rem; border-radius: .5rem; }

form { display: grid; gap: .4rem; margin-top: 1.2rem; }
label { font-weight: 600; }
input + label { margin-top: .65rem; }
input, button {
  font: inherit;
  min-height: 2.85rem;
  font-size: max(1rem, 1em);
  border-radius: .5rem;
}

input { width: 100%; border: 1px solid #879da8; padding: .55rem .75rem; }
button {
  border: 1px solid transparent;
  padding: .55rem .85rem;
  color: white;
  background: #145f60;
  font-weight: 650;
  cursor: pointer;
}

form button { margin-top: .6rem; }
button:disabled { opacity: .65; cursor: wait; }
.text-button { color: #145f60; background: transparent; margin-top: .55rem; }
.text-button:hover { background: #eaf4f4; }
:focus-visible { outline: 2px solid #116b83; outline-offset: 3px; }
.login-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .25rem;
  margin-top: 1rem;
  padding: .25rem;
  border-radius: .65rem;
  background: #eef4f4;
}
.login-methods button {
  background: transparent;
  color: #38535a;
  min-height: 2.5rem;
}
.login-methods button[aria-pressed="true"] {
  background: #fff;
  color: #145f60;
  border-color: #cbdcdd;
}
.login-field { display: grid; gap: .4rem; margin-top: .65rem; }
.code-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .55rem; }
.code-field button { margin: 0; }
.secondary { background: #eef4f4; border-color: #cbdcdd; color: #145f60; }
.secondary:hover { background: #e0eeee; }
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.85rem;
  padding: .55rem .85rem;
  border-radius: .5rem;
  font-weight: 650;
  text-underline-offset: .16em;
}
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.2rem; }
.actions .text-button { margin-top: 0; }

.account:has(#profile:not([hidden])) {
  width: min(100%, 44rem);
  box-shadow: none;
}

.profile-header {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .75rem 1rem;
  margin-bottom: 1.25rem;
}

.profile-header h1 { font-size: 1.875rem; }
.profile-header .actions { margin-top: 0; }
.profile-identity { margin: 0; }
#profile-department::before { content: " · "; }
.apps-status { margin-bottom: .5rem; }
.app-list { list-style: none; padding: 0; margin: 0; }
.app-list li { border-top: 1px solid #dbe4e9; }

.app-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .85rem .5rem;
  color: inherit;
  border-radius: .375rem;
  text-decoration: none;
}

.app-list a:hover { background: #edf6f5; }
.app-list a:active { background: #e3efee; }
.app-list strong, .app-list small { display: block; }
.app-open { color: #145f60; font-weight: 650; white-space: nowrap; }

@media (max-width: 30rem) {
  .profile-header { align-items: flex-start; flex-direction: column; }
  .profile-header .actions { margin-left: -.85rem; }
}
